From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5294 invoked by alias); 10 Feb 2015 10:40:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4493 invoked by uid 48); 10 Feb 2015 10:40:25 -0000 From: "jgreenhalgh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/64963] IPA Cloning/Splitting does not copy function section attributes resulting in kernel miscompilation Date: Tue, 10 Feb 2015 10:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jgreenhalgh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00960.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64963 James Greenhalgh changed: What |Removed |Added ---------------------------------------------------------------------------- Target|aarch64-none-elf |aarch64-none-elf, | |x86_64-unknown-linux-gnu Status|UNCONFIRMED |NEW Last reconfirmed| |2015-02-10 Ever confirmed|0 |1 --- Comment #2 from James Greenhalgh --- Adding x86_64 to the list of targets, as this is going to be a problem for everybody. build-x86/install/bin/gcc test.c -O3 -c readelf -S test.o There are 12 section headers, starting at offset 0x128: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .text PROGBITS 0000000000000000 00000040 0000000000000012 0000000000000000 AX 0 0 16 [ 2] .data PROGBITS 0000000000000000 00000052 0000000000000000 0000000000000000 WA 0 0 1 [ 3] .bss NOBITS 0000000000000000 00000052 0000000000000000 0000000000000000 WA 0 0 1 [ 4] .text.unlikely PROGBITS 0000000000000000 00000052 0000000000000000 0000000000000000 AX 0 0 1 [ 5] .comment PROGBITS 0000000000000000 00000052 000000000000002a 0000000000000001 MS 0 0 1 [ 6] .note.GNU-stack PROGBITS 0000000000000000 0000007c 0000000000000000 0000000000000000 0 0 1 [ 7] .eh_frame PROGBITS 0000000000000000 00000080 0000000000000040 0000000000000000 A 0 0 8 [ 8] .rela.eh_frame RELA 0000000000000000 00000550 0000000000000030 0000000000000018 10 7 8 [ 9] .shstrtab STRTAB 0000000000000000 000000c0 0000000000000063 0000000000000000 0 0 1 [10] .symtab SYMTAB 0000000000000000 00000428 0000000000000108 0000000000000018 11 10 8 [11] .strtab STRTAB 0000000000000000 00000530 000000000000001b 0000000000000000 0 0 1 $ build-x86/install/bin/gcc test.c -O0 -c $ readelf -S test.o There are 13 section headers, starting at offset 0x158: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .text PROGBITS 0000000000000000 00000040 0000000000000017 0000000000000000 AX 0 0 1 [ 2] .rela.text RELA 0000000000000000 000005b0 0000000000000018 0000000000000018 11 1 8 [ 3] .data PROGBITS 0000000000000000 00000057 0000000000000000 0000000000000000 WA 0 0 1 [ 4] .bss NOBITS 0000000000000000 00000057 0000000000000000 0000000000000000 WA 0 0 1 [ 5] test_section PROGBITS 0000000000000000 00000057 0000000000000013 0000000000000000 AX 0 0 1 [ 6] .comment PROGBITS 0000000000000000 0000006a 000000000000002a 0000000000000001 MS 0 0 1 [ 7] .note.GNU-stack PROGBITS 0000000000000000 00000094 0000000000000000 0000000000000000 0 0 1 [ 8] .eh_frame PROGBITS 0000000000000000 00000098 0000000000000058 0000000000000000 A 0 0 8 [ 9] .rela.eh_frame RELA 0000000000000000 000005c8 0000000000000030 0000000000000018 11 8 8 [10] .shstrtab STRTAB 0000000000000000 000000f0 0000000000000066 0000000000000000 0 0 1 [11] .symtab SYMTAB 0000000000000000 00000498 0000000000000108 0000000000000018 12 10 8 [12] .strtab STRTAB 0000000000000000 000005a0 000000000000000f 0000000000000000 0 0 1