Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMbhsRTVJiBYgcWbewwogHLbJqscuJ7th35eCBXAVQ54Bh2gjA@mail.gmail.com>
Date: Tue, 27 Oct 2026 11:12:10 -0700
From: Colin Cross <ccross@...roid.com>
To: musl@...ts.openwall.com
Subject: [PATCH] Remove NO_LEGACY_INITFINI

NO_LEGACY_INITFINI was added in 1da53dad ("disable legacy init/fini
processing on ARM") because crt/arm/crti.s was running the init/fini
arrays from _init/_fini, which caused the init/fini arrays to be run
twice after e69ae844 ("add support for init_array/fini_array
ctors/dtors to dynamic linker").

NO_LEGACY_INITFINII is no longer necessary after 976c0fdc ("remove
init/fini array asm from arm crti/crtn files").  Keeping it enabled on
arm and aarch64 results in _init/_fini symbols that are noops but
never called.  This conflicts with tools that rewrite the DT_INIT
entry if it exists.  The problem was seen with LLVM BOLT, which in
some cases inserts its initializers in DT_INIT [1].

[1] https://github.com/llvm/llvm-project/blob/llvmorg-23.1.4/bolt/lib/Rewrite/RewriteInstance.cpp#L1478

View attachment "0001-Remove-NO_LEGACY_INITFINI.patch" of type "text/x-patch" (2513 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.