From 66be105571d3494a28c0062f8bc663822121d838 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 5 Mar 2012 22:43:40 +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/emultempl/sunos.em | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ld/emultempl/sunos.em') diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em index 567b8e2..d7cd3e8 100644 --- a/ld/emultempl/sunos.em +++ b/ld/emultempl/sunos.em @@ -10,7 +10,8 @@ fragment < SunOS shared library support by Ian Lance Taylor @@ -85,7 +86,7 @@ static void gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); - config.dynamic_link = TRUE; + input_flags.dynamic = TRUE; config.has_shared = TRUE; } @@ -156,9 +157,9 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp) char *alc; struct stat st; - if (! inp->search_dirs_flag - || ! inp->maybe_archive - || ! inp->dynamic) + if (! inp->flags.search_dirs + || ! inp->flags.maybe_archive + || ! inp->flags.dynamic) return; ASSERT (CONST_STRNEQ (inp->local_sym_name, "-l")); @@ -188,7 +189,7 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp) /* Turn off the search_dirs_flag to prevent ldfile_open_file from searching for this file again. */ - inp->search_dirs_flag = FALSE; + inp->flags.search_dirs = FALSE; free (found); @@ -891,7 +892,7 @@ gld${EMULATION_NAME}_count_need (lang_input_statement_type *inp) { ++need_entries; need_size += NEED_ENTRY_SIZE; - if (! inp->maybe_archive) + if (! inp->flags.maybe_archive) need_size += strlen (inp->filename) + 1; else { @@ -919,7 +920,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp) referential locality. */ bfd_put_32 (link_info.output_bfd, need_pnames - need_contents, need_pinfo); - if (! inp->maybe_archive) + if (! inp->flags.maybe_archive) { bfd_put_32 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 4); bfd_put_16 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 8); -- cgit v1.1