Hi Jian,

Excuse me,I don't know how to remove unused functions and variable when linking ELF.

Compile your program with --function-sections. Link your program with -Wl,--gc-sections.

Note: This feature is not implemented for all targets. If it does not work for you then it may be that the target you are working with is one of the unsupported targets.

Cheers
  Nick


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to