xscale cross-compiler linking(?) error

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Tue May 1 20:18:00 GMT 2007


Chris,
All,

On Tuesday 01 May 2007 21:39, Chris Strydis wrote:
> i am trying to use a working XScale simulator which is based on a hacked 
> version of the ARM-SimpleScalar simulator.

Whenever I see something like 'with a hacked version of foo', I tend to be
cautious before telling which part is at fault.

> effectivelly, this means (and according to the simulator author) that i have 
> to install an arm cross-compiler to compile C source code on the arm 
> cross-compiler for the xscale simulator to execute.

Sure.

> the xscale simulator is also _successfully_ up and running.

What do you mean by /successfully/? Did you pass some kind of test suite?

> however, once i run a simple program like "helloworld.c" with any of the 
> above cross-gcc's, i get the following error:
> fatal: file is dynamically linked, compile with `-static'
> i should mention that compilation gives no errors or warnings whatsoever.

Do you mean the simulator gives you the warning? Or is it the cross-compiler?
If the cross-compiler doesn't, then I guess you have a problem with the
simulator.

> if i compile again including the '-static' flag, then i get the following 
> (expected) error:
> 
> warning: invalid/unimplemented syscall 221, PC=0x0000f53c, winging it
> warning: invalid/unimplemented syscall 221, PC=0x0000f53c, winging it
> warning: invalid/unimplemented syscall 221, PC=0x0000f53c, winging it
> warning: invalid/unimplemented syscall 37, PC=0x0000ff80, winging it
> warning: invalid/unimplemented syscall 201, PC=0x00015328, winging it
> warning: invalid/unimplemented syscall 200, PC=0x00015330, winging it
> warning: invalid/unimplemented syscall 202, PC=0x00015338, winging it
> fatal: syscall: open: cannot decode flags: 0x00020014

For ARM:
  syscall 37  => sys_kill
  syscall 200 => sys_getgid
  syscall 201 => sys_geteuid
  syscall 202 => sys_getegid
  syscall 221 => sys_fcntl64 / sys_oabi_fcntl64
Hopefully your simulator has those, or it is borked.

> i am at a loss as to what the problem is and have been been for quite some 
> days.
> i would appreciate your help and suggestions.

Wild guess: endianness is wrong? Most improbable, or it would not have gone
so far (PC=0x0000f53c)

> ========================================
> AR=
> BINUTILS_DIR=binutils-2.16.1
> BINUTILS_EXTRA_CONFIG=
> BUILD=i686-pc-linux-gnu
> BUILD_DIR=/home/christos/xtrem4/crosstool-0.43/build/arm-xscale-linux-gnu/gcc-4.1.0-glibc-2.3.2
> CC=
> DEJAGNU=
> EXTRA_TARGET_CFLAGS=
> GCC_BUILD=
> GCC_CORE_DIR=gcc-3.3.6

Don't use a different core gcc. 4.0.x (as below) is ok.

> GCC_DIR=gcc-4.1.0

I have had bad adventures with gcc-4.1.x. Try going back to 4.0.x (4.0.4 is
OK for me).

> GCC_EXTRA_CONFIG=--with-cpu=xscale --enable-cxx-flags=-mcpu=xscale
> GCC_HOST=
> GCC_LANGUAGES=c,c++
> GDB_DIR=gdb-6.5
> GLIBC_ADDON_OPTIONS==linuxthreads,
> GLIBC_DIR=glibc-2.3.2

Try a more recent glibc (2.3.6 for example). Don't use 2.4 or 2.5: they do
not have ARM support any longer.

> GLIBC_EXTRA_CC_ARGS=
> GLIBC_EXTRA_CONFIG= --with-tls --with-__thread --enable-kernel=2.4.18
> GLIBC_EXTRA_ENV=
> JUST_DOWNLOAD=
> KERNELCONFIG=/home/christos/xtrem4/crosstool-0.43/arm.config
> LINUX_DIR=linux-2.6.15.4
> LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0
> NO_DOWNLOAD=
> PREFIX=/home/christos/xtrem4/crosstool/gcc-4.1.0-glibc-2.3.2/arm-xscale-linux-gnu
> PTXDIST_DIR=
> SHARED_MODE=--enable-shared
> SRC_DIR=/home/christos/xtrem4/crosstool-0.43/build/arm-xscale-linux-gnu/gcc-4.1.0-glibc-2.3.2
> TARBALLS_DIR=/home/christos/xtrem4/downloads
> TARGET=arm-xscale-linux-gnu
> TARGET_CFLAGS=-O
> TOP_DIR=/home/christos/xtrem4/crosstool-0.43
> USE_SYSROOT=
> ========================================

Alternatively, you can try crosstool-ng, it has at least two working ARM
toolchains as samples: http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
°------------------------------°-------°------------------°--------------------°


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list