Commit Graph

423 Commits

Author SHA1 Message Date
Shankar Easwaran 5f0afe84f5 [ELF]Change name of runtime files, so that targets can change runtime files that they own
llvm-svn: 175992
2013-02-24 14:54:02 +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 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
Shankar Easwaran 396e4c0b13 change DefaultLayout to TargetLayout inside member variables
llvm-svn: 173906
2013-01-30 07:19:57 +00:00
Shankar Easwaran a6f00fe083 add targethandler hooks from Writer and cleanup
llvm-svn: 173904
2013-01-30 07:11:43 +00:00
Michael J. Spencer 457a77739b [ELF][x86-64] Add X86_64TargetRelocationHandler and friends.
llvm-svn: 173897
2013-01-30 05:26:03 +00:00
Michael J. Spencer 4e9d9cd23b [ELF] Add ELFTargetRelocationHandler.
llvm-svn: 173896
2013-01-30 05:25:44 +00:00
Shankar Easwaran a51870b143 add Relocation helper functions
llvm-svn: 173895
2013-01-30 04:49:54 +00:00
Michael J. Spencer 4260657fab [ELF] Make AtomLayout more accessible.
This is needed to allow constant time access to the final layout of atoms.

llvm-svn: 173874
2013-01-30 01:25:06 +00:00
Michael J. Spencer e68f90355c [ELF] Chop the ELF prefix off of most things.
llvm-svn: 173838
2013-01-29 22:03:39 +00:00
Shankar Easwaran 185e8a076d remove targetInfo and layout from ELFTargetLayout
llvm-svn: 173824
2013-01-29 20:13:16 +00:00
Michael J. Spencer 43ecac5a2c [ELF] Fix header sort order.
llvm-svn: 173822
2013-01-29 19:53:41 +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 bf77be3ba5 [ELF] Give Chunk a ELFTargetInfo.
llvm-svn: 173743
2013-01-29 01:07:47 +00:00
Michael J. Spencer adfb7eb211 [ELF] Remove OwningPtr from the Chunk::write interface.
llvm-svn: 173741
2013-01-29 01:00:21 +00:00
Michael J. Spencer bdf8bc8315 [ELF] Clean up doxygen comments.
llvm-svn: 173740
2013-01-29 01:00:04 +00:00
Shankar Easwaran 072fb1a403 add register section, remove contentType from sectionKey
llvm-svn: 173709
2013-01-28 19:21:04 +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
Benjamin Kramer ac49d37a63 lldX86_64ELFTarget depends on lldCore.
llvm-svn: 173573
2013-01-26 13:49:19 +00:00
Michael J. Spencer 20231f1275 Use proper delete.
llvm-svn: 173570
2013-01-26 12:26:56 +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
Michael J. Spencer 385f312686 [CMake] Setup include dirs properly.
llvm-svn: 173488
2013-01-25 20:50:01 +00:00
Shankar Easwaran 4277c2d6bf change all occurences of File to FileELF
llvm-svn: 173449
2013-01-25 15:19:02 +00:00
Shankar Easwaran 3256d4ff62 add elf targethandler
llvm-svn: 173430
2013-01-25 07:39:18 +00:00
Michael J. Spencer 88f4d24e4a [Driver] Run the pass manager.
llvm-svn: 173381
2013-01-24 22:52:42 +00:00
Michael J. Spencer 19c4756ff2 Move SimpleAtoms.h to ReaderWriter.
llvm-svn: 173380
2013-01-24 22:52:25 +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 c0d3c4efe6 Add PassManager.
It owns and manages passes.

llvm-svn: 173287
2013-01-23 20:03:10 +00:00
Shankar Easwaran c142874c9c change from using 2 bits to 4 bits, as 2 bits arent enough to hold the enumeration OutputKind
llvm-svn: 173266
2013-01-23 15:11:22 +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 4586fbcbad [Core] Move Resolver and SymbolTable over to TargetInfo.
No functionality change.

