Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb fix and rege aarch64



details:   https://anonhg.NetBSD.org/src/rev/182138d79ff9
branches:  trunk
changeset: 1016885:182138d79ff9
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 05 21:27:06 2020 +0000

description:
fix and rege aarch64

diffstat:

 external/gpl3/gdb/bin/Makefile                            |     6 +-
 external/gpl3/gdb/lib/libbfd/Makefile                     |     6 +-
 external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd-in3.h       |  1399 +++++-------
 external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd.h           |  1399 +++++-------
 external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd_stdint.h    |     4 +-
 external/gpl3/gdb/lib/libbfd/arch/aarch64/bfdver.h        |     8 +-
 external/gpl3/gdb/lib/libbfd/arch/aarch64/config.h        |    16 +-
 external/gpl3/gdb/lib/libbfd/arch/aarch64/defs.mk         |     6 +-
 external/gpl3/gdb/lib/libbfd/arch/aarch64/targmatch.h     |   160 +-
 external/gpl3/gdb/lib/libdecnumber/arch/aarch64/config.h  |    55 +-
 external/gpl3/gdb/lib/libdecnumber/arch/aarch64/gstdint.h |     4 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/config.h        |    83 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/defs.mk         |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/init.c          |   116 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/jit-reader.h    |     4 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/version.c       |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/aarch64/xml-builtin.c   |    23 +-
 external/gpl3/gdb/lib/libiberty/arch/aarch64/defs.mk      |     4 +-
 external/gpl3/gdb/lib/libopcodes/arch/aarch64/config.h    |     8 +-
 external/gpl3/gdb/lib/libreadline/arch/aarch64/config.h   |    55 +-
 external/gpl3/gdb/lib/libreadline/arch/aarch64/defs.mk    |     6 +-
 21 files changed, 1608 insertions(+), 1766 deletions(-)

diffs (truncated from 5260 to 300 lines):

diff -r 8f9db75466f6 -r 182138d79ff9 external/gpl3/gdb/bin/Makefile
--- a/external/gpl3/gdb/bin/Makefile    Sat Dec 05 21:26:43 2020 +0000
+++ b/external/gpl3/gdb/bin/Makefile    Sat Dec 05 21:27:06 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2011/10/09 01:59:31 christos Exp $
+#      $NetBSD: Makefile,v 1.3 2020/12/05 21:27:06 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -9,7 +9,9 @@
 SUBDIR+= gdbtui
 .endif
 
-#SUBDIR+= gdbserver
+.if ${MACHINE} == "amd64"
+SUBDIR+= gdbserver
+.endif
 
 .if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
     ${MACHINE_ARCH} == powerpc64
diff -r 8f9db75466f6 -r 182138d79ff9 external/gpl3/gdb/lib/libbfd/Makefile
--- a/external/gpl3/gdb/lib/libbfd/Makefile     Sat Dec 05 21:26:43 2020 +0000
+++ b/external/gpl3/gdb/lib/libbfd/Makefile     Sat Dec 05 21:27:06 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2020/09/17 02:17:51 christos Exp $
+#      $NetBSD: Makefile,v 1.11 2020/12/05 21:27:06 christos Exp $
 
 .include <bsd.own.mk>
 .include "../Makefile.inc"
@@ -59,6 +59,10 @@
        ${_MKTARGET_CREATE}
        ${TOOL_SED} -e s/NN/64/g < $> > $@
 
+elf32-aarch64.c: elfnn-aarch64.c
+       ${_MKTARGET_CREATE}
+       ${TOOL_SED} -e s/NN/32/g < $> > $@
+
 peigen.c: peXXigen.c
        ${_MKTARGET_CREATE}
        ${TOOL_SED} -e s/XX/pe/g < $> > $@
diff -r 8f9db75466f6 -r 182138d79ff9 external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd-in3.h
--- a/external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd-in3.h       Sat Dec 05 21:26:43 2020 +0000
+++ b/external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd-in3.h       Sat Dec 05 21:27:06 2020 +0000
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
@@ -11,7 +11,7 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2019 Free Software Foundation, Inc.
+   Copyright (C) 1990-2020 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -248,27 +248,11 @@
 
 #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
 
-/* 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           \
-   ? bfd_target_unknown_flavour                        \
-   : bfd_asymbol_bfd (x)->xvec->flavour)
-
 /* A canonical archive symbol.  */
 /* This is a type pun with struct ranlib on purpose!  */
 typedef struct carsym
 {
-  char *name;
+  const char *name;
   file_ptr file_offset;        /* Look here to find the file.  */
 }
 carsym;                        /* To make these you call a carsymogen.  */
@@ -312,37 +296,6 @@
   ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this))             \
    ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
    : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
-                                            (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec)                 \
-  ((bfd)->direction != write_direction && (sec)->rawsize != 0  \
-   ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC.  */
-#define bfd_get_section_limit(bfd, sec) \
-  (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded.  */
-#define discarded_section(sec)                         \
-  (!bfd_is_abs_section (sec)                                   \
-   && bfd_is_abs_section ((sec)->output_section)               \
-   && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE              \
-   && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
 
 typedef enum bfd_print_symbol
 {
@@ -529,40 +482,6 @@
 #endif
 extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
-/* Cast from const char * to char * so that caller can assign to
-   a char * without a warning.  */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
-  (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
-   bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
-  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
-  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
 extern bfd_boolean bfd_cache_close
   (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
@@ -601,195 +520,6 @@
 bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
 void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
 
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
-  (struct bfd_section *, struct bfd_section_already_linked *,
-   struct bfd_link_info *);
-
-/* Externally visible ECOFF routines.  */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
-  (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
-  (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
-   unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
-  (bfd *output_bfd, struct ecoff_debug_info *output_debug,
-   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
-  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
-  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
-   struct ecoff_debug_info *input_debug,
-   const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
-  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
-   struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
-  (bfd *abfd, struct ecoff_debug_info *debug,
-   const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
-   bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
-   void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
-  (bfd *abfd, struct ecoff_debug_info *debug,
-   const struct ecoff_debug_swap *swap, const char *name,
-   struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
-  (bfd *abfd, struct ecoff_debug_info *debug,
-   const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
-  (bfd *abfd, struct ecoff_debug_info *debug,
-   const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
-  (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
-   const struct ecoff_debug_swap *swap,
-   struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines.  */
-
-struct bfd_link_needed_list
-{
-  struct bfd_link_needed_list *next;
-  bfd *by;
-  const char *name;
-};
-
-enum dynamic_lib_link_class {
-  DYN_NORMAL = 0,
-  DYN_AS_NEEDED = 1,
-  DYN_DT_NEEDED = 2,
-  DYN_NO_ADD_NEEDED = 4,
-  DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
-  notice_as_needed,
-  notice_not_needed,
-  notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
-  (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
-   bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
-  (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
-  (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
-                                              const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
-  (bfd *, const char *, const char *, const char *, const char *, const char *,
-   const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
-  (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
-  (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
-  (bfd *);
-extern void bfd_elf_set_dyn_lib_class
-  (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
-  (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
-  (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
-  (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
-  (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
-   copy of ABFD's program header table entries.  Return -1 if an error
-   occurs; bfd_get_error will return an appropriate code.  */
-extern long bfd_get_elf_phdr_upper_bound
-  (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS.  The entries
-   will be stored as an array of Elf_Internal_Phdr structures, as
-   defined in include/elf/internal.h.  To find out how large the
-   buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
-   Return the number of program header table entries read, or -1 if an
-   error occurs; bfd_get_error will return an appropriate code.  */
-extern int bfd_get_elf_phdrs
-  (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr.  Rather than opening a file,
-   reconstruct an ELF file by reading the segments out of remote



Home | Main Index | Thread Index | Old Index