[PATCH] D14655: [mips] Make the .eh_frame writable on FreeBSD to work around issues in the old linker.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 07:08:13 PST 2015
Please don't. Just update the linker and use R_MIPS_PC32 in llvm.
On 13 November 2015 at 09:55, Daniel Sanders via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> dsanders created this revision.
> dsanders added subscribers: emaste, seanbruno, llvm-commits.
>
> The Mips port of FreeBSD is currently using an old linker (GNU ld 2.17.50 [FreeBSD]
> 2007-07-03) which seems to be unable to fully support read-only .eh_frame sections.
> Work around this for now by making them writeable on this target.
>
> The linker must also be patch to support R_MIPS_PC32 as discussed in PR25176.
>
> http://reviews.llvm.org/D14655
>
> Files:
> lib/MC/MCObjectFileInfo.cpp
>
> Index: lib/MC/MCObjectFileInfo.cpp
> ===================================================================
> --- lib/MC/MCObjectFileInfo.cpp
> +++ lib/MC/MCObjectFileInfo.cpp
> @@ -432,6 +432,13 @@
> if (T.isOSSolaris() && T.getArch() != Triple::x86_64)
> EHSectionFlags |= ELF::SHF_WRITE;
>
> + // The Mips port of FreeBSD currently has difficulty with read only .eh_frame
> + // due to an old linker. Work around this for now by making it writable.
> + if (T.isOSFreeBSD() &&
> + (T.getArch() == Triple::mips || T.getArch() == Triple::mipsel ||
> + T.getArch() == Triple::mips64 || T.getArch() == Triple::mips64el))
> + EHSectionFlags |= ELF::SHF_WRITE;
> +
> // ELF
> BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
> ELF::SHF_WRITE | ELF::SHF_ALLOC);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list