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 provide an ldscript for booters that stri...
details: https://anonhg.NetBSD.org/src/rev/7edb9a3ae5c6
branches: trunk
changeset: 791024:7edb9a3ae5c6
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 01 00:19:04 2013 +0000
description:
provide an ldscript for booters that strips the unwind sections.
XXX: untested
diffstat:
sys/arch/i386/conf/stand.ldscript | 64 +++++++++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 0 deletions(-)
diffs (68 lines):
diff -r fa393c72bc42 -r 7edb9a3ae5c6 sys/arch/i386/conf/stand.ldscript
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/conf/stand.ldscript Fri Nov 01 00:19:04 2013 +0000
@@ -0,0 +1,64 @@
+/* $NetBSD: stand.ldscript,v 1.1 2013/11/01 00:19:04 christos Exp $ */
+
+OUTPUT_FORMAT("elf32-i386", "elf32-i386",
+ "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(_start)
+SECTIONS
+{
+ /* 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.*)
+ }
+
+ __data_start = . ;
+ .data :
+ AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
+ {
+ *(.data)
+ }
+ .data.cacheline_aligned :
+ AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
+ {
+ *(.data.cacheline_aligned)
+ }
+ .data.read_mostly :
+ AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
+ {
+ *(.data.read_mostly)
+ }
+ _edata = . ;
+ PROVIDE (edata = .) ;
+ __bss_start = . ;
+ .bss :
+ AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
+ {
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(32 / 8);
+ }
+ . = ALIGN(32 / 8);
+ _end = . ;
+ PROVIDE (end = .) ;
+ /DISCARD/ : {
+ *(.eh_frame_hdr)
+ *(.eh_frame)
+ *(.rel.eh_frame)
+ *(.rela.eh_frame)
+ *(.note.netbsd.ident)
+ }
+}
Home |
Main Index |
Thread Index |
Old Index