diff options
author | Cl?ment Chigot <clement.chigot@atos.net> | 2021-05-07 15:29:49 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-05-07 15:29:49 +0100 |
commit | 97834047e13bb9f30430331c27b11412a5ed6950 (patch) | |
tree | 99f794403e03440f9ed501fed952517bf98a4e9e /bfd | |
parent | 3ecc00ec9cbb7a35d6e58bf86fddaa33126a479a (diff) | |
download | gdb-97834047e13bb9f30430331c27b11412a5ed6950.zip gdb-97834047e13bb9f30430331c27b11412a5ed6950.tar.gz gdb-97834047e13bb9f30430331c27b11412a5ed6950.tar.bz2 |
Fix .dwsect generation for XCOFF. Handle .function generated with DWARF on XCOFF.
gas * config/tc-ppc.c (ppc_function): Update comment for
fifth argument.
(ppc_frob_symbol): Remove ppc_last_function check.
Make sure coff_last_function is reset.
Correctly set fsize when not provided in .function.
* testsuite/gas/ppc/aix.exp: New tests.
* testsuite/gas/ppc/xcoff-function-1-32.d: New test.
* testsuite/gas/ppc/xcoff-function-1-64.d: New test.
* testsuite/gas/ppc/xcoff-function-1.s: New test.
bfd * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
sections.
* coffgen.c (coff_pointerize_aux): Handle C_DWARF.
(coff_print_symbol): Likewise.
* libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
gas * config/obj-coff.c (coff_frob_symbol): Don't skip C_DWARF.
(coff_adjust_section_syms): Use corrext auxent for C_DWARF.
(coff_frob_section): Likewise.
* config/obj-coff.h (SA_GET_SECT_SCNLEN,
SA_GET_SECT_NRELOC, SA_SET_SECT_SCNLEN,
SA_SET_SECT_NRELOC) New defines.
(SET_SECTION_RELOCS): Adjust for C_DWARF.
* config/tc-ppc.c (ppc_frob_symbol): Don't skip C_DWARF.
(ppc_adjust_symtab): Reorder C_DWARF symbols.
* testsuite/gas/ppc/aix.exp: New tests.
* testsuite/gas/ppc/xcoff-dwsect-2-32.d: New test.
* testsuite/gas/ppc/xcoff-dwsect-2-64.d: New test.
* testsuite/gas/ppc/xcoff-dwsect-2.s: New test.
include * coff/internal.h (C_DWARF): New define.
* coff/xcoff.h (SSUBTYP_DWLOC, SSUBTYP_DWFRAME,
SSUBTYP_DWMAC): New defines.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/coff-rs6000.c | 5 | ||||
-rw-r--r-- | bfd/coffgen.c | 8 | ||||
-rw-r--r-- | bfd/libxcoff.h | 2 |
4 files changed, 21 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dd517a9..e0a1e23 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2021-05-07 Clément Chigot <clement.chigot@atos.net> + + * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF + sections. + * coffgen.c (coff_pointerize_aux): Handle C_DWARF. + (coff_print_symbol): Likewise. + * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update. + 2021-05-07 Jan Beulich <jbeulich@suse.com> * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 0745421..45ba9b3 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -4265,7 +4265,10 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = { { SSUBTYP_DWARNGE, ".dwarnge", true }, { SSUBTYP_DWABREV, ".dwabrev", false }, { SSUBTYP_DWSTR, ".dwstr", true }, - { SSUBTYP_DWRNGES, ".dwrnges", true } + { SSUBTYP_DWRNGES, ".dwrnges", true }, + { SSUBTYP_DWLOC, ".dwloc", true }, + { SSUBTYP_DWFRAME, ".dwframe", true }, + { SSUBTYP_DWMAC, ".dwmac", true } }; /* For generic entry points. */ diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 4e14243..b13e773 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1527,6 +1527,8 @@ coff_pointerize_aux (bfd *abfd, return; if (n_sclass == C_FILE) return; + if (n_sclass == C_DWARF) + return; BFD_ASSERT (! auxent->is_sym); /* Otherwise patch up. */ @@ -2123,6 +2125,12 @@ coff_print_symbol (bfd *abfd, fprintf (file, "File "); break; + case C_DWARF: + fprintf (file, "AUX scnlen 0x%lx nreloc %ld", + (unsigned long) auxp->u.auxent.x_sect.x_scnlen, + auxp->u.auxent.x_sect.x_nreloc); + break; + case C_STAT: if (combined->u.syment.n_type == T_NULL) /* Probably a section symbol ? */ diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h index cca9c21..2eeb503 100644 --- a/bfd/libxcoff.h +++ b/bfd/libxcoff.h @@ -252,7 +252,7 @@ struct xcoff_dwsect_name { /* Number of entries in the array. The number is known and public so that user can 'extend' this array by index. */ -#define XCOFF_DWSECT_NBR_NAMES 8 +#define XCOFF_DWSECT_NBR_NAMES 11 /* The dwarf sections array. */ extern const struct xcoff_dwsect_name |