[PATCH] D116360: [llvm-readobj] Solve the misalignment problem caused by RISCV_ATTRIBUTES
Shao-Ce SUN via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 28 23:05:00 PST 2021
achieveartificialintelligence updated this revision to Diff 396488.
achieveartificialintelligence added a comment.
Herald added a subscriber: emaste.
update tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116360/new/
https://reviews.llvm.org/D116360
Files:
llvm/test/tools/llvm-readobj/ELF/gnu-sections.test
llvm/test/tools/llvm-readobj/ELF/sections-no-section-header-string-table.test
llvm/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -3648,9 +3648,9 @@
OS << "Section Headers:\n";
Field Fields[11] = {
{"[Nr]", 2}, {"Name", 7}, {"Type", 25},
- {"Address", 41}, {"Off", 58 - Bias}, {"Size", 65 - Bias},
- {"ES", 72 - Bias}, {"Flg", 75 - Bias}, {"Lk", 79 - Bias},
- {"Inf", 82 - Bias}, {"Al", 86 - Bias}};
+ {"Address", 42}, {"Off", 59 - Bias}, {"Size", 66 - Bias},
+ {"ES", 73 - Bias}, {"Flg", 76 - Bias}, {"Lk", 80 - Bias},
+ {"Inf", 83 - Bias}, {"Al", 87 - Bias}};
for (const Field &F : Fields)
printField(F);
OS << "\n";
Index: llvm/test/tools/llvm-readobj/ELF/sections-no-section-header-string-table.test
===================================================================
--- llvm/test/tools/llvm-readobj/ELF/sections-no-section-header-string-table.test
+++ llvm/test/tools/llvm-readobj/ELF/sections-no-section-header-string-table.test
@@ -7,12 +7,12 @@
# RUN: | FileCheck %s -DFILE=%t --check-prefix=LLVM
# GNU:Section Headers:
-# GNU-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
-# GNU-NEXT: [ 0] <no-strings> NULL 0000000000000000 000000 000000 00 0 0 0
-# GNU-NEXT: [ 1] <no-strings> PROGBITS 0000000000000000 000040 000000 00 0 0 0
-# GNU-NEXT: [ 2] <no-strings> PROGBITS 0000000000000000 000040 000000 00 0 0 0
-# GNU-NEXT: [ 3] <no-strings> STRTAB 0000000000000000 000040 000001 00 0 0 1
-# GNU-NEXT: [ 4] <no-strings> STRTAB 0000000000000000 000041 00001d 00 0 0 1
+# GNU-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
+# GNU-NEXT: [ 0] <no-strings> NULL 0000000000000000 000000 000000 00 0 0 0
+# GNU-NEXT: [ 1] <no-strings> PROGBITS 0000000000000000 000040 000000 00 0 0 0
+# GNU-NEXT: [ 2] <no-strings> PROGBITS 0000000000000000 000040 000000 00 0 0 0
+# GNU-NEXT: [ 3] <no-strings> STRTAB 0000000000000000 000040 000001 00 0 0 1
+# GNU-NEXT: [ 4] <no-strings> STRTAB 0000000000000000 000041 00001d 00 0 0 1
# LLVM: Sections [
# LLVM-NEXT: Section {
Index: llvm/test/tools/llvm-readobj/ELF/gnu-sections.test
===================================================================
--- llvm/test/tools/llvm-readobj/ELF/gnu-sections.test
+++ llvm/test/tools/llvm-readobj/ELF/gnu-sections.test
@@ -9,16 +9,16 @@
# ELF32:There are 9 section headers, starting at offset 0x9c:
# ELF32-EMPTY:
# ELF32-NEXT:Section Headers:
-# ELF32-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
-# ELF32-NEXT: [ 0] NULL 00000000 000000 000000 00 0 0 0
-# ELF32-NEXT: [ 1] .text PROGBITS 00000000 000034 000001 00 AX 0 0 4
-# ELF32-NEXT: [ 2] .rel.text REL 00000000 000038 000000 08 6 1 4
-# ELF32-NEXT: [ 3] .rela.text RELA 00000000 000038 000000 18 6 1 8
-# ELF32-NEXT: [ 4] .data PROGBITS 00000000 000038 000000 00 WA 0 0 4
-# ELF32-NEXT: [ 5] .bss NOBITS 00000000 000038 000000 00 WA 0 0 4
-# ELF32-NEXT: [ 6] .symtab SYMTAB 00000000 000038 000020 10 7 2 8
-# ELF32-NEXT: [ 7] .strtab STRTAB 00000000 000058 000007 00 0 0 1
-# ELF32-NEXT: [ 8] .shstrtab STRTAB 00000000 00005f 00003b 00 0 0 1
+# ELF32-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
+# ELF32-NEXT: [ 0] NULL 00000000 000000 000000 00 0 0 0
+# ELF32-NEXT: [ 1] .text PROGBITS 00000000 000034 000001 00 AX 0 0 4
+# ELF32-NEXT: [ 2] .rel.text REL 00000000 000038 000000 08 6 1 4
+# ELF32-NEXT: [ 3] .rela.text RELA 00000000 000038 000000 18 6 1 8
+# ELF32-NEXT: [ 4] .data PROGBITS 00000000 000038 000000 00 WA 0 0 4
+# ELF32-NEXT: [ 5] .bss NOBITS 00000000 000038 000000 00 WA 0 0 4
+# ELF32-NEXT: [ 6] .symtab SYMTAB 00000000 000038 000020 10 7 2 8
+# ELF32-NEXT: [ 7] .strtab STRTAB 00000000 000058 000007 00 0 0 1
+# ELF32-NEXT: [ 8] .shstrtab STRTAB 00000000 00005f 00003b 00 0 0 1
# ELF32-NEXT:Key to Flags:
# ELF32-NEXT: W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
# ELF32-NEXT: L (link order), O (extra OS processing required), G (group), T (TLS),
@@ -83,16 +83,16 @@
# ELF64:There are 9 section headers, starting at offset 0xc0:
# ELF64-EMPTY:
# ELF64-NEXT:Section Headers:
-# ELF64-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
-# ELF64-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0 0
-# ELF64-NEXT: [ 1] .text PROGBITS 0000000000000000 000040 000001 00 AX 0 0 4
-# ELF64-NEXT: [ 2] .rel.text REL 0000000000000000 000044 000000 08 6 1 4
-# ELF64-NEXT: [ 3] .rela.text RELA 0000000000000000 000048 000000 18 6 1 8
-# ELF64-NEXT: [ 4] .data PROGBITS 0000000000000000 000048 000000 00 WA 0 0 4
-# ELF64-NEXT: [ 5] .bss NOBITS 0000000000000000 000048 000000 00 WA 0 0 4
-# ELF64-NEXT: [ 6] .symtab SYMTAB 0000000000000000 000048 000030 18 7 2 8
-# ELF64-NEXT: [ 7] .strtab STRTAB 0000000000000000 000078 000007 00 0 0 1
-# ELF64-NEXT: [ 8] .shstrtab STRTAB 0000000000000000 00007f 00003b 00 0 0 1
+# ELF64-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
+# ELF64-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0 0
+# ELF64-NEXT: [ 1] .text PROGBITS 0000000000000000 000040 000001 00 AX 0 0 4
+# ELF64-NEXT: [ 2] .rel.text REL 0000000000000000 000044 000000 08 6 1 4
+# ELF64-NEXT: [ 3] .rela.text RELA 0000000000000000 000048 000000 18 6 1 8
+# ELF64-NEXT: [ 4] .data PROGBITS 0000000000000000 000048 000000 00 WA 0 0 4
+# ELF64-NEXT: [ 5] .bss NOBITS 0000000000000000 000048 000000 00 WA 0 0 4
+# ELF64-NEXT: [ 6] .symtab SYMTAB 0000000000000000 000048 000030 18 7 2 8
+# ELF64-NEXT: [ 7] .strtab STRTAB 0000000000000000 000078 000007 00 0 0 1
+# ELF64-NEXT: [ 8] .shstrtab STRTAB 0000000000000000 00007f 00003b 00 0 0 1
# ELF64-NEXT:Key to Flags:
# ELF64-NEXT: W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
# ELF64-NEXT: L (link order), O (extra OS processing required), G (group), T (TLS),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116360.396488.patch
Type: text/x-patch
Size: 7341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211229/edf60253/attachment.bin>
More information about the llvm-commits
mailing list