// ehframe.h -- handle exception frame sections for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
// FDE in EH_FRAME_HDR. Return the new offset.
template<int size, bool big_endian>
section_offset_type
- write(unsigned char* oview, section_offset_type offset,
- uint64_t address, unsigned int addralign,
+ write(unsigned char* oview, section_offset_type output_section_offset,
+ section_offset_type offset, uint64_t address, unsigned int addralign,
section_offset_type cie_offset, unsigned char fde_encoding,
Eh_frame_hdr* eh_frame_hdr);
std::string contents_;
};
-// FDEs stashed for later processing.
+// A FDE plus some info from a CIE to allow later writing of the FDE.
-struct Post_fde;
-typedef std::vector<Post_fde*> Post_fdes;
+struct Post_fde
+{
+ Post_fde(Fde* f, section_offset_type cie_off, unsigned char encoding)
+ : fde(f), cie_offset(cie_off), fde_encoding(encoding)
+ { }
+
+ Fde* fde;
+ section_offset_type cie_offset;
+ unsigned char fde_encoding;
+};
+
+typedef std::vector<Post_fde> Post_fdes;
// This class holds a CIE.
// writing. Return the new offset.
template<int size, bool big_endian>
section_offset_type
- write(unsigned char* oview, section_offset_type offset, uint64_t address,
+ write(unsigned char* oview, section_offset_type output_section_offset,
+ section_offset_type offset, uint64_t address,
unsigned int addralign, Eh_frame_hdr* eh_frame_hdr,
Post_fdes* post_fdes);