From 85645aed8531ad9723f328e2ebdd66272acde0e2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 May 2011 07:58:36 +0000 Subject: bfd 2011-05-18 Tristan Gingold * libxcoff.h (struct xcoff_dwsect_name): New type. (XCOFF_DWSECT_NBR_NAMES): New macro. (xcoff_dwsect_names): Declare. * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections. (styp_to_sec_flags): Ditto. (coff_new_section_hook): Ditto. (coff_slurp_symbol_table): Handle C_DWARF and C_INFO. * coff-rs6000.c (xcoff_dwsect_name): New variable. gas 2011-05-18 Tristan Gingold * config/tc-ppc.h (ppc_tc_sy): Reorder fields. Put size into an union with dw. (OBJ_COPY_SYMBOL_ATTRIBUTES): Adjust. (ppc_xcoff_end): Declare. (md_end): Define. * config/tc-ppc.c: Add includes for xcoff. (ppc_dwsect): New function. (md_pseudo_table): Add dwsect. (struct dw_subsection): New. (dw_sections): New. (ppc_change_debug_section): New function. (ppc_xcoff_end): Ditto. (ppc_function): Adjust for ppc_tc_sy. (ppc_symbol_new_hook): Ditto. (ppc_frob_symbol): Ditto. (ppc_frob_section): Do not set vma for debug sections. (ppc_fix_adjustable): Return true for debug sections. * config/obj-coff.c: Add includes for xcoff. (coff_frob_section): Handle dwarf section. gas/testsuite 2011-05-18 Tristan Gingold * gas/ppc/xcoff-dwsect-1-32.d: New test. * gas/ppc/xcoff-dwsect-1-64.d: Ditto. * gas/ppc/xcoff-dwsect-1.s: New file. * gas/ppc/aix.exp (do_align_test): Add tests. --- bfd/libxcoff.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bfd/libxcoff.h') diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h index 3900dd3..53a5e72 100644 --- a/bfd/libxcoff.h +++ b/bfd/libxcoff.h @@ -235,4 +235,26 @@ bfd_boolean xcoff_reloc_type_toc (XCOFF_RELOC_FUNCTION_ARGS); bfd_boolean xcoff_reloc_type_ba (XCOFF_RELOC_FUNCTION_ARGS); bfd_boolean xcoff_reloc_type_crel (XCOFF_RELOC_FUNCTION_ARGS); +/* Structure to describe dwarf sections. + Useful to convert from XCOFF section name to flag and vice-versa. + Also mark if section has a length field at the beginning. */ +struct xcoff_dwsect_name { + /* A XCOFF dwarf section is identified by its name. */ + unsigned int flag; + + /* Corresponding XCOFF section name. */ + const char *name; + + /* True if size must be prepended. */ + bfd_boolean def_size; +}; + +/* 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 + +/* The dwarf sections array. */ +extern const struct xcoff_dwsect_name + xcoff_dwsect_names[XCOFF_DWSECT_NBR_NAMES]; + #endif /* LIBXCOFF_H */ -- cgit v1.1