Big picture on shared libraries when they go wrong, how?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Wed May 8 07:52:40 UTC 2024
On 08/05/2024 7:15 PM, Walter Bright wrote:
> On 5/7/2024 8:45 PM, Richard (Rikki) Andrew Cattermole wrote:
>>> They don't have much in common with shared libraries on OSX and Posix.
>>
>> They do have plenty in common, this is a misconception I really want
>> to get you off of. There is a dedicated heading for this ``Is a
>> Dynamic Link Library a Shared Library?``.
>
> Isn't it true that DLLs on Windows share their global data segment with
> all users of the DLL? While Linux shared libraries have a separate data
> segment for each process?
>
> This is a very major difference.
So I was going to write out that I have no idea how you came to this
conclusion and I'd love to hear the story that makes you think that this
is true for a OS that is used by financial, governmental and military
organizations.
And then I found MSVC link's ``/SECTION`` flag.
https://learn.microsoft.com/en-us/cpp/build/reference/section-specify-section-attributes?view=msvc-170
See the flag ``S``.
https://www.codeproject.com/Articles/240/How-to-share-a-data-segment-in-a-DLL
I haven't been able to find an equivalent linux ld flag.
Either way, this isn't the default and in no way would I ever consider
that it should be used! Sounds like a big ball of insanity.
More information about the Digitalmars-d
mailing list