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: Your bfd & ld patch breaks --as-needed on SPARC (and someother targets)


Alan Modra <amodra@bigpond.net.au> wrote:
> Thanks for looking into this.  I'm curious as to why you need to set
> rawsize, as there might be a generic bug somewhere.  Care to explain?

I don't look at it deeply.  There is a comment before the code in
problem (emultempl/sh64elf.em: 550):

  /* The .cranges section will have this size, no larger or smaller.
     Since relocs (if relocatable linking) will be emitted into the
     "extended" size, we must set the raw size to the total.  We have to
     keep track of the number of new .cranges entries.

     Sorting before writing is done by sh64_elf_final_write_processing.  */

In the erroneous case, the size and the rawsize of .cranges are
the different positive numbers and bfd_malloc_and_get_section
returns the data which is correct only up to rawsize bytes.  So I
thought that we must set the rawsize to the total size there,
though I could be wrong about this.

Regards,
	kaz


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