ELF: Allow forward references to linked sections.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jul 2019 16:47:29 +0000 (16:47 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jul 2019 16:47:29 +0000 (16:47 +0000)
commitcb2d8e912512305fb5c45cf0f35f654f713dfa7c
tree1fcbe2bf208a5eba2df220a63997610c6894f92f
parent6454a20b72b625fbf7de8146428103df3b71e8e2
ELF: Allow forward references to linked sections.

It's possible to create IR that uses !associated to refer to a global that
appears later in the module, which can result in these types of forward
references being generated. Unfortunately our assembler does not currently
accept the resulting .s so I needed to use yaml2obj to test this.

Differential Revision: https://reviews.llvm.org/D64880

llvm-svn: 366460
lld/ELF/InputFiles.cpp
lld/test/ELF/linkorder-forward-ref.test [new file with mode: 0644]