This is the mail archive of the binutils@sources.redhat.com 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: relaxation question


On Wed, Aug 11, 2004 at 05:12:15PM +0400, Dmitry Dikiy wrote:
> Thanks Alan,
> 
> > Yes, in that case the assembler can't do relaxation, and you need to
> > implement relaxation in the linker.  bfd_relax_section is called for
> > each input section in turn, not for each relocation, then if any of the
> > calls resulted in "again" being set, the whole process is repeated.
> 
> Will be other symbols (for eample located between polymorph and target
> label) updated automatically or I have to re-fix them?

You need to update both local and global symbols defined in the section
you are relaxing.  You also need to update relocation r_offset values.
Take a look at one of the elf_relax_section functions in various bfd/
files.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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