How can I link a program with a starting address of 0x100000000 for its text?

M. Giannakidis mgiann@beta-cae.gr
Fri Jun 11 16:16:00 GMT 2004


Hello.

By compiling an application on a SunOS 5.8 platform, I came accross an
intresting feature: ( description taken from sun.com documentation)

"By default 64-bit SPARC programs are linked with a starting address of 
0x100000000. The whole program is above 4 gigabytes, including its text, 
data, heap, stack, and shared object dependencies. This helps ensure 
that 64-bit programs are correct by making it so the program will fault 
in the least significant 4 gigabytes of its address space if it 
truncates any of its pointers. While 64-bit programs are linked above 4 
gigabytes, it is still possible to link them below 4 gigabytes by using 
a mapfile and the *-M* option to the compiler or link-editor (see 
/usr/lib/ld/sparcv9/map.below4G). "


You can realize that this is vary helpful when porting an apllication to 
64bit.

Is there a way to achieve the same behavior on an x86_64 Linux AMD 
platform for an ELF application that uses shared libraries?


Thank you very much in advance.

PS. As I'm not suscribed in the mailing list, please  along with your 
reply to the list, reply to me as well.




More information about the Binutils mailing list