Use of the __user_libspace static data area by the C libraries
The __user_libspace static data area holds
the static data for the C libraries. This is a block of 96 bytes
of zero-initialized data, supplied by the C library. It is also
used as a temporary stack during C library initialization.
The default ARM C libraries use the __user_libspace area
to hold:
errno,
used by any function that is capable of setting errno.
By default, __rt_errno_addr() returns a pointer
to errno.
The Floating-Point (FP) status
word for software floating-point (exception flags, rounding mode).
It is unused in hardware floating-point. By default, __rt_fp_status_addr() returns
a pointer to the FP status word.
A pointer to the base of the heap (that is, the __Heap_Descriptor),
used by all the malloc-related functions.
The current locale settings, used by functions such
as setlocale(), but also used by all other library
functions that depend on them. For example, the ctype.h functions
have to access the LC_CTYPE setting.
The C++ libraries use the __user_libspace area
to hold:
the new_handler field
and ddtor_pointer:
the new_handler field
is used to keep track of the value passed to std::set_new_handler()
the ddtor_pointer, that points
to a list of destructions to be performed on program exit. For example,
objects constructed outside function scope exist for the duration of
the program, but require destruction on program exit. The ddtor_pointer is
used by __cxa_atexit() and __aeabi_atexit().
C++ exception handling information for functions
such as std::set_terminate() and std::set_unexpected().
Note
How the C and C++ libraries use the __user_libspace area
might change in future releases.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.