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] Build Cortex-A8 stubs.


Hi,

    This patch adds code to build Cortex-A8 stubs but we do not use
them yet.  We build them by scanning text sections with THUMB code for
32-bit THUMB branches that straddle across two pages, follow
non-branch 32-bit THUMB instructions and branch back to the same pages
as the starts of these branches.  Since the branches triggering the
Cortex-A8 erratum are sensitive to section layout,  we blow away all
Cortex-A8 stubs at the beginning of a relaxation pass.  The code to
apply these stubs will come in a later patch.

-Doug

2010-01-13  Doug Kwan  <dougkwan@google.com>

        * arm.cc (Arm_relobj::section_needs_reloc_stub_scanning,
        Arm_relobj::section_needs_cortex_a8_stub_scanning,
        Arm_relobj::scan_section_for_cortex_a8_erratum,
        Arm_relobj::scan_span_for_cortex_a8_erratum): New methods.
        (Arm_relobj::scan_sections_for_stubs): Move code deciding what
        sections to scan for relocation stubs into a new method
        Arm_relobj::section_needs_reloc_stub_scanning.  Handle both
        relocation and Cortex-A8 stub scanning.
        (Target_arm::do_relax): Force stubs to be after stubbed sections
        if fixing the Cortex-A8 erratum.  Remove all Cortex-A8 stubs at
        the beginning of a new relaxation pass.  Update a comment.
        (Target_arm::scan_span_for_cortex_a8_erratum): New method definition.

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]