Only export symbols from the libraries that should be exported
ClosedPublic

Authored by kossebau on Jul 29 2016, 10:50 PM.

Details

Summary

Using generate_export_header instead manually written export headers
should improve coverage across platforms.

Size of stripped libmarblewidget-qt5 reduced on Linux
e.g. from 11077592 to 7889848

Diff Detail

Repository
R34 Marble
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau updated this revision to Diff 5564.Jul 29 2016, 10:50 PM
kossebau retitled this revision from to Only export symbols from the libraries that should be exported.
kossebau updated this object.
kossebau added reviewers: Marble, rahn, nienhueser.
nienhueser accepted this revision.Jul 30 2016, 4:18 AM
nienhueser edited edge metadata.

Looks good, please push. Size reduction is due to hidden visibility or why else?

This revision is now accepted and ready to land.Jul 30 2016, 4:18 AM

Size reduction is due to hidden visibility or why else?

Yes, at least I very much assume that the compiler now can optimize more code due to no longer having to support the public state of all symbols. No experience in putting binaries under the microscope yet for that, sadly.
All I could see/feel, next to size of lib binary (those numbers were for stripped version) was a slightly improved start-up time, which surely is due to dynamic linker having less symbols to walk through :)

Meh. For some reason this results in a broken apk, at least on my SFOS with its Dalvik adaption.
Will at least commit removal of long-time deprecated methods, and look more later into how to get access to any logs of android apps on my sfos. If anyone with proper Android emulator/device could help and have a look as well, would be welcome.

kossebau updated this revision to Diff 5573.Jul 30 2016, 3:30 PM
kossebau edited edge metadata.

Drop already comitted removal of old deprecated methods

kossebau updated this object.Jul 30 2016, 3:39 PM

Ah, that is the reason, the marblemaps "executable" for Android is built as shared lib, so that needs proper handling:

D/dalvikvm( 2793): Trying to load lib /data/data/org.kde.marble.maps/lib/libMarble.so 0x418d5558
D/dalvikvm( 2793): Added shared lib /data/data/org.kde.marble.maps/lib/libMarble.so 0x418d5558
D/dalvikvm( 2793): No JNI_OnLoad found in /data/data/org.kde.marble.maps/lib/libMarble.so 0x418d5558, skipping init
E/        ( 2793): (null):0 ((null)): dlsym failed: Symbol not found: 
E/        ( 2793): (null):0 ((null)): Could not find main method
This revision was automatically updated to reflect the committed changes.