home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / 3b1 / 3756 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.8 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!andy
  2. From: andy@cs.caltech.edu (Andy Fyfe)
  3. Newsgroups: comp.sys.3b1
  4. Subject: bug in GNU assembler
  5. Date: 8 Nov 1992 02:10:07 GMT
  6. Organization: California Institute of Technology
  7. Lines: 38
  8. Distribution: world
  9. Message-ID: <1dhstvINN2f8@gap.caltech.edu>
  10. NNTP-Posting-Host: kodiak.cs.caltech.edu
  11.  
  12. The GNU assembler has had a problem with -g and labels in C code.  They
  13. generate an "unexpected storage class 6" (or some such) warning, when
  14. assembling.  Worse, if the label was defined before it was used, then
  15. the assember made the name an external rather than a label.  The loader
  16. then objected to this otherwise undefined name.
  17.  
  18. I made a simple patch that stops the warning, and keeps the labels as
  19. labels.  In the "defined before use" case, the value in the symbol table
  20. is 0, rather than the actual location of the label, so this patch isn't
  21. perfect.
  22.  
  23. You can ftp a new binary from ftp.cs.caltech.edu:pub/3b1/tmp/as.Z (tmp
  24. because the binary will eventually go into gcc2-bin.tar.Z (as soon as
  25. I update to 2.3.1)).  The unlinked objects are there too.
  26.  
  27. Andy Fyfe                    andy@cs.caltech.edu
  28.  
  29. *** read.c~    Sat Nov  7 17:21:21 1992
  30. --- read.c    Sat Nov  7 17:47:45 1992
  31. ***************
  32. *** 1452,1458 ****
  33.       /* Valid but set somewhere else (s_comm, s_lcomm, colon) */
  34.       break;
  35.         case C_USTATIC:
  36.         case C_EXTDEF:
  37. -       case C_LABEL:
  38.         case C_ULABEL:
  39.       as_warn("unexpected storage class %d", S_GET_STORAGE_CLASS(symbolP));
  40. --- 1452,1460 ----
  41.       /* Valid but set somewhere else (s_comm, s_lcomm, colon) */
  42.       break;
  43. +       case C_LABEL:
  44. +     S_SET_SEGMENT(symbolP, C_TEXT_SECTION);
  45. +     break;
  46.         case C_USTATIC:
  47.         case C_EXTDEF:
  48.         case C_ULABEL:
  49.       as_warn("unexpected storage class %d", S_GET_STORAGE_CLASS(symbolP));
  50.