mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
b7b9ea4361
This adds support for the retargetable locking implementation in newlib 3. This feature will be enabled in the future toolchain builds. With the present version of the toolchain, this code doesn't get used. When _RETARGETABLE_LOCKING gets enabled, newlib locking implementation will be modified as follows: - Legacy ESP-specific _lock_xxx functions are preserved. This is done because ROM copies of newlib in ESP32 and ESP32-S2 rely on these functions through the function pointer table. Also there is some code in IDF which still uses these locking functions. - New __retarget_lock_xxx functions are introduced. Newlib expects these functions to be provided by the system. These functions work pretty much the same way as the ESP-specific _lock_xxx functions, except one major difference: _lock_acquire receives the lock pointer by value, and as such doesn't support lazy initialization. - Static locks used by newlib are now explicitly initialized at startup. Since it is unlikely that these static locks are used at the same time, all compatible locks are set to point to the same mutex. This saves a bit of RAM. Note that there are still many locks not initialized statically, in particular those inside FILE structures.
24 lines
909 B
Plaintext
24 lines
909 B
Plaintext
/* These are the .bss/.data symbols used by newlib functions present in ESP32 ROM.
|
|
See also esp32.rom.newlib-funcs.ld for the list of general newlib functions,
|
|
and esp32.rom.newlib-nano.ld for "nano" versions of printf/scanf family of functions.
|
|
|
|
Unlike other ROM functions and data which are exported using PROVIDE, which declares
|
|
weak symbols, newlib related functions are exported using assignment,
|
|
which declares strong symbols. This is done so that ROM functions are always
|
|
used instead of the ones provided by libc.a.
|
|
*/
|
|
|
|
_ctype_ = 0x3ff96354;
|
|
__ctype_ptr__ = 0x3ff96350;
|
|
environ = 0x3ffae0b4;
|
|
_global_impure_ptr = 0x3ffae0b0;
|
|
__mb_cur_max = 0x3ff96530;
|
|
__sf_fake_stderr = 0x3ff96458;
|
|
__sf_fake_stdin = 0x3ff96498;
|
|
__sf_fake_stdout = 0x3ff96478;
|
|
__wctomb = 0x3ff96540;
|
|
__sfp_lock = 0x3ffae0ac;
|
|
__sinit_lock = 0x3ffae0a8;
|
|
__env_lock_object = 0x3ffae0b8;
|
|
__tz_lock_object = 0x3ffae080;
|