OT: Parsing object files for fun and profit

Ali Çehreli acehreli at yahoo.com
Thu May 31 18:33:37 UTC 2018

On 05/31/2018 09:49 AM, Adam D. Ruppe wrote:

 > Should be fairly simple to follow, just realize that the image is a 2d
 > block for each char and that's why there's all those multiplies and
 > divides.

I remember doing similar things with fonts to add Turkish characters to 
Digital Research and Wordperfect products (around 1989-1992). Localizing 
by patching compiled code was fun. :)

My happiest accomplishment was localizing Ventura Publisher "cleanly" 
after realizing that their language-related "resource" file was just an 
object file compiled from a simple C source code which had just an array 
of strings in it:

char * texts[] = {
     // ...

I parsed the object file to generate C source code, translated the C 
source code, and finally compiled it again. Voila! Ventura Publisher in 
Turkish, and everything lined-up perfectly. :) Before that, one had to 
patch the object file to abbreviate "evet" on top of "yes", "hayır" on 
top of "no", etc.


More information about the Digitalmars-d-learn mailing list