aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-05-02 03:11:26 +0000
committerIan Lance Taylor <ian@airs.com>1996-05-02 03:11:26 +0000
commitba97ba7e35d6ac52f1f4661a5aedebf87882bef1 (patch)
treee8517a391a67ac5be6d5dd43ed6fcfe9c24ccce7
parent9aac8e83a0386b624e6d589c34e85ebf54c28cfe (diff)
downloadgdb-ba97ba7e35d6ac52f1f4661a5aedebf87882bef1.zip
gdb-ba97ba7e35d6ac52f1f4661a5aedebf87882bef1.tar.gz
gdb-ba97ba7e35d6ac52f1f4661a5aedebf87882bef1.tar.bz2
tweak last change
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/obj-coff.c12
2 files changed, 9 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0241327..c915fc2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -2,8 +2,8 @@ Wed May 1 13:38:17 1996 Ian Lance Taylor <ian@cygnus.com>
* subsegs.h (segment_info_type): If MANY_SEGMENTS and not
BFD_ASSEMBLER, add name field.
- * config/obj-coff.c (coff_header_append): Handle long section
- names.
+ * config/obj-coff.c: Include "libiberty.h".
+ (coff_header_append): Handle long section names.
(crawl_symbols): Just use the name field for the symbol name,
without worrying about null byte termination.
(w_strings): Handle long section names.
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 3497ab2..94078e8 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -22,6 +22,7 @@
#include "as.h"
#include "obstack.h"
#include "subsegs.h"
+#include "libiberty.h"
/* I think this is probably always correct. */
#ifndef KEEP_RELOC_INFO
@@ -1937,8 +1938,8 @@ coff_header_append (abfd, h)
if (strlen (segment_info[i].name) > SCNNMLEN)
{
memset (segment_info[i].scnhdr.s_name, 0, SCNNMLEN);
- sprintf (segment_info[i].scnhdr.s_name, "/%d", string_size);
- string_size += strlen (segment_info[i].scnhdr.name) + 1;
+ sprintf (segment_info[i].scnhdr.s_name, "/%lu", string_size);
+ string_size += strlen (segment_info[i].name) + 1;
}
#endif
@@ -2939,6 +2940,7 @@ w_strings (where)
{
symbolS *symbolP;
struct filename_list *filename_list_scan = filename_list_head;
+ unsigned int i;
/* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */
md_number_to_chars (where, (valueT) string_byte_count, 4);
@@ -3075,7 +3077,7 @@ extern void
write_object_file ()
{
int i;
- char *name;
+ const char *name;
struct frchain *frchain_ptr;
object_headers headers;
@@ -3277,7 +3279,6 @@ segT
obj_coff_add_segment (name)
const char *name;
{
- unsigned int len;
unsigned int i;
#ifndef COFF_LONG_SECTION_NAMES
@@ -4138,7 +4139,8 @@ adjust_stab_section(abfd, seg)
segT seg;
{
segT stabstrseg = SEG_UNKNOWN;
- char *secname, *name, *name2;
+ const char *secname, *name2;
+ char *name;
char *p = NULL;
int i, strsz = 0, nsyms;
fragS *frag = segment_info[seg].frchainP->frch_root;