LLD 13 and GNU ld 2.37 support -z start-stop-gc which allows garbage
collection of C identifier name sections despite the __start_/__stop_
references. GNU ld before 2015-10 had the behavior as well. Simply set
the retain attribute so that GCC 11 (if configure-time binutils is 2.36
or newer)/Clang 13 will set the SHF_GNU_RETAIN section attribute to
prevent garbage collection.
Without the patch, there are linker errors with -z start-stop-gc
(LLD default) when -Wl,--gc-sections is used:
```
ld.lld: error: undefined symbol: __start___eap
>>> referenced by eap.c
>>> src/eap.o:(eap_init)
```
The remain attribute will not be needed if the metadata sections are
referenced by code directly.
Previously, command_option_get used to return NULL in the following
two scenarios: when command-line option with a such name didn’t exists
or its argument was not provided. This worked great for the cmd-line
options with the required arguments. With introduction of the cmd-line
options with no or optional arguments the function was changed to return
a boolean value indicating the existence of a such option and then, if
it had an argument - value_out variable would have been set.
Thereafter, this patch modifies the current usages of command_option_get.
Note, in these particular applications of command_option_get there is no
need to check the returned value from command_option_get, since these
options have the required arguments and we can only check if the value_out
parameter has been set or not.
Enable parsing of the command-line options by the command module.
The parsed command-line option values are stored in command_options
list and made available through the module’s public API:
command_option_get – allows querying options by name,
command_has_options – checks existence of the options.
Previously, on service disappeared event the list of the known
proxy objects was cleared, but pointers to the default entity
per command family wasn’t reset. Reset default entities for
the command families to remove the dead pointers to the deleted
proxy objects.
==1325== Invalid read of size 8
==1325== at 0x4055D4: proxy_interface_is_same (dbus-proxy.c:439)
==1325== by 0x407C28: match_by_partial_name (network.c:220)
==1325== by 0x40547C: proxy_interface_find_all (dbus-proxy.c:424)
==1325== by 0x405592: proxy_property_str_completion (dbus-proxy.c:153)
==1325== by 0x407DA9: network_name_completion (network.c:241)
==1325== by 0x4E596D5: rl_completion_matches (in /usr/lib64/libreadline.so.7.0)
This allows to inspect the cmd line for the existence of a provided
token. This enables the completers to look back to what was entered
before them and make decisions based on that information. For
example, this can be used in completion of the property values
to identify the property for which the value is being completed.