[Bug 223752] clang __attribute__((constructor)) gets wrong input parameters
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Nov 20 00:20:20 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223752
--- Comment #8 from dstaesse <dimitri.staessens at ugent.be> ---
I agree that the documentation could be more specific about the nature of the
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. Most
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 functions
that go into the pre_init array as having (int, char **, char **) arguments:
https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=csu/elf-init.c
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list