Is it possible to make the whole image above 4G on a 64 bit machine?
陳韋任 (Wei-Ren Chen)
chenwj@iis.sinica.edu.tw
Thu Aug 30 12:43:00 GMT 2012
More information about the Binutils mailing list
Thu Aug 30 12:43:00 GMT 2012
- Previous message (by thread): Is it possible to make the whole image above 4G on a 64 bit machine?
- Next message (by thread): [GOLD] Another Output_reloc function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Aug 29, 2012 at 08:37:13PM -0700, H.J. Lu wrote: > On Wed, Aug 29, 2012 at 7:18 PM, 陳韋任 (Wei-Ren Chen) > <chenwj@iis.sinica.edu.tw> wrote: > > Hi H.J., > > > >> > If it's possible to make the whole image above 4G, how I can do that? > >> > If not, could you explain why? Thanks. > >> > > >> > >> You must use PIE to place an executable above 4G. > > > > Thanks for your tip, it works! I did following, > > > > $ gcc -Wl,-Ttext-segment=0x80000000 -fPIE -pie test.c -o test > > > > But why the linker gave me those errors? Although I know pie makes program > > position independent, so that it can be loaded at any address space, I don't > > know why linker complains, does it find something wrong while linking against > > those libraries (I see the errors, but don't understanding it...)? Would > > you like to shed some light on it? Thanks. :-) > > > > This is the limitation of the small model. The large model should work > if you have all libraries compiled for the large model. I guess you mean "-mcmodel" option in GCC, right? So when I compile a program without options "-fPIE" and "-pie", the libraries it link against are compiled with "-mcmodel=small", and they are only allow to reside in memory below 2G space. That's why I saw those errors, am I right? Thanks. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
- Previous message (by thread): Is it possible to make the whole image above 4G on a 64 bit machine?
- Next message (by thread): [GOLD] Another Output_reloc function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list