[syslinux] isolinux-debug: Approaching overflow

Gene Cumm gene.cumm at gmail.com
Wed Mar 25 19:53:23 PDT 2009


While attempting to work on implementing readdir in ISOLINUX, I made
it large enough that it overflowed for isolinux-debug.

$ make all
nasm -O9999 -f elf -g -F stabs -DDATE_STR="'pre11-112-g930881b*'" \
                -DHEXDATE="0x49caaf5b" \
                -l isolinux.lsr -o isolinux.o isolinux.asm
ld -m elf_i386  -T syslinux.ld -M -o isolinux.elf isolinux.o > isolinux.map
objdump -h isolinux.elf > isolinux.sec
perl lstadjust.pl isolinux.lsr isolinux.sec isolinux.lst
objcopy -O binary isolinux.elf isolinux.bin
perl checksumiso.pl isolinux.bin
nasm -O9999 -f elf -g -F stabs -DDATE_STR="'pre11-112-g930881b*'" \
                -DHEXDATE="0x49caaf5b" \
                -l isolinux-debug.lsr -o isolinux-debug.o isolinux-debug.asm
ld -m elf_i386  -T syslinux.ld -M -o isolinux-debug.elf
isolinux-debug.o > isolinux-debug.map
ld: 64K overflow
ld: 64K overflow
isolinux-debug.o: In function `msg_filename':
isolinux-debug.asm:(.text+0x202d): relocation truncated to fit:
R_386_16 against `.bss1'
isolinux-debug.o: In function `msg_viewimage':
isolinux-debug.asm:(.text+0x2049): relocation truncated to fit:
R_386_16 against `.bss1'
ld: 64K overflow
make: *** [isolinux-debug.elf] Error 1

Examining isolinux-debug.map, .bss1 seems to be ending just above the
64kiB mark, mostly because .adv gets incremented up (0xB200 to
0xB400).

Am I correct in assuming that it would either require reworking the
layout or adding another true segment to be able to handle this?
Doing another true segment would probably require storing a handle in
a .bss type section and initializing early.  A quick idea on the
layout might be moving .adv to the top but unfortunately I don't
understand enough about the thoughts surrounding the layout.




More information about the Syslinux mailing list