x86: Adjust linker tests for --disable-separate-code

Adjust linker tests for linker configured with --disable-separate-code:

1. Update expected outputs.
2. Pass -z max-page-size=0x1000 -z separate-code" to linker.

	* testsuite/ld-i386/report-reloc-1.l: Updated.
	* testsuite/ld-x86-64/report-reloc-1.l: Likewise.
	* testsuite/ld-x86-64/pe-x86-64.exp: Pass
	"-z max-page-size=0x1000 -z separate-code" to linker.
	* testsuite/ld-x86-64/pr19609-4e.d: Likewise.
	* testsuite/ld-x86-64/pr19609-6a.d: Likewise.
	* testsuite/ld-x86-64/pr19609-6b.d: Likewise.
	* testsuite/ld-x86-64/pr19609-7b.d: Likewise.
	* testsuite/ld-x86-64/pr19609-7d.d: Likewise.
This commit is contained in:
H.J. Lu
2021-12-13 12:09:39 -08:00
parent 408db576c9
commit 14aa4ee440
8 changed files with 15 additions and 15 deletions

View File

@ -1,2 +1,2 @@
tmpdir/dump: R_386_IRELATIVE \(offset: 0x0+2000, info: 0x0+2a\) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_386_RELATIVE \(offset: 0x0+2004, info: 0x0+8\) against '_start' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_386_IRELATIVE \(offset: 0x[0-9a-f]+, info: 0x0+2a\) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_386_RELATIVE \(offset: 0x[0-9a-f]+, info: 0x0+8\) against '_start' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o

View File

@ -27,7 +27,7 @@ if {![istarget "x86_64-*-linux*"] } {
run_ld_link_tests [list \
[list \
"Build pe-x86-64-1" \
"-m elf_x86_64 --entry=begin" \
"-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-1a.obj.bz2 pe-x86-64-1b.obj.bz2 pe-x86-64-1c.obj.bz2} \
@ -36,7 +36,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-2" \
"-m elf_x86_64 --entry=begin" \
"-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-2a.obj.bz2 pe-x86-64-2b.obj.bz2 pe-x86-64-2c.obj.bz2} \
@ -45,7 +45,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-3" \
"-m elf_x86_64 --entry=begin" \
"-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-3a.obj.bz2 pe-x86-64-3b.obj.bz2 pe-x86-64-3c.obj.bz2 \
@ -55,7 +55,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-4" \
"-m elf_x86_64 --entry=begin" \
"-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-4a.obj.bz2 pe-x86-64-4b.obj.bz2 pe-x86-64-4c.obj.bz2 \
@ -65,7 +65,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-5" \
"-m elf_x86_64 --entry=begin" \
"-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-5.obj.bz2 } \
@ -75,7 +75,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-6" \
"-m elf_x86_64 --entry=main" \
"-m elf_x86_64 --entry=main -z max-page-size=0x1000 -z separate-code" \
"" \
"" \
{pe-x86-64-6.obj.bz2 } \

View File

@ -1,6 +1,6 @@
#source: pr19609-4.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax
#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax -z max-page-size=0x1000 -z separate-code
#objdump: -dw
.*: +file format .*

View File

@ -1,6 +1,6 @@
#source: pr19609-6.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 --defsym foobar=0x80000000
#ld: -melf_x86_64 --defsym foobar=0x80000000 -z max-page-size=0x1000 -z separate-code
#objdump: -dw
.*: +file format .*

View File

@ -1,6 +1,6 @@
#source: pr19609-6.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax
#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code
#objdump: -dw
.*: +file format .*

View File

@ -1,6 +1,6 @@
#source: pr19609-7.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax
#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code
#objdump: -dw
.*: +file format .*

View File

@ -1,6 +1,6 @@
#source: pr19609-7.s
#as: --x32 -mrelax-relocations=yes
#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax
#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code
#objdump: -dw
.*: +file format .*

View File

@ -1,2 +1,2 @@
tmpdir/dump: R_X86_64_IRELATIVE \(offset: 0x0+2000, info: 0x0+25, addend: 0x0+1007\) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_X86_64_RELATIVE \(offset: 0x0+2008, info: 0x0+8, addend: 0x0+1000\) against '_start' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_X86_64_IRELATIVE \(offset: 0x[0-9a-f]+, info: 0x0+25, addend: 0x[0-9a-f]+\) against 'ifunc' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o
tmpdir/dump: R_X86_64_RELATIVE \(offset: 0x[0-9a-f]+, info: 0x0+8, addend: 0x[0-9a-f]+\) against '_start' for section '.data.rel.ro.local' in tmpdir/report-reloc-1.o