You are not logged in.

#1 2014-08-13 09:32:49

wtx
Member
Registered: 2014-06-09
Posts: 75

[Solved] Problems with linking arm objects

Hello,

Today I've tried to compile simple "helloworld" application for arm, but the linker couldn't resolve some symbols:

/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:70: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:58: undefined reference to `_sbrk'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:58: undefined reference to `_write'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:53: undefined reference to `_close'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek'
/usr/lib/gcc/arm-none-eabi/4.9.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
/build/arm-none-eabi-gcc/src/gcc-4.9.1/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/readr.c:58: undefined reference to `_read'
collect2: error: ld returned 1 exit status

I'm compiling it with such command:

arm-none-eabi-gcc ./main.c

Anyone knows what is wrong?

Last edited by wtx (2014-08-13 10:48:58)

Offline

#2 2014-08-13 09:40:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,241
Website

Re: [Solved] Problems with linking arm objects

Moving to Other Architectures...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#3 2014-08-13 10:48:30

wtx
Member
Registered: 2014-06-09
Posts: 75

Re: [Solved] Problems with linking arm objects

Offline

#4 2018-02-24 06:30:45

ferdna
Member
Registered: 2010-11-17
Posts: 2

Re: [Solved] Problems with linking arm objects

can you please post the answer. the site is down at the moment.
https://i.imgur.com/rBgfAH4.png

Last edited by jasonwryan (2018-02-24 06:42:59)

Offline

#5 2018-02-24 06:44:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,241
Website

Re: [Solved] Problems with linking arm objects

You don't necrobump a four year old thread because SO is down: https://wiki.archlinux.org/index.php/Co … bumping.22

And you don't post a giant ass screenshot while you are doing it: http://wiki.archlinux.org/index.php/Cod … s_and_code

Read the whole Code...


Closing


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB