[ELF] - Restrict section offsets that exceeds file size.
This is part of PR36515. With some linkerscripts it is possible to get file offset overlaps and overflows. Currently LLD checks overlaps in checkNoOverlappingSections(). And also we allow broken output with --no-inhibit-exec. Problem is that sometimes final offset of sections is completely broken and we calculate output file size wrong and might crash. Patch implements check to verify that there is no output section which offset exceeds file size. Differential revision: https://reviews.llvm.org/D43819 llvm-svn: 327376
Loading
Please register or sign in to comment