Article View: gnu.gdb.bug
Article #10113Re: coff long filenames
From: Ronald Guilmette
Date: Thu, 17 May 1990 06:39
Date: Thu, 17 May 1990 06:39
24 lines
1867 bytes
1867 bytes
In article <9005161953.AA11842@ray.sun.com> oakhill!ray!jay@CS.UTEXAS.EDU (Jay Norwood) writes: >I'm working with 3.5 coffread.c. In the function getfilename, there is >a section for reading in long filenames: > if (aux_entry->x_file.x_foff != 0) > strcpy (buffer, stringtab + aux_entry->x_file.x_foff); >--------------- >Since the first filename symbol may very well be the first symbol >which deposits a string in the string table (if the filename is longer >than FILNMLEN), and since the x_foff is relative to the start of the >string table, it is very possible to have a valid long filename at the >same time as x_foff==0. In other words this is a very risky test. >Wouldn't it be better to just test x_file.x_fname[0] for a 0 in order to >determine whether or not to use x_foff? >Jay Norwood Ummm... I take back what I said before. It was only (at best) partly right. Actually, I (now) seem to recall that the first four bytes of a coff string table are occupied by a one work long count of the total number of bytes in the string table. If that's true (and somebody please check my dim recollection on this) then the lawest numbered *actual* meaningful index into the table is (obviously) 4 because bytes 0,1,2,3 are used. // rfg
Technical Details
Message-ID:
<2652471A.4106@paris.ics.uci.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!jarthur!uci-ics!rfgReferences:
<9005161953.AA11842@ray.sun.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,203f1c08daa52020 X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1990-05-17 03:46:46 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!jarthur!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: gnu.gdb.bug Subject: Re: coff long filenames Message-ID: <2652471A.4106@paris.ics.uci.edu> Date: 17 May 90 06:39:22 GMT References: <9005161953.AA11842@ray.sun.com> Reply-To: rfg@ics.uci.edu (Ronald Guilmette) Distribution: gnu Organization: UC Irvine Department of ICS Lines: 24 Posted: Thu May 17 07:39:22 1990