Ensure proper alignment of subsections.
Also, do a better job of halting build on a failure in checkrom.py
This commit is contained in:
parent
2fda7cbb23
commit
9bcc527d2c
4
Makefile
4
Makefile
|
@ -103,10 +103,10 @@ $(OUT)rom16.o: $(OUT)romlayout16.o $(OUT)rom32.notreloc.o $(OUT)rombios16.lds
|
|||
$(OUT)rom32.o: $(OUT)rom16.o $(OUT)romlayout32.o $(OUT)rombios32.lds
|
||||
@echo " Linking $@"
|
||||
$(Q)ld -T $(OUT)rombios32.lds $(OUT)rom16.o $(OUT)romlayout32.o -o $@
|
||||
$(Q)nm $@ | ./tools/checkrom.py
|
||||
|
||||
$(OUT)bios.bin.elf: $(OUT)rom32.o
|
||||
@echo " Stripping $<"
|
||||
@echo " Prepping $@"
|
||||
$(Q)nm $< | ./tools/checkrom.py
|
||||
$(Q)strip $< -o $@
|
||||
|
||||
$(OUT)bios.bin: $(OUT)bios.bin.elf
|
||||
|
|
|
@ -14,7 +14,13 @@ SECTIONS
|
|||
.text BUILD_BIOS_ADDR : {
|
||||
code32_start = . ;
|
||||
*(.text)
|
||||
|
||||
. = ALIGN(16) ;
|
||||
code32_rodata = . ;
|
||||
*(.rodata*)
|
||||
|
||||
. = ALIGN(16) ;
|
||||
code32_data = . ;
|
||||
*(.data)
|
||||
code32_end = . ;
|
||||
|
||||
|
|
|
@ -17,8 +17,11 @@ def main():
|
|||
except:
|
||||
pass
|
||||
|
||||
if syms['code16_start'] != syms['_code32_code16_start']:
|
||||
print "Error! 16bit code moved during linking"
|
||||
c16s = syms['code16_start']
|
||||
c32s = syms['_code32_code16_start']
|
||||
if c16s != c32s:
|
||||
print "Error! 16bit code moved during linking (0x%x vs 0x%x)" % (
|
||||
c32s, c16s)
|
||||
sys.exit(1)
|
||||
|
||||
size16 = syms['code16_end'] - syms['code16_start']
|
||||
|
|
Loading…
Reference in New Issue