Shankar Easwaran
8a1a4e7cf7
rename fixupAddend to relocAddend
...
llvm-svn: 175638
2013-02-20 17:42:00 +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
2139795dfa
[Driver][GNULD] Lookup .so files and default to dynamic output.
...
llvm-svn: 175572
2013-02-19 23:05:36 +00:00
Michael J. Spencer
cadb082e5a
[ELF] Fix memory leak by deleting BumpPtr allocated objects.
...
llvm-svn: 175558
2013-02-19 21:04:30 +00:00
Chandler Carruth
21aaf2534d
Switch a vector<pair<const T &, const U &>> to a vector<pair<const T *,
...
const U *>>. Even in C++11 it doesn't seem this is valid as vector's
emplace support requires move assignment, and there is no way to move
assign a reference.
The real motivation however is that this fixes the build of lld with
libstdc++ 4.6.
llvm-svn: 175481
2013-02-19 01:58:11 +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
Michael J. Spencer
db18847b01
[ELF][Writer] Refactor Section to not have atoms. Move atoms into AtomSection.
...
The purpose of this change is to simplify creating non-atom sections.
Previously _contentType, _sectionKind and _order were used for multiple
purposes and collided in places. This moves all of the Atom specific logic down
into AtomSection and makes Section just have raw Elf_Shdr flags.
llvm-svn: 175207
2013-02-14 20:24:38 +00:00
Shankar Easwaran
4b9cea7317
fix the mergeable string atom, when the target points to a symbol which is at a relative offset from the start of the .rodata section
...
llvm-svn: 175039
2013-02-13 06:35:33 +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
ac4f444e39
[docs] lld self hosts.
...
llvm-svn: 174592
2013-02-07 07:26:45 +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
cfe59fd0d3
[Driver] Replace Target with TargetInfo. Simplify LinkerInput.
...
This removes Target and moves the functionality it had over to TargetInfo.
This also simplifies LinkerInput by removing the InputKind. This will be handled elsewhere.
llvm-svn: 174589
2013-02-07 06:46:48 +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
7fec00b20e
[ELF][Layout] Provide a proper way to get the TLS segment size.
...
llvm-svn: 174427
2013-02-05 19:14:43 +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
Michael J. Spencer
be1100e192
[Resolver] Improve undefined symbol error.
...
llvm-svn: 174277
2013-02-03 10:50:06 +00:00
Michael J. Spencer
7b7e8edb86
[ELF] Use LLVM_IS_UNALIGNED_ACCESS_FAST.
...
llvm-svn: 174276
2013-02-03 10:49:57 +00:00
Michael J. Spencer
7e813242af
[ELF][Reader] Improve performance by removing calls to malloc.
...
llvm-svn: 174275
2013-02-03 10:49:47 +00:00
Michael J. Spencer
9a1da075b2
[ELF] Fix uninitialized variable.
...
llvm-svn: 174274
2013-02-03 10:49:37 +00:00
Michael J. Spencer
4673da27ef
[Archive] Update to LLVM change.
...
llvm-svn: 174273
2013-02-03 10:49:26 +00:00
Alex Rosenberg
b65e88863e
Spelling and grammar corrections.
...
llvm-svn: 174268
2013-02-03 07:05:26 +00:00
Shankar Easwaran
a47495898c
remove duplicate strings from the string table
...
llvm-svn: 174200
2013-02-01 18:06:15 +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
Shankar Easwaran
f23fc86ca8
add proper copyright header
...
llvm-svn: 174178
2013-02-01 15:05:11 +00:00
Michael J. Spencer
18950a174e
[Docs] Update status :)
...
llvm-svn: 174162
2013-02-01 09:20:24 +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
3c75665fdd
[ELF][x86-64] Add the _GLOBAL_OFFSET_TABLE_ Atom in the correct location.
...
Now we link against glibc without --noinhibit-exec.
llvm-svn: 174150
2013-02-01 05:36:14 +00:00
Michael J. Spencer
c8803d27aa
[ELF] Add more absolute atoms. Simplify how they are resolved.
...
llvm-svn: 174149
2013-02-01 05:36:00 +00:00
Shankar Easwaran
73ef70b50f
add hexagon scatter bits and split hexgontargethandler to hexagonrelocationhander
...
llvm-svn: 174148
2013-02-01 05:26:02 +00:00
Michael J. Spencer
280dadbbaf
[Core] Only complain about undefined symbols if they are marked as canBeNullNever.
...
llvm-svn: 174107
2013-01-31 22:56:13 +00:00
Michael J. Spencer
461d33648b
[ELF][x86-64] Improve unknown relocation message.
...
llvm-svn: 174092
2013-01-31 21:00:57 +00:00
Michael J. Spencer
3830d2c49f
[ELF] Create atoms for progbits sections with no symbols but still have content.
...
llvm-svn: 174091
2013-01-31 21:00:42 +00:00
Shankar Easwaran
fb8565a9c6
add support for assigning virtual addresses to TDATA/TBSS sections
...
llvm-svn: 174065
2013-01-31 16:04:47 +00:00
Michael J. Spencer
b3c04d28c8
[ELF] Fix circular initialization bug.
...
llvm-svn: 173968
2013-01-30 20:36:56 +00:00
Michael J. Spencer
901fd6a4c8
[ELF] Use the target's LayoutHandler.
...
llvm-svn: 173966
2013-01-30 20:05:27 +00:00
Shankar Easwaran
e07245cdfc
hexagon targetinfo changes for getting the relocation kind from string and vice versa
...
llvm-svn: 173942
2013-01-30 16:05:43 +00:00
Shankar Easwaran
ddb122811b
simplify hexagon relocations handling
...
llvm-svn: 173938
2013-01-30 15:38:41 +00:00
Michael J. Spencer
23d23953b3
[ELF][x86-64] Add TargetLayout.
...
llvm-svn: 173922
2013-01-30 10:43:25 +00:00
Michael J. Spencer
8254185eea
Whitespace.
...
llvm-svn: 173921
2013-01-30 10:43:10 +00:00
Michael J. Spencer
d21b72730f
[ELF] Remove ReferenceKinds.
...
llvm-svn: 173912
2013-01-30 07:46:54 +00:00
Michael J. Spencer
f35c3e434a
[ELF] Use TargetRelocationHandler to apply relocations.
...
llvm-svn: 173911
2013-01-30 07:46:31 +00:00
Michael J. Spencer
409a737f36
[ELF] Add {Hexagon,PPC,X86}TargetHandler.
...
llvm-svn: 173909
2013-01-30 07:36:45 +00:00
Shankar Easwaran
072031a265
change the function names in RelocationHelper to adhere to convention
...
llvm-svn: 173908
2013-01-30 07:36:09 +00:00