Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2017 00:20:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-toolchain@FreeBSD.org
Subject:   [Bug 223752] clang __attribute__((constructor)) gets wrong input parameters
Message-ID:  <bug-223752-29464-Wi74Mk8gsU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223752-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223752-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223752

--- Comment #8 from dstaesse <dimitri.staessens@ugent.be> ---
I agree that the documentation could be more specific about the nature of t=
he
functions that can have this attribute.

It's true that most examples use functions without arguments but that could
just be because they are examples and keep things as simple as possible. Mo=
st
of the examples have a main() without arguments as well...

Of course it's glibc specific, but the elf-init.c seems to define the funct=
ions
that go into the pre_init array as having (int, char **, char **) arguments:

https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob_plain;f=3Dcsu/elf-init.c

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223752-29464-Wi74Mk8gsU>