From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: khan@xraylith.wisc.EDU Cc: binutils@sourceware.cygnus.com Subject: Re: (fixed patch) pe-dll fix for exporting common symbols Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <19990624205518.17904.qmail@daffy.airs.com> References: <199906241943.OAA06490@mercury.xraylith.wisc.edu> <199906241943.OAA06490@mercury.xraylith.wisc.edu> X-SW-Source: 1999-q2/msg00344.html Date: Thu, 24 Jun 1999 14:43:05 -0500 From: Mumit Khan + if (blhe->type == bfd_link_hash_defined) + { + exported_symbol_offsets[i] = blhe->u.def.value; + exported_symbol_sections[i] = blhe->u.def.section; + } + else + { + exported_symbol_offsets[i] = 0; + exported_symbol_sections[i] = blhe->u.c.p->section; + } I don't know how PE handles common symbols in DLLs, but I don't see how this could be right. This appears to assume that the common symbol is at the start of the section, but that is not correct. You can have multiple common symbols in a single section. Try putting several common symbols in a single input file, and see what happens. Ian