ELF2: Implement --as-needed.
Audit RequiredrL249998

Description

ELF2: Implement --as-needed.

This patch adds AsNeeded and IsUsed bool fields to SharedFile. AsNeeded bit
is set if the DSO is enclosed with --as-needed and --no-as-needed. IsUsed
bit is off by default. When we adds a symbol to the symbol table for dynamic
linking, we set its SharedFile's IsUsed bit.

If AsNeeded is set but IsUsed is not set, we don't want to write that
file's SO name to DT_NEEDED field.

http://reviews.llvm.org/D13579

Details

Auditors
Bigcheese
H2 Triggered Audit
Committed
ruiuOct 11 2015, 1:59 PM
Parents
rL249997: Fix warning caused by r249995
Branches
Unknown
Tags
Unknown