How to access an applications ELF program header and ELF section header at runtime
Carlos O'Donell
carlos@systemhalted.org
Fri Oct 23 15:03:00 GMT 2009
On Thu, Oct 22, 2009 at 4:49 PM, Bharath Ramesh <bramesh@vt.edu> wrote:
> I am trying to play around with the symbols __data_start and __bss_start
> to access the location of the .data and .bss section. Is there any way I
> need to typecast these symbols so that I can get the information from
> these symbols.
extern const char __symbol __attribute__((weak));
#define symbol ((unsigned long)&__symbol)
And then use symbol in your C code.
Cheers,
Carlos.
More information about the Libc-help
mailing list