summaryrefslogtreecommitdiff
path: root/libmisc/intercept.c
blob: d0e360258f416c6bad0fafd0d8e1f5e782313db4 (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();
}