Bug in ARM linker...

Ian Lance Taylor ian@zembu.com
Tue Nov 23 16:02:00 GMT 1999


   Date: Tue, 23 Nov 1999 18:49:08 -0500
   From: Scott Bambrough <scottb@netwinder.org>

   These 3 sections all share the SAME output section.  I think this is the
   root cause of the problem.  Somewhere along the way the flags for the
   output .text section are altered by the code.  At any rate I believe
   this is the reason why the DT_TEXTREL tag is not output in the .dynamic
   section.  The output .text section should be readonly for ELF.

The linker script directs the linker to put the .glue sections in the
.text section.  This is normal behaviour.

The bug is that the .glue sections are not marked SEC_READONLY, but
presumably they should be.  See bfd_elf32_arm_get_bfd_for_interworking
in bfd/elf32-arm.h.  Add SEC_READONLY and SEC_CODE to the flags passed
to bfd_set_section_flags.

Nick, let me know if that seems wrong.

Ian


More information about the Binutils mailing list