From 0d287f98e3dcb356ad7652af8664da6c4c999936 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Wed, 21 Jan 2009 20:00:58 +0000 Subject: [PATCH] Fix padding of libc.so --- elf_i386.xs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/elf_i386.xs b/elf_i386.xs index 624da4781d..4e000e9f74 100644 --- a/elf_i386.xs +++ b/elf_i386.xs @@ -33,15 +33,16 @@ SECTIONS KEEP (*(.text.*personality*)) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - } =0x90909090 - .fini : SUBALIGN(32) - { + /* Putting .fini here makes the align pad correctly when .fini is empty. + Listing the __libc* sections is also necessary to make padding work. */ KEEP (*(.fini)) + *(__libc_freeres_fn) + *(__libc_thread_freeres_fn) + . = ALIGN(CONSTANT (MAXPAGESIZE)); /* nacl wants page alignment */ } =0x90909090 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); - . = ALIGN(CONSTANT (MAXPAGESIZE)); /* nacl wants page alignment */ .note.gnu.build-id : { *(.note.gnu.build-id) } :segrodata .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } -- 2.11.4.GIT