This is the mail archive of the gcc@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]

Re: latest snapshot fails to build libobjc.so on Solaris


I wrote:
> > I'm getting a failure building libobjc.so on Solaris (old Solaris,
> > platform is sparc-sun-solaris2.5.1).
> > 
> > Here's the command that fails:
> > 
> > /remote/dtg103/jbuck/gnu/src/cvs/gcc-racerx/gcc/xgcc -B/remote/dtg103/jbuck/gnu/src/cvs/gcc-racerx/gcc/ -B/u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/bin/ -B/u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/lib/ -isystem /u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/include -shared -Wl,-h -Wl,libobjc.so.1 -o .libs/libobjc.so.1.0.0  .libs/archive.o .libs/class.o .libs/encoding.o .libs/gc.o .libs/hash.o .libs/init.o .libs/linking.o .libs/misc.o .libs/nil_method.o .libs/NXConstStr.o .libs/Object.o .libs/objects.o .libs/Protocol.o .libs/sarray.o .libs/selector.o .libs/sendmsg.o .libs/thr.o .libs/thr-objc.o  -lc 
> > Text relocation remains                 	referenced
> >     against symbol		    offset	in file
> > __objc_class_name_Object            0x0       	.libs/NXConstStr.o
> > __objc_class_name_Object            0x1c      	.libs/linking.o
> > __objc_class_name_Object            0x0       	.libs/Protocol.o
> > __objc_class_name_NXConstantString  0x20      	.libs/linking.o
> > ld: fatal: relocations remain against allocatable but non-writable sections

HJ writes:
> Are those .o files compiled with PIC?

Yes.  It's the traditional --enable-shared build where each .o file is
compiled twice, once with PIC in the libs subdirectory.

What they have in common is that all of these .o files are built from
Objective-C sources.  Perhaps something is wrong with PIC generation from
Objective-C?  (There is also Object.m which doesn't produce any bad symbols).

Here is an example of a command that builds libs/linking.o:

/remote/dtg103/jbuck/gnu/src/cvs/gcc-racerx/gcc/xgcc -B/remote/dtg103/jbuck/gnu/src/cvs/gcc-racerx/gcc/ -B/u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/bin/ -B/u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/lib/ -isystem /u/jbuck/gcc-cvs/sparc-sun-solaris2.5.1/include -fgnu-runtime -c -I. -I../../../gcc/libobjc -g -O2 -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS -I../../../gcc/libobjc/objc -I../../../gcc/libobjc/../gcc -I../../../gcc/libobjc/../gcc/config -I../../gcc -I../../../gcc/libobjc/../include ../../../gcc/libobjc/linking.m  -fPIC -DPIC -o .libs/linking.o








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