Linker part of PR16563 fix
[platform/upstream/binutils.git] / ld / emultempl / genelf.em
index 62af4de..5c5e1cb 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+#   Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -35,8 +35,10 @@ gld${EMULATION_NAME}_after_open (void)
   asection *sec;
   asymbol **syms;
 
+  after_open_default ();
+
   if (link_info.relocatable)
-    for (ibfd = link_info.input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    for (ibfd = link_info.input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
       if ((syms = bfd_get_outsymbols (ibfd)) != NULL
          && bfd_get_flavour (ibfd) == bfd_target_elf_flavour)
        for (sec = ibfd->sections; sec != NULL; sec = sec->next)