That seems like a lot of changes to the loader. What I try at the moment is to go through all the sections (like the getSections()-function in elf_object.cc) and write the section headers consecutively starting at ehdr->e_shoff. Then I can use this value in the kernel to access the section headers table. Do you think that could work?
On Thu, Jun 14, 2012 at 3:12 PM, Steve Reinhardt <[email protected]> wrote: > You could modify the loader to load the whole file into memory at a well > known address, then just use the per-section code to set up the section > pointers properly and not do any per-section loading. Would that work? > > On Thu, Jun 14, 2012 at 5:54 AM, Samuel Hitz <[email protected]>wrote: > >> I have managed to get the elf header at the beginning of the .text >> section and I can load every section I want, but I'm struggling with the >> section header table. As far as I can see there is no easy way to get it >> loaded by the system. >> Can someone give me some hints on how to achieve this and possibly tell >> the kernel where the section header table resides in memory? (possibly >> through a register which gets prefilled) >> >> Help is much appreciated. >> >> Best, >> >> Samuel >> >> On Tue, Jun 12, 2012 at 5:04 PM, Samuel Hitz <[email protected]>wrote: >> >>> Hi there, >>> >>> As far as I can see gem5 only loads .text, .data and .bss section of the >>> elf file. Is there an easy way to get it to load the entire elf file >>> inclusive all sections and the elf header? I have relocate my kernel at >>> some point during boot up and can only do so if I have the relocation >>> section and the header telling me where the sections are. >>> >>> Best, >>> >>> Samuel >>> >> >> >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> > > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
