1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

main is not a pubic function, use _start instead

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2014-03-25 18:44:32 +00:00
parent 925a1e1d70
commit 0fe34c4c3b

View file

@ -623,9 +623,9 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms)
intptr_t main_fbase;
char *main_path;
{
extern int main(int argc, char **argv); /* a function in the main executalbe */
extern void _start(void); /* a function in the main executalbe */
Dl_info info;
dladdr(main, &info);
dladdr(_start, &info);
main_fbase = (intptr_t)info.dli_fbase;
}
{