* 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.
#include "as.h"
#include "obstack.h"
#include "subsegs.h"
+#include "libiberty.h"
/* I think this is probably always correct. */
#ifndef KEEP_RELOC_INFO
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
{
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);
write_object_file ()
{
int i;
- char *name;
+ const char *name;
struct frchain *frchain_ptr;
object_headers headers;
obj_coff_add_segment (name)
const char *name;
{
- unsigned int len;
unsigned int i;
#ifndef COFF_LONG_SECTION_NAMES
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;