Skip to content
Commit 23130867 authored by George Rimar's avatar George Rimar
Browse files

[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
parent 5612bb29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment