diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /tools | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/archiver/main.cpp | 10 | ||||
-rw-r--r-- | tools/fix_elf/patch.cpp | 64 | ||||
-rw-r--r-- | tools/fix_elf/patch.h | 2 | ||||
-rw-r--r-- | tools/rescompressor/main.cpp | 10 | ||||
-rw-r--r-- | tools/ya.make | 10 |
5 files changed, 48 insertions, 48 deletions
diff --git a/tools/archiver/main.cpp b/tools/archiver/main.cpp index 6cda54c1ea..e53d9510e6 100644 --- a/tools/archiver/main.cpp +++ b/tools/archiver/main.cpp @@ -130,11 +130,11 @@ namespace { void DoFinish() override { *Out_ << Base_ << "Size:\ndd " << Count_ << '\n'; - - *Out_ << "%ifidn __OUTPUT_FORMAT__,elf64\n"; - *Out_ << "size " << Base_ << " " << Count_ << "\n"; - *Out_ << "size " << Base_ << "Size 4\n"; - *Out_ << "%endif\n"; + + *Out_ << "%ifidn __OUTPUT_FORMAT__,elf64\n"; + *Out_ << "size " << Base_ << " " << Count_ << "\n"; + *Out_ << "size " << Base_ << "Size 4\n"; + *Out_ << "%endif\n"; } void DoWrite(const void* data, size_t len) override { diff --git a/tools/fix_elf/patch.cpp b/tools/fix_elf/patch.cpp index d49ebab307..d3841fade4 100644 --- a/tools/fix_elf/patch.cpp +++ b/tools/fix_elf/patch.cpp @@ -6,43 +6,43 @@ #include <util/generic/hash.h> #include <util/stream/null.h> #include <util/string/cast.h> -#include <util/system/defaults.h> +#include <util/system/defaults.h> namespace NElf { bool IsElf(const TString& path) { TUnbufferedFileInput in(path); - char buffer[EI_NIDENT]; - size_t nread = in.Load(buffer, sizeof(buffer)); - - if (nread != sizeof(buffer) || TStringBuf(buffer, SELFMAG) != ELFMAG) { - Cerr << "fix_elf skip " << path << " (not an ELF file)"; - return false; - } - - if (buffer[EI_CLASS] != ELFCLASS64) { - Cerr << "fix_elf skip " << path << " (ELF class is not ELF64)"; - return false; - } - -#ifdef _little_endian_ - if (buffer[EI_DATA] != ELFDATA2LSB) { - Cerr << "fix_elf skip " << path << " (ELF byte order is not native LSB)"; - return false; - } -#else - if (buffer[EI_DATA] != ELFDATA2MSB) { - Cerr << "fix_elf skip " << path << " (ELF byte order is not native MSB)"; - return false; - } -#endif - - if (buffer[EI_VERSION] != 1) { - Cerr << "fix_elf skip " << path << " (ELF version is not 1)"; - return false; - } - - return true; + char buffer[EI_NIDENT]; + size_t nread = in.Load(buffer, sizeof(buffer)); + + if (nread != sizeof(buffer) || TStringBuf(buffer, SELFMAG) != ELFMAG) { + Cerr << "fix_elf skip " << path << " (not an ELF file)"; + return false; + } + + if (buffer[EI_CLASS] != ELFCLASS64) { + Cerr << "fix_elf skip " << path << " (ELF class is not ELF64)"; + return false; + } + +#ifdef _little_endian_ + if (buffer[EI_DATA] != ELFDATA2LSB) { + Cerr << "fix_elf skip " << path << " (ELF byte order is not native LSB)"; + return false; + } +#else + if (buffer[EI_DATA] != ELFDATA2MSB) { + Cerr << "fix_elf skip " << path << " (ELF byte order is not native MSB)"; + return false; + } +#endif + + if (buffer[EI_VERSION] != 1) { + Cerr << "fix_elf skip " << path << " (ELF version is not 1)"; + return false; + } + + return true; } } // namespace NElf diff --git a/tools/fix_elf/patch.h b/tools/fix_elf/patch.h index c3dcd24224..de5b1a3b8c 100644 --- a/tools/fix_elf/patch.h +++ b/tools/fix_elf/patch.h @@ -23,7 +23,7 @@ public: Map.Map(0, Map.Length()); Begin = reinterpret_cast<char*>(Map.Ptr()); - if (Map.Length() < static_cast<i64>(sizeof(Elf64_Ehdr)) || TStringBuf(Begin, SELFMAG) != ELFMAG) { + if (Map.Length() < static_cast<i64>(sizeof(Elf64_Ehdr)) || TStringBuf(Begin, SELFMAG) != ELFMAG) { ythrow yexception() << path << " is not an ELF file"; } } diff --git a/tools/rescompressor/main.cpp b/tools/rescompressor/main.cpp index 9aba1002c5..074211eae9 100644 --- a/tools/rescompressor/main.cpp +++ b/tools/rescompressor/main.cpp @@ -42,12 +42,12 @@ private: } void WriteSymbolSize(TStringBuf constname) { - AsmOut << "%ifidn __OUTPUT_FORMAT__,elf64\n"; + AsmOut << "%ifidn __OUTPUT_FORMAT__,elf64\n"; AsmOut << "size " << AsmPrefix << constname << " " << AsmPrefix << constname << ".end - " << AsmPrefix << constname << "\n"; - AsmOut << "size " << AsmPrefix << constname << "Size 4\n"; - AsmOut << "%endif\n"; - } - + AsmOut << "size " << AsmPrefix << constname << "Size 4\n"; + AsmOut << "%endif\n"; + } + void WriteIncBin(TStringBuf constname, TStringBuf filename, const TString& data) { AsmOut << AsmPrefix << constname << ":\nincbin \"" << Basename(filename) << "\"\n"; AsmOut << ".end:\n"; diff --git a/tools/ya.make b/tools/ya.make index 51a6b8b426..9ea4b9e4bc 100644 --- a/tools/ya.make +++ b/tools/ya.make @@ -11,13 +11,13 @@ RECURSE( bstr c++filt calendar_extractor - check_formula_md5 + check_formula_md5 check_json check_yaml checktrigrams clustermaster coldiff - compress + compress convert2html cproxy crc32 @@ -34,7 +34,7 @@ RECURSE( drawrichtree dsindexer easyparser - enforce_fsync + enforce_fsync enum_parser event2cpp fast_diff @@ -163,7 +163,7 @@ RECURSE( trie_ops/lib trie_ops/tests trigram_index_print - uc + uc unpackrichtree unpackrrr unpack_staff_cert @@ -177,7 +177,7 @@ RECURSE( wizard_yt ygetparam ylzocat - yson_pp + yson_pp zk_client idx_print ) |