From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Edelsohn To: gcc@gcc.gnu.org Subject: dbxout FORCE_TEXT and function sections Date: Wed, 06 Sep 2000 12:02:00 -0000 Message-id: <200009061902.PAA26142@mal-ach.watson.ibm.com> X-SW-Source: 2000-09/msg00116.html 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