Create GOT and PLT entries early in scanRelocs().
authorRui Ueyama <ruiu@google.com>
Thu, 6 Apr 2017 03:30:51 +0000 (03:30 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 6 Apr 2017 03:30:51 +0000 (03:30 +0000)
commit5036cc676825ae04a0dae9bc298bc289dc5b425b
tree141538575efae41ad79ffb2b475b297b373b6c48
parentc2a49bf95cd72283e0327fb7354b8665b953e8de
Create GOT and PLT entries early in scanRelocs().

scanRelocs() does a lot of things. It fills InputSection's Relocations vector,
making a decision whether a TLS relocation should be relaxed or not,
and making a decision whether a GOT/PLT slot needs to be created or not.

They don't actually have to be done in a single loop. I want to separate
them so that some of them can be run concurently. As a first step, this
patch moves PLT/GOT slot assignment to beginning of the loop, so that
they just fall through to the next statements. This should make it clear
that that code doesn't affect other parts of the loop.

llvm-svn: 299615
lld/ELF/Relocations.cpp