[all-commits] [llvm/llvm-project] 55e69e: [ELF] Remove -Wl, -z, notext hint

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Oct 31 12:10:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55e69ece721dbfb2a34b89cacd565fb2aa7b05a7
      https://github.com/llvm/llvm-project/commit/55e69ece721dbfb2a34b89cacd565fb2aa7b05a7
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-10-31 (Sun, 31 Oct 2021)

  Changed paths:
    M lld/ELF/Relocations.cpp
    M lld/test/ELF/aarch64-abs32-dyn.s
    M lld/test/ELF/aarch64-fpic-abs16.s
    M lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
    M lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
    M lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
    M lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
    M lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
    M lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
    M lld/test/ELF/aarch64-fpic-prel16.s
    M lld/test/ELF/aarch64-fpic-prel32.s
    M lld/test/ELF/aarch64-fpic-prel64.s
    M lld/test/ELF/arm-target1.s
    M lld/test/ELF/copy-in-shared.s
    R lld/test/ELF/dynamic-reloc-in-ro.s
    M lld/test/ELF/eh-frame-dyn-rel.s
    M lld/test/ELF/linkerscript/symbol-location.s
    M lld/test/ELF/mips-eh_frame-pic.s
    M lld/test/ELF/ppc64-abs32-dyn.s
    M lld/test/ELF/relocation-size-err.s
    M lld/test/ELF/riscv-gp.s
    M lld/test/ELF/riscv-reloc-64-pic.s
    M lld/test/ELF/vs-diagnostics-dynamic-relocation.s
    M lld/test/ELF/x86-64-dyn-rel-error.s
    M lld/test/ELF/x86-64-dyn-rel-error2.s
    M lld/test/ELF/x86-64-dyn-rel-error3.s
    M lld/test/ELF/x86-64-dyn-rel-error5.s
    M lld/test/ELF/x86-64-reloc-32.s
    M lld/test/ELF/x86-64-reloc-pc32.s
    M lld/test/ELF/znotext-weak-undef.s
    M lld/test/ELF/ztext.s

  Log Message:
  -----------
  [ELF] Remove -Wl,-z,notext hint

The hint does not pull its weight:

* adding -Wl,-z,notext often won't work (relocation types other than `symbolRel`, e.g. `R_AARCH64_LDST32_ABS_LO12_NC`)
* for pure (no assembly) C/C++ projects, the "-fPIC" hint is sufficient




More information about the All-commits mailing list