• Home
  • History
  • Annotate
  • only in /external/llvm/test/MC/COFF/
History log of /external/llvm/test/MC/COFF/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
de2d8694e25a814696358e95141f4b1aa4d8847e 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r275480

Bug: http://b/31320715

This merges commit 7dcf7f03e005379ef2f06db96aa93f06186b66d5 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Iaf3738f74312d875e69f61d604ac058f381a2a1a
ross-section-relative.ll
v-def-range.s
v-empty-file-table.s
v-empty-linetable.s
v-inline-linetable-infloop.s
v-inline-linetable-unreachable.s
v-inline-linetable.s
v-loc.s
r28462.s
elax-reloc.s
eh-section-2.s
eh-section.s
imestamp.s
eak-alias-local.s
eak-val.s
eak.s
f3ef5332fa3f4d5ec72c178a2b19dac363a19383 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r256229

http://b/26987366

Change-Id: I1f29c4676a8abe633ab5707dded58d846c973d50
RM/lit.local.cfg
lias.s
ad-expr.s
asic-coff-64.s
asic-coff.s
nvalid-def.s
nvalid-endef.s
nvalid-scl-range.s
nvalid-scl.s
nvalid-type.s
abel-undefined.s
afeseh.s
ecidx-diagnostic.s
imple-fixups.s
tdin.s
ymbol-fragment-offset-64.s
ymbol-fragment-offset.s
emporary-alias.s
imestamp.s
6948897e478cbd66626159776a8017b3c18579b9 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r239765

Bug: 20140355: This rebase pulls the upstream fix for the spurious
warnings mentioned in the bug.

Change-Id: I7fd24253c50f4d48d900875dcf43ce3f1721a3da
ross-section-relative.ll
ross-section-relative.s
r23025.s
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
lobal_ctors_dtors.ll
r-to-imgrel.ll
inker-options.ll
ricky-names.ll
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
ss_section.ll
onst-gv-with-rel-init.ll
iff.s
irective-section-characteristics.ll
lobal_ctors_dtors.ll
nitialised-data.ll
inker-options.ll
ection-passthru-flags.s
eh-section.s
eak-symbol.ll
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
lias.s
asic-coff-64.s
asic-coff.s
igobj.py
ss_section.ll
omm-align.s
omm.ll
omm.s
onst-gv-with-rel-init.ll
eat00.s
ile.s
r-to-imgrel.ll
inker-options.ll
set0.s
ecidx.s
ection-invalid-flags.s
ection-name-encoding.s
ection-passthru-flags.s
eh-linkonce.s
imple-fixups.s
ymbol-fragment-offset-64.s
ymbol-fragment-offset.s
eak.s
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
lias.s
asic-coff-64.s
asic-coff.s
arly-dce.s
lobal_ctors_dtors.ll
inker-options.ll
inkonce-invalid.s
inkonce.s
it.local.cfg
set0.s
ection-comdat-conflict.s
ection-comdat-conflict2.s
ection-comdat.s
ection-name-encoding.s
eh-stackalloc-zero.s
eh.s
ymbol-fragment-offset-64.s
ymbol-fragment-offset.s
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
lias.s
omm.ll
omm.s
irective-section-characteristics.ll
ile.s
lobal_ctors_dtors.ll
nitialised-data.ll
nvalid-def.s
nvalid-endef.s
nvalid-scl-range.s
nvalid-scl.s
nvalid-type-range.s
nvalid-type.s
ffset.s
ymbol-alias.s
eak-symbol.ll
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
ad-expr.s
ss.s
ss_section.ll
omm.s
eat00.s
r-to-imgrel.ll
ecidx-diagnostic.s
ecidx.s
ection-name-encoding.s
imestamp.s
ricky-names.ll
eak-symbol.ll
eak.s
cdf67d5791d044a5f217114e18eb8d6242222b98 02-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196104:
------------------------------------------------------------------------
r196104 | rafael | 2013-12-02 06:59:34 -0800 (Mon, 02 Dec 2013) | 1 line

