aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-01 21:16:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-01 21:16:32 +0000
commit51ff6adc94ec0770a58ae3c4ac65d5a61cfc20f7 (patch)
tree36fc060a78eabc97af0bfbd6ae04ab78faace8e0 /cddl/contrib/opensolaris/tools
parent3f3a5dbd2c7f6a71469e1181d14e01aff9f3267e (diff)
downloadsrc-51ff6adc94ec0770a58ae3c4ac65d5a61cfc20f7.tar.gz
src-51ff6adc94ec0770a58ae3c4ac65d5a61cfc20f7.zip
Follow up to r247960 and rr247960 by also amending ctfmerge. For the
only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname. Reported by: avg Tested by: avg, jimharris MFC after: 1 week
Notes
Notes: svn path=/head/; revision=248991
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/input.c b/cddl/contrib/opensolaris/tools/ctf/cvt/input.c
index 67ebde702298..240094212f5b 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/input.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/input.c
@@ -387,6 +387,7 @@ GElf_Sym *
symit_next(symit_data_t *si, int type)
{
GElf_Sym sym;
+ char *bname;
int check_sym = (type == STT_OBJECT || type == STT_FUNC);
for (; si->si_next < si->si_nument; si->si_next++) {
@@ -394,8 +395,10 @@ symit_next(symit_data_t *si, int type)
gelf_getsym(si->si_symd, si->si_next, &sym);
si->si_curname = (caddr_t)si->si_strd->d_buf + sym.st_name;
- if (GELF_ST_TYPE(sym.st_info) == STT_FILE)
- si->si_curfile = si->si_curname;
+ if (GELF_ST_TYPE(sym.st_info) == STT_FILE) {
+ bname = strrchr(si->si_curname, '/');
+ si->si_curfile = bname == NULL ? si->si_curname : bname + 1;
+ }
if (GELF_ST_TYPE(sym.st_info) != type ||
sym.st_shndx == SHN_UNDEF)