This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
dbxout FORCE_TEXT and function sections
- To: gcc at gcc dot gnu dot org
- Subject: dbxout FORCE_TEXT and function sections
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Wed, 06 Sep 2000 15:02:45 -0400
AIX uses stab strings for debugging which means that it uses GCC's
dbxout functionality. I have taught GCC how to generate AIX function
sections (CSECTs) which works fine when not debugging. AIX needs the
debug symbols in the text section and dbxout.c implements this through
#define FORCE_TEXT text_section ();
With function sections, FORCE_TEXT needs to switch back to the
appropriate named section. I tried changing FORCE_TEXT to
#define FORCE_TEXT function_section (current_function_decl);
but function_section() requires a decl to provide the section name.
Apparently current_function_decl is not accurate in all cases because
funtion_section sometime is returning to the default text section instead
of the named function section (e.g., after emitting local static data).
Any suggestions on an appropriate decl or some other way to
implement named sections in dbxout.c?
Thanks, David