This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch gold] Fix link error when building optimized


This patch fixes a link error when building dwp with optimization
turned on. The inline function check_buffer, defined in the
dwarf_reader.cc, is called from an function defined inline in the
class body. I refactored it to keep the error path, which needs
visibility into class Relobj, in dwarf_reader.cc, with the fast path
still inlined.

Tested on x86_64 with optimization turned on. OK to commit?

-cary


gold/
        * dwarf_reader.cc (Dwarf_info_reader::check_buffer): Move
        function into class definition in header file.
        (Dwarf_info_reader::warn_corrupt_debug_section): New function.
        * dwarf_reader.h (Dwarf_info_reader::warn_corrupt_debug_section):
        New function.
        (Dwarf_info_reader::check_buffer): Move here from .cc file.

Attachment: gold-check-buffer-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]