diff options
author | Alan Modra <amodra@gmail.com> | 2012-03-05 22:43:40 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-03-05 22:43:40 +0000 |
commit | 66be105571d3494a28c0062f8bc663822121d838 (patch) | |
tree | 34de3a757605fafdb8ebeb907f4af86ceeb29490 /ld/lexsup.c | |
parent | d8df103b509c3750e9702b17b8af193cb93437c7 (diff) | |
download | gdb-66be105571d3494a28c0062f8bc663822121d838.zip gdb-66be105571d3494a28c0062f8bc663822121d838.tar.gz gdb-66be105571d3494a28c0062f8bc663822121d838.tar.bz2 |
* 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 <dynamic_link>): 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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r-- | ld/lexsup.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c index 7c1bc46..490f79c 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -775,10 +775,10 @@ parse_args (unsigned argc, char **argv) ``use only shared libraries'' but, then, we don't currently support shared libraries on HP/UX anyhow. */ if (strcmp (optarg, "archive") == 0) - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; else if (strcmp (optarg, "shared") == 0 || strcmp (optarg, "default") == 0) - config.dynamic_link = TRUE; + input_flags.dynamic = TRUE; else einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg); break; @@ -807,10 +807,10 @@ parse_args (unsigned argc, char **argv) yyparse (); break; case OPTION_CALL_SHARED: - config.dynamic_link = TRUE; + input_flags.dynamic = TRUE; break; case OPTION_NON_SHARED: - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; break; case OPTION_CREF: command_line.cref = TRUE; @@ -934,17 +934,17 @@ parse_args (unsigned argc, char **argv) case 'N': config.text_read_only = FALSE; config.magic_demand_paged = FALSE; - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; break; case OPTION_NO_OMAGIC: config.text_read_only = TRUE; config.magic_demand_paged = TRUE; - /* NB/ Does not set dynamic_link to TRUE. + /* NB/ Does not set input_flags.dynamic to TRUE. Use --call-shared or -Bdynamic for this. */ break; case 'n': config.magic_demand_paged = FALSE; - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; break; case OPTION_NO_DEFINE_COMMON: command_line.inhibit_common_definition = TRUE; @@ -1040,7 +1040,7 @@ parse_args (unsigned argc, char **argv) config.only_cmd_line_lib_dirs = TRUE; break; case OPTION_NO_WHOLE_ARCHIVE: - whole_archive = FALSE; + input_flags.whole_archive = FALSE; break; case 'O': /* FIXME "-O<non-digits> <value>" used to set the address of @@ -1092,7 +1092,7 @@ parse_args (unsigned argc, char **argv) config.build_constructors = FALSE; config.magic_demand_paged = FALSE; config.text_read_only = FALSE; - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; break; case 'R': /* The GNU linker traditionally uses -R to mean to include @@ -1313,7 +1313,7 @@ parse_args (unsigned argc, char **argv) config.build_constructors = TRUE; config.magic_demand_paged = FALSE; config.text_read_only = FALSE; - config.dynamic_link = FALSE; + input_flags.dynamic = FALSE; break; case 'u': ldlang_add_undef (optarg, TRUE); @@ -1437,19 +1437,19 @@ parse_args (unsigned argc, char **argv) link_info.warn_alternate_em = TRUE; break; case OPTION_WHOLE_ARCHIVE: - whole_archive = TRUE; + input_flags.whole_archive = TRUE; break; case OPTION_ADD_DT_NEEDED_FOR_DYNAMIC: - add_DT_NEEDED_for_dynamic = TRUE; + input_flags.add_DT_NEEDED_for_dynamic = TRUE; break; case OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC: - add_DT_NEEDED_for_dynamic = FALSE; + input_flags.add_DT_NEEDED_for_dynamic = FALSE; break; case OPTION_ADD_DT_NEEDED_FOR_REGULAR: - add_DT_NEEDED_for_regular = TRUE; + input_flags.add_DT_NEEDED_for_regular = TRUE; break; case OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR: - add_DT_NEEDED_for_regular = FALSE; + input_flags.add_DT_NEEDED_for_regular = FALSE; break; case OPTION_WRAP: add_wrap (optarg); |