On 01.03.2022 09:55, Jan Beulich wrote:
> @@ -258,9 +259,10 @@ SECTIONS
>  
>         . = ALIGN(8);
>         __ctors_start = .;
> -       *(.ctors)
> +       *(SORT_BY_INIT_PRIORITY(.init_array.*))
> +       *(SORT_BY_INIT_PRIORITY(.ctors.*))
>         *(.init_array)
> -       *(SORT(.init_array.*))
> +       *(.ctors)
>         __ctors_end = .;
>    } PHDR(text)

Sadly there's another regression here, with old GNU ld: SORT_BY_INIT_PRIORITY
is known by binutils 2.22 and newer only. 2.21 uses SORT() in respective
places, but I have to admit I don't fancy adding a probe for what we can or
cannot have in linker scripts. Yet for now I also don't see any alternative
yet ...

Jan


Reply via email to