Commit Graph

196 Commits

Author SHA1 Message Date
Rafael Espindola 26cf0b5130 Update for API change for handling mips64el.
llvm-svn: 178695
2013-04-03 21:03:19 +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
Michael J. Spencer 8759beb424 [ELF] Cache contentType and permissions.
llvm-svn: 178269
2013-03-28 18:58:50 +00:00
Shankar Easwaran c3048de5ac [ELF][Hexagon] remove duplicated code
llvm-svn: 178027
2013-03-26 15:06:52 +00:00
Shankar Easwaran 14bfcd3e0f [ELF] no change in functionality, add functions to symbol table so that they can be overridden by derived classes
llvm-svn: 177990
2013-03-26 03:53:33 +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
Michael J. Spencer 417c19923b [ELF][Reader] Add debug message to print all inputs the linker actually read.
llvm-svn: 177564
2013-03-20 19:26:10 +00:00
Michael J. Spencer da384eebe5 [ELF][Reader][Perf] Only do loookup once.
llvm-svn: 177563
2013-03-20 19:25:58 +00:00
Michael J. Spencer 602ffc13b8 [ELF][Reader] Refactor how relocations are read. Improves performance.
This changes from reading each relocation individually for each section to just
storing the range of relocations. It also counts the relocations to preallocate
the _references array.

llvm-svn: 177562
2013-03-20 19:25:47 +00:00
Michael J. Spencer 55a7070bea [ELF][Reader] Remove static ordinal.
llvm-svn: 177561
2013-03-20 19:25:34 +00:00
Michael J. Spencer 9dc5489441 memcpy instead of copy_n. Faster than copy_n on MSVC :(.
llvm-svn: 177557
2013-03-20 18:58:07 +00:00
Michael J. Spencer fa405277cb Devirtualize Reference::kind.
Improves performance.

llvm-svn: 177556
2013-03-20 18:57:52 +00:00
Michael J. Spencer 0f3dd616bd Devirtualize File::kind.
This is the standard way of implementing LLVM RTTI.

llvm-svn: 177555
2013-03-20 18:57:27 +00:00
Michael J. Spencer 6580d1f226 Set ordinals correctly.
This actually doesn't change behavior with the current LinkerInvocation, but
it's needed when you make reading parallel.

llvm-svn: 177554
2013-03-20 18:56:57 +00:00
Shankar Easwaran 452ba13271 [ELF][Hexagon] Add Hexagon dynamic relocations
llvm-svn: 177484
2013-03-20 05:10:02 +00:00
Shankar Easwaran 06a4039572 [ELF] Interp section is only needed in dynamic executables
llvm-svn: 177483
2013-03-20 05:06:40 +00:00
Shankar Easwaran 1e848e0edf [ELF] Order .got.plt properly
llvm-svn: 177482
2013-03-20 04:52:08 +00:00
Alexey Samsonov 2712b064d8 Add virtual destructors to fix -Wnon-virtual-dtor warnings
llvm-svn: 177392
2013-03-19 11:41:16 +00:00
Shankar Easwaran 8962feb915 [lld] remove trailing whitespace
llvm-svn: 177079
2013-03-14 16:09:49 +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
Michael J. Spencer c4e45f855c [ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.
llvm-svn: 176916
2013-03-13 00:30:08 +00:00
Shankar Easwaran fc9d0a7d9b [ELF] Set values for bss_start and end symbols properly, If there are two load segments with RW permissions, bss_start and end may get set inappropriate
llvm-svn: 176795
2013-03-11 01:38:22 +00:00
Michael J. Spencer 2d224509af [Writer][ELF] Use correct data types for sizes. Fixes integer overflow bug.
This only happens when the section header count is > 1024.

llvm-svn: 176747
2013-03-09 01:41:16 +00:00
Shankar Easwaran b327810215 [ELF] Create baseclass for all ELF writers
llvm-svn: 176724
2013-03-08 21:42:51 +00:00
Shankar Easwaran c44bc347cb [ELF] Order weak symbols properly
llvm-svn: 176583
2013-03-06 21:59:27 +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 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
Shankar Easwaran c5eda3ad2b fixing build error properly according to comment from David
llvm-svn: 176169
2013-02-27 05:53:38 +00:00