Shankar Easwaran
d4ac74ffcc
[lld][ELF] Order segments
...
llvm-svn: 176207
2013-02-27 20:24:47 +00:00
Michael J. Spencer
2e41976893
[test] Don't start elf-dump until lld-core is done writing the output.
...
llvm-svn: 176205
2013-02-27 20:01:43 +00:00
Michael J. Spencer
f10c0a3aa0
[ELF][Writer] Fill in dynamic table entries.
...
llvm-svn: 176045
2013-02-25 20:03:09 +00:00
Shankar Easwaran
596b40871a
[ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)
...
llvm-svn: 175997
2013-02-24 16:02:24 +00:00
Shankar Easwaran
db74ffbe72
[ELF][Hexagon]add typeZeroFillFast
...
llvm-svn: 175983
2013-02-24 03:09:10 +00:00
Michael J. Spencer
3407211b2f
[ELF][Writer] Add hash table.
...
llvm-svn: 175972
2013-02-23 19:46:18 +00:00
Michael J. Spencer
13db19d64e
[ELF][Writer] Add a PHDR program table entry for dynamic files.
...
llvm-svn: 175951
2013-02-23 03:58:06 +00:00
Michael J. Spencer
942dbcc209
[ELF][Writer] Add dynamic string and symbol table.
...
llvm-svn: 175941
2013-02-23 01:02:31 +00:00
Shankar Easwaran
8c55c01d2a
sort quickdata for the hexagon target
...
llvm-svn: 175904
2013-02-22 18:01:08 +00:00
Shankar Easwaran
873c9ffba0
add changes for typeDataFast
...
llvm-svn: 175901
2013-02-22 17:18:53 +00:00
Michael J. Spencer
e4c0e3712f
[ELF][Writer] Add .interp section.
...
llvm-svn: 175657
2013-02-20 20:13:47 +00:00
Michael J. Spencer
b71ce655a8
[ELF][Writer] Add dynamic table.
...
llvm-svn: 175654
2013-02-20 19:46:12 +00:00
Shankar Easwaran
25832ede03
functionality to handle global atoms in Merge sections
...
llvm-svn: 175636
2013-02-20 17:38:37 +00:00
Michael J. Spencer
be03e2a861
[Core,Driver,ELF] Differentiate static and dynamic executables.
...
This also adds a simple relocation change for dynamic executables to
x86-64 ELF.
llvm-svn: 175208
2013-02-14 20:32:00 +00:00
Shankar Easwaran
96d594b14e
add merge strings option, this temporarily fixes the problem bringing up helloworld with glibc on x86_64
...
llvm-svn: 175038
2013-02-13 06:12:52 +00:00
Shankar Easwaran
0da6d71b54
add support for merging common strings
...
llvm-svn: 174990
2013-02-12 18:46:53 +00:00
Michael J. Spencer
c3c8bc1e5c
[ELF] Add support for reading dynamic libraries.
...
llvm-svn: 174916
2013-02-11 23:03:35 +00:00
Shankar Easwaran
710b4c8fa2
fix segment ordering of elf segments
...
llvm-svn: 174659
2013-02-07 20:33:55 +00:00
Shankar Easwaran
34ab70f1e6
add changes for layoutafter/layoutbefore/ingroup/layoutpass and test cases
...
llvm-svn: 174658
2013-02-07 20:16:12 +00:00
Michael J. Spencer
7799d15f6e
[Driver] Add -L and -l support.
...
llvm-svn: 174590
2013-02-07 06:47:17 +00:00
Michael J. Spencer
7a0e212f6f
[ELF][x86-64] Handle PLT32 relocations to IFUNC.
...
llvm-svn: 174428
2013-02-05 19:15:03 +00:00
Michael J. Spencer
359b6ff6bb
[ELF] Implement GOTPCREL for defined atoms.
...
llvm-svn: 174426
2013-02-05 19:14:28 +00:00
Michael J. Spencer
e6ab9f80a7
[ELF] Replace local dynamic tls access with direct access.
...
llvm-svn: 174425
2013-02-05 19:14:07 +00:00
Shankar Easwaran
d476528e3d
add alignment to .got/.got.plt/.plt sections & fix tests
...
llvm-svn: 174199
2013-02-01 18:03:32 +00:00
Michael J. Spencer
08b49bf27e
[ELF][x86-64] Fix ifunc and add test.
...
In an previous commit I managed to completely disable the IRELATIVE relocation
writing code. I also used the wrong addend for the static relocation. Fix both
these issues and add a test. This test is quite brittle because there's no way
to do arithmetic on variables in FileCheck.
llvm-svn: 174161
2013-02-01 09:14:21 +00:00
Michael J. Spencer
b5d6f5e988
[ELF][x86-64] Implement static relocation model for TLS.
...
This implements the static relocation model for GOT accesses to TLS.
llvm-svn: 174155
2013-02-01 07:14:14 +00:00
Michael J. Spencer
b0ed8e80d8
[ELF][x86-84] Add static TLS support.
...
llvm-svn: 174154
2013-02-01 07:13:49 +00:00
Michael J. Spencer
289dcedea5
[ELF] Add support for IFUNC.
...
This sadly doesn't have a test for the final
output because llvm-objdump can't dump relocations
that don't belong to a section :(
llvm-svn: 173808
2013-01-29 16:38:03 +00:00
Michael J. Spencer
d269a3e281
[ELF] Use correct regex in test.
...
llvm-svn: 173665
2013-01-28 06:11:39 +00:00
Michael J. Spencer
990ec2b223
[ELF] Use entry point from LinkerOptions.
...
Patch by Ahmed Bougacha!
llvm-svn: 173655
2013-01-28 04:15:44 +00:00
Michael J. Spencer
5ba1a96a10
[ELF][x86-64] Add relocation string<->kind.
...
llvm-svn: 173533
2013-01-25 23:48:58 +00:00
Michael J. Spencer
866e0f8a8c
[ELF][X86-64] Use the correct base address.
...
llvm-svn: 173527
2013-01-25 23:23:24 +00:00
Nick Kledzik
36293f6512
Add SectionPosition and OrderPass
...
llvm-svn: 173300
2013-01-23 22:32:56 +00:00
Michael J. Spencer
563d33a6f1
[ELF] Read IFUNC symbols correctly as typeResolver.
...
llvm-svn: 173299
2013-01-23 22:08:46 +00:00
Michael J. Spencer
64afcb4c6b
Move everything over to TargetInfo.
...
I really would have liked to split this patch up, but it would greatly
complicate the lld-core and lld drivers having to deal with both
{Reader,Writer}Option and TargetInfo.
llvm-svn: 173217
2013-01-23 01:18:43 +00:00
Michael J. Spencer
fe71a50494
Trailing whitespace.
...
llvm-svn: 172554
2013-01-15 21:13:14 +00:00
Michael J. Spencer
8b3898af26
[ELF] Never allocate content to weak symbols as they may be merged away.
...
This is done by creating a new non-weak anonymous symbol and creating
an atom with content for that symbol. This is added after the weak symbol
so that they have the same address.
llvm-svn: 172553
2013-01-15 21:13:02 +00:00
Nick Kledzik
233f537799
Add new merge-by-content Merge attribute for use by anonymous
...
constants and string literals which the linker should coalesce.
llvm-svn: 172495
2013-01-15 00:17:57 +00:00
Michael J. Spencer
ca20ffbab2
[test] Fix tests on Windows.
...
llvm-svn: 172339
2013-01-13 01:09:51 +00:00
Shankar Easwaran
7381db059a
add noinhibit exec option
...
llvm-svn: 172204
2013-01-11 15:11:47 +00:00
Michael J. Spencer
ecd5f4062f
[ELF] Add support for __init_array_{start,end}.
...
With this change c++ global constructors and destructors work.
llvm-svn: 172133
2013-01-10 22:41:42 +00:00
Michael J. Spencer
36b9b8f945
[ELF] Fix leading 0 count. Matches change in llvm.
...
llvm-svn: 172132
2013-01-10 22:41:19 +00:00
Shankar Easwaran
2ca8e7d733
support for adding linker defined symbols
...
llvm-svn: 172040
2013-01-10 03:16:27 +00:00
Michael J. Spencer
cf2306fe2b
Fix the elf/rodata.objtext test to work when first run.
...
llvm-svn: 171992
2013-01-09 20:10:30 +00:00
Nick Kledzik
cc3d2dca60
Better tie together ContentType and Permissions.
...
Since most content types (e.g. typeCode) have a
preferred Permission, add a function to do that mapping.
Then hook up to YAML Reader and Writer such that
the 'permissions:' key does not need to be specified unless
overriding what the content type prefers.
llvm-svn: 171929
2013-01-09 01:17:12 +00:00
Nick Kledzik
8a3052eab0
Rename YAML key 'fixups:' to 'references:'
...
llvm-svn: 171898
2013-01-08 21:12:13 +00:00
Nick Kledzik
809b9955e8
Fix to work with style of new YAML writer
...
llvm-svn: 171897
2013-01-08 21:05:47 +00:00
Michael J. Spencer
8de8364753
[ELF] Properly handle constant data.
...
With this hello world works with dietlibc on x86-64 Linux.
llvm-svn: 171711
2013-01-07 08:00:42 +00:00
Michael J. Spencer
1ac382f0c5
[ELF] Emit the file header and program headers at the beginning of the first segment.
...
This is required for the loader to correctly set AT_PHDR.
With this lld can correctly link against dietlibc and get to main.
llvm-svn: 171709
2013-01-07 08:00:04 +00:00
Michael J. Spencer
28c6594c71
[ELF] Emit zeroFill as STT_OBJECT in the final executable. ld does this.
...
llvm-svn: 171704
2013-01-07 07:05:52 +00:00