Problem: Loadable segments need to be properly organized. Fix By: Changing the linker script and/or options used to create the binary. Waive If: There is a special need for unusual load segments. Example: FAIL: LOAD segments not in ascending order of virtual address Example: FAIL: contains an empty LOAD segment Example: FAIL: LOAD segments overlap Example: FAIL: gap between LOAD segments of more than one page Example: FAIL: LOAD segment with Write and Execute permissions seen
This test performs various checks on the loadable program segments in the file(s) being examined. It checks to make sure that the segments are in order, do not overlap, and do not have unacceptable permissions. The test examines both normal load segments (those with the ELF segment type PT_LOAD) and thread-local load segments (with the ELF segment type PT_TLS).
If future tests are enabled the test also looks for large gaps between loadable segments. These gaps are an issue for systems with small amounts of memory, and for containers. In addition leaving gaps between segments means that other shared objects could be placed between loaded parts of a binary which seriously confuses many tools. It also causes problems for the loader which is optimized for contigous programs which do not contain gaps.
If necessary the test can be disabled via the --skip-load-segments option and re-enabled via the --test-load-segments option.