Dwarf: Ensure block length is encoded correctly
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 25 Sep 2015 10:51:54 +0000 (12:51 +0200)
committerBen Gamari <ben@smart-cactus.org>
Fri, 25 Sep 2015 10:52:04 +0000 (12:52 +0200)
commita0b1f414a459e102f5c3d93bfbf53ebe0d81c467
tree9b01e3cdbef68adcd790c40d45b34770152e86f8
parenta98815a9f11ea467aa96033cb7839d2662a29efc
Dwarf: Ensure block length is encoded correctly

This is supposed to be encoded with ULEB128 which the previous
implementation would only guarranty with short lengths. This likely
holds in nearly all cases, but I'd really rather not take changes.

I fix this using the `.uleb128` directive. I'm not certain that this is
portable across assemblers but it makes this quite straightforward and
at the moment I value correctness over portability.

Test Plan: Compare implementation to DWARF spec

Reviewers: scpmw, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1220
compiler/nativeGen/Dwarf/Types.hs