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
Dmitri Gribenko
e16bc92063
Fix -Wdocumentation warning: use a correct Doxygen comment marker
...
llvm-svn: 176494
2013-03-05 18:11:01 +00:00
Shankar Easwaran
49ae019997
[ELF] Set symbol type to STT_SECTION, so that objdump.bfd doesnot get confused when disassembling output
...
llvm-svn: 176489
2013-03-05 16:09:32 +00:00
Shankar Easwaran
3ff62ade38
[ELF] add dynamic library support
...
llvm-svn: 176483
2013-03-05 14:52:48 +00:00
Shankar Easwaran
bcb722a452
[ELF] Remove comment
...
llvm-svn: 176482
2013-03-05 14:45:59 +00:00
Shankar Easwaran
7b0ae11c82
[ELF] no functionality change, update dynamicTable functionality
...
llvm-svn: 176430
2013-03-04 02:21:16 +00:00
Shankar Easwaran
03a525d6fd
[lld][ELF] Add modified writer
...
llvm-svn: 176425
2013-03-03 22:10:57 +00:00
Shankar Easwaran
1993b0000c
[lld][ELF] rename to add new support in the ELF Writer
...
llvm-svn: 176424
2013-03-03 22:09:22 +00:00
Shankar Easwaran
62bba5ddfb
[ELF] rename Writer to ExecutableWriter
...
llvm-svn: 176416
2013-03-03 07:37:17 +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
Shankar Easwaran
da28895597
[ELF][Hexagon] add quickdata relocations
...
llvm-svn: 176298
2013-02-28 20:54:03 +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
937aa19a4b
[ELF] Set header flags to 0 by default
...
llvm-svn: 176279
2013-02-28 18:36:34 +00:00
Shankar Easwaran
dac3873442
[ELF][Hexagon] change Header flags
...
llvm-svn: 176278
2013-02-28 18:35:27 +00:00
Shankar Easwaran
8a2d1990d8
[lld][ELF][Hexagon] add more relocations
...
llvm-svn: 176277
2013-02-28 18:29:23 +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
Shankar Easwaran
c5eda3ad2b
fixing build error properly according to comment from David
...
llvm-svn: 176169
2013-02-27 05:53:38 +00:00
Shankar Easwaran
4f4ed0acdf
adding a return to fix compilation error from buildbot, build #75
...
llvm-svn: 176167
2013-02-27 05:33:27 +00:00
Shankar Easwaran
2ce6b43f40
fixing typo in header file
...
llvm-svn: 176162
2013-02-27 04:02:30 +00:00
Michael J. Spencer
2063679ec4
[ELF][Writer] Add dynamic relocation tables.
...
This adds separate PLT and dynamic relocation tables. It also fills in the dynamic table
entries for them.
llvm-svn: 176150
2013-02-27 01:30:27 +00:00
Michael J. Spencer
7f09a3d54e
[Pass][Layout] Fix bug and add debug printing.
...
Fix a bug where if two atoms had the same index in the override map,
the compare would return false. It now goes to the next check when
they are equal.
No test because it currently can't be tested. An upcomming patch will test it.
llvm-svn: 176073
2013-02-26 01:35:30 +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
1b095842ec
[ELF] Change functions to virtual, in ExecutableAtoms
...
llvm-svn: 175993
2013-02-24 15:11:55 +00:00
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