[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] bootstrap code



Greg Ungerer wrote:

> jozsef imrek wrote:
> 
>> On Wed, 12 May 2004, Greg Ungerer wrote:
>>
>>> Ok, interresting. Can objcopy also create/set values in the program
>>> headers?
>>
>>
>> i just did not have too much time to spend on this, and found no positive
>> answer up to now. anyone else with more expereince?
>>
>> i think some post linking solution would be prefered, so that the kernel
>> would not depend on an already built filesystem (and thus compiled
>> applications, which themselves depend on kernel headers...).
> 
> 
> I really don't like link methods that rely on building applications
> first. They should be avoided at all costs.

Seems to me the real deficiency here is in objcopy - its apparent 
inability to place post-link sections into segments requires either 
double-link tricks or non-compliant elf loaders.

We just need something like

# create new segment
objcopy --add-segment=.romfs	
# add section into segment
objcopy --add-section=.romfs=$(ROMFSIMG) --segment=.romfs ...

Or maybe we could even write little hack tool that post processes an elf 
image and links the .romfs section into one of the existing segments? 
The little I have seen of the BFD API in elf2flt suggests this shouldn't 
be too hard... maybe :)

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/