Hi all, I have been testing uClinux-dist-20070130 for Coldfire (m68k-tools v4.1.1) on MCF5282EVB and everything works ok so far. I have been testing BOA server + CGI and I have noticed that every CGI program (written in C) occupies several Kbytes. I found that this was due to these programs do not share libraries, and static libs are used instead. So I decided to enable FLAT support for shared libs and the problems began to arise. With shared libs support enabled, either the init or sh processes cannot start up:
Freeing unused kernel memory: 32k freed (0xe8000 - 0xef000) BINFMT_FLAT: library 0 is younger than 1, killing init! BINFMT_FLAT: failed to load library 1, killing init! BINFMT_FLAT: library 0 is younger than 1, killing sh! BINFMT_FLAT: failed to load library 1, killing sh! Kernel panic - not syncing: No init found. Try passing init= option to kernel. I have looked through ancient mail archives but I cannot find an accurate solution to this. I'm gonna try to give you all information/observations I have done: 1) The shared lib "lib1.so" is placed in lib/ directory 2) By using m68k-tools, I have inspected the headers of both init program and lib1.so, and I can tell that both are valid BFLT files, rev 4, flags = 2 (has PIC-GOT). I have also seen that the compilation time stamp of the library is smaller than the init program's one (I understand it is ok). 3) By inspecting the file /fs/binfmt_flat.c I have found a weird thing: I think that in calc_reloc() function, time stamps are compared in an opposite way, but I think that this software has been successfully tested before, so I believe there's not any bug there. However I'm a curious guy and I have reversed the comparison sign. This avoids the "library 0 is younger than 1" message, but the system continues crashing. 4) I have seen several mail archives concerning on invalid relocations, but my system has not produced this kind of error (just in case I'll cross my fingers !!). 5) I read an article that explained how flat binaries work in ucLinux, and I saw that there is the possibility to run programs from RAM, rather than using XIP. Is this issue related with my problem? May this problem vanish if the flat files would have flags indicating to load the program and libs in RAM (rather than PIC-GOT) ? Anyway, just for interest, I would like to know how can I disable PIC-GOT file generation to produce RAM loadable flat files. I have not found any menu option to do this, neither in Kernel config nor in Vendor/User settings (I use 2.6 kernel). I hope these clues help to find a solution. Thanks in advance. Claude _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
