Move some utility functions to linker_utils

Also adds unit-tests for page_start, page_offset, and safe_add

Change-Id: Ia1325b4682d367328a01599a19848e4ffcd2c0ea
This commit is contained in:
Dmitriy Ivanov
2015-11-20 13:34:11 -08:00
committed by Dimitry Ivanov
parent a1ab0d8ed1
commit 84bab5a955
4 changed files with 46 additions and 20 deletions

View File

@@ -24,4 +24,8 @@ bool normalize_path(const char* path, std::string* normalized_path);
bool file_is_in_dir(const std::string& file, const std::string& dir);
bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path);
off64_t page_start(off64_t offset);
size_t page_offset(off64_t offset);
bool safe_add(off64_t* out, off64_t a, size_t b);
#endif