Skip to contentSkip to conversation

x86: drop detection of ld supporting SORT_BY_INIT_PRIORITY()

PATCH In review Jan Beulich 3 participants 3 messages Aug 11, 2025 – Aug 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: drop detection of ld supporting SORT_BY_INIT_PRIORITY()

GNU ld 2.25 supports this, and we already assume all lld versions do.

---
While past the submission deadline, this fits the toolchain baseline update we did in this release cycle, so I'd like to ask that it be considered to still permit this in.

xen/arch/x86/arch.mk +0 -10
@@ -72,16 +72,6 @@ ifeq ($(CONFIG_UBSAN),y)
 $(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=alignment)
 endif
 
-ifeq ($(CONFIG_LD_IS_GNU),y)
-# While not much better than going by raw GNU ld version, utilize that the
-# feature we're after has appeared in the same release as the
-# --print-output-format command line option.
-AFLAGS-$(call ld-option,--print-output-format) += -DHAVE_LD_SORT_BY_INIT_PRIORITY
-else
-# Assume all versions of LLD support this.
-AFLAGS += -DHAVE_LD_SORT_BY_INIT_PRIORITY
-endif
-
 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
 
 efi-check := arch/x86/efi/check
xen/arch/x86/xen.lds.S +0 -4
@@ -35,10 +35,6 @@ ENTRY(start_pa)
 # define SECTION_ALIGN PAGE_SIZE
 #endif
 
-#ifndef HAVE_LD_SORT_BY_INIT_PRIORITY
-# define SORT_BY_INIT_PRIORITY SORT
-#endif
-
 OUTPUT_FORMAT(FORMAT, FORMAT, FORMAT)
 
 OUTPUT_ARCH(i386:x86-64)
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jan Beulich

GNU ld 2.25 supports this, and we already assume all lld versions do.

Quoted 4 lines

---
While past the submission deadline, this fits the toolchain baseline update we did in this release cycle, so I'd like to ask that it be considered to still permit this in.

There's loads of cleanup still in the ticket I made and talked about at the start of 4.21.

There are a view bits posted and still in need of pushing through, but I consider anything along these lines to be fair game in the short term.

~Andrew

#2 lore raw
Quoted 10 lines · Andrew Cooper
Quoted 3 lines · Jan Beulich

GNU ld 2.25 supports this, and we already assume all lld versions do.

Quoted 4 lines

---
While past the submission deadline, this fits the toolchain baseline update we did in this release cycle, so I'd like to ask that it be considered to still permit this in.

Quoted 5 lines

There's loads of cleanup still in the ticket I made and talked about at the start of 4.21.

There are a view bits posted and still in need of pushing through, but I consider anything along these lines to be fair game in the short term.

Agree with that.

~ Oleksii