[PATCH] D19490: ELF: Teach section GC to also GC shared symbols.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 13:58:39 PDT 2016


Taking a look.

On 25 April 2016 at 16:41, Rui Ueyama <ruiu at google.com> wrote:
> ruiu added inline comments.
>
> ================
> Comment at: ELF/MarkLive.cpp:42
> @@ -40,1 +41,3 @@
>
> +// A resolved relocation. The Sec and Offset fields are set if the relocation
> +// was resolved to an offset within a section. Otherwise the Sym field is set.
> ----------------
> So this code movement is just to move code to the file where it is used (plus a small cleanup), right?
>
> ================
> Comment at: ELF/MarkLive.cpp:165-168
> @@ +164,6 @@
> +  for (Symbol *S : Symtab->getSymbols()) {
> +    if (S->Body->isShared())
> +      S->IsUsedInRegularObj = false;
> +    else if (S->includeInDynsym())
> +      MarkSymbol(S->Body);
> +  }
> ----------------
> Is this order safe? If getSymbols happens to return non-shared symbols and shared symbols in this order, then you would clear IsUsedInRegularObj bit for all shared symbols, wouldn't you?
>
>
> http://reviews.llvm.org/D19490
>
>
>


More information about the llvm-commits mailing list