| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| Message-ID: | <466093e1$0$77049$cc7c7865@news.luth.se> |
| From: | Martin Str|mberg <ams AT brother DOT ludd DOT ltu DOT se> |
| Subject: | Re: Loading text & data section into different segments |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <1179221506 DOT 644176 DOT 216690 AT e51g2000hsg DOT googlegroups DOT com> |
| User-Agent: | tin/1.4.7-20030322 ("Suggestions") (UNIX) (SunOS/5.9 (sun4u)) |
| Date: | 01 Jun 2007 21:47:13 GMT |
| Lines: | 41 |
| NNTP-Posting-Host: | brother.ludd.ltu.se |
| X-Trace: | 1180734433 news.luth.se 77049 130.240.16.78 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
sampath4u AT gmail DOT com wrote:
> 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
The load addresses are physical load address (IIRC). You want VMA
(virtual memory address). Examine the ld documentation carefully with
regard to LMA and VMA.
Right,
Martin
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |