summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold/mapfile.cc
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2015-02-24 18:17:57 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2015-02-24 18:17:57 +0800
commitfd6fc0c5f6ec26b3b526655a721b7b0af0b14644 (patch)
tree487c69cb82b68612b53ad40569a54e060973eca2 /binutils-2.25/gold/mapfile.cc
parentaff326d7fffe9111be0900d433c6de6661c48af3 (diff)
downloadtoolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.tar.gz
toolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.tar.bz2
toolchain_binutils-fd6fc0c5f6ec26b3b526655a721b7b0af0b14644.zip
Update binutils-2.25/gold to ToT
commit be66981e1605eff305ac9c561825f4bd6801fca2 Author: H.J. Lu <hjl.tools@gmail.com> Date: Sun Feb 22 05:18:50 2015 -0800 Set GOLD_DEFAULT_SIZE to 32 for x32 * configure.ac (default_size): Set to 32 for x32. * configure: Regenerated. Change-Id: I4b2d8927e4e41cf2fac3c92d00e8aef69b5ce21f
Diffstat (limited to 'binutils-2.25/gold/mapfile.cc')
-rw-r--r--binutils-2.25/gold/mapfile.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/binutils-2.25/gold/mapfile.cc b/binutils-2.25/gold/mapfile.cc
index dc995e9a..f2a9c424 100644
--- a/binutils-2.25/gold/mapfile.cc
+++ b/binutils-2.25/gold/mapfile.cc
@@ -1,6 +1,6 @@
// mapfile.cc -- map file generation for gold
-// Copyright (C) 2008-2014 Free Software Foundation, Inc.
+// Copyright (C) 2008-2015 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -258,8 +258,11 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
}
char sizebuf[50];
+ section_size_type size;
+ if (!relobj->section_is_compressed(shndx, &size))
+ size = relobj->section_size(shndx);
snprintf(sizebuf, sizeof sizebuf, "0x%llx",
- static_cast<unsigned long long>(relobj->section_size(shndx)));
+ static_cast<unsigned long long>(size));
fprintf(this->map_file_, "0x%0*llx %10s %s\n",
parameters->target().get_size() / 4,
@@ -328,11 +331,13 @@ Mapfile::print_output_data(const Output_data* od, const char* name)
char sizebuf[50];
snprintf(sizebuf, sizeof sizebuf, "0x%llx",
- static_cast<unsigned long long>(od->data_size()));
+ static_cast<unsigned long long>(od->current_data_size()));
fprintf(this->map_file_, "0x%0*llx %10s\n",
parameters->target().get_size() / 4,
- static_cast<unsigned long long>(od->address()),
+ (od->is_address_valid()
+ ? static_cast<unsigned long long>(od->address())
+ : 0),
sizebuf);
}
@@ -387,7 +392,7 @@ Mapfile::print_output_section(const Output_section* os)
char sizebuf[50];
snprintf(sizebuf, sizeof sizebuf, "0x%llx",
- static_cast<unsigned long long>(os->data_size()));
+ static_cast<unsigned long long>(os->current_data_size()));
fprintf(this->map_file_, "0x%0*llx %10s",
parameters->target().get_size() / 4,
@@ -398,6 +403,9 @@ Mapfile::print_output_section(const Output_section* os)
parameters->target().get_size() / 4,
static_cast<unsigned long long>(os->load_address()));
+ if (os->requires_postprocessing())
+ fprintf(this->map_file_, " (before compression)");
+
putc('\n', this->map_file_);
}