[ELF] - Implemented linkerscript sections padding.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 26 Feb 2016 14:48:31 +0000 (14:48 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 26 Feb 2016 14:48:31 +0000 (14:48 +0000)
commite2ee72b509a4ce0f6cbdf11c0130b1004a3f3f5a
tree0ea5b825bbe724e23e7f54ec0e0c520754392f7b
parent9e8593949d6d2df38f9d354e99c683fb4f014710
[ELF] - Implemented linkerscript sections padding.

BSD linker scripts contain special cases to add NOP
padding to code sections. Syntax is next:

.init:
 {
   KEEP (*(.init))
 } =0x90909090
(0x90 is NOP)

This patch implements that functionality.

llvm-svn: 262020
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/ELF/OutputSections.cpp
lld/test/ELF/linkerscript-sections-padding.s [new file with mode: 0644]