-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
preliminary Linux ARM support #6249
Conversation
Here is a LLVM patch for segmented stacks |
CFG_LDPATH_arm-unknown-linux-gnueabihf := | ||
CFG_RUN_arm-unknown-linux-gnueabihf= | ||
CFG_RUN_TARG_arm-unknown-linux-gnueabihf= | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also add RUSTC_FLAGS_arm-unknown-linux-gnueabihf :=--linker $(CC_arm-unknown-linux-gnueabihf)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Great!! but I'm not sure if it's safe to use 1'st TLS slot to store stack limit. |
CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-gnueabihf := -shared -fPIC -g | ||
CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list= | ||
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-whole-archive | ||
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-no-whole-archive -Wl,-znoexecstack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think noexecstack
is needed now that the assembly objects are marked as having non-executable stacks.
@ILyoan @crabtw Currently and in this patch, the TLS base address is loaded via the system control coprocessor with |
@ILyoan It's actually not a TLS slot. It's a private field of TCB. I am not sure if it is safe to use it.
|
I removed |
@luqmana Loading from magic address is fine for me. |
I opened #6367 to batch up and merge our pending LLVM patches. |
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.