Page 1 of 1

DJGPP LD-script :( help wanted!!!

Posted: Sun Dec 26, 2004 12:00 am
by matthias
Hello everyone,

I have a seroius problem with my LD-linkerscript maybe you can help me:

Code: Select all


OUTPUT_FORMAT("binary")
OUTPUT_ARCH(i386)
ENTRY("start")
SECTIONS
{
	.text 0x100000:
	{
		code = .; _code = .; __code = .;
		*(.text)
		. = ALIGN(4096);
	}

	.data:
	{
		__CTOR_LIST__ = .; LONG((_CTOR_END__ - __CTOR_LIST__) / 4 - 2) *(.ctors) LONG(0) __CTOR_END__ = .;
		__DTOR_LIST__ = .; LONG((_DTOR_END__ - __DTOR_LIST__) / 4 - 2) *(.dtors) LONG(0) __DTOR_END__ = .;

		data = .; _data = .; __data = .;
		*(.data)
		. = ALIGN(4096);
	}

	.bss:
	{
		bss = .; _bss = .; __bss = .;
		*(.bss)
		. = ALIGN(4096);
	}

	end = .; _end = .; __end = .;
}

When I use this I get the error:

c:/djgpp/bin/ld.ex:kernel.ld:14: parse error

I don't know what's wrong, I even tried it in Linux :(

Can you help me?[/code]

Re: DJGPP LD-script :( help wanted!!!

Posted: Mon Dec 27, 2004 12:00 am
by bregma
matthias wrote: .data:
{
....
}

When I use this I get the error:

c:/djgpp/bin/ld.ex:kernel.ld:14: parse error
Try putting a space between the section name and the colon.

Re: DJGPP LD-script :( help wanted!!!

Posted: Mon Dec 27, 2004 12:00 am
by matthias
Thanks I'll try that