[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 08:01:16 PST 2015
dsanders added a comment.
I'm told that they can't update to a newer GNU Ld because FreeBSD chose to reject GPLv3. 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.
> ... and use R_MIPS_PC32 in llvm.
Thanks to the linker patch mentioned in PR25176, we are using R_MIPS_PC32 everywhere that Mips Linux targets use them. Unfortunately, this doesn't quite result in a working link. The remaining problem is that this:
.cfi_personality 128, DW.ref.__gxx_personality_v0
emits a R_MIPS_64 reference in .eh_frame. This is the same as what we emit for Linux and modern linkers accept it (and convert to a PC relative form) but this linker doesn't.
I was going to say that I can't change the encoding to 0x9B (indirect, pcrel, sdata4) but when I double checked this it surprised me by working. It resulted in a crash last time I tried this so maybe the linker patch fixed that as well. A FreeBSD-specific personality encoding is much better than this patch so I'll test a bit more and report back.
http://reviews.llvm.org/D14655
More information about the llvm-commits
mailing list