Keil Logo

Examples of processing ELF files in an archive

14.2 Examples of processing ELF files in an archive

Examples of how you can process all ELF files in an archive, or a subset of those files. The processed files together with any unprocessed files are output to another archive.

Examples

Consider an archive, test.a, containing the following ELF files:

bmw.o
bmw1.o
call_c_code.o
newtst.o
shapes.o
strmtst.o
Example of processing all files in the archive

This example removes all debug, comments, notes and symbols from all the files in the archive:

fromelf --elf --strip=all test.a -o strip_all/

This creates an output archive with the name test.a in the subdirectory strip_all

Example of processing a subset of files in the archive

To remove all debug, comments, notes and symbols from only the shapes.o and the strmtst.o files in the archive, enter:

fromelf --elf --strip=all test.a(s*.o) -o subset/

This creates an output archive with the name test.a in the subdirectory subset. The archive contains the processed files together with the remaining files that are unprocessed.

To process the bmw.o, bmw1.o, and newtst.o files in the archive, enter:

fromelf --elf --strip=all test.a(??w*) -o subset/
Example of displaying a disassembled version of files in an archive

To display the disassembled version of call_c_code.o in the archive, enter:

fromelf --disassemble test.a(c*)
Non-ConfidentialPDF file icon PDF version100748_0614_00_en
Copyright © 2016–2020 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.