4.7.2. errno

The C library errno variable is defined in the implicit static data area of the library. This area is identified by __user_libspace(). It occupies part of initial stack space used by the functions that established the runtime stack. The definition of errno is:

(*(volatile int *) __rt_errno_addr())

You can define __rt_errno_addr() if you want to place errno at a user-defined location instead of the default location identified by __user_libspace().


The default implementation is a veneer on __user_libspace() that returns the address of the status word. A suitable default definition is given in the C library standard headers.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D