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


[-- Attachment #1.1: Type: text/plain, Size: 1097 bytes --]

On Tue, 06 Oct 2020 13:56:11 -0500, William Tambe said:
> 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.

Sounds like a buggy loader if it can't reserve a .bss segment. I mean,
how hard is that to get right?

Or are you saying that your linker is buggy, and won't output an entry
sizing the.bss unless it's got bits set, at which point your loader never
sees a .bss entry and things go pear shaped?

> 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.

So now you have a buggy linker or loader and a custom kernel hack that you'll
have to maintain and rework every time you upgrade the kernel.

Probably more productive to figure out why you're hitting this issue when
pretty much nobody else is...



[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

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

      reply	other threads:[~2020-10-06 23:53 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
2020-10-06 23:52     ` Valdis Klētnieks [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=138876.1602028335@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=tambewilliam@gmail.com \
    /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).