Re: Cygwin libtool confused about link library

JonY <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general,gmane.os.cygwin
Message-ID <[email protected]>
On 3/9/20 9:01 PM, Simon Marchi wrote:
>> Hello libtool folks,
>> Any ideas about this? Something confused the file magic command?
>> dlltool --identify does show libdl.a is associated with cygwin1.dll for
>> example.
> 
> Hi,
> 
> I stumbled on this and dug into libtool, here's what I found.
> 
> As part of the process of identifying the nature these libraries, libtool uses
> this nm + sed snippet [1]:
> 
> 	win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
> 	  $SED -n -e '
> 	    1,100{
> 		/ I /{
> 		    s|.*|import|
> 		    p
> 		    q
> 		}
> 	    }'`
> 	;;
> 
> The sed scripts looks for a line containing the " I " string.
> 
> With binutils < 2.34, the nm output looked like:
> 
>   /usr/lib/libdl.a[d000000.o]: libdl_dll_iname I 0000000000000000
> 
> With binutils 2.34, the corresponding line is:
> 
>   /usr/lib/libdl.a[d000000.o]: libdl_dll_iname D 0
> 
> And therefore the library is mis-identified.
> 
> The commit that introduced this regression is:
> 
>   commit a288c270991de1578ad28ac312120f4167347234
>   Author: Alan Modra <[email protected]>
>   Date:   Fri May 3 21:36:46 2019 +0930
> 
>       PR24511, nm should not mark symbols in .init_array as "t"
> 
> I tried building the latest commit on the binutils-2_34-branch, and the behavior
> has been restored (the line shows " I " again).  The commit that restored the
> behavior is:
> 
>   commit 40bfb9762747f8336b17c70a0173d10200fa62eb
>   Author: Alan Modra <[email protected]>
>   Date:   Thu Feb 27 17:28:47 2020 +1030
> 
>       Re: PR24511, nm should not mark symbols in .init_array as "t"
> 
> So this should all go back to normal when there is a binutils 2.34.1 release and it is
> packaged by Cygwin.  In the mean time, the commit that restored the behavior could maybe
> be backported in the Cygwin package, but I don't know what the habits are in Cygwin for
> this kind of thing.
> 
> Simon
> 
> [1] https://github.com/autotools-mirror/libtool/blob/b9b44533fbf7c7752ffd255c3d09cc360e24183b/build-aux/ltmain.in#L3050-L3059
> 

Thanks for investigating, I'll see about doing a new binutils release.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5QrdnbBX9Ppk4bbPcTtf4pwUXUUFAl5mzx4ACgkQcTtf4pwU
XUVPAQ/8Ccti+ufiP1KYhKnyk+ungGSP6FIPvAjcLaorXayXU0rB9QHCHpJEvURq
gTa9/Hpo6S17mJrpfhx9QlVzPQdrCpC5IN7yhaYObAe8a6ECmiyWanmI6GctHawA
qAVZkhmgHnTFOB+9k+GRo8xPI276w5EOmS2BFYdeCjoaVt8MqKgtuJlUDzYD9GCZ
26hE969eD/CtlJ/LanJe6Ul2zjie9OYLBETZKBbo0XA45FZYtvPImxjmhiJbdGTv
CXhg0RXFqqnASpQhVDQZcSqYItL1ToeonvfNGFnOPo5xX71hLQdhE6NZkgTxeaA0
LwrKysBWImPCzy2fE6Jpntn97/Y4+UzS0I4Oj5XSCHHh3V5SbNjoujv8ZzdXF2iw
uKSdj7WsuYjlD2TJEQ/QdySL2ix3WuLgj8C2j8jOVSpRWh7EoAt6XDpkdSeVeM7n
3PXwyS+9wS5xN7vsvrx1pf+CXHR9/j4/diJkI0/H7j0HfEy5EnfjGOnN1EeMCw/j
vPnkZX7LpXdM/tFCtQITJa70e0YCoVytGZDKUA863r3aW3eNwCZXefrN7D+SuPiH
M7grTSSWrHCSvRv3vItkK2d/94xPbn8VXZVp0FymlfEcDI9AWCOPP//XK+It7jIL
+aQZ3Ks9LlkJgDxt/Zx8EDuWB12SgbuEBsIQfuKI72+g8HSdXlE=
=aY1d
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.