diff options
author | Jedidiah Thompson <wej22007@outlook.com> | 2022-10-19 10:57:12 +0200 |
---|---|---|
committer | Zac Walker <zac.walker@linaro.org> | 2022-10-19 10:57:12 +0200 |
commit | c60b3806799abf1d7f6cf5108a1b0e733a950b13 (patch) | |
tree | a203af8ed31ff48618e57a76a668faea3673fb0e /ld/testsuite | |
parent | 740a19d914a83423122fe81eec9508fa1dbb0559 (diff) | |
download | binutils-c60b3806799abf1d7f6cf5108a1b0e733a950b13.zip binutils-c60b3806799abf1d7f6cf5108a1b0e733a950b13.tar.gz binutils-c60b3806799abf1d7f6cf5108a1b0e733a950b13.tar.bz2 |
aarch64-pe support for LD, GAS and BFD
Allows aarch64-pe to be targeted natively, not having to use objcopy to convert it from ELF to PE.
Based on initial work by Jedidiah Thompson
Co-authored-by: Jedidiah Thompson <wej22007@outlook.com>
Co-authored-by: Zac Walker <zac.walker@linaro.org>
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-pe/pe-aarch64.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/pe-aarch64.s | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/pe.exp | 5 |
3 files changed, 32 insertions, 0 deletions
diff --git a/ld/testsuite/ld-pe/pe-aarch64.d b/ld/testsuite/ld-pe/pe-aarch64.d new file mode 100644 index 0000000..fac02b5 --- /dev/null +++ b/ld/testsuite/ld-pe/pe-aarch64.d @@ -0,0 +1,16 @@ +#ld: +#objdump: -d + +.*: file format pei-aarch64-little + + +Disassembly of section .text: + +0000000140001000 <__rt_psrelocs_end>: + 140001000: d2800281 mov x1, #0x14 // #20 + 140001004: 14000001 b 140001008 <foo> + +0000000140001008 <foo>: + 140001008: d65f03c0 ret + 14000100c: 00000000 udf #0 +#... diff --git a/ld/testsuite/ld-pe/pe-aarch64.s b/ld/testsuite/ld-pe/pe-aarch64.s new file mode 100644 index 0000000..5d49350 --- /dev/null +++ b/ld/testsuite/ld-pe/pe-aarch64.s @@ -0,0 +1,11 @@ +# A little test to ensure pe-aarch64 is working in LD. +# Currently, the poor pe-aarch64 implementation in binutils +# couldn't do anything useful, hence, this test is rather short + +.section .text + +_start: + mov x1, 20 + b foo +foo: + ret diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp index 22819e0..d8595ee 100644 --- a/ld/testsuite/ld-pe/pe.exp +++ b/ld/testsuite/ld-pe/pe.exp @@ -78,6 +78,11 @@ if {[istarget i*86-*-cygwin*] run_ld_link_tests $pe_tests } +if {[istarget "aarch64-*-pe*"]} { + run_dump_test "pe-aarch64" +} + + run_dump_test "image_size" run_dump_test "export_dynamic_warning" |