[PATCH v6 1/2] elf: Properly align PT_LOAD segments [BZ #28676]

Florian Weimer fweimer@redhat.com
Mon Dec 13 11:17:09 GMT 2021


* Szabolcs Nagy:

> The 12/13/2021 10:51, Rongwei Wang via Libc-alpha wrote:
>> When PT_LOAD segment alignment > the page size, allocate
>> enough space to ensure that the segment can be properly
>> aligned.
>> 
>> And this change helps code segments use huge pages become
>> simple and available.
>> 
>> This fixes [BZ #28676].
>> 
>> Signed-off-by: Xu Yu <xuyu@linux.alibaba.com>
>> Signed-off-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
>
>
> since this commit nptl/tst-stack4 consistently
> fails in my 32bit arm test environment with
>
> pthread_create failed: 11
> pthread_create failed: 11
> pthread_create failed: 11
> pthread_create failed: 11
> pthread_create failed: 11
> pthread_create failed: 11
> pthread_create failed: 11
> tst-stack4: tst-stack4.c:69: dso_process: Assertion `handle[dso]' failed.
> Didn't expect signal from child: got `Aborted'
>
> i suspect it simply runs out of memory.
>
> if this change pushes memory usage of the test
> above 2G then i think either the test or the
> patch have to be changed so 32bit targets can
> still run it reliably.

What are the p_align values of the involved objects?  I would not expect
any changes on 32-bit Arm because p_align and the run-time page size
should match there.

Thanks,
Florian



More information about the Libc-alpha mailing list