Hello everybody, In a core-image-minimal built with Yocto 1.7.1+, I was trying to step with a debugger through libsystemd.so, but discovered that the systemd-dbg package produced by Yocto build does not include the information on source files and line numbers. This does not seem to be a global problem since at least some .so's (e.g., glibc and glib-2.0) from the same image do come with full debugging information. All non-.so files built with systemd recipe also have line numbers included. Any hints on what might be wrong and how to get full debugging symbols for libsystemd.so would be appreciated. More details on my configuration are provided below.
Build Configuration: BB_VERSION = "1.24.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Fedora-21" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "1.7.1" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp = "work-1.7.1:b630f2f53645fa8f5890b4732f251c354ad525a7" Only .so files build for systemd seem to affected. All other binaries (e.g. daemons) do have line numbers included. It also seems that the problem occurs before packaging. After do_compile, all .so files found in the directory build/.libs/ already have no line numbers included. However, the corresponding .o files in build/src/libsystemd/*/ do have the line numbers included. I also tried to build systemd v216 natively and figured out that with the default build parameters all .so files have their line numbers included. Comparing the linker parameters between the native build and Yocto build reveals the following difference: Native build: ... -O0 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-fuse-ld=gold -Wl,--version-script=./src/libsystemd/libsystemd.sym -pthread -Wl,-soname -Wl,libsystemd.so.0 -o .libs/libsystemd.so.0.4.0 Yocto build: ... -O2 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--version-script=./src/libsystemd/libsystemd.sym -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -pthread -Wl,-soname -Wl,libsystemd.so.0 -o .libs/libsystemd.so.0.4.0 Is it possible that the linker optimizations (e.g. -Wl,-O1) are causing the problem? I did not manage to find any hints that this could be the case, though. Should this be the case, how can I fix the systemd recipe to have the line numbers included? Thanks, --Pavel Konopelko Regards, --Pavel Konopelko Software Architect Tel: 49 (0) 2273-595-2829 Fax: 49 (0) 2273-595-2261 Email: pkono...@visteon.com Visteon Innovation & Technology GmbH Sitz der Gesellschaft: Kerpen Registergericht: Köln HRB 71036 Geschäftsführung: Christian Feltgen, Radboud Vaessen, Andrea Eichelberg CONFIDENTIALITY NOTICE: This e-mail message including attachments, if any, is intended only for the person or entity to which it is addressed and may contain confidential and /or privileged material. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. If you are the intended recipient but do not wish to receive communications through this medium, please so advise the sender immediately. -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto