Why can't run same binary on different OS2019 Community Moderator ElectionHow to mount a windows/samba windows share under Linux?Why do two Ubuntu systems in the same network behave differently in DNS resolution?Why does linux-based laptops have weak wifi signal in comparison to windows-based laptop?Lower cpu performance in LinuxWhy do files created via Samba get different ACL (mask) permissions depending on the client OS?In Linux I have different color for the same thing than in WindowsWhy is 64bit Ubuntu running Slower?Executing a program gives No such file or folder errorWhen user and group permissions are set identically why is functionality different?Identical SSH configuration failing
Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed
Loading commands from file
Drawing ramified coverings with tikz
Why does the Sun have different day lengths, but not the gas giants?
How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?
Freedom of speech and where it applies
Multiplicative persistence
I am looking for the correct translation of love for the phrase "in this sign love"
Delivering sarcasm
How can "mimic phobia" be cured or prevented?
Which one is correct as adjective “protruding” or “protruded”?
How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?
Travelling outside the UK without a passport
Why do we read the Megillah by night and by day?
Does a 'pending' US visa application constitute a denial?
A social experiment. What is the worst that can happen?
Where does the bonus feat in the cleric starting package come from?
Creature in Shazam mid-credits scene?
Approximating irrational number to rational number
Why do compilers behave differently when static_cast(ing) a function to void*?
How do I color the graph in datavisualization?
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
Are the IPv6 address space and IPv4 address space completely disjoint?
How much character growth crosses the line into breaking the character
Why can't run same binary on different OS
2019 Community Moderator ElectionHow to mount a windows/samba windows share under Linux?Why do two Ubuntu systems in the same network behave differently in DNS resolution?Why does linux-based laptops have weak wifi signal in comparison to windows-based laptop?Lower cpu performance in LinuxWhy do files created via Samba get different ACL (mask) permissions depending on the client OS?In Linux I have different color for the same thing than in WindowsWhy is 64bit Ubuntu running Slower?Executing a program gives No such file or folder errorWhen user and group permissions are set identically why is functionality different?Identical SSH configuration failing
If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?
linux windows cpu x86
New contributor
|
show 1 more comment
If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?
linux windows cpu x86
New contributor
2
You should check out this post on superuser.
– kemotep
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
a simplemov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and callmovl $1, %rax; syscall
on linux x86-64 (or the equivalent withint $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).
– mosvy
yesterday
|
show 1 more comment
If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?
linux windows cpu x86
New contributor
If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?
linux windows cpu x86
linux windows cpu x86
New contributor
New contributor
edited yesterday
Rui F Ribeiro
41.6k1483141
41.6k1483141
New contributor
asked yesterday
rgergergergrgergergerg
12
12
New contributor
New contributor
2
You should check out this post on superuser.
– kemotep
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
a simplemov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and callmovl $1, %rax; syscall
on linux x86-64 (or the equivalent withint $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).
– mosvy
yesterday
|
show 1 more comment
2
You should check out this post on superuser.
– kemotep
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
a simplemov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and callmovl $1, %rax; syscall
on linux x86-64 (or the equivalent withint $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).
– mosvy
yesterday
2
2
You should check out this post on superuser.
– kemotep
yesterday
You should check out this post on superuser.
– kemotep
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
a simple
mov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall
on linux x86-64 (or the equivalent with int $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).– mosvy
yesterday
a simple
mov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall
on linux x86-64 (or the equivalent with int $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).– mosvy
yesterday
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508031%2fwhy-cant-run-same-binary-on-different-os%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.
rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.
rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.
rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508031%2fwhy-cant-run-same-binary-on-different-os%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
You should check out this post on superuser.
– kemotep
yesterday
Already readed... but what kind of API is needed for doing the simplest: mov r1, r2
– rgergergerg
yesterday
The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...
– kemotep
yesterday
Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?
– rgergergerg
yesterday
a simple
mov
will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and callmovl $1, %rax; syscall
on linux x86-64 (or the equivalent withint $80
on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).– mosvy
yesterday