aboutsummaryrefslogtreecommitdiff
path: root/malloc/alloc_buffer_alloc_array.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-03-05 10:19:59 +0800
committerH.J. Lu <hjl.tools@gmail.com>2025-03-06 07:49:27 +0800
commit746ef8e93964a99db3e3fa4b8a7aba179185ef0a (patch)
tree99106fdde4ce63f5a3a31d6ecdaf1de4a3fffbd0 /malloc/alloc_buffer_alloc_array.c
parent56609f8df1fa05c3af13dbe8c84bf5ce62192cd2 (diff)
downloadglibc-746ef8e93964a99db3e3fa4b8a7aba179185ef0a.tar.xz
glibc-746ef8e93964a99db3e3fa4b8a7aba179185ef0a.zip
static-pie: Skip the empty PT_LOAD segment at offset 0 [BZ #32763]
As shown in https://sourceware.org/bugzilla/show_bug.cgi?id=25237 linker may generate an empty PT_LOAD segments at offset 0: Elf file type is EXEC (Executable file) Entry point 0x4000e8 There are 3 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x00000000000000f0 0x00000000000000f0 R E 0x1000 LOAD 0x0000000000000000 0x0000000000410000 0x0000000000410000 0x0000000000000000 0x0000000000b5dce8 RW 0x10000 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x10 Section to Segment mapping: Segment Sections... 00 .text 01 .bss 02 Skip the empty PT_LOAD segment at offset 0 to support such binaries. This fixes BZ #32763. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org> (cherry picked from commit 596130591ae4b058a529cc1318b95e624559054c)
Diffstat (limited to 'malloc/alloc_buffer_alloc_array.c')
0 files changed, 0 insertions, 0 deletions