diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-16 20:05:58 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-16 20:05:58 +0000 |
| commit | f931c179ca0df21fbd737befcd3427c488f1a8c5 (patch) | |
| tree | 6b051926f20e901549e2d4a4fb93f398a7779aa9 | |
| parent | 10ae20d80c9a6cf44c3ee7cc84bf51146293a977 (diff) | |
| download | bcm5719-llvm-f931c179ca0df21fbd737befcd3427c488f1a8c5.tar.gz bcm5719-llvm-f931c179ca0df21fbd737befcd3427c488f1a8c5.zip | |
Don't depend on "call foo" producing a X86_64_PC32.
Newer versions of the gnu assembler produce a X86_64_PLT32 for
calls. There is a change under review in llvm to do the same, so update
the tests to not depend on it.
We can still produce a R_X86_64_PC32 with ".long foo - .".
llvm-svn: 325379
| -rw-r--r-- | lld/test/ELF/copy-errors.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/copy-rel-corrupted.s | 2 | ||||
| -rw-r--r-- | lld/test/ELF/copy-rel-pie.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/gc-sections-shared.s | 8 | ||||
| -rw-r--r-- | lld/test/ELF/map-file.s | 9 | ||||
| -rw-r--r-- | lld/test/ELF/non-abs-reloc.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/relocatable-symbols.s | 36 | ||||
| -rw-r--r-- | lld/test/ELF/verdef-defaultver.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/writable-sec-plt-reloc.s | 2 | ||||
| -rw-r--r-- | lld/test/ELF/x86-64-reloc-pc32-fpic.s | 3 | ||||
| -rw-r--r-- | lld/test/ELF/znotext-plt-relocations-protected.s | 2 |
11 files changed, 54 insertions, 32 deletions
diff --git a/lld/test/ELF/copy-errors.s b/lld/test/ELF/copy-errors.s index 99e6fc09214..40f73178557 100644 --- a/lld/test/ELF/copy-errors.s +++ b/lld/test/ELF/copy-errors.s @@ -19,5 +19,7 @@ .global _start _start: -call bar -call zed +.byte 0xe8 +.long bar - . +.byte 0xe8 +.long zed - . diff --git a/lld/test/ELF/copy-rel-corrupted.s b/lld/test/ELF/copy-rel-corrupted.s index 3cdad7cf803..8df38cf56ff 100644 --- a/lld/test/ELF/copy-rel-corrupted.s +++ b/lld/test/ELF/copy-rel-corrupted.s @@ -7,4 +7,4 @@ .global _start _start: - call x + .long x - . diff --git a/lld/test/ELF/copy-rel-pie.s b/lld/test/ELF/copy-rel-pie.s index dcccf8e30b1..2a953e04276 100644 --- a/lld/test/ELF/copy-rel-pie.s +++ b/lld/test/ELF/copy-rel-pie.s @@ -7,8 +7,10 @@ .global _start _start: - call bar - call foo + .byte 0xe8 + .long bar - . -4 + .byte 0xe8 + .long foo - . -4 // CHECK: Name: .plt // CHECK-NEXT: Type: SHT_PROGBITS diff --git a/lld/test/ELF/gc-sections-shared.s b/lld/test/ELF/gc-sections-shared.s index 2976213e910..55b3ef556ce 100644 --- a/lld/test/ELF/gc-sections-shared.s +++ b/lld/test/ELF/gc-sections-shared.s @@ -125,7 +125,7 @@ .section .text.foo, "ax" .globl foo foo: -call bar +.long bar - . .section .text.bar, "ax" .globl bar @@ -136,9 +136,9 @@ ret .globl _start .weak qux _start: -call baz -call qux +.long baz - . +.long qux - . ret .section .text.unused, "ax" -call bar2 +.long bar2 - . diff --git a/lld/test/ELF/map-file.s b/lld/test/ELF/map-file.s index d1acabe2812..989ae7d66ef 100644 --- a/lld/test/ELF/map-file.s +++ b/lld/test/ELF/map-file.s @@ -17,9 +17,12 @@ _start: .quad sharedFoo .quad sharedBar - callq sharedFunc1 - callq sharedFunc2 - call baz + .byte 0xe8 + .long sharedFunc1 - . + .byte 0xe8 + .long sharedFunc2 - . + .byte 0xe8 + .long baz - . .global _Z1fi _Z1fi: .cfi_startproc diff --git a/lld/test/ELF/non-abs-reloc.s b/lld/test/ELF/non-abs-reloc.s index 875af47fe15..ac69915b1b5 100644 --- a/lld/test/ELF/non-abs-reloc.s +++ b/lld/test/ELF/non-abs-reloc.s @@ -15,5 +15,7 @@ _start: nop .section .nonalloc - call _start - call _start + .byte 0xe8 + .long _start - . - 4 + .byte 0xe8 + .long _start - . - 4 diff --git a/lld/test/ELF/relocatable-symbols.s b/lld/test/ELF/relocatable-symbols.s index 79608e7b74f..46d8ab7395f 100644 --- a/lld/test/ELF/relocatable-symbols.s +++ b/lld/test/ELF/relocatable-symbols.s @@ -174,21 +174,33 @@ .global _start .text _start: - call __start_foo - call __stop_foo + .byte 0xe8 + .long __start_foo - . -4 + .byte 0xe8 + .long __stop_foo - . -4 - call __start_bar - call __stop_bar + .byte 0xe8 + .long __start_bar - . -4 + .byte 0xe8 + .long __stop_bar - . -4 - call __start_doo - call __stop_doo + .byte 0xe8 + .long __start_doo - . -4 + .byte 0xe8 + .long __stop_doo - . -4 - call __preinit_array_start - call __preinit_array_end - call __init_array_start - call __init_array_end - call __fini_array_start - call __fini_array_end + .byte 0xe8 + .long __preinit_array_start - . -4 + .byte 0xe8 + .long __preinit_array_end - . -4 + .byte 0xe8 + .long __init_array_start - . -4 + .byte 0xe8 + .long __init_array_end - . -4 + .byte 0xe8 + .long __fini_array_start - . -4 + .byte 0xe8 + .long __fini_array_end - . -4 .section foo,"ax" nop diff --git a/lld/test/ELF/verdef-defaultver.s b/lld/test/ELF/verdef-defaultver.s index 496a29e3db5..c8444c4e066 100644 --- a/lld/test/ELF/verdef-defaultver.s +++ b/lld/test/ELF/verdef-defaultver.s @@ -196,6 +196,6 @@ .globl _start _start: - callq a - callq b - callq c + .long a - . + .long b - . + .long c - . diff --git a/lld/test/ELF/writable-sec-plt-reloc.s b/lld/test/ELF/writable-sec-plt-reloc.s index 97a21b5fac0..c44ca6a696c 100644 --- a/lld/test/ELF/writable-sec-plt-reloc.s +++ b/lld/test/ELF/writable-sec-plt-reloc.s @@ -11,4 +11,4 @@ .section .bar,"awx" .global _start _start: - call foo + .long foo - . diff --git a/lld/test/ELF/x86-64-reloc-pc32-fpic.s b/lld/test/ELF/x86-64-reloc-pc32-fpic.s index 034e6febaf4..0bf5e8f9091 100644 --- a/lld/test/ELF/x86-64-reloc-pc32-fpic.s +++ b/lld/test/ELF/x86-64-reloc-pc32-fpic.s @@ -7,4 +7,5 @@ # CHECK: >>> referenced by {{.*}}:(.data+0x1) .data -call _shared + .byte 0xe8 + .long _shared - . diff --git a/lld/test/ELF/znotext-plt-relocations-protected.s b/lld/test/ELF/znotext-plt-relocations-protected.s index 03d20b12e35..439d222ed23 100644 --- a/lld/test/ELF/znotext-plt-relocations-protected.s +++ b/lld/test/ELF/znotext-plt-relocations-protected.s @@ -8,4 +8,4 @@ .global _start _start: -callq foo + .long foo - . |

