public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13856] New: hidden support broken with builtin functions
@ 2004-01-25 12:28 aj at gcc dot gnu dot org
  2004-01-25 12:29 ` [Bug c/13856] " aj at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: aj at gcc dot gnu dot org @ 2004-01-25 12:28 UTC (permalink / raw)
  To: gcc-bugs

With current GCC 3.4 I cannot build glibc anymore, it fails with:
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_strncmp'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_strftime'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_fputs_unlocked'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_fwrite_unlocked'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_memmove'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_strncpy'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI__exit'
/builds/glibc/3.4/libc.so.6: undefined reference to `__GI_strstr'
collect2: ld returned 1 exit status

Let's look at fputs_unlocked:

The 3.3 branch compiles the file to use the following symbols:

$ nm libio/iofputs_u.os
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 T __GI_fputs_unlocked
0000000000000000 T fputs_unlocked
                 U strlen

3.4 compiles to:
$ nm libio/iofputs_u.os
                 U __GI_fputs_unlocked
                 U __GI_strlen
0000000000000000 T fputs_unlocked


Looking further into this, I see the following difference between 3.4
and 3.3 in the assembler files:

3.3 branch outputs:
        .globl fputs_unlocked ; .set fputs_unlocked, __GI_fputs_unlocked
#NO_APP
        .p2align 4,,15
.globl __GI_fputs_unlocked
        .hidden __GI_fputs_unlocked
        .type   __GI_fputs_unlocked, @function
__GI_fputs_unlocked:

But 3.4 does:
        .globl fputs_unlocked ; .set fputs_unlocked, __GI_fputs_unlocked
#NO_APP
        .p2align 4,,15
.globl fputs_unlocked
        .type   fputs_unlocked, @function
fputs_unlocked:

I'm appending a small test program for this.

Looking at the produced assembler files, you'll see the difference directly.

-- 
           Summary: hidden support broken with builtin functions
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: zack at codesourcery dot com
        ReportedBy: aj at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13856


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-02-08  7:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 12:28 [Bug c/13856] New: hidden support broken with builtin functions aj at gcc dot gnu dot org
2004-01-25 12:29 ` [Bug c/13856] " aj at gcc dot gnu dot org
2004-01-25 12:30 ` aj at gcc dot gnu dot org
2004-01-25 15:52 ` [Bug c/13856] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-01-26  6:30 ` [Bug c/13856] [3.4/3.5 " aj at gcc dot gnu dot org
2004-02-01 13:28 ` pinskia at gcc dot gnu dot org
2004-02-03 20:19 ` uweigand at gcc dot gnu dot org
2004-02-03 20:47 ` uweigand at gcc dot gnu dot org
2004-02-03 21:25 ` zack at gcc dot gnu dot org
2004-02-08  1:52 ` cvs-commit at gcc dot gnu dot org
2004-02-08  1:54 ` zack at codesourcery dot com
2004-02-08  1:59 ` cvs-commit at gcc dot gnu dot org
2004-02-08  2:01 ` zack at gcc dot gnu dot org
2004-02-08  6:41 ` aj at suse dot de
2004-02-08  7:10 ` zack at codesourcery dot com
2004-02-08  7:25 ` gdr at integrable-solutions dot net

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).