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. (Relanded with no change from the original commit8f208edd44. I reverted it in949bb7e4dedue to widespread buildbot breakage, failing to notice that975f71faa7had already fixed the failing unit test. Also, the *revert* caused at least one buildbot to fail, because I switched the affected lld test to making %t a directory, and then the reverted version tried to treat it as a file without cleaning the output directory first.) Differential Revision: https://reviews.llvm.org/D153335
7.3 KiB
7.3 KiB