mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
e1c6cf618c
Function symbols of course don't normally want .dynbss copies but with some old versions of gcc they are needed to copy the function descriptor. This patch restricts the cases where they are useful to compilers using dot-symbols, and enables the warning regardless of whether a PLT entry is emitted in the executable. PLTs in shared libraries are affected by a .dynbss copy in the executable. bfd/ PR 25384 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies of function symbols unless dot symbols are present. Do warn whenever one is created, regardles of whether a PLT entry is also emitted for the function symbol. ld/ * testsuite/ld-powerpc/ambiguousv1b.d: Adjust expected output. * testsuite/ld-powerpc/funref.s: Align func_tab. * testsuite/ld-powerpc/funref2.s: Likewise. * testsuite/ld-powerpc/funv1.s: Add dot symbols.
13 lines
245 B
ArmAsm
13 lines
245 B
ArmAsm
# old style ELFv1, with dot-symbols
|
|
.globl my_func, .my_func
|
|
.type .my_func, @function
|
|
.section .opd, "aw", @progbits
|
|
my_func:
|
|
.quad .my_func, .TOC.@tocbase, 0
|
|
.size my_func, . - my_func
|
|
|
|
.text
|
|
.my_func:
|
|
blr
|
|
.size .my_func, . - .my_func
|