llvm.org GIT mirror llvm / d0fb7e4
ARM ELF: ensure that the tag types are corrected Ensure that the tag types are reflected on a replacement. This is particularly important for the compatibility tag which has multiple representations where the last definition wins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199577 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 6 years ago
2 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
289289 if (AttributeItem *Item = getAttributeItem(Attribute)) {
290290 if (!OverwriteExisting)
291291 return;
292 Item->Type = AttributeItem::NumericAttribute;
292293 Item->IntValue = Value;
293294 return;
294295 }
309310 if (AttributeItem *Item = getAttributeItem(Attribute)) {
310311 if (!OverwriteExisting)
311312 return;
313 Item->Type = AttributeItem::TextAttribute;
312314 Item->StringValue = Value;
313315 return;
314316 }
329331 if (AttributeItem *Item = getAttributeItem(Attribute)) {
330332 if (!OverwriteExisting)
331333 return;
334 Item->Type = AttributeItem::NumericAndTextAttributes;
332335 Item->IntValue = IntValue;
333336 Item->StringValue = StringValue;
334337 return;
0 @ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -s -sd \
1 @ RUN: | FileCheck %s
2
3 .syntax unified
4 .thumb
5
6 .eabi_attribute Tag_compatibility, 1
7 .eabi_attribute Tag_compatibility, 1, "aeabi"
8
9 @ CHECK: Section {
10 @ CHECK: Name: .ARM.attributes
11 @ CHECK: Type: SHT_ARM_ATTRIBUTES
12 @ CHECK: SectionData (
13 @ CHECK: 0000: 41170000 00616561 62690001 0D000000
14 @ CHECK: 0010: 20014145 41424900
15 @ CHECK: )
16 @ CHECK: }
17