This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD] Another Output_reloc function
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Wed, 29 Aug 2012 18:55:40 -0700
- Subject: Re: [GOLD] Another Output_reloc function
- References: <20120830013508.GC3159@bubble.grove.modra.org>
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