build as needed
authorAnas Nashif <anas.nashif@intel.com>
Tue, 30 Oct 2012 19:44:39 +0000 (12:44 -0700)
committerVyacheslav Barinov <v.barinov@samsung.com>
Mon, 16 Feb 2015 07:34:03 +0000 (10:34 +0300)
ld/ldmain.c

index 7b2d703..a507680 100644 (file)
@@ -291,6 +291,8 @@ main (int argc, char **argv)
   link_info.pei386_auto_import = -1;
   link_info.spare_dynamic_tags = 5;
   link_info.path_separator = ':';
+  if (getenv ("LD_AS_NEEDED") && atoi(getenv ("LD_AS_NEEDED")) > 0)
+    input_flags.add_DT_NEEDED_for_regular = TRUE;
 
   ldfile_add_arch ("");
   emulation = get_emulation (argc, argv);