/* SOM object file format.
- Copyright 1993, 1994, 1998, 2000, 2002, 2003, 2004, 2005, 2006,
- 2007 Free Software Foundation, Inc.
+ Copyright (C) 1993-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include "as.h"
#include "subsegs.h"
#include "aout/stab_gnu.h"
-#include "obstack.h"
static int version_seen = 0;
static int copyright_seen = 0;
if (compiler_seen)
{
- as_bad ("Only one .compiler pseudo-op per file!");
+ as_bad (_("Only one .compiler pseudo-op per file!"));
ignore_rest_of_line ();
return;
}
}
else
{
- as_bad ("Expected quoted string");
+ as_bad (_("Expected quoted string"));
ignore_rest_of_line ();
return;
}
p++;
if (*p == '\000')
{
- as_bad (".compiler directive missing language and version");
+ as_bad (_(".compiler directive missing language and version"));
return;
}
*p = '\000';
p++;
if (*p == '\000')
{
- as_bad (".compiler directive missing version");
+ as_bad (_(".compiler directive missing version"));
return;
}
*p = '\000';
"GNU Tools", version_id))
{
bfd_perror (stdoutput->filename);
- as_fatal ("FATAL: Attaching compiler header %s", stdoutput->filename);
+ as_fatal (_("FATAL: Attaching compiler header %s"), stdoutput->filename);
}
*input_line_pointer = c;
demand_empty_rest_of_line ();
segT saved_seg = now_seg;
segT space;
subsegT saved_subseg = now_subseg;
- char *p, *file;
+ char *p;
+ const char * file;
unsigned int stroff;
/* Make the space which will contain the debug subspaces. */
of the various stabs spaces/subspaces need to be "small". We
reserve range 72/73 which appear to work well. */
obj_set_section_attributes (space, 1, 1, 72, 2);
- bfd_set_section_alignment (stdoutput, space, 2);
+ bfd_set_section_alignment (space, 2);
/* Set the containing space for both stab sections to be $GDB_DEBUG$
(just created above). Also set some attributes which BFD does
not understand. In particular, access bits, sort keys, and load
quadrant. */
obj_set_subsection_attributes (seg, space, 0x1f, 73, 0, 0, 0, 0);
- bfd_set_section_alignment (stdoutput, seg, 2);
+ bfd_set_section_alignment (seg, 2);
/* Make some space for the first special stab entry and zero the memory.
It contains information about the length of this file's
the call to get_stab_string_offset. */
p = frag_more (12);
memset (p, 0, 12);
- as_where (&file, (unsigned int *) NULL);
- stroff = get_stab_string_offset (file, "$GDB_STRINGS$");
+ file = as_where ((unsigned int *) NULL);
+ stroff = get_stab_string_offset (file, "$GDB_STRINGS$", FALSE);
know (stroff == 1);
md_number_to_chars (p, stroff, 4);
seg_info (seg)->stabu.p = p;
quadrant. */
seg = bfd_get_section_by_name (stdoutput, "$GDB_STRINGS$");
obj_set_subsection_attributes (seg, space, 0x1f, 72, 0, 0, 0, 0);
- bfd_set_section_alignment (stdoutput, seg, 2);
+ bfd_set_section_alignment (seg, 2);
subseg_set (saved_seg, saved_subseg);
}
/* Fill in the counts in the first entry in a .stabs section. */
static void
-adjust_stab_sections (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
+adjust_stab_sections (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
{
asection *strsec;
char *p;
strsec = bfd_get_section_by_name (abfd, "$GDB_STRINGS$");
if (strsec)
- strsz = bfd_section_size (abfd, strsec);
+ strsz = bfd_section_size (strsec);
else
strsz = 0;
- nsyms = bfd_section_size (abfd, sec) / 12 - 1;
+ nsyms = bfd_section_size (sec) / 12 - 1;
p = seg_info (sec)->stabu.p;
- assert (p != 0);
+ gas_assert (p != 0);
bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6);
bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8);
void
som_frob_file (void)
{
- bfd_map_over_sections (stdoutput, adjust_stab_sections, (PTR) 0);
+ bfd_map_over_sections (stdoutput, adjust_stab_sections, (void *) 0);
}
static void
do
{
- name = input_line_pointer;
- c = get_symbol_end ();
+ c = get_symbol_name (&name);
symbolP = symbol_find_or_make (name);
*input_line_pointer = c;
- SKIP_WHITESPACE ();
+ SKIP_WHITESPACE_AFTER_NAME ();
S_SET_WEAK (symbolP);
if (c == ',')
{