Fix program header propagation.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 14 Nov 2016 15:39:38 +0000 (15:39 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 14 Nov 2016 15:39:38 +0000 (15:39 +0000)
commitf7a17448034721548bf26884df9349acd6e149a2
treec193c9b71d9af10ae26c55d7195cddf7f58f23cf
parent2b46120a090e8270a46dfdc1c377cfd4f7c13966
Fix program header propagation.

Propagate program headers by walking the commands, not the
sections. This allows us to propagate program headers even from
sections that don't end up in the output.

Fixes pr30997.

llvm-svn: 286837
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/ELF/Writer.cpp
lld/test/ELF/linkerscript/Inputs/implicit-program-header.script [new file with mode: 0644]
lld/test/ELF/linkerscript/implicit-program-header.s [new file with mode: 0644]