I am doing a project that includes writing a makefile. Here I have 2 different makefiles. The first one does the initial build step. In the second makefile I am trying to use the initially generated object files (paths provided) and add one more additional object file generated else where. The problem I am facing here is that the linker is unable to link this new object file to the older ones.
I am using this command to do this step.
arm-none-eabi-g++ -T ../linker.ld -nostartfiles -Xlinker --gc-sections -Wl,-Map,"map_file.map" -specs=nano.specs -o "target.elf" new_file.o all_older_files.o
Here the new_file.o is of arm_eabi version 0 and all_older_files.o is arm_eabi version 5. However, this is not giving me any error or warning. And, interesting thing is that, some of the symbols in the new_file.o are being included in the target.elf file. I have checked and checked the linker script but unable to find a solution and also, check if the eabi version is making some difference, but it is the same if I manually edit the elf file using an elf editor.
All I want is that I need to include the sections in the new_file.o in this target.elf so that I can make use of these.