[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common |
Date: |
Mon, 22 Sep 2008 19:24:27 +0300 |
On 9/22/08, Kirill A. Shutemov <address@hidden> wrote:
> On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote:
> > On 9/19/08, Kirill A. Shutemov <address@hidden> wrote:
> > > On Sun, Sep 07, 2008 at 11:24:37AM +0300, Blue Swirl wrote:
> > > > Hi,
> > > >
> > > > These trivial patches enable linker flag --warn-common and fix the
> > > > warnings caused by enabling the flag.
> > >
> > >
> > > This flag cause a lot of warning on my machine, even with trivial
> program.
> > >
> > > $ cat 1.c
> > > #include <stdio.h>
> > >
> > > int main()
> > > {
> > > printf("test\n");
> > > return 0;
> > > }
> > > $ gcc -Wl,--warn-common -static 1.c
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtoul.o):
> warning: multiple common of `_nl_category_name_idxs'
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.o):
> warning: previous common is here
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol_l.o):
> warning: multiple common of `_nl_category_name_idxs'
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.o):
> warning: previous common is here
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtoul_l.o):
> warning: multiple common of `_nl_category_name_idxs'
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.o):
> warning: previous common is here
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(vfprintf.o):
> warning: multiple common of `_nl_category_name_idxs'
> > >
> /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.o):
> warning: previous common is here
> > >
> > > ...and so on.
> > >
> > >
> > > Is it problem with my toolchain? What is your testing environment?
> >
> > I get no warnings for Qemu build on Debian i386, amd64
> > (stable/unstable), Sparc32, Sparc64 or on OpenBSD/Sparc64. Your
> > program produces one warning on Debian stable (all hosts except no
> > warnings on arm), no warnings on Debian amd64 unstable or OpenBSD.
>
>
> I've got a lot of warnings on ALT Linux x86_64 and Ubuntu x86_64. Both
> with gcc 4.1.2. Are you sure that you test static build?
$ gcc -Wl,--warn-common -static main.c
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libc.a(dl-open.o):
warning: definition of `_dl_tls_static_size' overriding common
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libc.a(libc-tls.o):
warning: common is here
$ cat main.c
#include <stdio.h>
int main()
{
printf("test\n");
return 0;
}
Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common, Kirill A. Shutemov, 2008/09/19
- Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common, Blue Swirl, 2008/09/20
- Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common, Kirill A. Shutemov, 2008/09/21
- Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common, Kirill A. Shutemov, 2008/09/22
- Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common, Blue Swirl, 2008/09/22