OpenSSL Static Library too big, any alternative or way to reduce its size?

前端 未结 3 1641
臣服心动
臣服心动 2021-01-03 01:09

I have used pre-build static libs of OpenSSL 1.0, but it makes my binary too big, (increase its size by about 800Kb in release mode).

I do not need most of the featu

3条回答
  •  忘掉有多难
    2021-01-03 01:48

    You can try compiling it yourself with --ffunction-sections and --fdata-sections, which tells gcc to put each function and global data variable in a separate section inside the object.

    (When using static libraries, the linker copies the entire object which contains the needed function from the archive to the application.)

提交回复
热议问题