[syslinux] syslinux current dir
Wagner Ferenc
wferi at niif.hu
Sat May 26 00:22:12 PDT 2007
"H. Peter Anvin" <hpa at zytor.com> writes:
> Wagner Ferenc wrote:
>> "H. Peter Anvin" <hpa at zytor.com> writes:
>>
>>>> Is there a way to get syslinux symbol information into gdb?
>>> Unfortunately I don't think so.
>>
>> I had some success by generating a dummy as source file full of .stabs
>> directives, based on ldlinux.map. It lets me insert breakpoints via
>> labels at least. However, nasm can generate stabs info for the elf
>> output format, which would be more fun to use. If only ldlinux.asm
>> could be assembled into elf format. Problems start at the org
>> directive, which is accepted for the bin format only... Can't you
>> perhaps think of a way around? Then the debugging info could be
>> loaded from that after gdb was attached to qemu.
>
> That can be dealt with with a linker script, but what's a much bigger
> problem is cross-section references, which are harder to represent in NASM.
>
> For ELF, you would just drop the org directive (which just tells the bin
> format linker where the file starts) and instead use the linker script,
> or even a post-processing script. Easy enough.
Well, not really. Dropping the org directive resulted in:
$ nasm -O99 -f elf -DDATE_STR="'0x4656f708'" -DHEXDATE="0x4656f708" -o ldlinux.elf ldlinux.asm
ldlinux.asm:72: warning: section attributes ignored on redeclaration of section `.stack'
ldlinux.asm:93: warning: section attributes ignored on redeclaration of section `.stack'
ldlinux.asm:563: error: TIMES value -75 is negative
ldlinux.asm:751: error: Sector 1 overflow
and I got lost. Looks like size computation gone wrong, and
commenting it resulted in
cpuinit.inc:45: error: symbol `section..bcopy32.start' undefined
ui.inc:110: error: short jump is out of range
ui.inc:177: error: short jump is out of range
configinit.inc:25: error: symbol `section..config.start' undefined
configinit.inc:26: error: symbol `section..config.vstart' undefined
configinit.inc:27: error: symbol `section..config.end.start' undefined
ldlinux.asm:1689: error: phase error detected at end of assembly.
where I gave up. I didn't care about linker scripts, I aimed for much
less: just wanted to extract the debugging info out of the elf, not to
use the code within.
--
Feri.
More information about the Syslinux
mailing list