lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4B895D0A.1090401@free.fr>
Date:	Sat, 27 Feb 2010 18:57:30 +0100
From:	matthieu castet <castet.matthieu@...e.fr>
To:	linux-mips@...ux-mips.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: merge .text.*/.rel.text.* sections in module build with -ffunction-section

Hi,

mips (and other arch) use -ffunction-section (I am not sure why. It may be to prevent gcc to emit bad relocation).

Apart from making the code a bit bigger it :
- make very difficult to analyze binary kernel dump (without symbol) of module : you can't easily knowing the load address of the module find the symbol of an address.
- make module bigger (due to alignment between section and bigger section table)
- make the module loading slower (more section to parse)

I wondering why we doesn't merge all text section in one section when building .ko.
This can be done with :
mipsel-openwrt-linux-uclibc-ld -r  -m elf32ltsmip  -o vfat2.ko vfat.ko -T module-common.lds

Why doesn't mips provide a custom module-common.lds that does that ?


Matthieu

PS : could you keep me in CC

PS2 : 
ls -l vfat2.ko vfat.ko
12881 vfat2.ko
14748 vfat.ko

we save 13% of module size !

View attachment "module-common.lds" of type "text/plain" (272 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