![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Contact ADC
![]() |
![]() |
SYNTAX
DumpPEF pefFile
[-a[nnotate] {-v[erbose]}] [-c[heck]] [-cache on | off] DESCRIPTION The DumpPEF tool validates and displays the contents of PEF files, with each section appropriately formatted and each field annotated according to section type. DumpPEF can display the contents of a PEF container stored in either the data fork or a resource. DumpPEF can read containers created with ILink, PPCLink, MakeFlat, or MakePEF. DumpPEF searches the input file for a 'cfrg' resource indicating the location of the containers. If no 'cfrg' resource exists, DumpPEF assumes that the container occupies the entire data fork. If no 'cfrg' resource exists and the data fork is empty, DumpPEF displays an error message and quits. Any or all sections can be selectively displayed. The validations check all fields that can be reasonably checked. Errors and warnings are reported as part of the standard output. If you specify the -check option, only the validations are performed, without generating any output (errors or warnings resulting from incorrect fields are reported). DumpPEF reports a warning if a PowerPC code section does not begin on a longword boundary within the container or the file. It also reports a warning if a 68K code section does not begin on a word boundary within the container or the file. A warning is also reported if a "use in place" section is not properly aligned within the container. INPUT PEF container files (pefFile). DumpPEF does not read standard input. If no input files are specified, DumpPEF displays help information. OUTPUT DumpPEF writes the formatted file structures and disassembled code to standard output. STATUS
DumpPEF can return the following status codes:
PARAMETERS pefFile Specifies one or more PEF files to display. DumpPEF can display multiple PEF containers stored within a single file. OPTIONS The option descriptions are grouped into the following functional categories:
IMPORTANT These are the main control options that determine what DumpPEF processes. -c[heck] Checks (validates) only. All output to the standard output is suppressed. Only errors and warnings, if any, are reported to the diagnostic output. -cont[ainer] number Limits the processing to the specified container. Containers are numbered beginning at 1. This option overrides the -forks option. -do all | optLetters
Processes the specified PEF sections. You specify either all
or selected sections using one or more of the following options (optLetters):
-loader {-ldr} all | ldrLetters
Provides more precise control over loader section processing than the -do l
option. You specify either all
or selected loader sections using one or more of the following options (ldrLetters):
Note -pi[data] piLetters
Provides more precise control over pidata section processing than the -do p
option. You specify one or more of the following options (piLetters):
Note -forks whichForks Processes only the containers in the specified forks. You specify one of the following options (whichForks): resource {rsrc} Process only containers in the resource fork data Process only containers in the data fork both {all} Process all containers in both forks -sect[ion] s Limits section relative processing to section s, where s is the section number (starting at 0). These options control how the disassembly of the code sections is processed. -dialect cpu[,vec[tor]] Sets the disassembly dialect to cpu, where cpu is one of the following: Power {Pwr} RS/6000 POWER architecture PowerPC601 {PPC601} PowerPC 601 architecture PowerPC32 {PPC32} 32-bit PowerPC architecture PowerPC64 {PPC64} 64-bit PowerPC architecture vec[tor] vector extensions Except for vector, only one cpu can be specified. Vector may be combined with any of the others (except Power) separated by a comma or used alone when specifying the default dialect. When vector is specified, AltiVec instructions will be disassembled instead of being treated as illegal instructions. A 'V' flag will appear in the flags column to indicate AltiVec instructions.
Note -format {-fmt} fmtParams Specifies code section formatting. The fmtParams parameter uses the following syntax:
on[=fmtOptions] | off[=fmtOptions] | Specifying -format on (or off) in conjunction with any of the fmtOptions parameters listed below disassembles the code section using the specified formatting. Specifying -format on with no fmtOptions parameters disassembles the code section using the default formatting options (the bold options in the list below). Specifying -format off with no fmtOptions parameters displays the code section in unformatted hexadecimal, which is the default.
You specify the fmtOptions
parameter using one or more of the following characters:
-ibm Formats the disassembly using IBM Assembler conventions for comments and directives. The default is to use Apple PowerPC Assembler conventions. -ntb Specifies that there are no traceback tables in the code. Normally, an all zero instruction defines where a traceback table begins. If you know there are no traceback tables in the code, use this option to indicate that all data is to be interpreted as instructions and disassembled. Without this option, if DumpPEF encounters data that appears to be a traceback table, it interprets it as such. If the data is not a traceback table, the output may be confusing. -tb Displays traceback tables appropriately formatted and annotated. Normally the display of the traceback information is suppressed. Use the -ntb option if you know there are no tracebacks in the code. -a[nnotate] {-v[erbose]} Annotates every PEF field with information appropriate to that field. This annotation, while more informative, causes much more output than the default format. The default format provides most of the same data but annotates it more briefly and displays it in a wider format. The -annotate format is narrower. The -verbose option is a synonym for -annotate, and produces identical output. -mark Generates MPW Shell markers on each title in the output. There is no restriction on the standard output file (that is, it can be an open window) other than the fact that markers are not generated to the output file if that output file is also the window from which you initiated the DumpPEF command.
Note -maxlines n Limits all section displays (except headers) to n lines. Only the first n lines of each section are displayed and processed. -o[ffsets] Suppresses the display of the PEF file offsets. The default is to show the file offsets at the left edge of the output for every field displayed. -stripped Suppresses titles, break lines, summary information, and offsets. This option is not recommended for multiple PEF container files. -u[nmangle] Unmangles C++ names. DumpPEF attempts to unmangle symbols from the loader export symbol table, the loader import symbol table, and traceback tables. This option should only be used if the PEF file is from a C++ compiler. -w Suppresses warnings. Only error messages, if any, are shown and counted (for the summary). -w601 Generates explicit warning messages about the use of POWER instructions and PowerPC 601-specific SPRs when the -dialect PowerPC601 option is specified and the code section is disassembled. The default is to generate a flag in the disassembly, but these instructions are always counted to report in the summary that POWER instructions were used. Use this option to find where these instructions exist in the file and what they are, since the disassembled line is always shown with the warning. -cache on | off Enables (on) or disables (off) data caching. -h Displays a brief summary of DumpPEF options. This option overrides all other options. The help information is also displayed if no PEF files are specified on the command line. -p Writes the version and progress information to the diagnostic output file. -summarize Displays a summary of the results of processing each file. The summary is sent to the diagnostic output and is always generated if any errors or warnings are reported. EXAMPLES The default options process the headers and imports, and the relocations and exports in the loader section. Code sections are not disassembled. The command below processes the file myLibrary according to the default options. DumpPEF myLibrary > myLib.pef This is identical to the following command:
DumpPEF myLibrary -do hl -loader hirx -forks both -cache on ∂ In the example below, only the library's exports are displayed. DumpPEF myLibrary -ldr x > myLib.pef The following command displays the list of import libraries with which the client application (ClientApp) was linked, along with the list of imported symbols. DumpPEF ClientApp -loader fi > ClientApp.pef The command below processes the entire file (-do all) for validation purposes only (-check). If there are any errors or warnings, they are written to the diagnostic file. No standard output file is generated. DumpPEF myLibrary -check -do all The example below displays all of the 68K and PowerPC code sections in myLibrary in disassembled form instead of unformatted hexadecimal. DumpPEF myLibrary -do c -format on You can use the following command to list only the names of the exports in a single library file (singleLibrary). The resulting output can be sorted and used later for verifying that the library exports the desired routines. DumpPEF singleLibrary -loader n -stripped
Note SEE ALSO
|
![]() | |
![]() | |
![]() | |
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2004 Apple Computer, Inc. All rights reserved. | Terms of use | Privacy Notice |