X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Flayout.cc;h=5f25faea5532b5291d097adbacfb52b0a24abafb;hb=73b9be8b5301c4ac056e10c38a47414867ee892a;hp=bb80531f0a44570edb18305a0fab398ea6219df8;hpb=c4d5a76223f74930add9014f2a77339eb80b737c;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/layout.cc b/gold/layout.cc index bb80531f0a..5f25faea55 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -1,6 +1,6 @@ // layout.cc -- lay out output file sections for gold -// Copyright (C) 2006-2016 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -1581,6 +1581,23 @@ Layout::add_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data, } } +// Remove .eh_frame information for a PLT. FDEs using the CIE must +// be removed in reverse order to the order they were added. + +void +Layout::remove_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data, + size_t cie_length, const unsigned char* fde_data, + size_t fde_length) +{ + if (parameters->incremental()) + { + // FIXME: Maybe this could work some day.... + return; + } + this->eh_frame_data_->remove_ehframe_for_plt(plt, cie_data, cie_length, + fde_data, fde_length); +} + // Scan a .debug_info or .debug_types section, and add summary // information to the .gdb_index section. @@ -3300,6 +3317,11 @@ bool Layout::segment_precedes(const Output_segment* seg1, const Output_segment* seg2) { + // In order to produce a stable ordering if we're called with the same pointer + // return false. + if (seg1 == seg2) + return false; + elfcpp::Elf_Word type1 = seg1->type(); elfcpp::Elf_Word type2 = seg2->type(); @@ -3459,7 +3481,7 @@ is_text_segment(const Target* target, const Output_segment* seg) } // Set the file offsets of all the segments, and all the sections they -// contain. They have all been created. LOAD_SEG must be be laid out +// contain. They have all been created. LOAD_SEG must be laid out // first. Return the offset of the data to follow. off_t