From: Micha Nelissen <nelissen.micha@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Re: size of executable
Date: Tue, 13 Aug 2019 12:15:59 +0200 [thread overview]
Message-ID: <f99c8efc-9b8a-0963-f23d-32b343d49eaa@gmail.com> (raw)
In-Reply-To: <20190812182302.GW9017@brightrain.aerifal.cx>
On 12-08-2019 20:23, Rich Felker wrote:
> On Mon, Aug 12, 2019 at 11:16:39AM -0700, Khem Raj wrote:
>> On Mon, Aug 12, 2019 at 10:19 AM Rich Felker <dalias@libc.org> wrote:
>>> On Mon, Aug 12, 2019 at 05:55:28PM +0100, Jorge Almeida wrote:
>>>> On Mon, Aug 12, 2019 at 5:48 PM Jorge Almeida <jjalmeida@gmail.com> wrote:
>>>>> I get 16768 bytes (not stripped) and 12324 (stripped).
>>>
>>> This is a binutils regression from a dubious anti-ROP feature, -z
>>> separate-code. Add -Wl,-z,noseparate-code and it will go away.
>>
>> is this still so with latest release as well.
>
> The breakage that caused separate-code to crash at runtime was fixed
> between 2.31 and 2.32, but the size and performance regression
> remains. With separate-code, a couple extra pages of memory and disk
> are needed, with corresponding runtime cost to mmap them properly.
>
> All to avoid ROP gadgets, when every single dynamic-linked program has
> a nice ROP gadget named "system" (among many others) in it...
I'm curious. Jorge reports that the executable goes from 12k to 4k. That
suggests two pages saved? But if I look at documentation for this
separate-code option, then it says to allocate a separate code PT_LOAD
segment. (PT_LOAD just means loadable?) That would suggest up to 4k more
usage, not 8k right? One extra page necessary. Are by default rodata and
code combined but with separate-code those are separated? Or something
more happening?
Thanks, Micha
next prev parent reply other threads:[~2019-08-13 10:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 16:48 Jorge Almeida
2019-08-12 16:55 ` Jorge Almeida
2019-08-12 17:18 ` Rich Felker
2019-08-12 17:59 ` Jorge Almeida
2019-08-12 18:16 ` Khem Raj
2019-08-12 18:23 ` Rich Felker
2019-08-13 10:15 ` Micha Nelissen [this message]
2019-08-13 11:45 ` Fangrui Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f99c8efc-9b8a-0963-f23d-32b343d49eaa@gmail.com \
--to=nelissen.micha@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).