Skip to content
Commit ce30b1c7 authored by Eugene Leviant's avatar Eugene Leviant
Browse files

[ELF] Choose default segment when it is not specified

Linker scripts may specify PHDRS, but not specify section to
segment assignments, i.e:

PHDRS { seg PT_LOAD; }
SECTIONS { 
  .sec1 {} : seg
  .sec2 {} 
}

In such case linker should still choose some segment for .sec2 section.
This patch will add .sec2 to previously opened segments (seg) or to the 
very first PT_LOAD segment, if no section-to-segment assignments has been
made

Differential revision: https://reviews.llvm.org/D24795

llvm-svn: 284600
parent 37dabc24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment