kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: William Tambe <tambewilliam@gmail.com>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: Kernel Newbies <kernelnewbies@kernelnewbies.org>
Subject: Re: make vmlinux .bss PROGBITS
Date: Tue, 6 Oct 2020 13:56:11 -0500	[thread overview]
Message-ID: <CAF8i9mNR1Xggu1SMn-gu4wDxYCbqMQ3KoK88sogX+zgwcNW35w@mail.gmail.com> (raw)
In-Reply-To: <123123.1602007865@turing-police>

On Tue, Oct 6, 2020 at 1:11 PM Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
>
> On Tue, 06 Oct 2020 08:17:44 -0500, William Tambe said:
> > How can I modify Makefile such that when vmlinux is created, following
> > command is run on vmlinux to make section .bss PROGBITS:
> > objcopy --set-section-flags .bss=alloc,load,contents
>
> Remember - vmlinux isn't going to be loaded by the userspace loader,
> but rather by a bootstrap loader.  So those flags probably don't actually
> do what you think they do.

We have a loader that loads vmlinux.bin (created from vmlinux using
objcopy -O binary), however if section .bss is not PROGBITS,
vmlinux.bin does not include that space, which the loader will not
reserve; by allocating that space in vmlinux.bin the loader also
reserves that space.
To solve the problem we are looking to make section .bss PROBGITS
using objcopy --set-section-flags .bss=alloc,load,contents , but it is
not trivial how to modify the Linux Makefile to achieve that.

>
> For that matter, what *do* you think they do, and what problem are you
> trying to solve with them?
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-10-06 18:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 13:17 make vmlinux .bss PROGBITS William Tambe
2020-10-06 18:11 ` Valdis Klētnieks
2020-10-06 18:56   ` William Tambe [this message]
2020-10-06 23:52     ` Valdis Klētnieks

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=CAF8i9mNR1Xggu1SMn-gu4wDxYCbqMQ3KoK88sogX+zgwcNW35w@mail.gmail.com \
    --to=tambewilliam@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=valdis.kletnieks@vt.edu \
    /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 NNTP newsgroup(s).