Skip to content

Commit

Permalink
Remove _init and _fini exports from NAOT and update android docs (#10…
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Apr 10, 2024
1 parent 91d3051 commit f7f67bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit f7f67bb

Please sign in to comment.