public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dbxout FORCE_TEXT and function sections
@ 2000-09-06 12:02 David Edelsohn
  2000-09-06 18:27 ` Jeffrey A Law
  0 siblings, 1 reply; 2+ messages in thread
From: David Edelsohn @ 2000-09-06 12:02 UTC (permalink / raw)
  To: gcc

	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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: dbxout FORCE_TEXT and function sections
  2000-09-06 12:02 dbxout FORCE_TEXT and function sections David Edelsohn
@ 2000-09-06 18:27 ` Jeffrey A Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 2000-09-06 18:27 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

  In message < 200009061902.PAA26142@mal-ach.watson.ibm.com >you write:
  > 	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 ();
Tee hee hee.

I went down this road in 1995 or 1996.

  > 	With function sections, FORCE_TEXT needs to switch back to the
  > appropriate named section.
Yup.  I think I just bludgeoned the source to work around this problem
to see if there were any more gotchas waiting.....  Sure enough there were.

For reasons I never fathomed the stabs definitions for the compilation
unit as a whole kept disappearing at link stage.  We never managed to
figure out why and gave up.

If this is important to you I can try to dig through my email archives to
see if there's any useful nuggets lying around...

jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-09-06 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-06 12:02 dbxout FORCE_TEXT and function sections David Edelsohn
2000-09-06 18:27 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).