Avoiding semihosting If you write an application in C, you must link it with the C library even if it makes no
direct use of C library functions. The C library contains compiler helper functions and
initialization code. Some C library functions use semihosting.
To avoid using semihosting, do either of the following:
· re-implement the functions in your own application
· write the application so that it does not call any semihosted function.
To guarantee that no functions using semihosting are included in your application, use
either:
· IMPORT __use_no_semihosting from assembly language
· #pragma import(__use_no_semihosting) from C.
If you include a semihosting-using function and also reference __use_no_semihosting,
the library detects the clashing symbols and the linker reports an error. To find out which
objects are using semihosting, link with --verbose --errors out.txt, search the output
for the cited symbol, and find out what object referenced it.