Commit c65916fe authored by Roland McGrath's avatar Roland McGrath Committed by Thomas Gleixner

x86: vdso linker script cleanup

I can't see the reason ".  = VDSO_PRELINK + 0x900;" was ever there in
the linker script for the x86_64 vDSO.  I can't find anything that
depends on this magic offset, or that should care at all about the
particular location of of the .data section (all from vvar.c) in the
vDSO image.  If it is really desireable to place .data at 0x900, then it
should be after all the other sections so they fill in the space up to
0x900.

This removes the 0x900 magic and cleans up the output sections generally
in the vDSO linker script.  This saves a few hundred bytes in the size
of the vDSO file, bringing it back well under 4kb total so that its vma
only needs one page.
Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent de8aacbe
...@@ -26,11 +26,14 @@ SECTIONS ...@@ -26,11 +26,14 @@ SECTIONS
is insufficient, ld -shared will barf. Just increase it here. */ is insufficient, ld -shared will barf. Just increase it here. */
. = VDSO_PRELINK + VDSO_TEXT_OFFSET; . = VDSO_PRELINK + VDSO_TEXT_OFFSET;
.text : { *(.text) } :text .text : { *(.text*) } :text
.text.ptr : { *(.text.ptr) } :text .rodata : { *(.rodata*) } :text
. = VDSO_PRELINK + 0x900; .data : {
.data : { *(.data) } :text *(.data*)
.bss : { *(.bss) } :text *(.sdata*)
*(.bss*)
*(.dynbss*)
} :text
.altinstructions : { *(.altinstructions) } :text .altinstructions : { *(.altinstructions) } :text
.altinstr_replacement : { *(.altinstr_replacement) } :text .altinstr_replacement : { *(.altinstr_replacement) } :text
...@@ -42,7 +45,6 @@ SECTIONS ...@@ -42,7 +45,6 @@ SECTIONS
.useless : { .useless : {
*(.got.plt) *(.got) *(.got.plt) *(.got)
*(.gnu.linkonce.d.*) *(.gnu.linkonce.d.*)
*(.dynbss)
*(.gnu.linkonce.b.*) *(.gnu.linkonce.b.*)
} :text } :text
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment