Take the following two test files:
@ end of test1.s
@ end of test2.s
Build as follows:
arm-none-eabi-as test1.s -o test1.o
arm-none-eabi-as test2.s -o test2.o
arm-none-eabi-objcopy -R '.ARM.attributes' test1.o test1.stripped.o
arm-non-ld test1.stripped.o test2.o -o test.axf
.../arm-none-eabi-ld: error: test2.o: Conflicting CPU architectures 0/11
The ABI is silent on the behaviour expected in this case but to ensure backwards
compatibility we should allow such objects to link together.
The basic issue seems to be that we are treating an object with no
.ARM.attributes section as one where all the attributes take their default value
(0 or "") and not one which has all the attributes set to undefined (as if a
TAG_nodefaults attribute was present), and hence compatible with all other objects.