2019-01-22 Nidal Faour <nidal.faour@wdc.com>
PR lto/88422
* simple-object.c (O_BINARY): Define if not already defined.
(simple_object_copy_lto_debug_sections): Create file in binary
mode.
From-SVN: r268141
+2019-01-22 Nidal Faour <nidal.faour@wdc.com>
+
+ PR lto/88422
+ * simple-object.c (O_BINARY): Define if not already defined.
+ (simple_object_copy_lto_debug_sections): Create file in binary
+ mode.
+
2019-01-21 Tom Tromey <tom@tromey.com>
* splay-tree.c (splay_tree_remove): Delete the key if necessary.
#define SEEK_SET 0
#endif
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#include "simple-object-common.h"
/* The known object file formats. */
return errmsg;
}
- outfd = creat (dest, 00777);
+ outfd = open (dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 00777);
if (outfd == -1)
{
*err = errno;