aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/ppc32elf.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-02-27 23:31:35 +1030
committerAlan Modra <amodra@gmail.com>2014-02-27 23:39:01 +1030
commitdb434ba03edb5491d48415069d6116b5037e6fa1 (patch)
treee0360269425cd80d4e16dbf463de42fc2f428dd9 /ld/emultempl/ppc32elf.em
parent3cdd631f17c822cd58f2fc9c742dc60ed683b5c1 (diff)
downloadgdb-db434ba03edb5491d48415069d6116b5037e6fa1.zip
gdb-db434ba03edb5491d48415069d6116b5037e6fa1.tar.gz
gdb-db434ba03edb5491d48415069d6116b5037e6fa1.tar.bz2
Fix ELF ppc32 targets that don't use ppc32elf.em
5446cbdf82892a800ed7eef563a795e75223ec52 broke powerpc-lynxos, powerpc-netware, powerpc-windiss and powerpc-vxworks. bfd/ * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default params for targets that don't use ppc32elf.em. ld/ * emulparams/elf32ppcvxworks.sh: Source plt_unwind.sh and use ppc32elf.em. * emultempl/ppc32elf.em (ppc_after_open): Don't compile for vxworks. (LDEMUL_AFTER_OPEN): Don't set for vxworks. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Exclude -secure-plt, -bss-plt and -sdata-got when vxworks.
Diffstat (limited to 'ld/emultempl/ppc32elf.em')
-rw-r--r--ld/emultempl/ppc32elf.em31
1 files changed, 24 insertions, 7 deletions
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index f5a3a70..00a29e2 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -1,6 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2005, 2007, 2008, 2009, 2010, 2011, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
@@ -54,6 +53,11 @@ ppc_after_open_output (void)
ppc_elf_link_params (&link_info, &params);
}
+EOF
+
+# No --secure-plt, --bss-plt, or --sdata-got for vxworks.
+if test -z "$VXWORKS_BASE_EM_FILE" ; then
+ fragment <<EOF
static void
ppc_after_open (void)
{
@@ -109,6 +113,9 @@ ppc_after_open (void)
gld${EMULATION_NAME}_after_open ();
}
+EOF
+fi
+fragment <<EOF
static void
ppc_before_allocation (void)
{
@@ -206,10 +213,14 @@ PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
{ "no-emit-stub-syms", no_argument, NULL, OPTION_NO_STUBSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
- { "no-tls-get-addr-optimize", no_argument, NULL, OPTION_NO_TLS_GET_ADDR_OPT },
+ { "no-tls-get-addr-optimize", no_argument, NULL, OPTION_NO_TLS_GET_ADDR_OPT },'
+if test -z "$VXWORKS_BASE_EM_FILE" ; then
+ PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "secure-plt", no_argument, NULL, OPTION_NEW_PLT },
{ "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
- { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
+ { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },'
+fi
+PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "ppc476-workaround", optional_argument, NULL, OPTION_PPC476_WORKAROUND },
{ "no-ppc476-workaround", no_argument, NULL, OPTION_NO_PPC476_WORKAROUND },
'
@@ -219,10 +230,14 @@ PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
--emit-stub-syms Label linker stubs with a symbol.\n\
--no-emit-stub-syms Don'\''t label linker stubs with a symbol.\n\
--no-tls-optimize Don'\''t try to optimize TLS accesses.\n\
- --no-tls-get-addr-optimize Don'\''t use a special __tls_get_addr call.\n\
+ --no-tls-get-addr-optimize Don'\''t use a special __tls_get_addr call.\n'
+if test -z "$VXWORKS_BASE_EM_FILE" ; then
+ PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'\
--secure-plt Use new-style PLT if possible.\n\
--bss-plt Force old-style BSS PLT.\n\
- --sdata-got Force GOT location just before .sdata.\n\
+ --sdata-got Force GOT location just before .sdata.\n'
+fi
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'\
--ppc476-workaround [=pagesize]\n\
Avoid a cache bug on ppc476.\n\
--no-ppc476-workaround Disable workaround.\n"
@@ -284,5 +299,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
# Put these extra ppc32elf routines in ld_${EMULATION_NAME}_emulation
#
LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=ppc_after_open_output
-LDEMUL_AFTER_OPEN=ppc_after_open
+if test -z "$VXWORKS_BASE_EM_FILE" ; then
+ LDEMUL_AFTER_OPEN=ppc_after_open
+fi
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation