mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
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
This commit is contained in:
@@ -19,5 +19,7 @@
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
call bar
|
||||
call zed
|
||||
.byte 0xe8
|
||||
.long bar - .
|
||||
.byte 0xe8
|
||||
.long zed - .
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
call x
|
||||
.long x - .
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 - .
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,5 +15,7 @@ _start:
|
||||
nop
|
||||
|
||||
.section .nonalloc
|
||||
call _start
|
||||
call _start
|
||||
.byte 0xe8
|
||||
.long _start - . - 4
|
||||
.byte 0xe8
|
||||
.long _start - . - 4
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -196,6 +196,6 @@
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
callq a
|
||||
callq b
|
||||
callq c
|
||||
.long a - .
|
||||
.long b - .
|
||||
.long c - .
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
.section .bar,"awx"
|
||||
.global _start
|
||||
_start:
|
||||
call foo
|
||||
.long foo - .
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
# CHECK: >>> referenced by {{.*}}:(.data+0x1)
|
||||
|
||||
.data
|
||||
call _shared
|
||||
.byte 0xe8
|
||||
.long _shared - .
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
callq foo
|
||||
.long foo - .
|
||||
|
||||
Reference in New Issue
Block a user