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: [RFA] MIPS_TEXT symbols should be associated to .text section?


Thiemo,

One more thing I forgot about your patch:

>      case SHN_MIPS_DATA:
> -      asym->section = mips_elf_data_section_ptr;
> +      {
> +	asection *section = elf_tdata (abfd)->elf_data_section;
> +
> +	BFD_ASSERT (SGI_COMPAT (abfd));
> +	if (section != NULL)
> +	  asym->section = section;
> +      }
>        break;

I think that addresses for MIPS_DATA symbols follow the same rule
as in MIPS_TEXT: These are absolute addresses, so we need to substract
the section base address as well, to turn them into offsets. I verified
this empirically by inspecting an executable that had some MIPS_DATA
symbols.

-- 
Joel


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