Masahiro Yamada 9435dc77a3 modpost: distinguish same module paths from different dump files
Since commit 13b25489b6f8 ("kbuild: change working directory to external
module directory with M="), module paths are always relative to the top
of the external module tree.

The module paths recorded in Module.symvers are no longer globally unique
when they are passed via KBUILD_EXTRA_SYMBOLS for building other external
modules, which may result in false-positive "exported twice" errors.
Such errors should not occur because external modules should be able to
override in-tree modules.

To address this, record the dump file path in struct module and check it
when searching for a module.

Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/all/eb21a546-a19c-40df-b821-bbba80f19a3d@nvidia.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
2024-12-21 12:42:10 +09:00
..
2024-09-01 20:34:49 +09:00
2024-10-07 02:12:27 +09:00
\n
2024-11-21 09:50:18 -08:00
2024-11-30 13:41:50 -08:00
2024-11-30 13:41:50 -08:00
2022-10-03 14:03:19 -07:00
2024-11-30 13:41:50 -08:00
2024-11-27 10:20:50 -08:00
2023-12-03 18:51:48 +09:00
2024-11-28 08:11:56 +09:00
2020-12-08 23:30:04 +09:00
2024-11-06 12:59:44 -05:00
2021-05-03 17:23:06 -06:00