Module: xenomai-forge Branch: next Commit: 3daf71ea2d1de6a4470b6f75b86d6494f3d2964f URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=3daf71ea2d1de6a4470b6f75b86d6494f3d2964f
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Jun 30 19:09:15 2014 +0200 scripts/wrap-link.sh: handle interposition on main() --- scripts/wrap-link.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/wrap-link.sh b/scripts/wrap-link.sh index a16f2da..6794525 100755 --- a/scripts/wrap-link.sh +++ b/scripts/wrap-link.sh @@ -10,7 +10,8 @@ usage() { $1 [options] command-line Split command-line in two parts for linking static applications with -Xenomai user-space posix skin in two stages. +the Xenomai POSIX/Cobalt interface in two stages, so that symbols +from the system libraries are not wrapped. Options: -q be quiet @@ -137,7 +138,14 @@ while test $# -gt 0; do next_is_wrapped_symbol=: ;; - -Wl,@*.wrappers|-Wl,--wrap,*) + -Wl,--wrap,main|-Wl,--wrap=main) + # special case so that Copperplate can interpose on the + # main() routine. For this we need this wrapping to + # take place in the second stage. + stage2_args="$stage2_args $arg" + ;; + + -Wl,@*.wrappers|-Wl,--wrap,*|-Wl,--wrap=*) stage1_args="$stage1_args $arg" ;; @@ -145,7 +153,7 @@ while test $# -gt 0; do add_linker_flag "$arg" ;; - *cobalt*) + *libcobalt.so*|*libcobalt.a|-lcobalt) # linker directives might contain this pattern as well, so # match it later in the test sequence. stage2_args="$stage2_args $arg" _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git