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

relro entry missing in JSON output of "iIj" #19964

Closed
cpuinfo opened this issue Apr 17, 2022 · 5 comments
Closed

relro entry missing in JSON output of "iIj" #19964

cpuinfo opened this issue Apr 17, 2022 · 5 comments
Assignees

Comments

@cpuinfo
Copy link

cpuinfo commented Apr 17, 2022

Environment

date
Sun 17 Apr 2022 02:15:05 PM IST
r2 -v
radare2 5.4.2 0 @ linux-x86-64 git.5.4.2
commit: 5.4.2 build: 2021-09-26__11:56:56
uname -ms
Linux x86_64

Description

For two different binaries, I fired the "iIj" command after "aaa". One of them showed a missing "relro" entry as shown below. Is it not supposed to be there as it becomes easy to process the JSON outcome in a standardized way. Expected to have a "relro": "" blank entry atleast. Also no idea on why its not able to extract the relro for the binary.

Test

Attached zip format of the ELF binary samples
binary without relro
binary with relro

> aaa
> iIj

Output of ilj from two different binaries

Selection_957

@trufae
Copy link
Collaborator

trufae commented Apr 17, 2022

thats because this binary doesnt have relro information?

also, aaa is not necessary, all this info is in the binary headers, no code analysis required

Screenshot 2022-04-17 at 18 20 42

@Lazula
Copy link
Collaborator

Lazula commented Apr 18, 2022

@trufae I believe the salient part is this:

Expected to have a "relro": "" blank entry atleast.

@trufae
Copy link
Collaborator

trufae commented Apr 19, 2022

Imho it will be more correct to say relro:no. But this is just an elf specific thing. It doesnt exist in any other file format. So in case the value is not ther its not printed.

do we want to define json schemas for every command now?

@trufae
Copy link
Collaborator

trufae commented Apr 9, 2023

My only concern here is that relro only makes sense on elf. So i guess the fix for this relro:no must be done in the elf plugin instead of the json printer. Anyone?

@trufae
Copy link
Collaborator

trufae commented Jun 3, 2023

sorry for the delay, i just had 5 spare minutes to check this issue, and pushed a pr fixing it.

@trufae trufae closed this as completed in 6ed6b59 Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants