[PATCH] D18166: Add _GLOBAL_OFFSET_TABLE_ symbol to shared libraries

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 18:40:44 PDT 2016


On Tue, Mar 15, 2016 at 12:15:46AM +0000, Davide Italiano via llvm-commits wrote:
> @@ -342,14 +342,15 @@
> 
>    Config->Rela = ELFT::Is64Bits;
> 
> -  if (!Config->Shared && !Config->Relocatable) {
> +  if (!Config->Shared && !Config->Relocatable && Config->Entry.empty() &&
> +      Config->EMachine != EM_AMDGPU)
>      // Add entry symbol.
>      //
>      // There is no entry symbol for AMDGPU binaries, so skip adding one to avoid
>      // having and undefined symbol.
> -    if (Config->Entry.empty() && Config->EMachine != EM_AMDGPU)
> -      Config->Entry = (Config->EMachine == EM_MIPS) ? "__start" : "_start";
> +    Config->Entry = (Config->EMachine == EM_MIPS) ? "__start" : "_start";

Please restore the {} as the comment makes it a multiline statement.

Joerg


More information about the llvm-commits mailing list