Rafael Espindola
25b0acb57e
Move variables closer to use. NFC.
...
llvm-svn: 248590
2015-09-25 17:32:37 +00:00
Rafael Espindola
35c6af3c9c
Move a few methods out of line. NFC.
...
llvm-svn: 248586
2015-09-25 17:19:10 +00:00
Davide Italiano
85121bbf24
[ELF2] Use static non-member function when it suffices.
...
Pointed out by Rui Ueyama.
llvm-svn: 248559
2015-09-25 03:56:11 +00:00
Rafael Espindola
e1901cc33d
Simplify memory management by having ELFData contain a ELFObj.
...
llvm-svn: 248502
2015-09-24 15:11:50 +00:00
Davide Italiano
d75d3b94fd
[ELF2] Add support for -discard-none.
...
Differential Revision: http://reviews.llvm.org/D13083
llvm-svn: 248499
2015-09-24 15:08:23 +00:00
Rafael Espindola
c2d211994d
Create the .bss section early so that we don't have to set it after the fact.
...
llvm-svn: 248412
2015-09-23 18:25:05 +00:00
Michael J. Spencer
2812aa82d0
[elf2] Pass BSSSec to the relocation handling code differently. Don't store it in the symbol.
...
llvm-svn: 248393
2015-09-23 16:57:31 +00:00
Rafael Espindola
05a3dd2cba
Implement --export-dynamic.
...
llvm-svn: 248347
2015-09-22 23:38:23 +00:00
Rafael Espindola
7f07442bb6
Move the last remaining hard coded relocations to Target.
...
Unfortunately the i386 and x86_64 relocation have the same numerical value
and it is a probably a bit much to add got support for another architecture
just to test this.
llvm-svn: 248326
2015-09-22 21:35:51 +00:00
Rafael Espindola
01205f79a4
Start adding target abstractions.
...
This is just enough to get PLT working on 32 bit x86.
The idea behind using a virtual interface is that it should be easy to
convert any of the functions to template parameters if any turns out to be
performance critical.
llvm-svn: 248308
2015-09-22 18:19:46 +00:00
Rafael Espindola
50534c2b6f
Fix the creation of Elf_Rel sections.
...
We were always incrementing the output buffer pointer by sizeof(Elf_Rela).
llvm-svn: 248303
2015-09-22 17:49:38 +00:00
Rafael Espindola
454ca1c245
Use a signed value for Delta.
...
This fixes got.s on 32 bit windows.
Patch by Igor Kudrin!
llvm-svn: 248289
2015-09-22 17:08:25 +00:00
Denis Protivensky
67d01489b8
[ELF2] Fix gcc build
...
Remove explicit qualification in template instantiation.
llvm-svn: 248249
2015-09-22 08:14:46 +00:00
Rafael Espindola
7167585c94
Remove the Chunk terminology from ELF.
...
llvm-svn: 248229
2015-09-22 00:16:19 +00:00
Rafael Espindola
56f965ff5c
More MSVC fixes.
...
llvm-svn: 248223
2015-09-21 22:48:12 +00:00
Rafael Espindola
f68b707251
Trying to fix the MSVC build.
...
llvm-svn: 248219
2015-09-21 22:21:46 +00:00
Rafael Espindola
327b8e19b1
Remove unused includes.
...
llvm-svn: 248218
2015-09-21 22:14:55 +00:00
Rafael Espindola
4ea00210f2
Make InputSection able to relocate itself.
...
This matches the organization used in COFF.
llvm-svn: 248215
2015-09-21 22:01:00 +00:00
Rafael Espindola
5805c4f509
Move OutputSectionBase and derived classes out of Writer.cpp.
...
The file was getting a bit too big and OutputSection is a central enough
concept in ELF linking to justify its own file.
llvm-svn: 248214
2015-09-21 21:38:08 +00:00