Why is statically linking glibc discouraged?

前端 未结 3 1436
终归单人心
终归单人心 2020-12-15 15:21

Most of the sources online state that you can statically link glibc, but discourage from doing so; e.g. centos package repo:

The glibc-static package contain         


        
3条回答
  •  温柔的废话
    2020-12-15 15:47

    Bug fixes in glibc aren't included in a statically linked application when you upgrade glibc unless you rebuild the application.

    Also, NSS (Name Service Switch) doesn't work unless you use dynamic linking.

提交回复
热议问题