diff options
author | Han Shen <shenhan@google.com> | 2015-11-17 16:29:47 -0800 |
---|---|---|
committer | Han Shen <shenhan@google.com> | 2015-11-19 17:29:00 -0800 |
commit | 8bfb6b2bf11cfbc445239158ec28d0988f8fa947 (patch) | |
tree | 64baf9be2b2d76eb0d3d83ec6acf3d5ddd452b64 /binutils-2.25/ld/testsuite/ld-x86-64 | |
parent | 932d71b859239e834651fdee549dc661cda82fe8 (diff) | |
download | toolchain_binutils-8bfb6b2bf11cfbc445239158ec28d0988f8fa947.tar.gz toolchain_binutils-8bfb6b2bf11cfbc445239158ec28d0988f8fa947.tar.bz2 toolchain_binutils-8bfb6b2bf11cfbc445239158ec28d0988f8fa947.zip |
Create an unified binutils source tree for both Android and ChromiumOS.
About source code - The base version of this binutils is newer than that
of aosp/binutils-2.25, it is based on the binutils that is used to build
google products and ChromiumOS. And it contains *all* local Android
patches as well as all patches that are cherry-picked from upstream for
aosp/binutils-2.25 tree (up to Nov. 5 - 932d71b85). You may find the
detailed development history for this binutils tree here -
https://chromium.googlesource.com/chromiumos/third_party/binutils/+log/unification
(This CL is a combination of all the CLs in it. After this CL is
submitted the tree will be identical to
https://chromium.googlesource.com/chromiumos/third_party/binutils/+log/unification
at 2865a3615d80bd5f82d14d7e0484e84dc052596a)
About testing - We tested this binutils for both ChromiumOS and
Android. For android, we tested building N4, N5X, N6, N7, N9 using new
binutils, we also did a full-build of toolchain (by build.py) and built
a N5X image; for ChromiumOS - it passed ChromiumOS toolchain release
tests on all 4 platforms (x86, x86_64, arm32 and arm64).
Change-Id: I2bb2cf579f9458d0a8bc9612331dc7d5043e3d82
Diffstat (limited to 'binutils-2.25/ld/testsuite/ld-x86-64')
18 files changed, 27 insertions, 127 deletions
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d index 11313ab1..cdcb4f69 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d +++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d @@ -1,5 +1,5 @@ #as: --64 -madd-bnd-prefix -#ld: -shared -melf_x86_64 -z bndplt +#ld: -shared -melf_x86_64 #objdump: -dw #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d index 6be82902..43e33565 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d +++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d @@ -1,5 +1,5 @@ #as: --64 -madd-bnd-prefix -#ld: -shared -melf_x86_64 -z bndplt +#ld: -shared -melf_x86_64 #objdump: -dw #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d index d76a7a7d..3cfe9e6b 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d +++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d @@ -1,6 +1,6 @@ #source: bnd-branch-1.s #as: --64 -#ld: -shared -melf_x86_64 -z bndplt +#ld: -shared -melf_x86_64 #objdump: -dw .*: +file format .* @@ -13,8 +13,8 @@ Disassembly of section .plt: [ ]*[a-f0-9]+: f2 ff 25 83 01 20 00 bnd jmpq \*0x200183\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x10> [ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) [ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 -[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: e9 e6 ff ff ff jmpq 2b0 <foo2@plt-0x50> +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1 [ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50> [ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) @@ -22,14 +22,14 @@ Disassembly of section .plt: [ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50> [ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3 -[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: e9 b6 ff ff ff jmpq 2b0 <foo2@plt-0x50> +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .plt.bnd: 0+300 <foo2@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18> -[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18> +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax 0+308 <foo3@plt>: [ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x20> @@ -40,8 +40,8 @@ Disassembly of section .plt.bnd: [ ]*[a-f0-9]+: 90 nop 0+318 <foo4@plt>: -[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30> -[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30> +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax Disassembly of section .text: diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d new file mode 100644 index 00000000..f2ee2457 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d @@ -0,0 +1,6 @@ +#as: --64 +#ld: -shared -melf_x86_64 +#readelf: -r --wide + +#... +[0-9a-f]+ +[0-9a-f]+ +R_X86_64_GLOB_DAT +[0-9a-f]+ +foo \+ 0 diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s new file mode 100644 index 00000000..06758434 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s @@ -0,0 +1,5 @@ + .globl _start + .type _start, @function +_start: + movabsq $foo@GOTPLT, %rax + .size _start, .-_start diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp b/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp index bdf95935..f2a50d46 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp +++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp @@ -74,21 +74,6 @@ set run_tests { {dummy.s} "mpx2static" "mpx2.out"} } -run_ld_link_tests { - {"Build libcall.so" - "-m elf_x86_64 -shared -z bndplt" "" "--64" - {mpx3b.s} {} "libcall.so"} - {"Build mpx3" - "-m elf_x86_64 -z bndplt tmpdir/libcall.so" "" "--64" - {mpx3a.s} {{objdump -dw mpx3.dd}} "mpx3"} - {"Build libcall1.so" - "-m elf_x86_64 -shared -z bndplt" "" "--64" - {mpx4b.s} {} "libcall1.so"} - {"Build mpx4" - "-m elf_x86_64 -z bndplt tmpdir/libcall1.so" "" "--64" - {mpx4a.s} {{objdump -dw mpx4.dd}} "mpx4"} -} - run_ld_link_exec_tests [] $run_tests run_dump_test "bnd-branch-1" diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd index d66524c8..9bebc829 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd +++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd @@ -1,3 +1,3 @@ #... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* +[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.* #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd index d3b292cb..2b050bd8 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd +++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd @@ -1,3 +1,3 @@ #... -[0-9a-f ]+R_X86_64_PC32 +0+ +.* +[0-9a-f ]+R_X86_64_PC32_BND +0+ +.* #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd index d66524c8..9bebc829 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd +++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd @@ -1,3 +1,3 @@ #... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* +[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.* #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd index d66524c8..9bebc829 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd +++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd @@ -1,3 +1,3 @@ #... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* +[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.* #... diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd deleted file mode 100644 index 2a8356d9..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd +++ /dev/null @@ -1,35 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+400290 <.plt>: -[ ]*[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 600400 <_GLOBAL_OFFSET_TABLE_\+0x8> -[ ]*[a-f0-9]+: f2 ff 25 6b 01 20 00 bnd jmpq \*0x20016b\(%rip\) # 600408 <_GLOBAL_OFFSET_TABLE_\+0x10> -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 -[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400290 <call1@plt-0x30> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1 -[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 400290 <call1@plt-0x30> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.bnd: - -0+4002c0 <call1@plt>: -[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600410 <_GLOBAL_OFFSET_TABLE_\+0x18> -[ ]*[a-f0-9]+: 90 nop - -0+4002c8 <call2@plt>: -[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600418 <_GLOBAL_OFFSET_TABLE_\+0x20> -[ ]*[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+4002d0 <_start>: -[ ]*[a-f0-9]+: bf c0 02 40 00 mov \$0x4002c0,%edi -[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi -[ ]*[a-f0-9]+: 48 8b 3d 41 01 20 00 mov 0x200141\(%rip\),%rdi # 600420 <func> -[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi -[ ]*[a-f0-9]+: c3 retq -#pass diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s deleted file mode 100644 index 28cb580b..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s +++ /dev/null @@ -1,16 +0,0 @@ - .text - .globl _start - .type _start, @function -_start: - movl $call1, %edi - bnd call *%rdi - movq func(%rip), %rdi - bnd call *%rdi - ret - .size _start, .-_start - .globl func - .data - .type func, @object - .size func, 8 -func: - .quad call2 diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s deleted file mode 100644 index 1ee2557a..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s +++ /dev/null @@ -1,11 +0,0 @@ - .text - .globl call1 - .type call1, @function -call1: - ret - .size call1, .-call1 - .globl call2 - .type call2, @function -call2: - ret - .size call2, .-call2 diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd deleted file mode 100644 index 0cf0f758..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd +++ /dev/null @@ -1,24 +0,0 @@ -.*: +file format .* - - -Disassembly of section .plt: - -0+400260 <.plt>: -[ ]*[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 6003a8 <_GLOBAL_OFFSET_TABLE_\+0x8> -[ ]*[a-f0-9]+: f2 ff 25 43 01 20 00 bnd jmpq \*0x200143\(%rip\) # 6003b0 <_GLOBAL_OFFSET_TABLE_\+0x10> -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 -[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400260 <call1@plt-0x20> -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -Disassembly of section .plt.bnd: - -0+400280 <call1@plt>: -[ ]*[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmpq \*0x200131\(%rip\) # 6003b8 <_GLOBAL_OFFSET_TABLE_\+0x18> -[ ]*[a-f0-9]+: 90 nop - -Disassembly of section .text: - -0+400288 <_start>: -[ ]*[a-f0-9]+: bf 80 02 40 00 mov \$0x400280,%edi -[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s deleted file mode 100644 index 0ee2723b..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s +++ /dev/null @@ -1,6 +0,0 @@ -.text - .globl _start - .type _start, @function -_start: - movl $call1, %edi - bnd call *%rdi diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s deleted file mode 100644 index 0e9ac14e..00000000 --- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s +++ /dev/null @@ -1,5 +0,0 @@ -.text - .globl call1 - .type call1, @function -call1: - ret diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/start.o b/binutils-2.25/ld/testsuite/ld-x86-64/start.o Binary files differnew file mode 100644 index 00000000..e015e739 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-x86-64/start.o diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp b/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp index 54786a78..a9b68ff2 100644 --- a/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp +++ b/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp @@ -227,6 +227,7 @@ run_dump_test "pr12570a" run_dump_test "pr12570b" run_dump_test "pr14215" run_dump_test "pr14207" +run_dump_test "gotplt1" if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { return |