ELF: Compute used bit for --as-needed during symbol resolution.
We can now use this to decide whether to emit a verneed during the final pass over the symbols. We were previously wrongly creating a verneed entry in the case where all references to a DSO's symbols were weak. In a future change we may also want to use the used bit to control whether shared symbols are preemptible and appear in the dynsym. This seems a little tricky to do at the moment because isNeeded() is templated. The only other functional change here is that we emit a DT_NEEDED for DSOs whose symbols are all preempted by objects that appear later in the link. But that doesn't seem too important to me. Differential Revision: http://reviews.llvm.org/D21171 llvm-svn: 272282
Loading
Please register or sign in to comment