This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
address of labels in the symbol table
- From: Andreas Wortmann <andreas dot wortmann at ohb-system dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 30 Nov 2011 11:31:33 +0100 (CET)
- Subject: address of labels in the symbol table
Hi,
I'm using gcc 4.2.1 for the SPARC V8 architecture and I want to access the address of labels placed in the c code from the symbol table.
This is working fine if I do not optimize (-O0) or optimize with -O1.
But when optimizing with -O2 or -Os the unused labels (event though they are still listed in the symbol table) have a wrong address.
What is happening here ?
Thanks,
Andreas