Wednesday, 3 March 2010

Limited Success

I spent the day working with Daniel. He has been trying to get the correct runes for a GCC build in a strange environment. Turns out all he needed was me to throw stupid ideas at him until one caused him to examine some of the generated intermediate symbol maps...

Turns out that busybox awk fails in an interesting way which (eventually) causes half the symbols to be missing in the stage 1 libgcc.so object. Switched to using gawk and managed a successful build.

Seems to be a relatively good time for solutions, last week I managed to make squashfs-tools work on ARM. Unfortunately the author seems to be completely unresponsive to my (repeated) emails (if anyone wants the patch series feel free to mail me). The main issue with the tools is their complete blind assumption that a c structure can simply be cast to an arbitrary character array and get sensible results.

The structure casting method simply does not work on ARM (or indeed any platform which has alignment restrictions) without at least adhering to some minimal rules, primary among these is that the structure *must* be aligned to a word (32bit) boundary and that if you have 16bit or 8bit quantities within the structure they may cause gaps between members i.e. the structures are not packed by default.

No this behaviour is not a bug, it is perfectly acceptable by the c standard. Just because on x86 the practice of arbitrary casting works does not mean it is safe or sensible. Nonetheless many programmers simply do not want to believe its wrong.

Anyhow, rant over, back to work!

3 comments:

  1. regarding squashfs-tools, you should send the patches to #567184 or to daniel@debian.org, so that i can apply them in debian and have it fixed there, regardless how long it takes upstream to apply it there (which takes repeadetly very long time :/).

    ReplyDelete
  2. Vincent, I have received exactly one email from you - not repeated emails. Yes I did ignore it because I found it extremely critical and not very constructive. Bugs are just bugs, and are not malicious or deliberate, despite what you may think.

    I fixed the ARM alignment issues as soon as possible once brought to my attention. Your email wasn't the first report I have had regarding alignment issues, this was previously raised as a bug on Ubuntu launchpad amongst other sites. My alignment fixes are already in Squashfs CVS.

    Daniel Baumann: I have never received patches from you or anyone else at Debian.

    Phillip Lougher (Squashfs author)

    ReplyDelete
  3. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you got to watch this video
    right away...

    (VIDEO) Get your ex back with TEXT messages?

    ReplyDelete