This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS-19990314, undefined local symbol with a __label__
- To: Dave Gilbert <gilbertd at treblig dot org>
- Subject: Re: EGCS-19990314, undefined local symbol with a __label__
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 22 Mar 1999 11:00:32 +0000
- Cc: egcs-bugs at egcs dot cygnus dot com, philb at gnu dot org, rmk at arm dot uk dot linux dot org
- Cc: richard dot earnshaw at arm dot com, rth at cygnus dot com
- Organization: ARM Ltd.
- Reply-To: richard dot earnshaw at arm dot com
Hi Dave,
Thanks for the bug report. I've also reproduced it on the arm-aout port.
A quick look shows that the label gets lost somewhere between the end of
the global register allocation pass and the end of the sched2 pass. I
guess this means the flow graph is incomplete in some respect (my guess is
that it doesn't follow the label reference use via the constant pool).
Richard, do you have any input on this one?
Richard.
> Hi,
> The following code:
>
> void skb_under_panic(void *here);
>
> void skb_push(void)
> {
> __label__ here;
> skb_under_panic(&&here);
> here: ;
> }
>
> (from the innards of the Linux kernel)
>
> when compiled with:
> GNU C version egcs-2.93.12 19990314 (gcc2 ss-980929 experimental)
> (arm-penguin-linux-gnuelf)
>
> produces the following .s file which has a local symbol which is not
> defined:
>
> @ Generated by gcc egcs-2.93.12 19990314 (gcc2 ss-980929 experimental) for
> ARM/elf
> .file "play.i"
> .gcc2_compiled.:
> .text
> .align 0
> .global skb_push
> .type skb_push,function
> skb_push:
> @ args = 0, pretend = 0, frame = 8
> @ frame_needed = 1, current_function_anonymous_args = 0
> mov ip, sp
> stmfd sp!, {fp, ip, lr, pc}
> sub fp, ip, #4
> ldr r0, .L5
> sub sp, sp, #8
> bl skb_under_panic
> b .L4
> .L6:
> .align 0
> .L5:
> .word .L3
> .L4:
> ldmea fp, {fp, sp, pc}
> .Lfe1:
> .size skb_push,.Lfe1-skb_push
> .ident "GCC: (GNU) egcs-2.93.12 19990314 (gcc2 ss-980929
> experimental)"
>
>
> (Note .L3)
>
> Dave
>
> --------------------------------------------------------------------
> / Dr. David Alan Gilbert | Running Linux on | Happy \
> \ gro.gilbert @ treblig.org | Alpha, ARM and SPARC | In Hex /
> \____________________________|___ http://www.treblig.demon.co.uk __/
>