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

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.

> TBD: A way to enable this feature without having to change all
>      packages' build systems.


> That way you could build hundreds of DLLs in a project and use them
> immediately without having to rebase.
> This is just in a discussion state, nothing has happend yet, but
> what do you think in general?

Looking at what triggered the discussion, on would probably want to have
the option of giving the linker the name of an existing DLL as the
argument and have it re-use that base address (and a warning if the size
gets larger than the original DLL plus some guardband).

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:

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