Datasheet
The C and C++ Libraries
4-10 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
The functions listed in Table 4-3 depend indirectly on one or more of the functions
listed in Table 4-2 on page 4-9.
Avoiding the semihosting SWI
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 the semihosting SWI. To avoid using
the semihosting SWI, 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 the semihosting SWI are included in your
application, use either:
•
IMPORT __use_no_semihosting_swi
from assembly language
•
#pragma import(__use_no_semihosting_swi)
from C.
The symbol has no effect except to cause a link-time error if a function that uses the
semihosting SWI is included from the library. The linker error message is:
Error : L6200E: Symbol __semihosting_swi_guard multiply defined
(by use_semi.o and use_no_semi.o).
Table 4-3 Indirect dependencies
Function Where used
__raise()
Catch, handle, or diagnose C library exceptions, without C
signal support. See Tailoring error signaling, error handling,
and program exit on page 4-51.
__default_signal_handler()
Catch, handle, or diagnose C library exceptions, with C signal
support. See Tailoring error signaling, error handling, and
program exit on page 4-51.
__Heap_Initialize()
Choosing or redefining memory allocation. See Tailoring
storage management on page 4-57.
ferror()
,
fputc()
,
__stdout
Retargeting the printf family. See Tailoring the input/output
functions on page 4-75.
__backspace()
,
fgetc()
,
__stdin
Retargeting the scanf family. See Tailoring the input/output
functions on page 4-75.
fwrite()
,
fputs()
,
puts()
,
fread()
,
fgets()
,
gets()
,
ferror()
Retargeting the stream output family. See Tailoring the
input/output functions on page 4-75.