projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable parts of gdb.base/source-dir.exp on remote host
[deliverable/binutils-gdb.git]
/
gold
/
plugin.cc
diff --git
a/gold/plugin.cc
b/gold/plugin.cc
index c921f7ca3d210bbd52d5f54eae7343e631062005..8963c7fa4c8665c503749ab4540c5811cc0e25d0 100644
(file)
--- a/
gold/plugin.cc
+++ b/
gold/plugin.cc
@@
-1,6
+1,6
@@
// plugin.cc -- plugin manager for gold -*- C++ -*-
// plugin.cc -- plugin manager for gold -*- C++ -*-
-// Copyright (C) 2008-20
18
Free Software Foundation, Inc.
+// Copyright (C) 2008-20
20
Free Software Foundation, Inc.
// Written by Cary Coutant <ccoutant@google.com>.
// This file is part of gold.
// Written by Cary Coutant <ccoutant@google.com>.
// This file is part of gold.
@@
-508,8
+508,20
@@
Plugin_recorder::init()
// Create a temporary directory where we can stash the log and
// copies of replacement files.
char dir_template[] = "gold-recording-XXXXXX";
// Create a temporary directory where we can stash the log and
// copies of replacement files.
char dir_template[] = "gold-recording-XXXXXX";
+#ifdef HAVE_MKDTEMP
if (mkdtemp(dir_template) == NULL)
return false;
if (mkdtemp(dir_template) == NULL)
return false;
+#else
+ if (mktemp(dir_template) == NULL)
+ return false;
+#if defined (_WIN32) && !defined (__CYGWIN32__)
+ if (mkdir(dir_template) != 0)
+ return false;
+#else
+ if (mkdir(dir_template, 0700) != 0)
+ return false;
+#endif
+#endif
size_t len = strlen(dir_template) + 1;
char* tempdir = new char[len];
size_t len = strlen(dir_template) + 1;
char* tempdir = new char[len];
@@
-562,8
+574,10
@@
link_or_copy_file(const char* inname, const char* outname)
{
static char buf[4096];
{
static char buf[4096];
+#ifdef HAVE_LINK
if (::link(inname, outname) == 0)
return true;
if (::link(inname, outname) == 0)
return true;
+#endif
int in = ::open(inname, O_RDONLY);
if (in < 0)
int in = ::open(inname, O_RDONLY);
if (in < 0)
@@
-1424,7
+1438,8
@@
Sized_pluginobj<size, big_endian>::do_add_symbols(Symbol_table* symtab,
{
case LDPK_DEF:
case LDPK_WEAKDEF:
{
case LDPK_DEF:
case LDPK_WEAKDEF:
- shndx = elfcpp::SHN_ABS;
+ // We use an arbitrary section number for a defined symbol.
+ shndx = 1;
break;
case LDPK_COMMON:
shndx = elfcpp::SHN_COMMON;
break;
case LDPK_COMMON:
shndx = elfcpp::SHN_COMMON;
This page took
0.033881 seconds
and
4
git commands to generate.