From: Nick Clifton Date: Fri, 13 Oct 2000 20:41:08 +0000 (+0000) Subject: Oops - fix mistake in previous delta where unused variable 'nsyms' was X-Git-Tag: gprof-pre-ansify-2004-05-26~7590 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=51a7589d228ec8273a96961d56b92ef1e09c3c4c;p=pf3gnuchains%2Fpf3gnuchains4x.git Oops - fix mistake in previous delta where unused variable 'nsyms' was deleted, but along with its (necessary) call to bfd_canonicalize_symtab. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 56b86db2f2..b048ec455b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,7 +1,8 @@ 2000-10-13 Nick Clifton * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms' - local variables - they are not used. + local variables - they are not used, but leave in the call to + bfd_canonicalize_symtab. (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of pe_dll_search_prefix. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 99829a2037..bbf0c942e2 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -855,11 +855,18 @@ gld_${EMULATION_NAME}_after_open () for (sec = is->the_bfd->sections; sec; sec = sec->next) { int i; - int symsize = bfd_get_symtab_upper_bound (is->the_bfd); - asymbol **symbols = (asymbol **) xmalloc (symsize); - int relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec); - arelent **relocs = (arelent **) xmalloc ((size_t) relsize); - int nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec, + int symsize; + asymbol **symbols; + int relsize; + arelent **relocs; + int nrelocs; + + symsize = bfd_get_symtab_upper_bound (is->the_bfd); + symbols = (asymbol **) xmalloc (symsize); + bfd_canonicalize_symtab (is->the_bfd, symbols); + relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec); + relocs = (arelent **) xmalloc ((size_t) relsize); + nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec, relocs, symbols); for (i=0; i