File tree 2 files changed +7
-2
lines changed
src/Xamarin.Android.Build.Tasks/Utilities
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ class NativeLinker
25
25
"-z relro" ,
26
26
"-z noexecstack" ,
27
27
"-z max-page-size=16384" ,
28
+ "-z now" , // we need it for security reasons (without it PLT can be overwritten)
28
29
"--enable-new-dtags" ,
29
30
"--build-id=sha1" ,
30
31
"--warn-shared-textrel" ,
31
32
"--fatal-warnings" ,
32
- "--no-rosegment"
33
+ "--no-rosegment" ,
34
+ "--eh-frame-hdr" , // CoreCLR needs it
33
35
} ;
34
36
35
37
readonly List < string > extraArgs = new ( ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ public NativeRuntimeComponents (ITaskItem[] monoComponents)
96
96
new ClrArchive ( "libcoreclr.a" ) ,
97
97
new ClrArchive ( "libcoreclrminipal.a" ) ,
98
98
new ClrArchive ( "libgc_pal.a" ) ,
99
- new ClrArchive ( "libcoreclrpal.a" , wholeArchive : true ) ,
99
+
100
+ // CoreCLR links this archive whole, but it appears to work fine for us when linked in a normal way.
101
+ // Leave the flag commented, just in case we discover something not working right.
102
+ new ClrArchive ( "libcoreclrpal.a" /*, wholeArchive: true*/ ) ,
100
103
new ClrArchive ( "libeventprovider.a" ) ,
101
104
new ClrArchive ( "libnativeresourcestring.a" ) ,
102
105
new ClrArchive ( "libminipal.a" ) ,
You can’t perform that action at this time.
0 commit comments