summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-10-22 18:49:53 +0000
committerRui Ueyama <ruiu@google.com>2015-10-22 18:49:53 +0000
commitc4aaed925539e53631503273b329440f7ab6d21d (patch)
tree86e6ab05a2f3132dc72b0fef8a4017b4b9cc721f /lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
parentbe8c33e8da932216a079cba4cd0703760ebc5beb (diff)
downloadbcm5719-llvm-c4aaed925539e53631503273b329440f7ab6d21d.tar.gz
bcm5719-llvm-c4aaed925539e53631503273b329440f7ab6d21d.zip
ELF2: Implement --gc-sections.
Section garbage collection is a feature to remove unused sections from outputs. Unused sections are sections that cannot be reachable from known GC-root symbols or sections. Naturally the feature is implemented as a mark-sweep garbage collector. In this patch, I added Live bit to InputSectionBase. If and only if Live bit is on, the section will be written to the output. Starting from GC-root symbols or sections, a new function, markLive(), visits all reachable sections and sets their Live bits. Writer then ignores sections whose Live bit is off, so that such sections are excluded from the output. This change has small negative impact on performance if you use the feature because making sections means more work. The time to link Clang changes from 0.356s to 0.386s, or +8%. It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes. That is 4.3% reduction. http://reviews.llvm.org/D13950 llvm-svn: 251043
Diffstat (limited to 'lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud