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]

bad api design


Code like this:

+  if (info->flags & INSN_HAS_RELOC)
+    /* If the instruction has a reloc associated with it, then the
+       offset field in the instruction will actually be the addend
+       for the reloc.  In such cases, we can ignore the pc when
+       computing addresses, since the addend is not currently
+       pc-relative.  */
+    pc = 0;

needs to be refactored and removed.  It is a bad interface and creates bugs for ports.  :-(

Further, code like this:

#ifdef ARCH_arm
    case bfd_arch_arm:
      info->symbol_is_valid = arm_symbol_is_valid;
      info->disassembler_needs_relocs = TRUE;
      break;
#endif

is rather opaque and the connection between the two is obscure.

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