This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: EGCS-19990314, undefined local symbol with a __label__


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 __/
> 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]