* aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
before adding BYTES_IN_WORD.
This commit is contained in:
parent
6d04c6d475
commit
435b470ec3
|
@ -1,5 +1,8 @@
|
||||||
Thu Aug 25 10:44:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
Thu Aug 25 10:44:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
|
* aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
|
||||||
|
before adding BYTES_IN_WORD.
|
||||||
|
|
||||||
* coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
|
* coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
|
||||||
not merely the first.
|
not merely the first.
|
||||||
|
|
||||||
|
|
14
bfd/aoutx.h
14
bfd/aoutx.h
|
@ -1764,6 +1764,7 @@ add_to_stringtab (abfd, tab, str, copy)
|
||||||
boolean copy;
|
boolean copy;
|
||||||
{
|
{
|
||||||
boolean hash;
|
boolean hash;
|
||||||
|
bfd_size_type index;
|
||||||
|
|
||||||
/* An index of 0 always means the empty string. */
|
/* An index of 0 always means the empty string. */
|
||||||
if (*str == '\0')
|
if (*str == '\0')
|
||||||
|
@ -1775,9 +1776,16 @@ add_to_stringtab (abfd, tab, str, copy)
|
||||||
if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
|
if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
|
||||||
hash = false;
|
hash = false;
|
||||||
|
|
||||||
/* Add BYTES_IN_WORD to the return value to account for the space
|
index = _bfd_stringtab_add (tab, str, hash, copy);
|
||||||
taken up by the count. */
|
|
||||||
return BYTES_IN_WORD + _bfd_stringtab_add (tab, str, hash, copy);
|
if (index != (bfd_size_type) -1)
|
||||||
|
{
|
||||||
|
/* Add BYTES_IN_WORD to the return value to account for the
|
||||||
|
space taken up by the string table size. */
|
||||||
|
index += BYTES_IN_WORD;
|
||||||
|
}
|
||||||
|
|
||||||
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write out a strtab. ABFD is already at the right location in the
|
/* Write out a strtab. ABFD is already at the right location in the
|
||||||
|
|
Loading…
Reference in New Issue