llvm-project/llvm/tools/llvm-objcopy
James Henderson 9df3883618 [llvm-objcopy] Cache gnu_debuglink's target CRC
.gnu_debuglink section contains information regarding file with
debugging symbols, identified by its CRC32. This target file is not
intended to ever change or it would invalidate the stored checksum, yet
the checksum is calculated over and over again for each of the objects
inside the archive, usually hundreds of times.

This patch precomputes the CRC32 of the target once and then reuses the
value where required, saving lots of redundant I/O.

The error message reported should stay the same, although now it might
be reported earlier.

Reviewed by: jhenderson, jakehehrlich, MaskRay

Differential Revision: https://reviews.llvm.org/D61343

Patch by Michal Janiszewski

llvm-svn: 360661
2019-05-14 10:59:04 +00:00
..
COFF [Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>> 2019-05-14 04:22:51 +00:00
ELF [llvm-objcopy] Cache gnu_debuglink's target CRC 2019-05-14 10:59:04 +00:00
MachO [Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>> 2019-05-14 04:22:51 +00:00
Buffer.cpp [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Buffer.h [llvm-objcopy] Fix crash when writing empty binary output 2019-01-28 15:02:40 +00:00
CMakeLists.txt [llvm-objcopy] Add ability to copy MachO object files 2019-02-02 00:38:07 +00:00
CopyConfig.cpp [llvm-objcopy] Cache gnu_debuglink's target CRC 2019-05-14 10:59:04 +00:00
CopyConfig.h [llvm-objcopy] Cache gnu_debuglink's target CRC 2019-05-14 10:59:04 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjcopyOpts.td [llvm-objcopy] Add --prefix-alloc-sections 2019-05-08 09:49:35 +00:00
StripOpts.td [llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping) 2019-05-02 11:53:02 +00:00
llvm-objcopy.cpp [llvm-objcopy] Improve error message for unrecognised archive member 2019-05-08 13:28:58 +00:00
llvm-objcopy.h Small refactoring of FileError. NFC. 2019-02-11 09:49:37 +00:00