This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: LOCAL_LABEL_PREFIX and dbxelf.h
- To: Franz dot Sirl-kernel at lauterbach dot com
- Subject: Re: LOCAL_LABEL_PREFIX and dbxelf.h
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Fri, 4 Feb 2000 12:33:12 -0800
- CC: gcc-patches at gcc dot gnu dot org
- References: <4.2.2.20000204170123.049db8a0@mail.lauterbach.com>
> Date: Fri, 04 Feb 2000 17:12:12 +0100
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Cc: gcc-patches@gcc.gnu.org
>
> At 08:00 04.02.00 , Geoff Keating wrote:
>
> >It seems that dbxelf.h wants LOCAL_LABEL_PREFIX to be defined, and
> >defaults it to _empty_ if it is not.
> >
> >The symptom of this is that you can't declare anything named 'Letext'.
> >
> >Anyway, this fixes it.
> >
> >--
> >- Geoffrey Keating <geoffk@cygnus.com>
> >
> >===File ~geoffkc/patches/rs6000-dwarfeh-1-llp.patch=========
> >2000-02-01 Geoff Keating <geoffk@cygnus.com>
> >
> > * sysv4.h (LOCAL_LABEL_PREFIX): Define, for the use of dbxelf.h.
>
> AFAI can see this is in no way related to dbxelf.h. It's used in final.c
> and I can see a definition in svr3.h with a differing comment:
>
> /* We want local labels to start with period if made with asm_fprintf. */
> #undef LOCAL_LABEL_PREFIX
> #define LOCAL_LABEL_PREFIX "."
>
> So what are you trying to fix here?
final uses it to implement the %L asm_fprintf macro. The only use of
this by the ppc backend is caused by this line in config/dbxelf.h:
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
asm_fprintf (FILE, \
"\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO)
and the macro defaults to the empty string, so this comes out as
.text
.stabs "",%d,0,0,Letext
Letext:
which means that if you have a function or variable named 'Letext',
you'll get an assembler error.
--
- Geoffrey Keating <geoffk@cygnus.com>