From 9aac8e83a0386b624e6d589c34e85ebf54c28cfe Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 2 May 1996 02:56:14 +0000 Subject: * coffcode.h (styp_to_sec_flags): Handle long symbol names when looking for the section symbol. --- bfd/coffcode.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bfd/coffcode.h') 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; } } -- cgit v1.1