daa6760707
bfd/ * elf32-i386.c (elf_i386_convert_mov_to_lea): New. (elf_i386_size_dynamic_sections): Use it on input sections. (elf_i386_relocate_section): Don't convert "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg" for local symbols here. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New. (elf_x86_64_size_dynamic_sections): Use it on input sections. (elf_x86_64_relocate_section): Don't convert "mov foo@GOTPCREL(%rip), %reg" to "lea foo@GOTOFF(%reg), %reg" for local symbols. ld/testsuite/ * ld-i386/i386.exp: Run lea1d, lea1f, lea1f. * ld-x86-64/x86-64.exp: Run lea1g, lea1h, lea1i, lea1j, lea1k, lea1l. * ld-ifunc/ifunc-13-i386.d: Remove R_386_RELATIVE entry. * ld-i386/lea1d.d: New file. * ld-i386/lea1e.d: Likewise. * ld-i386/lea1f.d: Likewise. * ld-x86-64/lea1g.d: Likewise. * ld-x86-64/lea1h.d: Likewise. * ld-x86-64/lea1i.d: Likewise. * ld-x86-64/lea1j.d: Likewise. * ld-x86-64/lea1k.d: Likewise. * ld-x86-64/lea1l.d: Likewise.
14 lines
486 B
Makefile
14 lines
486 B
Makefile
#source: ifunc-13a-i386.s
|
|
#source: ifunc-13b-i386.s
|
|
#ld: -shared -m elf_i386 -z nocombreloc
|
|
#as: --32
|
|
#readelf: -r --wide
|
|
#target: x86_64-*-* i?86-*-*
|
|
|
|
Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entries:
|
|
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
|
|
[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_32[ ]+ifunc\(\)[ ]+ifunc
|
|
|
|
Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
|
|
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
|
|
[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc
|