summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-31 21:46:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-31 21:46:33 +0000
commitde2a469b6c9269f4902f29af40d449a8ea47ebea (patch)
tree557e294687e2f5289a5c930222276d43284c6f02
parent82e6121830d1d0c8001677f9385cf155cd989bb5 (diff)
downloadgcc-de2a469b6c9269f4902f29af40d449a8ea47ebea.tar.gz
* dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5.
(DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241725 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cdb09d22a4b..b862943e274 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-31 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5.
+ (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Likewise.
+
2016-10-31 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (dwarf_AT): Handle DW_AT_dwo_name.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 8259ae0cfe8..a6da7a314ee 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2983,12 +2983,15 @@ skeleton_chain_node;
/* Fixed size portion of the DWARF compilation unit header. */
#define DWARF_COMPILE_UNIT_HEADER_SIZE \
- (DWARF_INITIAL_LENGTH_SIZE + DWARF_OFFSET_SIZE + 3)
+ (DWARF_INITIAL_LENGTH_SIZE + DWARF_OFFSET_SIZE \
+ + (dwarf_version >= 5 \
+ ? 4 + DWARF_TYPE_SIGNATURE_SIZE + DWARF_OFFSET_SIZE : 3))
/* Fixed size portion of the DWARF comdat type unit header. */
#define DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE \
- (DWARF_COMPILE_UNIT_HEADER_SIZE + DWARF_TYPE_SIGNATURE_SIZE \
- + DWARF_OFFSET_SIZE)
+ (DWARF_COMPILE_UNIT_HEADER_SIZE \
+ + (dwarf_version >= 5 \
+ ? 0 : DWARF_TYPE_SIGNATURE_SIZE + DWARF_OFFSET_SIZE))
/* Fixed size portion of public names info. */
#define DWARF_PUBNAMES_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 2)