X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Foutput.h;h=77b6697e06724d34f0371b3530c0c894d2e64fb4;hb=cf00cd6faf31c208bbfe107140c26895412214bb;hp=157cef272d8ec314d1b4e8c06eb41f264f25e989;hpb=2571583aed598dd3f9651b53434e5f177a0e3cf7;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/output.h b/gold/output.h index 157cef272d..77b6697e06 100644 --- a/gold/output.h +++ b/gold/output.h @@ -1,6 +1,6 @@ // output.h -- manage the output file for gold -*- C++ -*- -// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// Copyright (C) 2006-2020 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -4136,6 +4136,16 @@ class Output_section : public Output_data 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* @@ -4623,6 +4633,8 @@ class Output_section : public Output_data 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