diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-11 15:06:38 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-11 15:06:38 +0000 |
commit | 8588055816b6d4b107459de0d5effa213501ea73 (patch) | |
tree | 82ac4fa3b32ebbc68a1b41b809948b3db5f3b871 /gcc/collect2.c | |
parent | 6dd40464ebad4337c6007c858589cff6ec7750e1 (diff) | |
download | gcc-8588055816b6d4b107459de0d5effa213501ea73.tar.gz |
2010-05-11 Kai Tietz <kai.tietz@onevision.com>
* collect2.c (maybe_lto_object_file): Add x64-coff magic and check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159272 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 6582185cf09..5322e10bee2 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -2574,6 +2574,7 @@ maybe_lto_object_file (const char *prog_name) static unsigned char elfmagic[4] = { 0x7f, 'E', 'L', 'F' }; static unsigned char coffmagic[2] = { 0x4c, 0x01 }; + static unsigned char coffmagic_x64[2] = { 0x64, 0x86 }; static unsigned char machomagic[4][4] = { { 0xcf, 0xfa, 0xed, 0xfe }, { 0xce, 0xfa, 0xed, 0xfe }, @@ -2589,7 +2590,8 @@ maybe_lto_object_file (const char *prog_name) fclose (f); if (memcmp (buf, elfmagic, sizeof (elfmagic)) == 0 - || memcmp (buf, coffmagic, sizeof (coffmagic)) == 0) + || memcmp (buf, coffmagic, sizeof (coffmagic)) == 0 + || memcmp (buf, coffmagic_x64, sizeof (coffmagic_x64)) == 0) return true; for (i = 0; i < 4; i++) if (memcmp (buf, machomagic[i], sizeof (machomagic[i])) == 0) |