diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:40 +0300 |
commit | 5d50718e66d9c037dc587a0211110b7d25a66185 (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /tools | |
parent | a6a92afe03e02795227d2641b49819b687f088f8 (diff) | |
download | ydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 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 e53d9510e6..6cda54c1ea 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 d3841fade4..d49ebab307 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 de5b1a3b8c..c3dcd24224 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 074211eae9..9aba1002c5 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 9ea4b9e4bc..51a6b8b426 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 ) |