Index: llvm/trunk/test/tools/llvm-readobj/broken-group.test =================================================================== --- llvm/trunk/test/tools/llvm-readobj/broken-group.test +++ llvm/trunk/test/tools/llvm-readobj/broken-group.test @@ -20,6 +20,8 @@ # LLVM-STDOUT-NEXT: Group { # LLVM-STDOUT-NEXT: Name: .group # LLVM-STDOUT-NEXT: Index: 2 +# LLVM-STDOUT-NEXT: Link: 5 +# LLVM-STDOUT-NEXT: Info: 1 # LLVM-STDOUT-NEXT: Type: COMDAT # LLVM-STDOUT-NEXT: Signature: bar # LLVM-STDOUT-NEXT: Section(s) in group [ @@ -29,6 +31,8 @@ # LLVM-STDOUT-NEXT: Group { # LLVM-STDOUT-NEXT: Name: .group1 # LLVM-STDOUT-NEXT: Index: 4 +# LLVM-STDOUT-NEXT: Link: 5 +# LLVM-STDOUT-NEXT: Info: 2 # LLVM-STDOUT-NEXT: Type: COMDAT # LLVM-STDOUT-NEXT: Signature: zed # LLVM-STDOUT-NEXT: Section(s) in group [ Index: llvm/trunk/test/tools/llvm-readobj/elf-groups.test =================================================================== --- llvm/trunk/test/tools/llvm-readobj/elf-groups.test +++ llvm/trunk/test/tools/llvm-readobj/elf-groups.test @@ -21,6 +21,8 @@ CHECK-NEXT: Group { CHECK-NEXT: Name: .group (92) CHECK-NEXT: Index: 1 +CHECK-NEXT: Link: 23 +CHECK-NEXT: Info: 17 CHECK-NEXT: Type: COMDAT (0x1) CHECK-NEXT: Signature: _Z3fooIcEvT_ CHECK-NEXT: Section(s) in group [ @@ -31,6 +33,8 @@ CHECK-NEXT: Group { CHECK-NEXT: Name: .group (92) CHECK-NEXT: Index: 2 +CHECK-NEXT: Link: 23 +CHECK-NEXT: Info: 18 CHECK-NEXT: Type: COMDAT (0x1) CHECK-NEXT: Signature: _Z3fooIiEvT_ CHECK-NEXT: Section(s) in group [ Index: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp =================================================================== --- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp +++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp @@ -2482,6 +2482,8 @@ StringRef Signature; uint64_t ShName; uint64_t Index; + uint32_t Link; + uint32_t Info; uint32_t Type; std::vector Members; }; @@ -2508,7 +2510,14 @@ StringRef Name = unwrapOrError(Obj->getSectionName(&Sec)); StringRef Signature = StrTable.data() + Sym->st_name; - Ret.push_back({Name, Signature, Sec.sh_name, I - 1, Data[0], {}}); + Ret.push_back({Name, + Signature, + Sec.sh_name, + I - 1, + Sec.sh_link, + Sec.sh_info, + Data[0], + {}}); std::vector &GM = Ret.back().Members; for (uint32_t Ndx : Data.slice(1)) { @@ -3780,6 +3789,8 @@ DictScope D(W, "Group"); W.printNumber("Name", G.Name, G.ShName); W.printNumber("Index", G.Index); + W.printNumber("Link", G.Link); + W.printNumber("Info", G.Info); W.printHex("Type", getGroupType(G.Type), G.Type); W.startLine() << "Signature: " << G.Signature << "\n";