summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/COFF
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objcopy][NFC] Use generated object file in COFF/add-section.testSergey Dmitriev2019-11-153-13/+6
| | | | | | Updated LIT test from D70205 to use generated object file with extended relocation table. Differential Revision: https://reviews.llvm.org/D70269
* [llvm-objcopy][COFF] Add support for extended relocation tablesSergey Dmitriev2019-11-142-0/+32
| | | | | | | | | | | | | | Summary: This patch adds support for COFF objects with extended relocation tables to the llvm-objcopy tool. Reviewers: jhenderson, MaskRay, mstorsjo, alexshap, rupprecht Reviewed By: mstorsjo Subscribers: jakehehrlich, abrachet, seiya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70205
* [llvm-objcopy][COFF] Implement --redefine-sym and --redefine-symsFangrui Song2019-11-121-0/+69
| | | | | | | | | | | | | The parsing error tests in ELF/redefine-symbols.test are not specific to ELF. Move them to redefine-symbols.test. Add COFF/redefine-symbols.test for COFF specific tests. Also fix the documentation regarding --redefine-syms: the old and new names are separated by whitespace, not an equals sign. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D70036
* [llvm-objcopy] Improve --add-section argument string parsingSergey Dmitriev2019-07-291-4/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D65346 llvm-svn: 367236
* [llvm-objcopy] Add support for --add-section for COFFSergey Dmitriev2019-07-261-0/+56
| | | | | | | | This patch enables support for --add-section=... option for COFF objects. Differential Revision: https://reviews.llvm.org/D65040 llvm-svn: 367130
* [llvm-objcopy] Tidy up error messagesJames Henderson2019-05-223-3/+3
| | | | | | | | | | | | | | This patch brings various error messages into line with each other, by removing trailing full stops, and making the first letter lower-case. This addresses https://bugs.llvm.org/show_bug.cgi?id=40859. Reviewed by: jhenderson, rupprecht, jakehehrlich Differential Revision: https://reviews.llvm.org/D62072 Patch by Alex Brachet llvm-svn: 361384
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-013-5/+5
| | | | | | | | | | We use both -long-option and --long-option in tests. Switch to --long-option for consistency. In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf. While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf). llvm-svn: 359649
* [llvm-strip] Hook up (unimplemented) --only-keep-debugJordan Rupprecht2019-03-141-0/+4
| | | | | | | | For ELF, we accept but ignore --only-keep-debug. Do the same for llvm-strip. COFF does implement this, so update the test that it is supported. llvm-svn: 356207
* [llvm-objcopy] Add --strip-unneeded-symbol(s)Eugene Leviant2019-02-131-0/+7
| | | | | | Differential revision: https://reviews.llvm.org/D58027 llvm-svn: 353919
* [llvm-objcopy] [COFF] Fix handling of aux symbols for big objectsMartin Storsjo2019-01-232-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | The aux symbols were stored in an opaque std::vector<uint8_t>, with contents interpreted according to the rest of the symbol. All aux symbol types but one fit in 18 bytes (sizeof(coff_symbol16)), and if written to a bigobj, two extra padding bytes are written (as sizeof(coff_symbol32) is 20). In the storage agnostic intermediate representation, store the aux symbols as a series of coff_symbol16 sized opaque blobs. (In practice, all such aux symbols only consist of one aux symbol, so this is more flexible than what reality needs.) The special case is the file aux symbols, which are written in potentially more than one aux symbol slot, without any padding, as one single long string. This can't be stored in the same opaque vector of fixed sized aux symbol entries. The file aux symbols will occupy a different number of aux symbol slots depending on the type of output object file. As nothing in the intermediate process needs to have accurate raw symbol indices, updating that is moved into the writer class. Differential Revision: https://reviews.llvm.org/D57009 llvm-svn: 351947
* [llvm-objcopy] [COFF] Remove testcase debugging lines. NFC.Martin Storsjo2019-01-231-6/+0
| | | | | | | These are no longer necessary as the testcase now seems to run fine on the buildbots that previously failed on this case, after SVN r351934. llvm-svn: 351946
* Reapply: [llvm-objcopy] [COFF] Implement --add-gnu-debuglinkMartin Storsjo2019-01-231-0/+48
| | | | | | | | | | | This was reverted since it broke a couple buildbots. The reason for the breakage is not yet known, but this time, the test has got more diagnostics added, to hopefully allow figuring out what goes wrong. Differential Revision: https://reviews.llvm.org/D57007 llvm-svn: 351931
* Revert "[llvm-objcopy] [COFF] Implement --add-gnu-debuglink"Martin Storsjo2019-01-221-42/+0
| | | | | | | This reverts commit r351801, as it caused errors on (so far) ppc64be and aarch64 buildbots - the reason is yet unknown. llvm-svn: 351811
* [llvm-objcopy] [COFF] Implement --add-gnu-debuglinkMartin Storsjo2019-01-221-0/+42
| | | | | | Differential Revision: https://reviews.llvm.org/D57007 llvm-svn: 351801
* [llvm-objcopy] [COFF] Update symbol indices in weak externalsMartin Storsjo2019-01-221-0/+49
| | | | | | Differential Revision: https://reviews.llvm.org/D57006 llvm-svn: 351800
* [llvm-objcopy] Consistently use createStringError instead of ↵Martin Storsjo2019-01-221-1/+1
| | | | | | | | | | | | make_error<StringError> This was requested in the review of D57006. Also add missing quotes around symbol names in error messages. Differential Revision: https://reviews.llvm.org/D57014 llvm-svn: 351799
* [llvm-objcopy] [COFF] Implement --only-sectionMartin Storsjo2019-01-191-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D56873 llvm-svn: 351663
* [llvm-objcopy] [COFF] Implement --only-keep-debugMartin Storsjo2019-01-192-0/+135
| | | | | | Differential Revision: https://reviews.llvm.org/D56840 llvm-svn: 351662
* [llvm-objcopy] [COFF] Implement --strip-debugMartin Storsjo2019-01-191-0/+109
| | | | | | | | | Also remove sections similarly for --strip-all, --discard-all, --strip-unneeded. Differential Revision: https://reviews.llvm.org/D56839 llvm-svn: 351661
* [llvm-objcopy] [COFF] Add support for removing sectionsMartin Storsjo2019-01-191-0/+210
| | | | | | Differential Revision: https://reviews.llvm.org/D56683 llvm-svn: 351660
* [llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC.Martin Storsjo2019-01-191-0/+64
| | | | | | | | | | The debug directory contains the rwa file address of itself, which is updated on write. Add a testcase for this existing functionality. Differential Revision: https://reviews.llvm.org/D56876 llvm-svn: 351659
* [llvm-objcopy] [COFF] Rename a test from .yaml to .test. NFC.Martin Storsjo2019-01-191-0/+0
| | | | | | | Tests named .yaml aren't executed by default in this directory (while they are within e.g. LLD). llvm-svn: 351657
* [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbolsMartin Storsjo2019-01-151-0/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D56481 llvm-svn: 351174
* [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.Martin Storsjo2019-01-152-30/+30
| | | | llvm-svn: 351173
* [llvm-objcopy] [COFF] Remove unreferenced undefined externals with ↵Martin Storsjo2019-01-143-1/+12
| | | | | | | | --strip-unneeded. Differential Revision: https://reviews.llvm.org/D56660 llvm-svn: 351099
* [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and ↵Martin Storsjo2019-01-143-0/+8
| | | | | | | | --discard-all. NFC. Differential Revision: https://reviews.llvm.org/D56659 llvm-svn: 351098
* [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for ↵Martin Storsjo2019-01-113-0/+84
| | | | | | | | symbols Differential Revision: https://reviews.llvm.org/D56480 llvm-svn: 350927
* [llvm-objcopy] [COFF] Fix writing object files without symbols/string tableMartin Storsjo2019-01-112-0/+17
| | | | | | | | | | Previously, this was broken - by setting PointerToSymbolTable to zero but still actually writing the string table length, the object file header was corrupted. Differential Revision: https://reviews.llvm.org/D56584 llvm-svn: 350926
* [llvm-objcopy] [COFF] Fix a test matching pathnames for Windows. NFC.Martin Storsjo2019-01-101-1/+1
| | | | llvm-svn: 350899
* [llvm-objcopy] [COFF] Add support for removing symbolsMartin Storsjo2019-01-103-0/+90
| | | | | | Differential Revision: https://reviews.llvm.org/D55881 llvm-svn: 350893
* [llvm-objcopy] Initial COFF supportMartin Storsjo2018-12-195-0/+754
This is an initial implementation of no-op passthrough copying of COFF with objcopy. Differential Revision: https://reviews.llvm.org/D54939 llvm-svn: 349605
OpenPOWER on IntegriCloud