[all-commits] [llvm/llvm-project] d2bb8c: [MC][TargetMachine] Delete MCTargetOptions::MCPIEC...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jan 1 00:50:48 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d2bb8c16e711602481c8b33d0e2ccc9994eb6641
      https://github.com/llvm/llvm-project/commit/d2bb8c16e711602481c8b33d0e2ccc9994eb6641
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M llvm/include/llvm/MC/MCTargetOptions.h
    M llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc
    M llvm/lib/MC/MCTargetOptions.cpp
    M llvm/lib/Target/TargetMachine.cpp
    R llvm/test/CodeGen/X86/global-access-pie-copyrelocs.ll

  Log Message:
  -----------
  [MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations

clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations
check and sets dso_local on applicable global variables. We don't need
to duplicate the work in TargetMachine shouldAssumeDSOLocal.

Verified that -mpie-copy-relocations can still emit PC relative
relocations for external variable accesses.

clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32
clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC




More information about the All-commits mailing list