forked from Imagelibrary/binutils-gdb
2007-08-09 Michael Snyder <msnyder@access-company.com>
* aoutx.h (aout_get_external_symbols): Return if count is zero.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2007-08-09 Michael Snyder <msnyder@access-company.com>
|
||||||
|
|
||||||
|
* aoutx.h (aout_get_external_symbols): Return if count is zero.
|
||||||
|
|
||||||
2007-08-09 H.J. Lu <hongjiu.lu@intel.com>
|
2007-08-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/4909
|
PR ld/4909
|
||||||
|
|||||||
@@ -1294,6 +1294,8 @@ aout_get_external_symbols (bfd *abfd)
|
|||||||
bfd_size_type amt;
|
bfd_size_type amt;
|
||||||
|
|
||||||
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
|
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
|
||||||
|
if (count == 0)
|
||||||
|
return TRUE; /* Nothing to do. */
|
||||||
|
|
||||||
#ifdef USE_MMAP
|
#ifdef USE_MMAP
|
||||||
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
|
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
|
||||||
@@ -1306,7 +1308,7 @@ aout_get_external_symbols (bfd *abfd)
|
|||||||
later on. If we put them on the objalloc it might not be
|
later on. If we put them on the objalloc it might not be
|
||||||
possible to free them. */
|
possible to free them. */
|
||||||
syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE);
|
syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE);
|
||||||
if (syms == NULL && count != 0)
|
if (syms == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
amt = exec_hdr (abfd)->a_syms;
|
amt = exec_hdr (abfd)->a_syms;
|
||||||
|
|||||||
Reference in New Issue
Block a user