Robert W. Fuller wrote: > Rajesh Paul wrote: > >> Yes, precisely the linker would be generating R_XXX_RELATIVE relocations. >> But I am not able to simulate a linking process which >> generates the relative relocation entries in its execuatbles/shared objects. >> > > Admittedly I haven't looked at this for a while, HOWEVER, > I seem to recall that I used to build file system drivers for Solaris > using the -r flag for ld which would cause the link editor to generate > relocatable code. Gcc also seems to accept -r. > _______________________________________________ > opensolaris-code mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/opensolaris-code >
You need to compile your code so that it is PIC as well. -KPIC, -Kpic, -pic, or some other variation is the normal way, depending on your compiler. -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191 _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
