summaryrefslogtreecommitdiff
path: root/libmisc/intercept.c
blob: 30870bf6365bde7c9d2ef49f2ff7f593692ef4ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* libmisc/intercept.c - Interceptable ("weak") functions
 *
 * Copyright (C) 2024-2025  Luke T. Shumaker <lukeshu@lukeshu.com>
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

#include <stdio.h>  /* for putchar() */
#include <stdlib.h> /* for abort() */

#include <libmisc/_intercept.h>

[[gnu::weak]]
void __lm_putchar(unsigned char c) {
	(void) putchar(c);
}

[[gnu::weak]]
void __lm_abort(void) {
	abort();
}