[PATCH] D36351: [lld][ELF] Add profile guided section layout

Michael Spencer via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 14:05:54 PST 2018


On Thu, Feb 1, 2018 at 1:35 PM, Rui Ueyama <ruiu at google.com> wrote:

> On Thu, Feb 1, 2018 at 1:33 PM, Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> Michael Spencer <bigcheesegs at gmail.com> writes:
>>
>> > This will only work if the local symbols show up once across all inputs,
>> > otherwise it will just take the last one. Not really an issue for
>> testing,
>> > but it will do the wrong thing in the general case.
>>
>> It is the same constraint that we have with --symbol-ordering-file, so
>> it seems reasonable to me.
>>
>
> Agreed. I want to fix both in some way, though.
>

It's an inherent problem with trying to use symbol names to identify
sections. I believe the best you can do is to handle local symbols on a per
file basis. Meaning prioritize symbols from the same file over symbols from
different files.

- Michael Spencer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/2eddaa36/attachment.html>


More information about the llvm-commits mailing list