summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/ELF/binary-input.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objcopy] Add --set-section-alignmentFangrui Song2019-10-021-0/+8
| | | | | | | | | | | | | Fixes PR43181. This option was recently added to GNU objcopy (binutils PR24942). `llvm-objcopy -I binary -O elf64-x86-64 --set-section-alignment .data=8` can set the alignment of .data. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D67656 llvm-svn: 373461
* [llvm-objcopy] Default --output-target to --input-target when unspecifiedFangrui Song2019-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes PR42171. In GNU objcopy, if -O (--output-target) is not specified, the value is copied from -I (--input-target). ``` objcopy -I binary -B i386:x86-64 a.txt b # b is copied from a.txt llvm-objcopy -I binary -B i386:x86-64 a.txt b # b is an x86-64 object file ``` This patch changes our behavior to match GNU. With this change, we can delete code related to -B handling (D67215). Reviewed By: jakehehrlich Differential Revision: https://reviews.llvm.org/D67144 llvm-svn: 371913
* [llvm-objcopy][NFC] Consistenly use two dashes for flags in tests.Jordan Rupprecht2019-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: As pointed out in D53667, our use of hyphens in flags can be inconsistent, mixing `-` with `--`. This change makes all long style flags use `--`. Automatically changed via: ``` find test/tools/llvm-objcopy/ELF -type f | xargs sed -i 's/ -\([a-zA-Z]\{3\}\)/ --\1/g' ``` Two false positives were manually fixed/reverted. Reviewers: jhenderson, espindola, alexshap Reviewed By: jhenderson Subscribers: emaste, javed.absar, arichardson, fedor.sergeev, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D56513 llvm-svn: 350944
* [llvm-objcopy][ELF] Implement a mutable section visitor that updates ↵Jordan Rupprecht2019-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | size-related fields (Size, EntrySize, Align) before layout. Summary: Fix EntrySize, Size, and Align before doing layout calculation. As a side cleanup, this removes a dependence on sizeof(Elf_Sym) within BinaryReader, so we can untemplatize that. This unblocks a cleaner implementation of handling the -O<format> flag. See D53667 for a previous attempt. Actual implementation of the -O<format> flag will come in an upcoming commit, this is largely a NFC (although not _totally_ one, because alignment on binary input was actually wrong before). Reviewers: jakehehrlich, jhenderson, alexshap, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D56211 llvm-svn: 350336
* [llvm-objcopy] Move elf-specific tests into subfolderAlexander Shaposhnikov2018-11-301-0/+112
In this diff the elf-specific tests are moved into the subfolder llvm-objcopy/ELF (the change was discussed in the comments on https://reviews.llvm.org/D54674). A separate code reivew wasn't sent for this change since Phabricator is failing to create such a large diff. Test plan: make check-all make check-llvm-tools make check-llvm-tools-llvm-objcopy llvm-svn: 347958
OpenPOWER on IntegriCloud