Re: make vmlinux .bss PROGBITS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 6, 2020 at 1:11 PM Valdis Klētnieks <valdis.kletnieks@xxxxxx> 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@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux