[PATCH 1/2] gas: fix .dwsect generation for XCOFF

CHIGOT, CLEMENT clement.chigot@atos.net
Thu Apr 29 08:45:59 GMT 2021


On XCOFF, .dwsect must generate both a section and a symbol
representing this section.
These symbols have a x_sect auxialiry entry and must be right
after the C_FILE symbol in the symbol table. Moreover, as long
as the section is present in the output, the symbol must be there.

bfd/ChangeLog:
2021-04-27  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.

gas/ChangeLog:
2021-04-27  Clément Chigot  <clement.chigot@atos.net>

	* 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/ChangeLog:
2021-04-27  Clément Chigot  <clement.chigot@atos.net>

	* coff/internal.h (C_DWARF): New define.
	* coff/xcoff.h (SSUBTYP_DWLOC, SSUBTYP_DWFRAME,
	SSUBTYP_DWMAC): New defines.

Please, apply if accepted.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gas-fix-.dwsect-generation-for-XCOFF.patch
Type: application/octet-stream
Size: 11897 bytes
Desc: 0001-gas-fix-.dwsect-generation-for-XCOFF.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20210429/721ea455/attachment-0001.obj>


More information about the Binutils mailing list