This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Rick Mann wrote:
$ arm-elf-gcc -c main.c -o main.o $ arm-elf-ld -e _start -o h.elf --script=link.lds start.o main.o $ arm-elf-objcopy --output-target=binary --gap-fill=0xff h.elf h
The resulting file "h" works very well.
However, if I add -mcpu=xscale or -march=armv5te to the gcc line, I get errors like this:
arm-elf-ld: ERROR: main.o uses VFP instructions, whereas h.elf does not
You should ask this on the binutils list. The linker is not provided by
nor part of gcc, and your question seems to be about the linker.
Where does start.o come from? Are you not also rebuilding it with the
given -march? I'm guessing that the reason you get the error is that
the linker sees two objects that were built with different -march
settings (or rather one with the default and another with something
else), and that's why it's complaining. But that's just speculation, I
don't actually know.
-- Rick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |