1.1 --- a/lib/payload.c Sat Oct 27 21:51:40 2018 +0200
1.2 +++ b/lib/payload.c Sat Oct 27 23:38:27 2018 +0200
1.3 @@ -21,7 +21,7 @@
1.4
1.5
1.6
1.7 -extern uint8_t _data_original, _data, _bss;
1.8 +extern uint8_t _data_original[], _data[], _bss[];
1.9
1.10 /* These are defined using SIZEOF and their table entries contain actual values.
1.11 The "address" provided by each entry is therefore the value! */
1.12 @@ -32,7 +32,7 @@
1.13
1.14 void relocate_data(void)
1.15 {
1.16 - uint8_t *original = &_data_original, *current = &_data,
1.17 + uint8_t *original = _data_original, *current = _data,
1.18 *limit = original + (uint32_t) &_data_size;
1.19
1.20 /* Copy data from program memory to the relocated data area in RAM. */
1.21 @@ -45,7 +45,7 @@
1.22
1.23 void init_bss(void)
1.24 {
1.25 - uint8_t *current = &_bss, *limit = current + (uint32_t) &_bss_size;
1.26 + uint8_t *current = _bss, *limit = current + (uint32_t) &_bss_size;
1.27
1.28 while (current < limit)
1.29 *current++ = 0;