X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gold%2Fehframe.h;h=4fd8f3e2f68885c3fc7325788c0e01d4c53dca5c;hb=e379e5f385f874adb0b414f917adb1fc50e20de9;hp=f501634c2f62afa2679ddb19f962cabec423f834;hpb=be897fb774abfb0a44b3b87fe77bccafa336e638;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/ehframe.h b/gold/ehframe.h index f501634c2f..4fd8f3e2f6 100644 --- a/gold/ehframe.h +++ b/gold/ehframe.h @@ -1,6 +1,6 @@ // ehframe.h -- handle exception frame sections for gold -*- C++ -*- -// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// Copyright (C) 2006-2019 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -203,9 +203,14 @@ class Fde // Return whether this FDE was added after merge mapping. bool - post_map() + post_map() const { return this->object_ == NULL && this->u_.from_linker.post_map; } + // Return whether this FDE was added for the PLT after merge mapping. + bool + post_map(const Output_data* plt) const + { return this->post_map() && this->u_.from_linker.plt == plt; } + // Write the FDE to OVIEW starting at OFFSET. FDE_ENCODING is the // encoding, from the CIE. Round up the bytes to ADDRALIGN if // necessary. ADDRESS is the virtual address of OVIEW. Record the @@ -217,8 +222,6 @@ class Fde section_offset_type cie_offset, unsigned char fde_encoding, Eh_frame_hdr* eh_frame_hdr); - bool operator==(const Fde&) const; - private: // The object in which this FDE was seen. This will be NULL for a // linker generated FDE. @@ -300,9 +303,15 @@ class Cie add_fde(Fde* fde) { this->fdes_.push_back(fde); } - // Remove an FDE associated with this CIE. Only the last FDE may be removed. + // Remove the last FDE associated with this CIE. void - remove_fde(const Fde*); + remove_fde() + { this->fdes_.pop_back(); } + + // Access the last FDE associated with this CIE. + const Fde* + last_fde() const + { return this->fdes_.back(); } // Return the number of FDEs. unsigned int @@ -411,12 +420,10 @@ class Eh_frame : public Output_section_data size_t cie_length, const unsigned char* fde_data, size_t fde_length); - // Remove unwind information for a PLT. Only the last FDE added may - // be removed. + // Remove all post-map unwind information for a PLT. void remove_ehframe_for_plt(Output_data* plt, const unsigned char* cie_data, - size_t cie_length, const unsigned char* fde_data, - size_t fde_length); + size_t cie_length); // Return the number of FDEs. unsigned int