🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Andrew Klossner Fri, 01 Sep 1989 23:28
collect.c can't handle extended symbols
#389
Author: Andrew Klossner
Date: Fri, 01 Sep 1989 23:28
34 lines
1199 bytes
collect.c doesn't deal correctly with extended symbols in COFF object
files, e.g., the output from 'gcc -g' or 'g++ -g0'.

The loop:

	for (symindex = 0; symindex < symbols; symindex++ ) {

	  SYMENT symbol;
	  char *symbol_name;
	  extern char *ldgetname();
	  
	  ldtbread(ldptr, symindex, &symbol);
		...
	}

should instead look like this:

	symindex = 0;
	while (symindex < symbols) {

	  SYMENT symbol;
	  char *symbol_name;
	  extern char *ldgetname();
	  
	  ldtbread(ldptr, symindex, &symbol);
		...
	  symindex += 1 + symbol.n_numaux;
	}

so that "auxiliary" symbol table entries will be skipped.
This is necessary because ldgetname can core-dump on an auxiliary entry.

  -=- Andrew Klossner   (uunet!tektronix!frip.WV.TEK!andrew)    [UUCP]
                        (andrew%frip.wv.tek.com@relay.cs.net)   [ARPA]
Re: collect.c can't handle extended symbols
#390
Author: Piercarlo Grandi
Date: Sun, 03 Sep 1989 12:27
25 lines
1471 bytes
In article <4428@orca.WV.TEK.COM> andrew@frip.WV.TEK.COM (Andrew Klossner) writes:

   collect.c doesn't deal correctly with extended symbols in COFF object
   files, e.g., the output from 'gcc -g' or 'g++ -g0'.

As I do not like symbolic debuggers (I vastly prefer
instrumenting the source, or assembler debuggers to look at
system dependent problems), I have not bothered much with the
various problems of '-g0' for 'g++' under system V.

However, here is another one: 'g++' allows arguments to
procedures to be unnamed; no name is generated for them in the
symtab entry, and the assembler complains about illegal syntax. A
'fake' name ought to be generated.

Reproduce-by:

	main(auto int, auto char *argv[])
	{
	}

--
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads