------- Additional Comments From cgray at cse dot unsw dot edu dot au 2006-06-22 06:59 ------- I'm confused. You don't believe that ld doing these relocations creates a fixed fixed address relationship between segments? Or you don't believe that this is what the IA64 ABI is saying you can't do?
If I compile some simple code, say, printf( "string" ); ld applies relocations to get: addl r14=-99976,r1 ;; ... ld8 r32=[r14] However, the -99976 is *much* bigger than the size of the read/write data section the gp is in, as shown here: (leading zeros removed for formatting) LOAD off 0x0005cb50 vaddr 0x0006cb50 paddr 0x00006cb50 align 2**16 filesz 0x00002428 memsz 0x000049d0 flags rw- So the relocated code assumes a fixed address relationship between sections. If I load the read-only data at a modified offset, things crash. You claim "offset from GP is fixed in executable or shared library", however this is only true at linktime for read/write data. Only the dynamic linker can extend this to read-only data. The ABI says so. This only seems to work for the current VM system in the current version of Linux. I'd like to supply you with a small test case, however that would require also supplying you with a whole new VM system, or in my case, OS. I think it's very clear from the emitted code that ld does *not* obey what is specified in the ABI, so I don't think sample code is really that necessary. Any code which uses static read-only data can be used for testing. If ld is fine with being by default non-ABI compliant, is it not possible to have command line flags to disable these relocations? Alternatively, do they already exist and are just undocumented? Thanks, Chuck -- http://sourceware.org/bugzilla/show_bug.cgi?id=2809 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils