mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +00:00
llvm-readobj: add support to dump (COFF) directives
PE/COFF has a special section (.drectve) which can be used to pass options to the linker (similar to LC_LINKER_OPTION). Add support to llvm-readobj to print the contents of the section for tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -145,6 +145,11 @@ namespace opts {
|
||||
// -coff-imports
|
||||
cl::opt<bool>
|
||||
COFFImports("coff-imports", cl::desc("Display the PE/COFF import table"));
|
||||
|
||||
// -coff-directives
|
||||
cl::opt<bool>
|
||||
COFFDirectives("coff-directives",
|
||||
cl::desc("Display the contents PE/COFF .drectve section"));
|
||||
} // namespace opts
|
||||
|
||||
static int ReturnValue = EXIT_SUCCESS;
|
||||
@@ -272,6 +277,8 @@ static void dumpObject(const ObjectFile *Obj) {
|
||||
Dumper->printMipsPLTGOT();
|
||||
if (opts::COFFImports)
|
||||
Dumper->printCOFFImports();
|
||||
if (opts::COFFDirectives)
|
||||
Dumper->printCOFFDirectives();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user