Re: [PATCH 3/8] add mem64_min/max control

Eric W. Biederman
2012-11-18T05:21:04Z

Yinghai Lu <yinghai@kernel.org> writes:

> On Sat, Nov 17, 2012 at 8:47 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
>> "H. Peter Anvin" <hpa@zytor.com> writes:
>>
>>
>> 64bit purgatory coming from kexec should be running with a page table
>> that identity maps everything loaded by kexec and in practice all of
>> memory.
>
> there is lots of R_X86_64_32 and R_X86_64_32S for 64bit purgatory.
>
> those come from global variables...could kill some by converting them static...
>
> but still have some global string or ro data....
>
> build one big file include all .S ?

For R_x86_64_32 and R_x86_64_32S the problem is that the instructions
are using absolute 32bit addresses.

It is probably overkill but we should be able to solve this with
by adding "-mcmodel=large" to the build of purgatory.

Hopefully there are not 32bit or 16bit assembly routines getting linked
in and using problemenatic instructions.

Eric