This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
How can I link a program with a starting address of 0x100000000 forits text?
- From: "M. Giannakidis" <mgiann at beta-cae dot gr>
- To: binutils at sources dot redhat dot com
- Date: Fri, 11 Jun 2004 20:00:48 +0300
- Subject: How can I link a program with a starting address of 0x100000000 forits text?
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.