u-root icon indicating copy to clipboard operation
u-root copied to clipboard

Remove pclntab

Open xaionaro opened this issue 4 years ago • 3 comments

This is a spin-off of discussion: https://github.com/u-root/u-root/issues/1477

It was investigated that the pclntab might take 10-40% of the binary size. And I proposed in https://github.com/golang/go/issues/36555 to add an option to strip the pclntab off for "embedded use cases" (since debugging information is not as enough as small binary size). It seems they did not like the idea (because the use case is too narrow), however there exists a derivative golang project "embeddedgo", which implemented this option.

I'm wondering if it makes sense to try that out? Or we want to use the upstream version of the compiler no matter what? :)

xaionaro avatar Dec 14 '20 11:12 xaionaro

I think this is worth considering. 10-40% is really big.

This wouldn't really affect u-root right? The version of Go used is whichever the user has in their $PATH. Users who don't care will just use the upstream compiler. Users that do care can build their own.

Could it be apart of the docker image https://github.com/u-root/u-root/tree/master/tools/golang_patched_dce ?

rjoleary avatar May 27 '21 07:05 rjoleary

Go 1.16 and 1.17 have actually made a few binary size improvements. We should re-measure and shelve for a lil while?

On Thu, May 27, 2021, 09:06 rjoleary @.***> wrote:

I think this is worth considering. 10-40% is really big.

This wouldn't really affect u-root right? The version of Go used is whichever the user has in their $PATH. Users who don't care will just use the upstream compiler. Users that do care can build their own.

Could it be apart of the docker image https://github.com/u-root/u-root/tree/master/tools/golang_patched_dce ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/u-root/u-root/issues/1886#issuecomment-849388562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPG3ETTONFUNNAMC3R4RI3TPXVP5ANCNFSM4U2UE43Q .

hugelgupf avatar May 27 '21 14:05 hugelgupf

Go 1.16 and 1.17 have actually made a few binary size improvements.

In the discussion about pclntab they only were going to compress it. But we compress u-root in initrd anyway, so it should not help us much.

Could it be apart of the docker image https://github.com/u-root/u-root/tree/master/tools/golang_patched_dce ?

Uh, nice idea.

xaionaro avatar May 31 '21 11:05 xaionaro