change a "const int" in an ELF file
Alan Modra
amodra@bigpond.net.au
Tue Feb 18 03:25:00 GMT 2003
On Sun, Feb 16, 2003 at 08:57:47PM +0100, Torsten Mohr wrote:
> With "v850-unknown-elf-readelf -s ELF-File | grep a_value" i can
> get the address of the value, but how can i access that address
> in the ELF-File?
If you look at either the ELF program headers or section headers,
you'll see file offsets, vmas and sizes. Your vma of interest
should be contained in one of the regions specified by vma and size.
>From that header, you can then calculate
file_offset = sec_or_seg_file_offset + vma - sec_or_seg_vma.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list