[PATCH][GOLD] Build Cortex-A8 stubs.

Ian Lance Taylor iant@google.com
Wed Jan 13 21:20:00 GMT 2010


"Doug Kwan (關振德)" <dougkwan@google.com> writes:

> 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.


> +template<bool big_endian>
> +void
> +Arm_relobj<big_endian>::scan_section_for_cortex_a8_erratum(
> +    const elfcpp::Shdr<32, big_endian>& shdr,
> +    unsigned int shndx,
> +    Output_section* os,
> +    Target_arm<big_endian>* arm_target)
> +{
> +  Arm_address output_address = os->output_address(this, shndx, 0);
> +
> +  // Get the section contents.  This does not work for the case in
> +  // which we modify the contents of an input section.  We need
> +  // to pass the output view under such circumstances.
> +  section_size_type input_view_size = 0;
> +  const unsigned char* input_view =
> +    this->section_contents(shndx, &input_view_size, false);

The comment is correct, so unless you have an upcoming patch to fix
this, I think you should add something like
  gold_assert (!os->requires_postprocessing());


> +      gold_warning(_("Cortex-A8 erratum scanning failed because there "
> +		     "is no mapping symbols for section %u of %s."),
> +		   shndx, this->name().c_str());

No period at the end of an error or warning.  Also errors and warnings
don't start with capital letters, but it's OK if the name is normally
capitalized.


This is OK with those changes.

Thanks.

Ian



More information about the Binutils mailing list