public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Dwarf in assembler file
@ 2006-11-30 16:10 Fabian Cenedese
  2006-11-30 17:12 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Cenedese @ 2006-11-30 16:10 UTC (permalink / raw)
  To: gcc-help

Hi

I use a gcc 4.1.0 on cygwin, cross compiled for ppc -> generates elf.
I use the -S to see what assembler code got generated and for this
I need the line info (.loc). I have a simple file when compiled gives
more than one symbol for constructor or destructor. The output is
like this:

	.globl _ZN17_TASK_CLASS_NAME_D0Ev
	.type	_ZN17_TASK_CLASS_NAME_D0Ev, @function
_ZN17_TASK_CLASS_NAME_D0Ev:
.LFB601:
	.loc 3 120 0
	stwu 1,-24(1)	 #,,
...(snip) ...
	blr	 #
.LFE601:
	.size	_ZN17_TASK_CLASS_NAME_D0Ev, .-_ZN17_TASK_CLASS_NAME_D0Ev
	.align 2
	.globl _ZN17_TASK_CLASS_NAME_D1Ev
	.type	_ZN17_TASK_CLASS_NAME_D1Ev, @function
_ZN17_TASK_CLASS_NAME_D1Ev:
.LFB600:
	.loc 3 120 0
	stwu 1,-24(1)	 #,,
...(snip) ...
	blr	 #
.LFE600:
	.size	_ZN17_TASK_CLASS_NAME_D1Ev, .-_ZN17_TASK_CLASS_NAME_D1Ev
	.align 2
	.globl _ZN17_TASK_CLASS_NAME_D2Ev
	.type	_ZN17_TASK_CLASS_NAME_D2Ev, @function
_ZN17_TASK_CLASS_NAME_D2Ev:
.LFB599:
	.loc 3 120 0
	stwu 1,-24(1)	 #,,
...(snip) ...
	blr	 #
.LFE599:
	.size	_ZN17_TASK_CLASS_NAME_D2Ev, .-_ZN17_TASK_CLASS_NAME_D2Ev

Why are there three symbols _ZN17_TASK_CLASS_NAME_D{0,1,2}Ev? They're all
placed on the same source line .loc 3 120 0, contain exactly the same code. So what
is the meaning/difference between these three? I also get two symbols for the constructor,
also only differing in the last number.

How does the assembler know that it shouldn't do three times the same code but that
this is three times the same?

Thanks

bye   Fabi


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

end of thread, other threads:[~2006-12-01  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 16:10 Dwarf in assembler file Fabian Cenedese
2006-11-30 17:12 ` Ian Lance Taylor
2006-12-01  7:30   ` Fabian Cenedese

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).