Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


elf2e32 command syntax

[Top]


Overview

The elf2e32 tool's primary function is to create executables (DLLs and EXEs) in the format required by Symbian OS, known as the E32Image format. The tool takes as input, the executables produced by a compiler in the standard Executable and Linking Format (ELF), and Symbian OS-specific options specified as command-line arguments to the tool. The tool is located in at epoc32\tools\elf2e32.exe.

Invocation syntax

elf2e32 [--capability=<capabilities>] [--compressionmethod [none | inflate | bytepair]] [--debuggable] [--dlldata] [--definput=<file-path>] [--defoutput=<file-path>] [--dso=<file-path>] [--dump=<dump-options>] [--e32input=<file-path>] [--elfinput=<file-path>] [--fixedaddress] [--heap=<committed-size>[,<reserved-size>]] [--help] [--libpath=<search-paths>] [--linkas=<name>] [--namedlookup] [--noexportlibrary] [--output=<file-path>] [--sid=<secure-ID>] [--stack=<size>] [--sysdef=<ordinal-number>,<symbol>] [--targettype=<target-type>] [--uid1=<UID>] [--uid2=<UID>] [--uid3=<UID>] [--uncompressed]

[Top]


Options

Option

Description

capability=<capabilities>

Platform security capabilities to be assigned to the executable.

Capabilities can be specified by name using the set of identifiers used in mmp files, i.e.: TCB, CommDD, PowerMgmt, MultimediaDD, ReadDeviceData, WriteDeviceData, DRM, TrustedUI, ProtServ, DiskAdmin, NetworkControl, AllFiles, SwEvent, NetworkServices, LocalServices, ReadUserData, WriteUserData, Location, SurroundingsDD, and UserEnvironment.

Multiple capabilities can be specified using "+" as a separator. For example:

--capability=LocalServices+ReadDeviceData+ReadUserData

The special capability name ALL can be used to represent all capabilities supported by the current version of Symbian OS. This can also be used together with capability names prefixed with a '-' to indicate which capabilities to exclude. For example:

--capability=ALL-TCB-TrustedUI

The default is no capabilities though the word NONE can be used explicitly.

See also the Platform security concepts section in Symbian OS Guide/Platform security/Platform security engineering guide or Symbian OS Guide/Platform security/Symbian OS v9 Security Architecture(SDKs)

debuggable

Specifies that the application can be debugged using the run-mode debug subsystem. Only executables (EXEs and EXEXPs) can be specified as debuggable.

definput=<file-path>

Input DEF file.

This is used to specify a DEF file when constructing a DLL and/or import library.

defoutput=<file-path>

Output DEF file.

Specifies a DEF file to be constructed by the tool.

dlldata

Allow writable static data in the DLL.

The default is that a DLL may not have writable static data. For more information, see Static data.

dso=<file-path>

Output DSO (or library) file.

Specifies the LIB file to be constructed by the tool.

dump=<dump-options>

Used to specify the information generated when the e32input option is used. The sections to include are specified as follows:

  • h: Header

  • s: Security information

  • c: Code section

  • d: Data section

  • e: Export information

  • I: Import table

e32input=<file-path>

Dumps a description of the specified E32Image file to standard output. The output describes the executable's properties such as its header, its imports and exports, and the contents of its code and data sections. Output options are specified using the --dump parameter.

elfinput=<file-path>

Input ELF file.

Specifies a compiler-generated executable in ELF format to be converted into E32Image format by the tool.

fixedaddress

Indicates that the process must have a fixed address.

See Fixed processes for more information.

The default is no fixed address.

heap=<committed-size>[,<reserved-size>]

The committed size and reserved size of the heap for the process, specified in bytes.

The first value given is the committed size, followed by the reserved size which is optional.

The default committed size is 0x1000 and the default reserved size is 0x100000.

See Memory Management concepts for more information.

help

Displays help text for the tool.

libpath=<search-paths>

A semi-colon separated list of search paths that the tool should use to locate import libraries.

linkas=<name>

The internal name used in the image file for the executable. This can include information that specifies the executable version (in braces) and the UID3 (in square brackets). For example, foo{00020001}[10011235].exe, would be used for an executable foo.exe, at version 2.1, with UID3 0x10011235.

