Browse Source
bfd * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin symbols as potential function symbols. * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise. ld * testsuite/ld-elf/anno-sym.s: New test source file. * testsuite/ld-elf/anno-sym.d: New test driver. * testsuite/ld-elf/anno-sym.l: New test error output.binutils-2_37-branch
9 changed files with 105 additions and 30 deletions
@ -0,0 +1,5 @@ |
|||
# Check that linking anno-sym.o produces an undefined reference message referring to '_start' and not 'annobin_hello.c' |
|||
#ld: -e _start |
|||
#error_output: anno-sym.l |
|||
# The mips-irix6 target fails this test because it does not find any function symbols. Not sure why. |
|||
#skip: *-*-irix* |
|||
@ -0,0 +1,4 @@ |
|||
#... |
|||
.*: in function `(|_)start': |
|||
.*: undefined reference to `foo' |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
.text |
|||
|
|||
.hidden .annobin_hello.c |
|||
.type .annobin_hello.c, STT_NOTYPE |
|||
.equiv .annobin_hello.c, . |
|||
.size .annobin_hello.c, 0 |
|||
|
|||
.global _start |
|||
_start: |
|||
.nop |
|||
.align 4 |
|||
.dc.a foo |
|||
|
|||
Loading…
Reference in new issue