Article View: gnu.gcc.help
Article #42055gcc loader and duplicate library vars
From: Kurt Konolige
Date: Thu, 18 Jan 1996 00:00
Date: Thu, 18 Jan 1996 00:00
17 lines
1358 bytes
1358 bytes
I've been bitten by this feature of the gcc loader twice now, and each time it took forever to track down. I save two compiled files in a static object library, and sometimes I accidentally duplicate variable names (I know, I know, poor programming practice). These vars have completely different types. Anyhow, there are no error messages since I'm not linking at that point. Problem is, when I access the library during a gcc load, it sets aside space for one of the variables, and points both of them to this space. Needless to say my programs crash with random memory errors, usually long after the damage is done. I'm at a loss to direct gcc in any way to tell me if there are duplicate variable definitions in the library file when a do a load. Further, I can't find any utilities that let me look at the library to check its symbols, although there must be some around. Any help here on gcc's behavior? Cheers --kk
Technical Details
Message-ID:
<KONOLIGE.96Jan17223500@Ocean.ai.sri.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2632950e67e35d1d,start X-Google-Attributes: gid11318c,public From: konolige@ai.sri.com (Kurt Konolige) Subject: gcc loader and duplicate library vars Date: 1996/01/18 Message-ID: <KONOLIGE.96Jan17223500@Ocean.ai.sri.com> X-Deja-AN: 135607980 distribution: world organization: SRI International, Menlo Park, CA newsgroups: gnu.gcc.help