[PATCH] D14700: [mips][freebsd] Explicitly select PC-relative Personality and LSDA encodings.
Rafael Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 23 16:40:26 PST 2015
> Using DW_EH_PE_indirect without DW_EH_PE_pcrel is accepted
That produces a non-pic relocation to a rw position.
> but lead to a link-time problem back when I was making read-only .eh_frame work for Android. It produced 'DT_TEXTREL in a shared library' warnings but I didn't establish the cause due to time constraints and the need to debug the linker to find the cause. I assume a particular conversion to pcrel is missing.
That is because it is non-pic
What about indirect and pcrel? That is what is actually desired:
* indirect: makes .eh_frame read only
* pcrel: makes the code PIC.
and no, that would not require a R_MIPS_PC64. On x86_64 the relocations are
R_X86_64_64 from the mutable cell to __gxx_personality_v0
R_X86_64_PC32 from .eh_frame to the cell.
So for mips the corresponding case would be
I tried the attached file with gas for 32 bit mips. Everything seems
to work as expected with CFI_DIFF_EXPR_OK removed.
With 64bit mips gas fails with just
Because it tries to create a 64 bit pcrel.
In any case. Think this is enough evidence to show that there is
something wrong at the gas and that should be fixed or at least
understood, not blindly propagated to llvm.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 405 bytes
Desc: not available
More information about the llvm-commits