Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/conf Simplify these by doing AT () relocation ...
details: https://anonhg.NetBSD.org/src/rev/a91be3554e60
branches: trunk
changeset: 340011:a91be3554e60
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Aug 20 09:34:54 2015 +0000
description:
Simplify these by doing AT () relocation once.
diffstat:
sys/arch/i386/conf/kern.ldscript | 18 ++++++++++--------
sys/arch/i386/conf/kern.ldscript.4MB | 18 ++++++++++--------
sys/arch/i386/conf/kern.ldscript.Xen | 14 ++++++++++----
3 files changed, 30 insertions(+), 20 deletions(-)
diffs (180 lines):
diff -r 782191b7ab00 -r a91be3554e60 sys/arch/i386/conf/kern.ldscript
--- a/sys/arch/i386/conf/kern.ldscript Thu Aug 20 09:31:47 2015 +0000
+++ b/sys/arch/i386/conf/kern.ldscript Thu Aug 20 09:34:54 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript,v 1.12 2015/08/20 07:00:48 uebayasi Exp $ */
+/* $NetBSD: kern.ldscript,v 1.13 2015/08/20 09:34:54 uebayasi Exp $ */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
@@ -8,17 +8,15 @@
{
/* Read-only sections, merged into text segment: */
.text :
- AT (ADDR(.text) & 0x0fffffff)
{
*(.text)
*(.text.*)
*(.stub)
- } =0
+ }
_etext = . ;
PROVIDE (etext = .) ;
.rodata :
- AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
{
*(.rodata)
*(.rodata.*)
@@ -29,19 +27,16 @@
. = ALIGN(0x1000) + (. & (0x1000 - 1));
__data_start = . ;
.data :
- AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
{
*(.data)
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.cacheline_aligned :
- AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
{
*(.data.cacheline_aligned)
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.read_mostly :
- AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
{
*(.data.read_mostly)
}
@@ -50,7 +45,6 @@
PROVIDE (edata = .) ;
__bss_start = . ;
.bss :
- AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
{
*(.bss)
*(.bss.*)
@@ -65,3 +59,11 @@
KEEP(*(.note.netbsd.ident));
}
}
+SECTIONS
+{
+ .text :
+ AT (ADDR(.text) & 0x0fffffff)
+ {
+ *(.text)
+ } =0
+}
diff -r 782191b7ab00 -r a91be3554e60 sys/arch/i386/conf/kern.ldscript.4MB
--- a/sys/arch/i386/conf/kern.ldscript.4MB Thu Aug 20 09:31:47 2015 +0000
+++ b/sys/arch/i386/conf/kern.ldscript.4MB Thu Aug 20 09:34:54 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript.4MB,v 1.13 2015/08/20 07:00:48 uebayasi Exp $ */
+/* $NetBSD: kern.ldscript.4MB,v 1.14 2015/08/20 09:34:54 uebayasi Exp $ */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
@@ -8,17 +8,15 @@
{
/* Read-only sections, merged into text segment: */
.text :
- AT (ADDR(.text) & 0x0fffffff)
{
*(.text)
*(.text.*)
*(.stub)
- } =0
+ }
_etext = . ;
PROVIDE (etext = .) ;
.rodata :
- AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
{
*(.rodata)
*(.rodata.*)
@@ -30,19 +28,16 @@
. = ALIGN(0x400000);
__data_start = . ;
.data :
- AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
{
*(.data)
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.cacheline_aligned :
- AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
{
*(.data.cacheline_aligned)
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.read_mostly :
- AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
{
*(.data.read_mostly)
}
@@ -51,7 +46,6 @@
PROVIDE (edata = .) ;
__bss_start = . ;
.bss :
- AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
{
*(.bss)
*(.bss.*)
@@ -66,3 +60,11 @@
KEEP(*(.note.netbsd.ident));
}
}
+SECTIONS
+{
+ .text :
+ AT (ADDR(.text) & 0x0fffffff)
+ {
+ *(.text)
+ } =0
+}
diff -r 782191b7ab00 -r a91be3554e60 sys/arch/i386/conf/kern.ldscript.Xen
--- a/sys/arch/i386/conf/kern.ldscript.Xen Thu Aug 20 09:31:47 2015 +0000
+++ b/sys/arch/i386/conf/kern.ldscript.Xen Thu Aug 20 09:34:54 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript.Xen,v 1.7 2015/08/20 07:00:48 uebayasi Exp $ */
+/* $NetBSD: kern.ldscript.Xen,v 1.8 2015/08/20 09:34:54 uebayasi Exp $ */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
@@ -11,7 +11,7 @@
*(.text)
*(.text.*)
*(.stub)
- } =0
+ }
_etext = . ;
PROVIDE (etext = .) ;
@@ -31,13 +31,11 @@
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.cacheline_aligned :
- AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
{
*(.data.cacheline_aligned)
}
. = ALIGN(64); /* COHERENCY_UNIT */
.data.read_mostly :
- AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
{
*(.data.read_mostly)
}
@@ -60,3 +58,11 @@
KEEP(*(.note.netbsd.ident));
}
}
+SECTIONS
+{
+ .text :
+ AT (ADDR(.text))
+ {
+ *(.text)
+ } =0
+}
Home |
Main Index |
Thread Index |
Old Index