[PATCH] D25467: [ELF] - Alternative fix to prevent possible crash on large output.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 15:30:52 PDT 2016

On Mon, Oct 17, 2016 at 3:21 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Mon, Oct 17, 2016 at 3:06 PM, Davide Italiano <davide at freebsd.org> wrote:
>> On Mon, Oct 17, 2016 at 2:26 PM, Rui Ueyama via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>> > This is a list of items that popped in my mind. Not exhaustive but
>> > probably
>> > good enough to start discussing what we should do next.
>> >
>> >  - FreeBSD: what is the status of building the entire FreeBSD system
>> > with
>> > LLD? Can it build everything including the kernel?
>> >
>> Another idea, which I discussed with Rafael and Michael a bit ago.
>> Implement support for order file. For starters, you don't need anything
>> fancy.
>> Just get a list of symbols (which can be generated by systap or a
>> profiler) and pass that to the linker, so that sections are laid out
>> according to the partial order defined in the file (you can always
>> reconstruct a total order starting from a partial order using some
>> heuristic). This is particularly useful to improve startup time as you
>> reduce the amount of paging. Firefox uses this for sure, and
>> apparently ld64 implements this algorithm (or a slight variation of
>> it). I'm confident this is quite effective (see Martin Liska's thesis
>> which contains a more detailed description of the problem and
>> references https://arxiv.org/pdf/1403.6997.pdf)
> That's an effective technique for spinning disks for sure, but how about on
> SSDs?

I'm not sure, maybe not, but I think still it's worth a try as
implementing it shouldn't be a herculean task.
When I spoke about it with Bob Wilson he mentioned that it works for
them (ld64). They feed the output of a dtrace script to the linker in
particular. Your (our?) mileage may vary.


"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare

More information about the llvm-commits mailing list