summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELF.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-18 19:30:09 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-18 19:30:09 +0000
commit484e90b45effc975cdc449411f401ee832e5f8a6 (patch)
treefa911dd398b7c83ebb7042b3ed593fda883b3cbc /llvm/lib/CodeGen/ELF.h
parenteb6bcf34624fef9fe340fb91454e54bc1e8400bd (diff)
downloadbcm5719-llvm-484e90b45effc975cdc449411f401ee832e5f8a6.tar.gz
bcm5719-llvm-484e90b45effc975cdc449411f401ee832e5f8a6.zip
Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata sections). llvm-svn: 76326
Diffstat (limited to 'llvm/lib/CodeGen/ELF.h')
-rw-r--r--llvm/lib/CodeGen/ELF.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ELF.h b/llvm/lib/CodeGen/ELF.h
index 8bbb29c7bc1..d4dc151494c 100644
--- a/llvm/lib/CodeGen/ELF.h
+++ b/llvm/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) {}
OpenPOWER on IntegriCloud