[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] BINFMT_FLAT on startup



Hi Ryan,

Ryan Marotz wrote:

Here is the capture from the uClinux boot.  What do you make of it?
[snip]

BINFMT_FLAT: Loading file: /sbin/init
Mapping is 25fa0000, Entry point is 44, data_start is 8c80
Load /sbin/init: TEXT=25fa0040-25fa8c80 DATA=25fa8c84-25fa9974 BSS=25fa9974-25fbb3c4 BINFMT_FLAT: reloc outside program 0x4295f0 (0 - 0x1b384/0x8c40), killing init!
BINFMT_FLAT: Loading file: /sbin/init
Mapping is 25fa0000, Entry point is 44, data_start is 8c80
Load /sbin/init: TEXT=25fa0040-25fa8c80 DATA=25fa8c84-25fa9974 BSS=25fa9974-25fbb3c4 BINFMT_FLAT: reloc outside program 0x30035400 (0 - 0x1b384/0x8c40), killing init!
BINFMT_FLAT: Loading file: /bin/init
Mapping is 25fa0000, Entry point is 44, data_start is 8c80
Load /bin/init: TEXT=25fa0040-25fa8c80 DATA=25fa8c84-25fa9974 BSS=25fa9974-25fbb3c4 BINFMT_FLAT: reloc outside program 0x61616161 (0 - 0x1b384/0x8c40), killing init!
BINFMT_FLAT: Loading file: /bin/init
Mapping is 25fa0000, Entry point is 44, data_start is 8c80
Load /bin/init: TEXT=25fa0040-25fa8c80 DATA=25fa8c84-25fa9974 BSS=25fa9974-25fbb3c4 BINFMT_FLAT: reloc outside program 0x30a09803 (0 - 0x1b384/0x8c40), killing init!

The fact that you are getting a different bad reloc reported each time still suggests to me a memory corruption error. Or at least, that these bad relocs are a symptom, not a cause, of the real problem.

Given that you have a highly non-standard system setup (dual CPU, multiple memory controllers etc), there are just so many places you could have done something slightly wrong, it's really not possible to debug this via email.

You'll probably have to solve this one the hard way - start peppering fs/binfmt_flt.c with printk statements, and prepare to learn a bit about how the flat loader works. XMD / MDM and mb-gdb debugging the kernel will also be helpful.

grep through binfmt_flat.c to find the error text, see what conditions cause it to be triggered - put printks in the code leading up to that, all that business.

Add "FLTFLAGS+=-v" to the app makefile (user/simpleinit/Makefile in this case), try to correlate the verbose elf2flt output with the bad reloc errors you get when you load the app.

<commercial plug>
I've built these kind of systems before, so if you want us to have a look at it for you, email enquiries@xxxxxxxxxxxxx and we can take it from there.
</commercial plug>

Regards,

John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/