[Pkg-qof-maintainers] Bug#462007: 462007
Joey Hess
joeyh at debian.org
Thu Jan 24 21:11:16 UTC 2008
You can see if a file contains only debugging symbols, or also the
actual library object code by using objdump -p. According to Raphael
Hertzog in #461339, a file containing only debugging symbols will have
an empty "Dynamic Section:" in the objdump output.
joey at kodama:/usr/lib/debug/usr/lib>objdump -p libqof.so.1.0.9
libqof.so.1.0.9: file format elf32-i386
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00049380 memsz 0x00049380 flags r-x
LOAD off 0x00049380 vaddr 0x0004a380 paddr 0x0004a380 align 2**12
filesz 0x00000c6c memsz 0x000012ec flags rw-
DYNAMIC off 0x000495cc vaddr 0x0004a5cc paddr 0x0004a5cc align 2**2
filesz 0x00000100 memsz 0x00000100 flags rw-
EH_FRAME off 0x000492b8 vaddr 0x000492b8 paddr 0x000492b8 align 2**2
filesz 0x0000002c memsz 0x0000002c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-
Dynamic Section:
NEEDED libgmodule-2.0.so.0
NEEDED libdl.so.2
NEEDED libgobject-2.0.so.0
NEEDED libglib-2.0.so.0
NEEDED libgdasql-3.0.so.3
NEEDED libm.so.6
NEEDED libc.so.6
SONAME libqof.so.1
INIT 0xbcb8
FINI 0x434f4
HASH 0xd4
GNU_HASH 0x1640
STRTAB 0x5fe8
SYMTAB 0x2ae8
STRSZ 0x400f
SYMENT 0x10
PLTGOT 0x4a714
PLTRELSZ 0x1080
PLTREL 0x11
JMPREL 0xac38
REL 0xa728
RELSZ 0x510
RELENT 0x8
VERNEED 0xa698
VERNEEDNUM 0x2
VERSYM 0x9ff8
RELCOUNT 0x8e
Sure enough, the file that is supposed to contain debug symbols contains
enough code for gnotime to be able to be linked against it and run:
joey at kodama:/usr/lib/debug/usr/lib>ldd =gnotime |grep qof
libqof.so.1 => /usr/lib/libqof.so.1 (0xb7ec4000)
joey at kodama:/usr/lib/debug/usr/lib>LD_LIBRARY_PATH=. ldd =gnotime |grep qof
libqof.so.1 => ./libqof.so.1 (0xb7eb8000)
joey at kodama:/usr/lib/debug/usr/lib>LD_LIBRARY_PATH=. gnotime
GTT: GConf: Warning: get /Toolbar/ShowToolbar failed: Using default value
GTT: GConf: Warning: get /apps/gnotime/Actions/StartCommand failed: Using default value
GTT: GConf: Warning: get /apps/gnotime/Actions/StopCommand failed: Using default value
GTT: GConf: Warning: get /apps/gnotime/LogFile/Filename failed: Using default value
GTT: GConf: Warning: get /apps/gnotime/time_format failed: Using default value
GTT: GConf: Warning: get /apps/gnotime/Report/CurrencySymbol failed: Using default value
GTT: GConf: Warning: get /Report/CurrencyUseLocale failed: Using default value
I/O warning : failed to load external entity "/home/joey/.gnome2/gnotime.d/gnotime-data.xml"
And sure enough, I can generate a real separeated debug symbol file
from this file, that is much smaller, since it's lacking the redundant
object code that this file incorrectly contains:
joey at kodama:/usr/lib/debug/usr/lib>objcopy --only-keep-debug libqof.so.1.0.9 ~/tmp/foo
joey at kodama:/usr/lib/debug/usr/lib>ls -l ~/tmp/foo libqof.so.1.0.9
-rw-r--r-- 1 joey joey 578263 Jan 24 16:03 /home/joey/tmp/foo
-rw-r--r-- 1 root root 881135 Dec 19 17:24 libqof.so.1.0.9
joey at kodama:/usr/lib/debug/usr/lib>objdump -p ~/tmp/foo
/home/joey/tmp/foo: file format elf32-i386
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x000000d4 memsz 0x00049380 flags r-x
LOAD off 0x00000380 vaddr 0x0004a380 paddr 0x0004a380 align 2**12
filesz 0x00000000 memsz 0x000012ec flags rw-
DYNAMIC off 0x00000380 vaddr 0x0004a5cc paddr 0x0004a5cc align 2**2
filesz 0x00000000 memsz 0x00000100 flags rw-
EH_FRAME off 0x000000d4 vaddr 0x000492b8 paddr 0x000492b8 align 2**2
filesz 0x00000000 memsz 0x0000002c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-
Dynamic Section:
joey at kodama:/usr/lib/debug/usr/lib>
Neil Williams wrote:
> A simple scan of the build log will indicate:
This assumes that I am online and want to go rooting about in build
logs. That's about ten times less likely than me just wanting to read a
rules file and see what it does.
> CDBS just
> simplifies debian/rules and although you personally dislike it, I
> personally find it superb and I would not use anything else. That does
> not make me a "bad DD" or my packages of "inferior quality"
It does however, deprive you of any support at all from me for your
indirect uses of debhelper.
--
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-qof-maintainers/attachments/20080124/18ac65e0/attachment-0002.pgp
More information about the Pkg-qof-maintainers
mailing list