Home · All Classes · Grouped Classes · Annotated · Functions

Qtopia Single Exec

Introduction

By default Qtopia compiles dynamically. This allows applications to be installed but increases the minimum size and startup time. If installable applications are not required Qtopia can be built as single-exec. This uses static linking to put everything into a single multi-call binary (similar to how busybox works).

Costs/Benefits

The costs of using single-exec are:

The benefits of using single-exec are:

How it works

Libraries are compiled statically. Plugins are compiled as static libraries. Applications are compiled as static libraries. Static global initializers are used to register the plugins with the plugin manager. They are also used to register the quicklaunch applications with quicklauncher and the non-quicklaunch applications with the server. See Applications for information about how applications can be launched.

All of these static libraries are linked into the server creating a single binary. When the server starts it looks at argv[0] to determine which process it is.

The size benefit of single-exec is derived from static linking. When the linker combines the code, it performs various size optimizations such as:

Issues

One important thing to be aware of when building single-exec with additional 3rd-party components is that the symbols must not clash with those from other applications. The use of C++ namespaces would be a very good idea to avoid potential problems caused by this.

Building Single-exec

To build Qtopia as a single-exec binary simply pass -singleexec to configure.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3