rizin/test/db/io/baddr
Rot127 3147948c85
Removes limit of just printing program entrypoints. (#5027)
entries_initfini_print() with initfini=false is only called by the 'ie' command handler.
'ie' prints entrypoints, so users should also be able to see all entrypoints (of any type)
the binary has. This was also the plan as it looks like, because further down
the entry point type is also emitted. But since initfini=false for 'ie'
only entries of type RZ_BIN_ENTRY_TYPE_PROGRAM were printed.
2025-03-24 02:13:17 +08:00

114 lines
2 KiB
Text

NAME=1: io.baddr
FILE=bins/elf/analysis/pie
CMDS=%v entry0
EXPECT=<<EOF
0x450
EOF
RUN
NAME=2: io.baddr
FILE=bins/elf/analysis/pie
ARGS=-B 0xf00000
CMDS=%v entry0
EXPECT=<<EOF
0xf00450
EOF
RUN
NAME=io.baddr entry0 data
FILE=bins/elf/analysis/pie
CMDS=<<EOF
ie:paddr:quiet
ie:vaddr:quiet
p8 10 @ 0x00000450
EOF
EXPECT=<<EOF
0x00000450
0x00000580
0x00000530
0x00000450
0x00000580
0x00000530
31ed5e89e183e4f05054
EOF
RUN
NAME=io.baddr -B entry0 data
FILE=bins/elf/analysis/pie
ARGS=-B 0x100000
CMDS=p8 10 @ 0x00100450
EXPECT=<<EOF
31ed5e89e183e4f05054
EOF
RUN
NAME=io.baddr -x86_32 entry0 data
FILE=bins/mach0/fatmach0-3true
ARGS=-a x86 -b 32
CMDS=<<EOF
ie:paddr:quiet
ie:vaddr:quiet
p8 10 @ 0x00001f44
p8 10 @ 0x00005f44
EOF
EXPECT=<<EOF
0x00005f44
0x00001f44
6a0089e583e4f083ec10
6a0089e583e4f083ec10
EOF
RUN
NAME=4: io.baddr
FILE=bins/elf/analysis/pie
ARGS=-B 0xf00000
CMDS=<<EOF
p8 10 @ 0x00f00450
EOF
EXPECT=<<EOF
31ed5e89e183e4f05054
EOF
RUN
NAME=e bin.baddr
FILE=bins/elf/analysis/hello-linux-x86_64
CMDS=%v `e bin.baddr`
EXPECT=<<EOF
0x400000
EOF
RUN
NAME=e bin.baddr changed
FILE=bins/elf/analysis/hello-linux-x86_64
ARGS=-B 0xf00000
CMDS=%v `e bin.baddr`
EXPECT=<<EOF
0xf00000
EOF
RUN
NAME=bin.baddr and anal
FILE=bins/elf/analysis/pie
ARGS=-B 0xf00000
CMDS=<<EOF
aaa
afl~$
EOF
EXPECT=<<EOF
0x00f003ec 3 35 sym._init
0x00f00420 1 6 sym.imp.__cxa_finalize
0x00f00430 1 6 loc.imp.__gmon_start
0x00f00440 1 6 sym.imp.__libc_start_main
0x00f00450 1 49 entry0
0x00f00482 1 4 fcn.00f00482
0x00f00490 1 4 sym.__x86.get_pc_thunk.bx
0x00f004a0 4 61 sym.deregister_tm_clones
0x00f004e0 4 71 sym.register_tm_clones
0x00f00530 5 71 sym.__do_global_dtors_aux
0x00f00580 4 69 -> 60 sym.frame_dummy
0x00f005c5 1 4 main
0x00f005d0 4 97 sym.__libc_csu_init
0x00f00640 1 2 sym.__libc_csu_fini
0x00f00644 1 20 sym._fini
EOF
RUN