summaryrefslogtreecommitdiffhomepage
path: root/test/t/integer.rb
diff options
context:
space:
mode:
authorFangrui Song <[email protected]>2019-09-16 07:44:05 -0700
committerFangrui Song <[email protected]>2019-09-21 17:55:14 -0700
commit7f044341f9f5c227d7c13c9c8ac2e9b00c8ed287 (patch)
tree23f8f74bdf6c3a172fde8cd6d390030aede4cb82 /test/t/integer.rb
parent8db7dfb5c41fcb52d1a571823147589ab2a03a6c (diff)
downloadmruby-7f044341f9f5c227d7c13c9c8ac2e9b00c8ed287.tar.gz
mruby-7f044341f9f5c227d7c13c9c8ac2e9b00c8ed287.zip
Rename MRB_USE_ETEXT_EDATA to MRB_USE_LINK_TIME_RO_DATA_P and support lld linked programs
In lld linked programs, .rodata comes before .text, thus mrb_ro_data_p will return false for strings in .rodata. Change the lower bound from _etext to __ehdr_start to catch these cases. This works for ld.bfd, gold and lld, and it does not have false positives even if .init_array does not exist. Remove the branch that uses _edata: strings in .data can be modified so this is semantically incorrect. Delete the __APPLE__ branch (its manpages say get_etext() and get_edata() are strongly discouraged). .init_array has been adopted by most ELF platforms to supersede .ctors. Neither _etext nor _edata is used, so rename MRB_USE_ETEXT_EDATA to MRB_USE_EHDR_START.
Diffstat (limited to 'test/t/integer.rb')
0 files changed, 0 insertions, 0 deletions