summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2015-11-21 02:14:43 (GMT)
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-11-21 02:14:43 (GMT)
commitec97727e655f49b010f4cf8c410631910d22199f (patch)
treeec71678e1dee541a67ee2e4440bf6d562419c768
parentc536bde99270a2aead0dd1255f7bfb8458bdaa93 (diff)
parentadb604a3879cdd7789204206d50ae2782d2538d9 (diff)
downloadtoolchain_binutils-ec97727e655f49b010f4cf8c410631910d22199f.zip
toolchain_binutils-ec97727e655f49b010f4cf8c410631910d22199f.tar.gz
toolchain_binutils-ec97727e655f49b010f4cf8c410631910d22199f.tar.bz2
Merge "Fix darwin build failures (because of compilation warnings)."
-rw-r--r--binutils-2.25/gold/gold.cc11
-rw-r--r--binutils-2.25/gold/layout.cc11
2 files changed, 16 insertions, 6 deletions
diff --git a/binutils-2.25/gold/gold.cc b/binutils-2.25/gold/gold.cc
index eccbc58..b278b3c 100644
--- a/binutils-2.25/gold/gold.cc
+++ b/binutils-2.25/gold/gold.cc
@@ -25,6 +25,9 @@
#include <cstdlib>
#include <cstdio>
#include <cstring>
+// __STDC_FORMAT_MACROS is needed to turn on macros in inttypes.h.
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include <unistd.h>
#include <algorithm>
#include "libiberty.h"
@@ -597,9 +600,11 @@ queue_middle_tasks(const General_options& options,
// perfectly and warn. So, this is fine.
if (segment_size >= target->max_pie_data_segment_size())
{
- gold_info(_("The data segment size (%ld > %ld) is likely unsafe and"
- " PIE has been disabled for this link. See go/unsafe-pie."),
- segment_size, target->max_pie_data_segment_size());
+ gold_info(
+ _("The data segment size (%" PRIu64 " > %" PRIu64 ") is likely unsafe and"
+ " PIE has been disabled for this link. See go/unsafe-pie."),
+ segment_size,
+ target->max_pie_data_segment_size());
const_cast<General_options*>(&parameters->options())->set_pie_value(false);
}
}
diff --git a/binutils-2.25/gold/layout.cc b/binutils-2.25/gold/layout.cc
index 8b3a619..18063a0 100644
--- a/binutils-2.25/gold/layout.cc
+++ b/binutils-2.25/gold/layout.cc
@@ -25,6 +25,9 @@
#include <cerrno>
#include <cstring>
#include <algorithm>
+// __STDC_FORMAT_MACROS is needed to turn on macros in inttypes.h.
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include <iostream>
#include <fstream>
#include <utility>
@@ -2815,9 +2818,11 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
data_seg_size = rw_memsz;
if (data_seg_size >= target->max_pie_data_segment_size())
- gold_warning(_("Unsafe PIE data segment size (%ld > %ld). See "
- "go/unsafe-pie."),
- data_seg_size, target->max_pie_data_segment_size());
+ gold_warning(
+ _("Unsafe PIE data segment size (%" PRIu64 " > %" PRIu64 "). See "
+ "go/unsafe-pie."),
+ data_seg_size,
+ target->max_pie_data_segment_size());
}
// If there is a load segment that contains the file and program headers,