Where the location of code section of a process in linux?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I want to restore the stack and heap when process is down. So I must make sure that the address of the function stays the same every time it starts, if the binary stays the same.
Is there anyone could help?
linux
add a comment |Â
up vote
2
down vote
favorite
I want to restore the stack and heap when process is down. So I must make sure that the address of the function stays the same every time it starts, if the binary stays the same.
Is there anyone could help?
linux
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to restore the stack and heap when process is down. So I must make sure that the address of the function stays the same every time it starts, if the binary stays the same.
Is there anyone could help?
linux
I want to restore the stack and heap when process is down. So I must make sure that the address of the function stays the same every time it starts, if the binary stays the same.
Is there anyone could help?
linux
edited Jul 12 at 6:34
asked Jul 12 at 4:18
å¼ å®ÂÃ¥ÂÂ
134
134
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29
add a comment |Â
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
If address-space layout randomisation is enabled â which is the case on most current Linux systems â then no, function addresses donâÂÂt stay the same every time a binary is loaded. There are various different layout randomisations which are applied, and if the binary is position-independent, all of them can be applied; in particular, library ASLR means that libraries are loaded in a different place every time, and execution ASLR means that position-independent binaries are loaded in a different place every time too.
The Ubuntu wiki has a nice summary of the different possibilities; they arenâÂÂt Ubuntu-specific.
You can disable all this (which isnâÂÂt recommended) by changing the /proc/sys/kernel/randomize_va_space
setting: 0 will disable ASLR.
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
If address-space layout randomisation is enabled â which is the case on most current Linux systems â then no, function addresses donâÂÂt stay the same every time a binary is loaded. There are various different layout randomisations which are applied, and if the binary is position-independent, all of them can be applied; in particular, library ASLR means that libraries are loaded in a different place every time, and execution ASLR means that position-independent binaries are loaded in a different place every time too.
The Ubuntu wiki has a nice summary of the different possibilities; they arenâÂÂt Ubuntu-specific.
You can disable all this (which isnâÂÂt recommended) by changing the /proc/sys/kernel/randomize_va_space
setting: 0 will disable ASLR.
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
add a comment |Â
up vote
0
down vote
accepted
If address-space layout randomisation is enabled â which is the case on most current Linux systems â then no, function addresses donâÂÂt stay the same every time a binary is loaded. There are various different layout randomisations which are applied, and if the binary is position-independent, all of them can be applied; in particular, library ASLR means that libraries are loaded in a different place every time, and execution ASLR means that position-independent binaries are loaded in a different place every time too.
The Ubuntu wiki has a nice summary of the different possibilities; they arenâÂÂt Ubuntu-specific.
You can disable all this (which isnâÂÂt recommended) by changing the /proc/sys/kernel/randomize_va_space
setting: 0 will disable ASLR.
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
If address-space layout randomisation is enabled â which is the case on most current Linux systems â then no, function addresses donâÂÂt stay the same every time a binary is loaded. There are various different layout randomisations which are applied, and if the binary is position-independent, all of them can be applied; in particular, library ASLR means that libraries are loaded in a different place every time, and execution ASLR means that position-independent binaries are loaded in a different place every time too.
The Ubuntu wiki has a nice summary of the different possibilities; they arenâÂÂt Ubuntu-specific.
You can disable all this (which isnâÂÂt recommended) by changing the /proc/sys/kernel/randomize_va_space
setting: 0 will disable ASLR.
If address-space layout randomisation is enabled â which is the case on most current Linux systems â then no, function addresses donâÂÂt stay the same every time a binary is loaded. There are various different layout randomisations which are applied, and if the binary is position-independent, all of them can be applied; in particular, library ASLR means that libraries are loaded in a different place every time, and execution ASLR means that position-independent binaries are loaded in a different place every time too.
The Ubuntu wiki has a nice summary of the different possibilities; they arenâÂÂt Ubuntu-specific.
You can disable all this (which isnâÂÂt recommended) by changing the /proc/sys/kernel/randomize_va_space
setting: 0 will disable ASLR.
answered Jul 12 at 7:39
Stephen Kitt
139k22296359
139k22296359
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
add a comment |Â
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
@å¼ å®Âå youâÂÂre welcome! And welcome to Unix & Linux. Please take a minute to read the tour, and if this answer addressed your question to your satisfaction, accept it using the big check mark.
â Stephen Kitt
Jul 13 at 11:42
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
Ok, sure. sorry for that.
â å¼ å®ÂÃ¥ÂÂ
Jul 14 at 3:18
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454819%2fwhere-the-location-of-code-section-of-a-process-in-linux%23new-answer', 'question_page');
);
Post as a guest
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
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
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
You're looking for this, right? - linux-audit.com/â¦.
â slmâ¦
Jul 12 at 4:30
Thank you.I just want to make sure that the address of the function stays the same every time it starts, if the binary stays the same.
â å¼ å®ÂÃ¥ÂÂ
Jul 12 at 6:29