hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/alpha/kernel/module.c
....@@ -1,19 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* Kernel module help for Alpha.
23 Copyright (C) 2002 Richard Henderson.
34
4
- This program is free software; you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation; either version 2 of the License, or
7
- (at your option) any later version.
8
-
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with this program; if not, write to the Free Software
16
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
175 */
186 #include <linux/moduleloader.h>
197 #include <linux/elf.h>
....@@ -158,10 +146,8 @@
158146 base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr;
159147 symtab = (Elf64_Sym *)sechdrs[symindex].sh_addr;
160148
161
- /* The small sections were sorted to the end of the segment.
162
- The following should definitely cover them. */
163
- gp = (u64)me->core_layout.base + me->core_layout.size - 0x8000;
164149 got = sechdrs[me->arch.gotsecindex].sh_addr;
150
+ gp = got + 0x8000;
165151
166152 for (i = 0; i < n; i++) {
167153 unsigned long r_sym = ELF64_R_SYM (rela[i].r_info);
....@@ -224,7 +210,7 @@
224210 STO_ALPHA_STD_GPLOAD)
225211 /* Omit the prologue. */
226212 value += 8;
227
- /* FALLTHRU */
213
+ fallthrough;
228214 case R_ALPHA_BRADDR:
229215 value -= (u64)location + 4;
230216 if (value & 3)