Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/arch/shark/conf Pull up revision 1.1 (new, requeste...



details:   https://anonhg.NetBSD.org/src/rev/edbd6231a094
branches:  netbsd-1-6
changeset: 529764:edbd6231a094
user:      he <he%NetBSD.org@localhost>
date:      Thu Dec 12 22:19:25 2002 +0000

description:
Pull up revision 1.1 (new, requested by thorpej in ticket #1002):
  Use a linker script to craft an ELF image that will work
  when copied to a.out via objcopy.  Stop using the frightening
  elf2aout.sh shell script.

diffstat:

 sys/arch/shark/conf/kern.ldscript |  50 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diffs (54 lines):

diff -r d196b5b0f76c -r edbd6231a094 sys/arch/shark/conf/kern.ldscript
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/shark/conf/kern.ldscript Thu Dec 12 22:19:25 2002 +0000
@@ -0,0 +1,50 @@
+/*     $NetBSD: kern.ldscript,v 1.1.4.2 2002/12/12 22:19:25 he Exp $   */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
+             "elf32-littlearm")
+OUTPUT_ARCH(arm)
+SECTIONS
+{
+  . = 0xf0000020;      /* 0x20 == sizeof(a.out header) */
+
+  /* Read-only sections, merged into text segment: */
+  .text :
+  {
+    *(.text)
+    *(.text.*)
+    *(.stub)
+    *(.glue_7t) *(.glue_7)
+    *(.rodata) *(.rodata.*)
+  } =0
+  PROVIDE (__etext = .);
+  PROVIDE (_etext = .);
+  PROVIDE (etext = .);
+  . = ALIGN(0x1000);
+  .data :
+  {
+    __data_start = . ;
+    *(.data)
+    *(.data.*)
+    *(.sdata)
+    *(.sdata.*)
+  }
+  _edata = .;
+  PROVIDE (edata = .);
+  __bss_start = .;
+  __bss_start__ = .;
+  .bss       :
+  {
+   *(.dynbss)
+   *(.bss)
+   *(.bss.*)
+   *(COMMON)
+   /* Align here to ensure that the .bss section occupies space up to
+      _end.  Align after .bss to ensure correct alignment even if the
+      .bss section disappears because there are no input sections.  */
+   . = ALIGN(32 / 8);
+  }
+  . = ALIGN(32 / 8);
+  _end = .;
+  _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
+  PROVIDE (end = .);
+}



Home | Main Index | Thread Index | Old Index