[Bug target/59888] Darwin linker error "illegal text-relocation" with -shared

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 4 13:34:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59888

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> ---
Let's work on the principle that the linker is DTRT (it seems reasonable, at
least).

---

So, I started to try and replicate what the failing case was doing with a "c"
equivalent.

My investigations are not complete (and the usual limited time problem applies)
- but so far, it seems - in the c case - that the static variable gets placed
in .data (which is fine, from ld64's pov).

As of now, I suspect that the placement into the .const section *might* be
fallout from the "restrict" markup.

.. hmm, it's quite hard to point to a useful avenue of exploration (other that
confirming that the reference is being lowered as expected, and that the
restrict markup is correctly applied).

.. when i have a few more cycles, I'll try and improve my c case to match the
fortran more closely.



More information about the Gcc-bugs mailing list