diff options
author | Alan Modra <amodra@gmail.com> | 2019-09-19 11:51:04 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-09-20 18:04:02 +0930 |
commit | 00f93c449228e69f2161405b1f49b406e88785f0 (patch) | |
tree | 89558e119955a9ae7847d60870efdfaa3d42dfe7 /sim | |
parent | x86-64: fix handling of PUSH/POP of segment register (diff) | |
download | binutils-gdb-00f93c449228e69f2161405b1f49b406e88785f0.tar.gz binutils-gdb-00f93c449228e69f2161405b1f49b406e88785f0.tar.bz2 binutils-gdb-00f93c449228e69f2161405b1f49b406e88785f0.zip |
bfd macro conversion to inline functions
This converts some of the macros that access struct bfd fields to
inline functions.
bfd/
* archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
* bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
(bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
(bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
(bfd_get_file_flags, bfd_applicable_file_flags),
(bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
(bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
(bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
(bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
* bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
(bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
(bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
(bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
(bfd_usrdata, bfd_set_usrdata): New inline functions.
* targets.c (bfd_get_target, bfd_get_flavour),
(bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
(bfd_little_endian, bfd_header_big_endian),
(bfd_header_little_endian, bfd_applicable_section_flags),
(bfd_get_symbol_leading_char): New inline functions.
* bfd-in2.h: Regenerate.
binutils/
* ar.c (write_archive): Use bfd_set_thin_archive.
gdb/
* gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Use bfd_set_usrdata.
* dwarf2read.c (dwarf2_read_gdb_index, dwarf2_read_debug_names),
(read_indirect_string_from_dwz): Use bfd accessor.
* dwarf2read.h (struct dwz_file <filename>): Likewise.
* machoread.c (macho_symfile_read_all_oso): Likewise.
* solib.c (solib_bfd_open): Likewise.
ld/
* ldelf.c (ldelf_after_open, ldelf_place_orphan
* ldlang.c (walk_wild_file, lang_process): Use bfd_usrdata.
(load_symbols, ldlang_add_file): Use bfd_set_usrdata.
* ldmain.c (add_archive_element): Use bfd_usrdata.
* ldlang.h (bfd_input_just_syms): New inline function.
* emultempl/aarch64elf.em (build_section_lists): Use it.
* emultempl/mmo.em (mmo_place_orphan): Likewise.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/ppc64elf.em (build_section_lists): Likewise.
sim/
* ppc/emul_generic.c (emul_add_tree_options): Delete old bfd code.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/ChangeLog | 4 | ||||
-rw-r--r-- | sim/ppc/emul_generic.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog index 191e2370a98..d4c7d166d2b 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2019-09-20 Alan Modra <amodra@gmail.com> + + * ppc/emul_generic.c (emul_add_tree_options): Delete old bfd code. + 2019-09-18 Alan Modra <amodra@gmail.com> * common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c, diff --git a/sim/ppc/emul_generic.c b/sim/ppc/emul_generic.c index dc0b2cf1e09..64c02193090 100644 --- a/sim/ppc/emul_generic.c +++ b/sim/ppc/emul_generic.c @@ -262,12 +262,7 @@ emul_add_tree_options(device *tree, if (tree_find_property(tree, "/options/little-endian?")) little_endian = tree_find_boolean_property(tree, "/options/little-endian?"); else { -#ifdef bfd_little_endian /* new bfd */ little_endian = (image != NULL && bfd_little_endian(image)); -#else - little_endian = (image != NULL && - !image->xvec->byteorder_big_p); -#endif tree_parse(tree, "/options/little-endian? %s", little_endian ? "true" : "false"); } |