File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -881,9 +881,10 @@ class DwarfElfStream : public DwarfWriteStream {
881
881
}
882
882
883
883
void u1 (uint8_t value) { stream_->WriteFixed (value); }
884
- void u2 (uint16_t value) { stream_->WriteFixed (value); }
885
- void u4 (uint32_t value) { stream_->WriteFixed (value); }
886
- void u8 (uint64_t value) { stream_->WriteFixed (value); }
884
+ // Can't use WriteFixed for these, as we may not be at aligned positions.
885
+ void u2 (uint16_t value) { stream_->WriteBytes (&value, sizeof (value)); }
886
+ void u4 (uint32_t value) { stream_->WriteBytes (&value, sizeof (value)); }
887
+ void u8 (uint64_t value) { stream_->WriteBytes (&value, sizeof (value)); }
887
888
void string (const char * cstr) { // NOLINT
888
889
stream_->WriteBytes (reinterpret_cast <const uint8_t *>(cstr),
889
890
strlen (cstr) + 1 );
You can’t perform that action at this time.
0 commit comments