[Arm] Fix parsing and emission of Tag_also_compatible_with eabi attribute
According to the ABI for the Arm Architecture, the value for the Tag_also_compatible_with eabi attribute is represented by an NTBS entry. This string value, in turn, is composed of a pair of tag+value encoded in one of two formats: - ULEB128: tag, ULEB128: value, 0. - ULEB128: tag, NBTS: data. (See [[ https://github.com/ARM-software/abi-aa/blob/60a8eb8c55e999d74dac5e368fc9d7e36e38dda4/addenda32/addenda32.rst#3373secondary-compatibility-tag | section 3.3.7.3 on the Addenda to, and Errata in, the ABI for the Arm Architecture ]].) Currently the Arm assembly parser and streamer ignore the encoding of the attribute's NTBS value, which can result in incorrect attributes being emitted in both assembly and object file outputs. This patch fixes these issues by properly handing the value's encoding. An update to llvm-readobj to properly handle the attribute's value will be covered by a separate patch. Patch by Victor Campos and Lucas Prates. Reviewed By: vhscampos Differential Revision: https://reviews.llvm.org/D129500
Loading
Please sign in to comment