diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-11 13:32:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-11 13:36:19 -0700 |
commit | 853ee16fcdf7e60f297b3456353b3a69f4822bec (patch) | |
tree | e70ed9c5e9c5455d1837c9891bdd8720db4cf386 /ld/testsuite/ld-i386 | |
parent | 4f9d99066edcefab0e5868d20cb9ddaa7b76da52 (diff) | |
download | gdb-853ee16fcdf7e60f297b3456353b3a69f4822bec.zip gdb-853ee16fcdf7e60f297b3456353b3a69f4822bec.tar.gz gdb-853ee16fcdf7e60f297b3456353b3a69f4822bec.tar.bz2 |
x86: Run PR ld/19636 tests with -z dynamic-undefined-weak
"-z dynamic-undefined-weak" makes undefined weak symbols dynamic, but
undefined weak symbols are still resolved to 0 at link-time if there
is no dynamic linker in executable.
* testsuite/ld-i386/i386.exp: Run pr19636-1j, pr19636-1k,
pr19636-1l, pr19636-3h and pr19636-3i.
* testsuite/ld-i386/pr19636-1j.d: New file.
* testsuite/ld-i386/pr19636-1k.d: Likewise.
* testsuite/ld-i386/pr19636-1l.d: Likewise.
* testsuite/ld-i386/pr19636-3h.d: Likewise.
* testsuite/ld-i386/pr19636-3i.d: Likewise.
* testsuite/ld-x86-64/pr19636-1h.d: Likewise.
* testsuite/ld-x86-64/pr19636-1i.d: Likewise.
* testsuite/ld-x86-64/pr19636-1j.d: Likewise.
* testsuite/ld-x86-64/pr19636-2j.d: Likewise.
* testsuite/ld-x86-64/pr19636-2k.d: Likewise.
* testsuite/ld-x86-64/pr19636-2l.d: Likewise.
* testsuite/ld-x86-64/pr19636-2m.d: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr19636-1h, pr19636-1i,
pr19636-1j, pr19636-2j, pr19636-2k, pr19636-2l and pr19636-2m.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr19636-1j.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr19636-1k.d | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr19636-1l.d | 26 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr19636-3h.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr19636-3i.d | 6 |
6 files changed, 74 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index d79c4583..0711015 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -367,6 +367,9 @@ run_dump_test "pr19636-1f" run_dump_test "pr19636-1g" run_dump_test "pr19636-1h" run_dump_test "pr19636-1i" +run_dump_test "pr19636-1j" +run_dump_test "pr19636-1k" +run_dump_test "pr19636-1l" run_dump_test "pr19636-2a" run_dump_test "pr19636-2b" run_dump_test "pr19636-2c" @@ -382,6 +385,8 @@ run_dump_test "pr19636-3d" run_dump_test "pr19636-3e" run_dump_test "pr19636-3f" run_dump_test "pr19636-3g" +run_dump_test "pr19636-3h" +run_dump_test "pr19636-3i" run_dump_test "pr19636-4a" run_dump_test "pr19636-4b" run_dump_test "pr19636-4c" diff --git a/ld/testsuite/ld-i386/pr19636-1j.d b/ld/testsuite/ld-i386/pr19636-1j.d new file mode 100644 index 0000000..0fb183d --- /dev/null +++ b/ld/testsuite/ld-i386/pr19636-1j.d @@ -0,0 +1,12 @@ +#source: pr19636-1.s +#as: --32 -mrelax-relocations=no +#ld: -pie -m elf_i386 --no-dynamic-linker -z dynamic-undefined-weak +#readelf : -r --wide -x .got -x .got.plt + +There are no relocations in this file. + +Hex dump of section '.got': + 0x[0-9a-f]+ [0 ]+\.+ + +Hex dump of section '.got.plt': + 0x[0-9a-f]+ +[0-9a-f]+ +[0 ]+ .\.+ diff --git a/ld/testsuite/ld-i386/pr19636-1k.d b/ld/testsuite/ld-i386/pr19636-1k.d new file mode 100644 index 0000000..9f42699 --- /dev/null +++ b/ld/testsuite/ld-i386/pr19636-1k.d @@ -0,0 +1,19 @@ +#source: pr19636-1.s +#as: --32 -mrelax-relocations=no +#ld: -pie -E -m elf_i386 --no-dynamic-linker -z dynamic-undefined-weak +#readelf : -r --wide -x .got -x .got.plt --dyn-syms + +There are no relocations in this file. + +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +_start +#... + +Hex dump of section '.got': + 0x[0-9a-f]+ [0 ]+\.+ + +Hex dump of section '.got.plt': + 0x[0-9a-f]+ +[0-9a-f]+ +[0 ]+ .\.+ diff --git a/ld/testsuite/ld-i386/pr19636-1l.d b/ld/testsuite/ld-i386/pr19636-1l.d new file mode 100644 index 0000000..c02908c --- /dev/null +++ b/ld/testsuite/ld-i386/pr19636-1l.d @@ -0,0 +1,26 @@ +#source: pr19636-1.s +#as: --32 -mrelax-relocations=no +#ld: -pie -m elf_i386 --no-dynamic-linker -z dynamic-undefined-weak +#objdump: -dw +#notarget: i?86-*-nacl* x86_64-*-nacl* + +.*: +file format .* + + +Disassembly of section .plt: + +.* <.plt>: +[ ]*[a-f0-9]+: ff b3 04 00 00 00 pushl 0x4\(%ebx\) +[ ]*[a-f0-9]+: ff a3 08 00 00 00 jmp \*0x8\(%ebx\) +[ ]*[a-f0-9]+: 00 00 add %al,\(%eax\) +[ ]*[a-f0-9]+: 00 00 add %al,\(%eax\) +[ ]*[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[ ]*[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[ ]*[a-f0-9]+: e9 00 00 00 00 jmp [a-f0-9]+ <.*> + +Disassembly of section .text: + +.* <_start>: +[ ]*[a-f0-9]+: 3b 80 f8 ff ff ff cmp -0x8\(%eax\),%eax +[ ]*[a-f0-9]+: ff a0 fc ff ff ff jmp \*-0x4\(%eax\) +[ ]*[a-f0-9]+: e8 df ff ff ff call .* <\.plt\+0x10> diff --git a/ld/testsuite/ld-i386/pr19636-3h.d b/ld/testsuite/ld-i386/pr19636-3h.d new file mode 100644 index 0000000..c8c6ba4 --- /dev/null +++ b/ld/testsuite/ld-i386/pr19636-3h.d @@ -0,0 +1,6 @@ +#source: pr19636-3.s +#as: --32 +#ld: -pie -m elf_i386 -z dynamic-undefined-weak +#readelf: -r --wide + +There are no relocations in this file. diff --git a/ld/testsuite/ld-i386/pr19636-3i.d b/ld/testsuite/ld-i386/pr19636-3i.d new file mode 100644 index 0000000..8169a59 --- /dev/null +++ b/ld/testsuite/ld-i386/pr19636-3i.d @@ -0,0 +1,6 @@ +#source: pr19636-3.s +#as: --32 +#ld: -pie -E -m elf_i386 -z dynamic-undefined-weak +#readelf : -r --wide + +There are no relocations in this file. |