[systemd-devel] Build error with 218 - undefined reference to `__start_BUS_ERROR_MAP'

Umut Tezduyar Lindskog umut at tezduyar.com
Thu Dec 11 14:01:12 PST 2014


Trying to build 218 but I am getting undefined reference error. The
source code of bus-error.c mentions that gcc magically maps these
variables but not for me.

What is doing the mapping? __attribute__ ((__section__("BUS_ERROR_MAP"))) ?

Could it be that mentioned "gcc magic" is not supported on cross compiling?

Also, why do we need to use elf section instead of iterating over
bus_standard_errors[]?

  CCLD     libnss_resolve.la
libsystemd_shared_la-hashmap.o (symbol from plugin): warning: memset
used with constant zero length parameter; this could be due to
transposed parameters
/tmp/ccHr0vVt.ltrans13.ltrans.o: In function `bus_error_name_to_errno.14134':
ccHr0vVt.ltrans13.o:(.text+0x7b0): undefined reference to
`__start_BUS_ERROR_MAP'
ccHr0vVt.ltrans13.o:(.text+0x7b4): undefined reference to `__stop_BUS_ERROR_MAP'
collect2: error: ld returned 1 exit status

Umut


More information about the systemd-devel mailing list