41#include "tce_config.h"
48 Those flags that dumptpef support are marked with asterisk.
51 [-a|---archive-headers]
52 [-b bfdname| ---target=bfdname]
53 [-C|---demangle[= style] ]
55 [-D|---disassemble-all]
56 [-z|---disassemble-zeroes]
57 [-EB|-EL| ---endian={big | little }]
58(*)[-f|---file-headers]
59 [---file-start-context]
61(*)[-h|---section-headers| ---headers] NOTE: -h is replaced with -s
63(*)[-j section| ---section=section]
68 [-p|---
private-headers]
77 [---start-address= address]
78 [---stop-address= address]
80 [--[no-]show-raw-insn]
81 [---adjust-vma= offset]
97 "file-headers",
"Print file headers.",
"f");
98 addOption(fileHeadersFlag);
103 "section-headers",
"Print section headers.",
"s");
104 addOption(sectionHeadersFlag);
109 "Print elements of section by section index.",
"j");
110 addOption(sectionId);
114 "reloc",
"Print relocation tables.",
"r");
115 addOption(relocTablesFlag);
119 addOption(symbolTablesFlag);
123 "mem",
"Print information about memory usage of reserved sections.",
"m");
124 addOption(memoryInfoFlag);
128 "logical",
"Print only logical information. "
129 "Can be used for checking if two files contains same program "
130 "and data and connections even if it's in different order in "
133 addOption(logicalInfoFlag);
137 return findOption(
"file-headers")->isDefined();
141 return findOption(
"section-headers")->isDefined();
145 return findOption(
"syms")->isDefined();
149 return findOption(
"reloc")->isDefined();
153 return findOption(
"mem")->isDefined();
157 return findOption(
"logical")->isDefined();
161 return findOption(
"section")->listSize();
165 return findOption(
"section")->integer(index);
169 std::cout <<
"dumptpef - TPEF Dumper "
179int main(
int argc,
char* argv[]) {
188 std::cerr <<
"Illegal command line parameters: "
196 std::cerr <<
"Error: Must give input binary file.\n\n";
222 if (
options.printFileHeaders()) {
226 if (
options.printSectionHeaders()) {
230 if (
options.printMemoryInfo()) {
238 if (
options.printRelocations()) {
242 for (
int i = 1; i <
options.sectionIdCount() + 1; i++) {
int main(int argc, char *argv[])
TTAMachine::Machine * machine
the architecture definition of the estimated processor
static MachInfoCmdLineOptions options
static RegisterPass< MachineDCE > R("machinedce","Symbol string based machine DCE for removing not used emulation functions", false, true)
static std::string TCEVersionString()
void parse(char *argv[], int argc)
virtual std::string argument(int index) const
virtual int numberOfArguments() const
void printVersion() const
bool printSectionHeaders()
std::string errorMessage() const
virtual void printHelp() const
void section(Word sectionIndex)
void setOnlyLogical(bool flag)
static Binary * readBinary(BinaryStream &stream)