elf: Properly align PT_LOAD segments [BZ #28676]
authorRongwei Wang <rongwei.wang@linux.alibaba.com>
Fri, 10 Dec 2021 12:39:10 +0000 (20:39 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Dec 2021 19:25:37 +0000 (11:25 -0800)
commit718fdd87b1b98ef88e883a37d9c18867256fa5a4
treea6448e52abdd289a43acd8a0d77efc645a0668f7
parent2e75604f8337fa4332977f72a8f6726309679edf
elf: Properly align PT_LOAD segments [BZ #28676]

When PT_LOAD segment alignment > the page size, allocate enough space to
ensure that the segment can be properly aligned.  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>
elf/dl-load.c
elf/dl-load.h
elf/dl-map-segments.h