Re: --orphan-handling=warn

From: Kees Cook
Date: Tue Feb 25 2020 - 17:02:54 EST


On Tue, Feb 25, 2020 at 12:37:26PM -0800, Nick Desaulniers wrote:
> On Tue, Feb 25, 2020 at 11:43 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> >
> > On Tue, Feb 25, 2020 at 01:29:51PM -0500, Arvind Sankar wrote:
> > > On Mon, Feb 24, 2020 at 09:35:04PM -0800, Kees Cook wrote:
> > > > Note that cheating and doing the 1-to-1 mapping by handy with a 40,000
> > > > entry linker script ... made ld.lld take about 15 minutes to do the
> > > > final link. :(
> > >
> > > Out of curiosity, how long does ld.bfd take on that linker script :)
> >
> > A single CPU at 100% for 15 minutes. :)
>
> I can see the implementers of linker script handling thinking "surely
> no one would ever have >10k entries." Then we invented things like
> -ffunction-sections, -fdata-sections, (per basic block equivalents:
> https://reviews.llvm.org/D68049) and then finally FGKASLR. "640k ought
> to be enough for anybody" and such.

Heh, yeah. I had no expectation that it would work _well_; I just
wanted to test if it _could_ work. And it did: FGKASLR up and running
on Clang+LLD. I stopped there before attempting the next step:
FGKASLR+LTO+CFI, which I assume would be hilariously slow linking.

--
Kees Cook