rplexportall - Generate Export Definition List

Syntax

rplexportall <object-file>...

Options

<object-file> An object (.o) file with global symbols from which to extract an export definition list.

Description

Generate an export definition list from the given object files. This facilitates the creation of an initial export list, which is needed when cross-referencing symbols between RPLs.

WARNING:
Nintendo strongly suggests that you do not export static initializers and linkonce symbols.

As of SDK 2.11.03, rplexportall and preprpl[32|64] have been modified to exclude static initializers and linkonce symbols because these symbols can cause problems if they are exported. You can read more information about linkonce symbols in the GHS documentation (see $GHS_ROOT/manuals/build_ppc.pdf). Static initializers are a problem because static initializers from a RPL will become imported if any other symbol from that RPL is imported. This could cause the static initializer to be recalled for every RPL that imports the static initializer.

Perhaps upon examination of your situation that you can determine that you want these exclusions. If so, you can manually add them back into your exports.def file and pass one or both of the new preprpl[32|64] options to allow them to be added to your RPL's exports (-warnsti and -warnlinkonce). However, it is considered that these new options should only be used as a last resort. For more information and suggestions on these options, see preprpl[32|64].

Contact your local Nintendo support group for advice if you are unable to dispense with these symbols due to backward compatibility issues.
NOTE:
As of SDK 2.11.03 rplexportall has changed from a Cygwin script to a Windows application without Cygwin dependencies. The only difference from the script is that the line ending is now CRLF instead of LF. If that is an issue, one solution is to pipe the output to tr -d '\r'.

Examples

From a Cafe Cygwin shell, type:

$ rplexportall hello.o

This will produce:

; Generated Export List

[CODE]
main                                    ; main
rpx_gethello                            ; rpx_gethello

[DATA]
hello                                   ; hello

This list must be edited to exclude main.

For C++ symbols, the "unmangled" version will appear in the comment field. For example:

$ rplexportall *.o

will yield:

; Generated Export List

[CODE]
do_test__FUi                            ; do_test(unsigned int)
main                                    ; main
thread_func__FiPv                       ; thread_func(int, void *)

[DATA]
core1_thread_stack                      ; core1_thread_stack
gStartEvent                             ; gStartEvent
gThreadCount                            ; gThreadCount
__TID_c                                 ; type identifier for char
__TID_i                                 ; type identifier for int
__TID_v                                 ; type identifier for void

See Also

RPX/RPL Overview
Building with Examplemake
makerpl[32|64]
preprpl[32|64]
dumprpl
OSDynLoad_FindExport
OSDynLoad_Acquire

Revision History

2013/12/16 rplexportall is Cygwin-free.
2013/12/13 New exclusions from rplexportall.
2013/05/08 Automated cleanup pass.
2012/07/23 Fixed broken links.
2011/10/28 Initial version.


CONFIDENTIAL