]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR28523, ld.bfd created undefined symbols on ppc64
authorAlan Modra <amodra@gmail.com>
Tue, 2 Nov 2021 08:31:06 +0000 (19:01 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Nov 2021 01:08:42 +0000 (11:38 +1030)
commitb1d7b59622f9941e7fa72418b7a41f148d83155e
treecccf3de1552a0b5c45199afb50481987ee51035d
parent17ca3e2a9a7606e618b07642419820adc5241d90
PR28523, ld.bfd created undefined symbols on ppc64

This patch removes any fake (linker created) function descriptor
symbol if its code entry symbol isn't dynamic, to ensure bogus dynamic
symbols are not created.  The change to func_desc_adjust requires that
it be run only once, which means ppc64_elf_tls_setup can't call it for
just a few selected symbols.

PR 28523
* elf64-ppc.c (func_desc_adjust): If a function entry sym is
not dynamic and has no plt entry, hide any associated fake
function descriptor symbol.
(ppc64_elf_edit): Move func_desc_adjust iteration over syms to..
(ppc64_elf_tls_setup): ..here.

(cherry picked from commit a442059f66075e4e503c43b119cc8b7de04e5718)
bfd/elf64-ppc.c