This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
In the linkfile, something along the lines of: MEMORY { ROM : ORIGIN = 0x00000000, LENGTH = 0x020000 RAM : ORIGIN = 0x00020000, LENGTH = 0x001000 } will cause the linker to fail if the size of a section is exceeded. -Andrew John Clarke wrote: > > On Tue, Apr 17, 2001 at 11:19:41PM -0500, Andrew Pines wrote: > > > SECTIONS > > { > > .text : > > { > > _text = .; /* start of text */ > > *(.rodata) /* read only data (in ROM) */ > > *(.text) /* code */ > > _etext = .; /* end of text */ > > } >ROM > > > > .data : AT (ADDR(.text) + SIZEOF(.text)) /* place initialized > > data after read only data in ROM, but reference to it in RAM */ > > { > > _data = .; /* RAM location of initialized data */ > > *(.data) > > _edata = .; /* end of data, used to copy initialized > > data at start up */ > > } >RAM > > What happens if SIZEOF(.text) + SIZEOF(.data) is greater than the size > of the ROM area? Is there any way to have the linker produce a warning > or an error? > > Cheers, > > John > -- > whois !JC774-AU@whois.aunic.net > > ------ > Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com -- Andrew Pines apines@cosmodog.com http://www.cosmodog.com ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |