From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id C71703858C74 for ; Fri, 19 Jan 2024 22:52:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C71703858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C71703858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705704776; cv=none; b=uvBtZ5TPEQpodK2Pvc98j6HbbX1Ce+yajkQo/Ph/VJh9JQ43YWgvi6l91ce7naS//RFN9GkIgNI38aB3x45KgHsZ1+LGYzM8/5/ZSPEGweEW/Bh8nqmmUoVRsyP+ssrHFjYdzVIRPwx3CcFFQDuGiHigLkt6If7wgifF9mm83XY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705704776; c=relaxed/simple; bh=pcPGGoustlrZxUFYh4+Ji/R7AkLdiTtAOhWOQCu6Jj8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=l+2TBiEAMPleEONSJYd3hPXN7eRwMbsj/ocd37RAL4NH8JKBE60qWJxHlPCLcPZNuyFVnIH35WhwU+/N43RTEkTODsyU1qyRJRotOlDymzQVIbQhieKliZF9fb6El66UqhmENctNEXBYcqJLoHkX1Egz/PhWg7I2pWShAGhCksU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-55790581457so1620746a12.3 for ; Fri, 19 Jan 2024 14:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705704773; x=1706309573; darn=sourceware.org; h=to:subject:message-id:date:from:references:in-reply-to:reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pcPGGoustlrZxUFYh4+Ji/R7AkLdiTtAOhWOQCu6Jj8=; b=FLvIlI4REwmCq0EnlT0n//V+GBLEu1a1HstnLP1YC9e0waAQGY7J71CbLXlpNHiC/c NLdEQHjJpZfGhGx/WER6aio1y6meB9jGo0syxgauTYY2KTkfyWqWl6kluU3LiAtWQz0+ qzOeD2FT2XABbV6Lj3i3IWmL2GGf4C/GhObbrojjCoXLdk5BIt6C/ULozm9D6LbCd2bm kCQPp/jyrpZ55UO7JUHu0Cme302vCB5Tav8Fe8Q/FgWQO57CeKXsx3IxK9ZxxQ2nS5hq UOFgpe1SMaXjS7J3w08xBBPWPY9WnIIxyDIM92GRQNtvnaervjhzsIKObmEdEJ39AeId c7pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705704773; x=1706309573; h=to:subject:message-id:date:from:references:in-reply-to:reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pcPGGoustlrZxUFYh4+Ji/R7AkLdiTtAOhWOQCu6Jj8=; b=QztOqdIsv1VhwD7KKTmK4GF8C+MJb7fxy1XT0GRq6EuXPtu4jUmk66eQx7GtAcoxxS QpaT3Oxk/dj+dG5hD5dd6ctlEFfzPULZl3INT/MYyOSDswEJDoqXKXHrQn44Lrq+nFoV +OZSFRPqEG3hjxNT3jV8VHvXQ79yyBICN01p/Y/j9Lg7iB6JxniRMinHUA8aSL2ZXP0h cMEvHbeTTCVhxfTrliBfhHZCuGQC2rowoavRmXN/wEXXmMBWTj62J8uT4OMlrRpx7Irs 5mDLPA2DOToYK9ffhWR2yRo2opnRd7h7L4hV13YWpPx+LQExzJH1viR4fd588GD87o8P sl5w== X-Gm-Message-State: AOJu0YwUwYZPJ7j6Hn5/4A9bYnFNuQNqXghKTHA6GRvOXLq9s44J8cDL Pd5dT++lorYn+O/vsbGkhGXA/+eulomH5CzpUuZ5vS/DFuyeX1j/PTw4KsfvhchtMa9SphlxQ3Y S/tDfbBJ4cG/U821MF8KJzJi5pG4xanms X-Google-Smtp-Source: AGHT+IE4Zbcmn+eFHL6btGqS9+o60X88M8j/Nz/+OVCkIPmW7rAKtg9nIZreBYj4NHThCN19MfObpklfkEMKkpCWVmE= X-Received: by 2002:aa7:cd77:0:b0:55a:b30:a554 with SMTP id ca23-20020aa7cd77000000b0055a0b30a554mr228707edb.78.1705704773354; Fri, 19 Jan 2024 14:52:53 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a54:3345:0:b0:246:dedf:6cdc with HTTP; Fri, 19 Jan 2024 14:52:52 -0800 (PST) Reply-To: cauldwell.thomas@gmail.com In-Reply-To: References: From: Frederick Virchanza Gotham Date: Fri, 19 Jan 2024 22:52:52 +0000 Message-ID: Subject: Re: Linker : Make a map of typeinfo to vtable To: "binutils@sourceware.org" Content-Type: multipart/alternative; boundary="0000000000001b8afb060f5457d3" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000001b8afb060f5457d3 Content-Type: text/plain; charset="UTF-8" On Friday, January 19, 2024, Frederick Virchanza Gotham wrote: > > Or, instead of waiting until after all the vtables and typeinfo's have > been generated, I can populate my array as and when these things are > generated (I imagine this might be easier than waiting until they're all > generated, but whatever works). > Having thought about this a little more, I realise that it's the C++ compiler that generates the vtables and typeinfo's, and so, inside the source code for the linker, what I'll need to do is: (1) After all the object files have been loaded in, make a finite list of all typeinfo's and vtables (2) Generate my array that maps typeinfo's to vtable pointers (3) Place my array somewhere inside a section inside the ELF binary (4) Provide the two linker symbols __map_typeinfohash_vtable and __map_typeinfohash_vtable_size --0000000000001b8afb060f5457d3--