summaryrefslogtreecommitdiff
path: root/bfd/cpu-d10v.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-04-14 17:23:55 +0100
committerPedro Alves <palves@redhat.com>2014-04-15 12:59:12 +0100
commit2d1baf521e08bc390d604aaf1326347cc130ce1f (patch)
treeded0acfed3bbb5d062867e12eec6767536d297f2 /bfd/cpu-d10v.c
parent7dd6df0171796757f404a549c76f0d9b9192c849 (diff)
downloadbinutils-gdb-2d1baf521e08bc390d604aaf1326347cc130ce1f.tar.gz
Make sym-file.exp work with remote targets and hosts.
The main issue here is that this test passes the host's absolute path to the library to load to the "dlopen"-like routine, which doesn't work when either the target or the host are remote, unless a shared filesystem has been set up. Tests that dynamically load a library solve this by dlopen'ing by basename, and setting rpath to $ORIGIN. See gdb_compile. This test doesn't use dlopen, but instead uses its own simple elf loader. The fix is to pass this loader the library basename, and teach it to look up the library by basename in the executable's directory as well, i.e., assuming/emulating RPATH=$ORIGIN. Tested on x86_64 Fedora 17, native and gdbserver. I looked around in the web to figure out Linux's /proc/self/exe equivalents in other ELF OSs. I think I covered all relevant, but if not, I think it'll be simple enough to add more. (Note the test is skipped on non-ELF targets.) Tested on x86_64 Fedora 17, native and gdbserver. gdb/testsuite/ 2014-04-15 Pedro Alves <palves@redhat.com> * gdb.base/sym-file-loader.c: Include <limits.h>. (SELF_LINK): New define. (get_origin): New function. (load_shlib): Use it. * gdb.base/sym-file.exp: Don't early return if the target is remote. Use runto_main, and issue fail is that fails. Use gdb_load_shlibs. (shlib_name): Delete. (lib_so, lib_syms, lib_dlopen): New globals. Use them throughout.
Diffstat (limited to 'bfd/cpu-d10v.c')
0 files changed, 0 insertions, 0 deletions