Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231115152042.GX4163@brightrain.aerifal.cx>
Date: Wed, 15 Nov 2023 10:20:43 -0500
From: Rich Felker <dalias@...c.org>
To: Eleanor Bartle <eleanor@...anor-nb.com>
Cc: Markus Wichmann <nullplan@....net>, musl@...ts.openwall.com
Subject: Re: Care about Symbol Namespacing?

On Wed, Nov 15, 2023 at 05:11:02PM +1100, Eleanor Bartle wrote:
> That's about it, yes. Though I will point out that Solaris supports
> LD_PRELOAD just fine -- the preloads just need to be marked as such.
> For calls between components there's really no way to structurally
> prevent interposition.
> 
> The benefit is faster inter-component symbol lookup, as well as
> sanity in the face of an _accidental_ name collision. The tradeoff
> is complexity of specification to support all existing use cases. If
> the standard were being designed from scratch it might not be too
> hard to accomplish cleanly; to graft on to an existing model is a
> nightmare.

If your intent is just to check for accidental name collision, you can
do this with diagnostic tooling not runtime semantic changes. And this
is what you want to know, and what I mean by static linking being
first-class. Making accidental name collisions transparently work
would make it so things break horribly when someone decides they want
to static link, and you as the author don't realize this because you
never tried static linking. What's better would be running a tool that
basically just does ldd and looks for multiple definitions of the same
symbol, and tells you "you've got something wrong! you need to fix
that!"

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.