"raw" patch adding comdat support to lld elf2

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 09:13:05 PDT 2015


On 8 October 2015 at 19:08, Rui Ueyama <ruiu at google.com> wrote:
> You are using SymbolTable's hash table both for dedup'ing SHT_GROUP sections
> and store symbols, but seems like the two uses don't overlap in your code.
> SHT_GROUP sections only cares if the LSB bit is set in the pointer, and
> symbols only care about pointers stored at MSBs. Is this different from
> having a separate hash table for SHT_GROUP sections?

We can have two tables. Most, but not all, group symbols are also
regular symbols. For example, given

inline void foo() {}

clang produces a _Z3foov symbol and puts the section in a comdat with
at signature of _Z3foov.

So having one table is potentially just an optimization.

Do you want me to benchmark both options?

Cheers,
Rafael


More information about the llvm-commits mailing list