From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8AA073877024; Wed, 11 Mar 2020 14:48:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AA073877024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583938104; bh=IjiC7k24hX9aK1g2PN8V5/RH0hw2WbVHRqJSzNNtikE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RhlUDbGyJTQxd9Iaok4Sbrih4Zlw5AJAMp4YtYiWrWT4aPZHP8ELM66UwHKk/krLf PjfS9c3rwdQIFHa7v+ijadT0zYZBwq0yBjZXyqExpk/r8jfRimtVa3vOCDpTZxM/8X iSvFv00XwDeGtsiqRXi9kcq0LSvFGy37ZlWFEPfw= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94134] pdp11-aout puts initial variable into .text section rather than .data Date: Wed, 11 Mar 2020 14:48:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 14:48:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94134 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pkoning at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- The generic code wants to emit this into lcomm_section: 1203 if (ADDR_SPACE_GENERIC_P (as) 1204 && !DECL_THREAD_LOCAL_P (decl) 1205 && !(prefer_noswitch_p && targetm.have_switchable_bss_section= s) 1206 && bss_initializer_p (decl)) 1207 { 1208 if (!TREE_PUBLIC (decl) 1209 && !((flag_sanitize & SANITIZE_ADDRESS) 1210 && asan_protect_global (decl))) 1211 return lcomm_section; 1212 if (bss_noswitch_section) 1213 return bss_noswitch_section; 1214 } which is a NOSWITCH section, see https://gcc.gnu.org/ml/gcc-patches/2006-02/msg01857.html pdp11 defines ASM_OUTPUT_ALIGNED_LOCAL to pdp11_asm_output_var (similarly f= or ASM_OUTPUT_ALIGNED_COMMON), but as both are NOSWITCH sections, I think it is wrong to emit it in whatever section is currently active.=