[PATCH] D35207: [ELF] - Give a symbol version extracted from name a priority over version set by script.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 11:18:18 PDT 2017


I agree that the member name should not include 'got' :-)

Not sure if we can avoid adding the member, but it is nice if we can.

I just wanted to add that I agree that this is the right thing to
do. Ideally version information should be specified as much as possible
in the .o file, so this is going the right direction and agrees with
gold and bfd.

Cheers,
Rafael

Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

> ruiu added inline comments.
>
>
> ================
> Comment at: ELF/SymbolTable.cpp:234
>      Sym = make<Symbol>();
> -    Sym->InVersionScript = false;
> +    Sym->GotVersionFromName = false;
>      Sym->Binding = STB_WEAK;
> ----------------
> `Got` is in general not a good name in the linker as it could mean Global Offset Table.
>
>
> ================
> Comment at: ELF/Symbols.h:366-370
> +  // Symbols can have version baked in their names. If flag is true
> +  // that means version was set from name, such version has priority
> +  // over versions from script.
> +  unsigned GotVersionFromName : 1;
>  
> ----------------
> Do you really need this? You could just call parseSymbolVersion after processing version scripts, no?
>
>
> https://reviews.llvm.org/D35207


More information about the llvm-commits mailing list