cmELF: Open file explicitly in binary mode

ELF is a binary format.
This commit is contained in:
Brad King
2021-06-24 10:55:58 -04:00
parent 70cdb36d25
commit e21188df8b

View File

@@ -683,7 +683,7 @@ const long cmELF::TagMipsRldMapRel = 0;
cmELF::cmELF(const char* fname)
{
// Try to open the file.
auto fin = cm::make_unique<cmsys::ifstream>(fname);
auto fin = cm::make_unique<cmsys::ifstream>(fname, std::ios::binary);
// Quit now if the file could not be opened.
if (!fin || !*fin) {