[LLVMdev] Turning on exception handling codegen

Duncan Sands baldrick at free.fr
Fri Aug 24 22:34:53 PDT 2007


Hi Bill,

> > > I'm trying it on 4.0. On 4.2, I'm getting this problem during bootstrapping:
> > >
> > > ccAMeZbg.s:111:non-relocatable subtraction expression,
> > > "___gxx_personality_v0" minus "L0"
> > > ccAMeZbg.s:111:symbol: "___gxx_personality_v0" can't be undefined in a
> > > subtraction expression
> >
> > this is the darwin assembler that barfs, right?  It looks like it doesn't
> > like the way the personality function is output in the assembler.  If so,
> > you should see exactly the same problem with llvm-gcc-4.0 for any code
> > containing eh constructs.  I think Anton is the guy to look into this (CC'd).
> >
> Yeah, I'm seeing this in 4.0 as well. It looks as if the personality
> function isn't being output into the .s file. So we get something
> along the lines of this:
> 
> Leh_frame_common_begin1:
>         .long   0x0
>         .byte   0x1
>         .asciz  "zPLR"
>         .byte   0x1
>         .byte   0x7c
>         .byte   0x8
> 	.byte   0x7
>         .byte   0x1b
>         .long   ___gxx_personality_v0-.
>         .byte   0x10
> 	.byte   0x10
>         .byte   0xc
>         .byte   0x4
>         .byte   0x4
>         .byte   0x88
>         .byte   0x1
> 	.align  2
> Leh_frame_common_end1:
> 
> with no ___gxx_personality_v0. Have you or Anton come across this
> before? If so, is there a place I can start looking? :-)

gcc outputs the following additional line:
.globl __gxx_personality_v0
Presumably we should too but it was never noticed because the linux
assembler works fine without it.  In general, the thing to do with
this kind of problem is to compile the program using mainline gcc
(use the -dA options, it adds comments to the assembler) and compare
the assembler output with that of llvm-gcc/llc.

Ciao,

Duncan.



More information about the llvm-dev mailing list