SHA256
1
0
forked from pool/binutils
binutils/eh-frame-hdr-on-shared-lib-bfd.patch
Richard Biener 845c324ebc Accepting request 282205 from home:Andreas_Schwab:Factory
- eh-frame-hdr-on-shared-lib-bfd.patch: Don't create .eh_frame_hdr on
  shared lib bfd, fixes building libgcj on ppc64

OBS-URL: https://build.opensuse.org/request/show/282205
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=177
2015-01-21 11:28:20 +00:00

30 lines
1.1 KiB
Diff

2014-12-24 Alan Modra <amodra@gmail.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Exclude
shared libraries in loop looking for .eh_frame sections.
Similarly for build-id loop.
Index: binutils-2.25.0/ld/emultempl/elf32.em
===================================================================
--- binutils-2.25.0.orig/ld/emultempl/elf32.em
+++ binutils-2.25.0/ld/emultempl/elf32.em
@@ -1015,7 +1015,8 @@ gld${EMULATION_NAME}_after_open (void)
/* Find an ELF input. */
for (abfd = link_info.input_bfds;
abfd != (bfd *) NULL; abfd = abfd->link.next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && bfd_count_sections (abfd) != 0)
break;
/* PR 10555: If there are no ELF input files do not try to
@@ -1053,6 +1054,8 @@ gld${EMULATION_NAME}_after_open (void)
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
{
+ if (bfd_count_sections (abfd) == 0)
+ continue;
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
elfbfd = abfd;
if (!warn_eh_frame)