Rajesh Paul wrote: > Hi, > > I was trying to put in some code in a file . Make it a shared object (.so) > with PIC and am trying to generate some Relative Relocations > (R_XXX_RELATIVE) type. For verifying the same, I take the Elf Dump of the > generated object (.so) file using 'elfdump'. > > Can any one please suggest me a C code construct or a means which would > make/force the compiler/linker to generate some Relative Relocations for any > data/function objects defined in my source file.
This is a feature of the link editor, not the compiler. You cannot instruct the compiler to generate position independent code with a C language construct! I will say no more on this subject because my time for teaching people about the C programming language and compiler chain is rather limited. Regards, Rob _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
