mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
b4d7f82f75
For instructions like call foo and jmp foo patch changes relocation produced from R_X86_64_PC32 to R_X86_64_PLT32. Relocation can be used as a marker for 32-bit PC-relative branches. Linker will reduce PLT32 relocation to PC32 if function is defined locally. Differential revision: https://reviews.llvm.org/D43383 llvm-svn: 325569
15 lines
373 B
ArmAsm
15 lines
373 B
ArmAsm
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
|
|
|
|
// Test that weak symbols always produce relocations
|
|
|
|
.weak foo
|
|
foo:
|
|
bar:
|
|
call foo
|
|
|
|
// CHECK: Relocations [
|
|
// CHECK-NEXT: Section ({{[0-9]+}}) .rela.text {
|
|
// CHECK-NEXT: 0x1 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|