[PATCH] D104596: [lld/mac] Make sure __thread_ptrs is in front of __thread_bss

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 19 08:02:43 PDT 2021


thakis added a comment.

The reason it's important that zerofill sections are at the end is because dyld does

  bool ImageLoaderMachO::segHasTrailingZeroFill(unsigned int segIndex)
  {
  	return ( segWriteable(segIndex) && (segSize(segIndex) > segFileSize(segIndex)) );
  }

to detect zerofill sections. It doesn't look at section flags but only on where and how large the section is (and then it maps with `VM_PROT_ZF` when needed).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104596/new/

https://reviews.llvm.org/D104596



More information about the llvm-commits mailing list