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
This commit is contained in:
Bruno Cardoso Lopes
2009-07-18 19:30:09 +00:00
parent 76e7ba893f
commit 171375f73a
7 changed files with 103 additions and 18 deletions

View File

@@ -107,8 +107,8 @@ namespace llvm {
std::map<std::string, ELFSection*> SectionLookup;
/// GblSymLookup - This is a mapping from global value to a symbol index
/// in the symbol table. This is useful since relocations symbol references
/// must be quickly mapped to a symbol table index
/// in the symbol table or private symbols list. This is useful since reloc
/// symbol references must be quickly mapped to their indices on the lists
std::map<const GlobalValue*, uint32_t> GblSymLookup;
/// SymbolList - This is the list of symbols emitted to the symbol table.
@@ -116,6 +116,10 @@ namespace llvm {
/// the beginning while non-locals at the end.
std::vector<ELFSym*> SymbolList;
/// PrivateSyms - Record private symbols, every symbol here must never be
/// present in the SymbolList.
std::vector<ELFSym*> PrivateSyms;
/// PendingGlobals - List of externally defined symbols that we have been
/// asked to emit, but have not seen a reference to. When a reference
/// is seen, the symbol will move from this list to the SymbolList.