--- In [email protected], Kayo Hisatomi <[EMAIL PROTECTED]> wrote:
>
> Hi Nico,
> 
> >> As far as I know this is not necessarily correct.
> >> It might well happen that the string "  bye 1  " is
> >> stored in a read-only part of memory during process
> >> initialisation.
> 
> I thought on this too, but I could not think in another
> area than the .text section...
> 
> This is a good question: are the static strings
> allocated in the .text area?
<snip>

Kayo,

this question might be impossible to answer. The point is that the
"text area" is a term specific to Unix; it might not exist in other
environments.
I admit, however, that personally I don't know any environment which
doesn't utilise a text area for executable code, but they might exist;
perhaps some embedded systems.
Anyway, what I want to point out is that the term "text area" is
specific to one kind of operating system. It might or might not exist
on other platforms.

And even on those platforms which do have a text area this is not
always handled in the same way. I dimly recall that many years ago
I've read a test about C compilers for MS-DOS; one compiler usually
placed fixed strings in the text area but could be told using a
compiler switch to place them in the data segment instead. Such
behaviour is valid according to ANSI C.

Regards,
Nico

Reply via email to