I have a compiled elf file and I would like to verify the optimisation level used. The question is how can I determine optimisation level from an object/elf?
I have tried with "file" command and "objdump" (most of the switches), but none of them revealed this. Is it possible at all?
strings foo.o | grep -- -O
might give you what you want.
No, not in general. The compiler doesn't write its active "optimisation" setting to the object file, and it's not necessarily possible to determine from the object code itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With