[all-commits] [llvm/llvm-project] a90700: [BOLT, test] Link against a shared object to test P...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Feb 5 09:32:21 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a907008bcb8dcc093f8aa5c0450d92cd63473b81
      https://github.com/llvm/llvm-project/commit/a907008bcb8dcc093f8aa5c0450d92cd63473b81
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M bolt/test/AArch64/exceptions-plt.cpp
    M bolt/test/AArch64/plt-call.test
    M bolt/test/X86/callcont-fallthru.s
    M bolt/test/X86/cfi-instrs-reordered.s
    M bolt/test/X86/plt-call.test
    M bolt/test/runtime/exceptions-plt.cpp
    M bolt/test/runtime/plt-lld.test

  Log Message:
  -----------
  [BOLT,test] Link against a shared object to test PLT (#125625)

A few tests generate a statically-linked position-independent executable
with `-nostdlib -Wl,--unresolved-symbols=ignore-all -pie` (`%clang`) and
test PLT handling. (--unresolved-symbols=ignore-all suppresses undefined
symbol errors and serves as a convenience hack.)

This relies on an unguaranteed linker behavior: a statically-linked PIE
does not necessarily generate PLT entries.
While current lld generates a PLT entry, it will change to suppress the
PLT entry to simplify internal handling and improve consistency.

(The behavior has no consistency in GNU ld, some ports generated a
.dynsym entry while some don't. While most seem to generate a PLT entry
but some ports use a weird `R_*_NONE` relocation.)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list