rizin/test/db/formats/elf/overlapped-segment
Riccardo Schirone 27e0d7ae82
RzBin: improve handling of addresses in ELF (#2591)
* RzBin/ELF: avoid the creation of useless flags at 0

Use UT64_MAX as an error value for addresses like symbols, imports,
sections, etc., and do not create flags for those because they are not
meaningful. This is useful for imports that do not have an address in
the virtual/file space and for non-alloc sections (e.g. .comment).
2022-05-10 10:17:35 +08:00

32 lines
1.2 KiB
Text

NAME=overlapped-segment
FILE=bins/elf/overlapped-segment
CMDS=<<EOF
iSS
pd 3 @ 0
EOF
EXPECT=<<EOF
paddr size vaddr vsize align perm name
-----------------------------------------------------------
0x00000040 0x2d8 0x00000040 0x2d8 0x8 -r-- PHDR
0x00000318 0x1c 0x00000318 0x1c 0x1 -r-- INTERP
0x00000000 0x5c8 0x00000000 0x5c8 0x1000 -r-- LOAD0
0x00001000 0x1c5 0x00000000 0x1c5 0x1000 -r-x LOAD1
0x00002000 0x128 0x00002000 0x128 0x1000 -r-- LOAD2
0x00002df0 0x220 0x00003df0 0x228 0x1000 -rw- LOAD3
0x00002e00 0x1c0 0x00003e00 0x1c0 0x8 -rw- DYNAMIC
0x00000338 0x20 0x00000338 0x20 0x8 -r-- NOTE
0x00000358 0x44 0x00000358 0x44 0x4 -r-- NOTE_1
0x00000338 0x20 0x00000338 0x20 0x8 -r-- UNKNOWN
0x00002004 0x3c 0x00002004 0x3c 0x4 -r-- GNU_EH_FRAME
0x00000000 0x0 0x00000000 0x0 0x10 -rw- GNU_STACK
0x00002df0 0x210 0x00003df0 0x210 0x1 -r-- GNU_RELRO
0x00000000 0x40 0x00000000 0x40 0x0 -rw- ehdr
;-- segment.LOAD0:
;-- segment.LOAD1:
;-- segment.GNU_STACK:
;-- segment.ehdr:
0x00000000 endbr64
0x00000004 sub rsp, 8
0x00000008 mov rax, qword [0x00002fe8] ; [0x2fe8:8]=-1
EOF
RUN