]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gold/
authorRoland McGrath <roland@gnu.org>
Fri, 7 Dec 2012 21:49:47 +0000 (21:49 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 7 Dec 2012 21:49:47 +0000 (21:49 +0000)
* testsuite/binary_unittest.cc (Sized_binary_test):
Use open_descriptor rather than ::open.

gold/ChangeLog
gold/testsuite/binary_unittest.cc

index 1018a1f6727a1ed54bc225ab70b6562e69a0a9e6..1e21f577142144d6673ae81b27363682febe51f0 100644 (file)
@@ -7,6 +7,11 @@
        * Makefile.in: Regenerate.
        * testsuite/Makefile.in: Regenerate.
 
+2012-12-07  Roland McGrath  <mcgrathr@google.com>
+
+       * testsuite/binary_unittest.cc (Sized_binary_test):
+       Use open_descriptor rather than ::open.
+
 2012-11-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gold/14858
index a9f47c20fcbeddcbc75d67cbc7821cd3110b0f11..6e7b244121e7871808fe795e6c005f58d62a8254 100644 (file)
@@ -1,6 +1,6 @@
 // binary_unittest.cc -- test Binary_to_elf
 
-// Copyright 2008 Free Software Foundation, Inc.
+// Copyright 2008, 2012 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -33,6 +33,7 @@
 #include "options.h"
 #include "binary.h"
 #include "object.h"
+#include "descriptors.h"
 
 #include "test.h"
 #include "testfile.h"
@@ -53,7 +54,7 @@ Sized_binary_test()
   // Use the executable itself as the binary data.
   struct stat st;
   CHECK(::stat(gold::program_name, &st) == 0);
-  int o = ::open(gold::program_name, O_RDONLY);
+  int o = open_descriptor(-1, gold::program_name, O_RDONLY);
   CHECK(o >= 0);
   unsigned char* filedata = new unsigned char[st.st_size];
   CHECK(::read(o, filedata, st.st_size) == st.st_size);