armv7-a elf file load / kernel build
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
hello, I find that in the **kernel build mode** for **armv7-a** arch, the apps **(elf file)** contains **R_ARM_THM_JUMP24** relocation sections, take the **nsh** file for example, and by default CONFIG_ARM_THUMB is false. so while loading elf file, the libs>libc>machine>arm>armv7-a>arch_elf.c>**up_relocate** function will report an error “ERROR: Unsupported relocation: ...”.
parts of the relocation section info of nsh are like this:
Relocation section '.rel.text' at offset 0xd3a7c contains 2895 entries:
Offset Info Type Sym.Value Sym. Name
00000014 0005ca1e **R_ARM_THM_JUMP24** 0000017d __aeabi_ldiv0
00000020 00056d0a R_ARM_THM_CALL 00000071 __udivmoddi4
000003d8 0006231e R_ARM_THM_JUMP24 0000017d __aeabi_idiv0
00000438 00001a2b R_ARM_MOVW_ABS_NC 000003f8 sig_trampoline
0000043c 00001a2c R_ARM_MOVT_ABS 000003f8 sig_trampoline
and the compiler option for nsh are like this:
CC: nsh_consolemain.c
**arm-none-eabi-gcc -c -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas -Wno-psabi -fno-common -pipe -fomit-frame-pointer -fno-common -Wall -Wshadow -Wundef -ffunction-sections -fdata-sections -g -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon-vfpv3 -mlittle-endian** -isystem /home/cloud/nuttx-12.4.0/apps/import/include -isystem /home/cloud/nuttx-12.4.0/apps/import/include -D__NuttX__ -DNDEBUG -I "/home/cloud/nuttx-12.4.0/apps/include" nsh_consolemain.c -o nsh_consolemain.c.home.cloud.nuttx-12.4.0.apps.nshlib.o
so the options like **-mthumb -mthumb-interwork** are not set.
but why there are some THUMB type relocaiton sections? who can help explan this, thanks very much.
[defconfig.txt](https://github.com/user-attachments/files/15844983/defconfig.txt)
Contributor guide
Assessment
This issue has not been assessed yet.