+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
+ (bfd_get_output_section): Delete.
+ (bfd_asymbol_base): Delete.
+ (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
+ (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
+ (bfd_set_asymbol_name): New macro.
+ * bfd-in2.h: Regenerate.
+ * aout-cris.c: Update throughout to use bfd_asymbol_section.
+ * aoutx.h: Likewise.
+ * cofflink.c: Likewise.
+ * dwarf2.c: Likewise.
+ * ecoff.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-score.c: Likewise.
+ * elf32-score7.c: Likewise.
+ * elfn32-mips.c: Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * linker.c: Likewise.
+ * pdp11.c: Likewise.
+ * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
+
2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
* Makefile.in: Re-generate.
from the abs section, or as a symbol which has an abs value.
check for that here. */
- if (bfd_is_abs_section (bfd_get_section (sym)))
+ if (bfd_is_abs_section (bfd_asymbol_section (sym)))
{
r_extern = 0;
r_index = N_ABS;
}
else if ((sym->flags & BSF_SECTION_SYM) == 0)
{
- if (bfd_is_und_section (bfd_get_section (sym))
+ if (bfd_is_und_section (bfd_asymbol_section (sym))
/* Remember to check for weak symbols; they count as global. */
|| (sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
r_extern = 1;
to another. */
sym_pointer->e_type[0] &= ~N_TYPE;
- sec = bfd_get_section (cache_ptr);
+ sec = bfd_asymbol_section (cache_ptr);
off = 0;
if (sec == NULL)
Absolute symbols can come in in two ways, either as an offset
from the abs section, or as a symbol which has an abs value.
check for that here. */
- if (bfd_is_abs_section (bfd_get_section (sym)))
+ if (bfd_is_abs_section (bfd_asymbol_section (sym)))
{
r_extern = 0;
r_index = N_ABS;
}
else if ((sym->flags & BSF_SECTION_SYM) == 0)
{
- if (bfd_is_und_section (bfd_get_section (sym))
+ if (bfd_is_und_section (bfd_asymbol_section (sym))
|| (sym->flags & BSF_GLOBAL) != 0)
r_extern = 1;
else
/* General purpose part of a symbol X;
target specific parts are in libcoff.h, libaout.h, etc. */
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
+#define bfd_asymbol_section(sy) ((sy)->section)
+#define bfd_asymbol_value(sy) ((sy)->section->vma + (sy)->value)
+#define bfd_asymbol_name(sy) ((sy)->name)
+#define bfd_asymbol_bfd(sy) ((sy)->the_bfd)
+#define bfd_asymbol_flavour(sy) \
+ (((sy)->flags & BSF_SYNTHETIC) != 0 \
? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
+ : (sy)->the_bfd->xvec->flavour)
+#define bfd_set_asymbol_name(sy, n) do { (sy)->name = (n); } while (0)
/* A canonical archive symbol. */
/* This is a type pun with struct ranlib on purpose! */
/* General purpose part of a symbol X;
target specific parts are in libcoff.h, libaout.h, etc. */
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
+#define bfd_asymbol_section(sy) ((sy)->section)
+#define bfd_asymbol_value(sy) ((sy)->section->vma + (sy)->value)
+#define bfd_asymbol_name(sy) ((sy)->name)
+#define bfd_asymbol_bfd(sy) ((sy)->the_bfd)
+#define bfd_asymbol_flavour(sy) \
+ (((sy)->flags & BSF_SYNTHETIC) != 0 \
? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
+ : (sy)->the_bfd->xvec->flavour)
+#define bfd_set_asymbol_name(sy, n) do { (sy)->name = (n); } while (0)
/* A canonical archive symbol. */
/* This is a type pun with struct ranlib on purpose! */
bfd_asymbol_name(sym), FALSE, FALSE)
== NULL))
|| (((flaginfo.info->discard == discard_sec_merge
- && (bfd_get_section (sym)->flags & SEC_MERGE)
+ && (bfd_asymbol_section (sym)->flags & SEC_MERGE)
&& ! bfd_link_relocatable (flaginfo.info))
|| flaginfo.info->discard == discard_l)
&& bfd_is_local_label_name (sub, bfd_asymbol_name(sym))))
bfd_vma best_fit_len = 0;
struct arange *arange;
const char *name = bfd_asymbol_name (sym);
- asection *sec = bfd_get_section (sym);
+ asection *sec = bfd_asymbol_section (sym);
for (each_func = unit->function_table;
each_func;
unsigned int *linenumber_ptr)
{
const char *name = bfd_asymbol_name (sym);
- asection *sec = bfd_get_section (sym);
+ asection *sec = bfd_asymbol_section (sym);
struct varinfo* each;
for (each = unit->variable_table; each; each = each->prev_var)
struct info_list_node *node;
struct arange *arange;
const char *name = bfd_asymbol_name (sym);
- asection *sec = bfd_get_section (sym);
+ asection *sec = bfd_asymbol_section (sym);
for (node = lookup_info_hash_table (hash_table, name);
node;
unsigned int *linenumber_ptr)
{
const char *name = bfd_asymbol_name (sym);
- asection *sec = bfd_get_section (sym);
+ asection *sec = bfd_asymbol_section (sym);
struct varinfo* each;
struct info_list_node *node;
if (do_line)
{
BFD_ASSERT (section == NULL && offset == 0 && functionname_ptr == NULL);
- section = bfd_get_section (symbol);
+ section = bfd_asymbol_section (symbol);
addr = symbol->value;
}
else
symbol. */
if ((esym->asym.sc == scUndefined
|| esym->asym.sc == scSUndefined)
- && ! bfd_is_und_section (bfd_get_section (sym)))
+ && ! bfd_is_und_section (bfd_asymbol_section (sym)))
esym->asym.sc = scAbs;
/* Adjust the FDR index for the symbol by that used for the input
{ _RCONST, RELOC_SECTION_RCONST }
};
- name = bfd_get_section_name (abfd, bfd_get_section (sym));
+ name = bfd_get_section_name (abfd, bfd_asymbol_section (sym));
for (j = 0; j < ARRAY_SIZE (section_symndx); j++)
if (streq (name, section_symndx[j].name))
return (*bed->elf_backend_sym_is_global) (abfd, sym);
return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0
- || bfd_is_und_section (bfd_get_section (sym))
- || bfd_is_com_section (bfd_get_section (sym)));
+ || bfd_is_und_section (bfd_asymbol_section (sym))
+ || bfd_is_com_section (bfd_asymbol_section (sym)));
}
/* Filter global symbols of ABFD to include in the import library. All
BFD_ARM_SPECIAL_SYM_TYPE_ANY))
continue;
/* Fall through. */
- if (bfd_get_section (&q->symbol) == section
+ if (bfd_asymbol_section (&q->symbol) == section
&& q->symbol.value >= low_func
&& q->symbol.value <= offset)
{
return (sym->flags & BSF_SECTION_SYM) == 0;
else
return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0
- || bfd_is_und_section (bfd_get_section (sym))
- || bfd_is_com_section (bfd_get_section (sym)));
+ || bfd_is_und_section (bfd_asymbol_section (sym))
+ || bfd_is_com_section (bfd_asymbol_section (sym)));
}
\f
/* Set the right machine number for a MIPS ELF file. */
bfd *output_bfd, char **error_message)
{
if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (symbol))
- || bfd_is_com_section (bfd_get_section (symbol)))
+ || bfd_is_und_section (bfd_asymbol_section (symbol))
+ || bfd_is_com_section (bfd_asymbol_section (symbol)))
/* The relocation is against a global symbol. */
return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd,
bfd *output_bfd, char **error_message)
{
if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (symbol))
- || bfd_is_com_section (bfd_get_section (symbol)))
+ || bfd_is_und_section (bfd_asymbol_section (symbol))
+ || bfd_is_com_section (bfd_asymbol_section (symbol)))
/* The relocation is against a global symbol. */
return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd,
else
relocation = symbol->value;
- reloc_target_output_section = bfd_get_output_section (symbol);
+ reloc_target_output_section = bfd_asymbol_section (symbol)->output_section;
/* Here the variable relocation holds the final address of the symbol we
are relocating against, plus any addend. */
return (sym->flags & BSF_SECTION_SYM) == 0;
else
return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0
- || bfd_is_und_section (bfd_get_section (sym))
- || bfd_is_com_section (bfd_get_section (sym)));
+ || bfd_is_und_section (bfd_asymbol_section (sym))
+ || bfd_is_com_section (bfd_asymbol_section (sym)));
}
\f
/* Set the right machine number for a MIPS ELF file. */
(q->symbol.name, BFD_AARCH64_SPECIAL_SYM_TYPE_ANY)))
continue;
/* Fall through. */
- if (bfd_get_section (&q->symbol) == section
+ if (bfd_asymbol_section (&q->symbol) == section
&& q->symbol.value >= low_func && q->symbol.value <= offset)
{
func = (asymbol *) q;
bfd *output_bfd, char **error_message)
{
if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (symbol))
- || bfd_is_com_section (bfd_get_section (symbol)))
+ || bfd_is_und_section (bfd_asymbol_section (symbol))
+ || bfd_is_com_section (bfd_asymbol_section (symbol)))
/* The relocation is against a global symbol. */
return _bfd_mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd,
| BSF_GLOBAL
| BSF_CONSTRUCTOR
| BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (p))
- || bfd_is_com_section (bfd_get_section (p))
- || bfd_is_ind_section (bfd_get_section (p)))
+ || bfd_is_und_section (bfd_asymbol_section (p))
+ || bfd_is_com_section (bfd_asymbol_section (p))
+ || bfd_is_ind_section (bfd_asymbol_section (p)))
{
const char *name;
const char *string;
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, name, p->flags, bfd_get_section (p),
+ (info, abfd, name, p->flags, bfd_asymbol_section (p),
p->value, string, FALSE, FALSE, &bh)))
return FALSE;
h = (struct generic_link_hash_entry *) bh;
if (info->output_bfd->xvec == abfd->xvec)
{
if (h->sym == NULL
- || (! bfd_is_und_section (bfd_get_section (p))
- && (! bfd_is_com_section (bfd_get_section (p))
- || bfd_is_und_section (bfd_get_section (h->sym)))))
+ || (! bfd_is_und_section (bfd_asymbol_section (p))
+ && (! bfd_is_com_section (bfd_asymbol_section (p))
+ || bfd_is_und_section (bfd_asymbol_section (h->sym)))))
{
h->sym = p;
/* BSF_OLD_COMMON is a hack to support COFF reloc
reading, and it should go away when the COFF
linker is switched to the new version. */
- if (bfd_is_com_section (bfd_get_section (p)))
+ if (bfd_is_com_section (bfd_asymbol_section (p)))
p->flags |= BSF_OLD_COMMON;
}
}
| BSF_GLOBAL
| BSF_CONSTRUCTOR
| BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (sym))
- || bfd_is_com_section (bfd_get_section (sym))
- || bfd_is_ind_section (bfd_get_section (sym)))
+ || bfd_is_und_section (bfd_asymbol_section (sym))
+ || bfd_is_com_section (bfd_asymbol_section (sym))
+ || bfd_is_ind_section (bfd_asymbol_section (sym)))
{
if (sym->udata.p != NULL)
h = (struct generic_link_hash_entry *) sym->udata.p;
the relocs in the output format being used. */
h = NULL;
}
- else if (bfd_is_und_section (bfd_get_section (sym)))
+ else if (bfd_is_und_section (bfd_asymbol_section (sym)))
h = ((struct generic_link_hash_entry *)
bfd_wrapped_link_hash_lookup (output_bfd, info,
bfd_asymbol_name (sym),
| BSF_GLOBAL
| BSF_CONSTRUCTOR
| BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (sym))
- || bfd_is_com_section (bfd_get_section (sym))
- || bfd_is_ind_section (bfd_get_section (sym)))
+ || bfd_is_und_section (bfd_asymbol_section (sym))
+ || bfd_is_com_section (bfd_asymbol_section (sym))
+ || bfd_is_ind_section (bfd_asymbol_section (sym)))
{
/* sym->udata may have been set by
generic_link_add_symbol_list. */
if (sym->udata.p != NULL)
h = (struct bfd_link_hash_entry *) sym->udata.p;
- else if (bfd_is_und_section (bfd_get_section (sym)))
+ else if (bfd_is_und_section (bfd_asymbol_section (sym)))
h = bfd_wrapped_link_hash_lookup (output_bfd, info,
bfd_asymbol_name (sym),
FALSE, FALSE, TRUE);
to another. */
sym_pointer->e_type[0] &= ~N_TYPE;
- sec = bfd_get_section (cache_ptr);
+ sec = bfd_asymbol_section (cache_ptr);
off = 0;
if (sec == NULL)
+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * nm.c: Update bfd_get_section to bfd_asymbol_section throughout.
+ * objcopy.c: Likewise.
+ * objdump.c: Likewise.
+ * rdcoff.c: Likewise.
+ * objcopy.c (create_new_symbol): Use bfd_set_asymbol_name.
+ (filter_symbols): Likewise.
+
2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
* doc/Makefile.am (MOSTLYCLEANFILES): Clean all man pages,
if (x == NULL || y == NULL)
bfd_fatal (bfd_get_filename (sort_bfd));
- xs = bfd_get_section (x);
- ys = bfd_get_section (y);
+ xs = bfd_asymbol_section (x);
+ ys = bfd_asymbol_section (y);
if (bfd_is_und_section (xs))
{
if (x == NULL || y == NULL)
bfd_fatal (bfd_get_filename (sort_bfd));
- xs = bfd_get_section (x);
- ys = bfd_get_section (y);
+ xs = bfd_asymbol_section (x);
+ ys = bfd_asymbol_section (y);
if (bfd_is_und_section (xs))
abort ();
else
next = NULL;
- sec = bfd_get_section (sym);
+ sec = bfd_asymbol_section (sym);
/* Synthetic symbols don't have a full type set of data available, thus
we can't rely on that information for the symbol size. Ditto for
else
{
if (from + size < fromend
- && sec == bfd_get_section (next))
+ && sec == bfd_asymbol_section (next))
sz = valueof (next) - valueof (sym);
else
sz = (bfd_get_section_vma (abfd, sec)
if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0)
version_string = bfd_get_symbol_version_string (abfd, sym, &hidden);
- if (bfd_is_und_section (bfd_get_section (sym)))
+ if (bfd_is_und_section (bfd_asymbol_section (sym)))
hidden = TRUE;
if (version_string && *version_string != '\0')
lineno_cache_bfd = abfd;
}
- if (bfd_is_und_section (bfd_get_section (sym)))
+ if (bfd_is_und_section (bfd_asymbol_section (sym)))
{
static asection **secs;
static arelent ***relocs;
}
}
}
- else if (bfd_get_section (sym)->owner == abfd)
+ else if (bfd_asymbol_section (sym)->owner == abfd)
{
if ((bfd_find_line (abfd, syms, sym, &filename, &lineno)
- || bfd_find_nearest_line (abfd, bfd_get_section (sym),
+ || bfd_find_nearest_line (abfd, bfd_asymbol_section (sym),
syms, sym->value, &filename,
&functionname, &lineno))
&& filename != NULL
{
asymbol *sym = bfd_make_empty_symbol (obfd);
- bfd_asymbol_name (sym) = ptr->symdef;
+ bfd_set_asymbol_name (sym, ptr->symdef);
sym->value = ptr->symval;
sym->flags = ptr->flags;
if (ptr->section)
bfd_boolean rem_leading_char;
bfd_boolean add_leading_char;
- undefined = bfd_is_und_section (bfd_get_section (sym));
+ undefined = bfd_is_und_section (bfd_asymbol_section (sym));
if (add_sym_list)
{
if (new_name == name
&& (flags & BSF_SECTION_SYM) != 0)
new_name = (char *) find_section_rename (name, NULL);
- bfd_asymbol_name (sym) = new_name;
+ bfd_set_asymbol_name (sym, new_name);
name = new_name;
}
|| (remove_leading_char
&& ((flags & (BSF_GLOBAL | BSF_WEAK)) != 0
|| undefined
- || bfd_is_com_section (bfd_get_section (sym)))));
+ || bfd_is_com_section (bfd_asymbol_section (sym)))));
/* Check if we will add a new leading character. */
add_leading_char =
if (rem_leading_char && add_leading_char && !prefix_symbols_string)
{
name[0] = bfd_get_symbol_leading_char (obfd);
- bfd_asymbol_name (sym) = name;
+ bfd_set_asymbol_name (sym, name);
rem_leading_char = FALSE;
add_leading_char = FALSE;
}
/* Remove leading char. */
if (rem_leading_char)
- bfd_asymbol_name (sym) = ++name;
+ bfd_set_asymbol_name (sym, ++name);
/* Add new leading char and/or prefix. */
if (add_leading_char || prefix_symbols_string)
}
strcpy (ptr, name);
- bfd_asymbol_name (sym) = n;
+ bfd_set_asymbol_name (sym, n);
name = n;
}
keep = FALSE;
else if ((flags & BSF_KEEP) != 0 /* Used in relocation. */
|| ((flags & BSF_SECTION_SYM) != 0
- && ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags
+ && ((*bfd_asymbol_section (sym)->symbol_ptr_ptr)->flags
& BSF_KEEP) != 0))
{
keep = TRUE;
}
else if (relocatable /* Relocatable file. */
&& ((flags & (BSF_GLOBAL | BSF_WEAK)) != 0
- || bfd_is_com_section (bfd_get_section (sym))))
+ || bfd_is_com_section (bfd_asymbol_section (sym))))
keep = TRUE;
else if (bfd_decode_symclass (sym) == 'I')
/* Global symbols in $idata sections need to be retained
else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */
|| (flags & BSF_WEAK) != 0
|| undefined
- || bfd_is_com_section (bfd_get_section (sym)))
+ || bfd_is_com_section (bfd_asymbol_section (sym)))
keep = strip_symbols != STRIP_UNNEEDED;
else if ((flags & BSF_DEBUGGING) != 0) /* Debugging symbol. */
keep = (strip_symbols != STRIP_DEBUG
&& strip_symbols != STRIP_UNNEEDED
&& ! convert_debugging);
- else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
+ else if (bfd_coff_get_comdat_section (abfd, bfd_asymbol_section (sym)))
/* COMDAT sections store special information in local
symbols, so we cannot risk stripping any of them. */
keep = TRUE;
|| is_specified_symbol (name, keep_specific_htab)))
keep = TRUE;
- if (keep && is_strip_section (abfd, bfd_get_section (sym)))
+ if (keep && is_strip_section (abfd, bfd_asymbol_section (sym)))
keep = FALSE;
if (keep)
if ((sym->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0)
version_string = bfd_get_symbol_version_string (abfd, sym, &hidden);
- if (bfd_is_und_section (bfd_get_section (sym)))
+ if (bfd_is_und_section (bfd_asymbol_section (sym)))
hidden = TRUE;
name = sanitize_string (name);
/* Adjust the vma to the reloc. */
vma += bfd_asymbol_value (sym);
- if (bfd_is_und_section (bfd_get_section (sym)))
+ if (bfd_is_und_section (bfd_asymbol_section (sym)))
skip_find = TRUE;
}
{
asection *sym_sec;
- sym_sec = bfd_get_section (*q->sym_ptr_ptr);
+ sym_sec = bfd_asymbol_section (*q->sym_ptr_ptr);
sym_name = bfd_get_section_name (aux->abfd, sym_sec);
if (sym_name == NULL || *sym_name == '\0')
sym_name = "*unknown*";
else
base = auxent.x_sym.x_misc.x_lnsz.x_lnno - 1;
- addr = bfd_get_section_vma (abfd, bfd_get_section (sym));
+ addr = bfd_get_section_vma (abfd, bfd_asymbol_section (sym));
++linenos;
+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * symbols.c (S_IS_LOCAL): Update bfd_get_section to
+ bfd_asymbol_section.
+
2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
* Makefile.in: Re-generate.
if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
- if (bfd_get_section (s->bsym) == reg_section)
+ if (bfd_asymbol_section (s->bsym) == reg_section)
return 1;
if (flag_strip_local_absolute
/* Keep BSF_FILE symbols in order to allow debuggers to identify
the source file even when the object file is stripped. */
&& (flags & (BSF_GLOBAL | BSF_FILE)) == 0
- && bfd_get_section (s->bsym) == absolute_section)
+ && bfd_asymbol_section (s->bsym) == absolute_section)
return 1;
name = S_GET_NAME (s);
+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * arm-tdep.c (arm_record_special_symbol): Update bfd_get_section
+ to bfd_asymbol_section.
+
2019-09-18 Alan Modra <amodra@gmail.com>
* amd64-dicos-tdep.c (amd64_dicos_osabi_sniffer): Constify target.
data = arm_objfile_data_key.emplace (objfile,
objfile->obfd->section_count);
arm_mapping_symbol_vec &map
- = data->section_maps[bfd_get_section (sym)->index];
+ = data->section_maps[bfd_asymbol_section (sym)->index];
new_map_sym.value = sym->value;
new_map_sym.type = name[1];
+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * ldcref.c (check_reloc_refs): Update bfd_get_section to
+ bfd_asymbol_section.
+
2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
* Makefile.in: Re-generate.
if (q->sym_ptr_ptr != NULL
&& *q->sym_ptr_ptr != NULL
&& ((global
- && (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))
- || bfd_is_com_section (bfd_get_section (*q->sym_ptr_ptr))
+ && (bfd_is_und_section (bfd_asymbol_section (*q->sym_ptr_ptr))
+ || bfd_is_com_section (bfd_asymbol_section (*q->sym_ptr_ptr))
|| ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL
| BSF_WEAK)) != 0))
|| (!global
&& ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
| BSF_SECTION_SYM)) != 0
- && bfd_get_section (*q->sym_ptr_ptr) == info->defsec))
+ && bfd_asymbol_section (*q->sym_ptr_ptr) == info->defsec))
&& (symname != NULL
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
: ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0))