From 97834047e13bb9f30430331c27b11412a5ed6950 Mon Sep 17 00:00:00 2001 From: Cl?ment Chigot Date: Fri, 7 May 2021 15:29:49 +0100 Subject: 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. --- bfd/libxcoff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bfd/libxcoff.h') 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 -- cgit v1.1