From 7192be38cce0a1ac21a84b884521901c0243dcd5 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 5 Nov 1998 00:41:24 +0000 Subject: [PATCH] Add support for FR30 --- ld/ChangeLog | 8 +++ ld/Makefile.am | 6 +- ld/Makefile.in | 43 +++++++------ ld/configure.tgt | 9 ++- ld/emulparams/fr30.sh | 14 +++++ ld/scripttempl/fr30.sc | 136 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 194 insertions(+), 22 deletions(-) create mode 100755 ld/emulparams/fr30.sh create mode 100644 ld/scripttempl/fr30.sc diff --git a/ld/ChangeLog b/ld/ChangeLog index c04dfe1c033..c9fe297b7bd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +Wed Nov 4 16:39:18 1998 Nick Clifton + + * Makefile.am: Add support for FR30 target. + * configure.tgt: Add support for FR30 target. + * Makefile.in: Regenerate. + * emulparams/fr30.sh: New file. + * scripttemp/fr30.sc: New file. + Mon Nov 2 14:47:15 1998 Catherine Moore * ldmain.c (main): Don't report error for dynamic links and diff --git a/ld/Makefile.am b/ld/Makefile.am index a16119d1d62..66ef18cdc07 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -127,6 +127,7 @@ ALL_EMULATIONS = \ eelf_i386.o \ egld960.o \ egld960coff.o \ + efr30.o \ ego32.o \ eh8300.o \ eh8300h.o \ @@ -273,7 +274,7 @@ earcelf.c: $(srcdir)/emulparams/arcelf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} arcelf "$(tdir_arcelf)" earmelf.c: $(srcdir)/emulparams/armelf.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elfarm.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf "$(tdir_armelf)" earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS} @@ -308,6 +309,9 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \ eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS} ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)" +efr30.c: $(srcdir)/emulparams/fr30.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/fr30.sc ${GEN_DEPENDS} + ${GENSCRIPTS} fr30 "$(tdir_fr30)" em32relf.c: $(srcdir)/emulparams/m32relf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} m32relf "$(tdir_m32r)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 81db062b83c..4017ffb0c9f 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.3 from Makefile.am +# Makefile.in generated automatically by automake 1.3b from Makefile.am # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -32,7 +32,7 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include -DISTDIR = +DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -68,9 +68,15 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ HDEFINES = @HDEFINES@ +LD = @LD@ LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@ +PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ +VERSION = @VERSION@ INTLLIBS = @INTLLIBS@ @@ -198,6 +204,7 @@ ALL_EMULATIONS = \ eelf_i386.o \ egld960.o \ egld960coff.o \ + efr30.o \ ego32.o \ eh8300.o \ eh8300h.o \ @@ -342,10 +349,9 @@ ld_new_LDFLAGS = LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LEXLIB = @LEXLIB@ CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then echo $(top_builddir)/../texinfo/makeinfo/makeinfo; else echo makeinfo; fi` +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi` TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex INFO_DEPS = ld.info @@ -355,13 +361,10 @@ man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff -DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \ -acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \ -ldgram.c ldlex.c stamp-h.in - +DIST_COMMON = README COPYING ChangeLog INSTALL Makefile.am Makefile.in \ +NEWS TODO acconfig.h acinclude.m4 aclocal.m4 config.in configure \ +configure.in ldgram.c ldlex.c stamp-h.in -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -458,14 +461,14 @@ ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) @rm -f ld-new$(EXEEXT) $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS) .y.c: - $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c + $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c if test -f y.tab.h; then \ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi ldgram.h: ldgram.c .l.c: - $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ + $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ ld.info: ld.texinfo ld.dvi: ld.texinfo @@ -792,13 +795,12 @@ clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(DISTCLEANFILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "ldgramhldgramcldlexl$(MAINTAINERCLEANFILES)" || rm -f ldgramh ldgramc ldlexl $(MAINTAINERCLEANFILES) mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ mostlyclean-compile mostlyclean-libtool \ mostlyclean-aminfo mostlyclean-tags mostlyclean-generic @@ -890,7 +892,7 @@ earcelf.c: $(srcdir)/emulparams/arcelf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} arcelf "$(tdir_arcelf)" earmelf.c: $(srcdir)/emulparams/armelf.sh \ - $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elfarm.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf "$(tdir_armelf)" earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS} @@ -925,6 +927,9 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \ eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS} ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)" +efr30.c: $(srcdir)/emulparams/fr30.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/fr30.sc ${GEN_DEPENDS} + ${GENSCRIPTS} fr30 "$(tdir_fr30)" em32relf.c: $(srcdir)/emulparams/m32relf.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} m32relf "$(tdir_m32r)" diff --git a/ld/configure.tgt b/ld/configure.tgt index 195cda27eca..c9cfea9b327 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -113,11 +113,15 @@ a29k-*-*) targ_emul=a29k ;; arm-*-aout | armel-*-aout) targ_emul=armaoutl ;; armeb-*-aout) targ_emul=armaoutb ;; arm-*-coff) targ_emul=armcoff ;; +arm-*-elf) targ_emul=armelf ;; thumb-*-coff) targ_emul=armcoff ;; +thumb-*-elf) targ_emul=armelf ;; thumb-*-pe) targ_emul=armpe ;; -h8300-*-hms) targ_emul=h8300; targ_extra_emuls="h8300h h8300s" +h8300-*-hms* | h8300-*-coff*) + targ_emul=h8300; targ_extra_emuls="h8300h h8300s" ;; -h8500-*-hms) targ_emul=h8500 +h8500-*-hms* | h8500-*-coff*) + targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" ;; sh-*-elf*) targ_emul=shelf @@ -226,6 +230,7 @@ v850e-*-*) targ_emul=v850 ;; v850ea-*-*) targ_emul=v850 ;; # end-sanitize-v850e w65-*-*) targ_emul=w65 ;; +fr30-*-*) targ_emul=fr30 ;; *-*-aout) targ_emul=${target_cpu}-${target_vendor} ;; *-*-coff) targ_emul=${target_cpu}-${target_vendor} ;; *-*-netware) targ_emul=${target_cpu}-nw ;; diff --git a/ld/emulparams/fr30.sh b/ld/emulparams/fr30.sh new file mode 100755 index 00000000000..770cab046c2 --- /dev/null +++ b/ld/emulparams/fr30.sh @@ -0,0 +1,14 @@ +MACHINE= +SCRIPT_NAME=fr30 +OUTPUT_FORMAT="elf32-fr30" +TEXT_START_ADDR=0x100000 +ZDATA_START_ADDR=0x160 +ROZDATA_START_ADDR="ALIGN (4)" +SDATA_START_ADDR="ALIGN (4)" +ROSDATA_START_ADDR="ALIGN (4)" +TDATA_START_ADDR="ALIGN (4)" +CALL_TABLE_START_ADDR="ALIGN (4)" +ARCH=fr30 +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes diff --git a/ld/scripttempl/fr30.sc b/ld/scripttempl/fr30.sc new file mode 100644 index 00000000000..0d29117d3a1 --- /dev/null +++ b/ld/scripttempl/fr30.sc @@ -0,0 +1,136 @@ +cat << EOF +OUTPUT_FORMAT("elf32-fr30", "elf32-fr30", + "elf32-fr30") +OUTPUT_ARCH(fr30) +ENTRY(_start) +SEARCH_DIR(.); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = ${TEXT_START_ADDR}; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .rel.text : { *(.rel.text) } + .rela.text : { *(.rela.text) } + .rel.data : { *(.rel.data) } + .rela.data : { *(.rela.data) } + .rel.rodata : { *(.rel.rodata) } + .rela.rodata : { *(.rela.rodata) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : { KEEP (*(.init)) } =0 + .plt : { *(.plt) } + + .text : { + *(.text) + ${RELOCATING+*(.text.*)} + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =0 + + ${RELOCATING+_etext = .;} + ${RELOCATING+PROVIDE (etext = .);} + + .fini : { KEEP (*(.fini)) } =0 + .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + + .data : { + *(.data) + ${RELOCATING+*(.data.*)} + *(.gnu.linkonce.d*) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .ctors : { + ${RELOCATING+___ctors = .;} + KEEP (*(.ctors)) + ${RELOCATING+___ctors_end = .;} + } + + .dtors : { + ${RELOCATING+___dtors = .;} + KEEP (*(.dtors)) + ${RELOCATING+___dtors_end = .;} + } + + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + + ${RELOCATING+_edata = . ;} + ${RELOCATING+PROVIDE (edata = _edata);} + + .bss : + { + ${RELOCATING+__bss_start = . ;} + *(.dynbss) + *(.bss) + *(COMMON) + } + + ${RELOCATING+_end = . ;} + ${RELOCATING+PROVIDE (end = .);} + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /* User stack */ + .stack 0x200000 : { + ${RELOCATING+__stack = .;} + *(.stack) + } + /* These must appear regardless of . */ +} +EOF -- 2.30.2