aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.cc
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2024-06-28 00:33:31 +0100
committerMark Harmstone <mark@harmstone.com>2024-07-13 21:53:39 +0100
commit800e06c4b2635d1b709625ec2830c6c5594c6988 (patch)
treed7105ddb9a357c6f5c1424e21cd7945a168dd3ef /gcc/dwarf2codeview.cc
parent45a4f3425e91b2197c54213d60ee302be3babb8a (diff)
downloadgcc-800e06c4b2635d1b709625ec2830c6c5594c6988.zip
gcc-800e06c4b2635d1b709625ec2830c6c5594c6988.tar.gz
gcc-800e06c4b2635d1b709625ec2830c6c5594c6988.tar.bz2
Make sure CodeView symbols are aligned
CodeView symbols have to be multiples of four bytes; add an alignment directive to write_data_symbol to ensure this. Note that these can be zeroes, so we can rely on GAS to do this for us; it's only types that need f3, f2, f1 values. gcc/ * dwarf2codeview.cc (write_data_symbol): Add alignment directive.
Diffstat (limited to 'gcc/dwarf2codeview.cc')
-rw-r--r--gcc/dwarf2codeview.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/dwarf2codeview.cc b/gcc/dwarf2codeview.cc
index 71049cc..5a33b43 100644
--- a/gcc/dwarf2codeview.cc
+++ b/gcc/dwarf2codeview.cc
@@ -958,6 +958,8 @@ write_data_symbol (codeview_symbol *s)
ASM_OUTPUT_ASCII (asm_out_file, s->data_symbol.name,
strlen (s->data_symbol.name) + 1);
+ ASM_OUTPUT_ALIGN (asm_out_file, 2);
+
targetm.asm_out.internal_label (asm_out_file, SYMBOL_END_LABEL, label_num);
end: