From patchwork Fri May 31 18:13:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Stump X-Patchwork-Id: 247998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A3A752C008C for ; Sat, 1 Jun 2013 04:13:56 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; q=dns; s=default; b=Xotr37+LMchpWugWlMS3CPuUPJ 7WPcCidL6j2ecFanJHeEmijGDIHvHrcLU74fuHszEShlVwFmHmC4vFPs/EHipNHS 4pVlmKQDCMTRSd/zgTtnioBBQH4a5EJLeVrasRYD2Jhz/dNBndg/YWu9utFU3f/B TOP7k9Im5e1Kj+kCM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; s=default; bh=z+Idjg6JdYAKDuckbBBZDzgnbBs=; b= CngllFEDQfgRuQ87eg4DKqF/5d24wOwHNo9JnQA45N9M7+XckKVJNtYVF5GzZ5Kk jUGLCOHlAJ6CA9GJsYoHv9ruBnEpn6eiO9r/18BEZAjf8QBYhiiJWbdYbL6XZd/w DJ9Ceoon4NDgZLk9zBjve7D4aKghzwqrayBrdtz22xU= Received: (qmail 10943 invoked by alias); 31 May 2013 18:13:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10932 invoked by uid 89); 31 May 2013 18:13:50 -0000 X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from qmta03.westchester.pa.mail.comcast.net (HELO qmta03.westchester.pa.mail.comcast.net) (76.96.62.32) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 18:13:49 +0000 Received: from omta01.westchester.pa.mail.comcast.net ([76.96.62.11]) by qmta03.westchester.pa.mail.comcast.net with comcast id ibQ61l0030EZKEL53iDoPp; Fri, 31 May 2013 18:13:48 +0000 Received: from bag6-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([IPv6:2001:470:1f04:ae1::2]) by omta01.westchester.pa.mail.comcast.net with comcast id iiDm1l00m0P3DwE3MiDnBr; Fri, 31 May 2013 18:13:48 +0000 From: Mike Stump Subject: default_no_named_section bad default Message-Id: <72050C5D-275C-4457-9D5C-FE4A96F029BE@comcast.net> Date: Fri, 31 May 2013 11:13:46 -0700 To: gcc-patches@gcc.gnu.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) So, on darwin, the new tools don't like FDE information when you have: __Z24default_no_named_sectionPKcjP9tree_node: LFB588: LFE588: in the object file. $ dwarfdump --eh-frame --verify varasm.o ---------------------------------------------------------------------- File: varasm.o (x86_64) ---------------------------------------------------------------------- Verifying EH Frame... error: FDE row for address 0x00000000000058f0 is not in the FDE address range. 0x000020e0: FDE length: 0x0000001c CIE_pointer: 0x00000000 start_addr: 0x00000000000058f0 __Z24default_no_named_sectionPKcjP9tree_node range_size: 0x0000000000000000 (end_addr = 0x00000000000058f0) DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop Instructions: 0x00000000000058f0: CFA=rsp+8 rip=[rsp] which, well, seems reasonable. This causes the static linker to reject it. Now, one can prune out the pair, but, I think really, we either need to have a default of 0 (to crash in a nice way), or an assert (to crash in a nice way). Just falling off then end into space (the next function in the executable file), seems wrong. Ok? PR57438 * varasm.c (default_no_named_section): Assert instead. Index: varasm.c =================================================================== --- varasm.c (revision 199270) +++ varasm.c (working copy) @@ -6052,7 +6052,7 @@ default_no_named_section (const char *na { /* Some object formats don't support named sections at all. The front-end should already have flagged this as an error. */ - gcc_unreachable (); + gcc_assert (0); } #ifndef TLS_SECTION_ASM_FLAG