From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14555 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jorge Almeida Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: size of executable Date: Mon, 12 Aug 2019 18:59:35 +0100 Message-ID: References: <20190812171851.GS9017@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152042"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14571-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 12 19:59:59 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hxEbu-000dQV-MQ for gllmg-musl@m.gmane.org; Mon, 12 Aug 2019 19:59:58 +0200 Original-Received: (qmail 20371 invoked by uid 550); 12 Aug 2019 17:59:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20352 invoked from network); 12 Aug 2019 17:59:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=TKkk9dCioQ8r1rH/pk44F6wDFbI5W74InRv8FPVp0Fc=; b=NXT6Ox+pbHVlNpsUO49QrPqQs//vZXKpr4S+Ktb1JZqbtTd9ZPSH2xXWgdaDRzf6Jw S7NL+7tbtpgJ5GDFZufW6qS3hieHdsWVHrH+2NeJXdPbU/mHH571k6G8CVLZJSexRNHi v49I70uJjs8nLK13uCm/5gRAkm3mgMv4l5QYdPwtxRvo6fGVche5vGeRw4yIPDVwdSXB YvvqIDZCzxjhOX6iapgLIFxDYOtmkhEpZni49Y31J8iqX9o+JV9utk3Xm5xYsrRUGa5T FvHFCJWR2OdLSbPhqnVCdmY9N7UgOc8/r4ZBO1dCFVmFO2DjpHt9YlrF3KTlhAOeA0fY LH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=TKkk9dCioQ8r1rH/pk44F6wDFbI5W74InRv8FPVp0Fc=; b=SlYvD+iN/w9w2MCFhJiBqT4jBIg+o9HYMWM+vUjn9a6GaoM++07dPuWzSjdPnug+Ko bGwWDykDPl5tPsLwY9JucIkFwpXpbNlzSbiZNVJBAYj7HReDo9TMcecHOwNw8RJ+ni+N n0JD/fJHWX8sL31CY/s4w3bu2pEyzF6neqkcVLBy4/Zpxqv2cShpzEyYOsKNM+YXFy+w QBcshbevrKYlVZP0as4JR1x0PKRqbsC7xgNqr7HLY+rtwJtc/9PkhDqw1OCHI+fCM7uQ On7sb2FRNnWznW0BCmqLt36HeyoTVAiXleFekwkpvEiWlxKIVMmFcb/IrGqch6NK3Z/J Q7hQ== X-Gm-Message-State: APjAAAUGzKdLVvumT44sI2YpVR9ghICGbX5LThlAEqiBNuJon1tOoEYH KdpNHS2/6+H30Vo8WFz5g65nLKeEwWukEl3X0CBBy2fN X-Google-Smtp-Source: APXvYqzSfiekxmGaI1KACWXlUyDFdcIfLgs9T37Rf3TD8a+EIxIJNu/nuYfLh1CD4Aj0wVlyEXg/EfkSH2i3VIZCY2Q= X-Received: by 2002:a2e:3a0e:: with SMTP id h14mr2835825lja.180.1565632784372; Mon, 12 Aug 2019 10:59:44 -0700 (PDT) In-Reply-To: <20190812171851.GS9017@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14555 Archived-At: On Mon, Aug 12, 2019 at 6:19 PM Rich Felker wrote: > > On Mon, Aug 12, 2019 at 05:55:28PM +0100, Jorge Almeida wrote: > > gcc -static -Os -march=3Dnative -fomit-frame-pointer -pipe -Wall -Werr= or=3Dpedantic -Werror=3Dimplicit-function-declaration -pedantic -pedantic-= errors -mpreferred-stack-boundary=3D4 -falign-functions=3D1 -falign-jumps= =3D1 -falign-loops=3D1 -fno-unwind-tables -fdata-sections -ffunction-sectio= ns -Wl,--gc-sections -fno-asynchronous-unwind-tables -fstrict-aliasing -Wst= rict-aliasing=3D2 -Wno-unused-function -std=3Dc11 hello.c > > > > Stripping: > > > > strip -s a.out > > strip -S --strip-unneeded --remove-section=3D.note.gnu.gold-version --r= emove-section=3D.comment --remove-section=3D.note --remove-section=3D.note.= gnu.build-id --remove-section=3D.note.ABI-tag --remove-section=3D.eh_frame = --remove-section=3D.eh_frame_ptr -R .note -R .comment -R .note.GNU-stack a.= out > > sstrip a.out > > This is a binutils regression from a dubious anti-ROP feature, -z > separate-code. Add -Wl,-z,noseparate-code and it will go away. > > FYI musl-cross-make has been updated to change the default back in > toolchains it builds. > Aha! 8472 not stripped and 4132 stripped. Thanks! Jorge