This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / ld / testsuite / ld-scripts / memory.t
1 MEMORY
2 {
3 TEXTMEM (ARX) : ORIGIN = 0x100, LENGTH = 32K
4 DATAMEM (AW) : org = 0x1000, l = (64 * 1024)
5 }
6
7 SECTIONS
8 {
9 . = 0;
10 .text :
11 {
12 /* The value returned by the ORIGIN operator is a constant.
13 However it is being assigned to a symbol declared within
14 a section. Therefore the symbol is section-relative and
15 its value will include the offset of that section from
16 the start of memory. ie the declaration:
17 text_start = ORIGIN (TEXTMEM);
18 here will result in text_start having a value of 0x200.
19 Hence we need to subtract the absolute value of the
20 location counter at this point in order to give text_start
21 a value that is truely absolute, and which coincidentally
22 will allow the tests in script.exp to work. */
23
24 text_start = ORIGIN(TEXTMEM) - ABSOLUTE (.);
25 *(.text)
26 *(.pr)
27 text_end = .;
28 } > TEXTMEM
29
30 data_start = ORIGIN (DATAMEM);
31 .data :
32 {
33 *(.data)
34 *(.rw)
35 data_end = .;
36 } >DATAMEM
37
38 fred = ORIGIN(DATAMEM) + LENGTH(DATAMEM);
39 }
This page took 0.030953 seconds and 5 git commands to generate.