From 484e90b45effc975cdc449411f401ee832e5f8a6 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Sat, 18 Jul 2009 19:30:09 +0000 Subject: Add support to properly reference private symbols on relocation entries. Use proper relocation type to build relocations for JumpTables (rodata sections). llvm-svn: 76326 --- llvm/lib/CodeGen/ELF.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/CodeGen/ELF.h') 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) {} -- cgit v1.2.3