Native simulator build fails with __x86.get_pc_thunk.bx linker errors after adding math library #97999
Replies: 2 comments
-
| @surfskidude how are you linking the math library? Issue converted into a discussion as it seems more appropriate | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| Yes I linked with | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
A previously working Zephyr build started failing after I introduced floating-point arithmetic and linked the math library. The issue occurs when compiling for the native simulator (native_sim).
Environment
Description
After adding floating-point operations and linking the math library (-lm), the build fails with multiple linker errors for the symbol __x86.get_pc_thunk.bx.
Regression
Steps to reproduce
Expected Behavior
The project should compile and link successfully.
Actual Behavior
The build fails with multiple linker errors:
__x86.get_pc_thunk.bx' referenced in section
.text' of /home/wini/xedgews/build/zephyr/NSI/home/wini/xedgews/build/zephyr/zephyr.elf.loc_cpusw.o: defined in discarded section.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of /home/wini/xedgews/build/zephyr/NSI/home/wini/xedgews/build/zephyr/zephyr.elf.loc_cpusw.oAdditional Attempts
Relevant log output
Impact
Major – Severely degrades functionality; workaround is difficult or unavailable.
Environment
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions