.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* -*- linux-c -*- ------------------------------------------------------- * |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 1991, 1992 Linus Torvalds |
---|
4 | 5 | * Copyright 2007 rPath, Inc. - All Rights Reserved |
---|
5 | 6 | * Copyright 2009 Intel Corporation; author H. Peter Anvin |
---|
6 | | - * |
---|
7 | | - * This file is part of the Linux kernel, and is made available under |
---|
8 | | - * the terms of the GNU General Public License version 2. |
---|
9 | 7 | * |
---|
10 | 8 | * ----------------------------------------------------------------------- */ |
---|
11 | 9 | |
---|
.. | .. |
---|
27 | 25 | * error during initialization. |
---|
28 | 26 | */ |
---|
29 | 27 | |
---|
30 | | -static void __attribute__((section(".inittext"))) serial_putchar(int ch) |
---|
| 28 | +static void __section(".inittext") serial_putchar(int ch) |
---|
31 | 29 | { |
---|
32 | 30 | unsigned timeout = 0xffff; |
---|
33 | 31 | |
---|
.. | .. |
---|
37 | 35 | outb(ch, early_serial_base + TXR); |
---|
38 | 36 | } |
---|
39 | 37 | |
---|
40 | | -static void __attribute__((section(".inittext"))) bios_putchar(int ch) |
---|
| 38 | +static void __section(".inittext") bios_putchar(int ch) |
---|
41 | 39 | { |
---|
42 | 40 | struct biosregs ireg; |
---|
43 | 41 | |
---|
.. | .. |
---|
49 | 47 | intcall(0x10, &ireg, NULL); |
---|
50 | 48 | } |
---|
51 | 49 | |
---|
52 | | -void __attribute__((section(".inittext"))) putchar(int ch) |
---|
| 50 | +void __section(".inittext") putchar(int ch) |
---|
53 | 51 | { |
---|
54 | 52 | if (ch == '\n') |
---|
55 | 53 | putchar('\r'); /* \n -> \r\n */ |
---|
.. | .. |
---|
60 | 58 | serial_putchar(ch); |
---|
61 | 59 | } |
---|
62 | 60 | |
---|
63 | | -void __attribute__((section(".inittext"))) puts(const char *str) |
---|
| 61 | +void __section(".inittext") puts(const char *str) |
---|
64 | 62 | { |
---|
65 | 63 | while (*str) |
---|
66 | 64 | putchar(*str++); |
---|