public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Can local symbols be used to define basic block boundary
@ 2011-06-09  5:24 陳韋任
  2011-06-09 13:20 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: 陳韋任 @ 2011-06-09  5:24 UTC (permalink / raw)
  To: binutils

Hi, all

  gas has an option "--keep-locals" which asks gas keep local symbols.
I have read the online manual belows, but still not sure what local
symbols are for.
  http://sourceware.org/binutils/docs-2.21/as/Symbol-Names.html

  Can local symbols be be used to define basic block boundary?

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

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

* Re: Can local symbols be used to define basic block boundary
  2011-06-09  5:24 Can local symbols be used to define basic block boundary 陳韋任
@ 2011-06-09 13:20 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-06-09 13:20 UTC (permalink / raw)
  To: 陳韋任; +Cc: binutils

陳韋任 <chenwj@iis.sinica.edu.tw> writes:

>   gas has an option "--keep-locals" which asks gas keep local symbols.
> I have read the online manual belows, but still not sure what local
> symbols are for.
>   http://sourceware.org/binutils/docs-2.21/as/Symbol-Names.html

Basically, local symbols are symbols used at assembly time but not at
link time.  For gcc generated code, they are generally used as branch
targets, to give the address of string constants or other constant
values stored in static memory, or to mark areas of the code for
debugging and exception information.  On most targets these days local
symbols start with ".L".

>   Can local symbols be be used to define basic block boundary?

Can they be used in that way?  Sure.  Does gcc use them in that way?  I
suppose so, approximately, in that most basic blocks do start with a
label and gcc will normally use a local label for that.  But if you are
looking at the assembly code, you won't necessarily know which local
labels indicate the start of a block and which indicate something else.

Ian

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

end of thread, other threads:[~2011-06-09 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09  5:24 Can local symbols be used to define basic block boundary 陳韋任
2011-06-09 13:20 ` Ian Lance Taylor

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