Output .eh_frames on COFF too now that the integrated as is used on mingw.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196137 91177308-0d34-0410-b5e6-96231b3b80d8
h-frame.s
d0cf77ad590633c0e10336e4c59b509140328042 01-Dec-2013 Bill Wendling <isanbard@gmail.com> --- Reverse-merging r195823 into '.':
U lib/MC/MCSectionCOFF.cpp
U lib/CodeGen/TargetLoweringObjectFileImpl.cpp
U test/MC/COFF/weak-symbol.ll
U test/MC/COFF/tricky-names.ll
G .
--- Recording mergeinfo for reverse merge of r195823 into '.':
G .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196036 91177308-0d34-0410-b5e6-96231b3b80d8
ricky-names.ll
eak-symbol.ll
38af06736e6d46ef3d417e40b9843ca1658fc8e7 27-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195798:
------------------------------------------------------------------------
r195798 | rafael | 2013-11-26 17:18:37 -0800 (Tue, 26 Nov 2013) | 9 lines

Use simple section names for COMDAT sections on COFF.

With this patch we use simple names for COMDAT sections (like .text or .bss).
This matches the MSVC behavior.

When merging it is the COMDAT symbol that is used to decide if two sections
should be merged, so there is no point in building a fancy name.

This survived a bootstrap on mingw32.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195823 91177308-0d34-0410-b5e6-96231b3b80d8
ricky-names.ll
eak-symbol.ll
0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091 27-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195148:
------------------------------------------------------------------------
r195148 | rafael | 2013-11-19 11:52:52 -0800 (Tue, 19 Nov 2013) | 15 lines

Support multiple COFF sections with the same name but different COMDAT.

This is the first step to fix pr17918.

It extends the .section directive a bit, inspired by what the ELF one looks
like. The problem with using linkonce is that given

.section foo
.linkonce....

.section foo
.linkonce

we would already have switched sections when getting to .linkonce. The cleanest
solution seems to be to add the comdat information in the .section itself.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195822 91177308-0d34-0410-b5e6-96231b3b80d8
ection-comdat.s
a7b7a7d629c3101f6f6c87e6848e865734e0238c 19-Nov-2013 Reid Kleckner <reid@kleckner.net> Revert "COFF: Emit all MCSymbols rather than filtering out some of them"

This reverts commit r190888, to fix PR17967. The original change wasn't
the right way to get @feat.00 into the object file. The right fix is to
make @feat.00 be a global symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195053 91177308-0d34-0410-b5e6-96231b3b80d8
lias.s
eat00.s
set0.s
22f9dd4591e8af6d6feed10a4b6e11a784582edc 18-Oct-2013 Hans Wennborg <hans@hanshq.net> MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asm

This is another (final?) stab at making us able to parse our own asm output
on Windows.

Symbols on Windows often contain @'s and ?'s in their names. Our asm parser
didn't like this. ?'s were not allowed, and @'s were intepreted as trying to
reference PLT/GOT/etc.

We can't just add quotes around the bad names, since e.g. for MinGW, we use gas
to assemble, and it doesn't like quotes in some places (notably in .def
directives).

This commit makes us allow ?'s in symbol names, and @'s in symbol names for MS
assembly.

Differential Revision: http://llvm-reviews.chandlerc.com/D1978

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193000 91177308-0d34-0410-b5e6-96231b3b80d8
ricky-names.ll
ab887bf52c99c2c9a4346b6dea2b8118e18a4282 18-Oct-2013 Hans Wennborg <hans@hanshq.net> Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output"

This caused the clang-native-mingw32-win7 buildbot to break.

The assembler was complaining about the following lines that were showing up
in the asm for CrashRecoveryContext.cpp:

movl $"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4", 4(%eax)
calll "_AddVectoredExceptionHandler@8"
.def "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4";
"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4":
calll "_RemoveVectoredExceptionHandler@4"

Reverting for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192940 91177308-0d34-0410-b5e6-96231b3b80d8
uoted-names.ll
b74b88edac9ab490ba428aef0bdebc957399bbd7 17-Oct-2013 Hans Wennborg <hans@hanshq.net> Re-commit r192758 - MC: quote tricky symbol names in asm output

The reason this got reverted was that the @feat.00 symbol which was emitted
for every TU became quoted, and on cygwin/mingw we use the gas assembler which
couldn't handle the quotes.

