[llvm] f80f251 - Revert "[obj2yaml] - Match ".stack_size" with the original section name, and not the uniquified name."

Rahman Lavaee via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 11:43:00 PDT 2020


Author: Rahman Lavaee
Date: 2020-09-16T11:42:37-07:00
New Revision: f80f2516a2697218eeb7af80de3b13c38f342987

URL: https://github.com/llvm/llvm-project/commit/f80f2516a2697218eeb7af80de3b13c38f342987
DIFF: https://github.com/llvm/llvm-project/commit/f80f2516a2697218eeb7af80de3b13c38f342987.diff

LOG: Revert "[obj2yaml] - Match ".stack_size" with the original section name, and not the uniquified name."

This reverts commit 14e55f82980cf1342d4d3eea4885a5375e829496.

Added: 
    

Modified: 
    llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml
    llvm/tools/obj2yaml/elf2yaml.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml b/llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml
index 98a5c5ae88aa..8e6c66729c4e 100644
--- a/llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml
+++ b/llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml
@@ -83,51 +83,3 @@ Sections:
   - Name:    .stack_sizes
     Type:    SHT_PROGBITS
     Content: ""
-
-## Check obj2yaml can dump multiple .stack_sizes.
-
-# RUN: yaml2obj --docnum=4 %s -o %t4
-# RUN: obj2yaml %t4 | FileCheck %s --check-prefix=MULTI
-
-# MULTI:      --- !ELF
-# MULTI-NEXT: FileHeader:
-# MULTI-NEXT:   Class:   ELFCLASS64
-# MULTI-NEXT:   Data:    ELFDATA2LSB
-# MULTI-NEXT:   Type:    ET_EXEC
-# MULTI-NEXT:   Machine: EM_NONE
-# MULTI-NEXT: Sections:
-# MULTI-NEXT:   - Name:    .stack_sizes
-# MULTI-NEXT:     Type:    SHT_PROGBITS
-# MULTI-NEXT:     Entries:
-# MULTI-NEXT:       - Address: 0x0000000000000010
-# MULTI-NEXT:         Size:    0x0000000000000020
-# MULTI-NEXT:       - Address: 0x0000000000000030
-# MULTI-NEXT:         Size:    0x0000000000000040
-# MULTI-NEXT:   - Name:    '.stack_sizes (1)'
-# MULTI-NEXT:     Type:    SHT_PROGBITS
-# MULTI-NEXT:     Entries:
-# MULTI-NEXT:       - Address: 0x0000000000000050
-# MULTI-NEXT:         Size:    0x0000000000000001
-# MULTI-NEXT:       - Address: 0x0000000000000060
-# MULTI-NEXT:         Size:    0x0000000000000002
-
---- !ELF
-FileHeader:
-  Class: ELFCLASS64
-  Data:  ELFDATA2LSB
-  Type:  ET_EXEC
-Sections:
-  - Name:    .stack_sizes
-    Type:    SHT_PROGBITS
-    Entries:
-      - Address: 0x0000000000000010
-        Size:    0x0000000000000020
-      - Address: 0x0000000000000030
-        Size:    0x0000000000000040
-  - Name:    '.stack_sizes (1)'
-    Type:    SHT_PROGBITS
-    Entries:
-      - Address: 0x0000000000000050
-        Size:    0x0000000000000001
-      - Address: 0x0000000000000060
-        Size:    0x0000000000000002

diff  --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp
index d4bc135b4e0c..3c3bef2dfbf4 100644
--- a/llvm/tools/obj2yaml/elf2yaml.cpp
+++ b/llvm/tools/obj2yaml/elf2yaml.cpp
@@ -522,7 +522,7 @@ ELFDumper<ELFT>::dumpSections() {
 
     // Recognize some special SHT_PROGBITS sections by name.
     if (Sec.sh_type == ELF::SHT_PROGBITS) {
-      auto NameOrErr = Obj.getSectionName(&Sec);
+      auto NameOrErr = getUniquedSectionName(&Sec);
       if (!NameOrErr)
         return NameOrErr.takeError();
 


        


More information about the llvm-commits mailing list