diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-09 10:12:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-09 10:12:50 +0900 |
| commit | a503484cb3955509c2cbe5d0772974bf1fa83992 (patch) | |
| tree | 95b7b31603ce99aa4e9a49e9114c94401250318d | |
| parent | a3fe04eda2b68b73486e5dbba2f7ebc6722f5e42 (diff) | |
| download | mruby-a503484cb3955509c2cbe5d0772974bf1fa83992.tar.gz mruby-a503484cb3955509c2cbe5d0772974bf1fa83992.zip | |
value.h: use `etext` and `edata` which are more widely available; #5547
| -rw-r--r-- | include/mruby/value.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h index 5a4ef5e2b..733674b3a 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -413,13 +413,11 @@ mrb_undef_value(void) mrb_bool mrb_ro_data_p(const char *p); #elif (defined(__linux__) && !defined(__KERNEL__)) #define MRB_LINK_TIME_RO_DATA_P -extern char __ehdr_start[]; -extern char __init_array_start[]; - +extern char etext, edata; static inline mrb_bool mrb_ro_data_p(const char *p) { - return __ehdr_start < p && p < __init_array_start; + return &etext < p && p < &edata; } #elif defined(__APPLE__) #define MRB_LINK_TIME_RO_DATA_P |
