diff options
author | Dima Zavin <dima@android.com> | 2009-05-29 17:30:25 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2009-06-01 12:55:48 -0700 |
commit | 0353195f344666256dba474a15c9ba22cf0cccc9 (patch) | |
tree | 79ce08ac573c6c5bd7d7a65f7fdc24237c00452a /linker | |
parent | 2e85579c34047c305caf15fb0ebe02bf3d001d0e (diff) | |
download | bionic-0353195f344666256dba474a15c9ba22cf0cccc9.zip bionic-0353195f344666256dba474a15c9ba22cf0cccc9.tar.gz bionic-0353195f344666256dba474a15c9ba22cf0cccc9.tar.bz2 |
linker: Give more context for failures during library dependency resolution.
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'linker')
-rw-r--r-- | linker/linker.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linker/linker.c b/linker/linker.c index 08a591a..e398f82 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -116,6 +116,7 @@ HOODLUM(free, void, (void *ptr)); HOODLUM(realloc, void *, (void *ptr, size_t size)); HOODLUM(calloc, void *, (size_t cnt, size_t size)); +static char tmp_err_buf[768]; static char __linker_dl_err_buf[768]; #define DL_ERR(fmt, x...) \ do { \ @@ -1615,7 +1616,9 @@ static int link_image(soinfo *si, unsigned wr_offset) DEBUG("%5d %s needs %s\n", pid, si->name, si->strtab + d[1]); soinfo *lsi = find_library(si->strtab + d[1]); if(lsi == 0) { - DL_ERR("%5d could not load '%s'\n", pid, si->strtab + d[1]); + strlcpy(tmp_err_buf, linker_get_error(), sizeof(tmp_err_buf)); + DL_ERR("%5d could not load needed library '%s' for '%s' (%s)\n", + pid, si->strtab + d[1], si->name, tmp_err_buf); goto fail; } lsi->refcount++; |