Rui Ueyama
f9be75f538
[PECOFF] Fix DLLCharacteristics field.
...
IMAGE_DLL_CHARACTERISTICS_NO_SEH flag should be set only when SEH is disabled.
llvm-svn: 202215
2014-02-26 02:31:53 +00:00
Shankar Easwaran
a328344367
[LinkerScript] parse OUTPUT_FORMAT : treat quotedStrings as identifier
...
llvm-svn: 202166
2014-02-25 17:02:54 +00:00
Rui Ueyama
d08472f6c3
[COFF] Refactor .drectve section handling. No functionality change.
...
llvm-svn: 202113
2014-02-25 05:37:47 +00:00
Shankar Easwaran
2ea5148eff
[LinkerScript] OUTPUT_FORMAT: Parse Quoted Strings
...
llvm-svn: 202111
2014-02-25 05:17:24 +00:00
Shankar Easwaran
822ea4f9a3
[LinkerScript] parse OUTPUT_ARCH.
...
llvm-svn: 202100
2014-02-25 01:55:13 +00:00
Nico Rieck
b9d84f4d14
[lld] Include reference kind in cycle detector debug output
...
This restores the debug output to how it was before r197727 broke it. This
went undetected because the corresponding test was never run due to broken
feature detection.
llvm-svn: 202079
2014-02-24 21:14:37 +00:00
Rafael Espindola
f27f9fa136
Update for LLVM api change.
...
llvm-svn: 202054
2014-02-24 18:20:36 +00:00
Rafael Espindola
27810169cb
Don't assume that F_None is the default. It is about to change.
...
llvm-svn: 202039
2014-02-24 15:06:34 +00:00
Nico Rieck
aa675e9379
[PECOFF] Fix uninitialized variable
...
llvm-svn: 201970
2014-02-23 10:40:15 +00:00
Rui Ueyama
a5dc335574
[PECOFF] Implement /SAFESEH option.
...
LLD now prints an error message if /SAFESEH option is specified and one or
more input files are not compatible with SEH.
llvm-svn: 201900
2014-02-21 22:50:27 +00:00
Shankar Easwaran
9578442fe9
[ELF] Dont generate PHDR when creating dynamic libraries.
...
llvm-svn: 201741
2014-02-19 23:46:13 +00:00
Shankar Easwaran
babba413f5
[ELF] Fix alignment for dynamic relocation sections.
...
The sections .rela/.rel.(*) have a alignment of 2 in the final image created by
the linker. This needs to be properly set to the right alignment depending on
the architecture(32/64bits).
llvm-svn: 201740
2014-02-19 23:46:08 +00:00
Simon Atanasyan
06f8ea4c07
[Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one.
...
llvm-svn: 201131
2014-02-11 06:36:16 +00:00
Simon Atanasyan
bf987c2dae
[Mips] Handle R_MIPS_COPY relocation.
...
llvm-svn: 201129
2014-02-11 05:34:02 +00:00
Rafael Espindola
20d93679c7
Update for llvm api change.
...
llvm-svn: 201109
2014-02-10 20:24:27 +00:00
Nick Kledzik
cdf2c8be58
[mach-o] use new way to copy StringRefs
...
llvm-svn: 200956
2014-02-06 23:48:52 +00:00
Simon Atanasyan
0743a72caa
Accept and handle absolute symbols with empty name.
...
llvm-svn: 200911
2014-02-06 07:35:16 +00:00
Simon Atanasyan
b828ebb5dd
[Mips] In case of executable file linking MIPS ABI requires to add even
...
undefined symbols to '.dynsym' if these symbols have corresponding entries
in a global part of GOT.
llvm-svn: 200716
2014-02-03 20:10:40 +00:00
Simon Atanasyan
0912fe06dc
[Mips] Unify #include guard names.
...
llvm-svn: 200715
2014-02-03 20:10:30 +00:00
Shankar Easwaran
6e0e1bc859
[ELF] change LayoutBefore Reference to InGroup Reference
...
This makes it a lot easier for Section Group design.
llvm-svn: 200675
2014-02-03 04:01:14 +00:00
Joey Gouly
cf466800b7
[MachO] Add undefined atoms.
...
llvm-svn: 200649
2014-02-02 19:34:55 +00:00
Simon Atanasyan
e6f6f06c91
[ELF] Customize dynamic table tag used for .got.plt section referencing.
...
The patch reviewed by Shankar Easwaran and Rui Ueyama.
llvm-svn: 200630
2014-02-02 12:19:29 +00:00
Rafael Espindola
8c13e51764
Update for llvm api change.
...
llvm-svn: 200575
2014-01-31 21:13:59 +00:00
Rui Ueyama
14876abb3d
[PECOFF] Set the correct PE header field value.
...
The charcateristics field should not have IMAGE_FILE_32BIT_MACHINE bit but have
IMAGE_FILE_LARGE_ADDRESS_AWARE bit for PE32+.
llvm-svn: 200518
2014-01-31 05:43:12 +00:00
Rui Ueyama
ebc13c47f2
[PECOFF] Do not emit a section if it's empty.
...
The PE32+ loader does not seem to like an executable with an empty section, so
we should not emit a section if it's empty.
llvm-svn: 200514
2014-01-31 05:15:42 +00:00
Rui Ueyama
8851d45cbf
Replace magic numbers with enums.
...
llvm-svn: 200512
2014-01-31 04:57:03 +00:00
Rui Ueyama
ea7e9306c1
[PECOFF] Default image base address for PE32+ is 0x140000000, not 0x400000.
...
llvm-svn: 200511
2014-01-31 04:49:13 +00:00
Simon Atanasyan
bc286a4dbc
[ELF] Make private all DynamicTable class fields which are not used in
...
the descendant classes.
llvm-svn: 200467
2014-01-30 14:20:22 +00:00
Rafael Espindola
8fe1f37c55
Update for llvm api change.
...
llvm-svn: 200443
2014-01-30 02:49:58 +00:00
Shankar Easwaran
b6a6bdab20
[ELF][Hexagon] typeZeroFillQuick is not associated with bss section.
...
We need to increase the memory and the filesize when we add a typeZeroFillQuick
atom.
llvm-svn: 200369
2014-01-29 04:04:27 +00:00
Simon Atanasyan
7aa9061ead
[Mips] Declare MipsDynamicTable class in a separate header file.
...
llvm-svn: 200328
2014-01-28 18:52:41 +00:00
Rui Ueyama
4aaba3e220
[PECOFF] Replace magic numbers with sizeof.
...
llvm-svn: 200278
2014-01-28 01:55:37 +00:00
Rui Ueyama
22291d2cbf
[PECOFF] Implement some relocations for x86-64.
...
llvm-svn: 200240
2014-01-27 19:23:12 +00:00
Rui Ueyama
b73d28525a
[PECOFF] Implement relocations for x86-64.
...
llvm-svn: 200185
2014-01-27 03:53:30 +00:00
Rui Ueyama
7d1bf45047
[PECOFF] Fix PE/COFF optional header size for PE32+.
...
The optional header for PE32+ is a bit larger than PE32 because some of
its fields are extended to 8 bytes.
llvm-svn: 200184
2014-01-27 03:53:26 +00:00
Rui Ueyama
f1a2d55e2b
[PECOFF] Set a proper architecture type to references.
...
Relocations for x64 object files should have reference type of
KindArch::x86_64.
llvm-svn: 200183
2014-01-27 03:53:23 +00:00
Shankar Easwaran
3d8de47f76
Fix trailing whitespace.
...
llvm-svn: 200182
2014-01-27 03:09:26 +00:00
Shankar Easwaran
a64ba010f0
[ELF] Fix comments.
...
The comments in the files that described the file name as part of each file
header ran over 80 columns, which clang-format split over multiple lines.
This commit fixes to make them appear properly.
llvm-svn: 200181
2014-01-27 02:55:08 +00:00
Shankar Easwaran
b11964707c
[ELF] Make changes to all the targets supported currently
...
X86_64,X86,PPC,Hexagon,Mips
No change in functionality.
llvm-svn: 200177
2014-01-27 01:21:02 +00:00
Shankar Easwaran
af7fbd8cf4
[ELF] Create Target specific Writers.
...
llvm-svn: 200176
2014-01-27 01:20:53 +00:00
Shankar Easwaran
e7b831ad35
[ELF] Add Target specific Readers.
...
No change in functionality.
llvm-svn: 200175
2014-01-27 01:02:03 +00:00
Shankar Easwaran
d7de108cde
[ELF] Separate ELFReader classes for subclassing
...
llvm-svn: 200173
2014-01-27 00:45:57 +00:00
Shankar Easwaran
f755ca1685
[ELF] Unify interfaces between DynamicFile/ELFFile.
...
llvm-svn: 200172
2014-01-27 00:40:49 +00:00
Shankar Easwaran
f3db51d06f
[ELF] Separate implementation from the class declaration.
...
ELFFile would be a class that rest of the targets would derive from.
To keep the implementation clean, separate the implementation from
rest of the Header file.
llvm-svn: 200168
2014-01-26 23:57:20 +00:00
Shankar Easwaran
9691b01905
[ELF] Rename File.h to ELFFile.h to avoid confusion.
...
No change in functionality.
llvm-svn: 200166
2014-01-26 23:49:07 +00:00
Shankar Easwaran
b888433e9c
[ELF] Dont include all targets
...
llvm-svn: 200165
2014-01-26 23:47:18 +00:00
Rui Ueyama
56c4611340
[PECOFF] Emit PE32+ file header.
...
llvm-svn: 200128
2014-01-26 05:34:12 +00:00
Rui Ueyama
c6ddf5654c
[PECOFF] Use a shorter name for the parameter.
...
llvm-svn: 200107
2014-01-26 00:37:30 +00:00
Rui Ueyama
76c1b4d0fb
[PECOFF] Set PE32+ magic value if 64 bit.
...
llvm-svn: 200106
2014-01-26 00:35:23 +00:00
Rui Ueyama
7dc69287c1
[PECOFF] Use a shorter name for the PECOFF writer member.
...
llvm-svn: 200052
2014-01-25 00:27:44 +00:00