From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30980 invoked by alias); 28 Apr 2004 23:43:02 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 30957 invoked from network); 28 Apr 2004 23:43:01 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sources.redhat.com with SMTP; 28 Apr 2004 23:43:01 -0000 Received: from hiauly1.hia.nrc.ca (hiauly1.hia.nrc.ca [127.0.0.1] (may be forged)) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9) with ESMTP id i3SNgxGw022600; Wed, 28 Apr 2004 19:42:59 -0400 (EDT) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9/Submit) id i3SNgwMu022598; Wed, 28 Apr 2004 19:42:58 -0400 (EDT) Message-Id: <200404282342.i3SNgwMu022598@hiauly1.hia.nrc.ca> Subject: Re: [committed] SOM linkonce/common support To: law@redhat.com Date: Thu, 29 Apr 2004 00:32:00 -0000 From: "John David Anglin" Cc: binutils@sources.redhat.com In-Reply-To: <200404282033.i3SKXVXO028251@speedy.slc.redhat.com> from "law@redhat.com" at Apr 28, 2004 02:33:31 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00755.txt.bz2 > >I have tested the patch with a modified version of gcc 3.3.4. Using > >the COMDAT support below, I implemented one-only support in gcc. This > >provides implicit template instantiation and vastly simplified vtable > >and typeinfo node handling. I was then able to build working versions > >of the C++ applications groff and lyx. Previously, this wasn't possible. > > > >Installed to the trunk about 10 years too late. > Thanks. I've often wondered if using the SOM comdat stuff would have > worked and made a number of things in GCC-land easier to deal with. The gcc patch still needs a bit of cleanup but hopefully will be installed soon. I had looked at the gcc C++ implementation to see if the handling of vtables and typeinfo nodes could be improved. However, I came to the conclusion that this was going to be difficult if not impossible. Basically, the adopted C++ ABI for gcc is based on one with weak support. Having noticed the comdat and common support in the linker, I thought it might be worthwhile to see if it might be usable to provide one only support in gcc. The changes needed for supporting SOM comdat are pretty straightforward and a good part of the necessary support was already present. I guess the reason this didn't happen ten years ago is HP didn't expose the is_somdat flag until hpux 11. It also helped to have the public domain version of the linker available to see what its capabilities were. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602)