🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1717

bug in ld

#1717
From: Glenn Engel
Date: Tue, 06 Feb 1990 18:09
34 lines
1702 bytes
>
>Glenn,
>
>I've a bug report for the -M option of ld below. The obvious address for
>email to a bug list for util failed (bug-util@prep.ai.mit.edu) - could you
>forward it to the right one, or perhaps you know the person at FSF looking
>after utils ?
>
>Dave
>
>--------------
When the -M ( show load map etc. ) option of the GNU linker, ld is used,
the program sometimes dumps core when printing the local symbols of modules
containing SET elements. I believe the version to be 0.01.

I am not knowledgeable enough concerning SET ELEMENTS to suggest a proper
fix which prints correct output for the SET_ELEMENT symbol, but the
following prevents the problem:

In ld.c, function "list_file_locals( entry, outfile )", the third test of
the if statement, "&& ! SET_ELEMENT_P( p->n_type )" has been added as a fix.
Set elements have their n_un.n_strx entry corrupted by this stage, causing
the fprintf to dump core.


|  for (p = entry->symbols; p < end; p++)
|    /* If this is a definition,
|       update it if necessary by this file's start address.  */
|
|    if (!(p->n_type & (N_STAB | N_EXT )) && ! SET_ELEMENT_P( p->n_type))
|      fprintf (outfile, "  %s: 0x%x\n",
|	       entry->strings + p->n_un.n_strx, p->n_value);
|      
|  entry->strings = 0;		/* All done with them.  */
Technical Details
Message-ID: <9002061809.AA10970@labgre.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!HPLSLA.HP.COM!glenne

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!HPLSLA.HP.COM!glenne
From: glenne@HPLSLA.HP.COM (Glenn Engel)
Newsgroups: gnu.utils.bug
Subject: bug in ld
Message-ID: <9002061809.AA10970@labgre.HP.COM>
Date: 6 Feb 90 18:09:33 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34