lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/8] x86: remove unneeded section from the vDSO
Date
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@suse.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 ea9ef58..93e0b40 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 : {
@@ -98,6 +99,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


\
 
 \ /
  Last update: 2009-06-12 15:29    [W:0.076 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site