I would like to rename symbols inside object files (.o) with something that would be the Mac equivalent of binutils' objcopy --redefine-syms
tool.
I found no arm-apple-darwin10-objcopy
. I tried the MacPorts' arm-elf-binutils
port and also tried to play a bit with otool
and segedit
without much success.
Any ideas please?
brew install binutils
andgobjcopy
? eg:gobjcopy --redefine-sym _D4main9foo_test1FZv=_foobar main.o main2.o
; NOTE: the resulting executable seems wrong butnm main2.o | grep _foobar
works – Blythebm