Skip to content
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

iS/iSS: Right-align "align" column #4850

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions librz/core/cbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ static void sections_headers_setup(RzCore *core, RzCmdStateOutput *state, RzList
RzListIter *iter;
char *hashname;

rz_cmd_state_output_set_columnsf(state, "XxXxsssss", "paddr", "size", "vaddr", "vsize", "align", "perm", "name", "type", "flags");
rz_cmd_state_output_set_columnsf(state, "XxXxxssss", "paddr", "size", "vaddr", "vsize", "align", "perm", "name", "type", "flags");

rz_list_foreach (hashes, iter, hashname) {
const RzHashPlugin *msg_plugin = rz_hash_plugin_by_name(core->hash, hashname);
Expand Down Expand Up @@ -2649,7 +2649,7 @@ RZ_API bool rz_core_bin_segments_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBin
char *hashname;

rz_cmd_state_output_array_start(state);
rz_cmd_state_output_set_columnsf(state, "XxXxsss", "paddr", "size", "vaddr", "vsize", "align", "perm", "name");
rz_cmd_state_output_set_columnsf(state, "XxXxxss", "paddr", "size", "vaddr", "vsize", "align", "perm", "name");

rz_list_foreach (hashes, iter, hashname) {
const RzHashPlugin *msg_plugin = rz_hash_plugin_by_name(core->hash, hashname);
Expand Down
48 changes: 24 additions & 24 deletions test/db/abi/platforms/sections
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ CMDS=<<EOF
iS~gold,plt
EOF
EXPECT=<<EOF
0x00000378 0x48 0x00008378 0x48 0x0 -r-- .rel.plt REL alloc
0x000003c0 0x80 0x000083c0 0x80 0x0 -r-x .plt PROGBITS alloc,execute
0x00000bac 0x1c ---------- 0x1c 0x0 ---- .note.gnu.gold-version NOTE
0x00000378 0x48 0x00008378 0x48 0x0 -r-- .rel.plt REL alloc
0x000003c0 0x80 0x000083c0 0x80 0x0 -r-x .plt PROGBITS alloc,execute
0x00000bac 0x1c ---------- 0x1c 0x0 ---- .note.gnu.gold-version NOTE
EOF
RUN

Expand All @@ -16,8 +16,8 @@ CMDS=<<EOF
iS~gold,plt
EOF
EXPECT=<<EOF
0x00000350 0x50 0x00008350 0x50 0x0 -r-- .rel.plt REL alloc
0x000003ac 0x8c 0x000083ac 0x8c 0x0 -r-x .plt PROGBITS alloc,execute
0x00000350 0x50 0x00008350 0x50 0x0 -r-- .rel.plt REL alloc
0x000003ac 0x8c 0x000083ac 0x8c 0x0 -r-x .plt PROGBITS alloc,execute
EOF
RUN

Expand All @@ -27,8 +27,8 @@ CMDS=<<EOF
iS~MIPS
EOF
EXPECT=<<EOF
0x000001c8 0x18 0x004001c8 0x18 0x0 -r-- .MIPS.abiflags LOPROC+0x0000002a alloc
0x00000df0 0x90 0x00400df0 0x90 0x0 -r-x .MIPS.stubs PROGBITS alloc,execute
0x000001c8 0x18 0x004001c8 0x18 0x0 -r-- .MIPS.abiflags LOPROC+0x0000002a alloc
0x00000df0 0x90 0x00400df0 0x90 0x0 -r-x .MIPS.stubs PROGBITS alloc,execute
EOF
RUN

Expand All @@ -38,9 +38,9 @@ CMDS=<<EOF
iS~MIPS
EOF
EXPECT=<<EOF
0x00000270 0x18 0x120000270 0x18 0x0 -r-- .MIPS.abiflags LOPROC+0x0000002a alloc
0x00000288 0x168 0x120000288 0x168 0x0 -r-- .MIPS.options LOPROC+0x0000000d alloc
0x000012a0 0x90 0x1200012a0 0x90 0x0 -r-x .MIPS.stubs PROGBITS alloc,execute
0x00000270 0x18 0x120000270 0x18 0x0 -r-- .MIPS.abiflags LOPROC+0x0000002a alloc
0x00000288 0x168 0x120000288 0x168 0x0 -r-- .MIPS.options LOPROC+0x0000000d alloc
0x000012a0 0x90 0x1200012a0 0x90 0x0 -r-x .MIPS.stubs PROGBITS alloc,execute
EOF
RUN

Expand All @@ -50,8 +50,8 @@ CMDS=<<EOF
iS~plt
EOF
EXPECT=<<EOF
0x00000294 0x30 0x10000294 0x30 0x0 -r-- .rela.plt RELA alloc,info
0x00010000 0x10 0x10020000 0x10 0x0 -rw- .plt PROGBITS write,alloc
0x00000294 0x30 0x10000294 0x30 0x0 -r-- .rela.plt RELA alloc,info
0x00010000 0x10 0x10020000 0x10 0x0 -rw- .plt PROGBITS write,alloc
EOF
RUN

Expand All @@ -61,8 +61,8 @@ CMDS=<<EOF
iS~gold,plt
EOF
EXPECT=<<EOF
0x00000350 0x78 0x10000350 0x78 0x0 -r-- .rela.plt RELA alloc,info
0x00010000 0x28 0x10020000 0x28 0x0 -rw- .plt PROGBITS write,alloc
0x00000350 0x78 0x10000350 0x78 0x0 -r-- .rela.plt RELA alloc,info
0x00010000 0x28 0x10020000 0x28 0x0 -rw- .plt PROGBITS write,alloc
EOF
RUN

Expand All @@ -72,9 +72,9 @@ CMDS=<<EOF
iS~gold,plt
EOF
EXPECT=<<EOF
0x00000460 0xd8 0x00400460 0xd8 0x0 -r-- .rela.plt RELA alloc
0x00000560 0xa0 0x00400560 0xa0 0x0 -r-x .plt PROGBITS alloc,execute
0x00001000 0x60 0x00601000 0x60 0x0 -rw- .got.plt PROGBITS write,alloc
0x00000460 0xd8 0x00400460 0xd8 0x0 -r-- .rela.plt RELA alloc
0x00000560 0xa0 0x00400560 0xa0 0x0 -r-x .plt PROGBITS alloc,execute
0x00001000 0x60 0x00601000 0x60 0x0 -rw- .got.plt PROGBITS write,alloc
EOF
RUN

Expand All @@ -84,8 +84,8 @@ CMDS=<<EOF
iS~stub
EOF
EXPECT=<<EOF
0x00000f4e 0x1e 0x100000f4e 0x1e 0x2 -r-x 1.__TEXT.__stubs SYMBOL_STUBS PURE_INSTRUCTIONS,SOME_INSTRUCTIONS
0x00000f6c 0x42 0x100000f6c 0x42 0x4 -r-x 2.__TEXT.__stub_helper REGULAR PURE_INSTRUCTIONS,SOME_INSTRUCTIONS
0x00000f4e 0x1e 0x100000f4e 0x1e 0x2 -r-x 1.__TEXT.__stubs SYMBOL_STUBS PURE_INSTRUCTIONS,SOME_INSTRUCTIONS
0x00000f6c 0x42 0x100000f6c 0x42 0x4 -r-x 2.__TEXT.__stub_helper REGULAR PURE_INSTRUCTIONS,SOME_INSTRUCTIONS
EOF
RUN

Expand All @@ -95,9 +95,9 @@ CMDS=<<EOF
iS~gold,plt
EOF
EXPECT=<<EOF
0x00000330 0x48 0x08048330 0x48 0x0 -r-- .rel.plt REL alloc
0x000003a0 0xa0 0x080483a0 0xa0 0x0 -r-x .plt PROGBITS alloc,execute
0x00001000 0x30 0x0804a000 0x30 0x0 -rw- .got.plt PROGBITS write,alloc
0x00000330 0x48 0x08048330 0x48 0x0 -r-- .rel.plt REL alloc
0x000003a0 0xa0 0x080483a0 0xa0 0x0 -r-x .plt PROGBITS alloc,execute
0x00001000 0x30 0x0804a000 0x30 0x0 -rw- .got.plt PROGBITS write,alloc
EOF
RUN

Expand All @@ -107,7 +107,7 @@ CMDS=<<EOF
iS~tls
EOF
EXPECT=<<EOF
0x00002e00 0x200 0x00408000 0x1000 0x0 -rw- .tls CNT_INITIALIZED_DATA,ALIGN_4BYTES
0x00002e00 0x200 0x00408000 0x1000 0x0 -rw- .tls CNT_INITIALIZED_DATA,ALIGN_4BYTES
EOF
RUN

Expand All @@ -117,6 +117,6 @@ CMDS=<<EOF
iS~tls
EOF
EXPECT=<<EOF
0x00004400 0x200 0x0040a000 0x1000 0x0 -rw- .tls CNT_INITIALIZED_DATA,ALIGN_32BYTES
0x00004400 0x200 0x0040a000 0x1000 0x0 -rw- .tls CNT_INITIALIZED_DATA,ALIGN_32BYTES
EOF
RUN
2 changes: 1 addition & 1 deletion test/db/analysis/avr
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ aaa
iS~.rom
EOF
EXPECT=<<EOF
0x00001fff 0x4000 0x00001fff 0x4000 0x0 -r-x .rom NULL
0x00001fff 0x4000 0x00001fff 0x4000 0x0 -r-x .rom NULL
EOF
RUN

Expand Down
2 changes: 1 addition & 1 deletion test/db/analysis/x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ EOF
EXPECT=<<EOF
paddr size vaddr vsize align perm name type flags
--------------------------------------------------------------------------
0x00000188 0x24 0x08048188 0x24 0x0 -r-- .note.gnu.build-id NOTE alloc
0x00000188 0x24 0x08048188 0x24 0x0 -r-- .note.gnu.build-id NOTE alloc
paddr size vaddr vsize align perm name type flags
--------------------------------------------------
[{"name":".plt","size":240,"vsize":240,"perm":"-r-x","type":"PROGBITS","flags":["alloc","execute"],"paddr":1888,"vaddr":134514528}]
Expand Down
64 changes: 32 additions & 32 deletions test/db/archos/linux-x64/debuginfod
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@ EOF
EXPECT=<<EOF
paddr size vaddr vsize align perm name type flags
-----------------------------------------------------------------------------------------
0x00000000 0x0 ---------- 0x0 0x0 ---- NULL
0x00000318 0x1c 0x00000318 0x1c 0x0 -r-- .interp PROGBITS alloc
0x00000338 0x20 0x00000338 0x20 0x0 -r-- .note.gnu.property NOTE alloc
0x00000358 0x24 0x00000358 0x24 0x0 -r-- .note.gnu.build-id NOTE alloc
0x0000037c 0x20 0x0000037c 0x20 0x0 -r-- .note.ABI-tag NOTE alloc
0x000003a0 0x40 0x000003a0 0x40 0x0 -r-- .hash HASH alloc
0x000003e0 0x24 0x000003e0 0x24 0x0 -r-- .gnu.hash GNU_HASH alloc
0x00000408 0x108 0x00000408 0x108 0x0 -r-- .dynsym DYNSYM alloc
0x00000510 0xac 0x00000510 0xac 0x0 -r-- .dynstr STRTAB alloc
0x000005bc 0x16 0x000005bc 0x16 0x0 -r-- .gnu.version VERSYM alloc
0x000005d8 0x30 0x000005d8 0x30 0x0 -r-- .gnu.version_r VERNEED alloc
0x00000608 0xc0 0x00000608 0xc0 0x0 -r-- .rela.dyn RELA alloc
0x000006c8 0x78 0x000006c8 0x78 0x0 -r-- .rela.plt RELA alloc,info
0x00001000 0x17 0x00001000 0x17 0x0 -r-x .init PROGBITS alloc,execute
0x00001020 0x60 0x00001020 0x60 0x0 -r-x .plt PROGBITS alloc,execute
0x00001080 0x8 0x00001080 0x8 0x0 -r-x .plt.got PROGBITS alloc,execute
0x00001090 0x31f 0x00001090 0x31f 0x0 -r-x .text PROGBITS alloc,execute
0x000013b0 0x9 0x000013b0 0x9 0x0 -r-x .fini PROGBITS alloc,execute
0x00002000 0x58 0x00002000 0x58 0x0 -r-- .rodata PROGBITS alloc
0x00002058 0x3c 0x00002058 0x3c 0x0 -r-- .eh_frame_hdr PROGBITS alloc
0x00002098 0xec 0x00002098 0xec 0x0 -r-- .eh_frame PROGBITS alloc
0x00002dc0 0x8 0x00003dc0 0x8 0x0 -rw- .init_array INIT_ARRAY write,alloc
0x00002dc8 0x8 0x00003dc8 0x8 0x0 -rw- .fini_array FINI_ARRAY write,alloc
0x00002dd0 0x1f0 0x00003dd0 0x1f0 0x0 -rw- .dynamic DYNAMIC write,alloc
0x00002fc0 0x28 0x00003fc0 0x28 0x0 -rw- .got PROGBITS write,alloc
0x00002fe8 0x40 0x00003fe8 0x40 0x0 -rw- .got.plt PROGBITS write,alloc
0x00003028 0x10 0x00004028 0x10 0x0 -rw- .data PROGBITS write,alloc
0x00003038 0x0 0x00004038 0x8 0x0 -rw- .bss NOBITS write,alloc
0x00003038 0x3b ---------- 0x3b 0x0 ---- .comment PROGBITS merge,strings
0x00003078 0x378 ---------- 0x378 0x0 ---- .symtab SYMTAB
0x000033f0 0x21c ---------- 0x21c 0x0 ---- .strtab STRTAB
0x0000360c 0x11a ---------- 0x11a 0x0 ---- .shstrtab STRTAB
0x00000000 0x0 ---------- 0x0 0x0 ---- NULL
0x00000318 0x1c 0x00000318 0x1c 0x0 -r-- .interp PROGBITS alloc
0x00000338 0x20 0x00000338 0x20 0x0 -r-- .note.gnu.property NOTE alloc
0x00000358 0x24 0x00000358 0x24 0x0 -r-- .note.gnu.build-id NOTE alloc
0x0000037c 0x20 0x0000037c 0x20 0x0 -r-- .note.ABI-tag NOTE alloc
0x000003a0 0x40 0x000003a0 0x40 0x0 -r-- .hash HASH alloc
0x000003e0 0x24 0x000003e0 0x24 0x0 -r-- .gnu.hash GNU_HASH alloc
0x00000408 0x108 0x00000408 0x108 0x0 -r-- .dynsym DYNSYM alloc
0x00000510 0xac 0x00000510 0xac 0x0 -r-- .dynstr STRTAB alloc
0x000005bc 0x16 0x000005bc 0x16 0x0 -r-- .gnu.version VERSYM alloc
0x000005d8 0x30 0x000005d8 0x30 0x0 -r-- .gnu.version_r VERNEED alloc
0x00000608 0xc0 0x00000608 0xc0 0x0 -r-- .rela.dyn RELA alloc
0x000006c8 0x78 0x000006c8 0x78 0x0 -r-- .rela.plt RELA alloc,info
0x00001000 0x17 0x00001000 0x17 0x0 -r-x .init PROGBITS alloc,execute
0x00001020 0x60 0x00001020 0x60 0x0 -r-x .plt PROGBITS alloc,execute
0x00001080 0x8 0x00001080 0x8 0x0 -r-x .plt.got PROGBITS alloc,execute
0x00001090 0x31f 0x00001090 0x31f 0x0 -r-x .text PROGBITS alloc,execute
0x000013b0 0x9 0x000013b0 0x9 0x0 -r-x .fini PROGBITS alloc,execute
0x00002000 0x58 0x00002000 0x58 0x0 -r-- .rodata PROGBITS alloc
0x00002058 0x3c 0x00002058 0x3c 0x0 -r-- .eh_frame_hdr PROGBITS alloc
0x00002098 0xec 0x00002098 0xec 0x0 -r-- .eh_frame PROGBITS alloc
0x00002dc0 0x8 0x00003dc0 0x8 0x0 -rw- .init_array INIT_ARRAY write,alloc
0x00002dc8 0x8 0x00003dc8 0x8 0x0 -rw- .fini_array FINI_ARRAY write,alloc
0x00002dd0 0x1f0 0x00003dd0 0x1f0 0x0 -rw- .dynamic DYNAMIC write,alloc
0x00002fc0 0x28 0x00003fc0 0x28 0x0 -rw- .got PROGBITS write,alloc
0x00002fe8 0x40 0x00003fe8 0x40 0x0 -rw- .got.plt PROGBITS write,alloc
0x00003028 0x10 0x00004028 0x10 0x0 -rw- .data PROGBITS write,alloc
0x00003038 0x0 0x00004038 0x8 0x0 -rw- .bss NOBITS write,alloc
0x00003038 0x3b ---------- 0x3b 0x0 ---- .comment PROGBITS merge,strings
0x00003078 0x378 ---------- 0x378 0x0 ---- .symtab SYMTAB
0x000033f0 0x21c ---------- 0x21c 0x0 ---- .strtab STRTAB
0x0000360c 0x11a ---------- 0x11a 0x0 ---- .shstrtab STRTAB
0x00001000 3 23 sym._init
0x00001030 1 6 sym.imp.strncpy
0x00001040 1 6 sym.imp.printf
Expand Down
Loading
Loading