This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can LD give warnings about the non-static functions defined but never used explicitly?


Hi Pan,

Still one more question. I rebuilt all my projects with
-ffunction-sections and got a lot of `multiple definition' errors. The
reason for these errors is that some common variables are defined in
header files in the project.

This is bad programming practice and you would be well advised to fix your header files. The alternative however is to compile with the -fno-common gcc command line switch.


BTW, I use '-Map` to print the linking map to a map file. But I don't
find any information about data or functions removed by LD.

No, that information is generated by the --print-gc-sections linker command line switch.


Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]