-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm-readelf] Print a blank line for the first hex/string dump #85744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,8 @@ FileHeader: | |
# RUN: llvm-readelf --hex-dump=.sec %t2.out1 | \ | ||
# RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SPACES1 | ||
|
||
# SPACES1:Hex dump of section '.sec': | ||
# SPACES1:{{^$}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps for consistency, it's worth adding this check to the other cases below? |
||
# SPACES1-NEXT:Hex dump of section '.sec': | ||
# SPACES1-NEXT:0x00000000 00000000 00000000 00000000 00000000 ................ | ||
# SPACES1-NEXT:0x00000010 0000 .. | ||
|
||
|
@@ -55,7 +56,8 @@ FileHeader: | |
# RUN: llvm-readelf --hex-dump=.sec %t2.out2 | \ | ||
# RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SPACES2 | ||
|
||
# SPACES2:Hex dump of section '.sec': | ||
# SPACES2:{{^$}} | ||
# SPACES2-NEXT:Hex dump of section '.sec': | ||
# SPACES2-NEXT:0x00000000 00000000 00000000 00000000 00000000 ................ | ||
# SPACES2-NEXT:0x00000010 00000000 00000000 00000000 0000 .............. | ||
|
||
|
@@ -64,7 +66,8 @@ FileHeader: | |
# RUN: llvm-readelf --hex-dump=.sec %t2.out3 | \ | ||
# RUN: FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SPACES3 | ||
|
||
# SPACES3:Hex dump of section '.sec': | ||
# SPACES3:{{^$}} | ||
# SPACES3-NEXT:Hex dump of section '.sec': | ||
# SPACES3-NEXT:0x00000000 00000000 00000000 00000000 00000000 ................ | ||
# SPACES3-NEXT:0x00000010 00000000 00000000 00000000 ............ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# REQUIRES: x86-registered-target | ||
|
||
# RUN: llvm-mc -filetype=obj -triple x86_64 %s -o %t.o | ||
# RUN: llvm-readobj -p .a -p .b %t.o | FileCheck %s | ||
# RUN: llvm-readobj -p .a -p .b %t.o | FileCheck %s --check-prefixes=HEADER,CHECK | ||
# RUN: llvm-readelf -p .a -p .b %t.o | FileCheck %s | ||
|
||
# CHECK: String dump of section '.a': | ||
# HEADER: LoadName: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||
# CHECK: {{^$}} | ||
# CHECK-NEXT: String dump of section '.a': | ||
# CHECK-NEXT: [ 0] 0 | ||
# CHECK-EMPTY: | ||
# CHECK-NEXT: String dump of section '.b': | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
# RUN: llvm-readobj --string-dump=.strings \ | ||
# RUN: --string-dump=.not_null_terminated %t > %t.readobj.out | ||
# RUN: FileCheck %s --input-file=%t.readobj.out | ||
# RUN: FileCheck %s --input-file=%t.readobj.out --check-prefixes=HEADER,CHECK | ||
|
||
# Also test the different ways --string-dump can be specified, i.e. as a short | ||
# flag (-p), with different prefix modes (-p .foo, -p=.foo, -p.foo), and with | ||
|
@@ -23,7 +23,9 @@ | |
# RUN: llvm-readelf -hp1 -p2 %t | cmp %t.readelf.out - | ||
# RUN: llvm-readelf -hp 1 -p.not_null_terminated %t | cmp %t.readelf.out - | ||
|
||
# CHECK: String dump of section '.strings': | ||
# HEADER: LoadName: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. llvm-readobj -x .a -x .b prints two blank lines before the first Hex dump of section. |
||
# CHECK: {{^$}} | ||
# CHECK-NEXT: String dump of section '.strings': | ||
# CHECK-NEXT: [ 0] here | ||
# CHECK-NEXT: [ 5] are | ||
# CHECK-NEXT: [ 9] some | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the HEADER check here actually important to the test? It feels to me like you could do the same as in hex-dump.s and just check the blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm-readobj -x .a -x .b
prints two blank lines before the firstHex dump of section
.We have to test
LoadName:
to skip the first blank line (not due to hex/string dump).