aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-05-02 02:56:14 +0000
committerIan Lance Taylor <ian@airs.com>1996-05-02 02:56:14 +0000
commit9aac8e83a0386b624e6d589c34e85ebf54c28cfe (patch)
tree1362d6da701b12b678b48cb326f13bad98651cc6 /bfd
parent9c7a5748032251fd306e41010bea9c1ec5e19962 (diff)
downloadgdb-9aac8e83a0386b624e6d589c34e85ebf54c28cfe.zip
gdb-9aac8e83a0386b624e6d589c34e85ebf54c28cfe.tar.gz
gdb-9aac8e83a0386b624e6d589c34e85ebf54c28cfe.tar.bz2
* coffcode.h (styp_to_sec_flags): Handle long symbol names
when looking for the section symbol.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog2
-rw-r--r--bfd/coffcode.h13
2 files changed, 9 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 40c0fe4..fe4e120 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -6,6 +6,8 @@ Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
* coffcode.h (STRING_SIZE_SIZE): Define.
+ (styp_to_sec_flags): Handle long symbol names when looking for the
+ section symbol.
(bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
(bfd_coff_long_section_names): Define.
(coff_write_object_contents): Handle long section names.
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 2c716f6..82447d3 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -585,15 +585,16 @@ styp_to_sec_flags (abfd, hdr, name)
if (isym.n_sclass == C_STAT
&& isym.n_type == T_NULL
- && isym.n_numaux == 1
- && isym._n._n_n._n_zeroes != 0)
+ && isym.n_numaux == 1)
{
char buf[SYMNMLEN + 1];
+ const char *symname;
- memcpy (buf, isym._n._n_name, SYMNMLEN);
- buf[SYMNMLEN] = '\0';
+ symname = _bfd_coff_internal_syment_name (abfd, &isym, buf);
+ if (symname == NULL)
+ abort ();
- if (strcmp (name, buf) == 0)
+ if (strcmp (name, symname) == 0)
{
union internal_auxent aux;
@@ -2373,7 +2374,7 @@ coff_write_object_contents (abfd)
if (len > SCNNMLEN)
{
memset (section.s_name, 0, SCNNMLEN);
- sprintf (section.s_name, "/%d", string_size);
+ sprintf (section.s_name, "/%lu", (unsigned long) string_size);
string_size += len + 1;
}
}