- Jun 17, 2020
-
-
Michał Górny authored
Fix the CMake rules for LLVMCFIVerify library not to pull duplicate LLVM .a libraries when linking to the dylib. This prevents problems due to duplicate symbols and apparently fixes mingw32. This is an alternative approach to D44650 that just forces .a libraries instead. However, there doesn't seem to be any reason to do that. Differential Revision: https://reviews.llvm.org/D81921
-
Georgii Rymar authored
`Elf_GnuHash_Impl` has the following method: ``` ArrayRef<Elf_Word> values(unsigned DynamicSymCount) const { return ArrayRef<Elf_Word>(buckets().end(), DynamicSymCount - symndx); } ``` When DynamicSymCount is less than symndx we return an array with the huge broken size. This patch fixes the issue and adds an assert. This assert helped to fix an issue in one of the test cases. Differential revision: https://reviews.llvm.org/D81937
-
Georgii Rymar authored
`printGnuHashTable` contains the code to check the GNU hash table. This patch splits it to `getGnuHashTableChains` helper (and reorders slightly to reduce). Differential revision: https://reviews.llvm.org/D81928
-
- Jun 16, 2020
-
-
Fangrui Song authored
If .gcda is corrupted, gcov continues to produce a .gcov and just assumes execution counts are zeros. This is reasonable, because the program can corrupt its .gcda output. The code path should be similar to the code path without .gcda.
-
Fangrui Song authored
Between gcov 4.9~8, `gcov -i $file` prints coverage information to $file.gcov in an intermediate text format (single file, instead of $source.gcov for each source file). lcov newer than 2019-05-24 detects -i support and uses it to increase processing speed. gcov 9 (GCC r265587) removed --intermediate-format and -i was changed to mean --json-format. However, we consider this format still useful and support it. geninfo (part of lcov) supports this format even if we announce that we are compatible with gcov 9.0.0
-
Fangrui Song authored
-
Georgii Rymar authored
Previously we only printed a symbol value when it has a non-empty name or non-zero value. This patch changes the behavior. Now we only omit a symbols value when a relocation does not reference a symbol (i.e. symbol index == 0). Seems it is what GNU readelf does, looking on its output. Differential revision: https://reviews.llvm.org/D81842
-
Georgii Rymar authored
Currently, llvm-readelf crashes when there is a STT_SECTION symbol for the null section and this symbol is used in a relocation. Differential revision: https://reviews.llvm.org/D81840
-
Igor Kudrin authored
The patch adds an option `--dwarf64` to instruct a tool to generate debug information in the 64-bit DWARF format. There is no real implementation yet, only a few compatibility checks. Differential Revision: https://reviews.llvm.org/D81143
-
Kirill Bobyrev authored
The variable was not used anywhere except assert and causes build warnings in the optimized builds. Clanup after 913bc312
-
Alexander Shaposhnikov authored
This diff adds support for copying binaries containing a LC_CODE_SIGNATURE load command. Test plan: make check-all Differential revision: https://reviews.llvm.org/D81768
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D81886
-
- Jun 15, 2020
-
-
Wouter van Oortmerssen authored
This adds 4 new reloc types. A lot of code that previously assumed any memory or offset values could be contained in a uint32_t (and often truncated results from functions returning 64-bit values) have been upgraded to uint64_t. This is not comprehensive: it is only the values that come in contact with the new relocation values and their dependents. A new tablegen mapping was added to automatically upgrade loads/stores in the assembler, which otherwise has no way to select for these instructions (since they are indentical other than for the offset immediate). It follows a similar technique to https://reviews.llvm.org/D53307 Differential Revision: https://reviews.llvm.org/D81704
-
- Jun 13, 2020
-
-
Xing GUO authored
- Jun 12, 2020
-
-
Ronak Chauhan authored
Summary: This commit slightly modifies the MCDisassembler, and llvm-objdump to allow targets to also decode entire symbols. WebAssembly uses the onSymbolStart hook it to decode preludes. WebAssembly partially disassembles the symbol in its target specific way; and then falls back to the normal flow of llvm-objdump. AMDGPU needs it to decode kernel descriptors entirely, and move to the next symbol. This commit is to split the above task into 2. - Changes to llvm-objdump and MC-layer without breaking WebAssembly code [ this commit ] - AMDGPU's implementation of onSymbolStart that decodes kernel descriptors. [ https://reviews.llvm.org/D80713 ] Reviewers: scott.linder, t-tye, sunfish, arsenm, jhenderson, MaskRay, aardappel Reviewed By: scott.linder, jhenderson, aardappel Subscribers: bcain, dschuff, wdng, tpr, sbc100, jgravelle-google, hiraditya, aheejin, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80512
-
Alexander Shaposhnikov authored
Fix the calculation of the field cmdsize (in the function buildRPathLoadCommand) to account for the null byte terminator. Patch by Sameer Arora! Test plan: make check-all Differential revision: https://reviews.llvm.org/D81575
-
Cyndy Ishida authored
Summary: This completes the needed glueing to support reading tbd files from nm. This includes specifying which slice filtering with `--arch` and a new option specifically for tbd files `--add-inlinedinfo` which will show the reexported libraries that are appended in the tbd file. Reviewers: ributzka, steven_wu, JDevlieghere, jhenderson Reviewed By: JDevlieghere Subscribers: hiraditya, MaskRay, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81614
-
Fangrui Song authored
This reverts part of D81156. Accessing errs() concurrently was safe before and racy after D81156. (`errs() << 'a'` is always racy) Accessing outs() and errs() concurrently was safe before and racy after D81156. Don't tie errs() to outs() by default to fix the fallout. llvm-dwarfdump is single-threaded and opting in the tie behavior is safe.
-
- Jun 11, 2020
-
-
Reid Kleckner authored
This reverts commit 101fbc01. Remove leftover debugging attribute. Update LLDB as well, which was missed before.
-
Fangrui Song authored
Place the instruction at the 24th column (0-based indexing), matching GNU objdump ARM/AArch64/powerpc/etc when the address is low. This is beneficial for non-x86 targets which have short instruction lengths. ``` // GNU objdump AArch64 0: 91001062 add x2, x3, #0x4 400078: 91001062 add x2, x3, #0x4 // llvm-objdump, with this patch 0: 62 10 00 91 add x2, x3, #4 400078: 62 10 00 91 add x2, x3, #4 // llvm-objdump, if we change to print a word instead of bytes in the future 0: 91001062 add x2, x3, #4 400078: 91001062 add x2, x3, #4 // GNU objdump Thumb 0: bf00 nop // GNU objdump Power ISA 3.1 64-bit instruction // 0: 00 00 10 04 plwa r3,0 // 4: 00 00 60 a4 ``` Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D81590
-
- Jun 10, 2020
-
-
Georgii Rymar authored
Multiple times we faced an issue of huge outputs due to unexpected behavior or incorrect test cases. The last one was https://reviews.llvm.org/D80629#2073066. This patch limits the output to 10 Mb for ELF and introduces the --max-size to change this limit. I've tried to keep the implementation non-intrusive. The current logic we have is that we prepare section content in a buffer first and write it to the output later. This patch checks the available limit on each writing attempt to this buffer and stops writing when the limit is reached and raises the internal error flag. Later, this flag is is checked before the actual writing to a file happens and an error is reported. Differential revision: https://reviews.llvm.org/D81258
-
- Jun 08, 2020
-
-
Christopher Tetreault authored
Reviewers: efriedma, kmclaughlin, sdesmalen, MaskRay, JDevlieghere Reviewed By: sdesmalen Subscribers: tschuett, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81201
-
- Jun 07, 2020
-
-
Benjamin Kramer authored
The latter is more readable and more efficient. While there clean up some double lookups. NFCI.
-
- Jun 06, 2020
-
-
Nico Weber authored
This reverts commit b5289656. __attribute__((optnone)) doesn't build with msvc, see http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/16326
-
Reid Kleckner authored
-
- Jun 05, 2020
-
-
Alexandre Ganea authored
Before this patch, llvm-pdbutil supported only --type-stats to dump stats about a PDB TPI stream. Adding --id-stats for completion.
-
Sameer Arora authored
Reorder `DumpSection` under `handleArgs` in file `MachOObjcopy.cpp`. The operation to dump a section is now performed before both add and remove section operations for MachO file format. Change for the ELF format at D81097. Together fixes https://bugs.llvm.org/show_bug.cgi?id=44283 Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D81123
-
Sameer Arora authored
Reorder `DumpSection` under `handleArgs` in file `ELFObjcopy.cpp`. `DumpSection` is placed before `replaceAndRemoveSections` and is therefore now the first operation under `handleArgs`. Thus, it is now performed before both `add` and `remove` section operations. Change for the MachO format at D81123. Together fixes https://bugs.llvm.org/show_bug.cgi?id=44283. Reviewed By: alexshap, jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D81097
-
Sameer Arora authored
It updates two error messages under `performOperation` in the file llvm-ar.cpp. Furthermore, it also updates tests that print out these error messages: `llvm/test/Object/ar-create.test` and `llvm/test/tools/llvm-ar/print.test`. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D80846
-
Jonas Devlieghere authored
Treat N_AST symbol table entries like other debug entries and don't emit them in the linked binary. Differential revision: https://reviews.llvm.org/D81205
-
Xing GUO authored
This patch addresses the comment in [D80972](https://reviews.llvm.org/D80972#inline-744217). Before this patch, the initial length field of .debug_aranges section should be declared as: ``` ## 32-bit DWARF debug_aranges: - Length: TotalLength: 0x20 Version: 2 ... ## 64-bit DWARF debug_aranges: - Length: TotalLength: 0xffffffff TotalLength64: 0x20 Version: 2 ... ``` After this patch: ``` ## 32-bit DWARF debug_aranges: - [[Format: DWARF32]] ## Optional Length: 0x20 Version: 2 ... ## 64-bit DWARF debug_aranges: - Format: DWARF64 Length: 0x20 Version: 2 ``` Current implementation of generating DWARF64 .debug_aranges section is buggy. A follow-up patch will improve it and add test cases for DWARF64. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D81063
-
- Jun 04, 2020
-
-
Georgii Rymar authored
We have unobvious issue in the condition that is used to check that we do not read past the EOF. The problem is that the result of "GnuHashTable->nbuckets * 4" expression is uint32. Because of that it was still possible to overflow it and pass the check. There was no such problem with the "GnuHashTable->maskwords * sizeof(typename ELFT::Off)" condition, because of `sizeof` on the right (which gives 64-bits value on x64), but I've added an explicit conversion to 64-bit value for `GnuHashTable->maskwords` too. Differential revision: https://reviews.llvm.org/D81103
-
- Jun 02, 2020
-
-
Jonas Devlieghere authored
Some of the --debug-* options can take an optional offset. Although the man page does a good job of making that clear, it's much harder to discover from the help output. Currently the only reference to this is the following sentence: > Where applicable these parameters take an optional =<offset> argument > to dump only the entry at the specified offset. This patch changes the help output from to print [=<offset>] after the options that take an offset. --debug-info[=<offset>] - Dump the .debug_info section rdar://problem/63150066 Differential revision: https://reviews.llvm.org/D80959
-
Clement Courbet authored
Summary: Using a .data() member on a StringRef was discarding the StringRef size, breaking llvm-exegesis on machines with counter sums (e.g. Zen2). Reviewers: oontvoo Subscribers: mstojanovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80982
-
Xing GUO authored
Summary: This patch addresses comments in [D80722](https://reviews.llvm.org/D80722#inline-742353) Reviewers: grimar, jhenderson Reviewed By: grimar, jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80861
-
- Jun 01, 2020
-
-
Fangrui Song authored
This flag (and the whole field DT_FLAGS_1) originated from Solaris. I intend to use it in an LLD patch D80872. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D80871
-
Georgii Rymar authored
Partially reverts feee9864. Add explicit braces to a different place to fix "error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]"
-
Georgii Rymar authored
Should fix the BB (http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3907/steps/build%20stage%201/logs/stdio): llvm-readobj/ELFDumper.cpp:4708:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else] else ^
-