This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Symbol weirdness on SCO OSR5
> > error when trying to create the dynamic version of libXaw.so:
> > fatal error: relocations remain against allocatable but non-writable
> > section: .text
I haven't seen this specific problem, so I didn't comment at first. I
have a feeling this is one of these things that I probably won't be able
to figure out, but I can at least play eyes and fingers for someone that
does understand the specs/multilibbing stuff.
Oh. It's worth disclaiming that Kean and I are likely both using
the multilib patches (I know I am) he submitted a week or two ago
instead of what's actually in the tree becuase it fixes so many
problems for us. So if you look at *sco5* and don't see multilibbing
stuff, that's why.
> Did it complain about any particular symbols? If so, are those symbols
> stuff normally found in libgcc.a? That would indicate a missing -fpic/-fPIC
> when building libgcc.
Jeff might be onto something here. When building the stuff that lands
in libgcc2.a (that would be the ELF one), the compile looks something like:
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3
_ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf
_fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fix
unsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varar
gs __dummy _eprintf _op_new _op_vnew _new_handler _op_delete _op_vdel _bb _shtab
_clear_cache _trampoline __main _exit _ctors _eh _pure; \
do \
echo ${name}; \
./xgcc -B./ -O2 -DIN_GCC -g -I./include -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_
NOT_NEEDED -I. -I../../egcs-970901/gcc -I../../egcs-970901/gcc/config -c -DL${n
ame} \
../../egcs-970901/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
Note the absence of -fPIC. It's also not present when (e.g.) tinfo.cc and
friends are built for ELF.
The COFF build (-mcoff) comes along and doesn't use -fPIC either, of course.
Interestingly, if I remove stmp-crtS and crt*.o, and force a rebuild of
those files, it does use -PIC to build crtbegin.o and crtend.o (ELF) but
not crtendS.o and crtbeginS.o (COFF) which does seem to mirror what I think
Jeff says is desirable.
So, if you really think this is likely the problem, how do we get
the multilibbed code to build the ELF version of libgcc.a with
-fPIC and not pass this to the COFF version?
Thanx,
RJL