/* BFD back-end for PDP-11 a.out binaries.
- Copyright (C) 2001-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
is_stab (int type, const char *name)
{
if (type == N_GSYM || type == N_FUN)
- return (index(name, ':') != NULL);
- return (type > N_FUN);
+ return strchr (name, ':') != NULL;
+ return type > N_FUN;
}
static int
type = H_GET_8 (abfd, p->e_type);
- /* Ignore debugging symbols. */
- if (is_stab(type, name))
- continue;
-
/* PR 19629: Corrupt binaries can contain illegal string offsets. */
if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd))
return FALSE;
name = strings + GET_WORD (abfd, p->e_strx);
+
+ /* Ignore debugging symbols. */
+ if (is_stab (type, name))
+ continue;
+
value = GET_WORD (abfd, p->e_value);
flags = BSF_GLOBAL;
string = NULL;
AR_PAD_CHAR, /* AR_pad_char. */
15, /* AR_max_namelen. */
0, /* match priority. */
+ TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */