mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-15 22:25:31 +00:00
[Object][ELF] Add support for dumping dynamic relocations when sections are stripped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::object;
|
||||
|
||||
@@ -91,6 +90,10 @@ namespace opts {
|
||||
cl::desc("Alias for --relocations"),
|
||||
cl::aliasopt(Relocations));
|
||||
|
||||
// -dyn-relocations
|
||||
cl::opt<bool> DynRelocs("dyn-relocations",
|
||||
cl::desc("Display the dynamic relocation entries in the file"));
|
||||
|
||||
// -symbols, -t
|
||||
cl::opt<bool> Symbols("symbols",
|
||||
cl::desc("Display the symbol table"));
|
||||
@@ -280,6 +283,8 @@ static void dumpObject(const ObjectFile *Obj) {
|
||||
Dumper->printSections();
|
||||
if (opts::Relocations)
|
||||
Dumper->printRelocations();
|
||||
if (opts::DynRelocs)
|
||||
Dumper->printDynamicRelocations();
|
||||
if (opts::Symbols)
|
||||
Dumper->printSymbols();
|
||||
if (opts::DynamicSymbols)
|
||||
@@ -313,7 +318,6 @@ static void dumpObject(const ObjectFile *Obj) {
|
||||
Dumper->printCOFFBaseReloc();
|
||||
}
|
||||
|
||||
|
||||
/// @brief Dumps each object file in \a Arc;
|
||||
static void dumpArchive(const Archive *Arc) {
|
||||
for (Archive::child_iterator ArcI = Arc->child_begin(),
|
||||
@@ -374,7 +378,6 @@ static void dumpInput(StringRef File) {
|
||||
reportError(File, readobj_error::unrecognized_file_format);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
sys::PrintStackTraceOnErrorSignal();
|
||||
PrettyStackTraceProgram X(argc, argv);
|
||||
|
Reference in New Issue
Block a user