On Mon, 15 Mar 2010 15:23:02 -0400, Bob Ammerman wrote: > Jeremy, > > Someone else encountered this same problem (or a very similar one) in the > recent past (last 6 months?). It is due to a bug in the linker when compiled > as 64-bit code. You might try searching the PICLIST archive for the > solution. IIRC the solution involved a source patch to the linker. > > [OTOH: The issue may have come up in the Palm development mailing list I > also subscribe to rather than on PICLIST :-( ] > > -- Bob Ammerman > RAm Systems Nope - not the Palm list, it was the piclist. It was me in fact :( In the end I managed to apply some patches, etc. and get the thing to work, but I was always dubious as to the compiler-generated code, which is not great; released compilers should always generate correct code and be implicitly trusted. The piclist thread is archived at Nabble, which you may find useful for links to patches, discussions, etc. You'll see that Xiaofan was very helpful and knowledgeable, so perhaps he can fill you in with any updates that may have happened that I don't know about. The problem boiled down to the Microchip guys patching the GNU/Linux toolchain in a way that assumed a 32-bit host architecture, meaning sign extension and other bugs frequented the 64-bit builds. Not casting aspersions here, as these things tend to happen when budgets/deadlines are involved (especially with a relatively niche processor/environment and limited target audience); but I'd have personally expected better integration. I basically managed to use my patched toolchain for a while even though they were nothing more than surface hacks; I had to put up with the occasional annoying 'hang' when compiling with optimisations on certain files (easily fixed by re-compiling without optimisations for those offending files), but all-in-all it was OK. However, I hit a terminal problem when I started adding assembly files to my project; missing this and that, unresolved symbols, etc. At the point I could no longer link with assembler modules I gave up (I've no desire and real time to learn the binutils internals) and just started using MPLAB on my 32-bit XP partition. I don't actually like the MPLAB product (annoying bugs and it looks old / half-baked compared to what I'm used to). I prefer my GNU/Linux toolchains, but credit to Microchip as they've released most of it for free. With any luck the future releases will continue with the GNU tools, but they will be better tested on a range of architectures. Hope this helps. Regards, Pete Restall -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist