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*)