1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

452 Commits

Author SHA1 Message Date
Rafael Espindola
a73aa6c568 Don't reject an archive with just a symbol table.
It is pretty unambiguous how to interpret it and gnu ar accepts it too.

llvm-svn: 241750
2015-07-08 22:27:54 +00:00
Rafael Espindola
116995db75 Start adding support for writing archives in BSD format.
No support for the symbol table yet (but will hopefully add it today).
We always use the long filename format so that we can align the member,
which is an advantage of the BSD format.

llvm-svn: 241721
2015-07-08 20:47:32 +00:00
Simon Atanasyan
3a38a7bfad [yaml2obj] Align section content using AddressAlign field's value
Use AddressAlign field's value to properly align sections content in the
yaml2obj tool. Before this change the yaml2obj ignored AddressAlign and
always aligned section on 16 bytes boundary.

llvm-svn: 241674
2015-07-08 10:12:40 +00:00
Simon Atanasyan
ed9fe7f06f [yaml2obj] Use regex to match sections offsets. NFC
llvm-svn: 241669
2015-07-08 06:57:24 +00:00
Rafael Espindola
5590e08308 Delete UnknownAddress. It is a perfectly valid symbol value.
getSymbolValue now returns a value that in convenient for most callers:
* 0 for undefined
* symbol size for common symbols
* offset/address for symbols the rest

Code that needs something more specific can check getSymbolFlags.

llvm-svn: 241605
2015-07-07 17:12:59 +00:00
Rafael Espindola
547db2d2a9 Common symbols are not undefined, at least for ObjectFile.
They are implemented like that in some object formats, but for the interface
provided by lib/Object, SF_Undefined and SF_Common are different things.

This matches the ELF and COFF implementation and fixes llvm-nm for MachO.

llvm-svn: 241587
2015-07-07 14:26:39 +00:00
Rafael Espindola
65d267277b llvm-nm: treat weak undefined as undefined.
This matches the behavior of gnu ld.

llvm-svn: 241512
2015-07-06 21:36:23 +00:00
Rafael Espindola
7b0c357367 When sorting by address, undefined symbols go first.
This matches gnu nm.

llvm-svn: 241488
2015-07-06 19:21:04 +00:00
Rafael Espindola
384e9f4564 Fix printing of common symbols.
Printing the symbol size matches the behavior or both gnu nm and freebsd nm.

llvm-svn: 241480
2015-07-06 18:18:44 +00:00
Rafael Espindola
2c1a53aa22 Check that COFF .obj files have sections with zero virtual address spaces.
When talking about the virtual address of sections the coff spec says:
  ... for simplicity, compilers should set this to zero. Otherwise, it is an
  arbitrary value that is subtracted from offsets during relocation.

We don't currently subtract it, so check that it is zero.

If some producer does create such files, we can change getRelocationOffset
instead.

llvm-svn: 241447
2015-07-06 14:26:07 +00:00
Rafael Espindola
b31a748216 Fix handling of ELF::R_MIPS_32 on Mips64.
Thanks to Aboud, Amjad for reporting the regression and providing the testcase.

