[PATCH] ldso: use _dl_pagesize for library-loading addresses and offsets
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Nov 26 09:40:05 UTC 2008
On Wed, Nov 26, 2008 at 10:35:07AM +1100, Jeremy Kerr wrote:
>Hi Bernhard,
>
>> >- maxvma = (maxvma + ADDR_ALIGN) & ~ADDR_ALIGN;
>> >+ addr_align = _dl_pagesize - 1;
>> >+ page_align = ~addr_align;
>> >+ offs_align = page_align & ~(1 << 31);
>>
>> This would brake _MIPS_SIM_ABI64, wouldn't it.
>
>Ah, yep. I was making invalid assumptions about the sign bit.
>
>> >+
>> >+ maxvma = (maxvma + addr_align) & ~addr_align;
>>
>> This should perhaps read
>> maxvma = (maxvma + ADDR_ALIGN) & PAGE_ALIGN;
>> for consistency.
>
>Ok, will do that as a separate change.
Perhaps you could cleanup dl-elf.c ('~(_dl_pagesize - 1)') and
ldso.c ('_dl_pagesize - 1') while you're at it, please?
More information about the uClibc
mailing list