You are not logged in.
I'm trying to figure out how/what commands makepkg uses to put debug symbols in separate packages .
adding -g flag to a compiler invocation creates debug symbols .
running strip on object files removes the symbols and discards them.
What moves the symbols to separate files ?
Last edited by Lone_Wolf (Today 13:43:06)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
to my understanding makepkg uses objcopy --only-keep-debug to extract the debug symbols into a separate .debug file (in the -debug package under /usr/lib/debug/...), it then adds a .gnu_debuglink section with objcopy --add-gnu-debuglink so GDB can find it, and finally strips the main binary....
Edit:
handled by makepkg’s strip/tidy stage /strip.sh and is enabled via OPTIONS=(debug).
fixed typo
Last edited by 5hridhyan (Yesterday 12:08:15)
---
Offline
Check https://gitlab.archlinux.org/pacman/pac … =heads#L77 (and preceding function)
TLDR: objcopy.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Thanks 5hridhyan and Wormzy, that clarifies how this works.
Marking as [Solved]
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline