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] New: Fix -Wl,-z,relro gcore writer (+maybe reader)


Core files for -Wl,-z,relro generated by:
kernel-2.6.33.5-124.fc13.x86_64
kernel-xen-2.6.18-194.8.1.el5.x86_64
works correctly because:
Roland McGrath:
------------------------------------------------------------------------------
The kernel's default rules dump any MAP_PRIVATE file mapping that has
actually been modified (i.e. COW performed), so you should always have
.dynamic and all other parts of any data sgements that were written to,
regardless of their page protections at the time of the dump.
------------------------------------------------------------------------------

Core files generated by GDB gcore do not contain page containing DYNAMIC
containing DT_DEBUG pointing at _r_debug, therefore GDB cannot later find out
the shared library list.

(a) Fix gcore:
Roland McGrath:
------------------------------------------------------------------------------
gdb/gcore could do something similar from userland if it looks at
/proc/pid/smaps.  I think you can say that any non-shared mapping listed
with either Private_Dirty or Swap nonzero is one's that's been written to.
But we should probably double-check with the kernel VM people.
------------------------------------------------------------------------------

(b) We can possibly make GDB compatible even with current broken gcore by
    a hack depending on unique `_r_debug' symbol.  [patch attached]

-- 
           Summary: Fix -Wl,-z,relro gcore writer (+maybe reader)
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: corefiles
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-unknown-linux-gnu


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]