Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / ld / emultempl / vxworks.em
index b03419fe3fc1b080f3567a32bf406a110f37700d..1efb8076bde14088c7f762f8945afc071a74ec5a 100644 (file)
@@ -1,8 +1,29 @@
+# This shell script emits a C file. -*- C -*-
+#   Copyright (C) 2006-2019 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# 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 3 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., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
 if test -n "$VXWORKS_BASE_EM_FILE" ; then
-. "${srcdir}/emultempl/${VXWORKS_BASE_EM_FILE}.em"
+  source_em "${srcdir}/emultempl/${VXWORKS_BASE_EM_FILE}.em"
 fi
 
-cat >>e${EMULATION_NAME}.c <<EOF
+fragment <<EOF
 
 static int force_dynamic;
 
@@ -20,16 +41,16 @@ vxworks_after_open (void)
 
   if (force_dynamic
       && link_info.input_bfds
-      && output_bfd->xvec->flavour == bfd_target_elf_flavour
+      && bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
       && !_bfd_elf_link_create_dynamic_sections (link_info.input_bfds,
                                                 &link_info))
-    einfo ("%X%P: Cannot create dynamic sections %E\n");
+    einfo (_("%X%P: cannot create dynamic sections %E\n"));
 
   if (!force_dynamic
-      && !link_info.shared
-      && output_bfd->xvec->flavour == bfd_target_elf_flavour
+      && !bfd_link_pic (&link_info)
+      && bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
       && elf_hash_table (&link_info)->dynamic_sections_created)
-    einfo ("%X%P: Dynamic sections created in non-dynamic link\n");
+    einfo (_("%X%P: dynamic sections created in non-dynamic link\n"));
 }
 
 EOF
@@ -46,7 +67,7 @@ PARSE_AND_LIST_LONGOPTS=$PARSE_AND_LIST_LONGOPTS'
 
 PARSE_AND_LIST_OPTIONS=$PARSE_AND_LIST_OPTIONS'
   fprintf (file, _("\
-  --force-dynamic       Always create dynamic sections\n"));
+  --force-dynamic             Always create dynamic sections\n"));
 '
 
 PARSE_AND_LIST_ARGS_CASES=$PARSE_AND_LIST_ARGS_CASES'
@@ -69,10 +90,10 @@ PARSE_AND_LIST_ARGS_CASES=$PARSE_AND_LIST_ARGS_CASES'
 #      something other than gld${EMULATION_NAME}_foo.  We handle
 #      this case in the same way as (1).
 for override in before_parse after_open; do
-  var="LDEMUL_`echo ${override} | tr a-z A-Z`"
+  var="LDEMUL_`echo ${override} | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
   eval value=\$${var}
   if test "${value}" = "gld${EMULATION_NAME}_${override}"; then
-    cat >>e${EMULATION_NAME}.c <<EOF
+    fragment <<EOF
 #define ${value} vxworks_${override}
 EOF
   else
This page took 0.025656 seconds and 4 git commands to generate.