aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index da1bf49..955fc9f 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1516,8 +1516,9 @@ gld${EMULATION_NAME}_open_dynamic_archive
/* Try the .so extension first. If that fails build a new filename
using EXTRA_SHLIB_EXTENSION. */
if (! ldfile_try_open_bfd (string, entry))
- sprintf (string, "%s/lib%s%s%s", search->name,
- filename, arch, EXTRA_SHLIB_EXTENSION);
+ {
+ sprintf (string, "%s/lib%s%s%s", search->name,
+ filename, arch, EXTRA_SHLIB_EXTENSION);
#endif
if (! ldfile_try_open_bfd (string, entry))
@@ -1525,6 +1526,9 @@ gld${EMULATION_NAME}_open_dynamic_archive
free (string);
return FALSE;
}
+#ifdef EXTRA_SHLIB_EXTENSION
+ }
+#endif
entry->filename = string;