[PATCH] D26130: [ELF] - Implemented --symbol-ordering-file option.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 12:41:28 PST 2016
On 21 November 2016 at 18:10, Rui Ueyama <ruiu at google.com> wrote:
> I don't think it's proved to work. It might need improving until we provide
> it to the public.
>
> In particular, I'm worried that this feature could produce unexpected
> section ordering, because it reorders local symbols. Local symbols are not
> guaranteed to be unique, so a symbol in a symbol ordering file could
> accidentally matches with an unintended symbol and reorders sections
> wrongly. gold's --section-ordering-file might be half-baked, but this
> --symbol-orderfing-file might be half-baked, too.
Having duplicated important symbol names is far less common than
duplicated section names. During the review we did show that the
option has the potential for improving both cache locality and page
faults.
If it is ever needed it is trivial to extend the format to include the
file name. The same is not true for sections, as the same file can
trivially have multiple sections with the same name
(-fno-unique-section-names).
> More importantly, I think my point is that we should have had this kind of
> discussion based on a proposal before landing a feature.
We had a really long review. It started with an implementation of the
gold option. Testing it found that it was insufficient even without
-fno-unique-section-names to differentiate important sections. The
implementation switched to use symbols and that was then shown to be
beneficial.
Cheers,
Rafael
More information about the llvm-commits
mailing list