- Mar 14, 2017
-
-
George Rimar authored
That moves all members that s possible to move for now (all which does not depend on ELFT templating). After that change LinkerScript contains only 8 methods in total, and I believe it is possible to move them all after tweaking other parts of linker. And we will be able to have single class for linkerscript at the end. llvm-svn: 297735
-
George Rimar authored
llvm-svn: 297734
-
George Rimar authored
llvm-svn: 297732
-
George Rimar authored
It does not use ELFT templates so can be non-virtual. llvm-svn: 297727
-
George Rimar authored
It does not use ELFT templates so can be non-virtual. llvm-svn: 297725
-
George Rimar authored
That makes it not dependent on virtual call, keeping logic the same. llvm-svn: 297723
-
George Rimar authored
One more step to combine LinkerScript and LinkerScriptBase. llvm-svn: 297722
-
George Rimar authored
OutputSectionFactory has no ELFT templates anymore. llvm-svn: 297720
-
George Rimar authored
llvm-svn: 297719
-
George Rimar authored
llvm-svn: 297718
-
George Rimar authored
llvm-svn: 297717
-
George Rimar authored
We can move all not templated functionality to LinkerScriptBase. Patch do that for hasPhdrsCommands() and shows how it helps to detemplate things in other places. Probably we should be able to merge these 2 classes into single one after such steps. Even if not, it still looks as reasonable cleanup for me. Differential revision: https://reviews.llvm.org/D30895 llvm-svn: 297714
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D30832 llvm-svn: 297713
-
Eugene Leviant authored
lld crashes when .eh_frame or .eh_frame_hdr section is discarded in linker script and there is no PHDRS directive. Differential revision: https://reviews.llvm.org/D30885 llvm-svn: 297712
-
Eugene Leviant authored
Synthetic sections don't belong to any input file, but still they are input sections. Whenever problem occurs with relocations in these sections lld crashes in error reporting, trying to print input file name. Differential revision: https://reviews.llvm.org/D30889 llvm-svn: 297711
-
Rui Ueyama authored
llvm-svn: 297687
-
Rui Ueyama authored
llvm-svn: 297686
-
- Mar 13, 2017
-
-
Rui Ueyama authored
Previously, it created a temporary directory and then failed when FileOutputBuffer tried to rename that file to the destination file (which is actually a directory name). Differential Revision: https://reviews.llvm.org/D30912 llvm-svn: 297679
-
Rui Ueyama authored
llvm-svn: 297677
-
Rui Ueyama authored
Patch from James Henderson. If a user has a long link, e.g. due to a large LTO link, they do not wish to run it and find that it failed because there was a mistake in their command-line, after they waited for some significant amount of time. This change adds some basic checking of the linker output file path, which is run shortly after parsing the command-line and linker script. An error is emitted if LLD cannot write to the specified path. Differential Revision: https://reviews.llvm.org/D30449 llvm-svn: 297645
-
Peter Collingbourne authored
Fix a bug introduced in r297313 which caused them to resolve to the end of the ELF header in PIEs and DSOs. Differential Revision: https://reviews.llvm.org/D30843 llvm-svn: 297638
-
George Rimar authored
llvm-svn: 297622
-
- Mar 10, 2017
-
-
Petr Hosek authored
Differential Revision: https://reviews.llvm.org/D30628 llvm-svn: 297525
-
Rui Ueyama authored
Options can start with `-` or `--` unless they start with "o". Any option that starts with `-o` should be interpreted as an output file name. This is a quote from the GNU ld man page. Note -- there is one exception to this rule. Multiple letter options that start with a lower case 'o' can only be preceded by two dashes. This is to reduce confusion with the -o option. So for example -omagic sets the output file name to magic whereas --omagic sets the NMAGIC flag on the output. We didn't handle that properly before. llvm-svn: 297508
-
Petr Hosek authored
Using .eh_frame input section pattern in linker script currently causes a crash; this is because .eh_frame input sections require special handling since they're all combined into a synthetic section rather than regular output section. Differential Revision: https://reviews.llvm.org/D30627 llvm-svn: 297501
-
Rafael Espindola authored
It is available from ScriptBase. llvm-svn: 297472
-
Rafael Espindola authored
This is a small step for fixing pr32031, which needs expressions that point to input sections. llvm-svn: 297431
-
- Mar 09, 2017
-
-
Rui Ueyama authored
This is an alternative to https://reviews.llvm.org/D30500 to simplify the version definition parser and allow ":" in symbol names. Differential Revision: https://reviews.llvm.org/D30722 llvm-svn: 297402
-
George Rimar authored
gold linker manual describes them as: -z text Do not permit relocations in read-only segments -z notext Permit relocations in read-only segments (default) In LLD default is to not permit them. Patch implements -z notext. Differential revision: https://reviews.llvm.org/D30530 llvm-svn: 297366
-
George Rimar authored
.eh_frame_hdr is a header constructed for .eh_frame sections. We do not proccess .eh_frame when doing relocatable output, so should not try to create .eh_frame_hdr too. Previous behavior without this patch is segfault. Fixes PR32118. Differential revision: https://reviews.llvm.org/D30566 llvm-svn: 297365
-
Rui Ueyama authored
Previously, if you have foo=bar in a definition file, this assertion could fire because when symbols are read from file they could be mangled. It seems that due to historical reasons underscore mangling scheme is really ad-hoc, and I cannot find a clean way to handle this. I had to just de-mangle symbols to search again. llvm-svn: 297357
-
Rui Ueyama authored
This assertion is failing on a Chromium builder and I cannot figure out why. This patch let it print out more info. llvm-svn: 297353
-
- Mar 08, 2017
-
-
Rafael Espindola authored
With this we have a single section hierarchy. It is a bit less code, but the main advantage will be in a future patch being able to handle foo = symbol_in_obj; in a linker script. Currently that fails since we try to find the output section of symbol_in_obj. With this we should be able to just return an InputSection from the expression. llvm-svn: 297313
-
Rafael Espindola authored
llvm-svn: 297305
-
Rui Ueyama authored
This reverts commit r297008 because it's reported that that change broke AArch64 bots. llvm-svn: 297297
-
Rafael Espindola authored
llvm-svn: 297293
-
Rafael Espindola authored
llvm-svn: 297292
-
Rafael Espindola authored
It is sufficiently different in that it returns an offset in the input file, not the output section. llvm-svn: 297290
-
Rafael Espindola authored
llvm-svn: 297287
-
Rafael Espindola authored
llvm-svn: 297286
-