Commit Graph

122 Commits

Author SHA1 Message Date
Shankar Easwaran f4a5e2f439 [ELF][test] add dynamic library search
llvm-svn: 178840
2013-04-05 04:34:57 +00:00
Shankar Easwaran 831b4a0503 [test] remove printing the file to stdout
llvm-svn: 178817
2013-04-04 23:53:46 +00:00
Nick Kledzik 563d9dc1b2 temp change to test case to debug buildbot failure
llvm-svn: 178788
2013-04-04 20:34:37 +00:00
Nick Kledzik 9a632dbe0c fix command line option to use -o
llvm-svn: 178777
2013-04-04 19:17:58 +00:00
Nick Kledzik c314b46e71 This is my Driver refactoring patch.
The major changes are:
1) LinkerOptions has been merged into TargetInfo
2) LinkerInvocation has been merged into Driver
3) Drivers no longer convert arguments into an intermediate (core) argument 
   list, but instead create a TargetInfo object and call setter methods on 
   it. This is only how in-process linking would work. That is, you can 
   programmatically set up a TargetInfo object which controls the linking.
4) Lots of tweaks to test suite to work with driver changes
5) Add the DarwinDriver
6) I heavily doxygen commented TargetInfo.h

Things to do after this patch is committed:
a) Consider renaming TargetInfo, given its new roll. 
b) Consider pulling the list of input files out of TargetInfo. This will 
   enable in-process clients to create one TargetInfo the re-use it with 
   different input file lists.
c) Work out a way for Drivers to format the warnings and error done in 
   core linking.

llvm-svn: 178776
2013-04-04 18:59:24 +00:00
Rafael Espindola 13de1566d0 Update the lld testsuite for the llvm-readobj format change.
llvm-svn: 178693
2013-04-03 20:53:45 +00:00
Shankar Easwaran 34353270a0 [ELF][Hexagon] fix few relocations and add test
llvm-svn: 178495
2013-04-01 20:20:11 +00:00
Shankar Easwaran 1d9e531856 [ELF][Hexagon] Create .got.plt entries with the appropriate alignment
llvm-svn: 178467
2013-04-01 15:14:34 +00:00
Shankar Easwaran cbe06ca340 [ELF] Set the symbol type for undefined atoms properly
llvm-svn: 178466
2013-04-01 15:12:54 +00:00
Shankar Easwaran bb9d4a5ca0 [ELF] Add dynamic hash table and get simple dynamic libraries working with Hexagon
llvm-svn: 178323
2013-03-29 00:53:25 +00:00
Shankar Easwaran 7404004a4c [ELF][Hexagon] Fixing failing test on Bots, few symbol names are available only in debug builds, dont check the symbol names
llvm-svn: 177991
2013-03-26 04:01:26 +00:00
Shankar Easwaran 499aa9e028 [ELF][Hexagon] add GOTREL/GOT relocations
llvm-svn: 177970
2013-03-26 02:20:56 +00:00
Shankar Easwaran 1af701ec6a [ELF] order rela.dyn/rela.plt properly
llvm-svn: 177969
2013-03-26 02:20:08 +00:00
Shankar Easwaran aec2165123 [ELF] fix dynamic symbol table entries and update tests
llvm-svn: 177875
2013-03-25 16:41:14 +00:00
Shankar Easwaran 71738cafe6 [ELF][Hexagon][test] check .got.plt order
llvm-svn: 177604
2013-03-20 23:39:43 +00:00
Shankar Easwaran 0fa1b3c86a [X86_64][test] check that interp section is not emitted when building dynamic libraries
llvm-svn: 177603
2013-03-20 23:34:36 +00:00
Shankar Easwaran 74fc23fa5d [ELF][X86_64][Hexagon] order plt/got entries properly and fix test
llvm-svn: 176970
2013-03-13 20:30:11 +00:00
Shankar Easwaran c44bc347cb [ELF] Order weak symbols properly
llvm-svn: 176583
2013-03-06 21:59:27 +00:00
Shankar Easwaran 7d89b2b6a7 [ELF][Hexagon] fixing dynlib test
llvm-svn: 176503
2013-03-05 19:00:21 +00:00
Shankar Easwaran b6ef6c5a52 [ELF][Hexagon] fixing test failure
llvm-svn: 176497
2013-03-05 18:39:16 +00:00
Shankar Easwaran 3ff62ade38 [ELF] add dynamic library support
llvm-svn: 176483
2013-03-05 14:52:48 +00:00
Shankar Easwaran 1729e12358 [ELF][Hexagon] add initial changes to add GOT/PLT
llvm-svn: 176415
2013-03-03 07:34:56 +00:00
Shankar Easwaran b0e356e223 move dynamic linking atoms to Atoms.h
llvm-svn: 176370
2013-03-01 19:33:42 +00:00
Michael J. Spencer 8c0526593a [Writer][ELF][x86-64] Handle GOTPCREL relocations to SharedLibraryAtoms.
llvm-svn: 176324
2013-03-01 01:09:46 +00:00
Michael J. Spencer 3e00c5015f [ELF][x86-64] Only emit a PLT entry for a PLT relocation if the target atom is a SharedLibraryAtom.
This seems to be what ld does, but I'm not sure how it works with symbol interposition.

With this hello-world with glibc dynamically linked works.

llvm-svn: 176310
2013-03-01 00:03:56 +00:00
Michael J. Spencer a55e37f477 Add basic linker script parsing.
llvm-svn: 176309
2013-03-01 00:03:36 +00:00
Michael J. Spencer a26f71c9ed [ELF][x86-64] Separate static and dynamic GOT/PLT generation.
llvm-svn: 176294
2013-02-28 20:04:32 +00:00
Shankar Easwaran 4685069152 [ELF][tests] changes for test cases
llvm-svn: 176280
2013-02-28 18:38:20 +00:00
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