Quote:
Originally Posted by twobob
@knc1 Hmm yes - do you think this may go some way to explain my experiences with the internal 'ar' etc. Well. I shall resume cheerleading - bloody good catch mate.
Intrigued to know the result mate.
ra ra emu!
|
I recall your reporting programs that did that and yes, it may be related.
The 'main' executable code of /bin/true (or /bin/false) should be two machine instructions. One to set the register holding the returned value and the "return" instruction itself. Neither directly accesses memory (not even in RISC).
But every compiler generated executable contains a preamble and a post-amble (setting stack pointer, saving the return address, +a bunch of other things). Most of those involve setting registers to point at the proper parts of memory.
Those, if using a register that wasn't set to the expected value, or not set at all, can cause a memory segmentation violation.
There have been various "ABI"s for ARM over the years, Rob's compiler may be set to generate one (the compiler generated pre/post ambles) and the Ubuntu-core man be using another (with different register usage defines).
It will take a bit of research and maybe some disassembly to identify where the mismatch is originating.
Although in the end, it may be time to replace Rob's rootfs that we are using.
For new work, with one of the Ubuntu-core rootfs images.
For Kindle re-work, by adding a native tool-chain to the one you just built against the Amazon kernel.
Hmm...
Maybe the fasted way forward is to just get the emulator to boot these other rootfs images.