[all-commits] [llvm/llvm-project] bef38e: [ELF] Handle SHT_RISCV_ATTRIBUTES similarly to SHT...

Jessica Clarke via All-commits all-commits at lists.llvm.org
Sat Sep 5 10:36:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bef38e86b4e702a0c42e243d323fb7c09875e649
      https://github.com/llvm/llvm-project/commit/bef38e86b4e702a0c42e243d323fb7c09875e649
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2020-09-05 (Sat, 05 Sep 2020)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/ELF/SyntheticSections.h
    A lld/test/ELF/riscv-attributes.s

  Log Message:
  -----------
  [ELF] Handle SHT_RISCV_ATTRIBUTES similarly to SHT_ARM_ATTRIBUTES

Currently we treat SHT_RISCV_ATTRIBUTES like a normal section and
concatenate all such input sections, yielding invalid output unless only
a single attributes section is present in the input. Instead, pick the
first as with SHT_ARM_ATTRIBUTES. We do not currently need to condition
our behaviour on the contents, unlike Arm. In future, we should both do
stricter validation of the input and merge all sections together to
ensure we have, for example, the full arch string requirement, but this
rudimentary implementation is good enough for most common cases.

Reviewed By: MaskRay

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




More information about the All-commits mailing list