Quote:
Originally Posted by geekmaster
I can see this even in the kindles. Stuff I built for the K3 works on everthing from K2 to PW3 (and perhaps more), all being glibc based (and also on various firmware versions, and even when booted to diags). However, lab126 DID fubar the firmware v5.x eink libraries by adding new fields INSIDE a structure, making it incompatible between versions. And to complicate matters, the new structure had the same name as the old one, AND the header file had the same name as the old one. My solution (as seen in gmplay) was to NOT include those headers, but to copy (and rename) both structures from both versions of the header files. My code tests to see which structure to use, and it has worked well so far on older and newer kindles (except for the K1, of course).
|
Yeah. Debuggers have long had this problem, too, on arches like x86 and SPARC and nowadays ARM supporting both 32- and 64-bit code -- you might be on a 64-bit platform but people are going to want to debug 32-bit stuff without having to build a cross debugger -- so you need two versions (and, in the limit, N versions) of every structure in the victim you want to look at/modify, one with 32-bit type sizes and padding, one with 64-bit...