value.h: use `etext` and `edata` which are more widely available; #5547

parent a3fe04ed
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment