module: Fix module command registration
Commit 1e4a948673d7 ("command: Use array of pointers to commands")
updated the command linker sections to contain an array of pointers to
the command structs, rather than the command structs themselves.
However, the load_module function was not updated to account for the
change to the linker section, so fix that here.

Additionally, commit 22bdecc9c591 ("lds: Move start/end address
variables into defines") moved the _start and _end symbols out of the
linker script and into the section macro defines, causing them to show
up in the module symbol table as well, so we take can advantage of those
to find the array of pointers.

Fixes: 1e4a948673d7 ("command: Use array of pointers to commands")
Signed-off-by: David Dgien <dgienda125@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c788931 commit 6d42f894eaacd9e00f061d5918f9f58f8be8164e
@David Dgien David Dgien authored on 29 Jun 2020
Sascha Hauer committed on 1 Jul 2020
Showing 1 changed file
View
common/module.c