2.3 Options to protect code in image files with fromelf

If you are delivering images to third parties, then you might want to protect the code they contain.

To help you to protect this code, fromelf provides the --strip option and the --privacy option. These options remove or obscure the symbol names in the image. The option that you choose depends on how much information you want to remove. The effect of these options is different for image files.

Restrictions

You must use --elf with these options. Because you have to use --elf, you must also use --output.

Effect of the options for protecting code in image files

For image files:

Table 2-1 Effect of fromelf --privacy and --strip options on images files

Option Effect
fromelf --elf ‑‑privacy

Removes the whole symbol table.

Removes the .comment section name. This section is marked as [Anonymous Section] in the fromelf --text output.

Gives section names a default value. For example, changes code section names to '.text'.

fromelf --elf ‑‑strip=symbols

Removes the whole symbol table.

Section names remain the same.

fromelf --elf ‑‑strip=localsymbols

Removes local and mapping symbols.

Retains section names and build attributes.

Example

To produce a new ELF executable image with the complete symbol table removed and with the various section names changed, enter:

fromelf --elf --privacy --output=outfile.axf infile.axf
Non-ConfidentialPDF file icon PDF versionARM DUI0477M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.