On Sun, Jan 3, 2016 at 11:00 PM, Gedare Bloom <ged...@rtems.org> wrote:
> On Sun, Jan 3, 2016 at 9:47 PM, Joel Sherrill <j...@rtems.org> wrote: > > > > > > On Sun, Jan 3, 2016 at 8:26 PM, Chris Johns <chr...@rtems.org> wrote: > >> Can you get a suitable list of functions that must be present in the > >> executable and check they are present with nm? > >> > > > > It should be simple if the breakage is between the entry point and the > rest > > of the BSP. If hello does not include bsp_start() or > > rtems_initialize_data_structures(), then it is known to be broken. This > is > > what broke on sis -- the first 16 instructions of the start code had no > > dependency on anything else. So the linkages were satisfied and nothing > else > > pulled in. :) > > > Such a list should be easy enough to create by building every BSP and > creating a list of functions appearing in every one (known to run). > > The scripts in rtems-testing/rtems keep a copy of ticker.ralf named CPU-BSP-ticker.ralf. For the ones I had laying around that were actually in ELF format with symbols still, there were 362 symbols which showed up in 68 files (that appears to be the magic maximum number). file *.ralf | grep ELF | cut -d':' -f1 | while read f do target=`echo $f | cut -d'-' -f1` mynm=${target}rtems4.12-nm nm -g ${f} | grep " T " | cut -d' ' -f3 done | sort | uniq -c | sort -n There is no guarantee that those 362 symbols are actually really required and turning on per-item section linking I hope would reduce that. Perhaps a core list of BSP init, RTEMS init, application, and C library referenced would be sufficient. For ticker or hello, this would be: boot_card() bsp_start() rtems_initialize_data_structures() Init() If you managed to link enough to include Init() and this broke the executable, then I would expect a very subtle problem that nothing automated will find. Something like leaving out interrupt vectors which we wouldn't be looking for. I am not even sure about printf() since gcc optimizes constant string prints to puts() and the tests can be configured to use printk(). Any thoughts?
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel