x86_64 ld strange behaviour.

Markus Duft mduft@gentoo.org
Fri Nov 26 14:36:00 GMT 2010


On 11/26/2010 02:37 PM, Alan Modra wrote:
> On Fri, Nov 26, 2010 at 11:10:59AM +0100, Markus Duft wrote:
>> i did not have any such problem with the i386 linker.
> 
> You do, actually.  The difference is that the i386 max page size is a
> lot smaller (0x1000 vs. 0x200000), so you didn't notice it..
> 
> The information you seem to be missing is that for many targets, by
> default GNU ld produces executables suitable for demand paging.  This
> puts constraints on file layout.  For the simple case where disk page
> size is equal to virtual memory page size, if you don't have file
> offset modulo page size equal to vm address modulo page size, then
> pages off disk can't be read directly into process memory.
> 

ah, i see... can i somehow disable this behaviour? otherwise, i think i can live with my kernel beeing loaded at 2MB instead of 1MB... i just wondered :)

Markus



More information about the Binutils mailing list