This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is it possible to make the whole image above 4G on a 64 bit machine?


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.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]