llvm-svn: 173192
2013-01-22 20:49:42 +00:00
Shankar Easwaran 58ad41b563 change enum class to enum, as g++ doesnot support bitfields with enumerated classes with c++11 flag set
llvm-svn: 173166
2013-01-22 14:58:51 +00:00
Shankar Easwaran c7176430dc it looks like g++ 4.7.2 doesnot like bit fields when the type is a enumeration (Throws an error as bit-field with non integral type)
llvm-svn: 173125
2013-01-22 04:12:03 +00:00
Michael J. Spencer d68d6196af Add {,ELF,MachO}TargetInfo.
llvm-svn: 173117
2013-01-22 02:15:30 +00:00
Shankar Easwaran 6d9921fc53 no functionality changes(split WriterELF into multiple files)
llvm-svn: 173082
2013-01-21 20:09:55 +00:00
Michael J. Spencer 8af48f3864 [Core] Use LLVM's ErrorOr<T>.
llvm-svn: 172993
2013-01-20 21:27:05 +00:00
Michael J. Spencer 359e09d4f5 [docs] Document lld's usage of C++11 features.
llvm-svn: 172972
2013-01-20 10:39:17 +00:00
Chandler Carruth b5f3bd956c Replace the 'final' keyword with 'LLVM_FINAL' as GCC 4.6 doesn't support
the keyword.

If anyone cares deeply about the final optimizations with GCC, we might
want to add a version test to the LLVM definition, but I'm perfectly
happy with this just only firing under Clang and modern MSVC builds.

llvm-svn: 172898
2013-01-19 09:57:51 +00:00
Chandler Carruth 8b95c03fca Allow the LLD CMake build to work with -std=gnu++0x and -std=gnu++11 as
well as c++0x and c++11. This can be especially useful when building
with GCC in C++11 mode.

llvm-svn: 172897
2013-01-19 09:41:42 +00:00
Chandler Carruth 058761266d Fix the build with libstdc++ v4.6 on Linux by supplying an explicit move
assignment operator. There is an issue where classes with deleted copy
constructors and user defined move constructors end up with an
implicitly deleted copy constructor that is selected instead of the
implicit move constructor. This is a bit of a hack, but it allows me to
build LLD in a bootstrap with libstdc++ which is my primary goal.

llvm-svn: 172896
2013-01-19 09:38:14 +00:00
Michael J. Spencer a17b72e7cf [Core] Fix passing an rvalue reference of ErrorOr.
llvm-svn: 172850
2013-01-18 21:42:01 +00:00
Michael J. Spencer 71c00f42bd [ELF] Use operator new(std::size_t, BumpPtrAllocator).
llvm-svn: 172675
2013-01-16 23:34:45 +00:00
Michael J. Spencer 84d3b01fb5 [ELF] clang-format ReaderELF.cpp
llvm-svn: 172674
2013-01-16 23:34:32 +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
Michael J. Spencer 842885e06e [ELF] Refactoring and style cleanup. No functionality change.
llvm-svn: 172552
2013-01-15 21:12:45 +00:00
Michael J. Spencer b03f6c489a [ELF] Update for LLVM Object/ELF changes.
llvm-svn: 172516
2013-01-15 07:53:22 +00:00
Michael J. Spencer bb78a04088 [ELF] Replace [...] x_{begin,end}() with range<[...]> x().
llvm-svn: 172513
2013-01-15 06:55:37 +00:00
Michael J. Spencer aa3aa570dc [Core] Add iterator ranges.
This is based on code by Jeffrey Yasskin. It has been modified to compile
with MSVC and reformated to LLVM style.

llvm-svn: 172512
2013-01-15 06:55:25 +00:00
Michael J. Spencer 7fe77f8c61 [ELF] Fix use of LLVM RTTI.
llvm-svn: 172511
2013-01-15 06:55:11 +00:00
Shankar Easwaran f6dc082f91 remove const from FindByName
llvm-svn: 172507
2013-01-15 03:02:33 +00:00
Michael J. Spencer ed1950719b [docs] Add driver documentation.
This gives an overview of the driver and explains how to add options and driver flavors.

