aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-07-22 09:03:05 -0700
committerGitHub <noreply@github.com>2024-07-22 09:03:05 -0700
commit4010ddf780d90c42877c9ab8d28b7e084cfe197e (patch)
tree81bf3157a193a76699333e4ac4290f47d0a220a0
parentd7e185cca98411e82655feecc297906cb7ed0850 (diff)
downloadllvm-4010ddf780d90c42877c9ab8d28b7e084cfe197e.zip
llvm-4010ddf780d90c42877c9ab8d28b7e084cfe197e.tar.gz
llvm-4010ddf780d90c42877c9ab8d28b7e084cfe197e.tar.bz2
[MC,AArch64] Create mapping symbols with non-unique names
Add `createLocalSymbol` to create a local, non-temporary symbol. Different from `createRenamableSymbol`, the `Used` bit is ignored, therefore multiple local symbols might share the same name. Utilizing `createLocalSymbol` in AArch64 allows for efficient mapping symbol creation with non-unique names, saving .strtab space. The behavior matches GNU assembler. Pull Request: https://github.com/llvm/llvm-project/pull/99836
-rw-r--r--lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s2
-rw-r--r--lld/test/ELF/aarch64-gnu-ifunc.s2
-rw-r--r--lld/test/ELF/aarch64-reloc-pauth.s12
-rw-r--r--lld/test/ELF/aarch64-thunk-script.s4
-rw-r--r--lld/test/ELF/basic-aarch64.s4
-rw-r--r--lld/test/ELF/pack-dyn-relocs.s48
-rw-r--r--llvm/include/llvm/MC/MCContext.h4
-rw-r--r--llvm/lib/MC/MCContext.cpp5
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp8
-rw-r--r--llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll16
-rw-r--r--llvm/test/CodeGen/AArch64/inlineasm-ldr-pseudo.ll2
-rw-r--r--llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s6
-rw-r--r--llvm/test/MC/AArch64/CheckDataSymbol.s2
-rw-r--r--llvm/test/MC/AArch64/mapping-across-sections.s20
-rw-r--r--llvm/test/MC/AArch64/mapping-within-section.s15
-rw-r--r--llvm/test/MC/AArch64/size-directive.s2
-rw-r--r--llvm/test/MC/ELF/AArch64/cfi.s4
-rw-r--r--llvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test8
18 files changed, 88 insertions, 76 deletions
diff --git a/lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s b/lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s
index 608b1ac..a9b95b1 100644
--- a/lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s
+++ b/lld/test/ELF/aarch64-cortex-a53-843419-abs-mapsyms.s
@@ -12,7 +12,7 @@
.type _start, %function
_start: ret
-// CHECK: Name: $x.0
+// CHECK: Name: $x
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local (0x0)
diff --git a/lld/test/ELF/aarch64-gnu-ifunc.s b/lld/test/ELF/aarch64-gnu-ifunc.s
index d76b54e..f39ae0c 100644
--- a/lld/test/ELF/aarch64-gnu-ifunc.s
+++ b/lld/test/ELF/aarch64-gnu-ifunc.s
@@ -37,7 +37,7 @@
// CHECK-NEXT: Section: Undefined
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
-// CHECK-NEXT: Name: $x.0
+// CHECK-NEXT: Name: $x
// CHECK-NEXT: Value: 0x210188
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
diff --git a/lld/test/ELF/aarch64-reloc-pauth.s b/lld/test/ELF/aarch64-reloc-pauth.s
index 19493fc..6b4d23d 100644
--- a/lld/test/ELF/aarch64-reloc-pauth.s
+++ b/lld/test/ELF/aarch64-reloc-pauth.s
@@ -68,11 +68,11 @@
# RELR-EMPTY:
# RELR-NEXT: Relocation section '.relr.auth.dyn' at offset 0x[[ADDR2]] contains 5 entries:
# RELR-NEXT: Index: Entry Address Symbolic Address
-# RELR-NEXT: 0000: 0000000000030440 0000000000030440 $d.0
-# RELR-NEXT: 0001: 000000000000000f 0000000000030448 $d.0 + 0x8
-# RELR-NEXT: 0000000000030450 $d.0 + 0x10
-# RELR-NEXT: 0000000000030458 $d.0 + 0x18
-# RELR-NEXT: 0002: 0000000000030492 0000000000030492 $d.0 + 0x52
+# RELR-NEXT: 0000: 0000000000030440 0000000000030440 $d
+# RELR-NEXT: 0001: 000000000000000f 0000000000030448 $d + 0x8
+# RELR-NEXT: 0000000000030450 $d + 0x10
+# RELR-NEXT: 0000000000030458 $d + 0x18
+# RELR-NEXT: 0002: 0000000000030492 0000000000030492 $d + 0x52
# HEX: Hex dump of section '.test':
# HEX-NEXT: 0x00030440 01000000 2a000020 42040300 2b000000
@@ -201,7 +201,7 @@
# EMPTY-RELA-EMPTY:
# EMPTY-RELA-NEXT: Relocation section '.relr.auth.dyn' at offset {{.+}} contains 1 entries:
# EMPTY-RELA-NEXT: Index: Entry Address Symbolic Address
-# EMPTY-RELA-NEXT: 0000: 0000000000030310 0000000000030310 $d.0
+# EMPTY-RELA-NEXT: 0000: 0000000000030310 0000000000030310 $d
# EMPTY-RELA-RO-NOT: .rela.dyn
diff --git a/lld/test/ELF/aarch64-thunk-script.s b/lld/test/ELF/aarch64-thunk-script.s
index 08ff4e9..a6c524f 100644
--- a/lld/test/ELF/aarch64-thunk-script.s
+++ b/lld/test/ELF/aarch64-thunk-script.s
@@ -43,8 +43,8 @@ high_target:
// CHECK-NEXT: ret
/// Local symbols copied from %t.o
-// NM: t $x.0
-// NM-NEXT: t $x.1
+// NM: t $x
+// NM-NEXT: t $x
/// Local thunk symbols.
// NM-NEXT: t __AArch64AbsLongThunk_high_target
// NM-NEXT: t $x
diff --git a/lld/test/ELF/basic-aarch64.s b/lld/test/ELF/basic-aarch64.s
index 6b109e8..1f59d33 100644
--- a/lld/test/ELF/basic-aarch64.s
+++ b/lld/test/ELF/basic-aarch64.s
@@ -119,7 +119,7 @@ _start:
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x1AA
-# CHECK-NEXT: Size: 13
+# CHECK-NEXT: Size: 11
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
@@ -189,7 +189,7 @@ _start:
# CHECK-NEXT: Section: Undefined (0x0)
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
-# CHECK-NEXT: Name: $x.0
+# CHECK-NEXT: Name: $x
# CHECK-NEXT: Value: 0x210120
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Local (0x0)
diff --git a/lld/test/ELF/pack-dyn-relocs.s b/lld/test/ELF/pack-dyn-relocs.s
index 3cbba68..dd18c92 100644
--- a/lld/test/ELF/pack-dyn-relocs.s
+++ b/lld/test/ELF/pack-dyn-relocs.s
@@ -264,30 +264,30 @@
// RELR64-EMPTY:
// RELR64-NEXT: Relocation section '.relr.dyn' at offset {{.*}} contains 24 entries:
// RELR64-NEXT: Symbolic Address
-// RELR64-NEXT: $d.0{{$}}
-// RELR64-NEXT: $d.0 + 0x8
-// RELR64-NEXT: $d.0 + 0x10
-// RELR64-NEXT: $d.0 + 0x18
-// RELR64-NEXT: $d.0 + 0x20
-// RELR64-NEXT: $d.0 + 0x28
-// RELR64-NEXT: $d.0 + 0x30
-// RELR64-NEXT: $d.0 + 0x38
-// RELR64-NEXT: $d.0 + 0x48
-// RELR64-NEXT: $d.0 + 0x50
-// RELR64-NEXT: $d.0 + 0x58
-// RELR64-NEXT: $d.0 + 0x60
-// RELR64-NEXT: $d.0 + 0x68
-// RELR64-NEXT: $d.0 + 0x70
-// RELR64-NEXT: $d.0 + 0x78
-// RELR64-NEXT: $d.0 + 0x90
-// RELR64-NEXT: $d.0 + 0x98
-// RELR64-NEXT: $d.0 + 0xa0
-// RELR64-NEXT: $d.0 + 0xa8
-// RELR64-NEXT: $d.0 + 0xb0
-// RELR64-NEXT: $d.0 + 0xb8
-// RELR64-NEXT: $d.0 + 0xc0
-// RELR64-NEXT: $d.0 + 0xc8
-// RELR64-NEXT: $d.0 + 0xd0
+// RELR64-NEXT: $d{{$}}
+// RELR64-NEXT: $d + 0x8
+// RELR64-NEXT: $d + 0x10
+// RELR64-NEXT: $d + 0x18
+// RELR64-NEXT: $d + 0x20
+// RELR64-NEXT: $d + 0x28
+// RELR64-NEXT: $d + 0x30
+// RELR64-NEXT: $d + 0x38
+// RELR64-NEXT: $d + 0x48
+// RELR64-NEXT: $d + 0x50
+// RELR64-NEXT: $d + 0x58
+// RELR64-NEXT: $d + 0x60
+// RELR64-NEXT: $d + 0x68
+// RELR64-NEXT: $d + 0x70
+// RELR64-NEXT: $d + 0x78
+// RELR64-NEXT: $d + 0x90
+// RELR64-NEXT: $d + 0x98
+// RELR64-NEXT: $d + 0xa0
+// RELR64-NEXT: $d + 0xa8
+// RELR64-NEXT: $d + 0xb0
+// RELR64-NEXT: $d + 0xb8
+// RELR64-NEXT: $d + 0xc0
+// RELR64-NEXT: $d + 0xc8
+// RELR64-NEXT: $d + 0xd0
// RELR64-EMPTY:
// RELR64-NEXT: Hex dump of section '.data':
// RELR64-NEXT: 0x00030490 90040300 00000000 91040300 00000000 .
diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h
index 4c2be73..57ba40f 100644
--- a/llvm/include/llvm/MC/MCContext.h
+++ b/llvm/include/llvm/MC/MCContext.h
@@ -468,6 +468,10 @@ public:
/// true, behaves like getOrCreateSymbol, prefixed with PrivateLabelPrefix.
MCSymbol *createBlockSymbol(const Twine &Name, bool AlwaysEmit = false);
+ /// Create a local, non-temporary symbol like an ELF mapping symbol. Calling
+ /// the function with the same name will generate new, unique instances.
+ MCSymbol *createLocalSymbol(StringRef Name);
+
/// Create the definition of a directional local symbol for numbered label
/// (used for "1:" definitions).
MCSymbol *createDirectionalLocalSymbol(unsigned LocalLabelVal);
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 44853f3..228c4fb 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -349,6 +349,11 @@ MCSymbol *MCContext::createNamedTempSymbol() {
return createNamedTempSymbol("tmp");
}
+MCSymbol *MCContext::createLocalSymbol(StringRef Name) {
+ MCSymbolTableEntry &NameEntry = getSymbolTableEntry(Name);
+ return createSymbolImpl(&NameEntry, /*IsTemporary=*/false);
+}
+
unsigned MCContext::NextInstance(unsigned LocalLabelVal) {
MCLabel *&Label = Instances[LocalLabelVal];
if (!Label)
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
index 2775163..ed670bc 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
@@ -181,7 +181,7 @@ public:
std::unique_ptr<MCCodeEmitter> Emitter)
: MCELFStreamer(Context, std::move(TAB), std::move(OW),
std::move(Emitter)),
- MappingSymbolCounter(0), LastEMS(EMS_None) {}
+ LastEMS(EMS_None) {}
void changeSection(MCSection *Section, uint32_t Subsection = 0) override {
// We have to keep track of the mapping symbol state of any sections we
@@ -195,7 +195,6 @@ public:
// Reset state between object emissions
void reset() override {
- MappingSymbolCounter = 0;
MCELFStreamer::reset();
LastMappingSymbols.clear();
LastEMS = EMS_None;
@@ -271,15 +270,12 @@ private:
}
void emitMappingSymbol(StringRef Name) {
- auto *Symbol = cast<MCSymbolELF>(getContext().getOrCreateSymbol(
- Name + "." + Twine(MappingSymbolCounter++)));
+ auto *Symbol = cast<MCSymbolELF>(getContext().createLocalSymbol(Name));
emitLabel(Symbol);
Symbol->setType(ELF::STT_NOTYPE);
Symbol->setBinding(ELF::STB_LOCAL);
}
- int64_t MappingSymbolCounter;
-
DenseMap<const MCSection *, ElfMappingSymbol> LastMappingSymbols;
ElfMappingSymbol LastEMS;
};
diff --git a/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll b/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
index e601f03..8b67406 100644
--- a/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
+++ b/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
@@ -7,10 +7,10 @@
@l = common hidden local_unnamed_addr global i32 0, align 4
; CHECK-LABEL: <test1>:
-; CHECK-LABEL: <$d.1>:
-; CHECK-LABEL: <$x.2>:
+; CHECK-LABEL: <$d>:
+; CHECK-LABEL: <$x>:
; CHECK-NEXT: b 0x2c <test1+0x2c>
-; CHECK-LABEL: <$x.4>:
+; CHECK-LABEL: <$x>:
; CHECK-NEXT: mov w0, wzr
; CHECK-NEXT: ldr x30, [sp], #16
; CHECK-NEXT: ret
@@ -41,8 +41,8 @@ declare dso_local i32 @i(...) local_unnamed_addr
; CHECK-LABEL: <test2>:
; CHECK: b {{.*}} <test2+0x1c>
-; CHECK-LABEL: <$d.5>:
-; CHECK-LABEL: <$x.6>:
+; CHECK-LABEL: <$d>:
+; CHECK-LABEL: <$x>:
; CHECK-NEXT: b {{.*}} <test2+0x18>
define hidden i32 @test2() local_unnamed_addr {
%1 = load i32, ptr @l, align 4
@@ -70,10 +70,10 @@ define hidden i32 @test2() local_unnamed_addr {
}
; CHECK-LABEL: <test3>:
-; CHECK-LABEL: <$d.9>:
-; CHECK-LABEL: <$x.10>:
+; CHECK-LABEL: <$d>:
+; CHECK-LABEL: <$x>:
; CHECK-NEXT: b {{.*}} <test3+0x34>
-; CHECK-LABEL: <$x.12>:
+; CHECK-LABEL: <$x>:
; CHECK-NEXT: ldr x30, [sp], #16
; CHECK-NEXT: ret
define internal i1 @test3() {
diff --git a/llvm/test/CodeGen/AArch64/inlineasm-ldr-pseudo.ll b/llvm/test/CodeGen/AArch64/inlineasm-ldr-pseudo.ll
index f2b5e5f..f362392 100644
--- a/llvm/test/CodeGen/AArch64/inlineasm-ldr-pseudo.ll
+++ b/llvm/test/CodeGen/AArch64/inlineasm-ldr-pseudo.ll
@@ -16,7 +16,7 @@ entry:
; CHECK: 58000040 ldr x0, 0x10
; CHECK: d65f03c0 ret
; Make sure the constant pool entry comes after the return
-; CHECK-LABEL: <$d.1>:
+; CHECK-LABEL: <$d>:
define i32 @bar() nounwind {
entry:
%0 = tail call i32 asm sideeffect "ldr $0,=0x10001", "=r"() nounwind
diff --git a/llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s b/llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s
index 2f1140c..6990a82 100644
--- a/llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s
+++ b/llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s
@@ -7,9 +7,9 @@
## addresses.
# RUN: llvm-nm --special-syms %t | FileCheck %s -check-prefix MAPPING_SYM
-# MAPPING_SYM: 0000000000000000 t $d.0
-# MAPPING_SYM-NEXT: 000000000000000c t $d.2
-# MAPPING_SYM-NEXT: 0000000000000004 t $x.1
+# MAPPING_SYM: 0000000000000000 t $d
+# MAPPING_SYM-NEXT: 000000000000000c t $d
+# MAPPING_SYM-NEXT: 0000000000000004 t $x
# MAPPING_SYM-NEXT: 0000000000000000 T foo
# RUN: llvm-symbolizer --obj=%t 0 4 0xc | FileCheck %s -check-prefix SYMBOL
diff --git a/llvm/test/MC/AArch64/CheckDataSymbol.s b/llvm/test/MC/AArch64/CheckDataSymbol.s
index baa1158..13d1db7 100644
--- a/llvm/test/MC/AArch64/CheckDataSymbol.s
+++ b/llvm/test/MC/AArch64/CheckDataSymbol.s
@@ -1,7 +1,7 @@
# RUN: llvm-mc -filetype=obj -assemble \
# RUN: -triple=aarch64- %s -o - \
# RUN: | llvm-readobj -S --symbols - | FileCheck %s
-# CHECK: Name: $d.1 ({{[1-9][0-9]+}})
+# CHECK: Name: $d ({{[1-9][0-9]+}})
# CHECK-NEXT: Value: 0x4
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Local (0x0)
diff --git a/llvm/test/MC/AArch64/mapping-across-sections.s b/llvm/test/MC/AArch64/mapping-across-sections.s
index 6bb5a88..f453c86 100644
--- a/llvm/test/MC/AArch64/mapping-across-sections.s
+++ b/llvm/test/MC/AArch64/mapping-across-sections.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple=aarch64 -filetype=obj %s | llvm-objdump -t - | FileCheck %s
+// RUN: llvm-mc -triple=aarch64 -filetype=obj %s | llvm-objdump -t - | FileCheck %s --match-full-lines
.section .text1,"ax"
add w0, w0, w0
@@ -28,13 +28,13 @@ add w0, w0, w0
.section ".note.GNU-stack","",@progbits
// CHECK: SYMBOL TABLE:
-// CHECK-NEXT: 0000000000000000 l .text1 0000000000000000 $x.0
-// CHECK-NEXT: 0000000000000000 l .text 0000000000000000 $x.1
-// CHECK-NEXT: 0000000000000004 l .text 0000000000000000 $d.2
-// CHECK-NEXT: 0000000000000000 l .data 0000000000000000 $d.3
-// CHECK-NEXT: 0000000000000008 l .text 0000000000000000 $x.4
-// CHECK-NEXT: 000000000000000c l .text 0000000000000000 $d.5
-// CHECK-NEXT: 0000000000000000 l .rodata 0000000000000000 $d.6
-// CHECK-NEXT: 0000000000000004 l .rodata 0000000000000000 $x.7
-// CHECK-NEXT: 0000000000000000 l .comment 0000000000000000 $d.8
+// CHECK-NEXT: 0000000000000000 l .text1 0000000000000000 $x
+// CHECK-NEXT: 0000000000000000 l .text 0000000000000000 $x
+// CHECK-NEXT: 0000000000000004 l .text 0000000000000000 $d
+// CHECK-NEXT: 0000000000000000 l .data 0000000000000000 $d
+// CHECK-NEXT: 0000000000000008 l .text 0000000000000000 $x
+// CHECK-NEXT: 000000000000000c l .text 0000000000000000 $d
+// CHECK-NEXT: 0000000000000000 l .rodata 0000000000000000 $d
+// CHECK-NEXT: 0000000000000004 l .rodata 0000000000000000 $x
+// CHECK-NEXT: 0000000000000000 l .comment 0000000000000000 $d
// CHECK-NOT: {{.}}
diff --git a/llvm/test/MC/AArch64/mapping-within-section.s b/llvm/test/MC/AArch64/mapping-within-section.s
index 07a2d3c..c84e3a4 100644
--- a/llvm/test/MC/AArch64/mapping-within-section.s
+++ b/llvm/test/MC/AArch64/mapping-within-section.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s | llvm-nm --special-syms - | FileCheck %s
+// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s | llvm-nm --no-sort --special-syms - | FileCheck %s --match-full-lines
.text
// $x at 0x0000
@@ -18,6 +18,13 @@
// $x at 0x0018
add x0, x0, x0
-// CHECK: 0000000000000004 t $d.1
-// CHECK-NEXT: 0000000000000000 t $x.0
-// CHECK-NEXT: 0000000000000064 t $x.2
+.globl $d
+$d:
+$x:
+
+// CHECK: 0000000000000000 t $x
+// CHECK-NEXT: 0000000000000004 t $d
+// CHECK-NEXT: 0000000000000064 t $x
+// CHECK-NEXT: 0000000000000068 t $x
+// CHECK-NEXT: 0000000000000068 T $d
+// CHECK-NOT: {{.}}
diff --git a/llvm/test/MC/AArch64/size-directive.s b/llvm/test/MC/AArch64/size-directive.s
index 0b19cda..d9bdf97 100644
--- a/llvm/test/MC/AArch64/size-directive.s
+++ b/llvm/test/MC/AArch64/size-directive.s
@@ -32,7 +32,7 @@ aarch64_size:
// CHECK-OBJ-NEXT: )
// SYMS: Type Bind Vis Ndx Name
-// SYMS: NOTYPE LOCAL DEFAULT 3 $d.0
+// SYMS: NOTYPE LOCAL DEFAULT 3 $d{{$}}
// SYMS-NEXT: FUNC GLOBAL DEFAULT 3 aarch64_size
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND half_word
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND full_word
diff --git a/llvm/test/MC/ELF/AArch64/cfi.s b/llvm/test/MC/ELF/AArch64/cfi.s
index 033c8d9..6bdf03c 100644
--- a/llvm/test/MC/ELF/AArch64/cfi.s
+++ b/llvm/test/MC/ELF/AArch64/cfi.s
@@ -227,7 +227,7 @@ f37:
.cfi_endproc
// CHECK: Section {
-// CHECK: Name: .eh_frame (20)
+// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS (0x1)
// CHECK-NEXT: Flags [ (0x2)
// CHECK-NEXT: SHF_ALLOC (0x2)
@@ -355,7 +355,7 @@ f37:
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: Section {
-// CHECK: Name: .rela.eh_frame (15)
+// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA (0x4)
// CHECK-NEXT: Flags [ (0x40)
// CHECK-NEXT: SHF_INFO_LINK (0x40)
diff --git a/llvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test b/llvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test
index cf24952..011e67c 100644
--- a/llvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test
+++ b/llvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test
@@ -4,11 +4,11 @@
# CHECK: Disassembly of section .mysection:
# CHECK-EMPTY:
-# ALL-NEXT: <$x.0>:
+# ALL-NEXT: <$x>:
# CHECK-NEXT: <_start>:
# CHECK-NEXT: 0: 10000021 adr x1, 0x4
# CHECK-EMPTY:
-# ALL-NEXT: <$d.1>:
+# ALL-NEXT: <$d>:
# CHECK-NEXT: <msg>:
# CHECK-NEXT: 4: 48 65 6c 6c .word
# CHECK-NEXT: 8: 6f 2c 20 77 .word
@@ -18,10 +18,10 @@
# CHECK-NEXT: Disassembly of section .myothersection:
# CHECK-EMPTY:
# NOALL-NEXT: <.myothersection>:
-# ALL-NEXT: <$x.2>:
+# ALL-NEXT: <$x>:
# CHECK-NEXT: 0: 90000001 adrp x1, 0x0
# CHECK-EMPTY:
-# ALL-NEXT: <$d.3>:
+# ALL-NEXT: <$d>:
# CHECK-NEXT: <mystr>:
# CHECK-NEXT: 4: 62 6c 61 68 .word
# CHECK-NEXT: 8: 9a .byte 0x9a