llvm-svn: 241440
2015-07-06 12:18:44 +00:00
Simon Atanasyan
755b9d9d7d [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
SHT_NOBITS sections do not have content in an object file. Now the yaml2obj
tool does not accept `Content` field for such sections, and the obj2yaml
tool does not attempt to read the section content from a file.

Restore r241350 and r241352.

llvm-svn: 241377
2015-07-03 23:00:54 +00:00
Rafael Espindola
3a040454d4 This reverts commit r241350 and r241352.
r241350 broke lld tests.
r241352 depends on r241350.

Original messages:
"[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools"
"[ELFYAML] Make the Size field for .bss section optional"

llvm-svn: 241354
2015-07-03 14:54:02 +00:00
Simon Atanasyan
d8a1b5611d [ELFYAML] Make the Size field for .bss section optional
It's a common case to have a zero-size .bss section in an object file.

llvm-svn: 241352
2015-07-03 14:19:06 +00:00
Simon Atanasyan
a4c43e6acb [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
SHT_NOBITS sections do not have content in an object file. Now yaml2obj
tool does not accept `Content` field for such sections, and obj2yaml
tool does not attempt to read the section content from a file.

llvm-svn: 241350
2015-07-03 14:07:06 +00:00
Rafael Espindola
954192d707 Improve error message.
Thanks to Sean Silva for the suggestion.

llvm-svn: 241255
2015-07-02 11:48:48 +00:00
Rafael Espindola
2aa69908b2 Return ErrorOr from getSection.
This also improves the logic of what is an error:

* getSection(uint_32): only return an error if the index is out of bounds. The
  index 0 corresponds to a perfectly valid entry.
* getSection(Elf_Sym): Returns null for symbols that normally don't have
  sections and error for out of bound indexes.

In many places this just moves the report_fatal_error up the stack, but those
can then be fixed in smaller patches.

llvm-svn: 241156
2015-07-01 12:56:27 +00:00
Rafael Espindola
f97ba343b7 Remove Elf_Shdr_Iter. Diagnose files with invalid section header sizes.
llvm-svn: 241109
2015-06-30 19:58:10 +00:00
Rafael Espindola
fc1039bb12 Add a test of an elf file with an invalid section index.
We were already checking, but were missing a test.

llvm-svn: 241094
2015-06-30 18:23:07 +00:00
Rafael Espindola
ba4f1ed96a Report an error on invalid sh_entsize.
llvm-svn: 241070
2015-06-30 14:59:20 +00:00
Rafael Espindola
50a3948f04 Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.

This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.

llvm-svn: 240950
2015-06-29 14:39:25 +00:00
Rafael Espindola
f9a95b0fa5 Add a testcase for an invalid file.
We were already checking this, but had no tests.

llvm-svn: 240945
2015-06-29 14:12:14 +00:00
Rafael Espindola
d966b65619 Convert an assert that can fail into error checking.
llvm-svn: 240944
2015-06-29 14:02:24 +00:00
Lang Hames
5cd04c2d39 [Stackmap] Pre-assemble the stackmap parser test case. (Fix builders).
This case had been failing on testers that didn't have x86 support. Rather
than XFAIL it on testers without x86 support, I've just assembled it and used
the raw object as the test input.

llvm-svn: 240875
2015-06-27 03:49:25 +00:00
Lang Hames
0ec4006593 [StackMaps] Add a lightweight parser for stackmap version 1 sections.
The parser provides a convenient interface for reading llvm stackmap v1 sections
in object files.

This patch also includes a new option for llvm-readobj, '-stackmap', which uses
the parser to pretty-print stackmap sections for debugging/testing purposes.

llvm-svn: 240860
2015-06-26 23:56:53 +00:00
Michael J. Spencer
3370428756 [Object][ELF] Add support for dumping dynamic relocations when sections are stripped.
llvm-svn: 240703
2015-06-25 21:47:32 +00:00
Rafael Espindola
b298fbcfdd llvm-nm: Don't print mapping symbols.
This matches the behavior of gnu nm. Fixes pr23930.

llvm-svn: 240695
2015-06-25 21:00:51 +00:00
Rafael Espindola
f037880978 llvm-nm: print 'n' instead of '?'
This matches gnu nm and has the advantage that there is a upper case N.

llvm-svn: 240655
2015-06-25 16:01:53 +00:00
Peter Collingbourne
f928cd9cb9 Object: Add XFAILed test case for r239560.
We ought to also emit unmangled references to dllimported functions,
but no existing linker needs this.

llvm-svn: 240562
2015-06-24 18:03:39 +00:00
Rafael Espindola
a70d8a336d Change how symbol sizes are handled in lib/Object.
COFF and MachO only define symbol sizes for common symbols. Reflect that
in the class hierarchy by having a method for common symbols only in the base
and a general one in ELF.

This avoids the need of using a magic value for the size, which had a few
problems
* Most callers didn't check for it.
* The ones that did could not tell the magic value from a file actually having
  that value.

llvm-svn: 240529
2015-06-24 10:20:30 +00:00
Rafael Espindola
56418587fa objdump: Don't print a (always 0) size for MachO symbols.
Only common symbol on MachO and COFF have a size.

For COFF we already had a custom format.

For MachO, there is no native objdump and we were printing it as ELF. Now
we only print the sizes for symbols that actually have them.

llvm-svn: 240422
2015-06-23 15:45:38 +00:00
Rafael Espindola
e8ff3dd7fa Improve error handling of getRelocationAddend.
This patch changes getRelocationAddend to use ErrorOr and considers it an error
to try to get the addend of a REL section.

If, for example, a x86_64 file has a REL section, that file is corrupted and
we should reject it.

Using ErrorOr is not ideal since we check the section type once per relocation
instead of once per section.

Checking once per section would involve getRelocationAddend just asserting and
callers checking the section before iterating over the relocations.

In any case, this is an improvement and includes a test.

llvm-svn: 240176
2015-06-19 20:58:43 +00:00
Peter Collingbourne
f328508805 Object: Prepend __imp_ when mangling a dllimport symbol in IRObjectFile.
We cannot prepend __imp_ in the IR mangler because a function reference may
be emitted unmangled in a constant initializer. The linker is expected to
resolve such references to thunks. This is covered by the new test case.

Strictly speaking we ought to emit two undefined symbols, one with __imp_ and
one without, as we cannot know which symbol the final object file will refer
to. However, this would require rather intrusive changes to IRObjectFile,
and lld works fine without it for now.

This reimplements r239437, which was reverted in r239502.

Differential Revision: http://reviews.llvm.org/D10400

llvm-svn: 239560
2015-06-11 21:42:18 +00:00
Reid Kleckner
8d217e6b48 Revert "Move dllimport name mangling to IR mangler."
This reverts commit r239437.

This broke clang-cl self-hosts. We'd end up calling the __imp_ symbol
directly instead of using it to do an indirect function call.

llvm-svn: 239502
2015-06-11 01:31:48 +00:00
Peter Collingbourne
6f8524df44 Move dllimport name mangling to IR mangler.
This ensures that LTO clients see the correct external symbol name.

Differential Revision: http://reviews.llvm.org/D10318

llvm-svn: 239437
2015-06-09 22:09:53 +00:00
Peter Collingbourne
f713e907c2 LibDriver, llvm-lib: introduce.
llvm-lib is intended to be a lib.exe compatible utility that also
understands bitcode. The implementation lives in a library so that
lld can use it to implement /lib.

Differential Revision: http://reviews.llvm.org/D10297

llvm-svn: 239434
2015-06-09 21:50:22 +00:00
Alexey Samsonov
7239805bf0 [Object, MachO] Don't crash on incomplete MachO segment load commands.
Report proper error code from MachOObjectFile constructor if we
can't parse another segment load command (we already return a proper
error if segment load command contents is suspicious).

llvm-svn: 239109
2015-06-04 22:26:44 +00:00
Alexey Samsonov
09879a84df [Object, MachO] Don't crash on invalid MachO segment load commands.
Summary:
Properly report the error in segment load commands from MachOObjectFile
constructor instead of crashing the program.

Adjust the test case accordingly.

Test Plan: regression test suite

Reviewers: rafael, filcab

Subscribers: llvm-commits
llvm-svn: 239081
2015-06-04 20:08:52 +00:00
Alexey Samsonov
c5843d04e0 [Object, MachO] Don't crash on invalid MachO load commands.
Summary:
Currently all load commands are parsed in MachOObjectFile constructor.
If the next load command cannot be parsed, or if command size is too
small, properly report it through the error code and fail to construct
the object, instead of crashing the program.

Test Plan: regression test suite

Reviewers: rafael, filcab

Subscribers: llvm-commits
llvm-svn: 239080
2015-06-04 19:57:46 +00:00
Alexey Samsonov
14296c37fd [Object, MachO] Don't crash on parsing invalid MachO header.
Summary: Instead, properly report this error from MachOObjectFile constructor.

Test Plan: regression test suite

Reviewers: rafael

Subscribers: llvm-commits
llvm-svn: 239078
2015-06-04 19:45:22 +00:00
Alexey Samsonov
c5040fda6a Make test case more readable: move CHECK-lines next to corresponding RUN-lines.
llvm-svn: 239068
2015-06-04 18:50:04 +00:00
Rafael Espindola
22f3e6f348 Move test that depends on x86 to the x86 directory.
llvm-svn: 239043
2015-06-04 15:25:47 +00:00
Rafael Espindola
a4ac37168e Disassemble the start of sections even if there is no symbol there.
We already handled a section with no symbols, extend that to also handle a
section with symbols that don't include the section start.

llvm-svn: 239039
2015-06-04 15:01:05 +00:00
Rafael Espindola
72efd837bc Fix the interpretation of a 0 st_name.
The ELF spec is very clear:

-----------------------------------------------------------------------------
If the value is non-zero, it represents a string table index that gives the
symbol name. Otherwise, the symbol table entry has no name.
--------------------------------------------------------------------------

In particular, a st_name of 0 most certainly doesn't mean that the symbol has
the same name as the section.

llvm-svn: 238899
2015-06-03 05:14:22 +00:00
Rafael Espindola
948209eab7 Stop inventing symbol sizes.
MachO and COFF quite reasonably only define the size for common symbols.

We used to try to figure out the "size" by computing the gap from one symbol to
the next.

This would not be correct in general, since a part of a section can belong to no
visible symbol (padding, private globals).

It was also really expensive, since we would walk every symbol to find the size
of one.

If a caller really wants this, it can sort all the symbols once and get all the
gaps ("size") in O(n log n) instead of O(n^2).

On MachO this also has the advantage of centralizing all the checks for an
invalid n_sect.

llvm-svn: 238028
2015-05-22 15:43:00 +00:00
Rafael Espindola
f4fdab6ad5 Detect invalid section indexes when we first read them.
We still detect the same errors, but now we do it earlier.

llvm-svn: 238024
2015-05-22 14:59:27 +00:00
Rafael Espindola
63c7979275 Fix llvm-nm -S option.
It is explicitly documented to have no effect on object formats where symbols
don't have sizes.

llvm-svn: 238019
2015-05-22 13:28:35 +00:00
Rafael Espindola
f437566912 Make this test stricter. NFC.
llvm-svn: 238018
2015-05-22 13:17:31 +00:00
Simon Atanasyan
66f00e19c9 [llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program header
llvm-svn: 237451
2015-05-15 15:59:22 +00:00
Simon Atanasyan
5c9d63e238 [llvm-readobj/obj2yaml/yaml2obj] Support MIPS machine ELF header flags
llvm-svn: 236807
2015-05-08 07:04:59 +00:00
Simon Atanasyan
86d076bf9e [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section support
This change adds support for the SHT_MIPS_ABIFLAGS section
reading/writing to the obj2yaml and yaml2obj tools.

llvm-svn: 236738
2015-05-07 15:40:48 +00:00
Simon Atanasyan
05477e7924 [llvm-readobj/obj2yaml/yaml2obj] Support more MIPS ELF header flags
llvm-svn: 236728
2015-05-07 14:04:44 +00:00
Davide Italiano
896d3ac959 [Object] Teach Object and llvm-objdump about ".hidden"
Differential Revision:	http://reviews.llvm.org/D9416
Reviewed by:	rafael

llvm-svn: 236279
2015-04-30 23:08:53 +00:00
Adhemerval Zanella
6033c98ab5 Support arm32 R_ARM_V4BX relocation format
ARM32 ELF R_ARM_V4BX relocation format is a special relocation type
that records the location of an ARMv4t BX instruction to enable a
static linker to generate ARMv4 compatible instructions.  This
relocation does not contain a reference symbol.

This patch enabled its creation by removing the requeriment of a
relocation symbol target in ELFState<ELFT>::writeSectionContent.

llvm-svn: 235513
2015-04-22 15:26:43 +00:00
David Blaikie
3ea2df7c7b [opaque pointer type] Add textual IR support for explicit type parameter to gep operator
Similar to gep (r230786) and load (r230794) changes.

Similar migration script can be used to update test cases, which
successfully migrated all of LLVM and Polly, but about 4 test cases
needed manually changes in Clang.

(this script will read the contents of stdin and massage it into stdout
- wrap it in the 'apply.sh' script shown in previous commits + xargs to
apply it over a large set of test cases)

import fileinput
import sys
import re

rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL)

def conv(match):
  line = match.group(1)
  line += match.group(4)
  line += ", "
  line += match.group(2)
  return line

line = sys.stdin.read()
off = 0
for match in re.finditer(rep, line):
  sys.stdout.write(line[off:match.start()])
  sys.stdout.write(conv(match))
  off = match.end()
sys.stdout.write(line[off:])

llvm-svn: 232184
2015-03-13 18:20:45 +00:00
NAKAMURA Takumi
76110bc083 Make llvm/test/Object/archive-format.test CRLF-tolerant.
llvm-svn: 231074
2015-03-03 15:54:48 +00:00
Reid Kleckner
0da22610a5 lit: Add 'cd' support to the internal shell and port some tests
The internal shell was already threading around a 'cwd' parameter. We
just have to make it mutable so that we can update it as the test script
executes.

If the shell ever grows support for environment variable substitution,
we could also implement support for export.

llvm-svn: 231017
2015-03-02 21:33:18 +00:00
Justin Bogner
dfad511a53 Object: Test for reading kext bundles
In the review for r230567, it was pointed out we should really test
the lib/Object part of that change. This does so using llvm-readobj.

llvm-svn: 230779
2015-02-27 18:58:23 +00:00
Shankar Easwaran
4fccec0a5e [obj2yaml/yaml2obj] Add SHT_GROUP support.
This adds section group support to the tools obj2yaml and yaml2obj.

llvm-svn: 230124
2015-02-21 04:28:26 +00:00
Simon Atanasyan
3c81b245de [Object] Support reading 64-bit MIPS ELF archives
The 64-bit MIPS ELF archive file format is used by MIPS64 targets.
The main difference from a regular archive file is the symbol table format:
1. ar_name is equal to "/SYM64/"
2. number of symbols and offsets are 64-bit integers

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
Page 96

The patch allows reading of such archive files by llvm-nm, llvm-objdump
and other tools. But it does not support archive files with number of symbols
and/or offsets exceed 2^32. I think it is a rather rare case requires more
significant modification of `Archive` class code.

http://reviews.llvm.org/D7546

llvm-svn: 229520
2015-02-17 18:54:22 +00:00
Simon Atanasyan
245e4f120f [ELFYAML] Provide default value 0 for YAML relocation addendum field
Follow up to r227318.

llvm-svn: 227422
2015-01-29 06:56:24 +00:00
Simon Atanasyan
5615f79e74 [ELFYAML] Provide explicit value for relocation addendums in the test
The `Addend` is an optional field of the `Relocation` YAML record. But
we do not provide its default value while reading it from a YAML file
and so it might keep uninitialized.

I am going to fix the code by a separate commit. We might either make
this field mandatory (at least for .rela sections) or specify 0 as
a default value explicitly.

llvm-svn: 227318
2015-01-28 16:22:50 +00:00
Simon Atanasyan
235e010662 [ELFYAML] Support mips64 relocation record format in yaml2obj/obj2yaml
MIPS64 ELF file has a very specific relocation record format. Each
record might specify up to three relocation operations. So the `r_info`
field in fact consists of three relocation type sub-fields and optional
code of "special" symbols.

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
page 40

The patch implements support of the MIPS64 relocation record format in
yaml2obj/obj2yaml tools by introducing new optional Relocation fields:
Type2, Type3, and SpecSym. These fields are recognized only if the
object/YAML file relates to the MIPS64 target.

Differential Revision: http://reviews.llvm.org/D7136

llvm-svn: 227044
2015-01-25 13:29:25 +00:00
Michael J. Spencer
e8e8139d22 [Object][ELF] Test unknown type.
llvm-svn: 226943
2015-01-23 21:58:09 +00:00
Filipe Cabecinhas
f9b20bcc5c Fix edge case when Start overflowed in 32 bit mode
llvm-svn: 226229
2015-01-15 23:50:44 +00:00
Filipe Cabecinhas
f8083bfc50 Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files.
Summary:
Shift an older “invalid file” test to get a consistent naming for these tests.

Bugs found by afl-fuzz

Reviewers: rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6945

llvm-svn: 226219
2015-01-15 22:52:38 +00:00
Filipe Cabecinhas
5c29b60bc5 Don't loop endlessly for MachO files with 0 ncmds
llvm-svn: 225271
2015-01-06 17:08:26 +00:00
Juergen Ributzka
87fbd21d74 [Object] Don't crash on empty export lists.
Summary: This fixes the exports iterator if the export list is empty.

Reviewers: Bigcheese, kledzik

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6732

llvm-svn: 224563
2014-12-19 02:31:01 +00:00
Rafael Espindola
f367e92d33 Start adding thin archive support.
This is just sufficient for 'ar t' to work.

llvm-svn: 224307
2014-12-16 01:43:41 +00:00
Jean-Daniel Dupas
22cb66e79b Add missing test file
llvm-svn: 223346
2014-12-04 09:20:13 +00:00
Jean-Daniel Dupas
d567300387 Add mach-o LC_RPATH support to llvm-objdump
Summary: Add rpath load command support in Mach-O object and update llvm-objdump to use it.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6512

llvm-svn: 223343
2014-12-04 07:37:02 +00:00
Will Newton
a200eb1b54 Widen ELFYAML relocation type to 32 bits
The current 8 bits is sufficient for ELF32 targets but ELF64 requires
32 bits. Add a test for AArch64 that exposes the issue.

llvm-svn: 222898
2014-11-27 17:20:48 +00:00
Simon Atanasyan
b1231365ea [Object][Mips] Return address of MIPS symbol with cleared microMIPS indicator bit
llvm-svn: 222726
2014-11-25 05:57:55 +00:00
Nick Kledzik
532bd97101 Object, support both mach-o archive t.o.c file names
For historical reasons archives on mach-o have two possible names for the 
file containing the table of contents for the archive: "__.SYMDEF SORTED" 
and "__.SYMDEF".  But the libObject archive reader only supported the former.

This patch fixes llvm::object::Archive to support both names.

llvm-svn: 221747
2014-11-12 01:37:45 +00:00
Chad Rosier
122e5cb27a [yaml2obj] Support AArch64 relocations.
Patch by Daniel Stewart <stewartd@codeaurora.org>!
Phabricator Revision: http://reviews.llvm.org/D6192

llvm-svn: 221639
2014-11-10 23:02:03 +00:00
Simon Atanasyan
97d50a73d5 [ELF][yaml2obj] Handle additional MIPS specific st_other field flags
The ELF symbol `st_other` field might contain additional flags besides
visibility ones. This patch implements support for some MIPS specific
flags.

llvm-svn: 221491
2014-11-06 22:46:24 +00:00
Kevin Enderby
3ef3846d13 Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler and
add the code and test cases for 32-bit ARM symbolizer.

Also fixed the printing of data in code as it was not using the table correctly
and needed to fix one of the test cases too.

This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak
for that is made. Which I’ll be committing immediately after this commit.

llvm-svn: 221470
2014-11-06 19:00:13 +00:00
David Majnemer
6037d6c977 Object, COFF: Infer symbol sizes from adjacent symbols
Use the position of the subsequent symbol in the object file to infer
the size of it's predecessor.  I hope to eventually remove whatever COFF
specific details from this little algorithm so that we can unify this
logic with what Mach-O does.

llvm-svn: 221444
2014-11-06 08:10:41 +00:00
NAKAMURA Takumi
0187705397 Remove "REQUIRES:shell" from tests. They work for me.
llvm-svn: 221269
2014-11-04 13:41:33 +00:00
Simon Atanasyan
16ce8af466 [yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
llvm-svn: 221268
2014-11-04 13:33:36 +00:00
NAKAMURA Takumi
74fdfce630 Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.

llvm-svn: 221265
2014-11-04 13:19:29 +00:00
Rafael Espindola
2def7a3218 Add CRLF support to LineIterator.
The MRI scripts have to work with CRLF, and in general it is probably
a good idea to support this in a core utility like LineIterator.

llvm-svn: 221153
2014-11-03 14:09:47 +00:00
David Majnemer
709c1327d3 Object, COFF: Cleanup symbol type code, improve binutils compatibility
Do a better job classifying symbols.  This increases the consistency
between the COFF handling code and the ELF side of things.

llvm-svn: 220952
2014-10-31 05:07:00 +00:00
Jan Wen Voung
3652526aa9 Fix getRelocationValueString to return the symbol name for EM_386.
Summary: This helps llvm-objdump -r to print out the symbol name along
with the relocation type on x86. Adjust existing tests from checking
for "Unknown" to check for the symbol now.

Test Plan: Adjusted test/Object tests.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5987

llvm-svn: 220866
2014-10-29 18:37:13 +00:00
Rafael Espindola
c82df04466 Handle spaces and quotes in file names in MRI scripts.
llvm-svn: 220364
2014-10-22 03:10:56 +00:00
Rafael Espindola
2cfc7cef2c MRI scripts: Add addlib support.
llvm-svn: 220346
2014-10-21 23:18:51 +00:00
Rafael Espindola
c61ba0d3ae Overwrite instead of adding to archives when creating them in mri scripts.
This matches the behavior of GNU ar and also makes it easier to implemnt
support for the addlib command.

llvm-svn: 220336
2014-10-21 21:56:47 +00:00
Rafael Espindola
134fc95edc Add support for addmod to mri scripts.
llvm-svn: 220294
2014-10-21 14:46:17 +00:00
NAKAMURA Takumi
9c04caba50 Suppress llvm-ar's MRI tests for now on win32, since line_iterator is incompatible to CRLF.
llvm-svn: 219579
2014-10-11 22:21:27 +00:00
Rafael Espindola
b1d09a178a llvm-ar: Start adding support for mri scripts.
I was quiet surprised to find this feature being used. Fortunately the uses
I found look fairly simple. In fact, they are just a very verbose version
of the regular ar commands.

Start implementing it then by parsing the script and setting the command
variables as if we had a regular command line.

This patch adds just enough support to create an empty archive and do a bit
of error checking. In followup patches I will implement at least addmod
and addlib.

From the description in the manual, even the more general case should not
be too hard to implement if needed. The features that don't map 1:1 to
the simple command line are

* Reading from multiple archives.
* Creating multiple archives.

llvm-svn: 219521
2014-10-10 18:33:51 +00:00
David Majnemer
d5db1139b9 Add tests for r219479.
llvm-svn: 219480
2014-10-10 06:59:05 +00:00
David Majnemer
8a4a9524aa obj2yaml, COFF: Handle long section names
Long section names are represented as a slash followed by a numeric
ASCII string.  This number is an offset into a string table.

Print the appropriate entry in the string table instead of the less
enlightening /4.

N.B.  yaml2obj already does the right thing, this test exercises both
sides of the (de-)serialization.

llvm-svn: 219458
2014-10-10 00:17:57 +00:00
Rafael Espindola
b588ed4621 Correctly compute the size of common symbols in COFF.
llvm-svn: 219324
2014-10-08 17:37:19 +00:00
Rafael Espindola
aedb229c48 Print symbol sizes in this test in preparation for fixing COFF common sizes.
llvm-svn: 219320
2014-10-08 17:19:42 +00:00
Sean Silva
537b499a27 Nuke MCAnalysis.
The code is buggy and barely tested. It is also mostly boilerplate.
(This includes MCObjectDisassembler, which is the interface to that
functionality)

Following an IRC discussion with Jim Grosbach, it seems sensible to just
nuke the whole lot of functionality, and dig it up from VCS if
necessary (I hope not!).

All of this stuff appears to have been added in a huge patch dump (look
at the timeframe surrounding e.g. r182628) where almost every patch
seemed to be untested and not reviewed before being committed.
Post-review responses to the patches were never addressed. I don't think
any of it would have passed pre-commit review.

I doubt anyone is depending on this, since this code appears to be
extremely buggy. In limited testing that Michael Spencer and I did, we
couldn't find a single real-world object file that wouldn't crash the
CFG reconstruction stuff. The symbolizer stuff has O(n^2) behavior and
so is not much use to anyone anyway. It seemed simpler to remove them as
a whole. Most of this code is boilerplate, which is the only way it was
able to scrape by 60% coverage.

HEADSUP: Modules folks, some files I nuked were referenced from
include/llvm/module.modulemap; I just deleted the references. Hopefully
that is the right fix (one was a FIXME though!).

llvm-svn: 216983
2014-09-02 22:32:20 +00:00
Rafael Espindola
cb64eee66e llvm-objdump: don't print relocations in non-relocatable files.
This matches the behavior of GNU objdump.

llvm-svn: 215844
2014-08-17 19:09:37 +00:00
Rafael Espindola
c4b48a6a79 Fix an off-by-one bug in the target independent llvm-objdump.
It would prevent the display of a single byte instruction before a label.

Patch by Steve King!

llvm-svn: 215837
2014-08-17 16:31:39 +00:00
Rafael Espindola
106e492216 pr20589: Fix duplicated arch flag.
llvm-svn: 215216
2014-08-08 16:18:29 +00:00
Rafael Espindola
9f2d511fe1 Use "weak alias" instead of "alias weak"
Before this patch we had

@a = weak global ...
but
@b = alias weak ...

The patch changes aliases to look more like global variables.

Looking at some really old code suggests that the reason was that the old
bison based parser had a reduction for alias linkages and another one for
global variable linkages. Putting the alias first avoided the reduce/reduce
conflict.

The days of the old .ll parser are long gone. The new one parses just "linkage"
and a later check is responsible for deciding if a linkage is valid in a
given context.

llvm-svn: 214355
2014-07-30 22:51:54 +00:00
Kevin Enderby
49df9214f3 Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
to just print the symbol name.  So it matches darwin’s nm(1) -u option.

llvm-svn: 214143
2014-07-28 23:17:38 +00:00
Kevin Enderby
bdc7f89d26 Add an implementation for llvm-nm’s -print-file-name option (aka -o and -A).
The -print-file-name option in llvm-nm is to precede each symbol
with the object file it came from.  While code for the parsing of this
option and its aliases existed there was no code to implement it.

llvm-svn: 213906
2014-07-24 23:31:52 +00:00
Kevin Enderby
abaf0d20c2 Add printing of Mach-O stabs in llvm-nm.
llvm-svn: 213327
2014-07-17 22:47:16 +00:00
Kevin Enderby
d2a97a67de Add the "-x" flag to llvm-nm for Mach-O files that prints the fields of a symbol in hex.
(generally use for debugging the tools).  This is same functionality as darwin’s
nm(1) "-x" flag.

llvm-svn: 213176
2014-07-16 17:38:26 +00:00
Simon Atanasyan
a3c42e92aa [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,
obj2yaml and yaml2obj tools.

llvm-svn: 212908
2014-07-13 15:28:54 +00:00
Simon Atanasyan
149290dd5a [ELFYAML] Group ELF section type flags to target specific blocks.
Recognize only flags which correspond to the current target.

llvm-svn: 212880
2014-07-12 18:25:08 +00:00
Kevin Enderby
d0f1eb3018 Add the "-s" flag to llvm-nm for Mach-O files that prints symbols only in
the specified section.  This is same functionality as darwin’s nm(1) "-s" flag.

There is one FIXME in the code and I’m all ears to anyone that can help me
with that.  This option takes exactly two strings and should be allowed
anywhere on the command line.  Such that "llvm-nm -s __TEXT __text foo.o"
would work. But that does not as the CommandLine Library does not have a
way to make this work as far as I can tell.  For now the "-s __TEXT __text"
has to be last on the command line.

llvm-svn: 212842
2014-07-11 20:30:00 +00:00
Kevin Enderby
2f67f62475 Changed the lvm-nm alias "-s" for -print-armap to "-M".
This will allow the "-s" flag to implemented in the future as it
is in darwin’s nm(1) to list symbols only in the specified section.

Given a LGTM by Shankar Easwaran who originally implemented
the support for lvm-nm’s -print-armap and archive map symbols.

llvm-svn: 212576
2014-07-08 23:47:31 +00:00
Kevin Enderby
53a92d5006 Add support for BSD format Archive map symbols (aka the table of contents
from a __.SYMDEF or "__.SYMDEF SORTED" archive member).

llvm-svn: 212568
2014-07-08 22:10:02 +00:00
Rafael Espindola
8a0614291f Ignore llvm.* globals.
It is not clear if llvm.global_ctors should or should not be in llvm.metadata,
but in practice it is not and we need to ignore it for LTO.

llvm-svn: 212351
2014-07-04 19:08:22 +00:00
Rafael Espindola
37a35454ed Mark intrinsic functions as llvm-specific.
llvm-svn: 212347
2014-07-04 15:58:00 +00:00
Rafael Espindola
974bbb1bbd Don't include llvm.metadata variables in archive symbol tables.
llvm-svn: 212344
2014-07-04 15:03:17 +00:00
Kevin Enderby
6bf8a27d78 Add the -just-symbol-name (aka -j) flag to llvm-nm to just print the
symbol’s name.  On darwin the -j flag is used (often in combinations
with other flags) to produce a complete list of symbol names which
than can then be reorder and used with ld(1)’s -order_file.

llvm-svn: 212294
2014-07-03 21:51:07 +00:00
Rafael Espindola
a922bf70d2 Move test since it now depends on the x86 backend.
llvm-svn: 212289
2014-07-03 20:26:21 +00:00
Rafael Espindola
1972f7d7c5 Add support for inline asm symbols in llvm-ar.
This should allow llvm-ar to be used instead of gnu ar + plugin in a LTO
build. I will add a release note about it once I finish a LTO bootstrap with it.

llvm-svn: 212287
2014-07-03 19:40:08 +00:00
Rafael Espindola
832799f1df Add support for inline asm symbols to IRObjectFile.
This also enables it in llvm-nm so that it can be tested.

llvm-svn: 212282
2014-07-03 18:59:23 +00:00
Kevin Enderby
bfc5dbf0b6 Add the -U flag to llvm-nm as an alias to -defined-only
as darwin’s nm(1) uses -U for this functionality.

llvm-svn: 212280
2014-07-03 18:18:50 +00:00
Kevin Enderby
6e20245be0 Add the -reverse-sort flag (aka -r) to llvm-nm
which exists in other Unix nm(1)’s.

llvm-svn: 212235
2014-07-02 23:23:58 +00:00
Kevin Enderby
a6fe7b39f8 Add the -arch flag support to llvm-size like what was done to llvm-nm
to select the slice out of a Mach-O universal file.  This also includes
support for -arch all, selecting the host architecture by default from
a universal file and checking if -arch is used with a standard Mach-O
it matches that architecture.

llvm-svn: 212108
2014-07-01 17:19:10 +00:00
Ed Maste
b7cd23eccc objdump: Add test for ELF file with no section table
This is a test for the fix in r211904.

Differential Revision: http://reviews.llvm.org/D4349

llvm-svn: 212059
2014-06-30 20:03:02 +00:00
Kevin Enderby
37ca7e910b Add the -arch flag support to llvm-nm to select the slice out of a Mach-O
universal file.  This also includes support for -arch all, selecting the host
architecture by default from a universal file and checking if -arch is used
with a standard Mach-O it matches that architecture.

llvm-svn: 212054
2014-06-30 18:45:23 +00:00
Simon Atanasyan
fb5fe85156 [ELF][Mips] Fix recognition of MIPS 64-bit arch in the ELFObjectFile:getArch() method.
llvm-svn: 211891
2014-06-27 11:36:45 +00:00
NAKAMURA Takumi
95103fb9e7 nm-trivial-object.test requires shell since Lit internal runner isn't capable of chdir.
llvm-svn: 211537
2014-06-23 21:07:04 +00:00
Kevin Enderby
95dc79eeda Change the default input for llvm-nm to be a.out instead of standard input
to match llvm-size and other UNIX systems for their nm(1).

Tweak test cases that used llvm-nm with standard input to add a "-" to
indicate that and add a test case to check the default of a.out for llvm-nm.

llvm-svn: 211529
2014-06-23 20:27:53 +00:00
Kevin Enderby
1805a9f0de Fix some double printing of filenames for archives in llvm-nm when
the tool is given multiple files.  Also fix the same issue with Mach-O
universal files. And fix the newline spacing to separate the output
in these cases.

llvm-svn: 211405
2014-06-20 21:29:27 +00:00
Kevin Enderby
667593db29 Added the -m option as an alias for -format=darwin to llvm-nm and llvm-size
which is what the darwin tools use for the Mach-O format output.

llvm-svn: 211326
2014-06-20 00:04:16 +00:00
Kevin Enderby
f525f4ee4a Fix the output of llvm-nm for Mach-O files to use the characters ‘d’ and ‘b’ for
data and bss symbols instead of the generic ’s’ for a symbol in a section.

llvm-svn: 211321
2014-06-19 22:49:21 +00:00
Kevin Enderby
197fe3a33d Change the output of llvm-nm and llvm-size for Mach-O universal files (aka
fat files) to print “ (for architecture XYZ)” for fat files with more than
one architecture to be like what the darwin tools do for fat files.

Also clean up the Mach-O printing of archive membernames in llvm-nm to use
the darwin form of "libx.a(foo.o)".

llvm-svn: 211316
2014-06-19 22:03:18 +00:00
Kevin Enderby
b7caffa461 Teach llvm-size to know about Mach-O universal files (aka fat files) and
fat files containing archives.

Also fix a bug in MachOUniversalBinary::ObjectForArch::ObjectForArch()
where it needed a >= when comparing the Index with the number of
objects in a fat file.  As the index starts at 0.

llvm-svn: 211230
2014-06-18 22:04:40 +00:00
Kevin Enderby
ee2166f84e Add "-format darwin" to llvm-size to be like darwin's size(1) -m output, and
and the -l option for the long format.  Also when the object is a Mach-O
file and the format is berkeley produce output like darwin’s default size(1)
summary berkeley derived output.

Like System V format, there are also some small changes in how and where
the file names and archive member names are printed for darwin and
Mach-O.

Like the changes to llvm-nm these are the first steps in seeing if it is
possible to make llvm-size produce the same output as darwin's size(1).

llvm-svn: 211117
2014-06-17 17:54:13 +00:00
Rafael Espindola
93c342bca4 Fix pr17056.
This makes llvm-nm ignore members that are not sufficiently aligned for
lib/Object to handle.

These archives are invalid. GNU AR is able to handle this, but in general
just warns about broken archive members.

We should probably start warning too, but for now just make sure llvm-nm
exits with an 0.

llvm-svn: 211036
2014-06-16 16:41:00 +00:00
Rafael Espindola
cb080681ac Use std::error_code instead of llvm::error_code.
The idea of this patch is to turn llvm/Support/system_error.h into a
transitional header that just brings in the erorr_code api to the llvm
namespace. I will remove it shortly afterwards.

The cases where the general idea needed some tweaking:

* std::errc is a namespace in msvc, so we cannot use "using std::errc". I could
add an #ifdef, but there were not that many uses, so I just added std:: to
them in this patch.

* Template specialization had to be moved to the std namespace in this
patch set already.

* The msvc implementation of default_error_condition doesn't seem to
provide the same transformations as we need. Not too surprising since
the standard doesn't actually say what "equivalent" means. I fixed the
problem by keeping our old mapping and using it at error_code
construction time.

Despite these shortcomings I think this is still a good thing. Some reasons:

* The different implementations of system_error might improve over time.
* It removes 925 lines of code from llvm already.
* It removes 6313 bytes from the text segment of the clang binary when
it is built with gcc and 2816 bytes when building with clang and
libstdc++.

llvm-svn: 210687
2014-06-11 19:05:50 +00:00
Alp Toker
03b6e12fae Reduce verbiage of lit.local.cfg files
We can just split targets_to_build in one place and make it immutable.

llvm-svn: 210496
2014-06-09 22:42:55 +00:00
Simon Atanasyan
e4655bdc7b [yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).
llvm-svn: 210316
2014-06-06 07:41:57 +00:00
Kevin Enderby
f831fe0c12 Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.
This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1).  Darwin's default format is bsd but its
-m output prints the longer Mach-O specific details.  For now I added the
"-format darwin" to do this (whos name may need to change in the future).
As there are other Mach-O specific flags to nm(1) which I'm hoping to add some
how in the future.  But I wanted to see if I could get the correct output for
-m flag using llvm-nm and the libObject interfaces.

I got this working but would love to hear what others think about this approach
to getting object/format specific details printed with llvm-nm.

llvm-svn: 210285
2014-06-05 21:21:57 +00:00
Simon Atanasyan
96f205e49a [yaml2obj] Add new command line option -docnum.
Input YAML file might contain multiple object file definitions.
New option `-docnum` allows to specify an ordinal number (starting from 1)
of definition used for an object file generation.

Patch reviewed by Sean Silva.

llvm-svn: 209967
2014-05-31 04:51:07 +00:00
Simon Atanasyan
9e2e4f182a [elf2yaml][ELF] Move Info field to the RelocationSection structure. This
field represents ELF section header sh_info field and does not have any
sense for regular sections. Its interpretation depends on section type.

llvm-svn: 209801
2014-05-29 11:05:31 +00:00
NAKAMURA Takumi
b27e1f0470 llvm/test/Object/ar-error.test: Don't check the message "No such file or directory".
It didn't match on non-English version of Windows.

llvm-svn: 209570
2014-05-24 08:47:11 +00:00
Simon Atanasyan
f56e5acb21 [YAML] Add an optional argument EnumMask to the yaml::IO::bitSetCase().
Some bit-set fields used in ELF file headers in fact contain two parts.
The first one is a regular bit-field. The second one is an enumeraion.
For example ELF header `e_flags` for MIPS target might contain the
following values:

Bit-set values:

  EF_MIPS_NOREORDER = 0x00000001
  EF_MIPS_PIC       = 0x00000002
  EF_MIPS_CPIC      = 0x00000004
  EF_MIPS_ABI2      = 0x00000020

Enumeration:

  EF_MIPS_ARCH_32   = 0x50000000
  EF_MIPS_ARCH_64   = 0x60000000
  EF_MIPS_ARCH_32R2 = 0x70000000
  EF_MIPS_ARCH_64R2 = 0x80000000

For printing bit-sets we use the `yaml::IO::bitSetCase()`. It does not
support bit-set/enumeration combinations and prints too many flags from
an enumeration part. This patch fixes this problem. New method
`yaml::IO::maskedBitSetCase()` handle "enumeration" part of bitset
defined by provided mask.

Patch reviewed by Nick Kledzik and Sean Silva.

llvm-svn: 209504
2014-05-23 08:07:09 +00:00
Filipe Cabecinhas
15bb1703a1 llvm-ar: Output the file we errored on.
llvm-svn: 209500
2014-05-23 05:52:12 +00:00
Kevin Enderby
9ee20001f3 Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does.  This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

llvm-svn: 209253
2014-05-20 23:04:47 +00:00
Kevin Enderby
35b1659e80 Revert r209235 as it broke two tests:
Failing Tests (2):
	    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
	    LLVM :: ExecutionEngine/MCJIT/stubs.ll

llvm-svn: 209236
2014-05-20 21:10:15 +00:00
Kevin Enderby
96dd7fc245 Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols.  Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

llvm-svn: 209235
2014-05-20 20:32:18 +00:00
Kevin Enderby
329b5c1fea Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format.  This
allows for rough categorizations for Mach-O sections.  And allows the total of
llvm-size’s Berkeley and System V formats to be the same.

llvm-svn: 209158
2014-05-19 20:36:02 +00:00
Simon Atanasyan
808d7bc7a0 [yaml2obj][ELF] Add an optional Size field to the YAML section declaration.
Now the only method to configure ELF section's content and size is to assign
a hexadecimal string to the `Content` field. Unfortunately this way is
completely useless when you need to declare a really large section.

To solve this problem this patch adds one more optional field `Size`
to the `RawContentSection` structure. When yaml2obj generates an ELF file
it uses the following algorithm:
1. If both `Content` and `Size` fields are missed create an empty section.
2. If only `Content` field is missed take section length from the `Size`
   field and fill the section by zero.
3. If only `Size` field is missed create a section using data from
   the `Content` field.
4. If both `Content` and `Size` fields are provided validate that the `Size`
   value is not less than size of `Content` data. Than take section length
   from the `Size`, fill beginning of the section by `Content` and the rest
   by zero.

Examples
--------
* Create a section 0x10000 bytes long filled by zero
  Name: .data
  Type: SHT_PROGBITS
  Flags: [ SHF_ALLOC ]
  Size: 0x10000

* Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE'
  Name: .data
  Type: SHT_PROGBITS
  Flags: [ SHF_ALLOC ]
  Content: CAFEBABE
  Size: 0x10000

The patch reviewed by Michael Spencer.

llvm-svn: 208995
2014-05-16 16:01:00 +00:00
Simon Atanasyan
e9f0f263e7 [obj2yaml][ELF] Print relocation's offset as a hex number. Use a proper
types to hold relocation's offset and addend.

llvm-svn: 208906
2014-05-15 18:04:09 +00:00
Simon Atanasyan
c65a88ecce [obj2yaml][ELF] Do not print empty Link and Info fields for ELF sections.
llvm-svn: 208905
2014-05-15 18:04:02 +00:00
Simon Atanasyan
dc1b209153 [yaml2obj] Add "-o" command line option to specify an output file name.
llvm-svn: 208900
2014-05-15 16:14:02 +00:00
Kevin Enderby
7558c9cb9b Teach llvm-nm to know about fat archives (aka MachOUniversal files
containing archives).  First step as other tools will be updated next.

llvm-svn: 208812
2014-05-14 21:18:50 +00:00
Simon Atanasyan
9b2d085924 [obj2yaml] Support ELF input format in the obj2yaml tool.
The ELF header e_flags field in the MIPS related test cases handled
incorrectly. The obj2yaml prints too many flags. I will fix that in the
next patches.

The patch reviewed by Michael Spencer and Sean Silva.

llvm-svn: 208752
2014-05-14 05:07:47 +00:00
Kevin Enderby
e6f49d1bca Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.
The implementation might be better to have a method is64Bit() in the class
SymbolicFile instead of having the static routine isSymbolList64Bit() in
llvm-nm.cpp .  But this is very much in the sprit of isObject() and
getNMTypeChar() in llvm-nm.cpp that has a series of if else statements
based on the specific class of the SymbolicFile.  I can update this if
folks would like.

Also the tests were updated to be explicit about checking the address for
64-bits or 32-bits from object files.

llvm-svn: 208463
2014-05-09 23:57:49 +00:00