Good question. According to the Friendly Manual, we ought to be able to do the oxymoronic "segment .text data". I can confirm that Nasm swallows this without complaint - I have no way of testing whether a linker will eat it, nor whether it actually works.
In Linux, we can make a code section writeable, but if we name it ".text", ld will change it back to readonly! Calling it "kode" or something works... but the "usual way", if we want to modify code, is to copy it to the stack, and overwrite it there. That might be something to try, too.
There a *reason* code sections are readonly... hope you're not doing something "naughty" with this!
Best,
Frank