mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
x86: Also check x86 linker_def for non-shared definition
Since elf_x86_linker_defined sets linker_def in elf_x86_link_hash_entry for linker defined symbols, SYMBOL_DEFINED_NON_SHARED_P should also check linker_def in elf_x86_link_hash_entry. bfd/ PR ld/24458 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86 linker_def. ld/ PR ld/24458 * testsuite/ld-x86-64/x86-64.exp: Run PR ld/24458 tests. * testsuite/ld-x86-64/pr24458.s: New file. * testsuite/ld-x86-64/pr24458a-x32.d: Likewise. * testsuite/ld-x86-64/pr24458a.d: Likewise. * testsuite/ld-x86-64/pr24458b-x32.d: Likewise. * testsuite/ld-x86-64/pr24458b.d: Likewise. * testsuite/ld-x86-64/pr24458c-x32.d: Likewise. * testsuite/ld-x86-64/pr24458c.d: Likewise.
This commit is contained in:
parent
e25de718de
commit
4e84a8f8bb
@ -1,3 +1,9 @@
|
||||
2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/24458
|
||||
* elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
|
||||
linker_def.
|
||||
|
||||
2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
* reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
|
||||
|
@ -167,6 +167,7 @@
|
||||
((H)->def_regular \
|
||||
|| (H)->root.linker_def \
|
||||
|| (H)->root.ldscript_def \
|
||||
|| ((struct elf_x86_link_hash_entry *) (H))->linker_def \
|
||||
|| ELF_COMMON_DEF_P (H))
|
||||
|
||||
/* TRUE if relative relocation should be generated. GOT reference to
|
||||
|
12
ld/ChangeLog
12
ld/ChangeLog
@ -1,3 +1,15 @@
|
||||
2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/24458
|
||||
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/24458 tests.
|
||||
* testsuite/ld-x86-64/pr24458.s: New file.
|
||||
* testsuite/ld-x86-64/pr24458a-x32.d: Likewise.
|
||||
* testsuite/ld-x86-64/pr24458a.d: Likewise.
|
||||
* testsuite/ld-x86-64/pr24458b-x32.d: Likewise.
|
||||
* testsuite/ld-x86-64/pr24458b.d: Likewise.
|
||||
* testsuite/ld-x86-64/pr24458c-x32.d: Likewise.
|
||||
* testsuite/ld-x86-64/pr24458c.d: Likewise.
|
||||
|
||||
2019-04-17 Jozef Lawrynowicz <jozef.l@mittosystems.com>
|
||||
|
||||
* config/tc-msp430.c (msp430_make_init_symbols): Define __crt0_init_bss
|
||||
|
5
ld/testsuite/ld-x86-64/pr24458.s
Normal file
5
ld/testsuite/ld-x86-64/pr24458.s
Normal file
@ -0,0 +1,5 @@
|
||||
.text
|
||||
.globl _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
movq __ehdr_start(%rip), %rax
|
10
ld/testsuite/ld-x86-64/pr24458a-x32.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458a-x32.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --x32 -mx86-used-note=yes
|
||||
#ld: -m elf32_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
10
ld/testsuite/ld-x86-64/pr24458a.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458a.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --64 -mx86-used-note=yes
|
||||
#ld: -m elf_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
10
ld/testsuite/ld-x86-64/pr24458b-x32.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458b-x32.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --x32 -mx86-used-note=yes
|
||||
#ld: -pie -m elf32_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
10
ld/testsuite/ld-x86-64/pr24458b.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458b.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --64 -mx86-used-note=yes
|
||||
#ld: -pie -m elf_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
10
ld/testsuite/ld-x86-64/pr24458c-x32.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458c-x32.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --x32 -mx86-used-note=yes
|
||||
#ld: -shared -m elf32_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
10
ld/testsuite/ld-x86-64/pr24458c.d
Normal file
10
ld/testsuite/ld-x86-64/pr24458c.d
Normal file
@ -0,0 +1,10 @@
|
||||
#source: pr24458.s
|
||||
#as: --64 -mx86-used-note=yes
|
||||
#ld: -shared -m elf_x86_64
|
||||
#readelf: -n
|
||||
|
||||
Displaying notes found in: .note.gnu.property
|
||||
Owner Data size Description
|
||||
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
|
||||
Properties: x86 ISA used: <None>
|
||||
x86 feature used: x86
|
@ -450,6 +450,12 @@ run_dump_test "pr24322a"
|
||||
run_dump_test "pr24322a-x32"
|
||||
run_dump_test "pr24322b"
|
||||
run_dump_test "pr24322b-x32"
|
||||
run_dump_test "pr24458a"
|
||||
run_dump_test "pr24458a-x32"
|
||||
run_dump_test "pr24458b"
|
||||
run_dump_test "pr24458b-x32"
|
||||
run_dump_test "pr24458c"
|
||||
run_dump_test "pr24458c-x32"
|
||||
|
||||
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user