roms in qemu-system-data miss debuginfo

Bug #2020624 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
New
Undecided
Sergio Durigan Junior

Bug Description

I thought I have debugged them in the past, but maybe I did build qemu myself back then.
Anyway, the problem is that qemu-system-data (arch indep) has a bunch of files for early loading.

And while for some of them I'm not sure we could have debuginfo ever, like:
ubuntu@s1lp5:~$ file /usr/share/qemu/sgabios.bin
/usr/share/qemu/sgabios.bin: BIOS (ia32) ROM Ext. (8*512)

Others clearly are full executables, got stripped on build and would benefit from having that:
ubuntu@s1lp5:~$ file /usr/share/qemu/s390-ccw.img
/usr/share/qemu/s390-ccw.img: ELF 64-bit MSB pie executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, BuildID[sha1]=4f25d3b31f4c40a88488f7acaf7a8b5a6aa787d9, stripped

But while this was stripped there is no qemu-system-data-dbgsym at all.

I can't find it in a dbgsym file of qmeu.
I checked with the dbeuginfo server in case it would have been placed elsewhere, but
$ debuginfod-find -v executable /usr/share/qemu/s390-ccw.img
tells me it does not exist.

It would be great to provide this data for anything that got stripped.
If too complex for all of them, at least for those with a BuildID.

ubuntu@s1lp5:~$ for f in $(dpkg -L qemu-system-data); do file $f; done | grep stripped
/usr/share/qemu/hppa-firmware.img: ELF 32-bit MSB executable, PA-RISC, 1.0 version 1 (GNU/Linux), statically linked, stripped
/usr/share/qemu/openbios-ppc: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), statically linked, stripped
/usr/share/qemu/openbios-sparc32: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), statically linked, stripped
/usr/share/qemu/openbios-sparc64: ELF 64-bit MSB executable, SPARC V9, Sun UltraSPARC1 Extensions Required, relaxed memory ordering, version 1 (SYSV), statically linked, stripped
/usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf: ELF 64-bit LSB executable, UCB RISC-V, RVC, soft-float ABI, version 1 (SYSV), statically linked, stripped
/usr/share/qemu/palcode-clipper: ELF 64-bit LSB executable, Alpha (unofficial), version 1 (SYSV), statically linked, stripped
/usr/share/qemu/s390-ccw.img: ELF 64-bit MSB pie executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, BuildID[sha1]=4f25d3b31f4c40a88488f7acaf7a8b5a6aa787d9, stripped
/usr/share/qemu/s390-netboot.img: ELF 64-bit MSB pie executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, BuildID[sha1]=c11c952c8f6a5ed8ddd4fcd92ce8be758d52e238, stripped

The alternative is to check what it would "cost" to just not strip them.

P.S. This isn't just for fun or a theoretical issue, I got an IBM friend asking for that very file :-/

Tags: server-todo
Changed in qemu (Ubuntu):
assignee: nobody → Sergio Durigan Junior (sergiodj)
tags: added: server-todo
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Hm, a first look into this issue showed me that the problem happens because upstream always invokes strip when building the objects that get shipped into qemu-system-data. For example, this is the excerpt from pc-bios/s390-ccw/Makefile:

s390-ccw.img: s390-ccw.elf
        $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,Stripping $< into)

Unfortunately these Makefiles don't take into account the "--disable-strip" configuration option that we pass when building qemu.

My first plan here is to determine how hard it is to extend the Makefiles and make them honour the "--disable-strip" option, but it may be worth simply commenting these strips out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.