diff --git a/binfmt/libelf/gnu-elf.ld b/binfmt/libelf/gnu-elf.ld index 6ff5ab5fad..81928663ee 100644 --- a/binfmt/libelf/gnu-elf.ld +++ b/binfmt/libelf/gnu-elf.ld @@ -75,6 +75,7 @@ SECTIONS _sctors = . ; *(.ctors) /* Old ABI: Unallocated */ *(.init_array) /* New ABI: Allocated */ + *(SORT(.init_array.*)) _ectors = . ; } @@ -83,6 +84,7 @@ SECTIONS _sdtors = . ; *(.dtors) /* Old ABI: Unallocated */ *(.fini_array) /* New ABI: Allocated */ + *(SORT(.fini_array.*)) _edtors = . ; }