From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79866 invoked by alias); 10 May 2017 13:24:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 79826 invoked by uid 89); 10 May 2017 13:23:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=conditioned X-HELO: relay1.mentorg.com Date: Wed, 10 May 2017 13:24:00 -0000 From: Joseph Myers To: Adhemerval Zanella CC: GNU C Library Subject: Re: [PATCH 1/2] Build divdi3 only for architecture that required it In-Reply-To: <0ef59b2d-8f19-8646-a773-565dd14704f4@linaro.org> Message-ID: References: <1489671790-7611-1-git-send-email-adhemerval.zanella@linaro.org> <5067790e-50b6-d2c1-4466-26d79fc23166@linaro.org> <0ef59b2d-8f19-8646-a773-565dd14704f4@linaro.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-05/txt/msg00242.txt.bz2 On Wed, 19 Apr 2017, Adhemerval Zanella wrote: > Now to actually fix it I can think of two possible solutions: > > 1. Add divdi3 build on sparc32 as before the patch. > 2. Enforce -Wl,-noexecstack on ld.so build. 3. Add .note.GNU-stack section in libgcc/config/sparc/lb1spc.S (possibly conditioned on defined(__ELF__) && defined(__linux__), as in other architecture-specific .S files). That seems to me to be the right approach, and would fix it for other software using these libgcc functions as well. And as a very small safe patch it should be suitable for backporting onto active GCC release branches. -- Joseph S. Myers joseph@codesourcery.com