/* read.c - read a source file -
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
{
char *s2 = s;
- strncpy (original_case_string, s2, sizeof (original_case_string));
+ strncpy (original_case_string, s2,
+ sizeof (original_case_string) - 1);
original_case_string[sizeof (original_case_string) - 1] = 0;
while (*s2)
{
bss_seg = subseg_new (".sbss", 1);
seg_info (bss_seg)->bss = 1;
- if (!bfd_set_section_flags (bss_seg, SEC_ALLOC))
+ if (!bfd_set_section_flags (bss_seg, SEC_ALLOC | SEC_SMALL_DATA))
as_warn (_("error setting flags for \".sbss\": %s"),
bfd_errmsg (bfd_get_error ()));
}
bump_line_counters ();
break;
-#ifndef NO_STRING_ESCAPES
case '\\':
+ if (!TC_STRING_ESCAPES)
+ break;
switch (c = *input_line_pointer++ & CHAR_MASK)
{
case 'b':
break;
}
break;
-#endif /* ! defined (NO_STRING_ESCAPES) */
default:
break;
as_warn (_("truncated file `%s', %ld of %ld bytes read"),
path, bytes, count);
}
-done:
+ done:
if (binfile != NULL)
fclose (binfile);
if (path)
free (path);
path = filename;
-gotit:
+ gotit:
/* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
register_dependency (path);
input_scrub_insert_file (path);