Use 'size -B' instead of 'size -G' to determine BSS size.

The -G option is a relatively recent addition, so fails on older
systems (issue #11).
This commit is contained in:
Martin Whitaker 2021-09-02 18:11:30 +01:00
parent a4afd784ce
commit abbee1a25f
3 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
#include "string.h"
#define DEBUG 0
#define DEBUG 1
//------------------------------------------------------------------------------
// Constants

View File

@ -101,11 +101,11 @@ memtest_shared.bin: memtest_shared
objcopy -O binary $< memtest_shared.bin
memtest.bin: memtest_shared.bin boot/bootsect.o boot/setup.o ldscripts/memtest_bin.lds
$(eval SIZES=$(shell size -G -d memtest_shared | grep memtest_shared))
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_bin.lds boot/bootsect.o boot/setup.o -b binary memtest_shared.bin -o memtest.bin
memtest.efi: memtest_shared.bin boot/header.o boot/setup.o ldscripts/memtest_efi.lds
$(eval SIZES=$(shell size -G -d memtest_shared | grep memtest_shared))
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/header.o boot/setup.o -b binary memtest_shared.bin -o memtest.efi
memtest.mbr: memtest_shared.bin boot/mbr.o ldscripts/memtest_mbr.lds

View File

@ -100,11 +100,11 @@ memtest_shared.bin: memtest_shared
objcopy -O binary $< memtest_shared.bin
memtest.bin: memtest_shared.bin boot/bootsect.o boot/setup.o ldscripts/memtest_bin.lds
$(eval SIZES=$(shell size -G -d memtest_shared | grep memtest_shared))
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_bin.lds boot/bootsect.o boot/setup.o -b binary memtest_shared.bin -o memtest.bin
memtest.efi: memtest_shared.bin boot/header.o boot/setup.o ldscripts/memtest_efi.lds
$(eval SIZES=$(shell size -G -d memtest_shared | grep memtest_shared))
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/header.o boot/setup.o -b binary memtest_shared.bin -o memtest.efi
memtest.mbr: memtest_shared.bin boot/mbr.o ldscripts/memtest_mbr.lds