From 2fa04b1ca15d12d36cd352faf3c3cf417c86b334 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 27 Feb 2007 08:33:25 +0000 Subject: [PATCH] * Makefile.am (ALL_EMUL_EXTRA_OFILES): Remove spu_inc.o. (eelf32_spu.c): Adjust dependencies. * Makefile.in: Regenerate. * emultempl/spuelf.em (ovl_mgr): New array. Insert spu_ovl.o code using bin2c. (_binary_spu_ovl_o_start, _binary_spu_ovl_o_end): Delete. (ovl_mgr_stream): Update. * emultempl/spu_inc.s: Delete. * emultempl/spu_none.s: Delete. --- ld/Makefile.am | 12 ++---------- ld/Makefile.in | 12 ++---------- ld/emultempl/spu_inc.s | 7 ------- ld/emultempl/spu_none.s | 6 ------ ld/emultempl/spuelf.em | 15 ++++++++++----- 5 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 ld/emultempl/spu_inc.s delete mode 100644 ld/emultempl/spu_none.s diff --git a/ld/Makefile.am b/ld/Makefile.am index d83bb1617..767a9cad6 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -422,8 +422,7 @@ ALL_64_EMULATIONS = \ ALL_EMUL_EXTRA_OFILES = \ deffilep.o \ pe-dll.o \ - pep-dll.o \ - spu_inc.o + pep-dll.o CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \ ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \ @@ -722,16 +721,9 @@ eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)" eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \ + $(srcdir)/emultempl/spu_ovl.o \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)" -spu_inc.o: $(srcdir)/emultempl/spu_inc.s $(srcdir)/emultempl/spu_none.s \ - $(srcdir)/emultempl/spu_ovl.o - cp $(srcdir)/emultempl/spu_ovl.o spu_ovl.o; \ - if ! ld -r -o $@ -b binary spu_ovl.o; then \ - if ! $(CC) -c -o $@ $(srcdir)/emultempl/spu_inc.s; then \ - $(CC) -c -o $@ $(srcdir)/emultempl/spu_none.s; \ - fi \ - fi $(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s if ../gas/as-new --version \ diff --git a/ld/Makefile.in b/ld/Makefile.in index cf3357bdf..e0e79f557 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -654,8 +654,7 @@ ALL_64_EMULATIONS = \ ALL_EMUL_EXTRA_OFILES = \ deffilep.o \ pe-dll.o \ - pep-dll.o \ - spu_inc.o + pep-dll.o CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \ ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \ @@ -1533,16 +1532,9 @@ eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)" eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \ + $(srcdir)/emultempl/spu_ovl.o \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)" -spu_inc.o: $(srcdir)/emultempl/spu_inc.s $(srcdir)/emultempl/spu_none.s \ - $(srcdir)/emultempl/spu_ovl.o - cp $(srcdir)/emultempl/spu_ovl.o spu_ovl.o; \ - if ! ld -r -o $@ -b binary spu_ovl.o; then \ - if ! $(CC) -c -o $@ $(srcdir)/emultempl/spu_inc.s; then \ - $(CC) -c -o $@ $(srcdir)/emultempl/spu_none.s; \ - fi \ - fi $(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s if ../gas/as-new --version \ diff --git a/ld/emultempl/spu_inc.s b/ld/emultempl/spu_inc.s deleted file mode 100644 index 29a076cdf..000000000 --- a/ld/emultempl/spu_inc.s +++ /dev/null @@ -1,7 +0,0 @@ - .text - .globl _binary_spu_ovl_o_start - .globl _binary_spu_ovl_o_end - -_binary_spu_ovl_o_start: - .incbin "spu_ovl.o" -_binary_spu_ovl_o_end: diff --git a/ld/emultempl/spu_none.s b/ld/emultempl/spu_none.s deleted file mode 100644 index f0d23187a..000000000 --- a/ld/emultempl/spu_none.s +++ /dev/null @@ -1,6 +0,0 @@ - .text - .globl _binary_spu_ovl_o_start - .globl _binary_spu_ovl_o_end - -_binary_spu_ovl_o_start: -_binary_spu_ovl_o_end: diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index 95b1cb28e..d6681adab 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2006 Free Software Foundation, Inc. +# Copyright 2006, 2007 Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. # @@ -38,12 +38,17 @@ static int emit_stub_syms = 0; static bfd_vma local_store_lo = 0; static bfd_vma local_store_hi = 0x3ffff; -extern void *_binary_spu_ovl_o_start; -extern void *_binary_spu_ovl_o_end; +static const char ovl_mgr[] = { +EOF + +../binutils/bin2c < ${srcdir}/emultempl/spu_ovl.o >> e${EMULATION_NAME}.c + +cat >>e${EMULATION_NAME}.c <