- Feb 08, 2017
-
-
Michal Gorny authored
Fix the test zlib conditional to use LLVM_ENABLE_ZLIB value when building stand-alone. The HAVE_LIBZ is not available when performing a stand-alone build. Since the zlib support is a feature of the underlying LLVM library, it exports the actual status as the final value of LLVM_ENABLE_ZLIB in LLVMConfig. While at it, canonicalize the boolean value into 0/1 and remove unused CMake definitions (most likely copied from clang). Differential Revision: https://reviews.llvm.org/D29340 llvm-svn: 294508
-
Michal Gorny authored
Use both LLD- and LLVM-specific binary&library directories when LLD is being built stand-alone. This ensures that the freshly built tools and libraries are found and used correctly. Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR to locate lld, and set PATH and LD_LIBRARY_PATH. When doing a stand-alone builds, these variables represent the installed LLVM. As a result, tests either fail due to missing lld executables/libraries or use an earlier installed LLD version rather than the one being built. To solve this, an additional LLD_TOOLS_DIR and LLD_LIBS_DIR variables are added that are populated using LLVM_*_OUTPUT_INTDIR. Those variables are populated with directories used to output built executables and libraries. In stand-alone builds, they represent the directories used by LLD. In integrated builds, they have the same values as LLVM_*_DIR and therefore using them does not harm. The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure that freshly built binaries are preferred over potentially earlier installed ones. Furthermore, the resulting PATH is used to locate tools for substitutions since the search includes both tools built as part of LLD and of LLVM. Differential Revision: https://reviews.llvm.org/D29335 llvm-svn: 294507
-
Rui Ueyama authored
The test is failing on the bot because "/subsystem:console" was truncated for some reason. I don't know why that is happening on that machine (it is not reproducible on my Windows machine). In this patch, I'm trying to tame it by making the output shorter. llvm-svn: 294502
-
Bob Haarman authored
Summary: This adds an option to save temporary files generated during link-time optimization. This can be useful for debugging. Reviewers: ruiu, pcc Reviewed By: ruiu, pcc Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D29518 llvm-svn: 294498
-
George Rimar authored
Recommit r294464 "[ELF] - Added partial support for --emit-relocs (no --gc-section case, no /DISCARD/ support) #3" with temporarily file name fix in testcase. Original commit message: -q, --emit-relocs - Generate relocations in output Simplest implementation: * no GC case, * no "/DISCARD/" linkerscript command support. This patch is extracted from D28612 / D29636, Relative to PR31579. Differential revision: https://reviews.llvm.org/D29663 llvm-svn: 294469
-
George Rimar authored
Reverted r294464 "[ELF] - Added partial support for --emit-relocs (no --gc-section case, no /DISCARD/ support) #3" Broked build bot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/5835/steps/test/logs/stdio llvm-svn: 294466
-
George Rimar authored
-q, --emit-relocs - Generate relocations in output Simplest implementation: * no GC case, * no "/DISCARD/" linkerscript command support. This patch is extracted from D28612 / D29636, Relative to PR31579. Differential revision: https://reviews.llvm.org/D29663 llvm-svn: 294464
-
Rafael Espindola authored
This reverts commit r294346. Looks like it regressed the build of magenta. llvm-svn: 294460
-
George Rimar authored
OUTPUT_ARCH command can contain architecture values separated with ":", like: OUTPUT_ARCH(i386:x86-64) We did not support that, because got 3 lexer tokens here after recent changes. This trivial patch fixes the issue, now whole expression inside OUTPUT_ARCH is just ignored. Differential revision: https://reviews.llvm.org/D29640 llvm-svn: 294432
-
George Rimar authored
Addressing post commit comments, it do nothing relative with orphans. llvm-svn: 294429
-
Petr Hosek authored
LLD already parses ALIGN expression to specifiy alignment for output sections in linker scripts but it never applies the alignment to the output section. This change handles that. Differential Revision: https://reviews.llvm.org/D29689 llvm-svn: 294374
-
- Feb 07, 2017
-
-
Rafael Espindola authored
We now just keep the address the section would have if it was allocatable. Only the writer ignores it at the very end. llvm-svn: 294346
-
Dmitry Mikulin authored
{ global : local; local: *; }; llvm-svn: 294343
-
George Rimar authored
DefinedSynthetic symbols are attached to sections, for the case when such symbol was attached to non-allocated section, we calculated its value incorrectly. We subtracted Body->Section->Addr, but non-allocatable sections should have zero VA in output and therefore result value was wrong. And at the same time we have Body->Section->Addr != 0 for them internally because use it for calculation of section size. Patch fixes calculation of such symbols values. Differential revision: https://reviews.llvm.org/D29653 llvm-svn: 294322
-
George Rimar authored
For case when LLD should error out, llm-readobj was called, what worked because argument was an output from first test run. llvm-svn: 294310
-
George Rimar authored
We had assignSymbol and assignSectionSymbol methods which has similar functionality. Patch removes one of copy and reuses another in code. Differential revision: https://reviews.llvm.org/D29582 llvm-svn: 294290
-
George Rimar authored
Previously we did not do that. For example, for R_386_PC8, 0xFF addend was not treated as 0xFFFFFFFF(-1), but was 0x000000FF. Recently added checks for R_386_PC8/R_386_PC16 failed because of calculation overflow as a result. Differential revision: https://reviews.llvm.org/D29490 llvm-svn: 294289
-
Saleem Abdulrasool authored
The parameter to /debugtype is user provided and may be invalid. Ensure that we gracefully handle bad input. llvm-svn: 294280
-
Saleem Abdulrasool authored
If `/debugtypes` is used to omit the codeview information, we would not have constructed the debug info codeview record which is used to tie the PDB to the binary. In such a case, rub out the GUID and Age fields. llvm-svn: 294279
-
- Feb 06, 2017
-
-
Rui Ueyama authored
If relocations don't have addends, addends are embedded in operands. getImplicitAddend is a function to read addends. Addends can be negative numbers, so the return type of the function should be a signed integer type. llvm-svn: 294253
-
Rafael Espindola authored
We now create a dummy section with index 1 before processing the linker script. Thanks to George Rimar for finding the bug and providing the initial testcase. llvm-svn: 294252
-
Rui Ueyama authored
I believe that the test is flakey because the order of stdout and stderr is not deterministic. llvm-svn: 294238
-
Rui Ueyama authored
This patch defines a new command line option, /MSVCLTO, to LLD. If that option is given, LLD invokes link.exe to link LTO-generated object files. This is hacky but useful because link.exe can create PDB files. Differential Revision: https://reviews.llvm.org/D29526 llvm-svn: 294234
-
George Rimar authored
Removes dependency on second input file. llvm-svn: 294178
-
- Feb 05, 2017
-
-
Rui Ueyama authored
llvm-svn: 294117
-
- Feb 04, 2017
-
-
Bob Haarman authored
llvm-svn: 294064
-
- Feb 03, 2017
-
-
Rafael Espindola authored
Now that each OutputSectionCommand maps to just one OutputSection, we can remove a few std::vectors. llvm-svn: 294060
-
Rafael Espindola authored
llvm-svn: 294057
-
Rafael Espindola authored
Now that it doesn't impact which sections are merged, this is not a problem. llvm-svn: 294054
-
Rafael Espindola authored
Now that we combine multiple synthetic merge section into one output section there is no point in trying to propagate a value. llvm-svn: 294048
-
Rafael Espindola authored
This is a fix for Bugzilla 31813. The problem is that the tokenizer does not create a separate token for ":" unless there's white space before it. Changed it to always create a token for ":" and reworked some logic that relied on ":" being attached to some tokens like "global:" and "local:". llvm-svn: 294006
-
Rafael Espindola authored
With a synthetic merge section we can have, for example, a single .rodata section with stings, fixed sized constants and non merge constants. I can be simplified further by not setting Entsize, but that is probably better done is a followup patch. This should allow some cleanup in the linker script code now that every output section command maps to just one output section. llvm-svn: 294005
-
Ismail Donmez authored
llvm-svn: 293996
-
Mehdi Amini authored
This reverts commit r293970. After more discussion, this belongs to the linker side and there is no added value to do it at this level. llvm-svn: 293993
-
Bob Haarman authored
llvm-svn: 293986
-
Mehdi Amini authored
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO. This is a recommit of r293912 after fixing build failures, and a recommit of r293918 after fixing LLD tests. Differential Revision: https://reviews.llvm.org/D28978 llvm-svn: 293970
-
Bob Haarman authored
Summary: The COFF linker previously implemented link-time optimization using an API which has now been marked as legacy. This change refactors the COFF linker to use the new LTO API, which is also used by the ELF linker. Reviewers: pcc, ruiu Reviewed By: pcc Subscribers: mgorny, mehdi_amini Differential Revision: https://reviews.llvm.org/D29059 llvm-svn: 293967
-
Bob Haarman authored
llvm-svn: 293966
-
Bob Haarman authored
Summary: llvm/CodeGen/CommandFlags.h a utility function InitTargetOptionsFromCodeGenFlags which is used to set target options from flags based on the command line. The command line flags are stored in globals defined in the same file, and including the file in multiple places causes the globals to be defined multiple times, leading to linker errors. This change adds a single place in lld where these globals are defined and exports only the utility function. This makes it possible to call InitTargetOptionsFromCodeGenFlags from multiple places in lld, which a follow-up change will do. Reviewers: davide, ruiu Reviewed By: davide, ruiu Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D29058 llvm-svn: 293965
-
Rui Ueyama authored
llvm-svn: 293963
-