[PATCH] D24608: [COFF] Add support for IMAGE_REL_ARM_SECREL
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 27 12:36:10 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282531: [COFF] Add support for IMAGE_REL_ARM_SECREL (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D24608?vs=71501&id=72690#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24608
Files:
lld/trunk/COFF/Chunks.cpp
lld/trunk/test/COFF/reloc-arm.test
Index: lld/trunk/test/COFF/reloc-arm.test
===================================================================
--- lld/trunk/test/COFF/reloc-arm.test
+++ lld/trunk/test/COFF/reloc-arm.test
@@ -10,6 +10,7 @@
# CHECK: 402040 3e04de2f 00000000 00000000 00000000
# CHECK: 402050 fe07d62f 00000000 00000000 00000000
# CHECK: 402060 fef0cef7 00000000 00000000 00000000
+# CHECK: 402070 00005000 00000000 00000000 00000000
--- !COFF
header:
@@ -23,7 +24,7 @@
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4096
- SectionData: 00000000000000000000000000000000000000000000000000000000000000004ff6ff79cff6ff79000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f000f8000000000000000000000000
+ SectionData: 00000000000000000000000000000000000000000000000000000000000000004ff6ff79cff6ff79000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f000f800000000000000000000000000000000000000000000000000000000
Relocations:
- VirtualAddress: 0
SymbolName: foo
@@ -46,6 +47,9 @@
- VirtualAddress: 96
SymbolName: bar
Type: 20 # IMAGE_REL_ARM_BRANCH24T
+ - VirtualAddress: 112
+ SymbolName: bar
+ Type: 15 # IMAGE_REL_ARM_SECREL
symbols:
- Name: .aaa
Value: 0
Index: lld/trunk/COFF/Chunks.cpp
===================================================================
--- lld/trunk/COFF/Chunks.cpp
+++ lld/trunk/COFF/Chunks.cpp
@@ -134,6 +134,7 @@
case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break;
case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break;
case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break;
+ case IMAGE_REL_ARM_SECREL: add32(Off, Sym->getSecrel()); break;
default:
fatal("unsupported relocation type");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24608.72690.patch
Type: text/x-patch
Size: 2083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160927/7948669d/attachment.bin>
More information about the llvm-commits
mailing list