While researching embedded arm programming using gnu tools, I have found many examples, such as here or here, of build scripts where objcopy
is invoked with -S -O binary
, for example:
arm-none-eabi-objcopy -S -O binary file.elf file.bin
According to the objcopy man page, the -S option (--strip-all) means "Do not copy relocation and symbol information from the source file. Also deletes debug sections."
However, it is my understanding that, when using -O binary, "All symbols and relocation information will be discarded."
So is including -S with -O binary
redundant?
Would the following command give the same result?
arm-none-eabi-objcopy -g -O binary file.elf file.bin
Thanks.