[PATCH] [ELFYAML] Support arm32 R_ARM_V4BX relocation format
Adhemerval Zanella
adhemerval.zanella at linaro.org
Wed Apr 15 11:56:19 PDT 2015
Hi ruiu, shankar.easwaran,
ARM32 ELF R_ARM_V4BX relocation format is a special relocation type
that records the location of an ARMv4t BX instruction to enable a
static linker to generate ARMv4 compatible instructions. This
relocation does not contain a reference symbol.
This patch enabled its creation by removing the requeriment of a
relocation symbol target in ELFState<ELFT>::writeSectionContent.
http://reviews.llvm.org/D9034
Files:
tools/yaml2obj/yaml2elf.cpp
Index: tools/yaml2obj/yaml2elf.cpp
===================================================================
--- tools/yaml2obj/yaml2elf.cpp
+++ tools/yaml2obj/yaml2elf.cpp
@@ -358,11 +358,9 @@
for (const auto &Rel : Section.Relocations) {
unsigned SymIdx;
- if (SymN2I.lookup(Rel.Symbol, SymIdx)) {
- errs() << "error: Unknown symbol referenced: '" << Rel.Symbol
- << "' at YAML relocation.\n";
- return false;
- }
+ // Some special relocation, R_ARM_v4BX for instance, does not have
+ // an external reference.
+ SymN2I.lookup(Rel.Symbol, SymIdx);
if (IsRela) {
Elf_Rela REntry;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9034.23792.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150415/a954787a/attachment.bin>
More information about the llvm-commits
mailing list