public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@zembu.com>
To: brendan@dgs.monash.edu.au
Cc: binutils@sourceware.cygnus.com
Subject: Re: Using objdump to force a section to load with gdb.
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <19990618185152.22692.qmail@daffy.airs.com> (raw)
In-Reply-To: <3769EC4D.99196D87@dgs.monash.edu.au>

   Date: Fri, 18 Jun 1999 06:50:53 +0000
   From: Brendan Simon <brendan@dgs.monash.edu.au>

   > The best way to make a loadable section is to mark the section as
   > loadable in the first place.  See the gas documentation for how to set
   > the section flags when using the .section directive.

   I'm not sure if this is applicable when the section is added with "objcopy
   --add-section=image=vmlinux.gz", where vmlinux.gz is an elf file that has been
   compressed with gzip.  How does one add this file as a section to an existing
   elf file (bootloader) as "loadable in the first place" ?

You don't.  At the time that the executable has been created, the
program segments have been created.  objcopy is not currently capable
of modifying the program segment information.

Other than teaching objcopy how to modify program segments, one
approach you can use is to include the vmlinux.gz file in the link
which creates the executable in the first place.  Put it in the right
place with the linker script, and link against it using -b binary.  I
believe that is what the i386 Linux kernel build procedure does.

Ian

      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 Brendan Simon
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         ` SOLVED: " Brendan Simon
1999-07-01  0:00           ` Ian Lance Taylor
1999-07-01  0:00 ` Using objdump to force a section to load with gdb Ian Lance Taylor
1999-07-01  0:00   ` Brendan Simon
1999-07-01  0:00     ` Ian Lance Taylor [this message]

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=19990618185152.22692.qmail@daffy.airs.com \
    --to=ian@zembu.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=brendan@dgs.monash.edu.au \
    /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).