I'm have a bit of trouble building glibc 2.1.3 for arm-linux with the linux
threads and crypt packages using a gcc cross compiler hosted on a 586
machine. All goes well with the build until it tries to compile
sysdep/unix/syscall.S. using the command line 

/usr/local/arm-linux/bin/gcc  ../sysdeps/unix/syscall.S -c  -I../include -I.
-I.. -I../libio  -I../sysdeps/arm/elf -I../crypt/sysdeps/unix
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/arm -I../sysdeps/unix/sysv/linux/arm
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv
-I../sysdeps/unix/arm -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/arm/fpu -I../sysdeps/arm -I../sysdeps/wordsize-32
-I../sysdeps/ieee754 -I../sysdeps/libm-ieee754 -I../sysdeps/generic/elf
-I../sysdeps/generic  -nostdinc -isystem
/usr/local/lib/gcc-lib/arm-linux/2.95.2/include -isystem /usr/local/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h     -DASSEMBLER   -o
syscall.o 

The assembler issues an error :--

../sysdeps/unix/syscall.S: Assembler messages:
../sysdeps/unix/syscall.S:28: Error: Can not represent SWI relocation in
this object file format (0)

After preprocessing, syscall.S looks like this:-

.text;  .type __syscall_error ,%function;       
.globl      syscall     ;       
.type      syscall      ,%function ;    
.align  4  ;        
syscall:          ;             
        swi  __NR_syscall     ;      ;  
        cmn r0, $4096;          
        bhs   __syscall_error  (PLT) ;  
        mov       pc, r14   
        .size    syscall   ,.-   syscall      

The key line is the 'swi __NR_syscall'; replacing '__NR_syscall' with a
constant value removes the error so I assume that problem is using a symbol
to define the swi number. 


I'm using "gcc version 2.95.2 19991024 (release)" and I've tried both "GNU
assembler version 2.9.5 (arm-linux) using BFD version 2.9.5.0.22" and "GNU
assembler version 000510 (arm-linux) using BFD version 000510" and I believe
that the file format is ELF

Does anyone know how to get round this? You'll have to forgive me if I've
missed something obvious, I'm a bit of a newbie to linux / the gnu tools.

TIA
Clive


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++        Please use [EMAIL PROTECTED] for           ++
++                        kernel-related discussions.                      ++

Reply via email to