[all-commits] [llvm/llvm-project] 952ee0: ThinLTOBitcodeWriter: drop dso_local when a Global...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Mar 5 18:12:25 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 952ee0df9ef9a690cd9daec0f93f5f16363d3529
      https://github.com/llvm/llvm-project/commit/952ee0df9ef9a690cd9daec0f93f5f16363d3529
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-03-05 (Thu, 05 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionImport.cpp
    M llvm/test/LTO/Resolution/X86/not-prevailing-variables.ll
    A llvm/test/Transforms/ThinLTOBitcodeWriter/split-dsolocal.ll

  Log Message:
  -----------
  ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration

If we infer the dso_local flag for -fpic, dso_local should be dropped
when we convert a GlobalVariable a declaration. dso_local causes the
generation of direct access (e.g. R_X86_64_PC32). Such relocations referencing
STB_GLOBAL STV_DEFAULT objects are not allowed in a -shared link.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D74749




More information about the All-commits mailing list