Warning about backwards Orgs

Brooks, John jbrooks@ea.com
Tue Mar 14 14:38:00 GMT 1995


    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




More information about the Gas2 mailing list