In patch comments and the patch32lsb code I have used the term
address as if it was the same thing as
file offset, but that is not always true. For dynamic libraries such as libnickel.so.1.0.0 and librmsdk.so.1.0.0 they are the same, but for executables such as nickel and sickel they are different.
objdump works mainly with addresses, but the patch32lsb tool only deals with file offsets, so for some nickel and sickel patches it may be necessary to convert addresses to file offsets. If you use the -F switch with objdump it will show the file offsets along with the addresses. For example the objdump command:
Code:
$ objdump -dCF sickel | grep SickelService::Ping | grep ":$"
Output for firmware 4.5.9587:
Code:
0000b2bc <SickelService::Ping()> (File Offset: 0x32bc):
Output for firmware 4.6.9960:
Code:
000133d0 <SickelService::Ping()> (File Offset: 0x33d0):
So for sickel patches: in firmware 4.5.9587 add 0x8000 to the file offset to get the address, and in firmware 4.6.9660 add 0x10000 to the file offset to get the address.