OSDN Git Service

[llvm-objcopy] Add support for large indexes
authorJake Ehrlich <jakehehrlich@google.com>
Mon, 16 Jul 2018 19:48:52 +0000 (19:48 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Mon, 16 Jul 2018 19:48:52 +0000 (19:48 +0000)
commit51e4fb6e38bdb07ccbe7c6a33ff92319772c5449
treeeb828a2e0701ff2ad0c4d55b41dc29cc24e04843
parent7d88286b7cff3fd557a90cc031eb8bf4233ef7db
[llvm-objcopy] Add support for large indexes

This patch is an update of an older patch that never landed
(see here: https://reviews.llvm.org/D42516)

Recently various users have run into this issue and it just 100%
has to be solved at this point. The main difference in this patch
is that I use gunzip instead of unzip which should hopefully allow
tests to pass. Please review this as if it is a new patch however.
I found some issues along the way and made some minor modifications.

The binary used in this patch for testing (a zip file to make it small)
can be found here:
https://drive.google.com/file/d/1UjsnTO9edLttZibbr-2T1bJl92KEQFAO/view?usp=sharing

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337204 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/Inputs/many-sections.o.gz [new file with mode: 0644]
test/tools/llvm-objcopy/Inputs/ungzip.py [new file with mode: 0644]
test/tools/llvm-objcopy/auto-remove-shndx.test [new file with mode: 0644]
test/tools/llvm-objcopy/many-sections.test [new file with mode: 0644]
test/tools/llvm-objcopy/remove-shndx.test [new file with mode: 0644]
test/tools/llvm-objcopy/strict-no-add.test [new file with mode: 0644]
tools/llvm-objcopy/Object.cpp
tools/llvm-objcopy/Object.h