[lld] r327645 - Add a comment about ELF spec and the symbol table's sh_info.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 14:48:34 PDT 2018


Maybe add a note of where these violations were found? The commit
message says libwidevinecdm.so.

Cheers,
Rafael

Rui Ueyama via llvm-commits <llvm-commits at lists.llvm.org> writes:

> Author: ruiu
> Date: Thu Mar 15 10:10:50 2018
> New Revision: 327645
>
> URL: http://llvm.org/viewvc/llvm-project?rev=327645&view=rev
> Log:
> Add a comment about ELF spec and the symbol table's sh_info.
>
> Modified:
>     lld/trunk/ELF/InputFiles.cpp
>
> Modified: lld/trunk/ELF/InputFiles.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=327645&r1=327644&r2=327645&view=diff
> ==============================================================================
> --- lld/trunk/ELF/InputFiles.cpp (original)
> +++ lld/trunk/ELF/InputFiles.cpp Thu Mar 15 10:10:50 2018
> @@ -866,6 +866,10 @@ template <class ELFT> void SharedFile<EL
>        continue;
>      }
>  
> +    // ELF spec requires that all local symbols precede weak or global
> +    // symbols in each symbol table, and the index of first non-local symbol
> +    // is stored to sh_info. If a local symbol appears after some non-local
> +    // symbol, that's a violation of the spec.
>      if (Sym.getBinding() == STB_LOCAL) {
>        warn("found local symbol '" + Name +
>             "' in global part of symbol table in file " + toString(this));
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list