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]
Date:	Fri, 12 Jun 2009 15:40:40 +0200
From:	Petr Tesarik <ptesarik@...e.cz>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>,
	Roland McGrath <roland@...hat.com>,
	Petr Tesarik <ptesarik@...e.cz>
Subject: [PATCH v2 8/8] x86: remove unneeded section from the vDSO

Some standard sections are not useful in the resulting binary.

.gnu.warning.* is only interesting for the linker.

.note.* may be discarded, except:
  .note.Linux which contains the Linux version
  .note.gnu.build-id which may be useful for identifying
    the vDSO

Signed-off-by: Petr Tesarik <ptesarik@...e.cz>
---
 arch/x86/vdso/vdso-layout.lds.S |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/x86/vdso/vdso-layout.lds.S b/arch/x86/vdso/vdso-layout.lds.S
index 3b56e2f..b70c27d 100644
--- a/arch/x86/vdso/vdso-layout.lds.S
+++ b/arch/x86/vdso/vdso-layout.lds.S
@@ -31,7 +31,8 @@ SECTIONS
 	}
 
 	.note : {
-		*(.note.*)
+		*(.note.Linux)
+		*(.note.gnu.build-id)
 	} :text :note
 
 	.eh_frame_hdr : {
@@ -100,6 +101,12 @@ SECTIONS
 		*(.altinstructions)
 		*(.altinstr_replacement)
 	}
+
+	/* These sections are not useful to user-space */
+	/DISCARD/ : {
+		*(.gnu.warning.*)
+		*(.note.*)
+	}
 }
 
 /* This assert is triggered if the linker finds a section in one of its
-- 
1.6.0.2

--
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