This chapter describes how you use pelf2bin, the Palm OS post linker, as part of the process of creating Palm OS applications.
- "Palm OS Post Linker Concepts"
- "Using pelf2bin with Palm OS Developer Suite"
- "Using the pelf2bin Command Line Tool"
Palm OS Post Linker Concepts
When you use an ARM-based compiler to compile your application source files, you create files in a standard ELF format. pelf2bin converts these ELF object files into binary resource files that can be merged into a Palm OS application.
pelf2bin extracts the code, data, and dynamic relocation sections from the input file, and produces two resource files:
- a file containing the compiled and linked code of the application
- a file containing the application's data and dynamic relocations, which is used by the Palm OS loader to prepare the application for execution
These files can be used with the resource tool PRCMerge to create a Palm OS application. For more information about PRCMerge, see the book Palm OS Resource Tools Guide.
Figure 6.1 Post Linker Overview
Using pelf2bin with Palm OS Developer Suite
pelf2bin is fully integrated with Palm OS Developer Suite. When you build your application or shared library with Palm OS Developer Suite, pelf2bin is called as part of the build process. You do not need to invoke pelf2bin directly.
Using the pelf2bin Command Line Tool
pelf2bin is used to convert an ELF object file into binary resource files that can be merged into a Palm OS application. The command line syntax for pelf2bin is:
pelf2bin [options] input_file
-
options - Additional command line options as described in the following section "Specifying Command Line Options."
-
input_file - Specifies the input ELF object file.
Specifying Command Line Options
-
-code filename - Specifies the code resource output filename.
-
-data filename - Specifies the data resource output filename.
-
-help -
pelf2bindisplays help information and ignores any other option. -
-directory dirname - Specifies the output directory name.
-
-rsrcID value - Specifies the resource ID.
-
-verbose level - Specifies what level of diagnostic information you want
pelf2binto display. -
-V -
pelf2bindisplays version information.
