summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/pr18963.t
blob: 830ded78dd916d6f505e1909f8faaef8ca25b4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SECTIONS
{
  . = 0x80000;
  A = .;
  .text :
  {
    _start = .;
    *(.text)
    . = 0x10000;
  }
  B = .;
  .data :
  {
    *(.data)
    . = 0x10000;
  }
  C = .;
  .bss :
  {
    *(.bss)
    . = 0x10000;
  }
  D = A - C + B;
  E = A + B - C;
  /DISCARD/ : {*(*)}
}

ASSERT(D == E, "Addition is not commutative");