aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/Makefile.am12
-rw-r--r--ld/Makefile.in12
-rw-r--r--ld/emultempl/spu_inc.s7
-rw-r--r--ld/emultempl/spu_none.s6
-rw-r--r--ld/emultempl/spuelf.em15
5 files changed, 14 insertions, 38 deletions
diff --git a/ld/Makefile.am b/ld/Makefile.am
index d83bb16..767a9ca 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 cf3357b..e0e79f5 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 29a076c..0000000
--- 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 f0d2318..0000000
--- 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 95b1cb2..d6681ad 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 <<EOF
+};
static const struct _ovl_stream ovl_mgr_stream = {
- &_binary_spu_ovl_o_start,
- &_binary_spu_ovl_o_end
+ ovl_mgr,
+ ovl_mgr + sizeof (ovl_mgr)
};
static asection *toe = NULL;