SOLVED: Help with -march and -mcpu issues

Rick Mann rmann@latencyzero.com
Thu Aug 30 20:32:00 GMT 2007
I was starting to respond to your email, when all of a sudden it's  
building. I can now do this, with both -mcpu and -march set, and it  
works:

arm-elf-gcc -Wl,-Map,mapfile.txt -mcpu=xscale -march=armv5te - 
ffreestanding -nostdlib -std=c99 -Xlinker -e -Xlinker _start -Xlinker  
--script=link.lds -o h.elf obj/start.o obj/Util.o obj/lcd.o obj/ 
main.o -lgcc -lc -lm


Now this works. I don't know what else I changed. Hmm. Maybe it's  
because I left the arch flags off of the start.S build invocation. I  
was so thrown by the wording of the error message, that I didn't  
realize it meant one or more input files didn't match. Thank you for  
the help!

-- 
Rick




-------------




On Aug 30, 2007, at 12:38 PM, Daniel Jacobowitz wrote:

> LOAD obj/start.o
> LOAD obj/Util.o
> LOAD obj/lcd.o
> LOAD obj/main.o
>
> That means those objects are basically on your command line.

So, using readelf -h, I see that all four files have

   Flags:                             0x600, GNU EABI, software FP, VFP

Is that what I should be looking at? I see the VFP in there.


$ arm-elf-readelf -h obj/*.o

File: obj/Util.o
ELF Header:
   Magic:   7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
   Class:                             ELF32
   Data:                              2's complement, little endian
   Version:                           1 (current)
   OS/ABI:                            ARM
   ABI Version:                       0
   Type:                              REL (Relocatable file)
   Machine:                           ARM
   Version:                           0x1
   Entry point address:               0x0
   Start of program headers:          0 (bytes into file)
   Start of section headers:          708 (bytes into file)
   Flags:                             0x600, GNU EABI, software FP, VFP
   Size of this header:               52 (bytes)
   Size of program headers:           0 (bytes)
   Number of program headers:         0
   Size of section headers:           40 (bytes)
   Number of section headers:         10
   Section header string table index: 7

File: obj/lcd.o
ELF Header:
   Magic:   7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
   Class:                             ELF32
   Data:                              2's complement, little endian
   Version:                           1 (current)
   OS/ABI:                            ARM
   ABI Version:                       0
   Type:                              REL (Relocatable file)
   Machine:                           ARM
   Version:                           0x1
   Entry point address:               0x0
   Start of program headers:          0 (bytes into file)
   Start of section headers:          2528 (bytes into file)
   Flags:                             0x600, GNU EABI, software FP, VFP
   Size of this header:               52 (bytes)
   Size of program headers:           0 (bytes)
   Number of program headers:         0
   Size of section headers:           40 (bytes)
   Number of section headers:         9
   Section header string table index: 6

File: obj/main.o
ELF Header:
   Magic:   7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
   Class:                             ELF32
   Data:                              2's complement, little endian
   Version:                           1 (current)
   OS/ABI:                            ARM
   ABI Version:                       0
   Type:                              REL (Relocatable file)
   Machine:                           ARM
   Version:                           0x1
   Entry point address:               0x0
   Start of program headers:          0 (bytes into file)
   Start of section headers:          2848 (bytes into file)
   Flags:                             0x600, GNU EABI, software FP, VFP
   Size of this header:               52 (bytes)
   Size of program headers:           0 (bytes)
   Number of program headers:         0
   Size of section headers:           40 (bytes)
   Number of section headers:         10
   Section header string table index: 7

File: obj/start.o
ELF Header:
   Magic:   7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
   Class:                             ELF32
   Data:                              2's complement, little endian
   Version:                           1 (current)
   OS/ABI:                            ARM
   ABI Version:                       0
   Type:                              REL (Relocatable file)
   Machine:                           ARM
   Version:                           0x1
   Entry point address:               0x0
   Start of program headers:          0 (bytes into file)
   Start of section headers:          268 (bytes into file)
   Flags:                             0x600, GNU EABI, software FP, VFP
   Size of this header:               52 (bytes)
   Size of program headers:           0 (bytes)
   Number of program headers:         0
   Size of section headers:           40 (bytes)
   Number of section headers:         9
   Section header string table index: 6



More information about the Binutils mailing list