ELF: Call check_relocs after opening all inputs
[binutils-gdb.git] / ld / emultempl / scoreelf.em
index 6433365f662b325d3e972181e4cbe0e081890bb5..367f75868e4d0d97e148e59b8396500a762583d6 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+#   Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #   Contributed by:
 #   Brain.lin (brain.lin@sunplusct.com)
 #   Mei Ligang (ligang@sunnorth.com.cn)
@@ -39,6 +39,8 @@ gld${EMULATION_NAME}_before_parse (void)
   input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
   config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
   config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+  link_info.check_relocs_after_open_input = TRUE;
+  link_info.relro = DEFAULT_LD_Z_RELRO;
 }
 
 static void
@@ -50,7 +52,8 @@ score_elf_after_open (void)
         These will only be created if the output format is an score format,
         hence we do not support linking and changing output formats at the
         same time.  Use a link followed by objcopy to change output formats.  */
-      einfo ("%F%X%P: error: cannot change output format whilst linking S+core binaries\n");
+      einfo (_("%F%X%P: error: cannot change output format "
+              "whilst linking S+core binaries\n"));
       return;
     }