Skip to content

Commit e15ccf6

Browse files
committed
Some must-have flags
1 parent 3960c76 commit e15ccf6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Xamarin.Android.Build.Tasks/Utilities/NativeLinker.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ class NativeLinker
2525
"-z relro",
2626
"-z noexecstack",
2727
"-z max-page-size=16384",
28+
"-z now", // we need it for security reasons (without it PLT can be overwritten)
2829
"--enable-new-dtags",
2930
"--build-id=sha1",
3031
"--warn-shared-textrel",
3132
"--fatal-warnings",
32-
"--no-rosegment"
33+
"--no-rosegment",
34+
"--eh-frame-hdr", // CoreCLR needs it
3335
};
3436

3537
readonly List<string> extraArgs = new ();

src/Xamarin.Android.Build.Tasks/Utilities/NativeRuntimeComponents.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ public NativeRuntimeComponents (ITaskItem[] monoComponents)
9696
new ClrArchive ("libcoreclr.a"),
9797
new ClrArchive ("libcoreclrminipal.a"),
9898
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*/),
100103
new ClrArchive ("libeventprovider.a"),
101104
new ClrArchive ("libnativeresourcestring.a"),
102105
new ClrArchive ("libminipal.a"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy