Add the -section option to llvm-objdump used with -macho that takes the argument

segname,sectname to specify a Mach-O section to print.  The printing is based on
the section type or section attributes.

The printing of the module initialization and termination section types is printed
with this change.  Printing of other section types will be added next.

llvm-svn: 227649
This commit is contained in:
Kevin Enderby
2015-01-31 00:37:11 +00:00
parent 295596a0a7
commit f6d258537d
5 changed files with 207 additions and 25 deletions

View File

@@ -906,7 +906,8 @@ int main(int argc, char **argv) {
&& !(ArchiveHeaders && MachOOpt)
&& !(IndirectSymbols && MachOOpt)
&& !(DataInCode && MachOOpt)
&& !(LinkOptHints && MachOOpt)) {
&& !(LinkOptHints && MachOOpt)
&& !(DumpSections.size() != 0 && MachOOpt)) {
cl::PrintHelpMessage();
return 2;
}