Add more methods to gather target specific elf stuff

Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes
2009-06-22 19:16:16 +00:00
parent 8dcbbdd00e
commit 0d3193ef3c
8 changed files with 427 additions and 164 deletions

View File

@@ -61,6 +61,11 @@ public:
return Relocations;
}
/// hasRelocations - Return true if 'Relocations' is not empty
bool hasRelocations() const {
return !Relocations.empty();
}
/// emitByte - This callback is invoked when a byte needs to be
/// written to the data stream.
inline void emitByte(uint8_t B) {
@@ -317,6 +322,7 @@ public:
void addRelocation(const MachineRelocation& relocation) {
Relocations.push_back(relocation);
}
};
} // end namespace llvm