diff options
author | Roland McGrath <roland@gnu.org> | 2012-12-07 21:48:32 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2012-12-07 21:48:32 +0000 |
commit | 418c15ae72a97fd55982eb6441f8671cbff1250d (patch) | |
tree | e22c96e97db89d4efd064b020cd1437c7e0c2874 /gold | |
parent | 2f68a89553836f68b8676beda9287c93e489bc6e (diff) | |
download | gdb-418c15ae72a97fd55982eb6441f8671cbff1250d.zip gdb-418c15ae72a97fd55982eb6441f8671cbff1250d.tar.gz gdb-418c15ae72a97fd55982eb6441f8671cbff1250d.tar.bz2 |
gold/
* testsuite/binary_unittest.cc (Sized_binary_test):
Use open_descriptor rather than ::open.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/testsuite/binary_unittest.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 2e4cbc0..4ccde16 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2012-12-07 Roland McGrath <mcgrathr@google.com> + + * testsuite/binary_unittest.cc (Sized_binary_test): + Use open_descriptor rather than ::open. + 2012-12-07 Alan Modra <amodra@gmail.com> * powerpc.cc (Stub_table::do_write): Delete redundant Address diff --git a/gold/testsuite/binary_unittest.cc b/gold/testsuite/binary_unittest.cc index a9f47c2..6e7b244 100644 --- a/gold/testsuite/binary_unittest.cc +++ b/gold/testsuite/binary_unittest.cc @@ -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); |