diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-18 19:30:09 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-18 19:30:09 +0000 |
commit | 171375f73a733edcd7a5f839491cc8da4fdeddfe (patch) | |
tree | 4443b1ad020ebce746c558e8da7477ea90337b27 /lib/CodeGen/ELF.h | |
parent | 76e7ba893fecd35422719acad5ab19af09bf4139 (diff) |
Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata
sections).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELF.h')
-rw-r--r-- | lib/CodeGen/ELF.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/ELF.h b/lib/CodeGen/ELF.h index 8bbb29c7bc..d4dc151494 100644 --- a/lib/CodeGen/ELF.h +++ b/lib/CodeGen/ELF.h @@ -184,6 +184,13 @@ namespace llvm { /// Sym - The symbol to represent this section if it has one. ELFSym *Sym; + /// getSymIndex - Returns the symbol table index of the symbol + /// representing this section. + unsigned getSymbolTableIndex() const { + assert(Sym && "section not present in the symbol table"); + return Sym->SymTabIdx; + } + ELFSection(const std::string &name, bool isLittleEndian, bool is64Bit) : BinaryObject(name, isLittleEndian, is64Bit), Type(0), Flags(0), Addr(0), Offset(0), Size(0), Link(0), Info(0), Align(0), EntSize(0), Sym(0) {} |