[all-commits] [llvm/llvm-project] 8f208e: [ELFAttributeParser] Skip unknown vendor subsections.

Simon Tatham via All-commits all-commits at lists.llvm.org
Tue Jun 27 05:23:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f208edd44d0832ac2580e0ec4238be4ecfd5737
      https://github.com/llvm/llvm-project/commit/8f208edd44d0832ac2580e0ec4238be4ecfd5737
  Author: Simon Tatham <simon.tatham at arm.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M lld/test/ELF/arm-tag-vfp-args-errs.s
    M llvm/lib/Support/ELFAttributeParser.cpp

  Log Message:
  -----------
  [ELFAttributeParser] Skip unknown vendor subsections.

An .ARM.attributes section is divided into subsections, each labelled
with a vendor name. There is one standardised vendor name, which must
be used for all attributes that affect compatibility. Subsections
labelled with other vendor names can be used for optimisation
purposes, but it has to be safe for an object file consumer to ignore
them if it doesn't recognise the vendor name.

LLD currently terminates parsing of the whole attributes section as
soon as it encounters a subsection with a vendor name it doesn't
recognise (which is anything other than the standard one). This can
prevent it from detecting compatibility issues, if a standard
subsection followed the vendor-specific one.

This patch modifies the attribute parser so that unrecognised vendor
subsections are silently skipped, and the subsections beyond them are
still processed.

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




More information about the All-commits mailing list