public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Brendan Simon <brendan@dgs.monash.edu.au>
To: Jonathan Larmour <jlarmour@cygnus.co.uk>,
	Magnus Damm <eramdam@kieray1.p.y.ki.era.ericsson.se>,
	Dan Malek <dmalek@jlc.net>, gdb <gdb@sourceware.cygnus.com>,
	binutils <binutils@sourceware.cygnus.com>
Subject: SOLVED: objdump or gdb to force a section to load ?
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <376996F2.1F150FCF@dgs.monash.edu.au> (raw)
In-Reply-To: <37699391.2CF83050@cygnus.co.uk>

I think I've solved the "load" flag problem.  I can't confirm it on my target but
objdump seems to report the right things.

Jonathan Larmour wrote:

> Try changing this to:
>
>       $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
>        --add-section=image=../coffboot/vmlinux.gz \
>        --set-section-flags=image=load,data \
>        --adjust-section-vma=image=????
>        zvmlinux.tmp $@
>
> Choose an appropriate ???? - read the objcopy man page for details of this
> arg. And when you have something working, recommend the ppc-linux folks
> making the same change to the main makefiles since I believe it should be
> harmless for normal usage (although you may want to verify).

I tried something similar before I got your email.  I thought that objcopy might be
doing something funny because the vma was zero.
objcopy --adjust-section-vma=image=0x00100000 tempImage relocImage
objcopy --set-section-flags=image=load
This still does not work.  I can however set some other attributes such as READONLY.

I tried a few combinations and found that
"--set-section-flags=image=load,alloc,readonly" does work even thought it complains
with "BFD: sta00639: warning: allocated section `image' not in segment".  I then
tried the same options on the original file (with out any section vma offsets) and it
also worked.  I guess it was just a matter of finding the right combinations of flags
and putting them in the right order.  HOPEFULLY gdb will now load the image section
but I wont be able to confirm this until I get home tonight.

Thanks for your help.
Brendan Simon.



  parent reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Using objdump to force a section to load with gdb Brendan Simon
1999-07-01  0:00 ` Ian Lance Taylor
1999-07-01  0:00   ` Brendan Simon
1999-07-01  0:00     ` Ian Lance Taylor
1999-07-01  0:00 ` objdump or gdb to force a section to load ? Brendan Simon
1999-07-01  0:00   ` Jonathan Larmour
     [not found]     ` <376981EF.BE10D7C8@dgs.monash.edu.au>
     [not found]       ` <37699391.2CF83050@cygnus.co.uk>
1999-07-01  0:00         ` Brendan Simon [this message]
1999-07-01  0:00           ` SOLVED: " Ian Lance Taylor

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=376996F2.1F150FCF@dgs.monash.edu.au \
    --to=brendan@dgs.monash.edu.au \
    --cc=binutils@sourceware.cygnus.com \
    --cc=dmalek@jlc.net \
    --cc=eramdam@kieray1.p.y.ki.era.ericsson.se \
    --cc=gdb@sourceware.cygnus.com \
    --cc=jlarmour@cygnus.co.uk \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).