Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


MakePEF

Tool

SYNTAX

MakePEF xcoffFilename [-a num] [-b] [-c num] [-d num] [-e name]
[-f filename] [-fc creator] [-ft type] [-i name] [-k]
[-l oldName[=newName][#version[-upfv]][!][~]] [-n] [-o filename]
[-r] [-s num] [-t name ] [-u num] [-v section=address]
[-w libName:symName] [-x]

DESCRIPTION

You use the MakePEF tool to convert an IBM AIX 3.2 Extended Common Object File Format (XCOFF) file to the Preferred Executable Format (PEF). The PEF file that it creates is smaller and faster than the original XCOFF file. The PEF file supports

unlimited numbers of code and data sections

version numbers for bidirectional version checking in import libraries

distinguishing between the application entry point, the initialization routine, and the termination routine (useful for C++ static constructors and destructors)

a sharing option for each section

unresolved load-time import symbols for specially flagged symbols

IMPORTANT
The PPCLink tool can produce PEF files directly, eliminating the need for MakePEF in many cases. •

INPUT

A file of type 'XCOF'.

OUTPUT

The MakePEF tool produces a file with the default name a.pef. To give the output file a more meaningful name, use the -o option.

ALIAS RESOLUTION

This tool does not resolve Finder aliases.

STATUS

MakePEF can return the following status codes:

0

no errors

1

error

PARAMETERS

xcoffFilename

Specifies the XCOFF file created by the linker.

OPTIONS

-a num

Aligns code and data sections to the byte boundary specified by num. The value num must be a multiple of 8; the default is 16.

-b

Expands uninitialized storage into data that is initialized to zero. By default, uninitialized storage is not represented in the PEF fragment in order to produce a more compact file. Use this option if you are creating an accelerated resource, such as a definition function, and you want it to model the behavior of a 68K resource. (An accelerated resource contains PowerPC code.) This option implicitly turns on the -x option as well.

-c num

Sets the current version number to that specified by num. The default value for num is 0.

-d num

Sets the definition version number to num for import libraries. The definition version number specifies the oldest version for which the definition in the link-time copy of the library is still compatible with the implementation you are building now. The default value for num is 0.

-e name

Sets the main symbol to the specified name, which must be in the export list of the XCOFF file. The default value is the main symbol specified in the XCOFF file.

-f filename

Loads an additional export list from filename.

-fc creator

Specifies the creator of the output file.

-ft type

Specifies the type of the output file.

-i name

Specifies the name of the initialization routine. You must specify the name of the initialization routine as an export when you link the fragment. You then specify the name using this option to make the initialization routine visible in the PEF file. The default is that the fragment does not have an initialization routine.

-k

Keeps initialization, termination, and entry-point names as export symbols in the PEF output file. The default is to remove these routines from the export list because they are specified in a different area in the PEF file.

-l oldName[=newName][#version[-upfv]][!][~]

Modifies information about import library oldName in the import table for the code fragment you are building. You must specify options in the order shown.

newName

Specifies the name to include in the table. Use the name of the runtime (PEF) copy of the library.

#version

Places the current version number of the library in the table. Use the version number that was set for the library using the -c option when the library was built. Note that if you specify a version number, you must surround the entire argument in double quotes because of the # character.

-upfv

Places the library's implementation version number in the table. Use the implementation version number that was set for the library using the -u option when the library was built.

!

Specifies that the library should be initialized before this fragment.

~

Allows all symbols from this library to be undefined at runtime.

-n

Pads exported loader symbols with a trailing null. The default is no padding. Padding makes it easier to dump the contents of the file using a tool like DumpFile; however, you do not need to pad if you want to use DumpPEF.

-o filename

Specifies the name of the output file as filename. The default filename is a.pef.

-r

Specifies the data section to have read-only privileges. By default, data sections have read and write privileges.

-s num

Sets the share option of the data section of an import library to the specified number. The default value, 1 (contextShare), specifies that the data is new for each application that uses the library.

The value 4 specifies that the data section is globally shared. This option is normally used by the system, by libraries that contain only data, or for Windows DLL compatibility. For additional information, see Inside Macintosh: PowerPC System Software.

-t name

Sets the termination routine to name. You must specify the name of the termination routine as an export when you link the fragment. You then specify the name using this option to make the termination routine visible in the PEF file. The default is that the fragment does not have a termination routine.

-u num

Sets the implementation version number to num for import libraries. The implementation version number specifies the oldest version whose runtime implementation is still compatible with the link-time definition for the version you are building now. The default is 0.

-v section=address

Gives the specified data section the default virtual address of address. By default, data sections have an address of 0.

-w libName:symName

Allows the symbol name symName from file libName to be undefined at runtime.

-x

Turns off automatic data section packing. This option is automatically turned on when you use the -b option.

EXAMPLES

The command below takes the input file file.xcoff and generates the output file file.pef. The -o option specifies the name of the output file.

MakePEF file.xcoff -o file.pef

This following command uses the -l option to rename the import library InterfaceLib.xcoff to the new name InterfaceLib.

MakePEF -l InterfaceLib.xcoff=InterfaceLib

SEE ALSO

PPCLink

 
 


Last Updated July 2000