Bug 35485 - Duplicate code in executable significantly increase the App size
Summary: Duplicate code in executable significantly increase the App size
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 9.4 (iOS 9.2)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2015-11-03 00:49 UTC by Prashant Cholachagudda
Modified: 2017-02-07 21:34 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Prashant Cholachagudda 2015-11-03 00:49:13 UTC
Customer is running into the 100MB OTA download limit with their apps. 

From forum post [http://forums.xamarin.com/discussion/43772/duplicate-code-in-executable]
The vast majority of what makes up the size are the executables (app and extension). We are building armv7+arm64 and linking all assemblies. I created a link map by adding --gcc_flags "-Wl,-map,${TargetDir}/link.map" and started exploring.

I discovered that some code appears to be copied in multiple object files, e.g. the object file for every assembly that references System.Array.Sort had a copy of System_Array_Sort_int_int__ and related methods for every type, in addition to the implementations in mscorlib.dll.

Possible duplicate of bug #29615
Comment 3 Rodrigo Kumpera 2017-02-07 21:34:21 UTC
That's the expected behavior.

We're aware of the issue and working on it, but bugzilla is no place for feature tracking.