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?


> If you are using your own linker script, which is likely given that you have
> this special section, then you can use the KEEP linker script directive to
> ensure that this section is not removed when the linker performs its garbage
> collection.
>
> Cheers
>  Nick
>

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. Though linking with `-z muldefs' is one
solution, I don't think it is a good choice since this option may
ignore real `multiple definition' errors. So is there some other
solution by which least source code must to be fixed.

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.

Best Regards,
PRC
Nov 27, 2008


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