From 6024baaa2d3c3649c4d9c268d25d3aa7738e396d Mon Sep 17 00:00:00 2001 From: gonzo Date: Thu, 8 Dec 2011 00:50:14 +0000 Subject: [PATCH] Add ldscripts for OCTEON1 and OCTEON1-32 git-svn-id: svn://svn.freebsd.org/base/stable/8@228340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/conf/ldscript.mips.octeon1.32 | 60 ++++++++++++++++++++++++++++ sys/conf/ldscript.mips.octeon1.64 | 65 +++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 sys/conf/ldscript.mips.octeon1.32 create mode 100644 sys/conf/ldscript.mips.octeon1.64 diff --git a/sys/conf/ldscript.mips.octeon1.32 b/sys/conf/ldscript.mips.octeon1.32 new file mode 100644 index 000000000..3d1d91ce2 --- /dev/null +++ b/sys/conf/ldscript.mips.octeon1.32 @@ -0,0 +1,60 @@ +/* $FreeBSD$ */ + +TARGET(elf32-tradbigmips) +OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); + +SECTIONS { + . = KERNLOADADDR + SIZEOF_HEADERS; + + .text . : { + *(.text) + *(.dynamic) + etext = .; + _etext = .; + . = ALIGN(0x2000); + } + + .rodata ALIGN(0x2000) : { + _fdata = .; + *(.rodata) + . = ALIGN(32); + } + + .data . : { + _rwdata = .; + *(.data) + . = ALIGN(32); + CONSTRUCTORS; + } + + _gp = (. + 0x8000); + + .sdata . : { + _small_start = .; + *(.sdata) + . = ALIGN(32); + edata = .; + _edata = .; + } + + .sbss . : { + __bss_start = .; + _fbss = .; + *(.sbss) *(.scommon) + _small_end = .; + . = ALIGN(32); + } + + .bss . : { + *(.bss) + *(COMMON) + . = ALIGN(32); + _end = .; + end = .; + } + +} diff --git a/sys/conf/ldscript.mips.octeon1.64 b/sys/conf/ldscript.mips.octeon1.64 new file mode 100644 index 000000000..ab2cef0df --- /dev/null +++ b/sys/conf/ldscript.mips.octeon1.64 @@ -0,0 +1,65 @@ +/* $FreeBSD$ */ + +TARGET(elf64-tradbigmips) +OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); + +PHDRS { + text PT_LOAD FLAGS(0x7); +} + +SECTIONS { + . = KERNLOADADDR + SIZEOF_HEADERS; + + .text : { + *(.text) + *(.dynamic) + etext = .; + _etext = .; + . = ALIGN(0x2000); + } : text + + . = ALIGN(0x2000); + .rodata : { + _fdata = .; + *(.rodata) + . = ALIGN(32); + } + + .data : { + _rwdata = .; + *(.data) + . = ALIGN(32); + CONSTRUCTORS; + } + + _gp = (. + 0x8000); + + .sdata : { + _small_start = .; + *(.sdata) + . = ALIGN(32); + edata = .; + _edata = .; + } : text + + .sbss : { + __bss_start = .; + _fbss = .; + *(.sbss) *(.scommon) + _small_end = .; + . = ALIGN(32); + } + + .bss : { + *(.bss) + *(COMMON) + . = ALIGN(32); + _end = .; + end = .; + } + +} -- 2.45.0