summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/Inputs/COFF
Commit message (Collapse)AuthorAgeFilesLines
* [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.George Rimar2019-07-124-235/+0
| | | | | | | | | | | | | | | test/Object is not correct place to have tests that check obj2yaml functionality, because we have test/tools/obj2yaml folder for that. In this patch I merged a few test cases with their YAMLs from Inputs folder, converted one of binary inputs and moved them to tools/obj2yaml folder. There are still another tests that might need the same, so it is initial step. Differential revision: https://reviews.llvm.org/D64555 llvm-svn: 365891
* [COFF] Gracefully handle empty .drectve sectionsShoaib Meenai2017-05-141-0/+14
| | | | | | | | | | | | | | | | | | Running `llvm-readobj -coff-directives msvcrt.lib` resulted in this error: Invalid data was encountered while parsing the file This happened because some of the object files in the archive have empty `.drectve` sections. These empty sections result in a `parse_failed` error being returned from `COFFObjectFile::getSectionContents()`, which in turn caused `llvm-readobj` to stop. With this change, `getSectionContents` now returns success, and like before the resulting array is empty. Patch by Dave Lee. Differential Revision: https://reviews.llvm.org/D32652 llvm-svn: 303014
* [yaml2obj] Remove --format option in favor of YAML tagsChris Bieneman2016-06-277-5/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that. Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are: !ELF !COFF !mach-o !fat-mach-o I have a corresponding patch that is quite large that fixes up all the in-tree test cases. Reviewers: rafael, Bigcheese, compnerd, silvas Subscribers: compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D21711 llvm-svn: 273915
* llvm-objdump: support dumping AUX records for weak externalsSaleem Abdulrasool2016-05-262-0/+26
| | | | | | | | | | | | This is a support COFF feature. Ensure that we can display the weak externals auxiliary symbol. It contains useful information (such as the default binding and how to resolve the symbol). This reapplies the previous patch with a modification which hopefully should fix the endianness issues. The variadic call would promote the ulittle32_t to a uint32_t which would lose the byte-swapping behaviour desired. llvm-svn: 270813
* Revert "llvm-objdump: support dumping AUX records for weak externals"Saleem Abdulrasool2016-05-251-26/+0
| | | | | | Revert it until we can figure out the endianness issue. llvm-svn: 270667
* test: use a binary file insteadSaleem Abdulrasool2016-05-251-0/+0
| | | | | | | Generate the obj rather than use yaml2obj. Hopefully, this fixes the PPC64 test failures. llvm-svn: 270654
* llvm-objdump: support dumping AUX records for weak externalsSaleem Abdulrasool2016-05-251-0/+26
| | | | | | | | This is a support COFF feature. Ensure that we can display the weak externals auxiliary symbol. It contains useful information (such as the default binding and how to resolve the symbol). llvm-svn: 270648
* Add tests for r219479.David Majnemer2014-10-101-0/+167
| | | | llvm-svn: 219480
* obj2yaml, COFF: Handle long section namesDavid Majnemer2014-10-101-0/+11
| | | | | | | | | | | | | Long section names are represented as a slash followed by a numeric ASCII string. This number is an offset into a string table. Print the appropriate entry in the string table instead of the less enlightening /4. N.B. yaml2obj already does the right thing, this test exercises both sides of the (de-)serialization. llvm-svn: 219458
* obj2yaml: Don't crash if the characteristics field is zeroDavid Majnemer2014-04-091-0/+43
| | | | | | | | | obj2yaml would fail when seeing a Weak External auxiliary record with a characteristics field holding zero instead of one of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, or IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY. llvm-svn: 205911
* obj2yaml: Use the correct relocation type for different machine typesDavid Majnemer2014-04-071-0/+17
| | | | | | | | | | | | | The IO normalizer would essentially lump I386 and AMD64 relocations together. Relocation types with the same numeric value would then get mapped in appropriately. For example: IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric value of one. We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions of object files with a machine type of IMAGE_FILE_MACHINE_AMD64. llvm-svn: 205746
* Object: Output .file symbols properlyDavid Majnemer2014-03-201-0/+14
| | | | | | | obj2yaml would emit the NUL bytes padding the auxiliary file symbol records. Trimming them looks nicer. llvm-svn: 204314
* Object: Provide a richer means of describing auxiliary symbolsDavid Majnemer2014-03-192-8/+24
| | | | | | | | | | | | | | | | The current state of affairs has auxiliary symbols described as a big bag of bytes. This is less than satisfying, it detracts from the YAML file as being human readable. Instead, allow for symbols to optionally contain their auxiliary data. This allows us to have a much higher level way of describing things like weak symbols, function definitions and section definitions. This depends on D3105. Differential Revision: http://llvm-reviews.chandlerc.com/D3092 llvm-svn: 204214
* Print symbol names in relocations when dumping COFF as YAML.Rafael Espindola2013-06-062-6/+6
| | | | llvm-svn: 183403
* Split Alignment out of the Section Characteristics.Rafael Espindola2013-05-062-4/+8
| | | | | | | | The alignment is just a byte in the middle of Characteristics, not an independent flag. Making it an independent field in the yaml representation makes it more yamlio friendly. llvm-svn: 181243
* Fix typo.Rafael Espindola2013-04-232-4/+4
| | | | llvm-svn: 180137
* Add back parsing of header charactestics.Rafael Espindola2013-04-041-0/+1
| | | | | | | | It had been dropped during the switch to yaml::IO. Also add a test going from yaml2obj to llvm-readobj. It can be extended as we add more fields/formats to yaml2obj. llvm-svn: 178786
* Move test yaml files under Inputs until they are converted to be the actualMatt Beaumont-Gay2012-08-022-0/+166
test files. llvm-svn: 161219
OpenPOWER on IntegriCloud