This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] MIPS Compact EH follow-on patch
- From: "Moore, Catherine" <Catherine_Moore at mentor dot com>
- To: "nickc at redhat dot com" <nickc at redhat dot com>
- Cc: "Moore, Catherine" <Catherine_Moore at mentor dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 8 Jul 2015 20:09:03 +0000
- Subject: [RFA] MIPS Compact EH follow-on patch
- Authentication-results: sourceware.org; auth=none
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