~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 9bcce9af02144e64cb03f540e268a53428236419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2022 Google LLC
 *
 * Program containing two text sections
 */

int __attribute__((section(".sram_data"))) data[29];

int __attribute__((section(".sram_code"))) calculate(int x)
{
	data[0] = x;

	return x * x;
}

int main(void)
{
	return calculate(123);
}