old-cross-binutils/ld/testsuite/ld-i386
H.J. Lu ead3d5427a Properly check symbol defined by assignment in linker script
Symbol defined by a linker assignment may have type bfd_link_hash_new
or bfd_link_hash_undefined.  And h->def_regular is always set.
elf_i386_convert_load and elf_x86_64_convert_load should check
h->def_regular as well as bfd_link_hash_undefined and bfd_link_hash_new
to see if a symbol is defined by a linker script.

bfd/

	PR ld/19319
	* elf32-i386.c (elf_i386_convert_load): Check h->def_regular
	instead of bfd_link_hash_new.
	* elf64-x86-64.c (elf_x86_64_convert_load): Likewise.  Skip
	relocation overflow for bfd_link_hash_undefined and
	bfd_link_hash_new if h->def_regular is set.

ld/testsuite/

	PR ld/19319
	* ld-i386/i386.exp: Run pr19319 test.
	* ld-x86-64/x86-64.exp: Likewise.
	* ld-i386/pr19319.dd: New file.
	* ld-i386/pr19319a.S: Likewise.
	* ld-i386/pr19319b.S: Likewise.
	* ld-x86-64/pr19319.dd: Likewise.
	* ld-x86-64/pr19319a.S: Likewise.
	* ld-x86-64/pr19319b.S: Likewise.
2015-12-01 14:45:51 -08:00
..
abs-iamcu.d Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
abs.d
abs.s
alloc.d
alloc.s
alloc.t
branch1.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
branch1.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
call1.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
call1.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
call2.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
call2.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
call3.s Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3a.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3b.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3c.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3d.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3e.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3f.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3g.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call3h.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
combreloc.d
combreloc.s
compressed1.d Use nm/readelf with "failif" 2015-02-19 04:45:27 -08:00
compressed1.s
copyreloc-lib.c i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
copyreloc-main.out i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
copyreloc-main.S i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
copyreloc-main1.rd i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
copyreloc-main2.rd i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
discarded1.d
discarded1.s
discarded1.t
dummy.c i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
dummy.s Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
emit-relocs-nacl.rd
emit-relocs.rd
emit-relocs.s
export-class.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
foo.s Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
got1.dd Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
got1.out Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
got1a.S Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
got1b.c Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
got1c.c Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
got1d.S Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
hidden1.d
hidden1.s
hidden2.d
hidden2.s
hidden3.d
hidden3.s
i386-export-class.rd
i386-export-class.xd
i386.exp Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
iamcu-1.d Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
iamcu-2.d Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
iamcu-3.d Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
iamcu-4.d Default e_machine to EM_IAMCU for i?86-*-elfiamcu 2015-05-11 12:06:33 -07:00
jmp1.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
jmp1.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
jmp2.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
jmp2.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
lea1.s Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1a.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1b.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1c.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1d.d
lea1e.d
lea1f.d
load1-nacl.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load2.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load2.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load3.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load3.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load4.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load4a.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load4b.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load5.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load5a.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load5b.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load6.d Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
load6.s Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
mov1.s Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1a.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1b.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
nogot1.d
nogot1.s
nogot2.d
nogot2.s
pcrel8.d
pcrel8.s
pcrel16.d
pcrel16.s
pcrel16abs.d
pcrel16abs.s
plt-lib.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main.out Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main.rd Optimize out i386/x86-64 JUMP_SLOT relocation 2014-11-25 05:05:39 -08:00
plt-main1.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main1.rd Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
plt-main2.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main2.rd Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main3.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main3.rd Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
plt-main4.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-main4.rd Add R_386_GOT32X support to gas and ld 2015-10-22 04:47:07 -07:00
plt-main5.c Add function and function pointer tests for i386 2014-11-21 08:45:02 -08:00
plt-nacl.pd
plt-pic-nacl.pd
plt-pic.pd
plt-pic.s
plt.pd
plt.s
pltgot-1.d Keep .plt section and DT_PLTGOT for prelink 2015-06-24 13:47:37 -07:00
pltgot-1.s Allocate the first .plt entry space only if needed 2015-05-12 13:11:48 -07:00
pltgot-2.d Keep .plt section and DT_PLTGOT for prelink 2015-06-24 13:47:37 -07:00
pltlib.s
pr12570a.d
pr12570a.s
pr12570b.d
pr12570b.s
pr12627.d
pr12627.s
pr12627.t
pr12718.d Don't align text/data/bss sections for ELF 2013-05-31 17:27:28 +00:00
pr12718.s
pr12921.d
pr12921.s
pr13302.d
pr13302.s
pr14215.d
pr14215.s
pr17057.d Update elf_i386_compute_jump_table_size 2014-07-15 13:09:55 -07:00
pr17057.s Update elf_i386_compute_jump_table_size 2014-07-15 13:09:55 -07:00
pr17306a.s Use bfd_is_abs_section to check discarded input section 2014-08-27 07:59:48 -07:00
pr17306b.s Use bfd_is_abs_section to check discarded input section 2014-08-27 07:59:48 -07:00
pr17689.out i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17689.rd i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17689a.c i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17689a.t i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17689b.S i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17689now.rd Don't generate PLT relocations for now binding 2015-05-16 07:00:55 -07:00
pr17689ver.rd i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17709-nacl.rd Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
pr17709.rd Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
pr17709a.s Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
pr17709b.s Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
pr17827.rd i386: Allow copy relocs for building PIE 2015-04-22 05:30:01 -07:00
pr17935-1.d Issue relocation in RO section warning for -z text 2015-02-07 05:28:06 -08:00
pr17935-1.s Issue relocation in RO section warning for -z text 2015-02-07 05:28:06 -08:00
pr17935-2.d Issue relocation in RO section warning for -z text 2015-02-07 05:28:06 -08:00
pr17935-2.s Issue relocation in RO section warning for -z text 2015-02-07 05:28:06 -08:00
pr18801.d Issue an error for read-only segment with dynamic IFUNC relocations 2015-08-13 04:31:38 -07:00
pr18801.s Issue an error for read-only segment with dynamic IFUNC relocations 2015-08-13 04:31:38 -07:00
pr18815.d Set EI_OSABI to ELFOSABI_GNU for local IFUNC symbols 2015-08-12 13:47:41 -07:00
pr18815.s Set EI_OSABI to ELFOSABI_GNU for local IFUNC symbols 2015-08-12 13:47:41 -07:00
pr18900.out Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900a.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900a.rd Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900b.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900b.rd Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900c.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr19031.out Create a PLT entry for R_386_PC32 in non-code sections 2015-09-30 08:45:13 -07:00
pr19031a.c Create a PLT entry for R_386_PC32 in non-code sections 2015-09-30 08:45:13 -07:00
pr19031b.S Create a PLT entry for R_386_PC32 in non-code sections 2015-09-30 08:45:13 -07:00
pr19031c.c Create a PLT entry for R_386_PC32 in non-code sections 2015-09-30 08:45:13 -07:00
pr19175.d Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19175.s Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19175.t Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19319.dd Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
pr19319a.S Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
pr19319b.S Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
protected1.d
protected1.s
protected2.d
protected2.s
protected3.d Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
protected3.s Add extern_protected_data and set it for x86 2015-04-10 11:06:34 -07:00
protected4.d
protected4.s
protected5.d
protected5.s
protected6.s Check GOTOFF reloc against protected data on x86 2015-04-10 14:02:23 -07:00
protected6a.d Replace SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL 2015-04-11 07:56:48 -07:00
protected6b.d Add -z noextern-protected-data to ld for ELF/x86 2015-04-14 04:13:11 -07:00
reloc.d
reloc.s
start.s Add Intel MCU support to ld 2015-05-11 11:29:03 -07:00
tlsbin-nacl.rd Properly place the NULL STT_FILE symbol 2015-02-16 04:54:45 -08:00
tlsbin.dd
tlsbin.rd Properly place the NULL STT_FILE symbol 2015-02-16 04:54:45 -08:00
tlsbin.s
tlsbin.sd
tlsbin.td
tlsbindesc-nacl.rd Properly place the NULL STT_FILE symbol 2015-02-16 04:54:45 -08:00
tlsbindesc.dd Don't align text/data/bss sections for ELF 2013-05-31 17:27:28 +00:00
tlsbindesc.rd Properly place the NULL STT_FILE symbol 2015-02-16 04:54:45 -08:00
tlsbindesc.s
tlsbindesc.sd
tlsbindesc.td
tlsbinpic.s
tlsdesc-nacl.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlsdesc.dd
tlsdesc.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlsdesc.s
tlsdesc.sd
tlsdesc.td
tlsg.s
tlsg.sd
tlsgd1.dd
tlsgd1.s
tlsgd2.d
tlsgd2.s
tlsgdesc-nacl.rd
tlsgdesc.dd
tlsgdesc.rd
tlsgdesc.s
tlsie1.dd
tlsie1.s
tlsie2.d
tlsie2.s
tlsie3.d
tlsie3.s
tlsie4.d
tlsie4.s
tlsie5.d
tlsie5.s
tlsindntpoff.dd
tlsindntpoff.s
tlsld1.dd
tlsld1.s
tlslib.s
tlsnopic-nacl.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlsnopic.dd Don't align text/data/bss sections for ELF 2013-05-31 17:27:28 +00:00
tlsnopic.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlsnopic.sd
tlsnopic1.s
tlsnopic2.s
tlspic-nacl.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlspic.dd Don't align text/data/bss sections for ELF 2013-05-31 17:27:28 +00:00
tlspic.rd Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
tlspic.sd
tlspic.td
tlspic1.s
tlspic2.s
tlspie1.d
tlspie1.s
tlspie2.d
tlspie2.s
vxworks1-lib.dd
vxworks1-lib.nd
vxworks1-lib.rd
vxworks1-lib.s
vxworks1-lib.td
vxworks1-static.d
vxworks1.dd
vxworks1.ld
vxworks1.rd
vxworks1.s
vxworks2-static.sd
vxworks2.s
vxworks2.sd
warn1.d
warn1.s
zero.s