Welcome! You are whitelisted, and I have moved this into the HSA forum!
OK, so I have discovered that the HSA 1.0F programmers manual has a new chapter on libraries and addig a keywork prog most progbably solves the issue:
decl prog function &libfoo(arg_u32 %res)(arg_u32 %sptr);
I thought the & part of the identifier implied module linkage (BTW, section 4.6.1 of the same maual says it does) and did not know about the prog keyword.
I believ this resolves my issue.