// output.h -- manage the output file for gold -*- C++ -*-
-// Copyright (C) 2006-2016 Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
DYNAMIC_NUMBER = -1U,
// Section size.
DYNAMIC_SECTION_SIZE = -2U,
- // Symbol adress.
+ // Symbol address.
DYNAMIC_SYMBOL = -3U,
// String.
DYNAMIC_STRING = -4U,
input_sections()
{ return this->input_sections_; }
+ // For -r and --emit-relocs, we need to keep track of the associated
+ // relocation section.
+ Output_section*
+ reloc_section() const
+ { return this->reloc_section_; }
+
+ void
+ set_reloc_section(Output_section* os)
+ { this->reloc_section_ = os; }
+
protected:
// Return the output section--i.e., the object itself.
Output_section*
Output_fill* free_space_fill_;
// Amount added as patch space for incremental linking.
off_t patch_space_;
+ // Associated relocation section, when emitting relocations.
+ Output_section* reloc_section_;
};
// An output segment. PT_LOAD segments are built from collections of
first_section_load_address() const
{
const Output_section* os = this->first_section();
+ gold_assert(os != NULL);
return os->has_load_address() ? os->load_address() : os->address();
}
// Set the section addresses in an Output_data_list.
uint64_t
set_section_list_addresses(Layout*, bool reset, Output_data_list*,
- uint64_t addr, off_t* poff, unsigned int* pshndx,
- bool* in_tls);
+ uint64_t addr, off_t* poff, off_t* fpoff,
+ unsigned int* pshndx, bool* in_tls);
// Return the number of Output_sections in an Output_data_list.
unsigned int