This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to modify the value of variable in .o ELF (linux)
- To: roman at checkpoint dot com
- Subject: Re: How to modify the value of variable in .o ELF (linux)
- From: Nick Clifton <nickc at redhat dot com>
- Date: Wed, 8 Nov 2000 14:37:30 -0800
- CC: binutils at sourceware dot cygnus dot com
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