- Nov 27, 2017
-
-
David Blaikie authored
Since this isn't a real header - it includes static functions and had external linkage variables (though this change makes them static, since that's what they should be) so can't be included more than once in a program. llvm-svn: 319082
-
Adam Nemet authored
llvm-svn: 319072
-
Jake Ehrlich authored
GNU's --strip-all doesn't strip as aggressively as it could in general. Currently llvm-objcopy copies the exact behavoir of GNU's --strip-all. eu-strip is used as a drop in replacement for GNU strip/objcopy in many many places without issue. eu-strip removes non-allocated sections and keeps .gnu.warning* sections. Because --strip-all will likely be the most widely used stripping option we should make --strip-all as aggressive as it can safely be. Since we have evidence from eu-strip that this is a safe option we should allow it. For those that might still have an issue afterwards I've added --strip-all-gnu as an exact drop in replacement for GNU's --strip-all as well. llvm-svn: 319071
-
- Nov 22, 2017
-
-
Rafael Espindola authored
There is already an RAII in place to discard the temporary. llvm-svn: 318868
-
- Nov 21, 2017
-
-
David Blaikie authored
llvm-svn: 318715
-
David Blaikie authored
Also undef the macros at the end of the file to make it easier to use. llvm-svn: 318714
-
- Nov 17, 2017
-
-
Vedant Kumar authored
This fixes an issue seen on the coverage bot: http://lab.llvm.org:8080/green/view/Experimental/job/clang-stage2-coverage-R/1930 Profile merging shouldn't fail if a single counter mismatch is detected. llvm-svn: 318555
-
Jonas Hahnfeld authored
The refactoring in r318407 transiently includes abi-breaking.h which defines EnableABIBreakingChecks. This breaks my Debug build because this fuzzer did not link in Support with the symbol. Differential Revision: https://reviews.llvm.org/D40190 llvm-svn: 318553
-
Rafael Espindola authored
llvm-svn: 318535
-
Rafael Espindola authored
I don't think there is any functionality change, but the code is easier to understand IMHO. llvm-svn: 318534
-
Vedant Kumar authored
llvm-svn: 318502
-
David Blaikie authored
All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, not the other way around). llvm-svn: 318490
-
Zachary Turner authored
It turns out this #include isn't used from Host.h anyway, but by having it it causes circular include dependencies. This issues only surfaced while I was working on a separate patch, so I'm submitting this first so that it's independent of the other, unrelated patch. llvm-svn: 318489
-
Lang Hames authored
Removes AllocateRWX, setWritable and setExecutable from sys::Memory and standardizes on allocateMappedMemory / protectMappedMemory. The allocateMappedMemory method is updated to request full permissions for memory blocks so that they can be marked executable later. llvm-svn: 318464
-
- Nov 16, 2017
-
-
David Blaikie authored
llvm-svn: 318463
-
David Blaikie authored
Had several non-inline/strong function definitions that needed to be marked inline, etc. llvm-svn: 318461
-
Rafael Espindola authored
llvm-svn: 318459
-
Rafael Espindola authored
This one requires a new small feature in TempFile: the ability to keep the temporary file with the temporary name. llvm-svn: 318458
-
Dave Lee authored
Summary: This change introduces a `DynamicSymbols` field to the ELF specific YAML supported by `yaml2obj` and `obj2yaml`. This grouping of symbols provides a way to represent ELF dynamic symbols. The `DynamicSymbols` structure is identical to the existing `Symbols`. Reviewers: compnerd, jakehehrlich, silvas Reviewed By: silvas Subscribers: silvas, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D39582 llvm-svn: 318433
-
Rafael Espindola authored
The objective is to remove it completelly. This first patch removes the last use outside dsymutil.cpp and makes it static. llvm-svn: 318429
-
Rafael Espindola authored
llvm-svn: 318427
-
Igor Laevsky authored
This is to be able to reuse them in the llvm-opt-fuzzer. llvm-svn: 318407
-
Rafael Espindola authored
llvm-svn: 318361
-
- Nov 15, 2017
-
-
Rafael Espindola authored
This moves the file handling out of DwarfLinker.cpp. This fixes what is at least an oddity if not a bug. DwarfLinker.cpp was using ToolOutputFile, which uses RemoveFileOnSignal. The issue is that dsymutil.cpp uses that too. It is now clear from the interface that only dsymutil.cpp is responsible for creating and deleting files. llvm-svn: 318334
-
Jake Ehrlich authored
The original -O binary implementation just copied segment data from the object and dumped it into a file. This doesn't take into account any operations performed on objects such as section removal. GNU objcopy has some specific behavior that we'd also like to respect. For instance using -O binary and -j <some_section> will dump <some_section> to a file. This change implements GNU objcopy style -O binary to as close of an approximation as I can determine. Differential Revision: https://reviews.llvm.org/D39713 llvm-svn: 318324
-
Mitch Phillips authored
Summary: This patch adds another failure mode for `validateCFIProtection(..)`, wherein any register that affects the indirect control flow instruction is clobbered to between the CFI-check and the instruction's execution. Also includes a modification to make MCInstrDesc::hasDefOfPhysReg public. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D39820 llvm-svn: 318238
-
- Nov 14, 2017
-
-
Mitch Phillips authored
Allows users to view GraphResult objects in a DOT directed-graph format. This feature can be turned on through the --print-graphs flag. Also enabled pretty-printing of instructions in output. Together these features make analysis of unprotected CF instructions much easier by providing a visual control flow graph. Reviewers: pcc Subscribers: llvm-commits, kcc, vlad.tsyrklevich Differential Revision: https://reviews.llvm.org/D39819 llvm-svn: 318211
-
Hans Wennborg authored
Rename CountingFunctionInserter and use for both mcount and cygprofile calls, before and after inlining Clang implements the -finstrument-functions flag inherited from GCC, which inserts calls to __cyg_profile_func_{enter,exit} on function entry and exit. This is useful for getting a trace of how the functions in a program are executed. Normally, the calls remain even if a function is inlined into another function, but it is useful to be able to turn this off for users who are interested in a lower-level trace, i.e. one that reflects what functions are called post-inlining. (We use this to generate link order files for Chromium.) LLVM already has a pass for inserting similar instrumentation calls to mcount(), which it does after inlining. This patch renames and extends that pass to handle calls both to mcount and the cygprofile functions, before and/or after inlining as controlled by function attributes. Differential Revision: https://reviews.llvm.org/D39287 llvm-svn: 318195
-
Jake Ehrlich authored
I was being inconsistent with the way I was capitalizing help messages for command line options. Additionally --remove-section wasn't using value_desc even though it benefited from it. Differential Revision: https://reviews.llvm.org/D39978 llvm-svn: 318190
-
Martin Storsjö authored
They don't actually change nay behaviour, as llvm-strings currently checks the whole object without looking at individual sections anyway. This allows using llvm-strings in a context that explicitly passes the -a option. Differential Revision: https://reviews.llvm.org/D40020 llvm-svn: 318185
-
Jake Ehrlich authored
This change adds a new flag not present in GNU objcopy that we call --strip-non-alloc. Differential Revision: https://reviews.llvm.org/D39926 llvm-svn: 318168
-
Jake Ehrlich authored
We haven't been supporting anything but ELF64LE since the start. Luckily this was always accounted for and the change is pretty trivial. B35281 requests this change for ELF32LE. This change adds support for ELF32LE, ELF64BE, and ELF32BE with all supported features that already existed for ELF64LE. Differential Revision: https://reviews.llvm.org/D39977 llvm-svn: 318166
-
Adam Nemet authored
Differential Revision: https://reviews.llvm.org/D39997 llvm-svn: 318159
-
Adam Nemet authored
The table is changed to fixed layout[1] and the lines use ellipses if they would overflow their cell. [1] https://css-tricks.com/fixing-tables-long-strings/ llvm-svn: 318136
-
Adam Nemet authored
Adjustable with an option. llvm-svn: 318135
-
Hans Wennborg authored
llvm-svn: 318115
-
- Nov 13, 2017
-
-
Jake Ehrlich authored
Many projects use this option. There are two ways to use it. You can either a) Just use --strip-debug and keep the old file with debug content or b) you can use --strip-debug, --only-keep-debug, and --add-gnu-debuglink all in conjunction to create two separate files, the stripped file and the debug file. --only-keep-debug is more complicated than --strip-debug because it keeps the section headers without keeping section contents. That's not really supported by llvm-objcopy at the moment but I plan on adding it. So this change just supports a) and options to support b) will come soon. Differential Revision: https://reviews.llvm.org/D39919 llvm-svn: 318094
-
Jake Ehrlich authored
This change adds a slightly less extreme form of stripping. It should remove any section that starts with ".debug" and should remove any symbol table or relocations. In general this strips out most of the stuff you don't need to execute but leaves a number of things around. This behavior has been designed to be compatible with GNU strip/objcopy --strip-all so that anywhere you currently use --strip-all you should be able to use llvm-objcopy as a drop in replacement. Differential Revision: https://reviews.llvm.org/D39769 llvm-svn: 318092
-
- Nov 10, 2017
-
-
Martin Storsjö authored
Also change some default cases into llvm_unreachable in WindowsResourceCOFFWriter, to make it easier to find if they are triggerd from within e.g. lld, which supported ARM64 earlier than llvm-cvtres did. Differential Revision: https://reviews.llvm.org/D39892 llvm-svn: 317942
-
Mitch Phillips authored
Refactors the behaviour of building graphs out of FileAnalysis, allowing for analysis of the GraphResult by the callee without having to rebuild the graph. Means when we want to analyse the constructed graph (planned for later revisions), we don't do repeated work. Also makes CFI verification in FileAnalysis now return an enum that allows us to differentiate why something failed, not just that it did/didn't fail. Reviewers: vlad.tsyrklevich Subscribers: kcc, pcc, llvm-commits Differential Revision: https://reviews.llvm.org/D39764 llvm-svn: 317927
-