X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: sampath4u AT gmail DOT com Newsgroups: comp.os.msdos.djgpp Subject: Loading text & data section into different segments Date: 15 May 2007 02:31:46 -0700 Organization: http://groups.google.com Lines: 38 Message-ID: <1179221506.644176.216690@e51g2000hsg.googlegroups.com> NNTP-Posting-Host: 203.200.194.71 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1179221506 27527 127.0.0.1 (15 May 2007 09:31:46 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Tue, 15 May 2007 09:31:46 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse AT google DOT com Injection-Info: e51g2000hsg.googlegroups.com; posting-host=203.200.194.71; posting-account=TQFRng0AAAABZquc8fWDGlJAwYDFxgG5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello all, I am using the following script to load text and data in different segments but its not working. can anyone point to the problems in this ??? OUTPUT_FORMAT("coff-go32") SECTIONS { .text 0x00000000 : { *(.text) . = ALIGN(4096); etext = .;_etext = .;} .data 0x00000000: { *(.data) . = ALIGN(4096); edata = .;_edata = .;} .bss : { *(.bss) *(COMMON) . = ALIGN(4096); end = .;_end = .;}} I am using DJGPP.when I use this script along with ld it gives the following error... ld --oformat coff-go32 -Tld.scr file1.o error:Section .data overlaps .text section My intention is to load .text and .data into different segments.If I use 0x00000000 only in .text then, data gets continuous address.so when I load data in different location it leaves .text size space and then copies the data section.It works fine except for the wastage of .text size memory at the beginning of data segment. Rgds, sampath S