Main ones I know of (being European) are well, EU ones. The main one I'm deferring to is the EUs own words[0] on the matter, which explains that "the parts of the programs known as ‘interfaces’, which provide interconnection and interaction between elements of software and hardware may be reproduced by a legitimate licensee without any authorisation of their rightholder".

As for a realistic example as to where this applies, I'd pick the age-old "GNU Readline" library. Readline is infamous for the fact that it's a standard library on Linux distros (because it's a bash dependency) that is easy to accidentally import in a C project and lands under the GPL. The FSF from what I can tell loves to parade this library around as a way to "gotcha" developers; it's to the point where even Readlines Wikipedia article mentions this[1].

In the case of EU law - this is just straight up not an issue[2]. As long as you're not distributing your software with readline, but rather with a dynamic link to readlines .so file (which for Linux can be easily assumed since it's a bash dependency and the overwhelming majority of Linux PCs have bash installed), readline's license doesn't apply since a user can just supply their own library and as long as it's compatible, it will work. It's hard to argue someone is distributing readline or making a derivative work from readline just by linking with its public API.

To put it in a slightly different form - the idea of linking not being a derivative work to stop somewhere because otherwise the literal Linux Kernel would force every program ever written for it to be under GPL2.0-only (which obviously isn't true, not even in US law from what I can tell), since every linux program is technically a derivative of linux the kernel. The EUs interpretation seems to be that it ends exactly on the moment the code in a program stops being ran from the files with which it's distributed.

---

Game mods are probably split down the middle, if we just look at them "as code" (so without going into asset patches - those would probably be a derivative work regardless, I'm thinking here of say, editing a loot table in a game; basically just number tweaks). Games with officially used mod loading can likely claim that mods are plugins, which would make them derivative works. That said, most games as of recent don't ship with mod loaders and rely on patching a DLL file shipped with the game[3], which likely would make an individual mod not a derivative work, given it's just an interface re-implementation with user-defined side effects.

Then you have the really old-school IPS files which just are straight up binary patches. I have absolutely no clue how those fit into the mix, given an IPS patch is literally a series of data offsets + what data to dump at those bytes. Those mostly fit with old ROMs though since IPS patches were abandoned due to inherent size limits + a magic word bug.

---

That said, ultimately it's important to keep in mind that law isn't computer code. It's not that if function foo takes argument bar and produces result foobar, that you always get result foobar with the law[4]. Not even in the US, which almost always defers to precedent ("case law") is that the case, and even less so in the EU where precedent is just treated as another argument rather than something to defer to. There's a zillion edge-cases to each example and a judge can rule differently in the end for most situations.

This is simply what the EU has written on the matter and from what I know about CJEU rulings, the CJEU tends to side on the interpretation that unless the goal is extremely blatant copyright violation, it's probably fine.

[0]: https://joinup.ec.europa.eu/collection/eupl/licence-compatib... (see: More details on the case of linking section)

[1]: https://en.wikipedia.org/wiki/GNU_Readline#Choice_of_the_GPL...

[2]: Full disclosure, I am not a lawyer, please ask an actual lawyer for legal advice.

[3]: Bepinex is the one used for the majority of Unity games and is one that jumps to mind immediately.

[4]: And that's generally speaking a good thing. Application of the law does require nuance.