net/socket: use the iterable section object constructor/iterator

The handcrafted allocation falls victim of misaligned structures due to
toolchain padding which crashes the socket test code on 64-bit targets.
Let's move it to the iterable section utility where those issues are
already taken care of.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2019-07-03 17:02:24 -04:00 committed by Jukka Rissanen
commit 66045b5db0
3 changed files with 6 additions and 15 deletions

View file

@ -70,10 +70,9 @@
#if defined(CONFIG_NET_SOCKETS)
SECTION_PROLOGUE(net_socket_register,,)
{
__net_socket_register_start = .;
*(".net_socket_register.init")
KEEP(*(SORT_BY_NAME(".net_socket_register.init*")))
__net_socket_register_end = .;
_net_socket_register_list_start = .;
KEEP(*(SORT_BY_NAME("._net_socket_register.*")))
_net_socket_register_list_end = .;
} GROUP_LINK_IN(ROMABLE_REGION)
#endif