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

sub sp, sp, 0x1000 not correctly assembled for ARM #10651

Closed
radare opened this issue Jul 7, 2018 · 4 comments
Closed

sub sp, sp, 0x1000 not correctly assembled for ARM #10651

radare opened this issue Jul 7, 2018 · 4 comments

Comments

@radare
Copy link
Collaborator

radare commented Jul 7, 2018

right now:

$ rasm2 -a arm -b 32 'sub sp, sp, 0x1000'
00d04de2

should be

$ rasm2 -a arm -b 32 -d 01da4de2
sub sp, sp, 0x1000
@radare radare added this to the 2.7.0 milestone Jul 7, 2018
@radare
Copy link
Collaborator Author

radare commented Jul 8, 2018

sub sp, sp, 0x800
$ rasm2 -a arm -b 32 -d 01db4de2
sub sp, sp, 0x400
$ rasm2 -a arm -b 32 -d 01db1de2
ands sp, sp, 0x400
$ rasm2 -a arm -b 32 -d 01db4de2
sub sp, sp, 0x400
$ rasm2 -a arm -b 32 -d 01da4de2
sub sp, sp, 0x1000
$ rasm2 -a arm -b 32 -d 01d94de2
sub sp, sp, 0x4000
$ rasm2 -a arm -b 32 -d 01d44de2
sub sp, sp, 0x1000000
$ rasm2 -a arm -b 32 -d 01d24de2
sub sp, sp, 0x10000000

@radare
Copy link
Collaborator Author

radare commented Jul 8, 2018

all those instructions are wrongly assembled

@radare radare modified the milestones: 2.7.0, 2.8.0 Jul 8, 2018
@radare radare modified the milestones: 2.9.0, 3.0 Sep 3, 2018
@ret2libc ret2libc modified the milestones: 3.0, 3.2.0 Oct 11, 2018
@radare radare modified the milestones: 3.2.0, 3.3.0 Dec 31, 2018
@radare radare modified the milestones: 3.3.0, 3.4.0 - aprils Feb 10, 2019
@radare radare removed this from the 3.5.0 milestone May 7, 2019
@layderv
Copy link
Contributor

layderv commented Oct 3, 2019

$ arm-linux-gnueabihf-as arm.s
$ arm-linux-gnueabihf-objdump -D a.out

   0:	e24dda01 	sub	sp, sp, #4096	; 0x1000
   4:	e24ddb01 	sub	sp, sp, #1024	; 0x400
   8:	e21ddb01 	ands	sp, sp, #1024	; 0x400
   c:	e24ddb01 	sub	sp, sp, #1024	; 0x400
  10:	e24dda01 	sub	sp, sp, #4096	; 0x1000
  14:	e24dd901 	sub	sp, sp, #16384	; 0x4000
  18:	e24dd401 	sub	sp, sp, #16777216	; 0x1000000
  1c:	e24dd201 	sub	sp, sp, #268435456	; 0x10000000
  20:	e24dd00a 	sub	sp, sp, #10

@radare
Copy link
Collaborator Author

radare commented Oct 5, 2019 via email

layderv added a commit to layderv/radare2 that referenced this issue Oct 7, 2019
@radare radare closed this as completed in a001e7c Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants