mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

.a libs not stripped #155

Closed kpp closed 4 years ago

kpp commented 4 years ago

Whereas .so are stripped.

kpp commented 4 years ago

strip is called with --strip-unneeded. I was wrong. BTW is it enough to strip out source code?

kornelski commented 4 years ago

I don't think stripping of .a is even possible. .a is just a collection of unlinked object files .o, and if you strip their symbols, you won't be able to link them any more. Object files and static libraries may include LLVM bitcode (for thinlto) and some form of source code for generic and inline functions.

Source code is never included the executables (.so and exe). Debug information contains only locations in code (like line/column), not the code.

Independent of debug info, Rust also includes a bit of information about types and source code locations in panic messages.