[lld] r261749 - Create implicit plt entries for R_X86_64_32S.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 08:37:47 PST 2016
Author: rafael
Date: Wed Feb 24 10:37:47 2016
New Revision: 261749
URL: http://llvm.org/viewvc/llvm-project?rev=261749&view=rev
Log:
Create implicit plt entries for R_X86_64_32S.
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/test/ELF/Inputs/shared.s
lld/trunk/test/ELF/relocation.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=261749&r1=261748&r2=261749&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Feb 24 10:37:47 2016
@@ -718,6 +718,7 @@ TargetInfo::PltNeed X86_64TargetInfo::ne
default:
return Plt_No;
case R_X86_64_32:
+ case R_X86_64_32S:
case R_X86_64_64:
case R_X86_64_PC32:
// This relocation is defined to have a value of (S + A - P).
Modified: lld/trunk/test/ELF/Inputs/shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/shared.s?rev=261749&r1=261748&r2=261749&view=diff
==============================================================================
--- lld/trunk/test/ELF/Inputs/shared.s (original)
+++ lld/trunk/test/ELF/Inputs/shared.s Wed Feb 24 10:37:47 2016
@@ -2,5 +2,9 @@
.type bar, @function
bar:
+.global bar2
+.type bar2, @function
+bar2:
+
.global zed
zed:
Modified: lld/trunk/test/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation.s?rev=261749&r1=261748&r2=261749&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation.s (original)
+++ lld/trunk/test/ELF/relocation.s Wed Feb 24 10:37:47 2016
@@ -14,7 +14,7 @@
// SEC-NEXT: ]
// SEC-NEXT: Address: 0x11030
// SEC-NEXT: Offset: 0x1030
-// SEC-NEXT: Size: 32
+// SEC-NEXT: Size: 48
// SEC: Name: .got
// SEC-NEXT: Type: SHT_PROGBITS
@@ -39,7 +39,7 @@
// SEC-NEXT: ]
// SEC-NEXT: Address: 0x13000
// SEC-NEXT: Offset: 0x3000
-// SEC-NEXT: Size: 32
+// SEC-NEXT: Size: 40
// SEC-NEXT: Link: 0
// SEC-NEXT: Info: 0
// SEC-NEXT: AddressAlignment: 8
@@ -98,6 +98,15 @@ R_X86_64_PC32:
// CHECK-NEXT: 11017: {{.*}} callq 36
// CHECK-NEXT: 1101c: {{.*}} movl $69696, %eax
+.section .R_X86_64_32S_2,"ax", at progbits
+.global R_X86_64_32S_2
+R_X86_64_32S_2:
+ mov bar2, %eax
+// plt is at 0x11030. The second plt entry is at 0x11050 == 69712
+// CHECK: Disassembly of section .R_X86_64_32S_2:
+// CHECK-NEXT: R_X86_64_32S_2:
+// CHECK-NEXT: 11021: {{.*}} movl 69712, %eax
+
.section .R_X86_64_64,"a", at progbits
.global R_X86_64_64
R_X86_64_64:
More information about the llvm-commits
mailing list