From: Alan Modra Date: Wed, 16 Jan 2002 05:52:38 +0000 (+0000) Subject: * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f808cd5d7423d498fa6197317af6a919f8c9e95;p=binutils-gdb.git * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em. * Makefile.in: Regenerate. * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define. * emultempl/ppc64elf.em: New file. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 6dd069db221..7d1f7943976 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2002-01-16 Alan Modra + + * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em. + * Makefile.in: Regenerate. + * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define. + * emultempl/ppc64elf.em: New file. + 2002-01-15 DJ Delorie * scripttempl/pe.sc: Add support for constructor priorities. diff --git a/ld/Makefile.am b/ld/Makefile.am index 329a3164065..1d59e83d3a7 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -533,11 +533,11 @@ eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emulparams/elf32ppc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" -eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \ +eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)" eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \ - $(srcdir)/emulparams/elf64ppc.sh \ + $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)" eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ diff --git a/ld/Makefile.in b/ld/Makefile.in index f409fbc4a7f..1518e3f140a 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1254,11 +1254,11 @@ eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emulparams/elf32ppc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" -eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \ +eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)" eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \ - $(srcdir)/emulparams/elf64ppc.sh \ + $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)" eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh index 9384a1eec60..2169862348c 100644 --- a/ld/emulparams/elf64ppc.sh +++ b/ld/emulparams/elf64ppc.sh @@ -1,4 +1,5 @@ TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=ppc64elf ELFSIZE=64 GENERATE_SHLIB_SCRIPT=yes SCRIPT_NAME=elf diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em new file mode 100644 index 00000000000..655ddea021e --- /dev/null +++ b/ld/emultempl/ppc64elf.em @@ -0,0 +1,99 @@ +# This shell script emits a C file. -*- C -*- +# Copyright 2002 Free Software Foundation, Inc. +# +# This file is part of GLD, the Gnu Linker. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# This file is sourced from elf32.em, and defines extra powerpc64-elf +# specific routines. +# +cat >>e${EMULATION_NAME}.c <head, abs_output_section, + &stat_ptr->head, 0, (bfd_vma) 0, NULL); + + /* Recalculate TOC base. */ + ldemul_after_allocation (); + + /* Do the assignments again. */ + lang_do_assignments (stat_ptr->head, abs_output_section, + (fill_type) 0, (bfd_vma) 0); + } + + if (! ppc64_elf_build_stubs (output_bfd, &link_info)) + einfo ("%X%P: can not build stubs: %E\n"); +} +EOF + +# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation +# +LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation +LDEMUL_FINISH=gld${EMULATION_NAME}_finish