Linker Script Problem

So I have the following linker script which I put together for a project of mine, but I appear to be having issues. When I load it into arm-elf-gdb I get the following error:

“Dwarf Error: wrong version in compilation unit header (is 0, should be 2) [in module main.elf]”

To see whether or not it’s an obvious error in the linker script, I attached the linker script to this post. I looked around, and the only suggestions I could find were on this forum “Move the debug section to the top of the sections part of the linker script” and a bunch of people with similar issues (on other forums), but different actual numbers. Something like “is 255, should be 2.” From what I can guess, I assume that this error is coming out of the fact that the linker script is not putting the “.debug_info” section (or similar) at 0, as it’s meant to be.

For the processor: this is an LPC2388.

The environment: gcc-4.4.0, gdb-6.8, binuntils-2.20.1, and newlib-1.18.0

And I compile it using the following lines:

arm-elf-gcc -Wall -Werror -mcpu=arm7tdmi -g -c crt0.s -o crt0.o

arm-elf-gcc -Wall -Werror -mcpu=arm7tdmi -g -c main.c -o main.o

arm-elf-gcc -Wall -Werror -mcpu=arm7tdmi -g -Tlinker_script.ld -nostartfiles crt0.o main.o -o main.elf

Anyway, anyone who can tell me what I’m doing wrong would be hugely helpful! Thanks in advanced!

I apparently misunderstood the meaning of the (NOLOAD) tag. I thought that it would prevent GDB from loading that data onto a target, but apparently it is preventing the linke from loading the information into the elf file. After removing those lines it now appears to be working!

Is there something similar to what I thought noload did? Or by default are debugging symbols not loaded to a target?