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]

[gold patch] Fix PR gold/12220 where linker script causes internal error with compressed debug sections


PR 12220 is about an internal error in gold when compressed debug
sections are used with a linker script. There were two problems here:
the presence of a SECTIONS clause in the script prevented the linker
from remapping the .zdebug section names properly, and also caused the
linker to calculate the output section size based on the compressed
sizes of the input sections instead of the uncompressed size. This
patch should fix both problems.

Tested on x86_64. OK?

-cary

        PR gold/12220
        * layout.cc (Layout::choose_output_section): Call output_section_name
        even when using a script with a SECTIONS clause.
        (Layout::output_section_name): Don't use standard mappings if a
        SECTIONS clause has been seen.
        * layout.h (Layout::output_section_name): Add parameter.
        * output.cc (Output_section::add_input_section): Use uncompressed
        section size when tracking input sections.

Attachment: gold-script-zdebug-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]