log=<file-path>

Redirects console log messages to the specified file

compressionmethod [none | inflate | bytepair]

The compression method to be used to compress the files. The tool uses the inflate method by default.

The following compression methods can be used:

none

The files are not compressed. This is equivalent to using the uncompressed keyword.

Note: The uncompressed keyword, when specified, takes precedence over any compressionmethod.

inflate

Compresses executable files using the default (Deflate, Huffman+LZ77) algorithm.

bytepair

Compresses executable files using the bytepair algorithm. Bytepair compression allows faster decompression than the default Deflate, Huffman+LZ77 algorithm and supports demand paging by performing compression and decompression of code in independent 4KB pages.

namedlookup

Enables symbol lookup by name using the dlsym Open Group API. This option has an impact on the binary size as Symbian OS binaries do not include symbol information by default.

Note: If the tool is invoked by the Symbian OS build toolchain, symbol lookup is enabled for the STDEXE and STDDLL target types only. To enable symbol lookup for other target types, the tool must be invoked independently.

noexportlibrary

Suppress implicit exports.

As part of the library exports, the RVCT tools generate items not marked as EXPORT_C in the source code. These include Virtual Table and Run-time Type Information entries. Specifying this option causes the tool not to include these exports.

For background information, see cedar\generic\tools\documentation\Migrating_from_RVCT21_build_328_to_build_416_v1.0.doc.

The default is to include these items generated by RVCT.

output=<file-path>

Output E32 image file name.

sid=<secure-ID>

Secure ID (SID) of the executable.

An SID identifies an executable uniquely on a phone. This allows service providers such as servers to make security checks on the basis of the executable making the request.

See also the Platform security concepts section in Symbian OS Guide/Platform security/Platform security engineering guide.

stack=<size>

Specifies the stack size for a process in bytes.

The default is 0.

sysdef=<ordinal-number>, <symbol>

This option forces the specified symbol to be exported at the specified ordinal position.

This is required for some target types (polymorphic DLLs).

targettype=<target-type>

Target type. The vaild types are as specified by the mmp targettype keyword.

If elfinput is specified and there is no targettype, a Custom target is assumed.

An IMPLIB target is assumed if --elfinput is not specified and -deffilein is specified.

uid1=<UID>

UID 1 value for output executable.

uid2=<UID>

UID 2 value for output executable.

The default is 0.

uid3=<UID>

UID 3 value for output executable.

The default is 0.

uncompressed

Specifies that the target executable must not be compressed.

By default, the target executable is compressed.

unfrozen

Specifies that the input DEF file (specified with --definput) is not treated as frozen. This means that the tool will not report errors if the executable does not contain symbols that are specified in the DEF file.

vid

Vendor ID (VID) of the executable.

A VID allows service providers such as servers to make security checks on the basis of the supplier of the executable making the request. See also the Platform security concepts section in Symbian OS Guide/Platform security/Platform security engineering guide.

The following table specifies whether an option is required, optional or not applicable (N/A) for the main use cases of the tool (namely creating DLLs, EXEs, EXEs with exports (EXEXP target), and import libraries (IMPLIB target)).

Option

DLL (static/polymorphic)

EXE

EXEXP

IMPORT LIB

capability

optional

optional

optional

N/A

debuggable

N/A

optional

optional

N/A

dlldata

optional

N/A

N/A

N/A

definput

optional

N/A

optional

required

defoutput

required

N/A

required

N/A

dso

required

N/A

required

required

elfinput

required

required

required

N/A

fixedaddress

N/A

optional

optional

N/A

heap

N/A

optional

optional

N/A

libpath

optional

optional

optional

N/A

linkas

required

required

required

required

noexportlibrary

optional

N/A

optional

N/A

output

required

required

required

N/A

sid

required

required

required

N/A

stack

N/A

optional

optional

no

sysdef

Required for polymorphic DLL target types only

N/A

N/A

N/A

targettype

DLL, or polymorphic DLL target type

EXE

EXEXP

IMPLIB

uid1

required

required

required

N/A

uid2

optional

optional

optional

N/A

uid3

optional

optional

optional

N/A

uncompressed

optional

optional

optional

N/A

unfrozen

optional

N/A

optional

N/A

vid

required

required

required

N/A