diff --git a/llvm/test/tools/llvm-objdump/ELF/symbol-table.test b/llvm/test/tools/llvm-objdump/ELF/symbol-table.test --- a/llvm/test/tools/llvm-objdump/ELF/symbol-table.test +++ b/llvm/test/tools/llvm-objdump/ELF/symbol-table.test @@ -14,7 +14,7 @@ # CHECK-NEXT:0000000000000000 g *ABS* 0000000000000000 abs # CHECK-NEXT:0000000000000000 *COM* 0000000000000000 common # CHECK-NEXT:0000000000000000 g i .text 0000000000000000 ifunc -# CHECK-NEXT:0000000000000000 g O .data 0000000000000000 gnu_unique +# CHECK-NEXT:0000000000000000 u O .data 0000000000000000 gnu_unique --- !ELF FileHeader: diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1904,6 +1904,8 @@ if (auto *ELF = dyn_cast(O)) { if (ELFSymbolRef(*I).getELFType() == ELF::STT_GNU_IFUNC) Indirect = 'i'; + if (ELFSymbolRef(*I).getBinding() == ELF::STB_GNU_UNIQUE) + GlobLoc = 'u'; } char Debug = (Type == SymbolRef::ST_Debug || Type == SymbolRef::ST_File) ? 'd' : ' ';