[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KEEP Re: [PATCH 2/2] xen: Add CONFIG_GC_SECTIONS


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 10 Dec 2025 12:11:42 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4ZpftQCiPGy8uMm3Mry9au9dXZwtVHnc8x+qK2TsvI0=; b=HxUnIs3Y8exOkCOFJqdngDgI+0ftTue1tXDT+3lLdN7lAcoyx1Lqv00R095vNknVzY9pKLA8BoKLIonOQv3m/szk53IbJqJbDb2nTPpOwu3LyoVdaDONKz9y9pQHAwBvyubYtY3CzA5COdOxPCNodJ5Pm5p3tU6Sdwt0b3IYxb4ZUYW0FfyMPUGvMYd67PKLHw4yP2SVDqMCQ+ogHYpFsRoev55vlicV0Wj4KgqeJoJQ0BfWCZZ2I7aWbAvbi5XYKumyeMGvw9GnhbcGdllzXFGtv4Pgk9v/FG+KWf6ERdZK1QoQ/BT/+nwBpYJmlpaMLN5RQwjZUVhVGSemSifOZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jv7AKninKvnTxiuErrFDMYr8U1SOEUK+6AD+N3tUHTAz7dPh2XO49I2zMZ5qPuIKlmKExa5CJvq1DignzUuouHE6pzh8xoeU0/ar/fp+dLOHOV8NfwNsf8W399y8AmZ4F+j411rLLH5VoIGXjkYvKDLGXyLfl7sZLL61dbD1xBVZxzAlyCnY+DU1HC2Afw2stPMOCfiS5up54mRULdYYKJIy6caVuepR12wWi8Jw25iEh3YQDJAKCZ89q3/yI5fPQF/+QZ++5jvt3G++AFNWfiEyciP4nBlUvRMxkDMXoFjy8B/mzGx8lH+AnihbLcManR4/5UEAM/hMcNm8JJRPvg==
  • Cc: Victor Lira <victorm.lira@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, "Connor Davis" <connojdavis@xxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Delivery-date: Wed, 10 Dec 2025 17:12:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-12-10 11:55, Andrew Cooper wrote:
On 09/12/2025 9:47 pm, Jason Andryuk wrote:
         . = ALIGN(4);
         __alt_instructions = .;
-       *(.altinstructions)
+       KEEP(*(.altinstructions))
         __alt_instructions_end = .;

Thinking about this, what we need is for there to be a reference tied to
the source location, referencing the replacement metadata and
replacement instructions.

Looking at https://maskray.me/blog/2021-02-28-linker-garbage-collection
might be able to do this with .reloc of type none.  In fact,
BFD_RELOC_NONE seems to have been invented for precisely this purpose.

This means that if and only if the source function gets included, so
does the metadata and replacement.

Yes.  Thanks for the reference.  I'll take a look.

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.