diff --git a/build/unix/elfhack/elfxx.h b/build/unix/elfhack/elfxx.h index 696ef00df7c..a309fe65f8f 100644 --- a/build/unix/elfhack/elfxx.h +++ b/build/unix/elfhack/elfxx.h @@ -448,9 +448,6 @@ public: // be better handled than special cases if ((p_type == PT_DYNAMIC) && (section->getType() != SHT_DYNAMIC)) return false; - // Special case for PT_TLS. - if ((p_type == PT_TLS) && !(section->getFlags() & SHF_TLS)) - return false; return (addr >= p_vaddr) && (addr + size <= p_vaddr + p_memsz); diff --git a/build/unix/elfhack/test.c b/build/unix/elfhack/test.c index bbeebd444da..c88b8ae694f 100644 --- a/build/unix/elfhack/test.c +++ b/build/unix/elfhack/test.c @@ -115,10 +115,8 @@ __attribute__((visibility("default"))) int print_status() { } /* On ARM, this creates a .tbss section before .init_array, which - * elfhack could then pick instead of .init_array. - * Also, when .tbss is big enough, elfhack may wrongfully consider - * following sections as part of the PT_TLS segment. */ -__thread int foo[1024]; + * elfhack could then pick instead of .init_array */ +__thread int foo; __attribute__((constructor)) void end_test() { static int count = 0;