Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
John Hodge
rust_os
Commits
7cf854e5
Commit
7cf854e5
authored
Aug 11, 2019
by
John Hodge
Browse files
Usermode loader - Fix link error with over-sized value
parent
08b6946a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Usermode/loader/bin/src/interface.rs
View file @
7cf854e5
...
...
@@ -26,8 +26,7 @@ impl_from! {
pub
extern
"C"
fn
new_process
(
executable_handle
:
::
syscalls
::
vfs
::
File
,
process_name
:
&
[
u8
],
args
:
&
[
&
[
u8
]])
->
Result
<
::
syscalls
::
threads
::
ProtoProcess
,
loader
::
Error
>
{
extern
"C"
{
static
BASE
:
[
u8
;
0
];
static
LIMIT
:
[
u8
;
0
];
static
limit_and_base
:
(
u64
,
u64
);
}
kernel_log!
(
"new_process({:?}, ...)"
,
::
std
::
ffi
::
OsStr
::
new
(
process_name
));
...
...
@@ -62,7 +61,7 @@ pub extern "C" fn new_process(executable_handle: ::syscalls::vfs::File, process_
// Spawn new process
// SAFE: Just takes the address of the externs statics
match
::
syscalls
::
threads
::
start_process
(
name
,
unsafe
{
BASE
.as_ptr
()
as
usize
},
unsafe
{
LIMIT
.as_ptr
()
as
usize
})
match
::
syscalls
::
threads
::
start_process
(
name
,
unsafe
{
limit_and_base
.0
as
usize
},
unsafe
{
limit_and_base
.1
as
usize
})
{
Ok
(
v
)
=>
v
,
Err
(
e
)
=>
panic!
(
"TODO: new_process - Error '{:?}'"
,
e
),
...
...
Usermode/loader/bin/start.S
View file @
7cf854e5
...
...
@@ -199,6 +199,11 @@ GLOBAL(image_header)
.
long
init_path_end
-
init_path
DEFPTR
start
.
section
.
data
GLOBAL
(
limit_and_base
)
.
quad
BASE
.
quad
LIMIT
.
section
.
bss
.
space
0x1000
/*
Guard
page
*/
GLOBAL
(
init_stack_base
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment