This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFC] PR other/22313: Hot/cold sections vs. dwarf2 (take 2)

Roger Sayle wrote:

2006-08-31 Roger Sayle <>

	PR other/22313
	* dwarf2out.c (add_fde_cfi): Use a set_loc if the current label is
	NULL, otherwise use an advance_loc4 to adjust relative to the
	current label.
	(output_cfi) <DW_CFA_set_loc>: Update the current label.
	(dwarf2out_switch_text_section): Reset the current label to avoid
	using advance_loc4 over section boundaries.

This breaks exception handling on mipsel-linux-gnu. I did a regression hunt and r116604 (this patch) fails, where as r116603 works.

The problem is that with this patch applied the first instruction in a FDE is typically DW_CFA_set_loc, before the patch it was DW_CFA_advance_loc.

The mips linker changes the CIE augmentation to be PC relative when it generates a shared object (and perhaps at other times as well, but I have not investigated exactly where it happens). This transformation does not effect the DW_CFA_advance_loc instrunctions as they already use relative addressing. But the transformation fails with DW_CFA_set_loc as it uses an absolute address and is not easily transformed.

It is possible that this problem needs to be addressed in the linker, here is a message I posted to the binutils list further discussing the problem:

In any event there is a regression for mipsel-linux. libgcj is totally broken, C++ exceptions are broken.

David Daney

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]