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

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


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 10 Dec 2025 16:55:03 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=iqQtY9W6SglSmgHSsZ6M6LmLzBE6/OPcVrYp5Oli1MA=; b=R//KKTFvCoED8awZKXp3k1a5a+HquHy3RGZxnmke474FV0qYvQhQNrwbxFcDSIAEJlQFDsUgyWJ4FunYVh8ZadzT34iw7Fr7Rpyl7cnIqDd7rTVzQoBwlxnOcu8SIb7PnJr/1xIjfuQ5mLt5e5qNrCxPug0K6gzh7VKc46nSLG11tzFHZuB/HAwcjRIvNyJrnKsigImhmUEmtlohYq66hUHkaxy/AGcI6YDsfHvxa1Zs5U1erX723a4miGpF3Gv9j8MMKh8mUpw7ppmZ4XT1spqZP4Bmd8jpYdrTOnJMTKYKzdy9v3exb6gAeYaCPhFUnp5yG4woSM0EujykxJseUw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TMJT93tjh6kxGaWoCQ2Bz6l4grSC5QWWrdL/I5krRjGlae2QXMafJtq3q/apGQfOpXQWfzD0zAWsvVoNm5LdFIFd+4g7s8rDXqaODb0RCS/B/FjrWRokjY/KJiuJv4Ec4AaqwBqpR2/cs7JJzAzaE3dZnXTIRQ54TeGbbs/xMq4YOFbJxfRkztqqzay1v4b3k5vdvTFV0UoHkvuA7L95lU795p9KWykCc341s1cLxsb28rkbdW2u7iQHDVNxm7GiueZT4xXT8CIoDJhr+gZgziPA7j61PCw07uImfGUeEEV+r9yor9iqQdWxzAH4tbuicODch31qLxIE2t2UO0WTew==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, 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 16:55:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

~Andrew



 


Rackspace

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