Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



elf2e32 command syntax


Overview

The elf2e32 tool's principal 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 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]] [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>] [--noexportlibrary] [--output=<file-path>] [--sid=<secure-ID>] [--stack=<size>] [--sysdef=<ordinal-number>,<symbol>] [--targettype=<target-type>] [--uid1=<UID>] [--uid2=<UID>] [--uid3=<UID>] [--uncompressed]

Note that not all options are relevant to all uses of the tool, and some options are required for some uses. Detail on this is given in the following section.

[Top]


Options

This section first describes the tools options, and then describes the roles of the options for the various uses of the tool.

Option

Description

capability=<capabilities>

Platform security capabilities to assign to the executable.

Capabilities can be specified by name using the same 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 should be specified using "+" as a separator, e.g:

--capability=LocalServices+ReadDeviceData+ReadUserData

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

--capability=ALL-TCB-TrustedUI

indicates a set of all capabilities excluding TCB and TrustedUI. Where capabilities are excluded by use of a '-', a preceding '+' is not required.

If no capabilities are required, then NONE can be used.

The default is no capabilities.

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)

definput=<file-path>

Input DEF file.

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

defoutput=<file-path>

Output DEF file.

Specifies where a DEF file constructed by the tool should be output.

dlldata

Allow writable static data in the DLL.

The default is that a DLL may not have writable static data, and that if it is found, an error occurs. For more information, see Static data.

dso=<file-path>

Output import DSO (or library) file.

Specifies where a LIB file constructed by the tool should be output.

dump=<dump-options>

Used to restrict the information given when an E32Image file description is output using the e32input option. 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 out. The output can describe the executable's properties as given in its header, its imports and exports, and contents of code and data sections. Options for the output can be given 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

Flags that the process should have a fixed address.

See Fixed processes for more information.

The default is not 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 should be the committed size, followed optionally by the reserved size, separated by a comma.

The default committed size is 0x1000; default reserved size is 0x100000.

See Memory Management concepts for more information.

help

Outputs 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 tool compresses by default with the Deflate, Huffman+LZ77 algorithm.The compression algorithm used can be explicitly specified with the compressionmethod keyword.

none

The files are not compressed and is the same as using uncompressed alone. NOTE: The uncompressed keyword always take precedence and overrides 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 4kbyte pages.

noexportlibrary

Suppress implicit exports.

The RVCT tools generate as library exports some items not marked as EXPORT_C in source code. These include Virtual Table and Run-time Type Information entries. Supplying this option causes these exports not to be included.

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

The default is not to suppress.

output=<file-path>

Output E32 image file name.

sid=<secure-ID>

Secure ID (SID) of the executable.

A 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>

Committed 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 the same as can be specified by the mmp targettype keyword.

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

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

The valid target types are:

uid1=<UID>

UID 1 value for an output executable.

uid2=<UID>

UID 2 value for an output executable.

The default is 0.

uid3=<UID>

UID 3 value for an output executable.

The default is 0.

uncompressed

Specifies that the target executable should be compressed.

The code and data sections of the executable are compressed with the Deflate, Huffman+LZ77 algorithm.

By default, compression is on.

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 next table specifies for the main use cases of the tool, for creating DLLs, EXEs, EXEs with exports (EXEXP target), and import library without executable (IMPLIB target), whether an option is required, optional, or not applicable (N/A).

Option

DLL (static/polymorphic)

EXE

EXEXP

IMPORT LIB

capability

optional

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