Skip to content
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

[feat] Support command line arguments for tasks #54

Open
hgruniaux opened this issue May 15, 2024 · 0 comments
Open

[feat] Support command line arguments for tasks #54

hgruniaux opened this issue May 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@hgruniaux
Copy link
Owner

Command line arguments should be passed in the stack of the created task.

| Stack                               |
| ----------------------------------- |
| Arg 0                               | <- start of the stack
| Arg 1                               |
| ...                                 |
| Arg n                               |
| The constant n                      |
| A pointer to the start of the stack |
| ...                                 | <- SP points here

Example of the _start function in glibc for aarch64:

ENTRY(_start)
	...

	/* Load argc and a pointer to argv */
	ldr	PTR_REG (1), [sp, #0]
	add	x2, sp, #PTR_SIZE

	/* Setup stack limit in argument register */
	mov	x6, sp

        ...
@hgruniaux hgruniaux self-assigned this May 15, 2024
@hgruniaux hgruniaux added the enhancement New feature or request label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant