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
b72ea717d0
[Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly
...
line by line.
llvm-svn: 201133
2014-02-11 07:17:09 +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
Simon Atanasyan
ceb0b86822
[Mips] Add "data" symbols to the test input file. No functional changes.
...
llvm-svn: 201128
2014-02-11 05:33:53 +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
Rui Ueyama
153ee54008
Untabify.
...
llvm-svn: 200712
2014-02-03 19:07:38 +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
Simon Atanasyan
8379ad056d
[Mips] Cleanup assembler code in the test.
...
llvm-svn: 200629
2014-02-02 12:19:20 +00:00
Rui Ueyama
c5326ca9bb
[PECOFF] Add a TODO.
...
llvm-svn: 200599
2014-02-01 00:26:33 +00:00
Rui Ueyama
9661bcf2e1
[PECOFF] Handle /machine option before handling all the other options.
...
The target machine type affects the meaning of other options, in particular
how to mangle symbols. So we want to handle the option first and then parse
all the other options.
llvm-svn: 200589
2014-01-31 22:58:19 +00:00
Rafael Espindola
8c13e51764
Update for llvm api change.
...
llvm-svn: 200575
2014-01-31 21:13:59 +00:00
Rui Ueyama
d0d01c66ba
MSVC2012 does not choose to use uint64_t as underlying type without this.
...
MSVC2012 seems to choose int as the underlying type for an enum even if one of
its member is unsigned long long.
llvm-svn: 200519
2014-01-31 06:28:32 +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
NAKAMURA Takumi
4162034bb5
[CMake] Apply llvm_update_compile_flags() in add_lld_library().
...
Sorry for the breakage.
llvm-svn: 200306
2014-01-28 10:45:37 +00:00
Rui Ueyama
4aaba3e220
[PECOFF] Replace magic numbers with sizeof.
...
llvm-svn: 200278
2014-01-28 01:55:37 +00:00
Rui Ueyama
bdc2fc3635
[PECOFF] Convert more binary files to YAML.
...
Because the object files are now readable to humans, I don't think we need the
source assembly file any more, so I removed them too in this commit.
llvm-svn: 200276
2014-01-28 01:41:39 +00:00
Rui Ueyama
6d3fee23e3
[PECOFF] Remove a redundant test.
...
peplus.test and pe32plus.test basically covered the same thing, so
remove pe32plus.test and then rename peplus.test -> pe32plus.test.
llvm-svn: 200275
2014-01-28 01:36:13 +00:00
Rui Ueyama
dc2f00eead
[PECOFF] Convert a object file to YAML to remove a binary file from SVN.
...
llvm-svn: 200274
2014-01-28 01:32:33 +00:00
Rui Ueyama
a709af2861
s/0/nullptr/
...
llvm-svn: 200272
2014-01-28 01:22:23 +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