summaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@arc.com>2004-05-19 14:15:55 +0000
committerJoern Rennecke <joern.rennecke@arc.com>2004-05-19 14:15:55 +0000
commiteb70466eb4aabe2278381e0ad82f52d19122ea05 (patch)
tree4b7a18e94cf01a8e27c67d70bc74635a4f6dcafa /ld/lexsup.c
parentd5d8cfb7aae27a953ef33d038288b3220f8bc16d (diff)
downloadbinutils-redhat-eb70466eb4aabe2278381e0ad82f52d19122ea05.tar.gz
* NEWS: Mention new linker map file generation and the
--reduce-memory-overheads option. * ld.texinfo: Document --reduce-memory-overheads option. * ld.h (map_symbol_def): New struct. (struct user_section_struct, section_userdata_type): Rename to: (struct lean_user_section_struct, lean_section_userdata_type). (struct fat_user_section_struct, fat_section_userdata_type): New. (SECTION_USERDATA_SIZE): Define. (args_type): New member reduce_memory_overheads. * ldlang.c (map_obstack): New static variable. (init_map_userdata, print_all_symbols, sort_def_symbol): New functions. (lang_map): Unless command_line.reduce_memory_overheads is set, initialize lists of defined symbols for each section. (print_input_section): Unless command_line.reduce_memory_overheads is set, use print_all_symbols. (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE. * ldmain.c (main): Initialize command_line.reduce_memory_overheads. * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS. (ld_options): Add entry for --reduce-memory-overheads. (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index b377bd4c7c..fcca4d33db 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -142,7 +142,8 @@ enum option_values
OPTION_PIE,
OPTION_UNRESOLVED_SYMBOLS,
OPTION_WARN_UNRESOLVED_SYMBOLS,
- OPTION_ERROR_UNRESOLVED_SYMBOLS
+ OPTION_ERROR_UNRESOLVED_SYMBOLS,
+ OPTION_REDUCE_MEMORY_OVERHEADS
};
/* The long options. This structure is used for both the option
@@ -445,7 +446,9 @@ static const struct ld_option ld_options[] =
{ {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
'\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"), TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }
+ '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
+ { {"reduce-memory-overheads", no_argument, NULL, OPTION_REDUCE_MEMORY_OVERHEADS},
+ '\0', NULL, N_("reduce memory overheads, possibly taking much longer"), TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1221,6 +1224,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_FINI:
link_info.fini_function = optarg;
break;
+ case OPTION_REDUCE_MEMORY_OVERHEADS:
+ command_line.reduce_memory_overheads = TRUE;
+ break;
}
}