aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-09-14 02:42:51 +0000
committerJeff Law <law@redhat.com>1999-09-14 02:42:51 +0000
commit070f1aed4e5e70f15bc5a8a21d4e1cf7e1f87eac (patch)
tree1b1e25d82155f61cb5896fece99c751912a1b775
parentb2e311df3280702da5c052ff5ce33d6d27090161 (diff)
downloadgdb-070f1aed4e5e70f15bc5a8a21d4e1cf7e1f87eac.zip
gdb-070f1aed4e5e70f15bc5a8a21d4e1cf7e1f87eac.tar.gz
gdb-070f1aed4e5e70f15bc5a8a21d4e1cf7e1f87eac.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
Search for file with .sl extension if no file with a .so extension is found.
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/emultempl/elf32.em14
2 files changed, 15 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e9a4474..71d5755 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -5,6 +5,10 @@
Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com)
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Search for file with .sl extension if no file with a .so extension
+ is found.
+
* emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt
at the start of the .dlt output section.
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 0c0ebb7..e590c71 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -78,7 +78,8 @@ gld${EMULATION_NAME}_before_parse()
}
/* Try to open a dynamic archive. This is where we know that ELF
- dynamic libraries have an extension of .so. */
+ dynamic libraries have an extension of .so (or .sl on oddball systems
+ like hpux). */
static boolean
gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
@@ -103,8 +104,15 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
if (! ldfile_try_open_bfd (string, entry))
{
- free (string);
- return false;
+ /* It failed using .so, try again with .sl for oddball systems
+ that use a different naming scheme (ie hpux). */
+ sprintf (string, "%s/lib%s%s.sl", search->name, filename, arch);
+
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ free (string);
+ return false;
+ }
}
entry->filename = string;