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