aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-10-30 23:25:51 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-10-30 23:25:51 +0000
commitc0f0068602c40067eee019e0d3d152c5c1868f18 (patch)
tree0cec9c4ca009afd8bb1f48d81c8d3750fba41457 /ld
parent5147198ffdd2c4035831da361cd65faa7b054803 (diff)
downloadfsf-binutils-gdb-c0f0068602c40067eee019e0d3d152c5c1868f18.zip
fsf-binutils-gdb-c0f0068602c40067eee019e0d3d152c5c1868f18.tar.gz
fsf-binutils-gdb-c0f0068602c40067eee019e0d3d152c5c1868f18.tar.bz2
bfd/
2006-10-30 H.J. Lu <hongjiu.lu@intel.com> PR ld/3111 * elf-bfd.h (elf_obj_tdata): Add symbuf. (_bfd_elf_section_already_linked): Add struct bfd_link_info *. (_bfd_elf_check_kept_section): Likewise. (bfd_elf_match_symbols_in_sections): Likewise. * elf.c (assign_section_numbers): Updated to add struct bfd_link_info *. (bfd_elf_match_symbols_in_sections): Updated. Cache symbol buffer if info->reduce_memory_overheads is false. * elflink.c (match_group_member): Updated to add struct bfd_link_info *. (_bfd_elf_check_kept_section): Likewise. (elf_link_input_bfd): Likewise. (_bfd_elf_section_already_linked): Likewise. (bfd_elf_final_link): Free symbol buffer if info->reduce_memory_overheads is false. * libbfd-in.h (_bfd_nolink_section_already_linked): Add struct bfd_link_info *. (_bfd_generic_section_already_linked): Likewise. * libbfd.h: Regenerated. * linker.c (bfd_section_already_linked): Add struct bfd_link_info *. (_bfd_generic_section_already_linked): Likewise. * targets.c (bfd_target): Add struct bfd_link_info * to _section_already_linked. * bfd-in2.h: Regenerated. include/ 2006-10-30 H.J. Lu <hongjiu.lu@intel.com> PR ld/3111 * bfdlink.h (bfd_link_info): Add reduce_memory_overheads. ld/ 2006-10-30 H.J. Lu <hongjiu.lu@intel.com> PR ld/3111 * ld.h (args_type): Remove reduce_memory_overheads. * ldlang.c (lang_map): Updated. (section_already_linked): Likewise. (print_input_section): Likewise. * ldmain.c (main): Likewise. * lexsup.c (parse_args): Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/ld.h5
-rw-r--r--ld/ldlang.c8
-rw-r--r--ld/ldmain.c2
-rw-r--r--ld/lexsup.c2
5 files changed, 17 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e3864b7..314d6fe 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,14 @@
+2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3111
+ * ld.h (args_type): Remove reduce_memory_overheads.
+
+ * ldlang.c (lang_map): Updated.
+ (section_already_linked): Likewise.
+ (print_input_section): Likewise.
+ * ldmain.c (main): Likewise.
+ * lexsup.c (parse_args): Likewise.
+
2006-10-29 Pedro Alves <pedro_alves@portugalmail.pt>
* pe-dll.c (make_singleton_name_thunk): Re-add the NULL terminator.
diff --git a/ld/ld.h b/ld/ld.h
index 0b574d5..0b978e5 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -200,11 +200,6 @@ typedef struct {
behaviour of the linker. The new default behaviour is to reject such
input files. */
bfd_boolean accept_unknown_input_arch;
-
- /* If TRUE reduce memory overheads, at the expense of speed.
- This will cause map file generation to use an O(N^2) algorithm. */
- bfd_boolean reduce_memory_overheads;
-
} args_type;
extern args_type command_line;
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 5df5170..a5ceabd 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1794,7 +1794,7 @@ lang_map (void)
fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
- if (! command_line.reduce_memory_overheads)
+ if (! link_info.reduce_memory_overheads)
{
obstack_begin (&map_obstack, 1000);
for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link_next)
@@ -1873,7 +1873,7 @@ init_os (lang_output_section_statement_type *s, asection *isec,
s->bfd_section->output_section = s->bfd_section;
s->bfd_section->output_offset = 0;
- if (!command_line.reduce_memory_overheads)
+ if (!link_info.reduce_memory_overheads)
{
fat_section_userdata_type *new
= stat_alloc (sizeof (fat_section_userdata_type));
@@ -1966,7 +1966,7 @@ section_already_linked (bfd *abfd, asection *sec, void *data)
}
if (!(abfd->flags & DYNAMIC))
- bfd_section_already_linked (abfd, sec);
+ bfd_section_already_linked (abfd, sec, &link_info);
}
/* The wild routines.
@@ -3659,7 +3659,7 @@ print_input_section (asection *i)
if (i->output_section != NULL && i->output_section->owner == output_bfd)
{
- if (command_line.reduce_memory_overheads)
+ if (link_info.reduce_memory_overheads)
bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
else
print_all_symbols (i);
diff --git a/ld/ldmain.c b/ld/ldmain.c
index bc03e02..1784b16 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -256,7 +256,6 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.check_section_addresses = TRUE;
command_line.accept_unknown_input_arch = FALSE;
- command_line.reduce_memory_overheads = FALSE;
sort_section = none;
@@ -320,6 +319,7 @@ main (int argc, char **argv)
link_info.gc_sections = FALSE;
link_info.print_gc_sections = FALSE;
link_info.dynamic = NULL;
+ link_info.reduce_memory_overheads = FALSE;
config.maxpagesize = 0;
config.commonpagesize = 0;
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 1d267f4..347d6fc 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1370,7 +1370,7 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_REDUCE_MEMORY_OVERHEADS:
- command_line.reduce_memory_overheads = TRUE;
+ link_info.reduce_memory_overheads = TRUE;
if (config.hash_table_size == 0)
config.hash_table_size = 1021;
break;