Jim Grosbach
1a55fa61e2
Tidy up. 80 columns.
...
llvm-svn: 135917
2011-07-25 17:11:29 +00:00
Joerg Sonnenberger
afb36fad99
Restore r125595 (reverted in r126336) with modifications:
...
Introduce a variable in the AsmParserExtension whether [] is valid in an
expression. If it is true, parse them like (). Enable this for ELF only.
llvm-svn: 126443
2011-02-24 21:59:22 +00:00
Joerg Sonnenberger
4f864d3111
Bug#9172: Don't use static in file scope, use an attribute on the
...
parser.
llvm-svn: 126225
2011-02-22 16:53:11 +00:00
Rafael Espindola
58ac6e1677
Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
...
llvm-svn: 125629
2011-02-16 01:08:29 +00:00
Rafael Espindola
689939e648
Handle strings in section names the same way as gas:
...
* If the name is a single string, we remove the quotes
* If the name starts without a quote, we include any quotes in the name
llvm-svn: 124127
2011-01-24 18:02:54 +00:00
Rafael Espindola
4b7b7fba38
Delay the creation of eh_frame so that the user can change the defaults.
...
Add support for SHT_X86_64_UNWIND.
llvm-svn: 124059
2011-01-23 05:43:40 +00:00
Rafael Espindola
0e7e34e476
Remove more duplicated code.
...
llvm-svn: 124056
2011-01-23 04:43:11 +00:00
Rafael Espindola
aea4958ea6
Remove duplicated code.
...
llvm-svn: 124054
2011-01-23 04:28:49 +00:00
Rafael Espindola
9ae2d05d45
Add support for @note. Patch by Jörg Sonnenberger.
...
llvm-svn: 122568
2010-12-26 21:30:59 +00:00
Rafael Espindola
f8e127eaf6
Factor some code to parseSectionFlags and fix the default type of a section.
...
llvm-svn: 120145
2010-11-25 15:32:56 +00:00
Rafael Espindola
9f75d5df0b
Behave a bit more like gnu as and use the symbol (instead of the section)
...
for any relocation to a symbol defined in a tls section.
llvm-svn: 120121
2010-11-24 21:57:39 +00:00
Rafael Espindola
4bcf94c75a
Parse and record the gnu_unique_object type.
...
llvm-svn: 118980
2010-11-13 04:51:02 +00:00
Rafael Espindola
de990b270d
gnu as support both % and @ before types, do the same.
...
llvm-svn: 118893
2010-11-12 15:47:08 +00:00
Rafael Espindola
a3e9a2298d
Initial comdat implementation.
...
llvm-svn: 118805
2010-11-11 18:13:52 +00:00
Rafael Espindola
9bb44a5ce8
Fixed version of 118639 with an extra assert to catch similar problems
...
earlier. Implicit bool -> int conversions are evil!
llvm-svn: 118651
2010-11-09 23:42:07 +00:00
Rafael Espindola
33048f069f
Revert previous patch. Missed a case.
...
llvm-svn: 118645
2010-11-09 22:54:38 +00:00
Rafael Espindola
4bdd2724e3
Remove IsExplicit. It was always false.
...
llvm-svn: 118639
2010-11-09 22:37:44 +00:00
Rafael Espindola
9d17a3194e
Set default flags for .rodata.
...
llvm-svn: 118395
2010-11-08 02:47:59 +00:00
Rafael Espindola
1614597873
Implement .weakref.
...
llvm-svn: 117911
2010-11-01 14:28:48 +00:00
Rafael Espindola
8aefb66376
Improvements to .section parsing:
...
* If we have a M or a G, reject sections without the type
* Only parse the flag specific arguments if we have M or G
* Parse the corresponding arguments for M and G
We ignore the G arguments and flag for now.
llvm-svn: 117608
2010-10-28 21:33:33 +00:00
Rafael Espindola
095fa9e5cc
Set default type and flags for .init and .fini.
...
llvm-svn: 117471
2010-10-27 18:45:20 +00:00
Rafael Espindola
eb0c2c170d
Add support for the .symver directive. This is really ugly, but most of it is
...
contained in the ELF object writer.
llvm-svn: 117448
2010-10-27 15:18:17 +00:00
Rafael Espindola
c9fb35e73b
Add support for .ident.
...
llvm-svn: 117389
2010-10-26 19:35:47 +00:00
Michael J. Spencer
3d89823102
MC: Move ParseDirectiveELFType into ELFAsmParser. COFF uses .type for something else.
...
llvm-svn: 116142
2010-10-09 03:47:55 +00:00
Jan Wen Voung
b96b2d8e4d
Have ELFAsmParser.cpp use the already parsed "Size" (entry size) when
...
constructing a section. Test for a few cases also included.
llvm-svn: 115132
2010-09-30 02:41:46 +00:00
Rafael Espindola
9ca41113f6
Make sure .text doesn't produce extra alignment.
...
llvm-svn: 114895
2010-09-27 21:40:27 +00:00
Rafael Espindola
f7f433200b
Make sure that names like .note.GNU-stack are accepted as valid section names.
...
llvm-svn: 114091
2010-09-16 17:05:55 +00:00
Rafael Espindola
f667d929ce
Add a InitSections method to the streamer interface.
...
The ELF implementation now creates text, data and bss to match the gnu as
behavior.
The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.
A nice benefit is that -n is not required anymore when producing
ELF files.
llvm-svn: 114027
2010-09-15 21:48:40 +00:00
Rafael Espindola
12d73d1f18
Add support for leb128 of absolute expressions.
...
llvm-svn: 113691
2010-09-11 16:45:15 +00:00
Benjamin Kramer
e39017cb97
Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.
...
llvm-svn: 112849
2010-09-02 18:53:37 +00:00
Matt Fleming
a8f6c1cc26
Add some more handlers for ELF section directives.
...
llvm-svn: 108928
2010-07-20 21:12:46 +00:00
Daniel Dunbar
8897d479b5
MC/AsmParser: Stop playing unsafe member function pointer calls, this isn't
...
portable enough.
- Downside is we now double dispatch through a stub function, but this isn't
performance critical.
llvm-svn: 108661
2010-07-18 22:22:07 +00:00
Daniel Dunbar
ba6e354b61
MC/AsmParser: Fix TokError() to accept a Twine.
...
llvm-svn: 108647
2010-07-18 18:31:42 +00:00
Eli Friedman
9de5967244
Start of .sleb128/.uleb128 parsing support.
...
llvm-svn: 108612
2010-07-17 06:27:28 +00:00
Eli Friedman
9e36dd001a
Work-in-progress parsing for ELF .section directive.
...
llvm-svn: 108609
2010-07-17 04:29:04 +00:00
Eli Friedman
56178a07bf
Add support for parsing .size directives for ELF.
...
llvm-svn: 108606
2010-07-17 03:09:18 +00:00
Daniel Dunbar
ab058b83e0
MC/AsmParser: Move ELF specific parser to ELFAsmParser.cpp.
...
llvm-svn: 108196
2010-07-12 21:23:32 +00:00