llvm-svn: 172502
2013-01-15 02:00:59 +00:00
Michael J. Spencer 31dffbb659 [docs] Update status.
llvm-svn: 172501
2013-01-15 02:00:48 +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
Nick Kledzik 343ecbd6ba Fix shadowed variable warning
llvm-svn: 172482
2013-01-14 22:10:22 +00:00
Michael J. Spencer ca20ffbab2 [test] Fix tests on Windows.
llvm-svn: 172339
2013-01-13 01:09:51 +00:00
Michael J. Spencer 74ba722be1 [YAML] Fix undefined behavior.
llvm-svn: 172338
2013-01-13 01:09:39 +00:00
Michael J. Spencer 57752dc56e Factor File::addAtom out to MutableFile::addAtom.
This removes a bunch of llvm_unreachables and makes a File's mutability part of the type system.

llvm-svn: 172297
2013-01-12 02:45:54 +00:00
Michael J. Spencer 3756852d62 [ELF] Fix comment.
llvm-svn: 172266
2013-01-11 22:39:56 +00:00
Michael J. Spencer 4ffbd608cd [ELF] Add AtomLayout instead of using pair<Atom, pair<uint64_t, uint64_t>>.
llvm-svn: 172265
2013-01-11 22:39:44 +00:00
Michael J. Spencer 2a5763cd86 [ELF] Use the correct cast.
llvm-svn: 172264
2013-01-11 22:39:31 +00:00
Michael J. Spencer bbe4b9812b [ELF] Simplify assert.
llvm-svn: 172255
2013-01-11 21:38:36 +00:00
Shankar Easwaran b1d09c07f1 better implementation for findOutputSection
llvm-svn: 172236
2013-01-11 18:56:11 +00:00
Shankar Easwaran 7381db059a add noinhibit exec option
llvm-svn: 172204
2013-01-11 15:11:47 +00:00
Shankar Easwaran d127d8169a add hexagon target to lld
llvm-svn: 172202
2013-01-11 15:01:04 +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
Michael J. Spencer aa8a5a2ab2 [ELF] Fixed -Wunused in -asserts mode.
llvm-svn: 172131
2013-01-10 22:41:05 +00:00
Shankar Easwaran 37c528259a style changes
llvm-svn: 172080
2013-01-10 18:16:10 +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 ad5f00ea2d [Archive] Use a hash map to lookup symbols in archives. Increases performance of linking lua by ~6x.
llvm-svn: 172028
2013-01-10 01:27:45 +00:00
Michael J. Spencer 41d9dc56d3 Style fixes.
llvm-svn: 171997
2013-01-09 20:39:07 +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 bd49198409 add extra namespace for gcc-4.7 compatibility
llvm-svn: 171918
2013-01-08 23:51:03 +00:00
Nick Kledzik 80fe907903 fix typo
llvm-svn: 171916
2013-01-08 23:43:11 +00:00
Michael J. Spencer 6047163a24 [lld] Add support for -mllvm.
There is no way to test this at the moment because the options are not
processed until the link starts, and we can't pass an empty file.

llvm-svn: 171910
2013-01-08 22:59:27 +00:00
Michael J. Spencer 79fafccb5e [Driver] Fix indentation.
llvm-svn: 171909
2013-01-08 22:59:01 +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 d2a4ccf8f9 [ELF] Add R_X86_64_64 relocation.
llvm-svn: 171836
2013-01-08 02:12:15 +00:00
Michael J. Spencer 8f80cd92d9 [lld] Add and ignore some flags for ld compat.
llvm-svn: 171835
2013-01-08 02:12:01 +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 956b03618c [lld] Add -emit-yaml option. This outputs yaml instead of a binary.
llvm-svn: 171710
2013-01-07 08:00:25 +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 00b702c95c [ELF] Change Segment to hold Chunks instead of Sections. No functionality change.
llvm-svn: 171708
2013-01-07 07:59:46 +00:00
Michael J. Spencer c8a12cce98 [ELF] Remove dead variable.
llvm-svn: 171707
2013-01-07 07:59:34 +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
Michael J. Spencer cdb892488e [ELF] Add common x86_64 relocation types.
llvm-svn: 171703
2013-01-07 06:58:53 +00:00
Michael J. Spencer 0c3f25ead9 [Driver] x86-64 should use ELF 64.
llvm-svn: 171693
2013-01-07 04:51:32 +00:00
Michael J. Spencer c41d48fdee [ELF] Give a slightly better message for unknown relocation types.
llvm-svn: 171692
2013-01-07 04:51:17 +00:00