Can local symbols be used to define basic block boundary
Ian Lance Taylor
iant@google.com
Thu Jun 9 13:20:00 GMT 2011
陳韋任 <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
More information about the Binutils
mailing list