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:
pgpti8mDqvyC4.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies