Thanks Rob for the answer ! 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.
Thanks, Rajesh -----Original Message----- From: Robert W. Fuller [mailto:[EMAIL PROTECTED] Sent: Thursday, February 22, 2007 5:59 PM To: Rajesh Paul Cc: [email protected] Subject: Re: [osol-code] What code construct would create a "Relative relocation record 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
