From 9835ffab2f41a3eea894df5d85ec2387426d8081 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 5 Mar 2012 22:43:39 +0000 Subject: * ldlang.h (struct lang_input_statement_flags): New, extract from.. (lang_input_statement_type): ..here. New field "flags". (input_flags): Declare. (missing_file): Delete. * ldmain.h (whole_archive): Delete. (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete. * ld.h (ld_config_type ): Delete. * ldmain.c (whole_archive): Delete. (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete. * ldlang.c (missing_file, ldlang_sysrooted_script): Delete. (input_flags): New variable. Replace all uses of config.dynamic_link, missing_file, ldlang_sysrooted_script, whole_archive, add_DT_NEEDED_for_regular and add_DT_NEEDED_for_dynamic with fields from here. * ldfile.c: Likewise. * ldgram.y: Likewise. * ldmain.c: Likewise. * ldwrite.c: Likewise. * lexsup.c: Likewise. * plugin.c: Likewise. * emultempl/aix.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vms.em: Likewise. * ldlang.c (new_afile): Use memset to init zero fields. (load_symbols): Simplify save and restore of flags around command file processing. * ldfile.c (is_sysrooted_pathname): Tidy. --- ld/ldmain.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'ld/ldmain.c') diff --git a/ld/ldmain.c b/ld/ldmain.c index d006ed5d3e..b2810a725d 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -95,18 +95,6 @@ bfd_boolean trace_file_tries; instead of complaining if no input files are given. */ bfd_boolean version_printed; -/* Nonzero means link in every member of an archive. */ -bfd_boolean whole_archive; - -/* True means only create DT_NEEDED entries for dynamic libraries - if they actually satisfy some reference in a regular object. */ -bfd_boolean add_DT_NEEDED_for_regular; - -/* True means create DT_NEEDED entries for dynamic libraries that - are DT_NEEDED by dynamic libraries specifically mentioned on - the command line. */ -bfd_boolean add_DT_NEEDED_for_dynamic; - /* TRUE if we should demangle symbol names. */ bfd_boolean demangling; @@ -767,9 +755,9 @@ add_archive_element (struct bfd_link_info *info, file.filesize = arelt_size (abfd); file.fd = fd; plugin_maybe_claim (&file, input); - if (input->claimed) + if (input->flags.claimed) { - input->claim_archive = TRUE; + input->flags.claim_archive = TRUE; *subsbfd = input->the_bfd; } } -- cgit v1.2.1