Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

6    Using the Palm OS Post Linker

Palm OS® Protein C/C++ Compiler Tools Guide

Palm OS® Developer Suite

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 ^TOP^

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 ^TOP^

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 ^TOP^

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 ^TOP^

-code filename
Specifies the code resource output filename.
filename
The default filename is acod.
-data filename
Specifies the data resource output filename.
filename
The default filename is adat.
-help
pelf2bin displays help information and ignores any other option.
-directory dirname
Specifies the output directory name.
-rsrcID value
Specifies the resource ID.
value
The default resource ID value is 0.
-verbose level
Specifies what level of diagnostic information you want pelf2bin to display.
level
An integer between 0 and 2.
-V
pelf2bin displays version information.