[all-commits] [llvm/llvm-project] 2828a5: [lld-macho] Don't support relocations in cstring s...

Jez Ng via All-commits all-commits at lists.llvm.org
Thu Jan 5 11:14:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2828a54996c407a3b5f5435da8fc9208c5e0ddd1
      https://github.com/llvm/llvm-project/commit/2828a54996c407a3b5f5435da8fc9208c5e0ddd1
  Author: Jez Ng <jezng at fb.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M lld/MachO/InputFiles.cpp
    M lld/test/MachO/invalid/cstring-dedup.s

  Log Message:
  -----------
  [lld-macho] Don't support relocations in cstring sections

We can technically handle them, but since they shouldn't come up in any
real-world programs (since ld64 dedups strings unconditionally), there's
no reason to support them.

It's a thoroughly untested code path too -- as evidenced by the fact
that the only test this change breaks is one that verifies that we
reject relocations when dedup'ing. There is no test that covers the case
where we handle relocations in cstring sections when dedup is disabled.

Reviewed By: #lld-macho, oontvoo, keith, thakis

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




More information about the All-commits mailing list