Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/conf Add ldscript which aligns .data to a 1...



details:   https://anonhg.NetBSD.org/src/rev/21115d755732
branches:  trunk
changeset: 778487:21115d755732
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Mar 29 15:42:15 2012 +0000

description:
Add ldscript which aligns .data to a 1MB boundary. (used for testing)

diffstat:

 sys/arch/powerpc/conf/kern-mb.ldscript |  76 ++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diffs (80 lines):

diff -r beaefa47a58d -r 21115d755732 sys/arch/powerpc/conf/kern-mb.ldscript
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/powerpc/conf/kern-mb.ldscript    Thu Mar 29 15:42:15 2012 +0000
@@ -0,0 +1,76 @@
+/* $NetBSD: kern-mb.ldscript,v 1.1 2012/03/29 15:42:15 matt Exp $ */
+
+/*  ldscript for NetBSD/powerpc kernels and LKMs */
+OUTPUT_ARCH(powerpc)
+ENTRY(_start)
+SEARCH_DIR(/lib);
+/* Do we need any of these?
+   __DYNAMIC = 0;    */
+_DYNAMIC_LINK = 0;
+SECTIONS
+{
+  /*  Read-only sections, merged into text segment.  Assumes the
+      kernel Makefile sets the start address via -Ttext.  */
+  .text      :
+  {
+    _ftext = . ;
+    *(.text)
+    __stub_start = .;
+    *(.stub)
+    __stub_end = .;
+    __stub_pmap_start = .;
+    *(.stub.pmap)
+    __stub_pmap_end = .;
+    *(.gnu.warning)
+  } =0
+  _etext = .;
+  PROVIDE (etext = .);
+  .rodata    : { *(.rodata) *(.rodata.*) }
+  .reginfo : { *(.reginfo) }
+  . = ALIGN(0x100000);
+  .data    :
+  {
+    _fdata = . ;
+    *(.data)
+    CONSTRUCTORS
+  }
+  .data1                       : { *(.data1) }
+  . = ALIGN(32);       /* COHERENCY UNIT */
+  .data.cacheline_aligned      : { *(.data.cacheline_aligned) }
+  . = ALIGN(32);       /* COHERENCY UNIT */
+  .data.read_mostly            : { *(.data.read_mostly) }
+  . = ALIGN(32);       /* COHERENCY UNIT */
+  _gp = ALIGN(16) + 0x7ff0;
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
+  .sdata     : { *(.sdata) }
+  _edata  =  .;
+  PROVIDE (edata = .);
+  __bss_start = .;
+  _fbss = .;
+  .sbss      : { *(.sbss) *(.scommon) }
+  .bss       :
+  {
+   *(.bss)
+   *(COMMON)
+  }
+  _end = . ;
+  PROVIDE (end = .);
+  /* These are needed for ELF backends which have not yet been
+     converted to the new style linker.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  /* DWARF debug sections.
+     Symbols in the .debug DWARF section are relative to the beginning of the
+     section so we begin .debug at 0.  It's not clear yet what needs to happen
+     for the others.   */
+  .debug          0 : { *(.debug) }
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  .line           0 : { *(.line) }
+  /* These must appear regardless of  .  */
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+}



Home | Main Index | Thread Index | Old Index