This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Section placement into C constants
- From: "Luke Trowbridge" <ltrowbridge at electrodata dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 14 Jul 2010 11:54:57 -0400
- Subject: Section placement into C constants
I would like to get a reference to the start of the GOT in my code. My
attempt:
extern void __got_start__;
void * const pGot = (void * const)&__got_start__;
However, pGot is assigned zero (not the start of the GOT) even though the
linker map file shows that __got_start__ is assigned the correct value.
If this is even possible, what is the best way to accomplish this outside of
an executable statement?
Thanks,
Luke