[PATCH] D67824: [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 03:41:46 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL372578: [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes… (authored by grimar, committed by ).
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D67824?vs=220990&id=221279#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67824/new/
https://reviews.llvm.org/D67824
Files:
llvm/trunk/test/tools/llvm-readobj/stack-sizes.test
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/trunk/test/tools/llvm-readobj/stack-sizes.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/stack-sizes.test
+++ llvm/trunk/test/tools/llvm-readobj/stack-sizes.test
@@ -48,7 +48,7 @@
## followed by a ULEB for the size.
Content: "000000000000000010000000000000000020"
Link: .text
- - Name: .stack_sizes.baz
+ - Name: '.stack_sizes [1]'
Type: SHT_PROGBITS
## One stack size entry.
Content: "200000000000000008"
@@ -66,9 +66,9 @@
Addend: 16
Symbol: .text
Type: R_X86_64_64
- - Name: .rela.stack_sizes.baz
+ - Name: '.rela.stack_sizes [1]'
Type: SHT_RELA
- Info: .stack_sizes.baz
+ Info: '.stack_sizes [1]'
Relocations:
- Offset: 0
Symbol: separate_text_section_baz
Index: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
@@ -4829,7 +4829,7 @@
StringRef FileStr = Obj->getFileName();
for (const SectionRef &Sec : Obj->sections()) {
StringRef SectionName = getSectionName(Sec);
- if (!SectionName.startswith(".stack_sizes"))
+ if (SectionName != ".stack_sizes")
continue;
PrintHeader();
const Elf_Shdr *ElfSec = Obj->getSection(Sec.getRawDataRefImpl());
@@ -4879,7 +4879,7 @@
// A stack size section that we haven't encountered yet is mapped to the
// null section until we find its corresponding relocation section.
- if (SectionName.startswith(".stack_sizes"))
+ if (SectionName == ".stack_sizes")
if (StackSizeRelocMap.count(Sec) == 0) {
StackSizeRelocMap[Sec] = NullSection;
continue;
@@ -4900,7 +4900,7 @@
consumeError(ContentsSectionNameOrErr.takeError());
continue;
}
- if (!ContentsSectionNameOrErr->startswith(".stack_sizes"))
+ if (*ContentsSectionNameOrErr != ".stack_sizes")
continue;
// Insert a mapping from the stack sizes section to its relocation section.
StackSizeRelocMap[Obj->toSectionRef(ContentsSec)] = Sec;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67824.221279.patch
Type: text/x-patch
Size: 2186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190923/cf7546df/attachment.bin>
More information about the llvm-commits
mailing list