Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: tools/relocation_packer/src/leb128.h

Issue 404553003: Create builds configured for ARM and AARCH64. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Purge unused includes. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/relocation_packer/src/leb128.h
diff --git a/tools/relocation_packer/src/leb128.h b/tools/relocation_packer/src/leb128.h
index d7bdb4c085e5999bfce499fcc74733b82bbe8476..500845e09c1ee4b5a6f74e27f1066467a03dd7f5 100644
--- a/tools/relocation_packer/src/leb128.h
+++ b/tools/relocation_packer/src/leb128.h
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// LEB128 encoder and decoder for packed R_ARM_RELATIVE relocations.
+// LEB128 encoder and decoder for packed ARM relative relocations.
//
-// Run-length encoded R_ARM_RELATIVE relocations consist of a large number
+// Run-length encoded ARM relative relocations consist of a large number
// of pairs of relatively small positive integer values. Encoding these as
// LEB128 saves space.
//
@@ -14,9 +14,10 @@
#define TOOLS_RELOCATION_PACKER_SRC_LEB128_H_
#include <stdint.h>
-#include <unistd.h>
#include <vector>
+#include "elf_traits.h"
+
namespace relocation_packer {
// Encode packed words as a LEB128 byte stream.
@@ -28,11 +29,11 @@ class Leb128Encoder {
// Add a value to the encoding stream.
// |value| is the unsigned int to add.
- void Enqueue(uint32_t value);
+ void Enqueue(ELF::Xword value);
// Add a vector of values to the encoding stream.
// |values| is the vector of unsigned ints to add.
- void EnqueueAll(const std::vector<uint32_t>& values);
+ void EnqueueAll(const std::vector<ELF::Xword>& values);
// Retrieve the encoded representation of the values.
// |encoding| is the returned vector of encoded data.
@@ -54,11 +55,11 @@ class Leb128Decoder {
~Leb128Decoder();
// Retrieve the next value from the encoded stream.
- uint32_t Dequeue();
+ ELF::Xword Dequeue();
// Retrieve all remaining values from the encoded stream.
// |values| is the vector of decoded data.
- void DequeueAll(std::vector<uint32_t>* values);
+ void DequeueAll(std::vector<ELF::Xword>* values);
private:
// Encoded LEB128 stream.

Powered by Google App Engine
This is Rietveld 408576698