Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10_MessageChannel built into a 2.9MB swf file #39

Open
trungnq97 opened this issue Jan 7, 2014 · 2 comments
Open

10_MessageChannel built into a 2.9MB swf file #39

trungnq97 opened this issue Jan 7, 2014 · 2 comments

Comments

@trungnq97
Copy link

Hi,

I tried to run make in sample 10_MessageChannel, and the output file is 2.9MB. It seems to be quite big compared to a very small cpp file.

I am wondering, is there any way to reduce its size?

Best,
Trung

@trungnq97
Copy link
Author

When building with -O4 -flto-api=exports.txt, my swf file now is only 212K. The exports.txt is taken from example 9 pthreads. Still this exports.txt is mysterious to me. Can anybody explain where these symbols come from? (Or how to build this list of symbols?).

built in symbols that must always be preserved

_start1
malloc
free
memcpy
memmove
flascc_uiTickProc
_sync_synchronize

symbols for C++ exception handling

_Unwind_SjLj_Register
_Unwind_SjLj_Resume
_Unwind_SjLj_Unregister
_Unwind_SjLj_RaiseException

symbols specific to libVGL

vglttyioctl

I did two simple tests:

Remove
"

symbols specific to libVGL

vglttyioctl
"
.. no output from printf

Remove
"

symbols for C++ exception handling

_Unwind_SjLj_Register
_Unwind_SjLj_Resume
_Unwind_SjLj_Unregister
_Unwind_SjLj_RaiseException
"
.. the swf stops working.

@cbakgly
Copy link
Contributor

cbakgly commented Feb 8, 2014

These are native symbols in libc.
If you ever write a helloworld.cpp, don't you wonder how such a small app prints out "hello world"?
Never forget you have OS/Libs supporting you. Now you bring part of them along in your swf file to support you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants