Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

export function in generated lib #7045

Closed
szhaomsft opened this issue Feb 18, 2019 · 3 comments
Closed

export function in generated lib #7045

szhaomsft opened this issue Feb 18, 2019 · 3 comments

Comments

@szhaomsft
Copy link

I saw a lot of function of dotnet are exported in static libs

is this by design?

upFromDict_System_Linq_Expressions_System_Linq_Expressions_Expression__Lambda_4<System___Canon>_TypeHandle_System_Linq_Expressions_System_Linq_Expressions_Expression_1<TDelegate_System___Canon>
2BB2858 __GenericLookupFromDict_System_Linq_Expressions_System_Linq_Expressions_Expression__Lambda_4<System___Canon>_TypeHandle_TDelegate_System___Canon
2BB2858 __GenericLookupFromDict_System_Linq_Expressions_System_Linq_Expressions_Interpreter_InstructionList__EmitIntSwitch<System___Canon>_TypeHandle_System_Linq_Expressions_System_Linq_Expressions_Interpreter_IntSwitchInstruction_1<T_System___Canon>
2BB2858 __GenericLookupFromDict_System_Linq_Expressions_System_Linq_Expressions_Interpreter_LabelInfo__CommonNode<System___Canon>_TypeHandle_S_P_CoreLib_System_Collections_Generic_EqualityComparer_1<T_System___Canon>
2BB2858 __GenericLookupFromDict_System_Linq_Expressions_System_Linq_Expressions_Interpreter_LabelInfo__CommonNode<System___Canon>_TypeHandle_System_Collections_System_Collections_Generic_HashSet_1<T_System___Canon>
2BB2858 __GenericLookupFromDict_System_Linq_Expressions_System_Linq_Expressions_Interpreter_LightCompiler_QuoteVisitor__VisitLambda<System___Canon>_MethodDictionary_System_Linq_Express

@jkotas jkotas changed the title export function in genearated lib export function in generated lib Feb 18, 2019
@jkotas
Copy link
Member

jkotas commented Feb 18, 2019

We export these methods because of it was an easy thing to do, and it allowed us to experiment with splitting the compilation into multiple units.

I agree that it would be nice to have an option to keep these methods private if the library is compiled as a single native module file.

@hc4
Copy link
Contributor

hc4 commented Apr 10, 2019

As a workaround you could create version script manually and pass it to linker useing CustomLinkerArg option in .csproj

  <ItemGroup>
    <CustomLinkerArg Include="-Wl,--version-script=$(ProjectDir)exports.map" />
  </ItemGroup>

Actulay version-script generation was added in PR #5154, but now there is no such logic

@jkotas
Copy link
Member

jkotas commented Apr 23, 2019

Majority of the exports listed above are gone now thanks to recent objectwriter changes. Let's use #7340 to continue the discussion on this.

@jkotas jkotas closed this as completed Apr 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants