-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
[RISCV] Add zero-page relaxation #687
Conversation
Generally looking good, but unlike |
Signed-off-by: Yang Liu <[email protected]>
Thanks, the newly pushed code handles section fragments. |
Also, the LUI -> C.LUI relaxation seems too restrictive and I don't know under what circumstances it would be triggered. For example, how do we write tests for this relaxation? |
I believe you can place a function in its own section using I don't think LUI → C.LUI is useful on Unix, but it might be in embedded programming. |
Thanks, I added a c.lui test, but it segfaulted under riscv64, but I believe it's unrelated to this patch. |
Maybe the first few pages are kept unmapped to catch null pointer accesses? There might be no way to test this on Unix. If you wrote a bootloader-ish program, you could test it, but I doubt if it's necessary. I wouldn't implement LUI → C.LUI relaxation in the first place as it doesn't seem useful. |
I created a separate bug #688. |
Agreed, I realized this after implementing, maybe I just remove this relaxation then. |
Signed-off-by: Yang Liu <[email protected]>
@rui314 Thanks for the help, I think now it's ready for review. |
Currently, this patch fails at tests with -static option and needs more work to do before merging.
Also, seems TLS relaxation(#461) is already supported. We only have global-pointer relaxation(#460) left to do for RISC-V.