View Single Post
Old 10-05-2017, 01:28 AM   #1
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Questions on how to create/update Metazoa patches, ARM assembler, objdump, etc.

In this thread I will try to pass on what I have learned about making patches for the Kobo e-ink ereaders. I have been meaning to do this for a while now, but I never know where to start, so if you have a specific question just ask and I'll try to answer here.

I am not an expert on any of this, so don't assume the way I do something is the only way or the best way. I have a bit of background programming in C and x86 assembly language for Linux, but I didn't know anything about ARM CPUs or modifying programs without access to source code until I started patching my Glo. I've just learned the bits I needed as I went along, there are big gaps in my knowledge.

I use the following programs in Debian 8 Linux, there are alternatives for other systems but I haven't used them, so any explanation I give will be based on these:

* Disassembler: objdump (binutils-multiarch package)
-- I use version 2.25, some older versions didn't show function names in disassembly.
* Hex editor: emacs [M-x hexl-open-file] (emacs24 package)
* Patcher: patch32lsb (included in tools/ directory of patch archives)
* A hexdecimal calculator can be handy, I have an old HP 42s.

I'll keep an index of topics in this first post and update it as different topics come up:

Post #2 Address vs. file offset
Post #3 Finding function addresses
Post #4 Patching compressed CSS strings
Post #8 Function call arguments

Last edited by GeoffR; 10-06-2017 at 04:10 AM. Reason: objdump version 2.25
GeoffR is offline   Reply With Quote