This commit fixes the problem by only emitting @feat.00 for win32, where we use
clang -cc1as to assemble. gas would just drop this symbol anyway, so there is no
loss there.

With @feat.00 gone, there shouldn't be quoted symbols showing up on cygwin since
it uses the Itanium ABI, which doesn't put these funny characters in symbols.

> Because of win32 mangling, we produce symbol and section names with
> funny characters in them, most notably @ characters.
>
> MC would choke on trying to parse its own assembly output. This patch addresses
> that by:
>
> - Making @ trigger quoting of symbol names
> - Also quote section names in the same way
> - Just parse section names like other identifiers (to allow for quotes)
> - Don't assume @ signifies a symbol variant if it is in a string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192859 91177308-0d34-0410-b5e6-96231b3b80d8
uoted-names.ll
32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f 16-Oct-2013 NAKAMURA Takumi <geek4civic@gmail.com> Revert r192758 (and r192759), "MC: Better handling of tricky symbol and section names"

GNU AS didn't like quotes in symbol names.

Error: junk at end of line, first unrecognized character is `"'

.def "@feat.00";
"@feat.00" = 1

Reproduced on Cygwin's 2.23.52.20130309 and mingw32's 2.20.1.20100303.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192775 91177308-0d34-0410-b5e6-96231b3b80d8
uoted-names.ll
d910c469632a75ccb85bf0619a9c50a207914a2c 16-Oct-2013 Hans Wennborg <hans@hanshq.net> dos2unix on quoted-names.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192759 91177308-0d34-0410-b5e6-96231b3b80d8
uoted-names.ll
508d7b7330968c48e69f0da82c66bdcc0afe6190 16-Oct-2013 Hans Wennborg <hans@hanshq.net> MC: Better handling of tricky symbol and section names

Because of win32 mangling, we produce symbol and section names with
funny characters in them, most notably @ characters.

MC would choke on trying to parse its own assembly output. This patch addresses
that by:

- Making @ trigger quoting of symbol names
- Also quote section names in the same way
- Just parse section names like other identifiers (to allow for quotes)
- Don't assume @ signifies a symbol variant if it is in a string.

Differential Revision: http://llvm-reviews.chandlerc.com/D1945

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192758 91177308-0d34-0410-b5e6-96231b3b80d8
uoted-names.ll
28860823ad34d41d4f58561dc14a982fb0843fdd 18-Sep-2013 Reid Kleckner <reid@kleckner.net> COFF: Ensure that objects produced by LLVM link with /safeseh

Summary:
We indicate that the object files are safe by emitting a @feat.00
absolute address symbol. The address is presumably interpreted as a
bitfield of features that the compiler would like to enable. Bit 0 is
documented in the PE COFF spec to opt in to "registered SEH", which is
what /safeseh enables.

LLVM's object files are safe by default because LLVM doesn't know how to
produce SEH handlers.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1691

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190898 91177308-0d34-0410-b5e6-96231b3b80d8
eat00.s
3168868bb91ac871dbb83c879e763d39a39e607e 17-Sep-2013 Reid Kleckner <reid@kleckner.net> COFF: Emit all MCSymbols rather than filtering out some of them

In particular, this means we emit non-external symbols defined to
variables, such as aliases or absolute addresses.

This is needed to implement /safeseh, and it appears there was some
confusion about what symbols to emit previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190888 91177308-0d34-0410-b5e6-96231b3b80d8
lias.s
c29a720b362790746ca899a0b44fa35a1b399a42 15-Sep-2013 Kai Nacke <kai.nacke@redstar.de> Fix alignment of unwind data.

For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).

Reviewed by Anton Korobeynikov, Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190767 91177308-0d34-0410-b5e6-96231b3b80d8
eh-align1.s
eh-align2.s
eh-align3.s
7185bdd88302a67618b2edf51c499d647e5ff492 15-Sep-2013 Kai Nacke <kai.nacke@redstar.de> Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
data structures.

The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.

Reviewed by Jim Grosbach, Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190766 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
f0a0d578089572be37063bbe37063edb28148159 27-Aug-2013 Kai Nacke <kai.nacke@redstar.de> Fix wrong code offset for unwind code SET_FPREG.

The code offset for unwind code SET_FPREG is wrong because it is set
to constant 0. The fix is to do the same as for the other unwind
codes: emit a label and later the absolute difference between the
label and the begin of the prologue.
Also enables the failing test case MC/COFF/seh.s

Reviewed by Jim Grosbach, Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189309 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
24ec2e5a72d7fca58f8ae2b3c01501a9927ef04e 16-Aug-2013 Daniel Dunbar <daniel@zuster.org> [tests] Cleanup initialization of test suffixes.

- Instead of setting the suffixes in a bunch of places, just set one master
list in the top-level config. We now only modify the suffix list in a few
suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py).

- Aside from removing the need for a bunch of lit.local.cfg files, this enables
4 tests that were inadvertently being skipped (one in
Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and
CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been
XFAILED).

- This commit also fixes a bunch of config files to use config.root instead of
older copy-pasted code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
it.local.cfg
6aa9315353574c000c5f2aa0edd34067e94b8c79 13-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Stick zero initialized symbols into the .bss section for COFF

Summary:
We need to do two things:

- Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo
- Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do
with it

This fixes PR16861.

Reviewers: rnk

Reviewed By: rnk

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1361

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188244 91177308-0d34-0410-b5e6-96231b3b80d8
ss_section.ll
9706d43b56e16eb3029314e02c499305284e99f1 08-Aug-2013 David Majnemer <david.majnemer@gmail.com> Revert "coff also doesn't have a ReadOnlySection yet, (!)"

This reverts commit r77814.

We were sticking global constants in the .data section instead of in the
.rdata section when emitting for COFF.

This fixes PR16831.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187956 91177308-0d34-0410-b5e6-96231b3b80d8
data.ll
fdbea5107b5a8249421fd5e603a31f40f05ea25f 29-Jul-2013 Nico Rieck <nico.rieck@gmail.com> Use proper section suffix for COFF weak symbols

32-bit symbols have "_" as global prefix, but when forming the name of
COMDAT sections this prefix is ignored. The current behavior assumes that
this prefix is always present which is not the case for 64-bit and names
are truncated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187356 91177308-0d34-0410-b5e6-96231b3b80d8
eak-symbol-section-specification.ll
eak-symbol.ll
c63dce3c59ac24b2656e06f7017cd4dce4bf733c 29-Jul-2013 Nico Rieck <nico.rieck@gmail.com> MC: Support larger COFF string tables

Single-slash encoded entries do not require a terminating null. This bumps
the maximum table size from ~1MB to ~9.5MB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187352 91177308-0d34-0410-b5e6-96231b3b80d8
ection-name-encoding.s
6057eb7ab697fcd0feb3cdd55e9a497cfe0aff72 15-Jul-2013 Reid Kleckner <reid@kleckner.net> [mc-coff] Resolve aliases when emitting COFF relocations

This is consistent with the ELF object writer.

Add some COFF tests that relocate against an alias.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D1079

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186341 91177308-0d34-0410-b5e6-96231b3b80d8
lias.s
5310cdbcc909a7c35d4c7df0fd5703850a9db2a5 08-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Revert: Fix wrong code offset for unwind code SET_FPREG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185793 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
9611873724b9f8d6cbbed7924c972e8d026cc263 08-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Revert: Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH data structures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185791 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
9c411e649e86c1734bc087d0e87208569ae1cb5c 08-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Revert: Fix alignment of unwind data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185790 91177308-0d34-0410-b5e6-96231b3b80d8
eh-align1.s
eh-align2.s
eh-align3.s
59c5c6c2b24b77371e53e6dbdf035edb50eafe1a 06-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Fix alignment of unwind data.

For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).

Reviewed by Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185760 91177308-0d34-0410-b5e6-96231b3b80d8
eh-align1.s
eh-align2.s
eh-align3.s
eececbc7d3d420a27f9e1f9e11cce1b9bbff953f 06-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
data structures.

The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.

Reviewed by Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185759 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
ea434e4bca15383418ac65788fdb8bc3b5725fe2 06-Jul-2013 Kai Nacke <kai.nacke@redstar.de> Fix wrong code offset for unwind code SET_FPREG.

The code offset for unwind code SET_FPREG is wrong because it is set
to constant 0. The fix is to do the same as for the other unwind
codes: emit a label and later the absolute difference between the
label and the begin of the prologue.
Also enables the failing test case MC/COFF/seh.s

Reviewed by Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185758 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
80646283796b20c6a1b7d8eb69ce6f0478d54383 06-Jul-2013 Nico Rieck <nico.rieck@gmail.com> MC: Implement COFF .linkonce directive

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185753 91177308-0d34-0410-b5e6-96231b3b80d8
inkonce-invalid.s
inkonce.s
a6d343a688073664b3a80aa117e0d3cbecf28014 04-Jul-2013 Nico Rieck <nico.rieck@gmail.com> MC: Add .section directive to COFF

Supports GAS flags "abdnrswxy". No support for alignment or subsections.

Fixes PR16366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185669 91177308-0d34-0410-b5e6-96231b3b80d8
ection-invalid-flags.s
ection.s
eh-section.s
4b5581530393e647d559360f8c6f229c05aca94f 25-Apr-2013 Reid Kleckner <reid@kleckner.net> [mc-coff] Forward Linker Option flags into the .drectve section

Summary:
This is modelled on the Mach-O linker options implementation and should
support a Clang implementation of #pragma comment(lib/linker).

Reviewers: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D724

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180569 91177308-0d34-0410-b5e6-96231b3b80d8
inker-options.ll
93d0b06e2adca2d9f3d4ec544f352cc4e5e9618a 25-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix section relocation for SECTIONREL32 with immediate offset.

Patch by Kai Nacke. This matches the gnu as output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180568 91177308-0d34-0410-b5e6-96231b3b80d8
ecrel-variant.s
4974b972e7dd94fad74ada4df32a12aba09c4de0 22-Apr-2013 Peter Collingbourne <peter@pcc.me.uk> COFF: Fix weak external aliases.

Differential Revision: http://llvm-reviews.chandlerc.com/D700

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180034 91177308-0d34-0410-b5e6-96231b3b80d8
eak.s
f89da7210b09a0a0f7c9ee216cd54dca03c6b64a 12-Apr-2013 Nico Rieck <nico.rieck@gmail.com> Replace coff-/elf-dump with llvm-readobj

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361 91177308-0d34-0410-b5e6-96231b3b80d8
lign-nops.s
asic-coff-64.s
asic-coff.s
ss.s
iff.s
odule-asm.ll
ecrel32.s
eh-section.s
eh.s
imple-fixups.s
ymbol-alias.s
ymbol-fragment-offset-64.s
ymbol-fragment-offset.s
eak-symbol-section-specification.ll
eak.s
18d49acdab79d6f0966b47182b6c3a2ba3d9f80f 11-Apr-2013 Nico Rieck <nico.rieck@gmail.com> MC: Support COFF image-relative MCSymbolRefs

Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.

Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).

A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179240 91177308-0d34-0410-b5e6-96231b3b80d8
elocation-imgrel.s
0933134a304b47d3767aad202df9f0e09743da6d 29-Jan-2013 Michael J. Spencer <bigcheesegs@gmail.com> [MC][COFF] Delay handling symbol aliases when writing

Fixes PR14447 and PR9034. Patch by Nico Rieck!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173839 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-alias.s
4de5872dede6e3dd80f7ab3df5df4fe0e33e3b2e 13-Nov-2012 Michael J. Spencer <bigcheesegs@gmail.com> [MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167877 91177308-0d34-0410-b5e6-96231b3b80d8
eak-symbol-section-specification.ll
371e17c03c3169459c84986d4a318f6d6d3f8730 23-Sep-2012 Anton Korobeynikov <asl@math.spbu.ru> Emit dtors into proper section while compiling in vcpp-compatible mode.
Patch by Kai!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164476 91177308-0d34-0410-b5e6-96231b3b80d8
lobal_ctors.ll
lobal_ctors_dtors.ll
a9e37c5eaf79c3a32f2921536fb7e12514e86fb2 07-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix alignment of .comm and .lcomm on mingw32.

For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't
use the same setting for both. Fix this by reintroducing the LCOMM enum.
I verified this against mingw's gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163420 91177308-0d34-0410-b5e6-96231b3b80d8
omm.ll
5ac252024180805f455109ab5c7911012378b64b 08-Aug-2012 NAKAMURA Takumi <geek4civic@gmail.com> llvm/test/MC/COFF/seh.s: Fixup corresponding to r161487.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161489 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
cc85160672e3b2d5ec363cc4e151e5b944a60454 25-Mar-2012 Eli Bendersky <eli.bendersky@intel.com> Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu

* Removed test/lib/llvm.exp - it is no longer needed
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
left in the test suite so this code is no longer required. test/lit.cfg is
now much shorter and clearer
* Removed a lot of duplicate code in lit.local.cfg files that need access to
the root configuration, by adding a "root" attribute to the TestingConfig
object. This attribute is dynamically computed to provide the same
information as was previously provided by the custom getRoot functions.
* Documented the config.root attribute in docs/CommandGuide/lit.pod





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
it.local.cfg
32d22ee11dc03a69ef22b0794e301cd32176019d 23-Feb-2012 Michael J. Spencer <bigcheesegs@gmail.com> Emit global ctors into .CRT$XCU instead of .ctors on Win32. Patch by Joe Groff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151289 91177308-0d34-0410-b5e6-96231b3b80d8
lobal_ctors.ll
0f0c411079cd21bb3a81a1b70bf8c67539a16c22 16-Feb-2012 Eli Bendersky <eli.bendersky@intel.com> Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.

Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
g.exp
it.local.cfg
8f7d12ccfd8feb258bdf4e582592bc00beacc7c6 17-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added the
asm parsing and testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146801 91177308-0d34-0410-b5e6-96231b3b80d8
ecrel32.s
116bc795da4b10773235a89cc251d31651b3851d 29-Nov-2011 Michael J. Spencer <bigcheesegs@gmail.com> MC/X86/COFF: Allow quotes in names when targeting MS/Windows,
as MC is the only assembler we support.

This splits MS/Windows and GNU/Windows ASM infos into two seperate classes.
While there is currently only one difference, full MS C++ ABI support will
require many more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145409 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-mangling.ll
88c816453fac630e23785dbd1755675d139603db 27-May-2011 Charles Davis <cdavis@mines.edu> Add the suffix to the Win64 EH data sections' names if given. Add a test for
this. XFAIL'd, because the COFF AsmParser can't handle .section yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132220 91177308-0d34-0410-b5e6-96231b3b80d8
eh-section.s
07cbe231738d64d830b77303d664b531130722f7 27-May-2011 Charles Davis <cdavis@mines.edu> Assorted fixes for Win64 EH unwind info emission:
- Flip order of bitfields. This gets our output matching GAS.
- Handle case where the end of the prolog wasn't specified.
- If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes.

Add a test for the latter two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132188 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
3a5d7d0665e2c836fb7619ea1160b29c36827c4a 27-May-2011 Charles Davis <cdavis@mines.edu> Add a test for Win64 EH unwind information emission.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132180 91177308-0d34-0410-b5e6-96231b3b80d8
eh.s
a4a2a03c311e7a7b64bfba1ae714ae85f74999fd 25-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Remove some hard coded CR-LFs. Some of these were the entire files, one of
these was just one line of a file. Explicitly set the eol-style property on the
files to try and ensure this fix stays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130125 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.s
ss.s
imple-fixups.s
ymbol-alias.s
ymbol-fragment-offset.s
eak.s
1ac7fe0f4dae8a9266fa6ff31ea4939ec64a3e5e 21-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix relative relocations. This is sufficient for running the rust testsuite with
MC :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129923 91177308-0d34-0410-b5e6-96231b3b80d8
iff.s
3660a847f1820d73847539f3959dc069396f8e44 20-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Behave like gnu as when a relocation crosses sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129850 91177308-0d34-0410-b5e6-96231b3b80d8
iff.s
340a7a1c8f57f738335c8af79320d22832365595 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't use PadSectionToAlignment on windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120978 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.s
ymbol-fragment-offset.s
d30dcfe3312cc0a7c48834b7063a84c111b0b762 16-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Unbreak test on non-COFF targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116669 91177308-0d34-0410-b5e6-96231b3b80d8
eak.s
4cee2890a66974af506f2125243114cc14bd5556 16-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Add support for default-null weak externals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116666 91177308-0d34-0410-b5e6-96231b3b80d8
eak.s
28ca86aa19fe2a5493573164ef0c2c54542ed9da 09-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Fix .bss section size. Fixes PR8335. Patch by NAKAMUTA Takumi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116155 91177308-0d34-0410-b5e6-96231b3b80d8
ss.s
192d136750b376d46bf030a6d5a4c098b0768826 09-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Implement InitSections. Fixes PR8335.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116151 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.s
odule-asm.ll
7d4900416af3813aa9473e6ec2f0497ad5d208dd 09-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Add COFFAsmParser. Completes PR8343.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116150 91177308-0d34-0410-b5e6-96231b3b80d8
lign-nops.s
asic-coff.ll
asic-coff.s
imple-fixups.ll
imple-fixups.s
witch-relocations.ll
ymbol-alias.ll
ymbol-alias.s
ymbol-fragment-offset.ll
ymbol-fragment-offset.s
adab850daaed40bc022bd4f37ff643154a9e2bd1 08-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Add test for my last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116015 91177308-0d34-0410-b5e6-96231b3b80d8
imple-fixups.ll
b5814a3c152bbb7097a6d90168ce6eabde788c60 07-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Fix symbol aliases. Fixes PR8251.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115909 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-alias.ll
eb6e77f8cccd14cdba995ff8231f2c9faea9bfcc 05-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Fix (PR8278) temporary symbol relocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115656 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-fragment-offset.ll
a25c0a4283e627a34a3fb3cf0ed2ddde0d886a36 05-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> test/COFF: Fix symbol indexes and names. Update tests to match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115642 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
ymbol-fragment-offset.ll
f191d120b1ea9cb132270d35dc133b419183e687 05-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> test/COFF: Remove temp file usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115641 91177308-0d34-0410-b5e6-96231b3b80d8
lign-nops.s
asic-coff.ll
ymbol-fragment-offset.ll
cc1f91c83305c446090c0ae127e1324c3c9eae08 05-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Cleanup Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115639 91177308-0d34-0410-b5e6-96231b3b80d8
lign-nops.s
083cf1574facc9ce468fba1735c794bd7e520108 04-Oct-2010 Jan Wen Voung <jvoung@google.com> Add hook in MCSection to decide when to use "optimized nops", for each
section kind. Previously, optimized nops were only used for MachO.
Also added tests for ELF and COFF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
lign-nops.s
g.exp
2baa2a8cc7d2b85c4220cd8d8f369a6bc088adc7 29-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Fix test. IMAGE_SYM_CLASS_LABEL should never have been emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115024 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-fragment-offset.ll
a72d87899bc1bfdb17744aae2545a21b3630d3c1 27-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC-COFF: Drop empty sections, and label symbols. Convert relocations
targeted at symbols into relocations relative to the containing section.

Patch by Nathan Jeffords!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114823 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
ymbol-fragment-offset.ll
00002796bbb11f58435b9f43d63fd6d0657fc3a5 15-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> test: Fix coff-dump section array indicies to 1 based to match file format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113928 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
ymbol-fragment-offset.ll
2ad12a0e2afa3cdffa35a4223bea775ad06ad468 01-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> COFF: Update tests to reflect changes in last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112704 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
ymbol-fragment-offset.ll
82c84fdd23669d23c02a07498c83b83702979829 24-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix COFF x86-64 relocations. PR7960.

Multiple symbol reloc handling part of the patch by Cameron Esfahani.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111963 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
witch-relocations.ll
ymbol-fragment-offset.ll
237f8fe5df628065874b8590b364d04dfc2686fd 03-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC: Fix symbol fragment offsets in COFF.

Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol-fragment-offset.ll
dfd30187c685c2c5200ee795c64885c0a39dc2d0 27-Jul-2010 Michael J. Spencer <bigcheesegs@gmail.com> Make MC use Windows COFF on Windows and add tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109494 91177308-0d34-0410-b5e6-96231b3b80d8
asic-coff.ll
g.exp