[ELF] - Linkerscript: Implemented SORT command.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 29 Jul 2016 15:32:46 +0000 (15:32 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 29 Jul 2016 15:32:46 +0000 (15:32 +0000)
commit0702c4e86eb61dc2db22bb51525fb2edb008af4d
tree48b57c1b2af5daad4ac742c8b7c40da242a5e913
parentb20c34edf378af5fce9bf504126999df67407bfe
[ELF] - Linkerscript: Implemented SORT command.

When the SORT keyword is used, the linker will sort the files or sections into ascending order by name before placing them in the output file.
It is used in FreeBSD script:
https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l139

This is PR28689.

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

llvm-svn: 277153
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/Inputs/linkerscript-sort.s [new file with mode: 0644]
lld/test/ELF/linkerscript/linkerscript-sort.s [new file with mode: 0644]