Originally posted by discordian
View Post
Of course you'll need some attribute or pragma to export properly. If ELF was designed like PE, you'd just need dllexport attribute, and that's it. A simple macro that turns it into either dllexport or dllimport, depending on whether you export it or import it. Not a problem at all.
Originally posted by discordian
View Post
Secondly, I'm not disagreeing with you that it might break stuff. I'm very well aware it will break stuff. The thing is that it should not have been a thing in the first place. I'm not blaming --as-needed for breaking stuff, even though it probably does and you're right. I'm blaming the pathetic code that breaks with it for being designed like a potato.
LTO is similar, but unfortunately it's full of bugs. If it was perfect, then no project should ever fail to compile with LTO: if it does, it's the project that's designed badly, not the LTO concept.
Originally posted by discordian
View Post
Originally posted by discordian
View Post
I usually don't argue about this, but I'm personally sick to death of people (not you!) encountering so many "clashes" and "issues" with ELF (if you knew about the other flatpak threads here) due to this idiotic idea of a "global namespace" that shouldn't have ever passed the quality assurance.
And then they have the audacity to think it's an universal problem, and claim COFF/PE/Windows (or Mac) suffer from it as well, when they don't because they have no such garbage. It's only ELF that suffers from it, but they still insist on their bs, so it triggers me a lot. (btw it's not just Windows, since Wine run DLLs just fine and don't suffer from it, it's also used in UEFI so...)
You probably ask what has that do to with --as-needed?
Simple: if you need to import a symbol, you must be forced to specify which module it is from. ELF doesn't force that, because of the "global namespace". Ergo this whole issue exists because of the "global namespace" being a thing. If you must specify which module it is from, by the format of the module (COFF), then it is literally impossible to ever have an application fail with --as-needed, in fact --as-needed would be the implied default.
tl;dr Whoever had the idea to import symbols *without* specifying which module they are supposed to be from should be shot.
Comment