projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use macros for TUI window names
[deliverable/binutils-gdb.git]
/
gold
/
output.cc
diff --git
a/gold/output.cc
b/gold/output.cc
index ed70c44867742b6bb861c7382b331220f19cf77e..75d2fc354a55fbec400ba6a654901cb6b9df7cf5 100644
(file)
--- a/
gold/output.cc
+++ b/
gold/output.cc
@@
-1,6
+1,6
@@
// output.cc -- manage the output file for gold
// output.cc -- manage the output file for gold
-// Copyright (C) 2006-20
17
Free Software Foundation, Inc.
+// Copyright (C) 2006-20
20
Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@
-2395,7
+2395,8
@@
Output_section::Output_section(const char* name, elfcpp::Elf_Word type,
lookup_maps_(new Output_section_lookup_maps),
free_list_(),
free_space_fill_(NULL),
lookup_maps_(new Output_section_lookup_maps),
free_list_(),
free_space_fill_(NULL),
- patch_space_(0)
+ patch_space_(0),
+ reloc_section_(NULL)
{
// An unallocated section has no address. Forcing this means that
// we don't need special treatment for symbols defined in debug
{
// An unallocated section has no address. Forcing this means that
// we don't need special treatment for symbols defined in debug
@@
-2447,7
+2448,13
@@
Output_section::add_input_section(Layout* layout,
unsigned int reloc_shndx,
bool have_sections_script)
{
unsigned int reloc_shndx,
bool have_sections_script)
{
+ section_size_type input_section_size = shdr.get_sh_size();
+ section_size_type uncompressed_size;
elfcpp::Elf_Xword addralign = shdr.get_sh_addralign();
elfcpp::Elf_Xword addralign = shdr.get_sh_addralign();
+ if (object->section_is_compressed(shndx, &uncompressed_size,
+ &addralign))
+ input_section_size = uncompressed_size;
+
if ((addralign & (addralign - 1)) != 0)
{
object->error(_("invalid alignment %lu for section \"%s\""),
if ((addralign & (addralign - 1)) != 0)
{
object->error(_("invalid alignment %lu for section \"%s\""),
@@
-2497,11
+2504,6
@@
Output_section::add_input_section(Layout* layout,
}
}
}
}
- section_size_type input_section_size = shdr.get_sh_size();
- section_size_type uncompressed_size;
- if (object->section_is_compressed(shndx, &uncompressed_size))
- input_section_size = uncompressed_size;
-
off_t offset_in_section;
if (this->has_fixed_layout())
off_t offset_in_section;
if (this->has_fixed_layout())
@@
-3545,8
+3547,10
@@
Output_section::Input_section_sort_section_prefix_special_ordering_compare
const Output_section::Input_section_sort_entry& s2) const
{
// Some input section names have special ordering requirements.
const Output_section::Input_section_sort_entry& s2) const
{
// Some input section names have special ordering requirements.
- int o1 = Layout::special_ordering_of_input_section(s1.section_name().c_str());
- int o2 = Layout::special_ordering_of_input_section(s2.section_name().c_str());
+ const char *s1_section_name = s1.section_name().c_str();
+ const char *s2_section_name = s2.section_name().c_str();
+ int o1 = Layout::special_ordering_of_input_section(s1_section_name);
+ int o2 = Layout::special_ordering_of_input_section(s2_section_name);
if (o1 != o2)
{
if (o1 < 0)
if (o1 != o2)
{
if (o1 < 0)
@@
-3556,6
+3560,8
@@
Output_section::Input_section_sort_section_prefix_special_ordering_compare
else
return o1 < o2;
}
else
return o1 < o2;
}
+ else if (is_prefix_of(".text.sorted", s1_section_name))
+ return strcmp(s1_section_name, s2_section_name) <= 0;
// Keep input order otherwise.
return s1.index() < s2.index();
// Keep input order otherwise.
return s1.index() < s2.index();
This page took
0.123545 seconds
and
4
git commands to generate.