mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] DT_PREINIT_ARRAY support
@ 2024-01-21 23:33 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2024-01-21 23:33 UTC (permalink / raw)
  To: musl

There is a DT_PREINIT_ARRAY patch that falls through the cracks:
I wonder whether it can be visited again.

I ported sanitizers to upstream compiler-rt. I have not had time to
track the latest status for musl, but I know that quite a few
sanitizers will benefit from musl supporting the feature and see
another recent issue about tsan


Some notes about DT_PREINIT_ARRAY

The linker defines DT_PREINIT_ARRAY and DT_PREINIT_ARRAYSZ according
to the address and size of .preinit_array. The linker also defines
__preinit_array_start and __preinit_array_end if referenced.

The generic ABI says:

> DT_PREINIT_ARRAY: This element holds the address of the array of pointers to pre-initialization functions, discussed in ``Initialization and Termination Functions'' below. The DT_PREINIT_ARRAY table is processed only in an executable file; it is ignored if contained in a shared object.

DT_PREINIT_ARRAY only applies to the executable. This feature gives
the executable a way to run initialization functions before shared
object dependencies.

There is no .postfini_array.

Most implementations support DT_PREINIT_ARRAY.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-21 23:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-21 23:33 [musl] DT_PREINIT_ARRAY support Fangrui Song

Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).