1
0
Fork 0
alistair23-linux/Documentation/kbuild
Jessica Yu eba75a365f modpost: move the namespace field in Module.symvers last
commit 5190044c29 upstream.

In order to preserve backwards compatability with kmod tools, we have to
move the namespace field in Module.symvers last, as the depmod -e -E
option looks at the first three fields in Module.symvers to check symbol
versions (and it's expected they stay in the original order of crc,
symbol, module).

In addition, update an ancient comment above read_dump() in modpost that
suggested that the export type field in Module.symvers was optional. I
suspect that there were historical reasons behind that comment that are
no longer accurate. We have been unconditionally printing the export
type since 2.6.18 (commit bd5cbcedf4), which is over a decade ago now.

Fix up read_dump() to treat each field as non-optional. I suspect the
original read_dump() code treated the export field as optional in order
to support pre <= 2.6.18 Module.symvers (which did not have the export
type field). Note that although symbol namespaces are optional, the
field will not be omitted from Module.symvers if a symbol does not have
a namespace. In this case, the field will simply be empty and the next
delimiter or end of line will follow.

Cc: stable@vger.kernel.org
Fixes: cb9b55d21f ("modpost: add support for symbol namespaces")
Tested-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 08:25:55 +01:00
..
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
headers_install.rst Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
index.rst Documentation: kbuild: Add document about reproducible builds 2019-09-15 01:14:41 -06:00
issues.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kbuild.rst kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN 2019-09-06 23:46:52 +09:00
kconfig-language.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kconfig-macro-language.rst docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
kconfig.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
makefiles.rst kbuild: remove header compile test 2020-03-05 16:43:47 +01:00
modules.rst modpost: move the namespace field in Module.symvers last 2020-03-25 08:25:55 +01:00
reproducible-builds.rst kheaders: make headers archive reproducible 2019-10-05 15:29:49 +09:00