https://sourceware.org/bugzilla/show_bug.cgi?id=16821
--- Comment #4 from Nick Clifton <nickc at redhat dot com> --- Hi Corinna, > Well, I'm wondering if ld couldn't utilize the fact that executables > are never bigger than 2 Gigs. I'm not entirely sure, but afaik the > relocation information is signed. Couldn't __image_base__ be defined > with a negative offset relative to the first section? Well, at the moment, __image_base__ is not a relocated value. It is an absolute symbol. I suppose that it might be possible to use a base relocation to adjust the value at run-time although that seems like a horrible hack too. I did try another version of my original patch which created a new section at ImageBase. That way all absolute values could be converted to section-relative values based upon this section. Unfortunately that does not work because section addresses are stored in the PE header as offsets from ImageBase, but an offset of 0 is special. It means that the section address is exacly 0, not ImageBase+0. You cannot put this new section before ImageBase as the section addresses are all stored as positive offsets from ImageBase. Plus if you put the new section above ImageBase then you have no way of converting symbols whose value is exacly ImageBase. (eg __image_base__). *sigh* Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils