From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7548 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] force LTO to be disabled when compiling dlstart.lo Date: Tue, 28 Apr 2015 22:23:37 +0300 (MSK) Message-ID: References: <1430201554-11359-1-git-send-email-armccurdy@gmail.com> <20150428134317.GL17573@brightrain.aerifal.cx> <20150428185852.GP17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1430249036 21763 80.91.229.3 (28 Apr 2015 19:23:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 19:23:56 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7561-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 28 21:23:56 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YnB6k-0003cE-7u for gllmg-musl@m.gmane.org; Tue, 28 Apr 2015 21:23:50 +0200 Original-Received: (qmail 21962 invoked by uid 550); 28 Apr 2015 19:23:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 21944 invoked from network); 28 Apr 2015 19:23:48 -0000 In-Reply-To: <20150428185852.GP17573@brightrain.aerifal.cx> User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7548 Archived-At: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703 > > I have an interesting solution to this problem: get rid of the > top-level asm and instead put it inside the function with 2 additional > lines: > > - At the top, "jmp 9f" or equivalent. > - At the bottom, "9:". > > Now the asm can't be separated from the function because it's part of > it. Would that work? I think it would avoid the LTO partitioning issue, but it would also be a step back in terms of solving their original problem, which was to avoid duplicates of syscall entry sequence being potentially emitted. As another GCC discussion mentions, they started using toplevel asm there after they found they couldn't instruct Clang not do duplicate that function, unlike they could, with function attributes, tame GCC. Alexander