- Nov 23, 2016
-
-
Rui Ueyama authored
We have different functions to stringize objects to construct error messages. For InputFile, we have getFilename, and for InputSection, we have getName. You had to memorize them. I think this is the case where the function overloading comes in handy. This patch defines toString() functions that are overloaded for all these types, so that you just call it in error(). Differential Revision: https://reviews.llvm.org/D27030 llvm-svn: 287787
-
Ed Maste authored
Align to the large page size (known as a superpage or huge page). FreeBSD automatically promotes large, superpage-aligned allocations. Differential Revision: https://reviews.llvm.org/D27042 llvm-svn: 287782
-
- Nov 11, 2016
-
-
Eugene Leviant authored
llvm-svn: 286590
-
- Nov 10, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26349 llvm-svn: 286443
-
- Aug 17, 2016
-
-
Michael J. Spencer authored
The FreeBSD kernel relies on this behavior to not overwrite the boot loader. llvm-svn: 278889
-
- Jul 20, 2016
-
-
Rafael Espindola authored
We will need to do something like this to support range extension thunks since that process is iterative. Doing this also has the advantage that when doing the regular relocation scan the offset in the output section is known and we can just store that. This reduces the number of times we have to run getOffset and I think will allow a more specialized .eh_frame representation. By itself this is already a performance win. firefox master 7.295045737 patch 7.209466989 0.98826892235 chromium master 4.531254468 patch 4.509221804 0.995137623774 chromium fast master 1.836928973 patch 1.823805241 0.992855612714 the gold plugin master 0.379768791 patch 0.380043405 1.00072310839 clang master 0.642698284 patch 0.642215663 0.999249070657 llvm-as master 0.036665467 patch 0.036456225 0.994293213284 the gold plugin fsds master 0.40395817 patch 0.404384555 1.0010555177 clang fsds master 0.722045545 patch 0.720946135 0.998477367518 llvm-as fsds master 0.03292646 patch 0.032759965 0.994943428477 scylla master 3.427376378 patch 3.368316181 0.98276810292 llvm-svn: 276146
-
- Jul 14, 2016
-
-
Rui Ueyama authored
llvm-svn: 275447
-
- Jul 13, 2016
-
-
Rui Ueyama authored
Patch by H.J Lu. For x86-64 psABI, the entry size of .got and .got.plt sections is 8 bytes for both LP64 and ILP32. Add GotEntrySize and GotPltEntrySize to ELF target instead of using size of ELFT::uint. Now we can generate a simple working x32 executable. Differential Revision: http://reviews.llvm.org/D22288 llvm-svn: 275301
-
Rui Ueyama authored
Config members are named after corresponding command line options. This patch renames VAStart ImageBase so that they are in line with --image-base. Differential Revision: http://reviews.llvm.org/D22277 llvm-svn: 275298
-
- Jul 10, 2016
-
-
Rui Ueyama authored
Only MipsThunk were using the function, and the way how it wrote thunk contents was different from ARM thunks. This patch makes them consistent. llvm-svn: 274997
-
- Jul 08, 2016
-
-
Peter Smith authored
The TinyPtrVector of const Thunk<ELFT>* in InputSections.h can cause build failures on certain compiler/library combinations when Thunk<ELFT> is not a complete type or is an abstract class. Fixed by making Thunk<ELFT> non Abstract. type or is an abstract class llvm-svn: 274863
-
Peter Smith authored
This seems to be causing a buildbot failure on lld-x86_64-freebsd. Will reproduce locally and fix. llvm-svn: 274841
-
Peter Smith authored
Generalise the Mips LA25 Thunk code and implement ARM and Thumb interworking Thunks. - Introduce a new module Thunks.cpp to store the Target Specific Thunk implementations. - DefinedRegular and Shared have a ThunkData field to record Thunk. - A Target can have more than one type of Thunk. - Support PC-relative calls to Thunks. - Support Thunks to PLT entries. - Existing Mips LA25 Thunk code integrated. - Support for ARMv7A interworking Thunks. Limitations: - Only one Thunk per SymbolBody, this is sufficient for all currently implemented Thunks. - ARM thunks assume presence of V6T2 MOVT and MOVW instructions. Differential revision: http://reviews.llvm.org/D21891 llvm-svn: 274836
-
- Jun 17, 2016
-
-
Rui Ueyama authored
llvm-svn: 272976
-
- Jun 16, 2016
-
-
Rui Ueyama authored
PltZero (or PLT[0]) was an appropriate name for the little code we have at beginning of the PLT section when we only supported x86 since the code for x86 just fits in the first PLT slot. It's not the case anymore. The code for ARM64 occupies first two slots, so PltZero spans PLT[0] and PLT[1], for example. This patch renames it to avoid confusion. llvm-svn: 272913
-
Rui Ueyama authored
For ARM and MIPS, we don't need to call this function. This patch passes a symbol instead of a PLT entry address so that the target handler can call it if necessary. llvm-svn: 272910
-
- Jun 08, 2016
-
-
Rui Ueyama authored
llvm-svn: 272146
-
- Jun 05, 2016
-
-
Rafael Espindola authored
It will also be used for GT_TO_IE relaxations. llvm-svn: 271813
-
Rafael Espindola authored
It will be used for more than just gots. llvm-svn: 271812
-
- Jun 02, 2016
-
-
Rafael Espindola authored
This is mostly extracted from http://reviews.llvm.org/D18960. The general idea for tlsdesc is that the two GD got entries are used for a function pointer and its argument. The dynamic linker sets both. In the non-dlopen case the dynamic linker sets the function to the identity and the argument to the offset in the tls block. All that the static linker has to do in the non-dlopen case is relocate the code to point to the got entries and create a dynamic relocation. The dlopen case is more complicated, but can be implemented in another patch. llvm-svn: 271569
-
- Jun 01, 2016
-
-
George Rimar authored
Patch implements next relaxation from latest ABI: "Convert memory operand of test and binop into immediate operand, where binop is one of adc, add, and, cmp, or, sbb, sub, xor instructions, when position-independent code is disabled." It is described in System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations"). Differential revision: http://reviews.llvm.org/D20793 llvm-svn: 271405
-
Rafael Espindola authored
This reverts commit r271365. Sorry, wrong branch. llvm-svn: 271366
-
Rafael Espindola authored
llvm-svn: 271365
-
- May 26, 2016
-
-
George Rimar authored
llvm-svn: 270847
-
- May 25, 2016
-
-
George Rimar authored
System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations") introduces possible relaxations for R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. That patch implements the next relaxation: mov foo@GOTPCREL(%rip), %reg => lea foo(%rip), %reg and also opens door for implementing all other ones. Implementation was suggested by Rafael Ávila de Espíndola with few additions and testcases by myself. Differential revision: http://reviews.llvm.org/D15779 llvm-svn: 270705
-
- May 24, 2016
-
-
Rafael Espindola authored
This reverts commit r270551. Sorry, I commited the wrong branch :-( llvm-svn: 270554
-
Rafael Espindola authored
llvm-svn: 270551
-
- May 20, 2016
-
-
Rafael Espindola authored
This adds direct support for computing offsets from the thread pointer for both variants. Of the architectures we support, variant 1 is used only by aarch64 (but that doesn't seem to be documented anywhere.) llvm-svn: 270243
-
- May 18, 2016
-
-
Rafael Espindola authored
Lazy binding is quite important for use case like a shared build of llvm. Also, if someone wants to disable it, it is better done in the compiler (disable plt generation). The only reason to keep it is to make it easier to add a new architecture. But it doesn't really help much as it is possible to start with non lazy relocation and plt code but still let the generic part create a dedicated .got.plt and .rela.plt. llvm-svn: 269982
-
- May 09, 2016
-
-
Rafael Espindola authored
llvm-svn: 268945
-
- May 04, 2016
-
-
Rafael Espindola authored
It was an old hack to avoid duplicating expression computation, but that is not needed with getExprRel. llvm-svn: 268515
-
Rafael Espindola authored
llvm-svn: 268501
-
- Apr 28, 2016
-
-
Rafael Espindola authored
It was never a particularly good name and is now completely out of date. llvm-svn: 267886
-
- Apr 27, 2016
-
-
Simon Atanasyan authored
llvm-svn: 267673
-
- Apr 25, 2016
-
-
Simon Atanasyan authored
MIPS is the only target requires GOT header. We already have MIPS specific code in the `GotSection` class, so move MIPS GOT header generation there and delete redundant stuff like `GotHeaderEntriesNum` field and `writeGotHeader` method. Differential Revision: http://reviews.llvm.org/D19465 llvm-svn: 267460
-
Rafael Espindola authored
llvm-svn: 267394
-
- Apr 21, 2016
-
-
Rafael Espindola authored
llvm-svn: 267018
-
Rafael Espindola authored
It can be made redundant with getRelExpr. llvm-svn: 267012
-
Rafael Espindola authored
It was only used there. llvm-svn: 267002
-
- Apr 20, 2016
-
-
Rafael Espindola authored
It can be computed from the expression. llvm-svn: 266890
-