On 2/9/21 5:18 pm, Christian MAUDERER wrote: > And already a question regarding the new branch: You cleaned up the > rtems-bsd-kernel-namespace.h (which is great).
Thanks. It came as a surprise the script broke on FreeBSD. > My patch removes some duplicated functions that are in RTEMS and in libbsd. > The > ones in RTEMS are definitively the correct ones and the ones in libbsd return > wrong values sometimes. With your patch, the functions are now in the > namespace > header (which is OK). OK > I tried to regenerate the header using the rtems-kern-symbols. But even with > the > --regenerate option like described in the CONTRIBUTING.md, the symbols are not > removed. I can remove them manually and the rtems-kern-symbols script doesn't > change the header if I re-run it. So I'm quite sure that this is an OK > solution. > But it somehow feels wrong to manually change a generated header. Is there > something I used wrong? No nothing at all. > What I did: > > - Re-build libbsd and note that the tests don't link any more. > > - run `./rtems-kern-symbols --regenerate --rtems-tools=<path_to_tools>` > Nothing has been changed. > > - manually remove the symbols > > - re-build (now successfully) > > - run `./rtems-kern-symbols --regenerate --rtems-tools=<path_to_tools>` > Nothing has been changed. Symbols are still removed. > > - add symbols manually again > > - run `./rtems-kern-symbols --regenerate --rtems-tools=<path_to_tools>` > Nothing has been changed. Symbols are still there. > > So I think my core question is: Does the tool clean up old symbols or do I > have > to do that manually? You need to remove the lines manually. I could not find a suitable solution that worked effective and efficiently. I spent sometime on this and considered a number of options for a while and came to no workable solution to handle it automatically. An automatic tool that can remove calls needs to build all combinations of arch/bsps multiplied by all the possible options for RTEMS and the BSPs multiplied by all libbsd options to know a symbol is not needed. That was all way too hard. My compromise solution was adding a report option to help you see what is happening with the symbols. The intention is to aid managing those symbols you are interested in. Chris _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel