[arm-gnu] 2007q3 link error: undefined reference to '_sbrk' etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[arm-gnu] 2007q3 link error: undefined reference to '_sbrk' etc.



Hi,
    When using 2007q3 on linux, some error message display:

arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-sysgetpid.o): In function `getpid':
sysgetpid.c:(.text+0x4): undefined reference to `_getpid'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-times.o): In function `_times_r':
times.c:(.text+0x8): undefined reference to `_times'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0x20): undefined reference to `_write'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0x18): undefined reference to `_close'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text+0x20): undefined reference to `_lseek'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x20): undefined reference to `_read'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-makebuf.o): In function `__smakebuf':
makebuf.c:(.text+0xf8): undefined reference to `isatty'
arm-2007q3/arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text+0x1c): undefined reference to `_fstat'
collect2: ld returned 1 exit statusI have already refered to the https://support.codesourcery.com/GNUToolchain/kbentry57.I have created a new link script: % arm-none-eabi-ld --verbose > def.lnk and remove the SERACH_DIR.After this, I compiled a file:% arm-none-eabi-gcc -T def.lnk -o hello hello.cbut the same error happen.What I should do? Could you tell me.Davis***********************************
YuHua TelTech (ShangHai) Co., Ltd
Tel:  +86-21-51156088 Ext:2753
Fax:  +86-21-51156099
http:// www.yuhuatel.com
***********************************
The information contained in this e-mail message (and any attachment
transmitted herewith) is privileged and confidential and is intended for the
exclusive use of the addressee(s). If you are not an addressee, any
disclosure, reproduction, distribution or other dissemination or use of thithis
communication in error, please contact us immediately so that we can correct
the error.


Confidentiality Notice:
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent those of YuHua TelTech and its affiliates. YuHua TelTech is not responsible for any liability or damaged caused by viruses transmitted with this e-mail or its attachments. If this e-mail is not originally intended for you, or received by you in error, do not disclose,duplicate,distribute,or use its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential,or exempt from disclosure. 
本邮件所包含之观点及内容,完全是邮件作者独立意见,不代表禹华通信及其分支机构之立场。禹华通信将不对本邮件有可能包含的病毒所引起的损害承担责任。若您并非收件人或错收本邮件,请勿披露、复制、散布或使用本邮件中的任何信息,并请即刻予以删除。本邮件所包含之内容完全是受法律保护的保密信息,应免予被披露。