|0.1.4||Apr 30, 2021|
|0.1.3||Apr 20, 2020|
|0.1.2||Nov 8, 2019|
#27 in Build Utils
Static symbol manipulation tool for ELF and Mach-O objects
Download the latest release for your operating system.
brew tap calebzulawski/symtool http://github.com/calebzulawski/symtool.git brew install symtool
cargo install symtool
Supports ELF and Mach-O objects, and archives of objects.
- Changing symbol visibility
- Renaming symbols
- Actions are performed in-place, leaving the rest of the binary untouched
Hide all symbols starting with
foo and expose all symbols ending in
symtool --hidden "^foo" --default "bar$" input.o output.o
Rename the symbol
symtool --rename foo bar input.o output.o
Note: symbols are renamed in-place so the new name cannot be longer than the original.
- Pretty fast (objects are simply patched, no regeneration or relocations necessary)
- Supports a wide variety of unusual object formats (for example, Intel's ICC merges string tables)
- Cross-platform method of adjusting symbol visibility of existing objects and archives (GNU ld can do this when linking, but Apple's ld64 cannot)
symtool is distributed under the terms of both the MIT license and the Apache License (Version 2.0).