The C library errno variable is defined in the implicit static data area of the library. This area is identified by __user_libspace(). The function that returns the address of errno is:

(*(volatile int *) __aeabi_errno_addr())

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


The return value is a pointer to a variable of type int, containing the currently applicable instance of errno.

Show/hideSee also

Copyright © 2014 ARM. All rights reserved.ARM DUI 0809A