Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 15:49 < DirtyJerz> addis %r7, %r9, -0x0A40
- 15:49 < DirtyJerz> that is the function we want to change.
- 15:51 < DirtyJerz> 0x0A40
- 15:51 < DirtyJerz> you need to shift it by 16 bits?
- 15:51 < DirtyJerz> 0x0A400000
- 15:52 < DirtyJerz> so we figure out the size we want we'll do say 40GB
- 15:53 < DirtyJerz> 40*1024*1024*1024=42949672960
- 15:53 < DirtyJerz> now / 512
- 15:53 < DirtyJerz> 83886080
- 15:53 < DirtyJerz> = 0x05000000
- 15:53 < DirtyJerz> left shift
- 15:53 < DirtyJerz> now we get 0x0500
- 15:54 < DirtyJerz> so we echo addis %r7, %r9, -0x0500 > file.S
- 15:54 < DirtyJerz> then powerpc-openwrt-linux-gcc -c file.S
- 15:54 < DirtyJerz> then powerpc-openwrt-linux-objdump -d file.o
- 15:55 < DirtyJerz> gives us
- 15:55 -!- Irssi: Pasting 6 lines to #otheros. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.
- 15:55 < DirtyJerz> file.o: file format elf32-powerpc
- 15:55 < DirtyJerz> Disassembly of section .text:
- 15:55 < DirtyJerz> 00000000 <.text>: 0:I3c e9 fb 00 Iaddis r7,r9,-1280
- 15:56 < DirtyJerz> \x3c\xe9\xfb\x00 would be 40GB if i did everything correct
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement