summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-size][test] Improve llvm-size testingJames Henderson2019-08-1427-143/+1088
| | | | | | | | | | | | | | | | | | | | | This patch significantly improves the llvm-size testing. The changes made are: 1) Change all tests to use yaml2obj instead of assembly or pre-canned inputs. 2) Move the tests out of the X86 directory, since they don't need to be there after 1). 3) Increased test coverage. 4) Added comments to explain purpose of tests. I haven't attempted to add test coverage for all Mach-O related code, as I am not familiar enough with that file format to be able to. Reviewers: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66134 llvm-svn: 368821
* [llvm-objdump] - Add a relocation-xindex-symbol.test test case.George Rimar2019-08-141-0/+36
| | | | | | | | | This rewrites the exitent test case to use YAML instead of the precompiled object and moves it from test/Object to an appropriate llvm-objdump tests folder. Differential revision: https://reviews.llvm.org/D66140 llvm-svn: 368811
* [llvm-profdata] Profile dump for compact binary formatWenlei He2019-08-132-0/+8
| | | | | | | | | | | | | | Summary: Fix "llvm-profdata show" so it can work with compact binary format profile. The change is to mark all functions "used" so SampleProfileReaderCompactBinary::read will read in all profiles available for dumping. The function names will be MD5 hash for compact binary format. Reviewers: wmi, davidxl, danielcdh Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65162 llvm-svn: 368731
* [llvm-readelf] Implement note parsing for NT_FILE and unknown descriptorsJordan Rupprecht2019-08-135-6/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements two note parsers; one for NT_FILE coredumps, e.g.: ``` CORE 0x00000080 NT_FILE (mapped files) Page size: 4096 Start End Page Offset 0x0000000000001000 0x0000000000002000 0x0000000000003000 /path/to/a.out 0x0000000000004000 0x0000000000005000 0x0000000000006000 /path/to/libc.so 0x0000000000007000 0x0000000000008000 0x0000000000009000 [stack] ``` (A more realistic example can be tested locally by creating a crashing program and running `llvm-readelf -n core`) And also implements a raw hex dump for unknown descriptor data for unhandled descriptor types. Reviewers: MaskRay, jhenderson, grimar, alexshap Reviewed By: MaskRay, grimar Subscribers: emaste, llvm-commits, labath Tags: #llvm Differential Revision: https://reviews.llvm.org/D65832 llvm-svn: 368698
* [llvm-readobj] - Remove 'error(Error EC)' helper.George Rimar2019-08-131-12/+12
| | | | | | | | | We do not need it. I replaced it with reportError(StringRef Input, Error Err). Differential revision: https://reviews.llvm.org/D66011 llvm-svn: 368677
* [llvm-readobj] Downgrade 'PT_DYNAMIC segment offset + size exceeds the size ↵Jordan Rupprecht2019-08-121-4/+4
| | | | | | | | | | | | | | | | | | of the file' from an error to a warning Summary: This allows llvm-readobj to print other useful information for truncated files instead of giving up. Reviewers: jhenderson, grimar, MaskRay Reviewed By: jhenderson, grimar, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66036 llvm-svn: 368576
* [llvm-ar] Accept file paths with windows format slashesOwen Reynolds2019-08-121-0/+44
| | | | | | | | | | | | | | | The internal representation of llvm-ar archives uses linux style slashes for paths, no matter the OS. In the case of windows this meant file paths input intending to match existing members would only match if linux style slashes where used. This change allows either slash direction to be input by the user. This change includes removing an unnecessary call to normalisePath and moving the call of another. Differential Revision: https://reviews.llvm.org/D65743 llvm-svn: 368573
* [llvm-ar][test] Correct tests marked as expected failsOwen Reynolds2019-08-123-3/+3
| | | | | | | | | | | | | In diff D64802 I marked three tests as expected failures for darwin but James Nagurne saw these fail on his downstream embedded ARM cross compiler. I believe XFAIL: system-darwin should be used instead of using XFAIL: darwin due to the problem being related to the darwin host and not the target. Differential Revision: https://reviews.llvm.org/D65745 llvm-svn: 368564
* NFC. Remove trailing whitespace in testJames Henderson2019-08-121-1/+1
| | | | llvm-svn: 368556
* [llvm-strings] Improve testing of llvm-stringsJames Henderson2019-08-1223-93/+216
| | | | | | | | | | | | | | | | | | | This patch tidies up the llvm-strings testing by: 1. Adding comments to every test. 2. Getting rid of canned input files, and having the tests generate them on the fly (this makes the tests self-contained). 3. Adding missing test coverage. 4. Renaming some tests that weren't clear as to their purpose. 5. Adding extra checking of various cases, formatting etc. 6. Removing a test that didn't seem to have any useful purpose for testing llvm-strings. Reviewed by: rupprecht, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66015 llvm-svn: 368555
* Print reasonable representations of type names in llvm-nm, readelf and readobjSunil Srivastava2019-08-093-33/+83
| | | | | | | | | | | For type values that do not have proper names, print reasonable representation in llvm-nm, llvm-readobj and llvm-readelf, matching GNU tools.s Fixes PR41713. Differential Revision: https://reviews.llvm.org/D65537 llvm-svn: 368451
* [llvm-readelf]Print filename for multiple inputs and fix formatting regressionJames Henderson2019-08-093-3/+47
| | | | | | | | | | | | | | | | | | | This patch addresses two closely related bugs: https://bugs.llvm.org/show_bug.cgi?id=42930 and https://bugs.llvm.org/show_bug.cgi?id=42931. GNU readelf prints the file name for every input unless there is only one input and that input is not an archive. This patch adds the printing for multiple inputs. A previous change did it for archives, but introduced a regression with GNU compatibility for single-output formatting, resulting in a spurious initial blank line. This is fixed in this patch too. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D65953 llvm-svn: 368435
* [MCA] Add flag -show-encoding to llvm-mca.Andrea Di Biagio2019-08-091-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flag -show-encoding enables the printing of instruction encodings as part of the the instruction info view. Example (with flags -mtriple=x86_64-- -mcpu=btver2): Instruction Info: [1]: #uOps [2]: Latency [3]: RThroughput [4]: MayLoad [5]: MayStore [6]: HasSideEffects (U) [7]: Encoding Size [1] [2] [3] [4] [5] [6] [7] Encodings: Instructions: 1 2 1.00 4 c5 f0 59 d0 vmulps %xmm0, %xmm1, %xmm2 1 4 1.00 4 c5 eb 7c da vhaddps %xmm2, %xmm2, %xmm3 1 4 1.00 4 c5 e3 7c e3 vhaddps %xmm3, %xmm3, %xmm4 In this example, column Encoding Size is the size in bytes of the instruction encoding. Column Encodings reports the actual instruction encodings as byte sequences in hex (objdump style). The computation of encodings is done by a utility class named mca::CodeEmitter. In future, I plan to expose the CodeEmitter to the instruction builder, so that information about instruction encoding sizes can be used by the simulator. That would be a first step towards simulating the throughput from the decoders in the hardware frontend. Differential Revision: https://reviews.llvm.org/D65948 llvm-svn: 368432
* [llvm-readobj] - Remove deprecated unwrapOrError(Expected<T> EO).George Rimar2019-08-096-9/+9
| | | | | | | | | This patch changes the code to use a modern unwrapOrError(StringRef Input, Expected<T> EO) version that contains the input source name and removes the deprecated version. Differential revision: https://reviews.llvm.org/D65946 llvm-svn: 368428
* Fix check in tools/gold/X86/strip_names.ll regarding unnamed argsBjorn Pettersson2019-08-081-1/+1
| | | | | | | | | After r367755 value numbers are printed for unnamed function arguments. The tools/gold/X86/strip_names.ll was not updated in that commit, so this patch can be seen as a follow up to r367755. llvm-svn: 368281
* [llcm-readobj] - Fix BB after t368272.George Rimar2019-08-081-2/+1
| | | | | | Seems I forgot to update this test case. llvm-svn: 368273
* [yaml2obj/obj2yaml] - Add a basic support for extended section indexes.George Rimar2019-08-085-8/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases a symbol might have section index == SHN_XINDEX. This is an escape value indicating that the actual section header index is too large to fit in the containing field. Then the SHT_SYMTAB_SHNDX section is used. It contains the 32bit values that stores section indexes. ELF gABI says that there can be multiple SHT_SYMTAB_SHNDX sections, i.e. for example one for .symtab and one for .dynsym (1) https://groups.google.com/forum/#!topic/generic-abi/-XJAV5d8PRg (2) DT_SYMTAB_SHNDX: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html In this patch I am only supporting a single SHT_SYMTAB_SHNDX associated with a .symtab. This is a more or less common case which is used a few tests I saw in LLVM. I decided not to create the SHT_SYMTAB_SHNDX section as "implicit", but implement is like a kind of regular section for now. i.e. tools do not recreate this section or its content, like they do for symbol table sections, for example. That should allow to write all kind of possible broken test cases for our needs and keep the output closer to requested. Differential revision: https://reviews.llvm.org/D65446 llvm-svn: 368272
* [llvm-readobj/libObject] - Introduce a custom warning handler for ↵George Rimar2019-08-081-6/+29
| | | | | | | | | | | | | | | | | | | | `ELFFile<ELFT>` methods. Currently, we have a code duplication in llvm-readobj which was introduced in D63266. The duplication was introduced to allow llvm-readobj to dump the partially broken object. Methods in ELFFile<ELFT> perform a strict validation of the inputs, what is itself good, but not for dumper tools, that might want to dump the information, even if some pieces are broken/unexpected. This patch introduces a warning handler which can be passed to ELFFile<ELFT> methods and can allow skipping the non-critical errors when needed/possible. For demonstration, I removed the duplication from llvm-readobj and implemented a warning using the new custom warning handler. It also deduplicates the strings printed, making the output less verbose. Differential revision: https://reviews.llvm.org/D65515 llvm-svn: 368260
* [llvm-strip] Support --strip-sectionsWolfgang Pieb2019-08-081-0/+5
| | | | | | | | | | | llvm-objcopy already supports --strip-sections. It is a good fit for its alias llvm-strip to support it as well. Reviewers: rupprecht, jhenderson Differential Revision: https://reviews.llvm.org/D65787 llvm-svn: 368241
* [llvm-readobj][test] Add baseline tests for FreeBSD/AMD/AMDGPU note printingJordan Rupprecht2019-08-073-0/+251
| | | | llvm-svn: 368221
* [obj2yaml] - MIPS: move and improve testing of the e_flagsGeorge Rimar2019-08-071-0/+380
| | | | | | | | | | | | | | Mips/elf-flags.yaml and Mips/elf-abi.yaml are tests that intention was to show that yaml2obj/obj2yaml are able to read/dump MIPS specific e_flags. They were not complete, contained an excessive YAML parts and were placed at a wrong location. I removed them and created the obj2yaml/elf-mips-eflags.yaml instead. Differential revision: https://reviews.llvm.org/D65807 llvm-svn: 368140
* [llvm-readelf] --notes: move 'Data size' column left by 1Fangrui Song2019-08-071-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readelf -n: ``` // "Data size" is not left justified Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` llvm-readelf -n (before): ``` // "Data size" column shifted by 1 Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` llvm-readelf -n (after): ``` Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` This change is made to reduce the diff with readelf -n, so that it is slightly easier to check what features readelf implements but we don't. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D65847 llvm-svn: 368138
* [X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.Craig Topper2019-08-072-12/+12
| | | | | | | | | | The upper 4 bits of the immediate byte are used to encode a register. We need to limit the explicit immediate to fit in the remaining 4 bits. Fixes PR42899. llvm-svn: 368123
* Fixes failing test cases on Windows for rL368119Alex Brachet2019-08-075-7/+7
| | | | | | | | Windows test cases were failing because the executable is called yaml2obj.exe not just yaml2obj. I removed FileCheck patterns including yaml2obj so they start matching at the error message not the program name. llvm-svn: 368120
* [yaml2obj] Move core yaml2obj code into lib and include for use in unit testsAlex Brachet2019-08-075-5/+27
| | | | | | | | | | | | | | Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath Reviewed By: rupprecht Subscribers: gribozavr, mgrang, seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65255 llvm-svn: 368119
* [test/Object] - Cleanup the Object\obj2yaml.test a bit.George Rimar2019-08-061-2/+1
| | | | | | | | | | | | | | | This makes 2 changes: 1) Removes unwind-section.elf-x86-64 object and the corresponding test case, because SHT_X86_64_UNWIND is already tested here: https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/section-type.yaml 2) Removes/partially moves "No such file or directory" test, because we already have a similar test here: https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/invalid_input_file.test Differential revision: https://reviews.llvm.org/D65570 llvm-svn: 368044
* Revert "Fixed failing test cases"Dmitri Gribenko2019-08-062-2/+2
| | | | | | This reverts commit r368030, which depends on r368021 that I reverted. llvm-svn: 368036
* Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in ↵Dmitri Gribenko2019-08-063-25/+3
| | | | | | | | unit tests" This reverts commit r368021, it broke tests. llvm-svn: 368035
* Fixed failing test casesAlex Brachet2019-08-062-2/+2
| | | | llvm-svn: 368030
* [yaml2obj] Move core yaml2obj code into lib and include for use in unit testsAlex Brachet2019-08-063-3/+25
| | | | | | | | | | | | | | Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath Reviewed By: rupprecht Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65255 llvm-svn: 368021
* [llvm/test/Object] - Cleanup and move out the yaml2obj tests.George Rimar2019-08-069-0/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple yaml2obj-* tests in llvm/test/Object folder. This is not correct place to have them and my intention was to move them out to test\tools\yaml2obj folder. I reviewed them, made some changes, and my comments are below. For all tests I: Added comments when needed. Moved them from llvm/test/Object to yaml2obj tests. Another changes performed: 1) yaml2obj-invalid.yaml. It was a test for an invalid YAML input. I just moved it. 2) yaml2obj-coff-multi-doc.test/yaml2obj-elf-multi-doc.test: these were a tests for testing --docnum=x functionality, one was for COFF and one for ELF. I merged them into one. 3) yaml2obj-elf-bits-endian.test: I removed its 4 YAML inputs (merged into the main test). 4) yaml2obj-readobj.test: This file has a long history. It was added to check the "parsing of header charactestics" initially. Then was used to test how yaml2obj writes the relocations. Then was upgraded to check how yaml2obj handle "-o" option. I think it should be heavily splitted and refactored in a separate patch. For now I leaved it as is, but restyled to reduce the changes in a follow-ups. 5) yaml2obj-elf-alignment.yaml: its intention was to check we can set sh-addralign field. I moved, renamed (to elf-sh-addralign.yaml) and updated this test. 6) yaml2obj-elf-file-headers.yaml: I removed it. It's intention was to check that yaml2obj handles OS/ABI and ELF type (e.g Relocatable). We are testing this already, for example in D64800. We might want to add a better (more complete) test, but keeping the existent test does not have much sense I think. 7) yaml2obj-elf-file-headers-with-e_flags.yaml: I would describe its intention as "testing MIPS e_flags". It is far from being complete and tests only a few flags. I leaved it alone for now. 8) yaml2obj-elf-rel.yaml: its intention is to check the MIPS32 relocations. We have a version for MIPS64 here: test\Object\Mips\elf-mips64-rel.yaml Seems them both are incomplete. I leaved them alone for now. 9) yaml2obj-elf-rel-noref.yaml: was introduced to check the support of arm32 R_ARM_V4BX relocatiion. I leaved it alone for now. 10) yaml2obj-elf-section-basic.yaml: it just checked that we are able to recognise trivial fields like section 'Name', 'Type', 'Flags' and others. All of our yaml2obj tests are heavily using it. I just removed this test. 11) yaml2obj-elf-section-invalid-size.yaml: its intention was to check the "Section size must be greater than or equal to the content size" error. I moved this test to `tools\yaml2obj\section-size-content.yaml' 12) yaml2obj-elf-symbol-basic.yaml: its intention seems was to support declarations of the symbols in yaml2obj. I removed it. We use this in almost each test we already have. 13) yaml2obj-elf-symbol-LocalGlobalWeak.yaml: its intention was to check that we can declare different symbol bindings. I moved it to tools\yaml2obj\elf-symbol-binding.yaml. 14) yaml2obj-coff-invalid-alignment.test: check that error is reported for a too large coff section alignment. Moved it to tools\yaml2obj\coff-invalid-alignment.test 15) yaml2obj-elf-symbol-visibility.yaml: tests ELF symbols visibility. I improved it and moved to tools\yaml2obj\elf-symbol-visibility.yaml and tools\obj2yaml\elf-symbol-visibility.yaml Differential revision: https://reviews.llvm.org/D65652 llvm-svn: 367988
* [llvm-readelf] Support dumping of stack sizes sections with readelf ↵Wolfgang Pieb2019-08-051-0/+473
| | | | | | | | | | --stack-sizes Reviewers: jhenderson, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D65313 llvm-svn: 367942
* Add "REQUIRES: x86-registered-target" to test.Peter Collingbourne2019-08-051-0/+2
| | | | llvm-svn: 367937
* llvm-symbolizer: Untag addresses in object files by default.Peter Collingbourne2019-08-051-0/+16
| | | | | | | | | | Any addresses that we pass to llvm-symbolizer are going to be untagged, while any HWASAN instrumented globals are going to be tagged in the symbol table. Therefore we need to untag the addresses before using them. Differential Revision: https://reviews.llvm.org/D65769 llvm-svn: 367926
* [llvm-lipo] Implement -segalignAnusha Basana2019-08-052-0/+142
| | | | | | | | | | Sets section alignments of the specified architecture slices to the alignment values. Alignment values are hexadecimal values that are powers of 2. Differential Revision: https://reviews.llvm.org/D65420 llvm-svn: 367908
* [llvm-readobj][test] Add llvm-readobj style test cases for r367878Jordan Rupprecht2019-08-051-8/+41
| | | | llvm-svn: 367884
* [llvm-readelf] Fix core note descriptionsJordan Rupprecht2019-08-051-0/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: Core files have different descriptions for note values. llvm-readelf currently prints the generic note type, which is wrong when using it to read a core file. To verify the constants/strings, see: Values: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=75c4fb7e9d7c0f780d635ac305f579546b7b071b;hb=HEAD#l571 Strings: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=c31a5c1266b7bb62a485895b01b49e1f832ade35;hb=HEAD#l16881 Note: this does not handle printing the note data for NT_FILE, it just fixes the descriptions. Reviewers: MaskRay Reviewed By: MaskRay Subscribers: labath, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65608 llvm-svn: 367878
* [yaml2obj][tests] Fix overly restrictive od output checkHubert Tong2019-08-051-4/+4
| | | | | | | | | | | | | | | | | | | | | Summary: rL364517 introduced further instances of `od` output checking of the kind previously corrected by rL363829. This patch corrects the issue by suppressing output of the input offset. The check remains sufficiently sensitive to test for the intended value of the specific byte since the relevant byte value is the only output we are expecting from `od`. Reviewers: grimar, xingxue, daltenty, jasonliu, jhenderson, MaskRay Reviewed By: grimar, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65680 llvm-svn: 367862
* [yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.George Rimar2019-08-051-3/+25
| | | | | | | | | | | This allows to write a test case for one of untested errors in llvm/Object/ELF.h. I did it in this patch to demonstrate. Differential revision: https://reviews.llvm.org/D65394 llvm-svn: 367860
* [obj2yaml] - Teach tool to dump SHT_NULL sections.George Rimar2019-08-051-0/+143
| | | | | | | | | | | Recently an advanced support of SHT_NULL sections was implemented in yaml2obj. This patch adds a corresponding support to obj2yaml. Differential revision: https://reviews.llvm.org/D65215 llvm-svn: 367852
* Revert "[llvm-objdump] Re-commit r367284."Michael Pozulp2019-08-053-12/+6
| | | | | | | | This reverts r367776 (git commit d34099926e909390cb0254bebb4b7f5cf15467c7). My changes to llvm-objdump tests caused them to fail on windows: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27368 llvm-svn: 367816
* [llvm-objdump] Re-commit r367284.Michael Pozulp2019-08-043-6/+12
| | | | | | | | | | | | | | | | | | Add warning messages if disassembly + source for problematic inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 llvm-svn: 367776
* [yaml2obj][tests] Replace 8-byte `od` conversion with 1-byte conversionHubert Tong2019-08-032-8/+8
| | | | | | | | | | | | | | | | | | | Summary: `od` on AIX does not seem to implement 8-byte integer conversions. Work around this by using 1-byte conversions, which can be used in this case since the value is byte-order insensitive. Reviewers: grimar, daltenty, xingxue, jasonliu, MaskRay Reviewed By: grimar, MaskRay Subscribers: MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65671 llvm-svn: 367760
* [llvm-objcopy] - Fix the strip-dwo-groups.test.George Rimar2019-08-021-10/+17
| | | | | | | | | | It was reported (https://reviews.llvm.org/D65273#1612246) that this test fails if the compilation directory contain a "debug_" substring. This should fix it. llvm-svn: 367702
* [MCA] Add support for printing immedate values as hex. Also enable lexing of ↵Andrea Di Biagio2019-08-022-0/+69
| | | | | | | | | | | | | | | | | | masm binary and hex literals. This patch adds a new llvm-mca flag named -print-imm-hex. By default, the instruction printer prints immediate operands as decimals. Flag -print-imm-hex enables the instruction printer to print those operands in hex. This patch also adds support for MASM binary and hex literal numbers (example 0FFh, 101b). Added tests to verify the behavior of the new flag. Tests also verify that masm numeric literal operands are now recognized. Differential Revision: https://reviews.llvm.org/D65588 llvm-svn: 367671
* Move macho-data-in-code.ll to X86/macho-data-in-code.ll (to only run when ↵Kuba Mracek2019-08-011-0/+0
| | | | | | x86 is a valid target). llvm-svn: 367583
* [llvm-objdump] Fix jumptable detection when disassembling Mach-O binariesKuba Mracek2019-08-011-0/+45
| | | | | | | | | | | - Add LC_SEGMENT_64 handling in getSectionsAndSymbols to be able to find the base segment address from 64-bit Mach-O binaries. - Add "data in code" detection into the !symbolTableWorked case, extract it into a separate function. - Fix uninitialized variable usage on BaseSegmentAddress (initialize to 0). - Add test. Differential Revision: https://reviews.llvm.org/D65491 llvm-svn: 367578
* Reland "[DwarfDebug] Dump call site debug info"Djordje Todorovic2019-07-311-0/+76
| | | | | | | | | The build failure found after the rL365467 has been resolved. Differential Revision: https://reviews.llvm.org/D60716 llvm-svn: 367446
* [AARCH64] Switch relocations R_AARCH64_TLS_TPREL64 and R_AARCH64_DTPMOD64Peter Smith2019-07-312-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ELF for the Arm 64-bit Architecture document originally specified R_AARCH64_TLS_DTPREL64 = 0x404 R_AARCH64_TLS_DTPMOD64 = 0x405 LLVM correctly followed the document. Unfortunately in binutils these two codes were reversed: R_AARCH64_TLS_DTPMOD64 = 0x404 R_AARCH64_TLS_DTPREL64 = 0x405 Given that binaries had shipped this change has become the defacto standard interpretation of these relocation codes for any toolchain that wanted to remain compatible with GNU. To recognize this the latest version of the ABI document has renamed the relocations to R_AARCH64_TLS_IMPDEF1 and R_AARCH64_TLS_IMPDEF2 permitting a toolchain to choose between the two relocation types, and recommending that toolchains follow the GNU interpretation for maximum compatibility. Given that upstream llvm has never implemented the standard TLS model for AArch64 so we have no binary legacy, synchronize with GCC so that we don't create incompatible objects in the future. So far the only visible change is in llvm-readobj as it can decode these relocations. Tthis change will mean that llvm-readobj decodes the same way as GNU readelf. fixes PR40507 llvm-svn: 367437
* [llvm-objcopy] - Stop using Inputs/alloc-symtab.oGeorge Rimar2019-07-305-19/+46
| | | | | | | | | | | | | | | | Initially Inputs/alloc-symtab.o was added in D42222. It contains an allocatable .symtab section. Today we are able to create such sections using yaml2obj. Later people started using this input for no solid reason in their tests. Now multiple of tests are using it. (And those tests do not need such a specific case actually). In this patch I removed this binary and rewrote the few tests. Differential revision: https://reviews.llvm.org/D65278 llvm-svn: 367310
OpenPOWER on IntegriCloud