[Bug 223752] clang __attribute__((constructor)) gets wrong input parameters
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Nov 20 02:47:36 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223752
--- Comment #19 from Mark Millard <markmi at dsl-only.net> ---
(In reply to dstaesse from comment #18)
You are welcome.
My guess is that this is outside POSIX completely and
is just ABI material for what you are doing.
In fact, looking around I found an ARM document
indicating an empty parameter list for its
.init_array context:
Each translation unit provides a fragment of the constructor vector in an ELF
section called .init_array of type SHT_INIT_ARRAY (=0xE) and section flags
SHF_ALLOC + SHF_WRITE.
Each element of the vector contains the address of a function of type extern
“C” void (* const)(void) that, when called, performs part or all of the global
object construction for the translation unit. Producers must treat .init_array
sections as if they were read-only.
( http://infocenter.arm.com/help/topic/com.arm.doc.ihi0041e/IHI0041E_cppabi.pdf
page 19 of 24.)
So, not portable across all ABIs that have .init_array .
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list