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: Do not emit locals from discard .eh_frame sections.


Hi,

    This patches fixes a bug in which gold attempts to output local
symbols from discarded .eh_frame sections and triggers an assert in
Output_section::output_address because the function cannot find
corresponding input sections for those symbols.  This passed all gold
tests on x86_64-unknown-linux-gnu, including a new test in this patch.

-Doug

2009-06-04  Doug Kwan  <dougkwan@google.com>

        * object.cc (Sized_relobj::Sized_relobj): Initialize
        discarded_eh_frame_shndx_ to -1U.
        (Sized_relobj::do_layout): Record index of a discard .eh_frame
        section.
        (Sized_relobj::do_count_local_symbols): Skip local symbols in
        a discarded .eh_frame section.
        (Sized_relobj::do_finalize_local_symbols): Ditto.
        * object.h (class Sized_relobj): Declare new member
        discarded_eh_frame_shndx_.
        * testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test.
        (local_labels_test_SOURCE, local_labels_test_LDFLAGS): Define new.
        (local_labels_test.o): New rule.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/local_labels_test.cc: New file.

Attachment: 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]