summaryrefslogtreecommitdiffstats
path: root/ld/emultempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-08-22 20:21:21 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-08-22 20:21:21 +0000
commit4440bb778588d144441f18d8053c0dfa42440f5d (patch)
treed38abf3704f72e8087511e0312e1c88a53758fa9 /ld/emultempl
parent39334f3a4789eeaf07b8d74fa40e01cd59413831 (diff)
downloadppe42-binutils-4440bb778588d144441f18d8053c0dfa42440f5d.tar.gz
ppe42-binutils-4440bb778588d144441f18d8053c0dfa42440f5d.zip
Find one .eh_frame section for --eh-frame-hdr.
2010-08-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/11937 * emultempl/elf32.em (_after_open): Find one .eh_frame section for --eh-frame-hdr.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em15
1 files changed, 10 insertions, 5 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index bf4359dad1..aa9d787927 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1132,11 +1132,16 @@ gld${EMULATION_NAME}_after_open (void)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
elfbfd = abfd;
- s = bfd_get_section_by_name (abfd, ".eh_frame");
- if (s && s->size > 8 && !bfd_is_abs_section (s->output_section))
- warn_eh_frame = TRUE;
- if (elfbfd && warn_eh_frame)
- break;
+ if (!warn_eh_frame)
+ {
+ s = bfd_get_section_by_name (abfd, ".eh_frame");
+ warn_eh_frame
+ = (s
+ && s->size > 8
+ && !bfd_is_abs_section (s->output_section));
+ }
+ if (elfbfd && warn_eh_frame)
+ break;
}
if (elfbfd)
{
OpenPOWER on IntegriCloud