[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] half off topic kernel Pexec/Pterm discussion



Benjamin Gandon wrote:
I don't know any system call that enables this running several processes
with shared TEXT segment. Does anyone knows about this?

I don't know if there is such a thing in the FreeMiNT kernel.
There is some old code in the binutils patch which checks for dangerous relocations:

  /* Check for dangerous relocations in images with a sharable
     text section.  */
  if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0

If I understand well it checks there is no relative reference from TEXT to DATA segment. The comment seems to indicate the TEXT segment can be shared. Thus the DATA segment may not be just after the TEXT segment. So this sanity check makes sense.

This may be related to the -mbaserel GCC option, which has been deprecated for ages. This option is also no more supported by the MiNTLib.

Also, I found that:
http://sparemint.org/sparemint/html/packages/bash-mbaserel.html
This bash version may have a shared TEXT segment.

I'm sure about nothing because I never made any test with that.

--
Vincent Rivière