This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH RFC] fork: reduce chances for "address space is already occupied" errors


On Apr 13 09:46, Achim Gratz wrote:
> Corinna Vinschen writes:
> > Nick Clifton, one of the binutils maintainers, made the following
> > suggestion in PM:
> >
> > Allow the ld flag --enable-auto-image-base to take a filename as
> > argument.
> >
> > The idea: The file is used by ld to generate the start address
> > for the next built DLL.  Mechanism:
> >
> > 1.1. If ld links a DLL and if the file given to --enable-auto-image-base
> >      doesn't exist, ld will give the DLL the start address of the
> >      auto image base range.
> >
> > 1.2: Next time, if ld links a DLL and if the file given to
> >      --enable-auto-image-base exists, it will use the address in that
> >      file as the start address for th just built DLL.
> >
> > 2. It will store that address, plus the size of the DLL, rounded up to
> >    64K, in that file.
> >
> > 3. If the auto image base range is at an end, ld will wrap back to
> >    the start address of the auto image base range.
> 
> Sounds OK if the goal is just to avoid collisions, but it would really
> be nicer if there was some way to plug this together with the rebase
> database from the start.

No, that's contrary to the idea.  The solution should be self-sufficient
within binutils.  We don't want to add any reliance to external tools.

The linker uses a DLL address space which does not collide with rebased
DLLs in 64 bit, so this only occurs during developement, and none of the
built DLLs can collide with system DLLs.  I do not much care for 32 bit,
it's a lost case anyway.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]