[all-commits] [llvm/llvm-project] b3165a: [ELF] Allow R_386_GOTOFF from .debug_info

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Feb 4 09:18:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b3165a70ae83b46dc145f335dfa9690ece361e92
      https://github.com/llvm/llvm-project/commit/b3165a70ae83b46dc145f335dfa9690ece361e92
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-02-04 (Thu, 04 Feb 2021)

  Changed paths:
    M lld/ELF/InputSection.cpp
    M lld/test/ELF/non-abs-reloc.s

  Log Message:
  -----------
  [ELF] Allow R_386_GOTOFF from .debug_info

In GCC emitted .debug_info sections, R_386_GOTOFF may be used to
relocate DW_AT_GNU_call_site_value values
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98946).

R_386_GOTOFF (`S + A - GOT`) is one of the `isStaticLinkTimeConstant` relocation
type which is not PC-relative, so it can be used from non-SHF_ALLOC sections. We
current allow new relocation types as needs come. The diagnostic has caught some
bugs in the past.

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




More information about the All-commits mailing list