eh_frame_hdr generation quirk

Jan Beulich jbeulich@novell.com
Fri Oct 6 15:58:00 GMT 2006


The first thing _bfd_elf_discard_section_eh_frame() does when
encountering an FDE is

	  /* Ensure this FDE uses the last CIE encountered.  */
	  REQUIRE (last_cie);
	  REQUIRE (hdr.id == (unsigned int) (buf - 4 - last_cie));

Can anyone explain why this condition is required? Compiler-generated
objects likely always meet this, but assembler generated sources easily
don't, due to the CIE re-use logic in gas.
Thus, even after working around the problem that ld doesn't make any
attempt to generate honour --eh-frame-hdr if no shared objects are
involved in linking an executable, the generation of the table still fails
when trying this with the Linux kernel.

Thanks for any clarification,
Jan



More information about the Binutils mailing list