- Jul 27, 2017
-
-
Rafael Espindola authored
This is a bit of a hack, but it is *so* convenient. Now that we create synthetic linker scripts when none is provided, we always have to handle paired OutputSection and OutputsectionCommand and keep a mapping from one to the other. This patch simplifies things by merging them and creating what used to be OutputSectionCommands really early. llvm-svn: 309311
-
Reid Kleckner authored
Summary: MSVC link.exe records all external symbol names in the publics stream. It provides similar functionality to an ELF .symtab. Reviewers: zturner, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35871 llvm-svn: 309303
-
George Rimar authored
Revert r309252 "[ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all" It broke bot: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/4231 llvm-svn: 309258
-
George Rimar authored
llvm-svn: 309254
-
George Rimar authored
That is slightly more convinent as allows to store pointer on program header entry in a more safe way. Change was used in 2 patches currently on review. Differential revision: https://reviews.llvm.org/D35832 llvm-svn: 309253
-
George Rimar authored
This is PR32112. Previously when we linked executable with --unresolved-symbols=ignore-all and undefined symbols, like: _start: callq und@PLT we did not create relocations, though it looks in that case we should delegate handling of such symbols to runtime linker, hence should emit them. Patch fixes that. Differential revision: https://reviews.llvm.org/D35724 llvm-svn: 309252
-
Rui Ueyama authored
We did the same thing for ELF in r309152, and I want to maintain COFF and ELF as close as possible. llvm-svn: 309239
-
Rafael Espindola authored
This shows that the logic in --gc-sections is a bit more precise than what can be easily done in LTO. llvm-svn: 309234
-
Rafael Espindola authored
With this we only ask LTO to keep a C named section if there is a __start_ or __end symbol. This is not as strict as lld's --gc-sections, but is as good as we can get without having a far more detailed ir summary. llvm-svn: 309232
-
Nico Weber authored
Matches link.exe https://reviews.llvm.org/D35872 llvm-svn: 309231
-
Rui Ueyama authored
llvm-svn: 309228
-
Rafael Espindola authored
It is __stop_<sec>, not __end_<sec>. llvm-svn: 309225
-
Rui Ueyama authored
Rename it because it was too easy to conflict with llvm::object::ObjectFile which broke buildbots several times. llvm-svn: 309199
-
- Jul 26, 2017
-
-
Meador Inge authored
This patch fixes a small issue with respect to how memory region names are parsed on output section descriptions. For example, consider: .text : { *(.text) } > rom That can also be written like: .text : { *(.text) } >rom The latter form is accepted by GNU LD and is fairly common. Differential Revision: https://reviews.llvm.org/D35920 llvm-svn: 309191
-
Rui Ueyama authored
llvm-svn: 309188
-
Rui Ueyama authored
I believe this compiles fine on all platforms, even on Windows. llvm-svn: 309182
-
Martin Storsjö authored
Also handle overflow correctly in LDR/STR relocations. Even if the offset range of a 8 byte LDR instruction is 15 bit (even if the immediate itself is 12 bit) due to a 3 bit shift, only include up to 12 bits of offset after doing the relocation, by limiting the range of the immediate by the number of shifted bits. Differential Revision: https://reviews.llvm.org/D35792 llvm-svn: 309175
-
Rafael Espindola authored
llvm-svn: 309162
-
Rafael Espindola authored
llvm-svn: 309161
-
Rafael Espindola authored
llvm-svn: 309160
-
Rafael Espindola authored
llvm-svn: 309153
-
Rafael Espindola authored
NFC, just makes it easier to access from non templated code. llvm-svn: 309152
-
George Rimar authored
Was discussed in D35797 thread. llvm-svn: 309096
-
George Rimar authored
Previously we handled this option implicitly, only for infering unresolved symbols handling policy. ld man says: "--noinhibit-exec Retain the executable output file whenever it is still usable", and we may want to handle other cases too. Differential revision: https://reviews.llvm.org/D35793 llvm-svn: 309091
-
George Rimar authored
This is PR30422, previously LLD did not render all option aliases in --help. With this patch it will. Differential revision: https://reviews.llvm.org/D35477 llvm-svn: 309089
-
Rui Ueyama authored
Since the flag is ignored anyway, it doesn't matter whether it is an alias or not. llvm-svn: 309055
-
Rafael Espindola authored
llvm-svn: 309053
-
Rafael Espindola authored
llvm-svn: 309051
-
Rafael Espindola authored
These can be referenced with __start_/__stop_ symbols. I will try to make this more precise in a followup patch. llvm-svn: 309048
-
- Jul 25, 2017
-
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D35768 llvm-svn: 309017
-
Nico Weber authored
The test used /manifestinput: without /manifest:embed, which isn't actually supported. Just remove this part of the test for now; if it's important to check this the llvm-readobj part should be extended to check this. llvm-svn: 309002
-
Nico Weber authored
Also emit an error if /manifestinput: is used without /manifest:embed. Increases compatibility with link.exe https://reviews.llvm.org/D35842 llvm-svn: 308998
-
George Rimar authored
Previously .init_array/.fini_array sections were not unique and we had 3 .init_array sections + 3 .fini_array input sections passed to linker, instead of 5 + 5. Differential revision: https://reviews.llvm.org/D35552 llvm-svn: 308958
-
George Rimar authored
This is PR33714. Previously for each input section offset of memory region was incremented on a size of output section. That resulted in a wrong error message saying about overflow. Patch fixes that. Differential revision: https://reviews.llvm.org/D35803 llvm-svn: 308955
-
Martin Storsjö authored
The same adjustment is already done for the entry point in Writer.cpp and for relocations that point to executable code in Chunks.cpp. Differential Revision: https://reviews.llvm.org/D35767 llvm-svn: 308953
-
Martin Storsjö authored
This is a test for LLVM SVN r308951. Differential Revision: https://reviews.llvm.org/D35814 llvm-svn: 308952
-
Rafael Espindola authored
llvm-svn: 308939
-
Tom Stellard authored
Summary: This fixes test/mach-o/objc-image-info-pass-output.yaml on big-endian hosts. Reviewers: lhames, kledzik, ruiu Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35052 llvm-svn: 308935
-
- Jul 24, 2017
-
-
Dmitry Mikulin authored
If user requested section alignment is greater than MaxPageSize, propagate it to segment headers correctly. Differential Revision: https://reviews.llvm.org/D35813 llvm-svn: 308930
-
Davide Italiano authored
Thanks to Rafael for finding it in a post-commit review. llvm-svn: 308921
-