[all-commits] [llvm/llvm-project] bb8736: [ELF][PPC64] Improve "call lacks nop" diagnostic a...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Dec 29 23:05:41 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bb87364f26ce6b1fbb2cc5e155fd8ff82aafbe8d
      https://github.com/llvm/llvm-project/commit/bb87364f26ce6b1fbb2cc5e155fd8ff82aafbe8d
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-12-29 (Sun, 29 Dec 2019)

  Changed paths:
    M lld/ELF/InputSection.cpp
    M lld/ELF/Thunks.cpp
    M lld/test/ELF/ppc64-bsymbolic-toc-restore.s
    M lld/test/ELF/ppc64-error-toc-restore.s
    M lld/test/ELF/ppc64-error-toc-tail-call.s

  Log Message:
  -----------
  [ELF][PPC64] Improve "call lacks nop" diagnostic and make it compatible with GCC<5.5 and GCC<6.4

GCC before r245813 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79439)
did not emit nop after b/bl. This can happen with recursive calls.
r245813 was back ported to GCC 5.5 and GCC 6.4.

This is common, for example, libstdc++.a(locale.o) shipped with GCC 4.9
and many objects in netlib lapack can cause lld to error.  gold allows
such calls to the same section. Our __plt_foo symbol's `section` field
is used for ThunkSection, so we can't implement a similar loosen rule
easily. But we can make use of its `file` field which is currently NULL.

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




More information about the All-commits mailing list