[x86] Resolve non-PIC undefweak symbols in executable
[deliverable/binutils-gdb.git] / ld / emultempl / sh64elf.em
index 17f9ddec514fbcd8d7c911dd192bd22ada25d2af..c538f395114b3a009ce40f7079ed632b5b9f44cf 100644 (file)
@@ -1,6 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
+#   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -249,6 +248,9 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
 
   gld${EMULATION_NAME}_after_allocation ();
 
+  /* Needed, since we create link_orders here.  */
+  lang_clear_os_map ();
+
   cranges = bfd_get_section_by_name (link_info.output_bfd,
                                     SH64_CRANGES_SECTION_NAME);
 
@@ -483,7 +485,8 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
 
                    /* If we emit relocatable contents, we need a
                       relocation for the start address.  */
-                   if (link_info.relocatable || link_info.emitrelocations)
+                   if (bfd_link_relocatable (&link_info)
+                       || link_info.emitrelocations)
                      {
                        /* FIXME: We could perhaps use lang_add_reloc and
                           friends here, but I'm not really sure that
This page took 0.023342 seconds and 4 git commands to generate.