From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 501F53858D28 for ; Fri, 3 Nov 2023 03:59:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 501F53858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 501F53858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698983956; cv=none; b=V+hk3Z7YH+6HLlfc1Mp9OZdMTvz7FF78kYes6nV4NNLNolNGcjEaQmXiqag72/N4yAnVBp6OU4ps0DiLvEjt8Sb8Lpn5G9roLaeQdWT/rlEyssKbrd+Mm9H146QiiqEAW8tWe9uCKFLK77ifnRFCkLAP2R0K4hDmarMIn+wNl6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698983956; c=relaxed/simple; bh=vEd+LTQeo5JJr5wfDR7FUEpjDLK15ge9MIYljRLPA0s=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=fzKFZlhcqlOLmmQoQRHepglAK6Ah9bqER5pRVJFY/iahj/jLU6s6D7Kj7H6lXy/PK+Oj7AVCE0M7BIDPIHuZWV8awjF7VtjcyqAReBcuHCnzA6aFUi5m4BAIDuY7Vqv7wnapmahfG6ewysfR9LS1d5J2ILOdaeQZ+WTTGjreMeQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1698983945; bh=vEd+LTQeo5JJr5wfDR7FUEpjDLK15ge9MIYljRLPA0s=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Hsi0MWVp6r0V293OibAQ1a02/ra1JhZ1v/oLxzs5RSNEvXPAO6up2NUe8ool1+3y5 P1hQUbSt2B3WHSH+PyCmtoHvxCWQxydMqB1N2Hf94XH4ocQASw4HfRapw9llh5X+9M B6u1mPEyoRDkn++OnoF70UqkzI0AxaYgQ5dSVdIw= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C499E1E0C1; Thu, 2 Nov 2023 23:59:05 -0400 (EDT) Message-ID: Date: Thu, 2 Nov 2023 23:59:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/30] Baby step for objfile splitting Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20231029-split-objfile-2023-bound-sym-october-v1-0-612531df2734@tromey.com> From: Simon Marchi In-Reply-To: <20231029-split-objfile-2023-bound-sym-october-v1-0-612531df2734@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: On 2023-10-29 19:23, Tom Tromey wrote: > Every year or so, I take a stab at the objfile splitting work. This > always fails and I end up not sending anything. > > This year, I decided to take a baby step instead, thinking maybe it > would be possible to slowly grind away at the problem. > > This series is the first such step. It spreads the use of > block_symbol through a bunch of code, trying to eliminate calls to > symbol::value_address. > > The longer term idea here is to then add an objfile member to > block_symbol. After this, it would be relatively simple to change > symbols to be relocated at point of use. (This would be a significant > step toward objfile splitting, but there's even more to do after > that...) I started to read this series, and I don't quite grasp why it's useful to expand the use of the block_symbol structure specifically. If a function returns or accepts a struct symbol today, once the struct symbol is made objfile-independent, that function will then need to return or accept a bound_symbol structure (which does not exist yet) containing a a symbol and an objfile (just like bound_minimal_symbol). But I don't see why the block comes into play. Presumably, a function that doesn't care about the block today won't care about the block after. Am I missing something? I'm not so familiar with the symbol-related code. Simon