-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][Bundler] Reduce fat object size
Summary: Fat object size has significantly increased after D65819 which changed bundler tool to add host object as a normal bundle to the fat output which almost doubled its size. That patch was fixing the following issues 1. Problems associated with the partial linking - global constructors were not called for partially linking objects which clearly resulted in incorrect behavior. 2. Eliminating "junk" target object sections from the linked binary on the host side. The first problem is no longer relevant because we do not use partial linking for creating fat objects anymore. Target objects sections are now inserted into the resulting fat object with a help of llvm-objcopy tool. The second issue, "junk" sections in the linked host binary, has been fixed in D73408 by adding "exclude" flag to the fat object's sections which contain target objects. This flag tells linker to drop section from the inputs when linking executable or shared library, therefore these sections will not be propagated in the linked binary. Since both problems have been solved, we can revert D65819 changes to reduce fat object size and this patch essentially is doing that. Reviewers: ABataev, alexshap, jdoerfert Reviewed By: ABataev Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73642
- Loading branch information
1 parent
fcabccd
commit c53cb2b
Showing
2 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters