public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [GOLD][PATCH] Set SHF_LINK_ORDER flags of ARM EXIDX sections.
@ 2010-10-19  8:17 Doug Kwan (關振德)
  2010-10-19 14:08 ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: Doug Kwan (關振德) @ 2010-10-19  8:17 UTC (permalink / raw)
  To: Ian Lance Taylor, binutils

Hi

    This patch changes code writing output section headers so that the
SHF_LINK_ORDER flag of a section of type SHT_ARM_EXIDX is always set.
The flag is required to be set for such a section by the ARM EHABI.
The existing code drops the SHF_LINK_ORDER flag and that confuses
other tools.  Gold does not handle SHF_LINK_ORDER in general but the
ARM back-end can handle the EXIDX sections.

-Doug


2010-10-19  Doug Kwan  <dougkwan@google.com>

        * output.cc(Output_section::write_header): Set SHF_LINK_ORDER flags of
        ARM EXIDX sections.

Index: gold/output.cc
===================================================================
RCS file: /cvs/src/src/gold/output.cc,v
retrieving revision 1.136
diff -u -u -p -r1.136 output.cc
--- gold/output.cc	18 Oct 2010 05:39:23 -0000	1.136
+++ gold/output.cc	19 Oct 2010 08:09:15 -0000
@@ -3091,6 +3091,10 @@ Output_section::write_header(const Layou
   elfcpp::Elf_Xword flags = this->flags_;
   if (this->info_section_ != NULL && this->info_uses_section_index_)
     flags |= elfcpp::SHF_INFO_LINK;
+  // ARM EHABI requires a SHT_ARM_EXIDX section to have the SHF_LINK_ORDER
+  // flag set.
+  if (this->type_ == elfcpp::SHT_ARM_EXIDX)
+    flags |= elfcpp::SHF_LINK_ORDER;
   oshdr->put_sh_flags(flags);

   oshdr->put_sh_addr(this->address());

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-10-20 17:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19  8:17 [GOLD][PATCH] Set SHF_LINK_ORDER flags of ARM EXIDX sections Doug Kwan (關振德)
2010-10-19 14:08 ` Ian Lance Taylor
2010-10-19 16:12   ` Doug Kwan (關振德)
2010-10-19 16:33     ` Cary Coutant
2010-10-19 16:52       ` Doug Kwan (關振德)
2010-10-19 16:54     ` Ian Lance Taylor
2010-10-19 18:54       ` Doug Kwan (關振德)
2010-10-19 19:29         ` Ian Lance Taylor
     [not found]         ` <AANLkTimBgvCfeY3gTPV8UkUPH2igcmhzd=LJDVF5gRgd@mail.gmail.com>
2010-10-19 20:29           ` Ian Lance Taylor
     [not found]           ` <AANLkTi=4DTSjUz5HCbU8uARWHEd8Deh3jhFYgrxqpaU2@mail.gmail.com>
2010-10-20 10:39             ` Doug Kwan (關振德)
2010-10-20 14:54               ` Ian Lance Taylor
2010-10-20 17:41               ` Cary Coutant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).