runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Strip symbols for x-plat assemblies and publish as NuPkgs

Open schellap opened this issue 10 years ago • 9 comments

Steps to reproduce

objdump -t libhostpolicy.so

Expected behavior

Similar to coreclr, objdump -t libcoreclr.so and a separate file for the symbol information.

This separate file needs to be archived in symbol nupkgs like Windows .pdbs

Actual behavior

objdump -t libhostpolicy.so contains the full symbol table.

Environment data

dotnet --info output: Microsoft.NETCore.App 1.0.0

Note

libhostpolicy.so is the highest sized binary, if you strip symbols you get 1.1 MB down to 0.78 MB

schellap avatar Jun 17 '16 21:06 schellap

This is not blocking release and is best done once we have moved our build/packaging system to build tools, to prevent non-trivial amount of throwaway work.

gkhanna79 avatar Feb 17 '17 01:02 gkhanna79

@AlfredoMS Can you PTAL at this as part of your transition to use build tools? Essentially, we need to generate symbol packages for the host binaries.

gkhanna79 avatar Feb 20 '17 03:02 gkhanna79

The CMake parts of enabling symbol stripping are CMakeLists.txt#L139-L230. The STRIP_SYMBOLS arg is passed in by build-native.sh#L216.

After that, to start putting the stripped symbols into symbol packages, I suggest a file like src/Native/pkg/dir.targets. (For some context, https://github.com/dotnet/coreclr/pull/9664 might be useful.)

@AlfredoMS Let me know when you're getting to a point when you can work on this and let's talk in more depth.

dagood avatar Feb 22 '17 20:02 dagood

@dagood is this still on track for 5/10 ZBB? /cc @markwilkie @dleeapho

danmoseley avatar Apr 28 '17 16:04 danmoseley

@gkhanna79 Is this needed for 2.0.0? I haven't had it on my radar.

I think it would be most efficient if someone working on the BuildTools Core-Setup effort picked it up, especially if they are familiar with packaging in the new world.

dagood avatar Apr 28 '17 18:04 dagood

@chcosta Can you help look into this?

gkhanna79 avatar May 04 '17 15:05 gkhanna79

Ack

chcosta avatar May 04 '17 23:05 chcosta

@dagood, is the native part of this something you have context on? Specifically, related to core-setup.

chcosta avatar May 10 '17 05:05 chcosta

Adding symbol stripping to a CMake project is something I've done before, and I generally see the files I expect in https://github.com/dotnet/core-setup/tree/master/src/corehost. I don't have any context specific to Core-Setup other than what's in this issue description, though.

dagood avatar May 10 '17 15:05 dagood