diff mbox

AIX DWARF 64 bit offset (PR 77349)

Message ID CAGWvnymSmsp1NRgEO0VRcQ0zaYcbpgYe+xw2ZaDkBbS3wL=98Q@mail.gmail.com
State New
Headers show

Commit Message

David Edelsohn Aug. 26, 2016, 11:49 p.m. UTC
The AIX assembler implicitly inserts the length information at the
beginning of DWARF debugging sections.  In 64 bit mode, it also
implicitly inserts the 64 bit DWARF extension escape sequence.  GCC
must emit DWARF offsets with a size that matches the 64 bit extension.

This patch overrides DWARF_OFFSET_SIZE to match the mode.  In 64 bit
mode and with the patch, GCC DWARF information now uses 64 bit offset.

Bootstrapped on powerpc-ibm-aix7.1.0.0.

I plan to install this on trunk, 6-branch and 5-branch.

Thanks, David


PR target/77349
* config/rs6000/xcoff.h (DWARF_OFFSET_SIZE): Define as PTR_SIZE
diff mbox

Patch

Index: xcoff.h
===================================================================
--- xcoff.h     (revision 239789)
+++ xcoff.h     (working copy)
@@ -313,6 +313,9 @@ 
 #define EH_FRAME_THROUGH_COLLECT2 1
 #define EH_TABLES_CAN_BE_READ_ONLY 1

+/* AIX Assembler implicitly assumes DWARF 64 bit extension in 64 bit mode.  */
+#define DWARF_OFFSET_SIZE PTR_SIZE
+
 #define ASM_OUTPUT_DWARF_PCREL(FILE,SIZE,LABEL) \
   rs6000_asm_output_dwarf_pcrel ((FILE), (SIZE), (LABEL));