diff options
author | Rongwei Wang <rongwei.wang@linux.alibaba.com> | 2021-12-10 20:39:10 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-12-10 11:25:37 -0800 |
commit | 718fdd87b1b98ef88e883a37d9c18867256fa5a4 (patch) | |
tree | a6448e52abdd289a43acd8a0d77efc645a0668f7 /elf/dl-load.h | |
parent | 2e75604f8337fa4332977f72a8f6726309679edf (diff) | |
download | glibc-718fdd87b1b98ef88e883a37d9c18867256fa5a4.tar glibc-718fdd87b1b98ef88e883a37d9c18867256fa5a4.tar.gz glibc-718fdd87b1b98ef88e883a37d9c18867256fa5a4.tar.bz2 glibc-718fdd87b1b98ef88e883a37d9c18867256fa5a4.zip |
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>
Diffstat (limited to 'elf/dl-load.h')
-rw-r--r-- | elf/dl-load.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-load.h b/elf/dl-load.h index e329d49a81..e6dabcb336 100644 --- a/elf/dl-load.h +++ b/elf/dl-load.h @@ -1,5 +1,6 @@ /* Map in a shared object's segments from the file. Copyright (C) 1995-2021 Free Software Foundation, Inc. + Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -74,7 +75,7 @@ ELF_PREFERRED_ADDRESS_DATA; Its details have been expanded out and converted. */ struct loadcmd { - ElfW(Addr) mapstart, mapend, dataend, allocend; + ElfW(Addr) mapstart, mapend, dataend, allocend, mapalign; ElfW(Off) mapoff; int prot; /* PROT_* bits. */ }; |