Lang Hames
ac2adce66b
[lld][MachO] Recognize __thread_bss sections as zero-fill and set all the
...
appropriate bits.
This fixes the remaining clang regression test failures when linking clang with
lld on Darwin.
llvm-svn: 255390
2015-12-11 23:25:09 +00:00
Pete Cooper
5cd12580fd
Verify that macho-o delta64 relocs have the same offset.
...
The delta64 relocation is represented as the pair ARM64_RELOC_SUBTRACTOR and ARM64_RELOC_UNSIGNED.
Those should always have the same offset, so this adds a check and tests to ensure this is the case.
Also updated the error printing in this case to shows both relocs when erroring on pair.
llvm-svn: 255274
2015-12-10 18:48:52 +00:00
Lang Hames
201c08f811
[lld][MachO] Always reserve space for the empty string in the mach-o symbol
...
table.
The first entry in the MachO symbol table is always the empty string: make sure
we reserve space for it, or we will overflow the symbol table by one byte.
No test case - this manifests as an occasional memory error. In the near future
I hope to set up a bot building and runnnig LLD with sanitizers - that should
catch future instances of this issue.
llvm-svn: 255178
2015-12-10 00:12:24 +00:00
Pete Cooper
466d4b006b
Don't bypass the GOT for delta32toGOT references.
...
The gcc_except_tab was generating these references to point to the typeinfo in the data section.
gcc_except_tab also had the DW_EH_PE_indirect flag set which means that at runtime we are going
to dereference this entry as if it is in the GOT.
Reviewed by Nick Kledzik in http://reviews.llvm.org/D15360 .
llvm-svn: 255085
2015-12-09 00:46:02 +00:00
Rafael Espindola
9c8904fb38
Rename ld.lld2 to ld.lld since it is the default.
...
llvm-svn: 253437
2015-11-18 06:11:01 +00:00
Rafael Espindola
7477e99af7
Make ELF2 the default.
...
With this the only way to get the old elf linker is "-flavor old-elf".
llvm-svn: 253318
2015-11-17 07:19:44 +00:00
Rafael Espindola
97a8695aa1
Rename gnu2 to gnu.
...
This is the second step in making ELF2 the default.
llvm-svn: 253270
2015-11-16 23:21:55 +00:00
Rafael Espindola
7467461ccc
Rename the gnu flavour to gnu old.
...
This is the first step in making ELF2 the default.
llvm-svn: 253188
2015-11-16 08:54:19 +00:00
Eugene Zelenko
4154794892
Fix Clang-tidy modernize-use-auto warnings, other minor fixes.
...
Differential revision: http://reviews.llvm.org/D14553
llvm-svn: 252661
2015-11-10 22:37:38 +00:00
Kevin Enderby
35dfc95efe
These are the matching changes needed to the lld project for the changes to llvm
...
in r252192 that changed the Archive and Child interfaces in libObject. These include
Rafael Espindola’s many suggested updates.
llvm-svn: 252193
2015-11-05 19:25:47 +00:00
Eugene Zelenko
6e43b499d2
Fix Clang-tidy modernize-use-override warnings, other minor fixes.
...
Differential revision: http://reviews.llvm.org/D14310
llvm-svn: 252034
2015-11-04 02:11:57 +00:00
Lang Hames
2ed3bf9527
[lld][MachO] Make sure LC_RPATH command size is a multiple of the pointer size.
...
llvm-svn: 251637
2015-10-29 16:50:26 +00:00
Lang Hames
ac416d42fc
[lld][MachO] Use a std::string rather than a StringRef for the section name in
...
MachODefinedCustomSectionAtom.
The section names for these atoms are initialized from temporaries (e.g.
segName + "/" + sectName), so we can't use StringRef here.
llvm-svn: 251610
2015-10-29 03:57:31 +00:00
Simon Atanasyan
069b2dd66c
[Driver] Ignore -G option in both new and old ELF linker
...
This is optimization option that make sense for MIPS targets. We can
safely ignore it now.
llvm-svn: 251519
2015-10-28 14:50:58 +00:00
Simon Atanasyan
07fe7a943f
[Driver] Accept both -m <emulation> and -m<emulation>
...
GNU linkers accept both variants and at least for MIPS target gcc passes
joined variant of the '-m' option.
Differential Revision: http://reviews.llvm.org/D14133
llvm-svn: 251497
2015-10-28 05:13:12 +00:00
Lang Hames
b1b67f4daf
[lld][Darwin] Add support for the -sectcreate option.
...
llvm-svn: 251183
2015-10-24 08:20:51 +00:00
Lang Hames
5e7cfe4e2b
[lld][MachO] Prune unused EH frames.
...
llvm-svn: 251095
2015-10-23 05:39:16 +00:00
Craig Topper
f88d22970d
Update lld to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC
...
llvm-svn: 250904
2015-10-21 16:31:56 +00:00
Lang Hames
2483d8f4a7
[lld][MachO] Fix indentation.
...
llvm-svn: 250863
2015-10-20 21:47:19 +00:00
Lang Hames
650c00be89
[lld][MachO] Fix typo in comment.
...
llvm-svn: 250861
2015-10-20 21:44:30 +00:00
Rafael Espindola
7d76847da3
Simplify. NFC.
...
llvm-svn: 249128
2015-10-02 13:23:29 +00:00
Rafael Espindola
98efd89e7e
Use ld.lld2 as a argv[0] alias.
...
The reason for the name is so that we can run
./build/bin/clang -fuse-ld=lld2 test.o -o t
llvm-svn: 249122
2015-10-02 12:57:34 +00:00
Rui Ueyama
43155d0d48
[LLD] Fix Clang-tidy modernize-use-nullptr warnings; other minor cleanups.
...
Patch from Eugene Zelenko!
llvm-svn: 249111
2015-10-02 00:36:00 +00:00
Lang Hames
9a4c94ec5a
[lld][MachO] Fix a think-o to get the twolevel/dynamic_lookup test passing.
...
llvm-svn: 248736
2015-09-28 20:52:21 +00:00
Lang Hames
5c692009bc
[lld][MachO] Initial implementation of -flat_namespace and -undefined.
...
This is a basic initial implementation of the -flat_namespace and
-undefined options for LLD-darwin. It ignores several subtlties,
but the result is close enough that we can now link LLVM (but not
clang) on Darwin and pass all regression tests.
llvm-svn: 248732
2015-09-28 20:25:14 +00:00
Tom Stellard
d0626804fc
ELF/AMDGPU: Text section should be called .hsatext
...
Reviewers: atanasyan, ruiu
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12447
llvm-svn: 248621
2015-09-25 21:42:30 +00:00
Rui Ueyama
1392d8b5fe
Fix memory leak in FileArchive::find().
...
Patch from George Rimar!
llvm-svn: 248525
2015-09-24 18:59:26 +00:00
Lang Hames
c803442890
[LLD][MachO] Fix a FIXME: Subtract base address from atom address when building
...
export trie.
llvm-svn: 248217
2015-09-21 22:06:02 +00:00
Simon Atanasyan
92480f9a20
[Mips] Rejects all --hash-style arguments except 'sysv' in case of MIPS target
...
MIPS ABI supports only --hash-style=sysv variant.
llvm-svn: 247796
2015-09-16 13:36:32 +00:00
Simon Atanasyan
49c67236f1
[Mips] Do not show an error if R_MIPS_GPREL32 relocation has a non-local target
...
This matches GNU linker behaviour.
llvm-svn: 247795
2015-09-16 13:36:24 +00:00
Rui Ueyama
9071e4a6fa
Fix Clang-tidy misc-use-override warnings, other minor fixes.
...
Patch from Eugene Zelenko!
llvm-svn: 247323
2015-09-10 18:51:36 +00:00
Rui Ueyama
6b0af3c832
Fix -Wcovered-switch-default warnings.
...
llvm-svn: 246419
2015-08-31 06:46:00 +00:00
Rui Ueyama
692f8683d7
ELF: Fix "not all control paths return a value" warning.
...
llvm-svn: 246417
2015-08-31 06:32:25 +00:00
Simon Atanasyan
e235d45026
[Mips] Support grouping of multiple consecutive relocations in case of N32 and 64-bit MIPS ABIs
...
llvm-svn: 246337
2015-08-28 21:39:21 +00:00
Simon Atanasyan
9638d7d162
[Mips] Support two more MIPS linking emulation options elf32btsmipn32/elf32ltsmipn32
...
llvm-svn: 246336
2015-08-28 21:39:13 +00:00
Simon Atanasyan
f12120cfe9
[Mips] Make "emulation" option less dependent on the "-target" option.
...
Now it is possible to have mips-linux-gnu-ld executable and link MIPS 64-bit
little-endian binaries providing -melf64ltsmip command line argument.
llvm-svn: 246335
2015-08-28 21:39:06 +00:00
Simon Atanasyan
6d39140b6e
[Mips] Initial support of the MIPS N32 ABI
...
llvm-svn: 246334
2015-08-28 21:39:00 +00:00
Tom Stellard
8251f978d3
ELF/AMDGPU: Add more misssing: using namespace lld;
...
Hopefully, this will resolve the remaining windows bot errors.
llvm-svn: 246181
2015-08-27 18:43:12 +00:00
Tom Stellard
39b3d71177
ELF/AMDGPU: Add missing: using namespace lld; to try to fix windows bot
...
llvm-svn: 246179
2015-08-27 18:27:52 +00:00
Tom Stellard
fbbbc01caa
ELF/AMDGPU: Remove another unused private member variable
...
llvm-svn: 246164
2015-08-27 17:11:10 +00:00
Tom Stellard
36c6f6b874
ELF/AMDGPU: Remove unused private member variable
...
This should fix the one of the failing bots.
llvm-svn: 246160
2015-08-27 16:52:58 +00:00
Tom Stellard
ff8dfbd965
ELF/AMDGPU: Attempt to fix windows bots
...
Broken by r246155.
llvm-svn: 246159
2015-08-27 16:48:46 +00:00
Tom Stellard
15d1fa1bcc
ELF: Add AMDGPU ReaderWriter
...
This is a basic implementation that allows lld to emit binaries
consumable by the HSA runtime.
Differential Revision: http://reviews.llvm.org/D11267
llvm-svn: 246155
2015-08-27 15:55:44 +00:00
Davide Italiano
b3c7fb7f24
[LinkerScript] Fix a crash when matching wildcards.
...
Submitted by: zan jyu via llvm-dev
llvm-svn: 245792
2015-08-22 20:36:19 +00:00
Simon Atanasyan
814b705984
[Mips] Use 'or' for move instead of [d]addu in PLT entries
...
Patch by Simon Dardis.
Differential Revision: http://reviews.llvm.org/D12103
llvm-svn: 245491
2015-08-19 20:20:10 +00:00
Rafael Espindola
f0461ba985
Update for llvm api change.
...
llvm-svn: 244856
2015-08-13 01:07:08 +00:00
Rafael Espindola
bdc8f2fb83
Update for llvm api change.
...
llvm-svn: 244849
2015-08-13 00:31:46 +00:00
David Blaikie
a3191ef66b
Wdeprecated: Remove unnecessary user-defined dtor that was getting in the way of the default ops (copy construction, assignment, etc)
...
llvm-svn: 244836
2015-08-12 23:26:58 +00:00
Denis Protivensky
90512d5440
[ELF] Remove TargetLayout::getCustomSegments methods
...
llvm-svn: 244747
2015-08-12 13:27:27 +00:00
Denis Protivensky
0c8beb1c95
[LinkerScript] Process program header in PHDRS command
...
Add PT_PHDR segment depending on its availability in linker script's
PHDRS command, fallback if no linker script is given.
Handle FILEHDR, PHDRS and FLAGS attributes of program header.
Differential Revision: http://reviews.llvm.org/D11589
llvm-svn: 244743
2015-08-12 12:31:35 +00:00