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

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Feb 15 14:17:14 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f5b2787d07c1c61ebbda3f11dd770b6c57e2b662
      https://github.com/llvm/llvm-project/commit/f5b2787d07c1c61ebbda3f11dd770b6c57e2b662
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-02-15 (Mon, 15 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

(cherry picked from commit b3165a70ae83b46dc145f335dfa9690ece361e92)




More information about the All-commits mailing list