public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/37280]  New: weak symbol regression breaks linux kernel
@ 2008-08-29 15:13 ak at muc dot de
  2008-08-29 16:03 ` [Bug other/37280] " andi-gcc at firstfloor dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ak at muc dot de @ 2008-08-29 15:13 UTC (permalink / raw)
  To: gcc-bugs

The linux kernel doesn't build anymore with gcc version 4.4.0 20080826

The problem seems to be that one extern variable (kallsyms_token_index)
declared with  __attribute__((weak)) does not get a ".weak" in the assembler
output
anymore (compared the gcc 4.3)

I attached a preprocessed test case.

Build options:
-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -pipe
-Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -Iinclude/asm-x86/mach-default -Wframe-larger-than=2048
-fno-stack-protector -fomit-frame-pointer --param large-stack-frame=100 --param
large-stack-frame-growth=100 -Wdeclaration-after-statement -Wno-pointer-sign
-fverbose-asm

Built with gcc43:

% grep kallsyms_token_index kernel/kallsyms.s
 movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index, tmp118
        movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index,
tmp124
        movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index,
tmp105
        movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index,
tmp102
        movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index,
tmp106
        movzwl  kallsyms_token_index(%rax,%rax), %eax   # kallsyms_token_index,
tmp93
        .weak   kallsyms_token_index


With 4.4:
  movzwl  kallsyms_token_index(%rdx,%rdx), %edx   # kallsyms_token_index,
tmp116
        movzwl  kallsyms_token_index(%rdi,%rdi), %edi   # kallsyms_token_index,
tmp122
        movzwl  kallsyms_token_index(%rdx,%rdx), %edx   # kallsyms_token_index,
tmp103
        movzwl  kallsyms_token_index(%rdx,%rdx), %edx   # kallsyms_token_index,
tmp100
        movzwl  kallsyms_token_index(%rcx,%rcx), %ecx   # kallsyms_token_index,
tmp103
        movzwl  kallsyms_token_index(%rcx,%rcx), %ecx   # kallsyms_token_index,
tmp91


Note no ".weak" in the second case. This breaks the build because it relies
on this symbol being weak on the first link pass.


-- 
           Summary: weak symbol regression breaks linux kernel
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ak at muc dot de
  GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux


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


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

end of thread, other threads:[~2008-09-22  2:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-29 15:13 [Bug other/37280] New: weak symbol regression breaks linux kernel ak at muc dot de
2008-08-29 16:03 ` [Bug other/37280] " andi-gcc at firstfloor dot org
2008-08-29 16:03 ` hp at gcc dot gnu dot org
2008-08-29 16:32 ` hp at gcc dot gnu dot org
2008-08-29 17:04 ` hp at gcc dot gnu dot org
2008-08-30 14:02 ` [Bug middle-end/37280] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-09-03 22:59 ` happyarch at gmail dot com
2008-09-03 23:25 ` hp at gcc dot gnu dot org
2008-09-04 23:08 ` happyarch at gmail dot com
2008-09-09 20:31 ` jsm28 at gcc dot gnu dot org
2008-09-16  1:13 ` chaoyingfu at gcc dot gnu dot org
2008-09-16 18:56 ` chaoyingfu at gcc dot gnu dot org
2008-09-16 19:17 ` aldot at gcc dot gnu dot org
2008-09-22  1:56 ` hp at gcc dot gnu dot org
2008-09-22  1:57 ` hp at gcc dot gnu dot org
2008-09-22  2:13 ` hp at gcc dot gnu dot org

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