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

Plans for x86 arch support? #49

Open
ithamsteri opened this issue Feb 21, 2020 · 3 comments
Open

Plans for x86 arch support? #49

ithamsteri opened this issue Feb 21, 2020 · 3 comments

Comments

@ithamsteri
Copy link

Hi,

Can I use ply for i586 architecture? When I try to compile ply I see the follow error:

| make  all-recursive
| make[1]: Entering directory `/local/workspace/ply/2.1.0-r2'
| Making all in include
| make[2]: Entering directory `/local/workspace/ply/2.1.0-r2/include'
| make[2]: Nothing to be done for `all'.
| make[2]: Leaving directory `/local/workspace/ply/2.1.0-r2/include'
| Making all in src
| make[2]: Entering directory `/local/workspace/ply/2.1.0-r2/src'
| Making all in libply
| make[3]: Entering directory `/local/workspace/ply/2.1.0-r2/src/libply'
| make  all-am
| make[4]: Entering directory `/local/workspace/ply/2.1.0-r2/src/libply'
| make[4]: *** No rule to make target `arch/i586.c', needed by `arch/libply_la-i586.lo'.  Stop.
| make[4]: Leaving directory `/local/workspace/ply/2.1.0-r2/src/libply'
| make[3]: *** [all] Error 2
| make[3]: Leaving directory `/local/workspace/ply/2.1.0-r2/src/libply'
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/local/workspace/ply/2.1.0-r2/src'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/local/workspace/ply/2.1.0-r2'
| make: *** [all] Error 2
| autoreconf: make failed with exit status: 2
@wkz
Copy link
Collaborator

wkz commented Feb 23, 2020

Short answer: No

That said, if you want to add support for it, it would probably be quite easy. All you need to do is to create the missing file (probably starting from x86_64.c) and modify the definitions to match the x86 ABI.

@ithamsteri
Copy link
Author

Thanks for the answer.

At first glance it seems that adding support for x86 is not difficult. I have difficulty passing arguments, as x86 passes arguments not through registers, but through the stack (the arch_register_argument function). In this case, the function should always return NULL for x86?

@wkz
Copy link
Collaborator

wkz commented Feb 23, 2020

Ouch! Well in that case it is actually a bit more work.

The some of the code in kprobe_arg_rewrite will have to be moved to the arch-specific code. Then the x86 variant can generate the code that will fish out the arguments from the stack.

jsmolic pushed a commit to sartura/gentoo that referenced this issue Jul 27, 2020
x86 is curently not suported. For more information see iovisor/ply#49

Closes: https://bugs.gentoo.org/733318
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jakov Smolic <[email protected]>
jsmolic pushed a commit to sartura/gentoo that referenced this issue Jul 27, 2020
x86 is currently not suported. For more information see iovisor/ply#49

Closes: https://bugs.gentoo.org/733318
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jakov Smolic <[email protected]>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jul 27, 2020
x86 is currently not suported. For more information see iovisor/ply#49

Closes: https://bugs.gentoo.org/733318
Closes: #16852
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jakov Smolic <[email protected]>
Signed-off-by: Zac Medico <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants