View Single Post
Old 09-22-2012, 06:44 PM   #695
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 140
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
Quote:
Originally Posted by NiLuJe View Post
@Kai771: That's... not pretty. At all. And will possibly blow up in fun & interesting ways at runtime.
Well, yeah, it kind of felt like cheating... I didn't run extensive testing, but I did open a few books, turned pages etc and it all appeared to be ok. Sorry about not answering your questions (I didn't realize they were questions - I thought it was a homework for me ). I did run readelf -a. Only thing of interest are these lines, I think:

Code:
    16: 0000ac84     0 FUNC    GLOBAL DEFAULT  UND __aeabi_atexit@CXXABI_ARM_1.3.3 (6)
   117: 0000b134     0 FUNC    GLOBAL DEFAULT  UND __isoc99_sscanf@GLIBC_2.7 (10)
   224: 0000b5d8     0 FUNC    GLOBAL DEFAULT  UND __isoc99_fscanf@GLIBC_2.7 (10)
I searched for strings __isoc99_sscanf and __isoc99_fscanf and found them in stdio.h. I compared that with stdio.h of 2007q3, and found out that they weren't present there. That's when I replaced stdio.h and that got rid of those 2 bottom lines.

Getting rid of the first one (CXXABI_ARM_1.3.3) was much harder. I googled, read numerous pages, but nothing seemed to work. Finally, I tried to link statically libstdc++ and it did work on kindle. But, I wanted it linked dynamically, so I replaced the lib using the one from my kindle in the end. It worked.

About FLAGS - I don't have them in my env. Actually, I have no idea what I should have there. I use just a basic Ubuntu install, just like described in my guide. Not sure what you are reffering to with "one of the third party libs ended up using non tweaked CFLAGS, thus pulling stack-smashing/fortify/cxa_atexit stuff."

I don't want to bother you too much, but if you're willing to teach, I'm willing to learn . I appreciate any suggestions you might have.

Last edited by Kai771; 09-22-2012 at 07:04 PM.
Kai771 is offline   Reply With Quote