From: JonY <10walls@gmail.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: cygwin@cygwin.com, Libtool List <libtool@gnu.org>
Subject: Re: Cygwin libtool confused about link library
Date: Mon, 9 Mar 2020 23:19:47 +0000 [thread overview]
Message-ID: <8d616249-401b-db48-ae9a-cd77b15c63e6@gmail.com> (raw)
In-Reply-To: <7266f738-eddd-14b2-9908-846faa76290d@efficios.com>
[-- Attachment #1.1: Type: text/plain, Size: 2169 bytes --]
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 <amodra@gmail.com>
> 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 <amodra@gmail.com>
> 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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-03-09 23:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 10:40 [ANNOUNCEMENT] Updated: binutils-2.34-1 (x86/x86_64) JonY
2020-02-29 19:23 ` Marco Atzeri
2020-03-01 2:18 ` JonY
2020-03-01 11:00 ` Marco Atzeri
2020-03-01 13:02 ` Cygwin libtool confused about link library JonY
2020-03-09 21:01 ` Simon Marchi
2020-03-09 23:19 ` JonY [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d616249-401b-db48-ae9a-cd77b15c63e6@gmail.com \
--to=10walls@gmail.com \
--cc=cygwin@cygwin.com \
--cc=libtool@gnu.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).