Hi,
I am not working on my github account branch, I am working by downloading the
Apache NuttX codebase on my local PC.
I was thinking of checking it first on my local PC, and then merging it on
github.
I have also observed the following, related to the issue observed :
1. I also observed in the apps/examples/elf/tests/mksymtab.sh, it is
mentioned that
"If the toolchain does any kind of checking for function vs. data objects, then
this could fail"
2. As per my understanding, it is possible that since in symtab.c, file
all symbols are generated with "_(underscore)", eg: _fflush, _fopen, etc., but
since the functions, _fflush, _fopen are not defined(Only fflush, fopen, etc
are defined and not _fflush, _fopen), the undefined reference error is coming.
3. Also, In NuttX 8.2 version of code, just to confirm the cause of the
issue, I was trying to edit the symtab.c(I understand that it is not right to
edit symtab.c, but just to check the cause of the issue), and I replaced
_fflush to fflush, and the error of undefined reference was not coming.
So, I think, the issue of undefined reference is coming because _fflush, _fopen
are actully not defined, only fopen, fflush is defined.
So, I think when the compiler tries to map the symbols generated in symtab.c,
are looked for
Regards,
Anjana
________________________________
From: Ishikawa, Masayuki (SHES) <[email protected]>
Sent: 18 June 2020 12:01
To: [email protected] <[email protected]>
Subject: Re: ELF Application Example(apps/examples/elf) undefined references
issue in symtab.c
________________________________
**This is an external email. Please check the sender’s full email address (not
just the sender name) and exercise caution before you respond or click any
embedded link/attachment.**
________________________________
Hi,
Can you tell us your github account and the branch in which you are
currently having trouble so that we can reproduce the errors?
Masayuki
________________________________
From: Anjana <[email protected]>
Sent: Thursday, June 18, 2020 15:23
To: [email protected] <[email protected]>
Subject: Re: ELF Application Example(apps/examples/elf) undefined references
issue in symtab.c
Yes, I have added CELFFLAGS, CELFFLAGS, LDELFFLAGS in Make.defs file
________________________________
From: Ishikawa, Masayuki (SHES) <[email protected]>
Sent: 18 June 2020 11:33
To: [email protected] <[email protected]>
Subject: Re: ELF Application Example(apps/examples/elf) undefined references
issue in symtab.c
________________________________
**This is an external email. Please check the sender’s full email address (not
just the sender name) and exercise caution before you respond or click any
embedded link/attachment.**
________________________________
Hi Anjana,
Did you add some flags (i.e. CELFFLAGS, CXXELFFLAGS and LDELFFLAGS) to
scripts/Make.defs?
The flags are needed to build elf modules.
Regards,
Masayuki
________________________________
差出人: Anjana <[email protected]>
送信日時: 2020年6月18日 14:38
宛先: [email protected] <[email protected]>
件名: ELF Application Example(apps/examples/elf) undefined references issue in
symtab.c
Hello Team,
I have added ELF Binary Loader support for RX65N target.
I am currently testing my implementation using the apps/examples/elf/ example .
When I enable the apps/examples/elf/ example application, and compile, I am
getting the below error in symtab.c (Symbol Table)
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x14):
undefined reference to `_fflush'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x1c):
undefined reference to `_fopen'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x24):
undefined reference to `_fprintf'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x2c):
undefined reference to `_getpid'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x34):
undefined reference to `_kill'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x3c):
undefined reference to `_longjmp'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x44):
undefined reference to `_memset'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x4c):
undefined reference to `_nxsched_get_streams'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x54):
undefined reference to `_printf'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x5c):
undefined reference to `_pthread_attr_init'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x64):
undefined reference to `_pthread_create'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x6c):
undefined reference to `_pthread_exit'
C:\cygwin64\home\USER\PR_To_Apache\Binary_Loader\incubator-nuttx\staging\libapps.a(symtab.home.USER.PR_To_Apache.Binary_Loader.incubator-nuttx-apps.examples.elf.o):(.rodata.g_elf_exports+0x74):
undefined reference to `_pthread_join'
.....
.....
The above error is obtained for all the symbols generated in symtab.c from
mksymtab.sh.
Has anyone faced any similar issue?
Any help to resolve the issue would be really helpful.
Regards,
Anjana
________________________________
Disclaimer: This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient of this message , or if this
message has been addressed to you in error, please immediately alert the sender
by reply email and then delete this message and any attachments. If you are not
the intended recipient, you are hereby notified that any use, dissemination,
copying, or storage of this message or its attachments is strictly prohibited.
Email transmission cannot be guaranteed to be secure or error-free, as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender, therefore, does not accept
liability for any errors, omissions or contaminations in the contents of this
message which might have occurred as a result of email transmission. If
verification is required, please request for a hard-copy version.
________________________________