This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Warning about backwards Orgs



    I have a patch for gas (made to the version released with 
binutils-2.5.2) which displays a warning when an Org fails (due to trying
to org backwards).

    I am unfamiliar with patch submission protocol, but the patch follows
for those who are interested:


FILE:      write.c
FUNCTION:  cvt_frag_to_fill


ORIGINAL CODE:

    case rs_org:
#ifdef HANDLE_ALIGN
      HANDLE_ALIGN (fragP);
#endif
      fragP->fr_type = rs_fill;
      know (fragP->fr_next != NULL);


PATCHED CODE:

    case rs_org:
#ifdef HANDLE_ALIGN
      HANDLE_ALIGN (fragP);
#endif
      know (fragP->fr_next != NULL);
   if ( fragP->fr_type == rs_org)
   {
   if ( fragP->fr_offset < fragP->fr_next->fr_address)
    as_warn ("Org failed! Org address changed from 0x%08X to 0x%08X\n",
       fragP->fr_offset, fragP->fr_next->fr_address);
   }
      fragP->fr_type = rs_fill;


-----------------------------------------------------------------------
John Brooks                                      email:  jbrooks@ea.com 
Technical Director - Coin-Op Division            Phone:  415-513-7736
Electronic Arts                                  Fax:    
415-513-7449