DJGPP LD-script :( help wanted!!!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
matthias
Member
Member
Posts: 158
Joined: Fri Oct 22, 2004 11:00 pm
Location: Vlaardingen, Holland
Contact:

DJGPP LD-script :( help wanted!!!

Post 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]
The source of my problems is in the source.
bregma
Member
Member
Posts: 25
Joined: Tue Oct 26, 2004 11:00 pm
Location: the back woods
Contact:

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

Post 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.
User avatar
matthias
Member
Member
Posts: 158
Joined: Fri Oct 22, 2004 11:00 pm
Location: Vlaardingen, Holland
Contact:

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

Post by matthias »

Thanks I'll try that
The source of my problems is in the source.
Post Reply