Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKpSnpKdYtM64VtjXha7DGcqX6xUCEFO8jjM2D2jPDs7DMmeyQ@mail.gmail.com>
Date: Mon, 12 Aug 2019 18:59:35 +0100
From: Jorge Almeida <jjalmeida@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Re: size of executable

On Mon, Aug 12, 2019 at 6:19 PM Rich Felker <dalias@...c.org> wrote:
>
> On Mon, Aug 12, 2019 at 05:55:28PM +0100, Jorge Almeida wrote:

> > gcc -static -Os -march=native -fomit-frame-pointer -pipe -Wall  -Werror=pedantic  -Werror=implicit-function-declaration -pedantic -pedantic-errors -mpreferred-stack-boundary=4 -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fno-unwind-tables -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-asynchronous-unwind-tables -fstrict-aliasing -Wstrict-aliasing=2 -Wno-unused-function -std=c11 hello.c
> >
> > Stripping:
> >
> > strip -s a.out
> > strip -S --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag --remove-section=.eh_frame --remove-section=.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.