From: "vamsi krishna" <vamsi.krishnak@gmail.com>
To: "vamsi krishna" <vamsi.krishnak@gmail.com>,
linux-kernel@vger.kernel.org, dan@debian.org
Subject: Re: Program to convert core file to executable.
Date: Thu, 25 May 2006 01:36:08 +0530 [thread overview]
Message-ID: <3faf05680605241306t64f63225i4d25af3e92a9d9f9@mail.gmail.com> (raw)
In-Reply-To: <20060524173821.GA1292@nevyn.them.org>
Hello Daniel,
> Look at the program headers. Many of them probably have a file size of
I checked the PHDRS (readelf --segments) the following are the PHDRS
of the core.exe
===============<BEGIN>==================
Elf file type is EXEC (Executable file)
Entry point 0x8048364
There are 11 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
NOTE 0x000194 0x00000000 0x00000000 0x00a48 0x00000 0
**LOAD 0x001000 0x08048000 0x00000000 0x00000 0x01000 R E 0x1000
LOAD 0x001000 0x08049000 0x00000000 0x01000 0x01000 RWE 0x1000
LOAD 0x002000 0xf649b000 0x00000000 0x01000 0x01000 RWE 0x1000
**LOAD 0x003000 0xf649c000 0x00000000 0x00000 0x132000 R E 0x1000
LOAD 0x003000 0xf65ce000 0x00000000 0x03000 0x03000 RWE 0x1000
LOAD 0x006000 0xf65d1000 0x00000000 0x03000 0x03000 RWE 0x1000
LOAD 0x009000 0xf65e8000 0x00000000 0x01000 0x01000 RWE 0x1000
**LOAD 0x00a000 0xf65e9000 0x00000000 0x00000 0x15000 R E 0x1000
LOAD 0x00a000 0xf65fe000 0x00000000 0x01000 0x01000 RWE 0x1000
LOAD 0x00b000 0xfeffe000 0x00000000 0x02000 0x02000 RWE 0x1000
======================<END>=============
o As you said I see some of the PHDRS are having FileSiz as zero, the
first (1st **ed ) PHDR which is having virtual address 0x08048000
(this is obviously) the start of the text of the program, and its not
having any memory in the core file.
o Does the other PHDRS for which FileSiz is zero correspond to the
dynamic shared objects (.so) text ?? example in the above we see (2
**ed ) PHDR with VirtAddr as 0xf649c000 , so this means the text of
some shared .so has been mapped here right?
o I have question about the memory mapping with permissions r--s or
r--p (gconv used by glibc gets mapped like this some time) , so does
the core file contains this information of the memory mappings?
o Is there a way I can findout the standard which the OS follows to
write the core file?
o Rather than depending on the OS core file, hows your opinion on
writing out all the mappings form /proc/<pid>/maps as PT_LOAD into a
elf formatted file of type ET_EXEC, do you think this works? rather
than converting core file to exe?
>
> Of course, the kernel shouldn't crash! It sounds like a bug.
>
Yes I can reproduce this , is there a bugzilla for kernel? (or should
we report this at the buzilla of the distribution?)
Thank you,
Vamsi
next prev parent reply other threads:[~2006-05-24 20:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 17:18 vamsi krishna
2006-05-24 17:25 ` vamsi krishna
2006-05-24 17:38 ` Daniel Jacobowitz
2006-05-24 20:06 ` vamsi krishna [this message]
2006-05-24 20:08 ` Daniel Jacobowitz
2006-05-24 20:19 ` vamsi krishna
2006-05-24 20:25 ` Daniel Jacobowitz
2006-05-24 20:31 ` H. Peter Anvin
2006-05-24 20:52 ` Eric Piel
2006-05-24 21:33 ` Greg KH
2006-05-25 11:04 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3faf05680605241306t64f63225i4d25af3e92a9d9f9@mail.gmail.com \
--to=vamsi.krishnak@gmail.com \
--cc=dan@debian.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®