How to modify the value of variable in .o ELF (linux)

Nick Clifton nickc@redhat.com
Wed Nov 8 14:37:00 GMT 2000


Hi Roman,

: I need to be able to modify the value (not NAME) of the variable in
: a .o file (in my case - linux kernel module) without recompiling
: the .o.
: 
: I am sure that this can be accomplished with BDF library but I
: am trying to find a tool that will do it for me (like objcopy)
: and avoid writing code :-)

You may be able to do this with the linker command line switch
--defsym.  (I have not tried this out, but it is worth a shot).

Failing that you may be able to define the symbol, and its new value,
in a custom linker script.

Cheers
	Nick




More information about the Binutils mailing list