diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-14 02:40:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-14 02:40:15 +0000 |
commit | 935e887746227322222835cd002ec486f9f31402 (patch) | |
tree | ae527a59653cb6ab116f495c056ad97686ed69f9 /gold/ehframe.h | |
parent | fd247bfe68f03688b12c8583933f5471f1ed0a86 (diff) | |
download | gdb-935e887746227322222835cd002ec486f9f31402.zip gdb-935e887746227322222835cd002ec486f9f31402.tar.gz gdb-935e887746227322222835cd002ec486f9f31402.tar.bz2 |
Align FDE and CIE lengths as needed.
Diffstat (limited to 'gold/ehframe.h')
-rw-r--r-- | gold/ehframe.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gold/ehframe.h b/gold/ehframe.h index 2f45b23..cf3b738 100644 --- a/gold/ehframe.h +++ b/gold/ehframe.h @@ -184,13 +184,14 @@ class Fde } // Write the FDE to OVIEW starting at OFFSET. FDE_ENCODING is the - // encoding, from the CIE. Record the FDE in EH_FRAME_HDR. Return - // the new offset. + // encoding, from the CIE. Round up the bytes to ADDRALIGN if + // necessary. Record the 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, - section_offset_type cie_offset, unsigned char fde_encoding, - Eh_frame_hdr* eh_frame_hdr); + unsigned int addralign, section_offset_type cie_offset, + unsigned char fde_encoding, Eh_frame_hdr* eh_frame_hdr); private: // The object in which this FDE was seen. @@ -253,11 +254,12 @@ class Cie Merge_map*); // Write the CIE to OVIEW starting at OFFSET. EH_FRAME_HDR is the - // exception frame header for FDE recording. Return the new offset. + // exception frame header for FDE recording. Round up the bytes to + // ADDRALIGN. Return the new offset. template<int size, bool big_endian> section_offset_type write(unsigned char* oview, section_offset_type offset, - Eh_frame_hdr* eh_frame_hdr); + unsigned int addralign, Eh_frame_hdr* eh_frame_hdr); friend bool operator<(const Cie&, const Cie&); friend bool operator==(const Cie&, const Cie&); |