Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-09-11 Thread Anatol Pomozov
Hello On Thu, Aug 17, 2017 at 1:54 PM, Anatol Pomozov wrote: > Hi > > On Tue, Aug 8, 2017 at 8:04 AM, Kevin Wolf wrote: >> Am 04.08.2017 um 06:53 hat Anatol Pomozov geschrieben: >>> Hi Kevin >>> >>> Thanks for the information. >>> >>> So I sounds like

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-09-11 Thread Anatol Pomozov
Hello I have these changes ready now http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg03265.html It added ELF parser functionality as discussed above. Are there any open questions? What is the best way to proceed forward with these patches? I also have interest in adding Multiboot2

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-17 Thread Anatol Pomozov
Hi On Tue, Aug 8, 2017 at 8:04 AM, Kevin Wolf wrote: > Am 04.08.2017 um 06:53 hat Anatol Pomozov geschrieben: >> Hi Kevin >> >> Thanks for the information. >> >> So I sounds like we do want multiboot to load all sections regardless >> of its segments info. To achieve it we need

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-08 Thread Kevin Wolf
Am 04.08.2017 um 06:53 hat Anatol Pomozov geschrieben: > Hi Kevin > > Thanks for the information. > > So I sounds like we do want multiboot to load all sections regardless > of its segments info. To achieve it we need to read sections headers > and load all section that were not loaded yet. > >

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-03 Thread Anatol Pomozov
Hi Kevin Thanks for the information. So I sounds like we do want multiboot to load all sections regardless of its segments info. To achieve it we need to read sections headers and load all section that were not loaded yet. I have a working implementation here

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-03 Thread Kevin Wolf
Am 03.08.2017 um 00:00 hat Anatol Pomozov geschrieben: > Hello Richard > > Thank you for this useful information. I still learning about ELF and > a lot of things are still unclear for me. > > On Mon, Jul 31, 2017 at 11:20 AM, Richard Henderson wrote: > > On 07/31/2017 10:21

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-02 Thread Richard Henderson
On 08/02/2017 03:00 PM, Anatol Pomozov wrote: > What ELF specification says about it? Does it tell a loader to load > only PT_LOAD segments? Yes. In https://refspecs.linuxfoundation.org/ there is a link to "System V ABI Edition 4.1", which AFAIK is the latest version of the ELF "gABI" spec.

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-02 Thread Anatol Pomozov
Hello Richard Thank you for this useful information. I still learning about ELF and a lot of things are still unclear for me. On Mon, Jul 31, 2017 at 11:20 AM, Richard Henderson wrote: > On 07/31/2017 10:21 AM, Anatol Pomozov wrote: >> ELF sections info is needed for an OS to

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-01 Thread Kevin Wolf
Am 31.07.2017 um 19:21 hat Anatol Pomozov geschrieben: > ELF sections info is needed for an OS to map address space properly. > > I do not know much about production-grade OS but multiboot protocol is > quite popular among newly created and hobby OS. Multiboot provide some > useful information

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Richard Henderson
On 07/31/2017 10:21 AM, Anatol Pomozov wrote: > ELF sections info is needed for an OS to map address space properly. No, ELF *program header* info is needed for an OS to map the address space properly. For example: $ readelf -hl vmlinux-4.9.0-3-5kc-malta Using a mips kernel binary I happend to

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Anatol Pomozov
Hi On Sun, Jul 30, 2017 at 2:42 PM, Eduardo Habkost wrote: > > CCing Alex, the original author of load_multiboot(), and Kevin, > who touched multiboot code recently. > > > On Fri, Jul 28, 2017 at 02:28:34PM -0700, Anatol Pomozov wrote: >> Hi >> >> I am looking at x86

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Richard Henderson
On 07/31/2017 01:50 AM, Peter Maydell wrote: On 28 July 2017 at 22:28, Anatol Pomozov wrote: So I need to perform 2 things: - Load ELF section headers into target's memory. I did by appending additional space to mbs.mb_buf and copying header data. Is it the best

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Kevin Wolf
Am 30.07.2017 um 23:42 hat Eduardo Habkost geschrieben: > CCing Alex, the original author of load_multiboot(), and Kevin, > who touched multiboot code recently. For some values of "recently". :-) > On Fri, Jul 28, 2017 at 02:28:34PM -0700, Anatol Pomozov wrote: > > Hi > > > > I am looking at

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Peter Maydell
On 28 July 2017 at 22:28, Anatol Pomozov wrote: > So I need to perform 2 things: > > - Load ELF section headers into target's memory. I did by appending > additional space to mbs.mb_buf and copying header data. Is it the best > way to do? > > - Next I need to load

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-31 Thread Alexander Graf
Hi Anatol, > Am 30.07.2017 um 23:42 schrieb Eduardo Habkost : > > > CCing Alex, the original author of load_multiboot(), and Kevin, > who touched multiboot code recently. > > >> On Fri, Jul 28, 2017 at 02:28:34PM -0700, Anatol Pomozov wrote: >> Hi >> >> I am looking at

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-30 Thread Eduardo Habkost
CCing Alex, the original author of load_multiboot(), and Kevin, who touched multiboot code recently. On Fri, Jul 28, 2017 at 02:28:34PM -0700, Anatol Pomozov wrote: > Hi > > I am looking at x86 multiboot code and trying to add "ELF section > header" info feature. This will let target to learn

[Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-07-28 Thread Anatol Pomozov
Hi I am looking at x86 multiboot code and trying to add "ELF section header" info feature. This will let target to learn more about booted binary and its sections. I have a draft here https://github.com/anatol/qemu/commit/ad943a6eb78feee048b6bb2a1e5f49f5b686e24c My understanding is that qemu