[Bug 223752] clang __attribute__((constructor)) gets wrong input parameters

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Nov 20 00:53:36 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223752

--- Comment #10 from dstaesse <dimitri.staessens at ugent.be> ---
(In reply to Mark Millard from comment #9)

Thanks a lot for taking time to help me out. I'm definitely no expert on this
matter. Our target is restricted to POSIX.

I've found mostly posts on stackoverflow, definitely nothing that's official
documentation. 
But this gave me some insights:
https://www.cs.stevens.edu/~jschauma/810/elf.html

Here is says that:

The .preinit_array and .init_array sections must contain function pointers (NOT
code!) The prototype of these functions must be

void func(int argc,char** argv,char** envp)

But this may be specific for x86_64.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list