objdump or gdb to force a section to load ?

Jonathan Larmour jlarmour@cygnus.co.uk
Thu Jun 17 09:08:00 GMT 1999


In article < 37685993.EB50E446@dgs.monash.edu.au > you write:
>I sent this a while ago and got no response.  I'm resending it just in case
>it got lost.

All of 24 hours before. Perhaps you need to be more patient.

>> I have a linux kernel compiled for a mpc860 target and am trying to get
>> it to run by downloading it into memory using a background debugger
>> (BDM).  The boot code gets to the point where it trys to uncompress the
>> kernel but fails because the image isn't loaded into memory (only .text,
>> .rodata and .data are loaded).  I tried using objcopy to set the "image"
>> section to "load" but it does not seem to work.  How can I get gdb to
>> load the image section (either using a gdb command or binutils) ?

If it isn't marked as loadable, then you probably can't. It hasn't even got
an address for it to be loaded into. If it is to be loaded then it is the
build process (using the linker script) that has to make it loadable.

Perhaps an easier approach would be to use an uncompressed kernel rather than
a zImage.

A ppc-linux list may be able to give more specific advice about why the
linker scripts are the way they are.

Jifl
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault


More information about the Gdb mailing list