linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Local Symbol Names
@ 2003-06-25  8:23 S kris
  2003-06-25 16:09 ` Slack Traq
  2003-06-25 18:50 ` Jack Dennon
  0 siblings, 2 replies; 6+ messages in thread
From: S kris @ 2003-06-25  8:23 UTC (permalink / raw)
  To: linux-assembly; +Cc: kernelnewbies

Hi,

In some of the assembly files, it's noticed that Local Symbol Names have 
been used that in the following way,

     ................
     call 0f
0: popl %eax
    ................
The call is referring to immediately next statement. Please help me in 
finding out the significance of the above lines in the assembly code.

Thanks

Kris

_________________________________________________________________
Bollywood's back! Will June keep up the tempo? 
http://server1.msn.co.in/features/junemovies03/index.asp


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

* Re: Local Symbol Names
  2003-06-25  8:23 Local Symbol Names S kris
@ 2003-06-25 16:09 ` Slack Traq
  2003-06-25 18:06   ` hpr
  2003-06-25 18:50 ` Jack Dennon
  1 sibling, 1 reply; 6+ messages in thread
From: Slack Traq @ 2003-06-25 16:09 UTC (permalink / raw)
  To: linux-assembly


--- S kris <kris_bs@hotmail.com> wrote:
> Hi,
> 
> In some of the assembly files, it's noticed that
> Local Symbol Names have 
> been used that in the following way,
> 
>      ................
>      call 0f
> 0: popl %eax
>     ................
> The call is referring to immediately next statement.
> Please help me in 
> finding out the significance of the above lines in
> the assembly code.
> 
> Thanks
> 
> Kris

Kris: the 'f' after the 'O' in the call statement is
really unnecessary because the label begins in the
next statement. Maybe is a call to a "far" function or
label, but is quite obvious that 'O' is not such
label.
I hope this will help you.
Regards,
                                          Slack

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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

* Re: Local Symbol Names
  2003-06-25 16:09 ` Slack Traq
@ 2003-06-25 18:06   ` hpr
  0 siblings, 0 replies; 6+ messages in thread
From: hpr @ 2003-06-25 18:06 UTC (permalink / raw)
  To: Slack Traq, linux-assembly

Slack Traq am Mittwoch, 25. Juni 2003 17:09:
> --- S kris <kris_bs@hotmail.com> wrote:
> > Hi,
> >
> > In some of the assembly files, it's noticed that
> > Local Symbol Names have
> > been used that in the following way,
> >
> >      ................
> >      call 0f
> > 0: popl %eax
> >     ................
> > The call is referring to immediately next statement.
> > Please help me in
> > finding out the significance of the above lines in
> > the assembly code.
> >
> > Thanks
> >
> > Kris
>
> Kris: the 'f' after the 'O' in the call statement is
> really unnecessary because the label begins in the
> next statement. Maybe is a call to a "far" function or
> label, but is quite obvious that 'O' is not such

nonsense! (assumed the code is from binutils' AS)

numeric labels can be redefined.
they are directionally referred, "f"orward  or "b"ackword

the example fetches the address at label '0' to eax, which can be used to 
supporting position independent code.

best,
	hp


> label.
> I hope this will help you.
> Regards,
>                                           Slack
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-assembly"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
  pse, reply to << lxhp -at- lxhp -dot- in-berlin -dot- de >>


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

* Re: Local Symbol Names
  2003-06-25  8:23 Local Symbol Names S kris
  2003-06-25 16:09 ` Slack Traq
@ 2003-06-25 18:50 ` Jack Dennon
  2003-06-25 19:44   ` Brian Raiter
  1 sibling, 1 reply; 6+ messages in thread
From: Jack Dennon @ 2003-06-25 18:50 UTC (permalink / raw)
  To: linux-assembly

On Wednesday 25 June 2003 01:23, S kris wrote:
> Hi,
>
> In some of the assembly files, it's noticed that Local Symbol Names have
> been used that in the following way,
>
>      ................
>      call 0f
> 0: popl %eax
>     ................
> The call is referring to immediately next statement. Please help me in
> finding out the significance of the above lines in the assembly code.
>
> Thanks
>
> Kris
>
	The call instruction probably was used to empty the
	the Execution Unit's instruction cache; thereby
	forcing it to be reloaded from memory. Or, it could
	be used just to force a time delay.
	jdennon@seasurf.com

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

* Re: Local Symbol Names
  2003-06-25 18:50 ` Jack Dennon
@ 2003-06-25 19:44   ` Brian Raiter
  2003-06-26  0:14     ` Jack Dennon
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Raiter @ 2003-06-25 19:44 UTC (permalink / raw)
  To: linux-assembly

>	The call instruction probably was used to empty the
>	the Execution Unit's instruction cache; thereby
>	forcing it to be reloaded from memory. Or, it could
>	be used just to force a time delay.

The pop %eax instruction, however, makes it clear that the purpose of
the code is to get the current PC address into eax. As hpr suggested,
almost certainly for use in writing position-independent code.

b

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

* Re: Local Symbol Names
  2003-06-25 19:44   ` Brian Raiter
@ 2003-06-26  0:14     ` Jack Dennon
  0 siblings, 0 replies; 6+ messages in thread
From: Jack Dennon @ 2003-06-26  0:14 UTC (permalink / raw)
  To: linux-assembly

On Wednesday 25 June 2003 12:44, Brian Raiter wrote:
> >	The call instruction probably was used to empty the
> >	the Execution Unit's instruction cache; thereby
> >	forcing it to be reloaded from memory. Or, it could
> >	be used just to force a time delay.
>
> The pop %eax instruction, however, makes it clear that the purpose of
> the code is to get the current PC address into eax. As hpr suggested,
> almost certainly for use in writing position-independent code.
>
	Hmm, yes you have a point.
	But then, why not just push and pop?
	jdennon@seasurf.com


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

end of thread, other threads:[~2003-06-26  0:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25  8:23 Local Symbol Names S kris
2003-06-25 16:09 ` Slack Traq
2003-06-25 18:06   ` hpr
2003-06-25 18:50 ` Jack Dennon
2003-06-25 19:44   ` Brian Raiter
2003-06-26  0:14     ` Jack Dennon

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 NNTP newsgroup(s).