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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7359.1157968022@warthog.cambridge.redhat.com>
Date:	Mon, 11 Sep 2006 10:47:02 +0100
From:	David Howells <dhowells@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	David Howells <dhowells@...hat.com>, torvalds@...l.org,
	akpm@...l.org, benh@...nel.crashing.org,
	linux-kernel@...r.kernel.org, uclinux-dev@...inux.org
Subject: Re: [PATCH 2/3] FRV: Permit __do_IRQ() to be dispensed with 

Ingo Molnar <mingo@...e.hu> wrote:

> The real solution would be to use gcc -ffunction-sections plus ld 
> --gc-sections to automatically get rid of unused global functions, at 
> link time.

It's easy.  It's already possible with FRV.  Just add the attached patch and
enable the new option.  However, you also need to compile without debugging
code, otherwise it has little effect.  I think stabs links bring stuff in or
something.

David
---
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 5e6583a..0dc3730 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -342,6 +342,14 @@ menu "Power management options"
 source kernel/power/Kconfig
 endmenu
 
+config GC_SECTIONS
+       bool "Garbage collect unused functions and data"
+       default y
+       help
+         Tell the compiler to place all functions and variables in their own
+         sections and then tell the linker to discard any section that aren't
+         referred to.
+
 endmenu
 
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