W
WG
Greetings,
when compiling a program with option -O (gcc on Linux) alle unused
variables are stripped.
However, I would like to keep a specific variable.
I use it for version checking in object files with
'strings file.o | grep Id:'.
I do not want to enter a dummy instruction using this variable to
prevent the optimizer from stripping the variable away.
Is this even possible when using the option -O?
Thanks for hints
WG
when compiling a program with option -O (gcc on Linux) alle unused
variables are stripped.
However, I would like to keep a specific variable.
I use it for version checking in object files with
'strings file.o | grep Id:'.
I do not want to enter a dummy instruction using this variable to
prevent the optimizer from stripping the variable away.
Is this even possible when using the option -O?
Thanks for hints
WG