* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
authorIan Lance Taylor <ian@airs.com>
Sat, 7 Oct 1995 21:09:57 +0000 (21:09 +0000)
committerIan Lance Taylor <ian@airs.com>
Sat, 7 Oct 1995 21:09:57 +0000 (21:09 +0000)
bother searching for needed libraries unless doing a final link.

ld/ChangeLog
ld/emultempl/elf32.em

index 3d2f9ca5aa4de15c2a0d46e8c078300b1bd9fb82..d6a0de6c839ba77bb9be8d84fb5e7d731eefa745 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct  7 17:07:17 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
+       bother searching for needed libraries unless doing a final link.
+
 Fri Oct  6 16:26:16 1995  Ken Raeburn  <raeburn@cygnus.com>
 
        Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
index d55b8f51f0b2e35dbac62d0b28d6bfae0a5d16cc..affd72539a6c1bd5770fbf5ef224165ab71e2fd4 100644 (file)
@@ -145,6 +145,10 @@ gld${EMULATION_NAME}_after_open ()
 {
   struct bfd_elf_link_needed_list *needed, *l;
 
+  /* We only need to worry about this when doing a final link.  */
+  if (link_info.relocateable || link_info.shared)
+    return;
+
   /* Get the list of files which appear in DT_NEEDED entries in
      dynamic objects included in the link (often there will be none).
      For each such file, we want to track down the corresponding