From: Peter Rosin Date: Fri, 19 Oct 2012 06:54:15 +0000 (+0200) Subject: libtool: avoid non-underscore symbols in the "dumpbin -symbols" wrapper X-Git-Tag: v2.4.2.418~116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55fd801b97a669ba5336836ce7b8971b8673a517;p=thirdparty%2Flibtool.git libtool: avoid non-underscore symbols in the "dumpbin -symbols" wrapper If an object has a symbol lacking an expected leading underscore, the symbol name is not printed, but the symbol type is, leading to output such as: T _normal _normal T T _another _another when the expected output would have been something like: T _normal _normal T no_underscore no_underscore T _another _another However, symbols lacking an expected leading underscore are not "real" symbols, they are internal symbols which we don't care about, therefore drop them instead. * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [MSVC]: Output the whole symbol line in one go. * NEWS: Update. --- diff --git a/NEWS b/NEWS index d2e48d632..17436b1cd 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool (e.g. the ability to parse `var+=append') as $CONFIG_SHELL, libtool will now correctly fallback to using only vanilla shell features instead of failing with a parse at startup. + - Fix a bug in the wrapper for using Microsoft dumpbin as name lister + which could lead to broken symbol listings in some corner cases. ** Important incompatible changes: diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 2dac8a13d..d02bd252b 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -3686,10 +3686,10 @@ for ac_symprfx in "" "_"; do " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"