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]

elfxx-ia64.c question


In bfd/elfxx-ia64.c:elfNN_ia64_relocate_section() the following code
exists:

        case R_IA64_SECREL32MSB:
        case R_IA64_SECREL32LSB:
        case R_IA64_SECREL64MSB:
        case R_IA64_SECREL64LSB:
          /* Make output-section relative.  */
          if (value > input_section->output_section->vma)
            value -= input_section->output_section->vma;
          else
            value = 0;
          r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
          break;

Does anyone know _why_ in the world negative values would be silently
truncated to 0?  Off-hand, that seems like an incredibly stupid thing
to do (and I don't see anything in the ps-ABI that would require this).

I couldn't track down when it was added (the CVS log ends at the time
when elfxx-ia64.c was renamed from elf64-ia64.c).  I know it wasn't
there in the original versions of elf64-ia64.c, so it must have been
added for a reason.

Can anyone see a reason for this?

	--david


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