This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[RFA] MIPS Compact EH follow-on patch


Hi Nick,

This patch fixes an ordering problem in the Compact EH patch.
_bfd_elf_may_strip_eh_frame_hdr needs to be called before the dynamic sections are sized because it may create a hidden symbol that is not correctly accounted for in the got allocation done in (*bed->elf_backend_size_dynamic_sections).

GAS and LD were tested across most of the platforms.  
Okay to commit?

Thanks,
Catherine

2015-07-08   Catherine Moore  <clm@codesourcery.com>

        bfd/
        * elflink.c (bfd_elf_size_dynamic_sections): Call to
        _bfd_elf_maybe_strip_eh_frame_hdr should be before
        bed->elf_backend_size_dynamic_sections.

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1c0861b..8064291 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5659,6 +5659,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,

   dynobj = elf_hash_table (info)->dynobj;

+  if (!_bfd_elf_maybe_strip_eh_frame_hdr (info))
+    return FALSE;
+
   if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
     {
       struct elf_info_failed eif;
@@ -5964,9 +5967,6 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
       && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
     return FALSE;

-  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
-    return FALSE;
-
   if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
     {
       unsigned long section_sym_count;

Catherine Moore
Mentor Embedded Software Division
www.mentor.com/embedded 
        



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