[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

Chapter 4.

 

PowerPC Command-Line Settings



This chapter lists and describes the compiler language options for the command-line tools. These options control the way the compiler parses and translates source code.


Overview of Metrowerks Language Options

The Metrowerks command line compilers translate source code (for example, C and C++) into object code. Object code generated by these compilers is processed by the Metrowerks command line linkers to produce executable objects like applications, dynamic link libraries (DLLs), code resources, and static libraries.

Each compiler has various options that you can set. If you are familiar with the CodeWarrior development environment you will see that many of these options correspond to settings in the CodeWarrior target settings dialogs.

This chapter organizes information into these topics:

In all cases, text in bracketts-the [ and ] characters-is optional. The bracketts themselves never appear in the actual command. For example, you could write -str[ings] pool as either -strings pool or -str pool.

Where an option has several possible permutations, the possibilities are separated by a pipe-the | character. For example, -sym on|off|full|fullpath reflects the fact that the -sym command may be followed by one or more of four possibilities. So you might have -sym on, -sym off, -sym full, or -sym on, fullpath.

The + (plus sign) it means that the parameter to an option must "stick" to the option name and not be separated by a space.For example, /D+name[=value] means that you should specify
/DVAR or /DVAR=3, but not /D VAR.

In cases where you provide a variable parameter, like a file name, that item is in italic text. For example, -precompile filename means you must provide a file name. The explanation that accompanies each compiler option makes it clear what you must provide.


PowerPC Language Options


Preprocessing and Precompiling

This section describes the options for handling preprocessing and precompilation for the Embedded PowerPC tools.


-c

Use this option to compile only, do not link.

See also -e[2].


-check precomp[flags]

Tells the compiler to make sure the settings in precompiled header files match the settings for the currently compiling source code.

Use this option only when creating a precompiled header. When used, the compiler ensures that the precompiled header's settings for sizeof(int), sizeof(double), and use of floating point math are the same as for the current file settings.

Precompiled headers that do not rely on these settings should not use this option. Precompiled headers that depend on these settings (like the Standard ANSI C and ANSI C++ library header files that use int and double) should use this option.

See also -precompile filename


-cwd keyword

Use this option to specify #include file searching semantics. Several different values for keyword are possible:

proj means begin search in current working directory. The -cwd proj option is equal to the default behavior; the default directory is always searched first.

source means begin search in directory of source file, this is the default. Some compilers from a UNIX background do not use the current working directory as the first directory to search. Instead, they search the directory of the current source file first. You can duplicate this behavior with -cwd source.

explicit means begin search with first (-i- or -I-)nclude path. The -cwd explicit option tells the compiler to not search in the default directory or FooFolder, but to begin the search in the first explicitly passed directory.


-d name [ = [ value ] ]

Tells the compiler to define a preprocessor symbol with the name name. The default value for the defined symbol is 1. Use the optional item, value, to specify a value other than 1.

For example, entering

  -d debug_on

is equivalent to placing

  #define debug_on 1

in the first line of the source code file being compiled.

Entering

  -d version=2.01

is equivalent to placing

  #define version 2.01

at the beginning of source code file being compiled.

Entering

  -d debug_on=

is equivalent to

  #define debug_on

+D name [ = [ value ] ]

This option is the same as -d name [ = [ value ] ]


-e[2]

Sends preprocessor output to standard output without generating object code (no compliation). Use this option to verify preprocessor directives and definition expansions.

See also -c.


-ext extension

Specify extension for generated object files. If used with a leading period ('.'), this option appends the extension. Without the leading period character, it replaces the source file's extension.

For extension, a maximum length of 14 characters is imposed. The default extension is .o


-fatext

Use fat extensions for generated object files, of the form .<arch>.o, where <arch> is the tool architecture.


-i- or -I-

Delimit groups of user paths (before -i-) from system paths (after
-i-); system paths are searched with #include <...> as well as #include "...". Default system includes (see and -nostdinc) are searched after paths specified on the command line; implies -cwd explicit

See also -cwd keyword.


-I+ | -ipath[;...]

Add path to list of #include search paths


-inclpaths keyword

Specify #include searching semantics, using the following keyword possibilties:

standard|std|normal is used to distinguish system paths (#include <...>) from user paths (#include "..."). This is the default.

ignoresys[tem] |nosys[tem] is used to treat #include <...> like #include "..."


-make

Generate Makefile from source dependencies. Do not compile, instead, use -o filename to redirect output to a file.


-nocode[gen]

Check syntax only, do not compile.


-nofail

Continue working after errors are encountered in earlier files.


-nostdinc

Do not use standard system include paths (specified by the environment variable %MWCIncludes%


-nosyspath

In a nutshell, treat #include <...> like #include "...".

Tells the compiler to treat #include <header> directives as if they are #include "header" directives. In other words, "system" include files (#include <header>) are searched for in the same way as normal include files (#include "header") are searched for.

Not all compilers are so rigorous that they only search the system directories when they encounter angle brackets. As a result, there is a lot of source code out there that has include directives with <> where they really should be "". In those situations you can use -nosyspath. -nosyspath forces the compiler to treat all <> as "".


-[not]once

The -once option tells the compiler to read include files only once, even if they are included more than one time with the #include preprocessor directive.

The -notonce option tells the compiler to read include files each time they are included with the #include directive.

The default is -notonce.

This option is equivalent to the #pragma once directive.


-once

Prevent header files from being processed more than once.


-o file|dir

Specify output filename or directory for object file(s) or preprocessor output, or output filename for executable; if specifying a directory, '-o xxxx' must appear before any source files


-pragma somepragma

There are a few situations where a legal pragma doesn't have a command line option. Use -pragma to pass a pragma to the top of each source file.

The precise position of the pragma will depend on whether the
-pragma option was passed before -d, -u, -prefix, -s and -once options as these options are all "inserted" to the top of the source file in the order the options are passed.

The command line parser does not validate the pragma. You will get feedback on whether the syntax was correct if you have -w pragmas (on by default). Multi-word pragmas must be passed within quotes. For example -pragma "export on" will insert #pragma export on at the top of your file.


-precompile filename

Tells the compiler to precompile a header source code file and save the resulting file as filename.

For example, entering


  mwcceppc myfile.h -precompile myprecomp

will precompile the header file myfile.h and save the precompiled file as myprecomp.

Note that the file to be precompiled cannot contain any statements that generate data or object code.

If you use this option and you have code like this


  #pragma precompile_target

in your source code you, will receive a warning. The warning tells you that the compiler is ignoring the pragma.


-prefix filename

Tells the compiler to include the file filename at the beginning of the source code files specified in the command line.

Use this option to include often-used header files or precompiled header files.


-preprocess

Preprocess only, do not compile.


-searchincludes

Search #include paths for source files specified on the command line; may specify object code and libraries as well; this option provides the IDE's 'access paths' functionality


-U+name

Undefine symbol name


-u[ndefine]name

Undefine symbol name


Language Control

This section contains information about command-line options for controlling language attributes of code compilation.


-ansi keyword

Keywords include off/on/relaxed/strict.

The -ansi options control ANSI C/C++ conformance.

The default is -ansi off. This allows you to use platform-specific keywords, does not require ANSI C/C++ conformance, and sets the -enum option to min. Use this option when you write platform-specific code.

"On" and "relaxed" are synonymous. For example, with this option, keywords for Mac OS programming-the far, pascal, and asm keywords-are not accepted. Only ANSI keywords are accepted. This option also turns on strict ANSI C/C++ conformance. This option works differently depending on whether your source code files contain C or C++ code. For C source code this option disallows:

void f(int)
{
...
}

For C++ source code, this option disallows: empty array struct members, '#' tokens in a macro definitions that are not followed by a parameter, identifier token after #endif.

The -ansi strict option adds one more limitation to those specified for -ansi on. Enumerated types are always of type int. This additional restriction is the same as the -enum int option.

This option may also be manipulated with the #pragma ANSI_strict directive.


-appleext on/off

If on, this tells the compiler to recognize Apple's extended keywords: far, asm, and pascal. These keywords are not defined in the ANSI C and ANSI C++ standards. .

If off, this tells the compiler to signal an error if it reads Apple's extended keywords: far, asm, and pascal. These keywords are not defined in the ANSI C and ANSI C++ standards.

The default is -appleext on.


-ARM on/off

If on, this tells the compiler to enforce some C++ language specifications described in the Annotated C++ Reference Manual, Ellis and Stroustrup (ARM) rather than enforcing some conflicting ANSI C++ specifications. This disables certain ANSI C++ features that conflict with the ARM C++ specification. This is mainly used for compatibility testing.

Off tells the compiler not to enforce some C++ language specifications described in the Annotated C++ Reference Manual, Ellis and Stroustrup (ARM) that conflict with the ANSI C++ specifications.

The default is -ARM off.

This option is equivalent to the #pragma ARM_conform directive.


-bool on/off

The compilers allow for the use of the new C++ type bool in source code. The C++ language standard evolved to allow the use of this new type. An example of how to use this new type is shown here:


bool foobar( short NewVal )
{
	bool myVar = true;
	if ( NewVal != 0 ) myVar = false;
	return myVar;
}

The default is -bool off.

This option is equivalent to the #pragma bool directive.


-Cpp_exceptions on/off

This options turns true C++ exception handling on and off. It is passed to the linker. When disabled, locals are destroyed with direct destructor call. The default is on.


-char signed/unsigned

Treat unspecified characters as signed or unsigned. The default is signed.

This option may also be manipulated with the #pragma unsigned char directive.


-dialect keyword

This option instructs the compiler whether to compile code as C or C++ code.

If this option is not invoked in any way, source files ending with the extension .c are compiled as C language files. Source files ending with .cp, .cpp, .cc, or .c++ are compiled as C++ language files.

The -dialect c option behaves the same way. It does not force C++ files to be compiled by the C compiler (an effort very likely to fail in any event).

If -dialect cplus is invoked, files ending with .c are compiled as C++ language files.

If -dialect krc is invoked, it is substituted with -dialect c and also -proto ignoreoldstyle

CodeWarrior has minimal support for Kernighan and Ritchie (K&R) C.

If -dialect ecplusplus or -dialect ec++ is invoked, the compiler will generate warnings for use of C++ features outside Embedded C++ subset (this implies -dialect cplus).

If -dialect objective-c or -dialect objc is invoked, the compiler will allow Objective C extensions.

This option may also be manipulated with the #pragma cplusplus directive.


-enum keyword

Specify word size for enumeration types.

min  
use minimum sized enums. This is the default.  
int  
use int-sized enums.  


-inline keyword[,...]

Specify inline options for compilation.

all|on|
smart
 
turn on inlining; default  
none|off  
turn off inlining  
[no]auto  
auto-inline small functions (without 'inline' explicitly specified).  
always  
warning: always inlining 'inline' functions is currently unstable.  
level+=n  
inline functions up to 'n' levels deep; level 0 is the same as '-inline off'; for 'n', range 0 - 8  
deferred  
defer inlining until the end of the compilation unit; this allows inlining of all functions.  


-msext keyword

Control Microsoft VC++ extensions.

on  
enable extensions: redefining macros, allowing XXX::yyy syntax when declaring method yyy of class XXX, allowing extra commas, ignoring casts to the same type, treating function types with equivalent parameter lists but different return types as equal, allowing pointer-to-integer conversions, and various syntactical differences  
off  
disable extensions. This is the default.  


-[no]multibyte[aware]

Enable multi-byte character encodings for source text, comments, and strings.


-proto keyword

auto/strict/ignoreoldstyle ar ethe valid keywords for this option.

Tell the compiler whether to require prototypes. The default value is auto which does not require prototypes. The strict option is the same as -r[equireprotos]. The -proto ignoreoldstyle option tells the compiler to ignore old-style C function prototyping.


-relax_pointers

Relaxes the rules for char pointers (char, unsigned char, and Ptr). This option is especially useful if you are working with code written before the ANSI C Standard. This old code used these types interchangeably.

This option does not work correctly when used with C++ source code because of the strong type checking enforced by C++.


-r[equireprotos]

Tells the compiler to require ANSI-style function prototypes when compiling C and C++ source code. Default is -proto auto, which means that prototypes are not required. -warnings all turns on this option.

See also -w[arnings] option[,option...].

This option is equivalent to the #pragma require_prototypes directive.


-RTTI on/off

Enables run-time type information for C++ code.

This option may be manipulated with the #pragma RTTI directive.


-som

Enable Apple's Direct-to-SOM implementation.


-som_env_check

Enables automatic SOM environment and new allocation checking; implies -som.


-str[ings] keyword[,...]

Specify string constant options, using the following keywords:

[no]reuse  
reuse strings; equivalent strings are the same object. This is the default.  
dontreuse  
don't reuse strings; equivalent strings are distinct objects.  
[no]pool
[strings]
 
pool strings into a single data object.  
[no]
readonly
|[no]ro
 
make all string constants read-only.  


-strict on/off

This option enforces a strict interpretation of the ANSI standard. In other words, language-related restrictions are put in place as detailed in -ansi keyword.

The default is -strict off.


-trigraphs on/off

Trigraph sequences are special codes that signify a single character. Trigraph sequences are meant to represent characters that are not on some non-English computer keyboards.

An ANSI trigraph sequence is two question mark characters followed by a third character. For example, use ??\ to represent a backslash, \.

On tells the compiler to recognize ANSI trigraph sequences.

Off tells the compiler not to recognize ANSI trigraph sequences.

The default is -trigraphs off.

This option may be manipulated with the #pragma trigraphs directive.


-wchar_t on/off

Enable wchar_t as a built-in C++ type.The default is on.


Warning Options

This section contains information about command-line options for controlling error and warning message generation.


-w keyword[,...]

Tailors compatibility warning options using the following keywords:

0  
same as -w on  
1  
same as -w on,noparams  
2|3|4|5|6|7|8  
same as -w on  
9  
same as -w all  


-w[arn[ings]] keyword[,...]

Tailors compatibility warning options using the following keywords:

[no]params  
command-line parser warnings  
off  
passed to all tools, turns off all warnings  
none  
unselect most warnings; still allows individual warnings to be turned on; some warnings will always be on without -w off  
on  
passed to all tools; turn on all warnings  
conformance|usage  
turn on all warnings  
all|full  
turn on all warnings, require prototypes  
[no]err[or] | [no]iserr[or]  
passed to all tools; warnings are errors  
[no]pragmas |
[no]illpragmas  
illegal #pragma statements  
[no]empty[decl]  
empty declarations  
[no]possible | [no]unwanted  
possible unwanted effects  
[no]unusedarg  
unused arguments  
[no]unusedvar  
unused variables  
[no]unused  
same as -w [no]unusedarg,[no]unusedvar  
[no]extracomma|
[no]comma  
extra commas  
[no]pedantic |[no]extended  
pedantic error checking  
[no]hide virtual | [no]hidden[virtual]  
hidden virtual functions  
[no]implicit[conv]  
implicit arithmetic conversions  
[no]notinlined  
'inline' functions not inlined  
largeargs  
passing large arguments to unprototyped functions  
structclass  
inconsistent use of 'class' and 'struct'  
display  
display list of active warnings  
dump  
display list of active warnings  


PowerPC Compiler Options


-align keyword[,...]

Specify structure/array alignment options:

power[pc]  
PowerPC alignment; default  
mac68k  
Macintosh 680x0 alignment  
mac68k4byte  
Macintosh 680x0 4-byte alignment  
array
[members]
 
align members of arrays  
1  
byte alignment  
2  
short alignment  
4  
long alignment; default  


-common on|off

Move all uninitialized data into a common section, thedefault is off.


-fp keyword

Specify floating-point code generation options:

none|off  
no floating point  
soft[ware]  
software FP emulation. This is the default.  
hard[ware]  
hardware FP codegen.  
fmadd  
same as -fp hard and -fp_contract on | off  


-fp_contract on | off

See -maf on | off.


-func_align keyword

Specify function alignment:

4  
4 bytes; default  
8  
8 bytes  
16  
16 bytes  
32  
32 bytes  
64  
64 bytes  
128  
128 bytes  


-maf on | off

Generate fused multiply-add instructions, teh default is off. This is the same as -fp_contract on | off.


-O

-O is the same as -O2. See also -opt keyword[,...]


-O+keyword[,...]

Note that all options besides

-opt off|on|all|space|speed|level=...

are for backwards compatibility; other optimization options may be superceded by the use of -opt level=xxx.

To control optimization, you may combine options as in -O4,p

0  
same as -opt level=0  
1  
same as -opt level=1  
2  
same as -opt level=2  
3  
same as -opt level=3  
4  
same as -opt level=4  
p  
same as -opt speed  
s  
same as -opt space  


-opt keyword[,...]

Specify optimization options:

off|none  
suppress all optimizations  
on  
same as -opt level=2,peephole  
all|full  
same as -opt speed,level=4, peephole,schedule,functions  
[no]space  
optimize for space  
[no]speed  
optimize for speed  
l[evel]=num  
set optimization level:   level 0: global register allocation onlyfor temporary values   level 1: adds dead code elimination   level 2: adds common subexpression elimination and copy propagation   level 3: adds loop transformations, strength reducation, and loop-invariant code motion   level 4: adds repeated common subexpression elimination and loop-invariant code motion ; for 'num', range 0 - 4;
default is 0  
[no]cse  
common subexpression elimination  
[no]commonsubs  
common subexpression elimination  
[no]deadcode  
removal of dead code  
[no]deadstore  
removal of dead assignments  
[no]lifetimes  
computation of variable lifetimes  
[no]loop
[invariants]
 
removal of loop invariants  
[no]prop[agation]  
propagation of constant and copy assignments  
[no]strength  
strength reduction; reducing multiplication by an index variable into addition  
[no]dead  
same as -opt [no]deadcode and [no]deadstore  
[no]schedule  
schedule instructions; see also the command-line option -proc[essor] keyword  
[no]peep[hole]  
peephole optimization  
[no]functions  
function epilogue/prologue  
display  
display list of active optimizations  
dump  
display list of active optimizations  


-pool[data] on|off

Pool like data objects; default is on.


-proc[essor] keyword

Specify processor for scheduling and inline assembler:

401  
403  
 
 
 
 
505  
509  
555  
 
 
 
601  
602  
603  
603e  
604  
604e  
740  
750  
 
 
 
 
801  
821  
823  
8260  
 
 
860  
 
 
 
 
 

generic(this is the default)


-rostr

See -readonlystrings.


-readonlystrings

Make string constants read-only. This is the same as -rostr.


PowerPC Compiler Debugging Options


-g

Generate debugging information, same as -sym full.


-sym keyword[,...]

Specify debugging options:

on  
turn on debugging information, store filenames in object  
[no]full
[path]
 
store full path in object  
off  
do not generate debugging information. This is the default.  


PowerPC Linker

This section includes information on the Embedded PowerPC linker command-line options.


A Word about Linker Command Files

If a linker command file is passed, -codeaddr, -dataaddr, -sdataaddr, and -sdata2addr are ignored.

If a linker command file is not passed, the linker will start the codesections at 0x00010000 and follow contiguously with the large const sections, the large data sections, the small data section, the small const section and then the bss sections.If you pass one or more of the following options: -codeaddr, -dataaddr, -sdataaddr, or -sdata2addr, the addresses you pass affect thestarting addresses of the sections referred to.

All addresses are valid, including 0x0.


-application

This is synonymous with -xma.


-codeaddr address

Set address for code. The default is 65536.


-dataaddr address

Set address for data; default is to have large data sections follow the code and large const sections.


-final_partial

Perform final work on a partial link; implies-xm p[artial[link]].


-dis[assemble]

Disassemble object code.


-g

Generate debugging information, the same as -sym full.

See also-sym keyword[,...].


-heapaddr address

Set address for the heap, default is computed by starting with the stack address and subtracting the heapsize and stacksize.


-heapsize number

Set size of data heap in kilobytes, the defaultis 384.


-lcf filename

Use the linker command file in filename for code and data addresses; -codeaddr, -dataaddr, -sdataaddr, or -sdata2addr are ignored if -lcf is present. filename must end in .lcf.


-library

Generate a static library; same as -xm l[ibrary]


-L+ | -lpath[;...]

Add library search paths. The default is to search the current working directory and then system directories. The search paths have global scope over the command line and are searched in the order given.


-l file[;...]

Search library paths for library in form lib<file>.<ext> where <ext> is a typical library extension. This is added before system libraries (see '-nodefaults').


-m[ain] symbol

Set main entry point for application or sharedlibrary. For symbol, maximum length is 63 characters. The default entry pointis __start.


-map [filename]

Generate link map file. The default name is generated by adding .MAP to <outfile>. If filename parameter specified, then output to filename.


-[no]mapunused

Include list of unused symbols in map file.


-model keyword

Specify code model:

absolute - absolute code and data addressing. This is the default.


-msg keyword

Specify warning options, using a keyword specified here.

[no]params  
[suppress] command-line option warnings  
[no]warn  
[suppress] all warning messages  


-noentry

Same as -nomain.


-nomain

Do not use an entry point.


-nostdlib

Do not use system library files or system paths. By default the environment variable %MWLibraries% contains system paths to search and the environment variable %MWLibraryFiles% contains a list of system libraries to link; both lists contain items separated by ';'


-o filename

Specifies the name of the output file as filename.


-osym filename

Emit debugging SYM file information to filename (recommended extension .xSYM). The default name is <outfile>.?SYM.


-partial

Partial link; same as -xm p[artial[link]].


-romaddr addr

Set address for ROM image;default is not to generate a ROMimage.


-rambuffer addr

Set address for RAM buffer used by ROM images. The default is to not generate a ROM image. This option is ignored if -romaddr addr is absent.


-sdataaddr address

Set address for small data; default is to have sdata/.sbss sections follow the large data sections.


-sdata2addr address

Set address for small constant data; default is to have .sdata2/.sbss2 sections follow the .sbss section.


-stackaddr address

The stack; default is 0x3dfff0.


-sdata[threshold] short

Set maximum size in bytes for mutable data objects before being spilled from small data section into data section. The default is 8.


-sdata2[threshold] short

Set maximum size in bytes for constant data objects before being spilled from constant section into data section. The default is 8.


-[no]srec

Generate an S-record file.


-sreceol keyword

Set end-of-line separator for S-record file. Thisimplies -[no]srec is enabled.

mac  
Macintosh  
dos  
DOS (default)  
unix  
Unix  


-sreclength length

Specify length of S-records. This implies -[no]srec is enabled. For length the valid is range 8 - 255, the default is 254.


-stacksize number

Set size of stack in kilobytes, the default for number is 64.


-strip_partial

Perform dead-stripping on a partial link, this implies
-xm p[artial[link]].


-sym keyword[,...]

Specify debugging options, using a keyword shown here:

on  
turn on debugging information, storefilenames in object  
[no]full[path]  
store full path in object  
off  
do not generate debugging information, this is the default.  


-[no]unused

Implies -map [filename].


-xma

Links object code into a double-clickable application. This is the default linker setting.

See also -application.


-xm e[xecutable]

Synonymous with -xm a[pplication].


-xm l[ibrary]

Tells the linker to generate an object code library.


-xml

Same as -xm l[ibrary].


-xm p[artial[link]]

Partially links the output file. See also -partial.


-w[arn]

Turn all warnings off.


PowerPC Linker Debugging Options


-g

Generate debugging information, same as -sym full.


-sym keyword[,...]

Specify debugging options:

on  
turn on debugging information, store filenames in object  
[no]full[path]  
store full path in object  
off  
do not generate debugging information. This is the default.  


PowerPC Linker Disassembly Options

Disassembly translates object code into assembly language. You can recover the text assembly language code when performing disassembly on a binary object file.


-fmt keyword

Specify formatting options:

[no]x  
[don't] show extended mnemonics. This is the default .  


-format keyword

Specify formatting options:

[no]x  
[don't] show extended mnemonics. This is the default .  


-show keyword[,...]

Specify display options:

only  
as in -show only,code,data  
none  
as in -show none  
all  
show everything  
[no]binary  
show binary information, such as address and opcodes, for object code; default  
[no]code  
show .text sections; default  
[no]text  
show .text sections; default  
[no]data  
show data; default  
[no]detail  
show detailed dump information  
[no]extended  
show extended mnemonics; default  
[no]exceptions  
show exception tables; implies -show data, this is the default  
[no]xtab[les]  
same as [no]exceptions  
[no]headers  
show object headers; default  
[no]debug  
show DWARF information  
[no]dwarf  
show DWARF information  
[no]tables  
show string and symbol tables  


-[no]relocate

For DWARF information, relocate addends in .rela.text and .rela.debug


-xtables on|off

Show exception tables; default is on.


PowerPC ELF Linker Options


-codeaddr addr

Set address for code; default is 65536.


-dataaddr addr

Set address for data; default is to have large data sections follow the code and large const sections.


-lcf filename

Use the linker command filename for all code and data addresses. Note that -codeaddr, -dataaddr, -sdataaddr, -sdata2addr are ignored if -lcf is present;

The file specified by filename mustend in .lcf


-heapaddr addr

Set address for the heap; default is computed by starting with the stack address and subtracting the heapsize and stacksize.


-m[ain] symbol

Set main entry point for application or shared library; for symbol, maximum length 63 chars; default is __start


-[no]mapunused

Include list of unused symbols in map file.


-noentry

Same as -nomain.


-nomain

Do not use an entry point.


-[no]srec

Generate an S-record file.


-rambuffer addr

Set address for RAM buffer used by ROM images. The default is to not generate a ROM image.

This option is ignored if -romaddr is absent.


-romaddr addr

Set address for ROM image;default is not to generate a ROM image.


-sdataaddr addr

Set address for small data; default is to have sdata/.sbss sections follow the large data sections.


-sdata2addr addr

Set address for small constant data; default is to have .sdata2/.sbss2 sections follow the .sbss section.


-sreceol keyword

Set end-of-line separator for S-record file; implies -srec.

mac  
Macintosh  
dos  
DOS (default)  
unix  
Unix.  


-sreclength length

Specify length of S-records; implies -srec for length, range 8 - 255; default is 254.

If a linker command file is passed, -codeaddr, -dataaddr,
-sdataaddr, and -sdata2addr are ignored.

If a linker command file is not passed, the linker will start the codesections at 0x00010000 and follow contiguously with the large const sections, the large data sections, the small data section, the small const section and then the bss sections.If you pass one or more of -codeaddr, -dataaddr, -sdataaddr and -sdata2addr, the addresses you pass affect the starting addresses of the sections referred to.

All addresses are valid, including 0x0.


-stackaddr address

The stack address, the default is 0x3dfff0.


-[no]unused

Implies use of the -map option.


PowerPC Assembler Options


-[no]big

Generate code and link for a big-endian target. This is the default.


-[no]little

Generate code and link for a little-endian target.


-model keyword

Specify code model:

absolute - absolute code and data addressing, this is the default.


-sdata[threshold] short

Set maximum size in bytes for mutable data objects before being spilled from small data section into data section. The default is 8.


-sdata2[threshold] short

Set maximum size in bytes for constant data objects before being spilled from constant section into data section. The default is 8.


PowerPC Assembler Debugging Options


-g

Generate debugging information, same as -sym full.


-sym keyword[,...]

Specify debugging options:

on  
turn on debugging information, store filenames in object  
[no]full[path]  
store full path in object  
off  
do not generate debugging information. This is the default.  

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 20, 2000