Benjamin Kramer
1f6012479f
MCELF: Port EmitInstruction changes from MachO streamer. Patch by Roman Divacky.
...
llvm-svn: 112260
2010-08-27 10:40:51 +00:00
Benjamin Kramer
05e22982c8
MCELF: Always overwrite FixedValue.
...
llvm-svn: 112259
2010-08-27 10:38:39 +00:00
Benjamin Kramer
2c45f431fa
MCELF: Fix a thinko of mine.
...
llvm-svn: 112203
2010-08-26 18:12:04 +00:00
Benjamin Kramer
929cc7618f
MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some cleanups.
...
llvm-svn: 112197
2010-08-26 17:23:02 +00:00
Benjamin Kramer
37b384cd66
MCELF: Use precomputed symbol indices, patch by Roman Divacky.
...
llvm-svn: 112079
2010-08-25 20:09:43 +00:00
Michael J. Spencer
237e4ecafb
MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
...
llvm-svn: 112076
2010-08-25 19:27:27 +00:00
Kevin Enderby
a71ab07e14
Change the parsing of .loc back to allow the LineNumber field to be optional as
...
it is with other assemblers.
llvm-svn: 111967
2010-08-24 21:14:47 +00:00
Michael J. Spencer
ccd28d0665
Fix COFF x86-64 relocations. PR7960.
...
Multiple symbol reloc handling part of the patch by Cameron Esfahani.
llvm-svn: 111963
2010-08-24 21:04:52 +00:00
Kevin Enderby
1264b7cab8
First bit of support for the dwarf .loc directive. This patch updates the
...
needed parsing for the .loc directive and saves the current info from that
into the context. The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables. The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.
llvm-svn: 111956
2010-08-24 20:32:42 +00:00
Daniel Dunbar
2476432639
MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to support
...
dollars in identifiers.
llvm-svn: 111946
2010-08-24 19:13:42 +00:00
Daniel Dunbar
3b96ffdac1
MC/Parser: Accept leading dollar signs in identifiers.
...
- Implemented by manually splicing the tokens. If this turns out to be
problematically platform specific, a more elegant solution would be to
implement some context dependent lexing support.
llvm-svn: 111934
2010-08-24 18:12:12 +00:00
Benjamin Kramer
a536f077fe
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
...
llvm-svn: 111925
2010-08-24 17:34:39 +00:00
Chris Lattner
02db8f6415
fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.
...
Also fix 0b010 syntax to actually work while we're at it :-)
llvm-svn: 111876
2010-08-24 00:43:25 +00:00
Benjamin Kramer
d41b53c037
Fix thinko. Having no tests is great ...
...
llvm-svn: 111848
2010-08-23 21:32:00 +00:00
Benjamin Kramer
c4809c930a
Reduce code duplication.
...
llvm-svn: 111846
2010-08-23 21:23:52 +00:00
Benjamin Kramer
86511dce18
ELFObjectWriter: Run ComputeSymbolTable before recording relocations. This way we can use the information it has computed and don't have to recompute the same stuff over and over again.
...
llvm-svn: 111844
2010-08-23 21:19:37 +00:00
Benjamin Kramer
40f83489b4
Add the symbol offset to the relocation value when we relocate against section. By Roman Divacky.
...
llvm-svn: 111824
2010-08-23 19:05:46 +00:00
Benjamin Kramer
620b68e883
Use the proper relocation section + cleanup, from Roman Divacky.
...
llvm-svn: 111819
2010-08-23 18:24:20 +00:00
Michael J. Spencer
db06215b7f
Revert part of my last commit. the mingw32 build bot doesn't seem to like it.
...
llvm-svn: 111793
2010-08-23 05:25:23 +00:00
Michael J. Spencer
e87231232a
Workaround broken jump tables on x86-64 COFF.
...
llvm-svn: 111792
2010-08-23 04:45:37 +00:00
Michael J. Spencer
377aa20e6e
MC: Add partial x86-64 support to COFF.
...
llvm-svn: 111728
2010-08-21 05:58:13 +00:00
Benjamin Kramer
448886d5df
MCELF: Count the section orders properly. Patch by Roman Divacky.
...
llvm-svn: 111517
2010-08-19 13:44:49 +00:00
Daniel Dunbar
8e92d9b68d
MC/ELF: Allow null values in virtual sections, ELF doesn't use special
...
directives for putting contents in .bss, for example.
llvm-svn: 111376
2010-08-18 18:22:37 +00:00
Benjamin Kramer
da7604f53d
Remove dead code. Fixes a GCC warning.
...
llvm-svn: 111271
2010-08-17 19:45:05 +00:00
Benjamin Kramer
1afba421a9
Sketch i386 relocations handling, from Roman Divacky.
...
Hello world builds & runs now on i386/ELF with -integrated-as.
llvm-svn: 111264
2010-08-17 18:20:28 +00:00
Benjamin Kramer
fd0541566b
Use the correct entry size for relocation entries, from Roman Divacky.
...
llvm-svn: 111259
2010-08-17 17:56:13 +00:00
Benjamin Kramer
1fe76565d0
Differentiate between RELA and REL relocations, from Roman Divacky.
...
llvm-svn: 111252
2010-08-17 17:30:07 +00:00
Benjamin Kramer
896bd7e932
One baby step towards i386 ELF, from Roman Divacky.
...
llvm-svn: 111247
2010-08-17 17:02:29 +00:00
Benjamin Kramer
b962ca0ce5
Try to silence a overeager GCC warning.
...
llvm-svn: 111214
2010-08-17 00:33:24 +00:00
Benjamin Kramer
5f237942f5
A round of minor cleanups for ELFObjectWriter.
...
llvm-svn: 111213
2010-08-17 00:00:46 +00:00
Benjamin Kramer
be6cca2b7d
Silence warnings and simplify code. Eliminate a 32/64 bit portability issue.
...
llvm-svn: 111201
2010-08-16 23:00:12 +00:00
Eli Friedman
1fe0d53aec
Fixes for generation of ELF relocations. Patch by Roman Divacky.
...
llvm-svn: 111183
2010-08-16 21:17:09 +00:00
Eli Friedman
b20b5249d2
Fix a few warnings in and detabify MCELFStreamer and ELFObjectWriter.
...
llvm-svn: 111175
2010-08-16 19:15:06 +00:00
Matt Fleming
6c1ad4835e
Add ELF ObjectWriter and Streamer support.
...
I forgot to add these files in commit 111172.
llvm-svn: 111174
2010-08-16 18:57:57 +00:00
Matt Fleming
d83b927897
Add ELF ObjectWriter and Streamer support.
...
llvm-svn: 111172
2010-08-16 18:35:43 +00:00
Matt Fleming
9cecd63b07
Layout helper function.
...
Introduce a helper method to add a section to the end of a layout. This
will be used by the ELF ObjectWriter code to add the metadata sections
(symbol table, etc) to the end of an object file.
llvm-svn: 111171
2010-08-16 18:35:06 +00:00
Matt Fleming
c6beca522c
Record a symbol's size which is needed for ELF symbol tables.
...
llvm-svn: 111170
2010-08-16 18:34:31 +00:00
Chris Lattner
1218ed824d
silence a vc2010 warning: " result of 32-bit shift implicitly converted to
...
64 bits (was 64-bit shift intended?)", pointed out by 'nobled' on llvmdev
llvm-svn: 111148
2010-08-16 16:35:20 +00:00
Daniel Dunbar
2ecc3bb4f7
MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
...
instructions onto the target specific parser, which can do a better job.
llvm-svn: 110889
2010-08-12 00:55:38 +00:00
Daniel Dunbar
2eca0252c3
llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.
...
llvm-svn: 110791
2010-08-11 06:37:09 +00:00
Daniel Dunbar
ebace2248f
MCAsmParser: Add dump() hook to MCParsedAsmOperand.
...
llvm-svn: 110790
2010-08-11 06:37:04 +00:00
Daniel Dunbar
d215976208
MC/AsmParser: Fix a bug in macro argument parsing, which was dropping
...
parentheses from argument lists.
llvm-svn: 110692
2010-08-10 17:38:52 +00:00
Michael J. Spencer
18bf25f189
Revert "MC/MachO: Fix possible null pointer dereference."
...
This reverts commit 110575.
Target.isAbsolute() is true if SD would be null.
llvm-svn: 110683
2010-08-10 16:00:49 +00:00
Kevin Enderby
7221b76c32
Next bit of support for the dwarf .file directive. This patch takes the
...
previously collected info from the .file directives and outputs the encoded
bytes for it. For now this is only in the Mach-O streamer but at some point
will move to a more generic place.
llvm-svn: 110617
2010-08-09 22:52:14 +00:00
Michael J. Spencer
4a5167c836
MC/MachO: Fix possible null pointer dereference.
...
Discovered by Microsoft Visual Studio 2010 Code Analysis.
llvm-svn: 110575
2010-08-09 15:28:05 +00:00
Michael J. Spencer
54cfd42c33
MC: Fix symbol fragment offsets in COFF.
...
Patch by Cameron Esfahani!
llvm-svn: 110104
2010-08-03 05:02:46 +00:00
Michael J. Spencer
d32764c8a0
Revert "MC: Fix symbol fragment offsets in COFF."
...
This reverts commit r110100
Wrong path caps.
llvm-svn: 110103
2010-08-03 04:53:28 +00:00
Michael J. Spencer
a6cfbeb98c
MC: Add time travel support to COFF.
...
llvm-svn: 110101
2010-08-03 04:43:33 +00:00
Michael J. Spencer
cf3d8b4ec4
MC: Fix symbol fragment offsets in COFF.
...
Patch by Cameron Esfahani!
llvm-svn: 110100
2010-08-03 04:43:24 +00:00
Daniel Dunbar
727be43a3d
Silence some -Asserts uninitialized variable warnings.
...
llvm-svn: 109956
2010-07-31 21:08:54 +00:00