[PATCH] D14655: [mips] Make the .eh_frame writable on FreeBSD to work around issues in the old linker.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 09:30:13 PST 2015


> -----Original Message-----
> From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com]
> Sent: 13 November 2015 16:27
> To: reviews+D14655+public+12f2b0c21a89984b at reviews.llvm.org
> Cc: Daniel Sanders; llvm-commits; Sean Bruno; Ed Maste
> Subject: Re: [PATCH] D14655: [mips] Make the .eh_frame writable on
> FreeBSD to work around issues in the old linker.
> 
> On 13 November 2015 at 11:01, Daniel Sanders
> <daniel.sanders at imgtec.com> wrote:
> > dsanders added a comment.
> >
> > I'm told that they can't update to a newer GNU Ld because FreeBSD chose
> to reject GPLv3.
> 
> They can change the old linker or work on lld.
>
> > Their plan as it has been explained to me is to get any build working with
> clang as the system compiler, then work on making lld the default linker. I
> therefore see this as a stepping stone for getting to the correct place and
> would want to revert this patch as soon as I'm able to.
> 
> 
> >   .cfi_personality 128, DW.ref.__gxx_personality_v0
> 
> It should be using 0x9b as the rest. That way .eh_frame itself stays RO.

0x9b is rejected by the assembler on Mips Linux using a recent assembler (it objects to the 0x10 pcrel in particular). However, 0x80 does still result in a read-only .eh_frame because of the internal conversion to a PC-relative form. Personally, I think we ought to be able to specify 0x9b ourselves but I'm not too worried about this since we do get a read-only .eh_frame.

Mips FreeBSD seems to be ok with 0x9b for .cfi_personality. I'm still building but it's got past the bit it normally fails on. I'll abandon this patch and replace it with one that has a FreeBSD-specific personality and LSDA encoding.

> Cheers,
> Rafael


More information about the llvm-commits mailing list