From 23f5bf99f023fdd49ef2f77d884833ce08136942 Mon Sep 17 00:00:00 2001 From: Tom Wood Date: Sun, 27 Dec 1992 21:39:46 +0000 Subject: [PATCH] Initial revision From-SVN: r2927 --- gcc/config/m88k/dgux.ld | 47 +++++++++++++++++++++++++++++++++++++++++ gcc/config/m88k/t-dgux | 20 ++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 gcc/config/m88k/dgux.ld create mode 100644 gcc/config/m88k/t-dgux diff --git a/gcc/config/m88k/dgux.ld b/gcc/config/m88k/dgux.ld new file mode 100644 index 00000000000..93016d99d7b --- /dev/null +++ b/gcc/config/m88k/dgux.ld @@ -0,0 +1,47 @@ +/* m88kdgux.ld - COFF linker directives for G++ on an AViiON + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + On The AViiON we start the output .text section somewhere after the + first 64kb (0x10000) of logical address space so that the first + 64kb can be mapped out, thus catching references through null + pointers. We actually start at 0x10200 (for efficiency). Ideally, + we want the page offset of a given word of the .text (output) + section to be the same as it's page offset in the actual (output) + linked core file so that paging of the .text section is efficient. + In order to do this we allow for up to 0x200 bytes of header stuff + in the output (linked) object file. + + For .data, the OCS says that regions with different "protections" + (i.e. read/write, read-only) should not share any 4 megabyte chunk + of the logical address space, so we start the .data segment at the + first (lowest) 4 MB boundary past the end of the .text segment. + + For some reason, you can't start right at the 4 MB boundary. You + have to start at some distance past that. The distance must be + equal to the distance from the start of the last 64 KB segment in + the (output) .text segment to the actual end of the (output) .text + segment. */ + +SECTIONS { + .text 0x10200 BLOCK(0x200) : + { *(.init) *(.initp) *(.finip) *(.text) *(.tdesc) } + + GROUP BIND (((((ADDR(.text) + SIZEOF(.text) - 1) / 0x400000) + 1) * 0x400000) + ((ADDR(.text) + SIZEOF (.text)) % 0x10000)) : + { .data : { *(.data) *(.ctors) *(.dtors) } + .bss : {} } +} diff --git a/gcc/config/m88k/t-dgux b/gcc/config/m88k/t-dgux new file mode 100644 index 00000000000..0c9b2c56be1 --- /dev/null +++ b/gcc/config/m88k/t-dgux @@ -0,0 +1,20 @@ +# Specify how to create the *.asm files + +MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ + moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ + moveDI96x.asm + +$(MOVE_ASM): $(srcdir)/config/m88k-move.sh + $(srcdir)/config/m88k-move.sh + +LIB2FUNCS_EXTRA = $(MOVE_ASM) +LIBGCC1 = libgcc1.null + +# For DG/UX we build crtbegin.o and crtend.o which serve to add begin and +# end labels to the .ctors and .dtors section when we link using gcc. +# In a coff environment, a link script is required. + +EXTRA_PARTS=crtbegin.o crtend.o m88kdgux.ld + +m88kdgux.ld: $(srcdir)/config/m88kdgux.ld + rm -f m88kdgux.ld; cp $(srcdir)/config/m88kdgux.ld . -- 2.30.2