Commit Graph

60 Commits

Author SHA1 Message Date
Rui Ueyama cb8474edae COFF, ELF2: Pass output file path implicitly using Config global variable.
Various parameters are passed implicitly using Config global variable
already. Output file path is no different from others, so there was no
special reason to handle that differnetly.

This patch changes the signature of writeResult(SymbolTable *, StringRef)
to writeResult(SymbolTable *).

llvm-svn: 244180
2015-08-05 23:51:50 +00:00
Rui Ueyama afff74e228 ELF2: Simplify Writer interface.
We are using Writer more like a function instead of a class.
This patch makes it a function to simplify the interface.
All details of Writer class is now hidden from other parts of the linker.

llvm-svn: 244169
2015-08-05 23:24:46 +00:00
Rafael Espindola 4b7c2fc64e Add bare minimum to get a working i386 linux program.
llvm-svn: 244050
2015-08-05 15:08:40 +00:00
Rafael Espindola aefd5c1617 Create ObjectFile with the correct endian and word size.
The writer is still hard coded to 64 bits le, but with this we can test for
invalid ELF files.

llvm-svn: 243993
2015-08-04 15:45:54 +00:00
Rafael Espindola e0a5c09a5c Use make_unique. NFC.
llvm-svn: 243988
2015-08-04 15:06:36 +00:00
Rafael Espindola 2ffdd4d0e5 The SymbolTable doesn't need to be a template.
It was already using just code that is common to all object files.

llvm-svn: 243985
2015-08-04 14:29:01 +00:00
Michael J. Spencer 84487f1174 [ELF2] Add a new ELF linker based on the new PE/COFF linker.
Differential Revision: http://reviews.llvm.org/D11188

llvm-svn: 243161
2015-07-24 21:03:07 +00:00
Michael J. Spencer bae540e945 Revert ELF port. Posting to mailing list.
llvm-svn: 242118
2015-07-14 04:49:48 +00:00
Michael J. Spencer 64661cdb4c Remove commented out code.
llvm-svn: 242092
2015-07-14 00:11:38 +00:00
Michael J. Spencer 8a4145411f Initial ELF port.
This is a direct port of the new PE/COFF linker to ELF.

It can take a single object file and generate a valid executable that executes at the first byte in the text section.

llvm-svn: 242088
2015-07-13 23:48:06 +00:00