mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
4a8f181d19
Not sure why there wasn't a NULL check in the ld/22269 patch (e01c16a8
) at the time, as there was one for the corresponding patch to elf32-m68k.c (5056ba1d
). Incidentally, I had missed that in 2017, as a prerequisite for the ld/22269 series, the check_relocs function finally were made "safe"! (I.e. the number of references and symbol types are final, garbage collection done, so port-specific accounting can be made sanely.) Committed. bfd: PR ld/26589 * elf32-cris.c (cris_elf_check_relocs): Add missing NULL check on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC. ld: PR ld/26589 * testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.
15 lines
388 B
ArmAsm
15 lines
388 B
ArmAsm
; Test-case primarily from PR26589, which could have been locref3.d.
|
|
; A local (like "static") function, with all ELF decorations.
|
|
.text
|
|
.type alocalfunc,@function
|
|
.p2align 1
|
|
alocalfunc:
|
|
nop
|
|
.Lfe1:
|
|
.size alocalfunc,.Lfe1-alocalfunc
|
|
|
|
; Random absolute reference to the address of alocalfunc, requiring a
|
|
; runtime relocation in code that needs to be PIC/PIE.
|
|
.data
|
|
.dword alocalfunc
|