I think I see what you're asking, I am not very experienced but I will tell you what we have done that works well in our product;
We write & compile a bootloader as a .bin executable, this lives in the bottom of the flash memory. Then in our main project we include the bootloader.bin file in a reserved section of the .lcf
That gets around several problems;
1) The bootloader is always exactly the same (if you just include the same source code it will compile differently and cause problems like different checksums etc.)
2) The binary executable gets written directly to the correct place by the BDM pod
3) The main project is built "around" the bootloader.bin at compile time, so it's not being relocated or over-written etc. by the bootloader.
4) The main project has no visibility of what's inside the bootloader.bin, but you can start & run either from 0x0000 or from main() with the BDM debug and step through.
If you search back through some of my posts you'll find examples of how to make this work.