Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/gdb Support for compat-32 type shared...
details: https://anonhg.NetBSD.org/src/rev/f452726bf36e
branches: trunk
changeset: 461297:f452726bf36e
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 22 01:48:50 2019 +0000
description:
Support for compat-32 type shared library paths.
diffstat:
external/gpl3/gdb/dist/gdb/solib.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 5834c2624dd0 -r f452726bf36e external/gpl3/gdb/dist/gdb/solib.c
--- a/external/gpl3/gdb/dist/gdb/solib.c Fri Nov 22 00:27:30 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/solib.c Fri Nov 22 01:48:50 2019 +0000
@@ -507,10 +507,27 @@
/* Check bfd arch. */
b = gdbarch_bfd_arch_info (target_gdbarch ());
if (!b->compatible (b, bfd_get_arch_info (abfd.get ())))
- warning (_("`%s': Shared library architecture %s is not compatible "
- "with target architecture %s."), bfd_get_filename (abfd),
+ {
+ char buf[SO_NAME_MAX_PATH_SIZE];
+ char *slash = strrchr(pathname, '/');
+ if (slash)
+ {
+ struct stat st;
+
+ snprintf(buf, sizeof(buf), "%.*s/%s/%s",
+ (int)(slash - pathname), pathname, b->printable_name, slash + 1);
+ if (stat(buf, &st) == 0)
+ return solib_bfd_open(buf);
+ snprintf(buf, sizeof(buf), "%s-%s",
+ pathname, b->printable_name);
+ if (stat(buf, &st) == 0)
+ return solib_bfd_open(buf);
+ }
+ warning (_("`%s': Shared library architecture %s is not compatible "
+ "with target architecture %s."), bfd_get_filename (abfd),
bfd_get_arch_info (abfd.get ())->printable_name,
b->printable_name);
+ }
return abfd;
}
Home |
Main Index |
Thread Index |
Old Index