[llvm-commits] ELFReader.cpp update - Add support for References.
Sid Manning
sidneym at codeaurora.org
Fri Aug 31 12:40:19 PDT 2012
This patch adds support for collection of References in object files.
The ELFReference class is a derived class of Reference and adds
a new member, TargetNameOffset. TargetNameOffset is used to
reference the index ELF_R_SYM would point to. These offsets are
recorded in a vector SymbolNames", added to the ELFFile class.
A findAtom(StringRef) method was added to the ELFFile class that uses
the above to locate matching atoms to fill in the Reference's target Atom.
The ELFDefinedAtom class has been extended to take a ReferenceStartIndex
and a ReferenceEndIndex. Each Atom that contains references outside
its own scope will have a, "Reference" stored in the Reference class.
The FileELF method now records the contains of the .rela/rel sections
and stores those into a map, (sectionName, reloclist[])
std::map<llvm::StringRef, std::vector<Elf_Rel *>> RelocationReferences;
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReaderELF.cpp-Add-References.diff
Type: text/x-patch
Size: 15265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120831/92574acf/attachment.bin>
More information about the llvm-commits
mailing list