-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zcmt relaxation of single *.S-source bare metal code #88
Comments
Hi @silabs-hfegran , I met similar issues with you, hope there will some way to not enable table jump for certain code such as
Maybe @pz9115 @linsinan1995 can help with this issue. Thanks |
Hi, @fanghuaqi
Not sure if this works or not. IIRC, the current relaxation phrase treat symbols from different object files equally, so this won't work unless we record the arch info of each object file and skip relaxing symbols from object files without zcmt arch option.
I could imagine this option will be useful in some other scenarios, and better to have it. CC @pz9115 |
Thanks @linsinan1995 , option 1 is not working, I have tried it, currently didn't find a good way to achive it. |
There are cases where compilation of a single, bare-metal .S-file with the zcmt-flag march-flag enabled causes the linker to replace jumps inside the assembly with table jump instructions - this creates several issues and does not really make sense to me:
Technically, this can be avoided with
-mno-relax
-flag to the linker, but I would not expect this to be necessary, as that also leads to an impact of potentially blocking other relaxations.That leads me to the question of what kind of scenario with tablejump-relaxation of a manually crafted assembly file would actually be useful?
I do not currently have an example on hand to reproduce this, but I will try to add that here as soon as possible. Posting this now to raise awareness of this issue.
The text was updated successfully, but these errors were encountered: