public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dongsheng.song at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57120] New: Plain C link with libgcc_s_sjlj-1.dll which not needed
Date: Tue, 30 Apr 2013 01:47:00 -0000 [thread overview]
Message-ID: <bug-57120-4@http.gcc.gnu.org/bugzilla/> (raw)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57120
Bug #: 57120
Summary: Plain C link with libgcc_s_sjlj-1.dll which not needed
Classification: Unclassified
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dongsheng.song@gmail.com
Here is example:
$ cat t-w32.c
long long do_div(long long a, long long b)
{
return a/b;
}
i686-w64-mingw32-gcc -shared -o t-w32.dll t-w32.c
i686-w64-mingw32-objdump -x t-w32.dll | grep "DLL Name"
gcc 4.8:
DLL Name: libgcc_s_sjlj-1.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
gcc 4.7:
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
Then I investigate why the gcc 4.8 output dll use libgcc_s_sjlj-1.dll,
I found t-w32.dll use the following symbols in libgcc_s_sjlj-1.dll:
i686-w64-mingw32-objdump -x t-w32.dll | less
DLL Name: libgcc_s_sjlj-1.dll
vma: Hint/Ord Member-Name Bound-To
c200 41 __divdi3
c20c 119 __udivdi3
c218 121 __umoddi3
I think this is a regress, isn't it ?
I found in gcc/config/i386/mingw32.h:
/* Include in the mingw32 libraries with libgcc */
#ifdef ENABLE_SHARED_LIBGCC
#define SHARED_LIBGCC_SPEC " \
%{static|static-libgcc:-lgcc -lgcc_eh} \
%{!static: \
%{!static-libgcc: \
%{!shared: \
%{!shared-libgcc:-lgcc -lgcc_eh} \
%{shared-libgcc:-lgcc_s -lgcc} \
} \
%{shared:-lgcc_s -lgcc} \
} \
} "
#else
#define SHARED_LIBGCC_SPEC " -lgcc "
#endif
If I change '-lgcc_s -lgcc' to '-lgcc -lgcc_s', then gcc 4.8 will not use such
symbols like __divdi3 in libgcc_s_sjlj-1.dll, it back to gcc 4.7 behavior.
Because both lib/libgcc_s.a (libgcc_s_sjlj-1.dll)and
lib/gcc/i686-w64-mingw32/4.8.1/libgcc.a
export these symbols:
___divdi3
___moddi3
___moddi3
...
I think this change is hastily, should be rollback, or make
libgcc_s${LIBGCC_EH_EXTN}-1.dll
DO NOT export extra symbols which not owned their self.
>From gcc-bugs-return-421237-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 30 05:34:46 2013
Return-Path: <gcc-bugs-return-421237-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16569 invoked by alias); 30 Apr 2013 05:34:46 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16518 invoked by uid 48); 30 Apr 2013 05:34:42 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/57098] ICE: in extract_insn, at recog.c:2154 (unrecognizable insn) with -mcmodel=large -msse4 and __builtin_shuffle()
Date: Tue, 30 Apr 2013 05:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ubizjak at gmail dot com
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Changed-Fields: URL
Message-ID: <bug-57098-4-rDzQmTkBBn@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57098-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57098-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg02382.txt.bz2
Content-length: 3528
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW098
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2013-04/msg01749.htm
| |l
--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2013-04-30 05:34:39 UTC ---
Author: uros
Date: Mon Apr 29 18:20:58 2013
New Revision: 198430
URL: http://gcc.gnu.org/viewcvs?rev\x198430&root=gcc&view=rev
Log:
PR target/57098
* config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
testsuite/ChangeLog:
PR target/57098
* gcc.target/i386/pr57098.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr57098.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
Author: uros
Date: Mon Apr 29 22:16:04 2013
New Revision: 198434
URL: http://gcc.gnu.org/viewcvs?rev\x198434&root=gcc&view=rev
Log:
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/44578
* config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
alternative.
(*zero_extendsidi2): Ditto.
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/57098
* config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
testsuite/ChangeLog:
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/44578
* gcc.target/i386/pr44578.c: New test.
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/57098
* gcc.target/i386/pr57098.c: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr44578.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr57098.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/i386/i386.c
branches/gcc-4_8-branch/gcc/config/i386/i386.md
branches/gcc-4_8-branch/gcc/config/i386/sse.md
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
Author: uros
Date: Tue Apr 30 05:30:20 2013
New Revision: 198439
URL: http://gcc.gnu.org/viewcvs?rev\x198439&root=gcc&view=rev
Log:
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/44578
* config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
alternative.
(*zero_extendsidi2): Ditto.
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/57098
* config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
testsuite/ChangeLog:
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/44578
* gcc.target/i386/pr44578.c: New test.
Backport from mainline
2013-04-29 Uros Bizjak <ubizjak@gmail.com>
PR target/57098
* gcc.target/i386/pr57098.c: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr44578.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr57098.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/i386.c
branches/gcc-4_7-branch/gcc/config/i386/i386.md
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
next reply other threads:[~2013-04-30 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 1:47 dongsheng.song at gmail dot com [this message]
2013-04-30 10:42 ` [Bug target/57120] " ktietz at gcc dot gnu.org
2013-04-30 10:52 ` dongsheng.song at gmail dot com
2013-04-30 11:03 ` ktietz at gcc dot gnu.org
2013-04-30 11:53 ` dongsheng.song at gmail dot com
2013-04-30 13:34 ` ktietz at gcc dot gnu.org
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=bug-57120-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).