Advertisement
DirtyJerz

edit emer_init_patch.tcl

Jun 13th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. 15:49 < DirtyJerz> addis %r7, %r9, -0x0A40
  2. 15:49 < DirtyJerz> that is the function we want to change.
  3. 15:51 < DirtyJerz> 0x0A40
  4. 15:51 < DirtyJerz> you need to shift it by 16 bits?
  5. 15:51 < DirtyJerz> 0x0A400000
  6. 15:52 < DirtyJerz> so we figure out the size we want we'll do say 40GB
  7. 15:53 < DirtyJerz> 40*1024*1024*1024=42949672960
  8. 15:53 < DirtyJerz> now / 512
  9. 15:53 < DirtyJerz> 83886080
  10. 15:53 < DirtyJerz> = 0x05000000
  11. 15:53 < DirtyJerz> left shift
  12. 15:53 < DirtyJerz> now we get 0x0500
  13. 15:54 < DirtyJerz> so we echo addis %r7, %r9, -0x0500 > file.S
  14. 15:54 < DirtyJerz> then powerpc-openwrt-linux-gcc -c file.S
  15. 15:54 < DirtyJerz> then powerpc-openwrt-linux-objdump -d file.o
  16. 15:55 < DirtyJerz> gives us
  17. 15:55 -!- Irssi: Pasting 6 lines to #otheros. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.
  18. 15:55 < DirtyJerz> file.o: file format elf32-powerpc
  19. 15:55 < DirtyJerz> Disassembly of section .text:
  20. 15:55 < DirtyJerz> 00000000 <.text>: 0:I3c e9 fb 00 Iaddis r7,r9,-1280
  21. 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