This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Relocatable object files (*.O) naming rules?

I have a project that compiles and links correct.  It uses a scatter file to place "info.o" (RO) in a specific region of memory.

Then I made a copy of that project, re-organized some of the project files, and re-compiled.  All the source files, headers, scatter file, etc are the same.  I got Linker warnings because "no section matches pattern info.o" (meaning there was not an info.o object to place in the section of memory reserved by the scatter file).  Looking into the files created, I see that info_1.o was created instead of info.o.  So my scatter file failed because the compiler created a differently named object file in my re-organized project...

How are the object file names determined and how can I avoid this issue?  Why would info_1.o be created when there is not a info.o?  I don't want to have to re-write my scatter file every time I make a change to the project because the object file names are shifting around. This is particularly true because I want to use the same scatter file for many projects that share the same core structure.

Scanning through my object files, it seems like in my original project maybe 2% of my files got a _1 appended.  In my re-organized projects maybe 40% got a _1 appended.