Preventing objects from being linked if they are not needed?

Posted by Massif on Stack Overflow See other posts from Stack Overflow or by Massif
Published on 2010-03-23T19:20:30Z Indexed on 2010/03/23 19:23 UTC
Read the original article Hit count: 179

Filed under:
|
|
|
|

I have an ARM project that I'm building with make. I'm creating the list of object files to link based on the names of all of the .c and .cpp files in my source directory. However, I would like to exclude objects from being linked if they are never used. Will the linker exclude these objects from the .elf file automatically even if I include them in the list of objects to link? If not, is there a way to generate a list of only the objects that need to be linked?

© Stack Overflow or respective owner

Related posts about arm

Related posts about c++