This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug corefiles/11804] Fix -Wl,-z,relro gcore writer (+maybe reader)


------- Additional Comments From rguenth at gcc dot gnu dot org  2010-08-31 11:26 -------
Hm, it doesn't seem to work reliably for me (it works for dumping core of
/bin/sleep).  If I dump core of a running /usr/lib/postfix/qmgr on load
I get

# gdb /usr/lib/postfix/qmgr
Reading symbols from /usr/lib/postfix/qmgr...Missing separate debuginfo for
/usr/lib/postfix/qmgr
Try: zypper install -C
"debuginfo(build-id)=a67933b04330530f5e80941c968ba3623b1fd5ac"
(no debugging symbols found)...done.
(gdb) set debug solib
(gdb) set verbose
(gdb) core core.4529
svr4_current_sos: exec_bfd /usr/lib/postfix/qmgr
elf_locate_base: found program entry address 0x7fac68ab63a0 for
/usr/lib/postfix/qmgr
elf_locate_base: expected relocation offset 0x7fac68ab2000 for /usr/lib/postfix/qmgr
elf_locate_base: .dynamic section found in /usr/lib/postfix/qmgr
elf_locate_base: .dynamic addr 0x20fbc0
elf_locate_base: read in .dynamic section
elf_locate_base: tag at offset 0x0 is not readable, dropping relocation offset
0x7fac68ab2000
elf_locate_base: found program entry address 0x7fac68ab63a0 for
/usr/lib/postfix/qmgr
elf_locate_base: expected relocation offset 0x7fac68ab2000 for /usr/lib/postfix/qmgr
elf_locate_base: .dynamic section found in /usr/lib/postfix/qmgr
elf_locate_base: .dynamic addr 0x20fbc0
elf_locate_base: read in .dynamic section
elf_locate_base: tag at offset 0x0 is not readable, dropping relocation offset
0x7fac68ab2000
elf_locate_base: unrelocated ptr addr 0x20fd18
elf_locate_base: relocated ptr addr 0x20fd18 (relocation offset 0x0) for
/usr/lib/postfix/qmgr
elf_locate_base: Tag entry has value 0x0 -- return now
svr4_current_sos: no DT_DEBUG found in /usr/lib/postfix/qmgr -- return now

the program address looks good, the .dynamic section in the running process
is mapped like

7fac68cc1000-7fac68cc2000 r--p 0000f000 08:06 360346                     /usr/li
b/postfix/qmgr
Size:                  4 kB
Rss:                   4 kB
Pss:                   4 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         4 kB
Private_Dirty:         0 kB
Referenced:            4 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
7fac68cc2000-7fac68cc3000 rw-p 00010000 08:06 360346                     /usr/li
b/postfix/qmgr
Size:                  4 kB
Rss:                   4 kB
Pss:                   4 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         4 kB
Referenced:            4 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
7fac68cc3000-7fac68cfe000 rw-p 00000000 00:00 0                          [heap]

thus the relocated address should be not in the core file but taken from
/usr/lib/postfix/qmgr - but that fails.  Is this not available at this point
or where do I need to dig?  I'm not too familiar with the gdb codebase...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://sourceware.org/bugzilla/show_bug.cgi?id=11804

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]