[all-commits] [llvm/llvm-project] 9267ca: [ELF] Don't error on R_PPC64_REL24/R_PPC64_REL24_N...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Oct 23 10:38:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9267caebfa9209e4ae69517043d008d1b83307aa
      https://github.com/llvm/llvm-project/commit/9267caebfa9209e4ae69517043d008d1b83307aa
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M lld/ELF/Relocations.cpp
    M lld/test/ELF/ppc64-tls-missing-gdld.s

  Log Message:
  -----------
  [ELF] Don't error on R_PPC64_REL24/R_PPC64_REL24_NOTOC referencing __tls_get_addr for missing R_PPC64_TLSGD/R_PPC64_TLSLD

This partially reverts D85994.

In glibc, elf/dl-sym.c calls the raw `__tls_get_addr` by specifying the
tls_index parameter. Such a call does not have a pairing R_PPC64_TLSGD/R_PPC64_TLSLD.
This is legitimate. Since we cannot distinguish the benign case from cases due
to toolchain issues, we have to be permissive.

Acked by Stefan Pintilie




More information about the All-commits mailing list