diff options
Diffstat (limited to 'arch/sh/kernel/module.c')
| -rw-r--r-- | arch/sh/kernel/module.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index 1b525dedd29a..a469a80840d3 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* Kernel module help for SH. SHcompact version by Kaz Kojima and Paul Mundt. @@ -9,20 +10,6 @@ Based on the sh version, and on code from the sh64-specific parts of modutils, originally written by Richard Curnow and Ben Gaster. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/moduleloader.h> #include <linux/elf.h> @@ -31,7 +18,7 @@ #include <linux/fs.h> #include <linux/string.h> #include <linux/kernel.h> -#include <asm/unaligned.h> +#include <linux/unaligned.h> #include <asm/dwarf.h> int apply_relocate_add(Elf32_Shdr *sechdrs, @@ -59,15 +46,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, + ELF32_R_SYM(rel[i].r_info); relocation = sym->st_value + rel[i].r_addend; -#ifdef CONFIG_SUPERH64 - /* For text addresses, bit2 of the st_other field indicates - * whether the symbol is SHmedia (1) or SHcompact (0). If - * SHmedia, the LSB of the symbol needs to be asserted - * for the CPU to be in SHmedia mode when it starts executing - * the branch target. */ - relocation |= !!(sym->st_other & 4); -#endif - switch (ELF32_R_TYPE(rel[i].r_info)) { case R_SH_NONE: break; |
