Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _init and _fini exports from NAOT and update android docs #100755

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/coreclr/nativeaot/docs/android-bionic.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ For an example of a Native AOT shared library invoked through JNI from Java see

## Known issues

If you hit `error : version script assignment of 'V1.0' to symbol '_init' failed: symbol not defined` - this is a known issue https://github.com/dotnet/runtime/issues/92272, you can add following lines to your csproj to work around:
If you hit `error : version script assignment of 'V1.0' to symbol '_init' failed: symbol not defined` - this is a known issue with .NET 8 release https://github.com/dotnet/runtime/issues/92272, you can add following lines to your csproj to work around:

```xml
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-bionic'">
<LinkerArg Include="-Wl,--defsym,_init=__libc_init" />
<LinkerArg Include="-Wl,--defsym,_fini=__libc_fini" />
<ItemGroup Condition="$(RuntimeIdentifier.StartsWith('linux-bionic'))">
<LinkerArg Include="-Wl,--undefined-version" />
</ItemGroup>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void EmitExportedMethods()
else
{
streamWriter.WriteLine("V1.0 {");
streamWriter.WriteLine(" global: _init; _fini;");
streamWriter.WriteLine(" global:");
foreach (string symbol in _exportSymbols)
streamWriter.WriteLine($" {symbol};");
foreach (var method in _methods)
Expand Down
Loading