This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]