1 http://bugs.gentoo.org/392645
2 http://sourceware.org/bugzilla/show_bug.cgi?id=13470
4 2011-12-03 Alan Modra <amodra@gmail.com>
7 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive
8 change in 2011-07-01 commit. Comment.
9 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
11 diff -durN binutils-2.22.orig/bfd/elf32-ppc.c binutils-2.22/bfd/elf32-ppc.c
12 --- binutils-2.22.orig/bfd/elf32-ppc.c 2011-11-21 10:29:21.000000000 +0100
13 +++ binutils-2.22/bfd/elf32-ppc.c 2011-12-14 19:52:43.308784395 +0100
14 @@ -2987,10 +2987,6 @@
15 edir->elf.needs_plt |= eind->elf.needs_plt;
16 edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
18 - /* If we were called to copy over info for a weak sym, that's all. */
19 - if (eind->elf.root.type != bfd_link_hash_indirect)
22 if (eind->dyn_relocs != NULL)
24 if (edir->dyn_relocs != NULL)
25 @@ -3022,6 +3018,16 @@
26 eind->dyn_relocs = NULL;
29 + /* If we were called to copy over info for a weak sym, that's all.
30 + You might think dyn_relocs need not be copied over; After all,
31 + both syms will be dynamic or both non-dynamic so we're just
32 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
33 + code in ppc_elf_adjust_dynamic_symbol needs to check for
34 + dyn_relocs in read-only sections, and it does so on what is the
36 + if (eind->elf.root.type != bfd_link_hash_indirect)
39 /* Copy over the GOT refcount entries that we may have already seen to
40 the symbol which just became indirect. */
41 edir->elf.got.refcount += eind->elf.got.refcount;
42 diff -durN binutils-2.22.orig/bfd/elf64-ppc.c binutils-2.22/bfd/elf64-ppc.c
43 --- binutils-2.22.orig/bfd/elf64-ppc.c 2011-11-21 10:29:24.000000000 +0100
44 +++ binutils-2.22/bfd/elf64-ppc.c 2011-12-14 19:52:43.336784395 +0100
45 @@ -4435,10 +4435,6 @@
46 edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
47 edir->elf.needs_plt |= eind->elf.needs_plt;
49 - /* If we were called to copy over info for a weak sym, that's all. */
50 - if (eind->elf.root.type != bfd_link_hash_indirect)
53 /* Copy over any dynamic relocs we may have on the indirect sym. */
54 if (eind->dyn_relocs != NULL)
56 @@ -4471,6 +4467,16 @@
57 eind->dyn_relocs = NULL;
60 + /* If we were called to copy over info for a weak sym, that's all.
61 + You might think dyn_relocs need not be copied over; After all,
62 + both syms will be dynamic or both non-dynamic so we're just
63 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
64 + code in ppc64_elf_adjust_dynamic_symbol needs to check for
65 + dyn_relocs in read-only sections, and it does so on what is the
67 + if (eind->elf.root.type != bfd_link_hash_indirect)
70 /* Copy over got entries that we may have already seen to the
71 symbol which just became indirect. */
72 if (eind->elf.got.glist != NULL)