kandi X-RAY | neon_test Summary
kandi X-RAY | neon_test Summary
neon_test
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of neon_test
neon_test Key Features
neon_test Examples and Code Snippets
Community Discussions
Trending Discussions on neon_test
QUESTION
I'm wondering how GCC configured using --with-mode=thumb
handles compiling/assembling code that makes use of ARM mode sections if the -marm
flag is not specified. That is:
- GCC is compiled with
--with-mode=thumb
- A program is compiled without
-marm
(defaults to thumb mode) - An assembly section of that program uses ARM mode
I tried compiling a small test program on Raspberry Pi 4 with Ubuntu 18.04.4 kernel 5.3.0-1018-raspi2 and noticed that the .arm
section is being executed in 16-bit thumb instruction mode which prompted me to investigate this. This naturally causes a segmentation fault as the program counter is increment by 2 bytes instead of 4.
Here's what gdb in layout asm
mode says when my program branches into the .arm assembly code and after I perform a single stepi
command:
ANSWER
Answered 2020-Mar-10 at 13:57The linker should take care of that automatically. If you objdump -dr
the object file, you should see a bl
with an R_ARM_THM_CALL
relocation, such as:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install neon_test
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page