dbxout FORCE_TEXT and function sections

David Edelsohn dje@watson.ibm.com
Wed Sep 6 12:02:00 GMT 2000


	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


More information about the Gcc mailing list