[GOLD] PowerPC64 ELFv2 notoc support
[deliverable/binutils-gdb.git] / gold / ehframe.h
index bb47381d18bf372ed3142e25ee48a536fa18617b..ba6508320682f2f88f0f767a83ade129a965fa5c 100644 (file)
@@ -1,6 +1,6 @@
 // ehframe.h -- handle exception frame sections for gold  -*- C++ -*-
 
-// Copyright (C) 2006-2015 Free Software Foundation, Inc.
+// Copyright (C) 2006-2019 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -217,6 +217,8 @@ 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.
@@ -298,6 +300,10 @@ 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.
+  void
+  remove_fde(const Fde*);
+
   // Return the number of FDEs.
   unsigned int
   fde_count() const
@@ -323,6 +329,11 @@ class Cie
        unsigned int addralign, Eh_frame_hdr* eh_frame_hdr,
        Post_fdes* post_fdes);
 
+  // Return the FDE encoding.
+  unsigned char
+  fde_encoding() const
+  { return this->fde_encoding_; }
+
   friend bool operator<(const Cie&, const Cie&);
   friend bool operator==(const Cie&, const Cie&);
 
@@ -359,6 +370,14 @@ extern bool operator==(const Cie&, const Cie&);
 class Eh_frame : public Output_section_data
 {
  public:
+  enum Eh_frame_section_disposition
+  {
+    EH_EMPTY_SECTION,
+    EH_UNRECOGNIZED_SECTION,
+    EH_OPTIMIZABLE_SECTION,
+    EH_END_MARKER_SECTION
+  };
+
   Eh_frame();
 
   // Record the associated Eh_frame_hdr, if any.
@@ -374,7 +393,7 @@ class Eh_frame : public Output_section_data
   // returns whether the section was incorporated into the .eh_frame
   // data.
   template<int size, bool big_endian>
-  bool
+  Eh_frame_section_disposition
   add_ehframe_input_section(Sized_relobj_file<size, big_endian>* object,
                            const unsigned char* symbols,
                            section_size_type symbols_size,
@@ -392,6 +411,13 @@ 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.
+  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);
+
   // Return the number of FDEs.
   unsigned int
   fde_count() const;
This page took 0.023407 seconds and 4 git commands to generate.