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: relaxing vs section merging


On Mon, Apr 26, 2004 at 10:47:14PM -0400, DJ Delorie wrote:
> 
> > I would guess that the mn10300 symbol reading code needs to look like
> > that in elflink.c:elf_link_input_bfd.  I don't see
> > _bfd_merged_section_offset being called anywhere in elf-m10300.c.
> 
> Yeah, I added calls to _bfd_merged_section_offset (the mn10300
> relocation code calls it indirectly).  That's when all the other
> problems started happening; I think I mentioned that in my original
> email.

Well, you mentioned _bfd_elf_rela_local_sym, but that's not what I
meant.   I'm talking about code in elf-m10300.c that does

	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
	  if (isym->st_shndx == SHN_UNDEF)
	    sym_sec = bfd_und_section_ptr;
	  else if (isym->st_shndx == SHN_ABS)
	    sym_sec = bfd_abs_section_ptr;
	  else if (isym->st_shndx == SHN_COMMON)
	    sym_sec = bfd_com_section_ptr;
	  else
	    sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);

	  symval = (isym->st_value
		    + sym_sec->output_section->vma
		    + sym_sec->output_offset);

then uses symval.


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