[all-commits] [llvm/llvm-project] eb4619: [lld][ARM] Fix assertion when mixing ARM and Thumb...

Oliver Stannard via All-commits all-commits at lists.llvm.org
Sat Aug 10 03:06:43 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: eb4619cf5f022f1d9d89e498fb85d14d5de651a5
      https://github.com/llvm/llvm-project/commit/eb4619cf5f022f1d9d89e498fb85d14d5de651a5
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2024-08-10 (Sat, 10 Aug 2024)

  Changed paths:
    M lld/ELF/Arch/ARM.cpp
    M lld/ELF/Config.h
    M lld/ELF/InputFiles.cpp
    A lld/test/ELF/arm-mixed-plts.s

  Log Message:
  -----------
  [lld][ARM] Fix assertion when mixing ARM and Thumb objects (#101985)

Previously, we selected the Thumb2 PLT sequences if any input object is
marked as not supporting the ARM ISA, which then causes assertion
failures when calls from ARM code in other objects are seen. I think the
intention here was to only use Thumb PLTs when the target does not have
the ARM ISA available, signalled by no objects being marked as having it
available. To do that we need to track which ISAs we have seen as we
parse the build attributes, and defer the decision about PLTs until all
input objects have been parsed.

This bug was triggered by real code in picolibc, which have some
versions of string.h functions built with Thumb2-only build attributes,
so that they are compatible with v7-A, v7-R and v7-M.

Fixes #99008.

(cherry picked from commit a1c6467bd90905d52cf8f6162b60907f8e98a704)



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