diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr23930.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930-32.t | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930-x32.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930.t | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930a.s | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr23930b.s | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 2 |
10 files changed, 90 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index e203edc..80fd06c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2018-12-01 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/23930 + * testsuite/ld-i386/i386.exp: Run pr23930. + * testsuite/ld-i386/pr23930.d: New file. + * testsuite/ld-x86-64/pr23930-32.t: Likewise. + * testsuite/ld-x86-64/pr23930-x32.d: Likewise. + * testsuite/ld-x86-64/pr23930.d: Likewise. + * testsuite/ld-x86-64/pr23930.t: Likewise. + * testsuite/ld-x86-64/pr23930a.s: Likewise. + * testsuite/ld-x86-64/pr23930b.s: Likewise. + * testsuite/ld-x86-64/x86-64.exp: Run pr23930 and pr23930-x32. +--- 2018-11-30 Alan Modra <amodra@gmail.com> * testsuite/ld-powerpc/pr23937.d, diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 76577c4..f86a54d 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -482,6 +482,7 @@ run_dump_test "pr23486b" run_dump_test "pr23486c" run_dump_test "pr23486d" run_dump_test "pr23854" +run_dump_test "pr23930" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-i386/pr23930.d b/ld/testsuite/ld-i386/pr23930.d new file mode 100644 index 0000000..e9da510 --- /dev/null +++ b/ld/testsuite/ld-i386/pr23930.d @@ -0,0 +1,11 @@ +#source: ../ld-x86-64/pr23930a.s +#source: ../ld-x86-64/pr23930b.s +#as: --32 +#ld: -m elf_i386 -z separate-code -z norelro -T ../ld-x86-64/pr23930-32.t +#objdump: --disassemble=main + +#... +[a-f0-9]+ <main>: +[a-f0-9]+: 31 c0 xor %eax,%eax +[a-f0-9]+: c3 ret +#pass diff --git a/ld/testsuite/ld-x86-64/pr23930-32.t b/ld/testsuite/ld-x86-64/pr23930-32.t new file mode 100644 index 0000000..29b5309 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930-32.t @@ -0,0 +1,10 @@ +PHDRS { + text PT_LOAD; +} + +SECTIONS +{ + . = (0x8000000f + ALIGN(0x1000000, 0x1000000)); + .text : AT(ADDR(.text) - 0x8000000f) { + } :text +} diff --git a/ld/testsuite/ld-x86-64/pr23930-x32.d b/ld/testsuite/ld-x86-64/pr23930-x32.d new file mode 100644 index 0000000..b01d2b9 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930-x32.d @@ -0,0 +1,11 @@ +#source: pr23930a.s +#source: pr23930b.s +#as: --x32 +#ld: -m elf32_x86_64 -z separate-code -z norelro -T pr23930-32.t +#objdump: --disassemble=main + +#... +[a-f0-9]+ <main>: +[a-f0-9]+: 31 c0 xor %eax,%eax +[a-f0-9]+: c3 retq +#pass diff --git a/ld/testsuite/ld-x86-64/pr23930.d b/ld/testsuite/ld-x86-64/pr23930.d new file mode 100644 index 0000000..c849b68 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930.d @@ -0,0 +1,11 @@ +#source: pr23930a.s +#source: pr23930b.s +#as: --64 +#ld: -m elf_x86_64 -z separate-code -z norelro -T pr23930.t +#objdump: --disassemble=main + +#... +[a-f0-9]+ <main>: +[a-f0-9]+: 31 c0 xor %eax,%eax +[a-f0-9]+: c3 retq +#pass diff --git a/ld/testsuite/ld-x86-64/pr23930.t b/ld/testsuite/ld-x86-64/pr23930.t new file mode 100644 index 0000000..2255ed3 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930.t @@ -0,0 +1,10 @@ +PHDRS { + text PT_LOAD; +} + +SECTIONS +{ + . = (0xffffffff8000000f + ALIGN(0x1000000, 0x1000000)); + .text : AT(ADDR(.text) - 0xffffffff8000000f) { + } :text +} diff --git a/ld/testsuite/ld-x86-64/pr23930a.s b/ld/testsuite/ld-x86-64/pr23930a.s new file mode 100644 index 0000000..e1679a9 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930a.s @@ -0,0 +1,7 @@ + .text + .globl other + .type other, @function +other: + xorl %eax, %eax + ret + .size other, .-other diff --git a/ld/testsuite/ld-x86-64/pr23930b.s b/ld/testsuite/ld-x86-64/pr23930b.s new file mode 100644 index 0000000..e4859c7 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr23930b.s @@ -0,0 +1,14 @@ + .text + .globl orig + .type orig, @function +orig: + xorl %eax, %eax + ret + .size orig, .-orig + .section .text.startup,"ax",@progbits + .globl main + .type main, @function +main: + xorl %eax, %eax + ret + .size main, .-main diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index 8e5348d..b51ad7c 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -422,6 +422,8 @@ run_dump_test "pr23486c-x32" run_dump_test "pr23486d" run_dump_test "pr23486d-x32" run_dump_test "pr23854" +run_dump_test "pr23930" +run_dump_test "pr23930-x32" if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { return |