esp_rom: Fix esp32.rom.newlib-time.ld should includes all time ROM functions/data

- Added UT
Closes: https://github.com/espressif/esp-idf/issues/4925
This commit is contained in:
KonstantinKondrashov
2020-03-17 17:02:24 +08:00
committed by bot
parent 4fe04f1151
commit 9aeac7f6cb
6 changed files with 36 additions and 10 deletions

View File

@@ -10,14 +10,10 @@
_ctype_ = 0x3ff96354;
__ctype_ptr__ = 0x3ff96350;
_daylight = 0x3ffae0a4;
environ = 0x3ffae0b4;
_global_impure_ptr = 0x3ffae0b0;
__mb_cur_max = 0x3ff96530;
__month_lengths = 0x3ff9609c;
__sf_fake_stderr = 0x3ff96458;
__sf_fake_stdin = 0x3ff96498;
__sf_fake_stdout = 0x3ff96478;
_timezone = 0x3ffae0a0;
_tzname = 0x3ffae030;
__wctomb = 0x3ff96540;

View File

@@ -9,7 +9,7 @@
which declares strong symbols. This is done so that ROM functions are always
used instead of the ones provided by libc.a.
Time functions were moved to the esp32.rom.newlib-funcs-time.ld file.
Time functions were moved to the esp32.rom.newlib-time.ld file.
*/
abs = 0x40056340;
@@ -126,9 +126,6 @@ __swsetup_r = 0x40058cc8;
toascii = 0x4000c720;
tolower = 0x40001868;
toupper = 0x40001884;
__tzcalc_limits = 0x400018a0;
__tz_lock = 0x40001a04;
__tz_unlock = 0x40001a10;
ungetc = 0x400590f4;
_ungetc_r = 0x40058fa0;
__utoa = 0x400561f0;

View File

@@ -1,4 +1,4 @@
/* These are the newlib functions present in ESP32 ROM.
/* These are the newlib functions and the .bss/.data symbols necessary for these functions present in ESP32 ROM.
They should not be used when you need to solve the Y2K38 problem.
Because these functions were compiled with 32-bit width for the time_t structure.
*/
@@ -19,3 +19,11 @@ time = 0x40001844;
__time_load_locale = 0x4000183c;
tzset = 0x40001a1c;
_tzset_r = 0x40001a28;
__tzcalc_limits = 0x400018a0;
__tz_lock = 0x40001a04;
__tz_unlock = 0x40001a10;
/* The .bss/.data symbols necessary for these functions */
_timezone = 0x3ffae0a0;
_tzname = 0x3ffae030;
_daylight = 0x3ffae0a4;
__month_lengths = 0x3ff9609c;