flat assembler
Message board for the users of flat assembler.

Index > Linux > self modifying code (smc)

Author
Thread Post new topic Reply to topic
ahltz



Joined: 20 May 2009
Posts: 3
Location: Ronneby, Sweden
ahltz
Is it possible to code smc code inside the ".text"-segment without the use of the ".bss"-segment? I've been experimenting with it, but mprotect fails with error code 11 (EAGAIN) when trying. After some googling and checking man pages, it seems it's not possible to do mprotect anymore on non memory mapped memory? If this is the case, since when doesn't this work? And is there any work around for it?

Thanks for any responses
Post 20 May 2009, 22:10
View user's profile Send private message Reply with quote
ahltz



Joined: 20 May 2009
Posts: 3
Location: Ronneby, Sweden
ahltz
Nevermind, it seems I've been debugging all for nothing. The kernel gives EAGAIN error, but the syscalls succeeds anyhow.
Post 21 May 2009, 20:01
View user's profile Send private message Reply with quote
asmcoder



Joined: 02 Jun 2008
Posts: 784
asmcoder
[content deleted]


Last edited by asmcoder on 14 Aug 2009, 14:51; edited 1 time in total
Post 21 May 2009, 20:21
View user's profile Send private message Reply with quote
ahltz



Joined: 20 May 2009
Posts: 3
Location: Ronneby, Sweden
ahltz
Hence why I put the names within quotation. I figured it would be easier to understand what I meant by putting the section names to describe what segments I meant.
Post 22 May 2009, 00:46
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 212
Location: Budapest, Hungary
Endre
Asmcoder just teases you Smile. You know, segment is not equal to section.
Nevertheless, would you be so kind to attach your sm code here? We'd all like to learn something from your solved problem. Otherwise this thread doesn't make too much sense.
Post 24 May 2009, 10:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.