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]

Re: [GOLD] Another Output_reloc function


On Wed, Aug 29, 2012 at 6:35 PM, Alan Modra <amodra@gmail.com> wrote:
>
>         * output.h (Output_reloc::Output_reloc <output section>): Add
>         is_relative param.  Adjust calls.
>         (Output_reloc::add_output_section_relative): New functions.
>         * output.cc (Output_reloc::Output_reloc <output section>): Handle
>         is_relative.
>         (Output_reloc::symbol_value): Handle SECTION_CODE.


> +  if (this->local_sym_index_ == SECTION_CODE)
> +    {
> +      gold_assert(!this->use_plt_offset_);
> +      return this->u1_.os->address() + addend;
> +    }
>    gold_assert(this->local_sym_index_ != SECTION_CODE
>               && this->local_sym_index_ != TARGET_CODE
>                && this->local_sym_index_ != INVALID_CODE

Since you are now handling SECTION_CODE, you can remove !=
SECTION_CODE from the gold_assert there.

OK with that change.

Thanks.

Ian


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