Back to index

cell-binutils  2.17cvs20070401
Defines | Functions
tc-iq2000.h File Reference

Go to the source code of this file.

Defines

#define TC_IQ2000
#define LISTING_HEADER   "IQ2000 GAS "
#define TARGET_ARCH   bfd_arch_iq2000
#define TARGET_FORMAT   "elf32-iq2000"
#define TARGET_BYTES_BIG_ENDIAN   1
#define LOCAL_LABELS_FB   1
#define DIFF_EXPR_OK
#define WORKING_DOT_WORD
#define md_apply_fix   gas_cgen_md_apply_fix
#define MD_PCREL_FROM_SECTION(FIXP, SEC)   md_pcrel_from_section (FIXP, SEC)
#define tc_frob_file()   iq2000_frob_file ()
#define obj_fix_adjustable(fixP)   iq2000_fix_adjustable (fixP)
#define md_cgen_record_fixup_exp   iq2000_cgen_record_fixup_exp
#define TC_FORCE_RELOCATION(fix)   iq2000_force_relocation (fix)
#define MD_APPLY_SYM_VALUE(FIX)   0
#define tc_gen_reloc   gas_cgen_tc_gen_reloc

Functions

void iq2000_frob_file (void)
bfd_boolean iq2000_fix_adjustable (struct fix *)
int iq2000_force_relocation (struct fix *)
long md_pcrel_from_section (struct fix *, segT)

Define Documentation

#define DIFF_EXPR_OK

Definition at line 36 of file tc-iq2000.h.

#define LISTING_HEADER   "IQ2000 GAS "

Definition at line 23 of file tc-iq2000.h.

#define LOCAL_LABELS_FB   1

Definition at line 33 of file tc-iq2000.h.

Definition at line 41 of file tc-iq2000.h.

#define MD_APPLY_SYM_VALUE (   FIX)    0

Definition at line 58 of file tc-iq2000.h.

Definition at line 52 of file tc-iq2000.h.

#define MD_PCREL_FROM_SECTION (   FIXP,
  SEC 
)    md_pcrel_from_section (FIXP, SEC)

Definition at line 44 of file tc-iq2000.h.

#define obj_fix_adjustable (   fixP)    iq2000_fix_adjustable (fixP)

Definition at line 48 of file tc-iq2000.h.

Definition at line 26 of file tc-iq2000.h.

#define TARGET_BYTES_BIG_ENDIAN   1

Definition at line 30 of file tc-iq2000.h.

#define TARGET_FORMAT   "elf32-iq2000"

Definition at line 28 of file tc-iq2000.h.

Definition at line 55 of file tc-iq2000.h.

#define tc_frob_file ( )    iq2000_frob_file ()

Definition at line 46 of file tc-iq2000.h.

Definition at line 60 of file tc-iq2000.h.

#define TC_IQ2000

Definition at line 21 of file tc-iq2000.h.

Definition at line 39 of file tc-iq2000.h.


Function Documentation

void iq2000_frob_file ( void  )

Definition at line 580 of file tc-iq2000.c.

{
  struct iq2000_hi_fixup * l;

  for (l = iq2000_hi_fixup_list; l != NULL; l = l->next)
    {
      segment_info_type * seginfo;
      int                 pass;

      assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
             || FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_LO16);

      /* Check quickly whether the next fixup happens to be a matching low.  */
      if (l->fixp->fx_next != NULL
         && FX_OPINFO_R_TYPE (l->fixp->fx_next) == BFD_RELOC_LO16
         && l->fixp->fx_addsy == l->fixp->fx_next->fx_addsy
         && l->fixp->fx_offset == l->fixp->fx_next->fx_offset)
       continue;

      /* Look through the fixups for this segment for a matching
         `low'.  When we find one, move the high just in front of it.
         We do this in two passes.  In the first pass, we try to find
         a unique `low'.  In the second pass, we permit multiple
         high's relocs for a single `low'.  */
      seginfo = seg_info (l->seg);
      for (pass = 0; pass < 2; pass++)
       {
         fixS * f;
         fixS * prev;

         prev = NULL;
         for (f = seginfo->fix_root; f != NULL; f = f->fx_next)
           {
             /* Check whether this is a `low' fixup which matches l->fixp.  */
             if (FX_OPINFO_R_TYPE (f) == BFD_RELOC_LO16
                && f->fx_addsy == l->fixp->fx_addsy
                && f->fx_offset == l->fixp->fx_offset
                && (pass == 1
                    || prev == NULL
                    || (FX_OPINFO_R_TYPE (prev) != BFD_RELOC_HI16)
                    || prev->fx_addsy != f->fx_addsy
                    || prev->fx_offset !=  f->fx_offset))
              {
                fixS ** pf;

                /* Move l->fixp before f.  */
                for (pf = &seginfo->fix_root;
                     * pf != l->fixp;
                     pf = & (* pf)->fx_next)
                  assert (* pf != NULL);

                * pf = l->fixp->fx_next;

                l->fixp->fx_next = f;
                if (prev == NULL)
                  seginfo->fix_root = l->fixp;
                else
                  prev->fx_next = l->fixp;

                break;
              }

             prev = f;
           }

         if (f != NULL)
           break;

         if (pass == 1)
           as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
                        _("Unmatched high relocation"));
       }
    }
}

Here is the call graph for this function: