From: Roland McGrath Date: Wed, 16 Jun 2010 03:56:30 +0000 (-0700) Subject: Change unstrip -n display of build ID vaddr to be module-relative. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Froland%2Funstrip-buildid-relative;p=thirdparty%2Felfutils.git Change unstrip -n display of build ID vaddr to be module-relative. --- diff --git a/src/unstrip.c b/src/unstrip.c index 443cd620d..6138b233b 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -2132,7 +2132,12 @@ list_module (Dwfl_Module *mod) printf ("%02" PRIx8, *id++); while (--id_len > 0); if (id_vaddr != 0) - printf ("@%#" PRIx64, id_vaddr); + { + if (id_vaddr > start && id_vaddr < end) + printf ("@+%#" PRIx64, id_vaddr - start); + else + printf ("@%#" PRIx64, id_vaddr); + } } else putchar ('-');