From a503484cb3955509c2cbe5d0772974bf1fa83992 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 9 Sep 2021 10:12:50 +0900 Subject: value.h: use `etext` and `edata` which are more widely available; #5547 --- include/mruby/value.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') 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 -- cgit v1.2.3