This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/59888] Darwin linker error "illegal text-relocation" with -shared
- From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 04 Oct 2014 20:28:31 +0000
- Subject: [Bug target/59888] Darwin linker error "illegal text-relocation" with -shared
- Auto-submitted: auto-generated
- References: <bug-59888-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59888
--- Comment #8 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #7)
> As of now, I suspect that the placement into the .const section *might* be
> fallout from the "restrict" markup.
To confirm whether it was linked to restrict, I patched the compiler to simply
not add the restrict qualifier for f (and later checked that it worked by
looking at the tree dumps):
Index: trans-types.c
===================================================================
--- trans-types.c (revision 215645)
+++ trans-types.c (working copy)
@@ -2206,7 +2206,7 @@ gfc_sym_type (gfc_symbol * sym)
else
{
type = build_reference_type (type);
- if (restricted)
+ if (0 && restricted)
type = build_qualified_type (type, TYPE_QUAL_RESTRICT);
}
}
However, removing the restrict qualifier doesn't remove the linker error at
all. So, I think restrict might be a red herring.