Commit Graph

12 Commits

Author SHA1 Message Date
Meador Inge fc2fb711e8 PR13013: ELF Type identification fails for MSB type ELF files.
Fix 'sys::IdentifyFileType' to work with big and little endian byte orderings
when reading the ELF object file type.

Initial patch by Stefan Hepp.

llvm-svn: 159138
2012-06-25 14:48:43 +00:00
Michael J. Spencer 4f8a832c19 Support/FileSystem: Add file_magic and move a vew clients over to it.
llvm-svn: 146523
2011-12-13 23:17:12 +00:00
Michael J. Spencer 7dfbeda68e Cleanup whitespace.
llvm-svn: 146521
2011-12-13 23:16:15 +00:00
Eli Friedman 39df70c33a Remove a couple unused methods. PR11201.
llvm-svn: 143452
2011-11-01 05:11:01 +00:00
Benjamin Kramer 557a81e9d7 ObjectFile: Add support for mach-o-style dSYM companion files.
llvm-svn: 139676
2011-09-14 00:39:22 +00:00
Eric Christopher 3509d2dc95 Add support for 64-bit object files to Path.
llvm-svn: 129975
2011-04-22 03:50:19 +00:00
Eric Christopher ee066fc4f3 Assorted bugfixes in object file handling:
- Adds support for sniffing PE/COFF files on win32 (.exe and .dll)
   which are COFF files that have an MS-DOS compatibility stub on
   the front of them.

 - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF
   extension for long symbol names, wherein it was attempting to parse
   the leading '/' in an extended symbol name reference as part of the
   integer offset.

 - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section
   and symbol iterators were being returned with uninitialized bytes;
   the type DataRefImpl is a union between 2 32-bit words (d.a and d.b)
   and a single intptr_t word (p). Only p was being initialized, so in
   32-bit builds the result would be iterators with random upper 32-bit
   words in their DataRefImpls. This caused random failures when
   seeking around in object files.

Patch by Graydon Hoare!

llvm-svn: 128799
2011-04-03 22:53:19 +00:00
Michael J. Spencer 94b2ab3556 Support/PathV2: Add identify_magic.
llvm-svn: 123548
2011-01-15 20:39:36 +00:00
Michael J. Spencer 58df2e00b2 Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
llvm-svn: 123151
2011-01-10 02:34:23 +00:00
Michael J. Spencer c581fe7e81 Support/Path: Deprecate Path::hasMagicNumber and replace all uses with fs::has_magic.
llvm-svn: 122589
2010-12-28 01:49:21 +00:00
Dan Gohman e41b1463f9 Delete Path::appendSuffix's return value; it wasn't used anywhere, which
is fine since isn't really necessary to check isValid there anyway.

llvm-svn: 120538
2010-12-01 02:46:41 +00:00
Michael J. Spencer 447762da85 Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00