* ldlang.c (load_symbols): Set as_needed and add_needed according