From a73f6b51549af5a89dc65947fd7ddb2689db2f2c Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 13 Jan 2003 04:58:21 -0800 Subject: [PATCH] [PATCH] Use `--unique=.gnu.linkonce.this_module' linker flag for modules on v850 This prevents the linker from merging the .gnu.linkonce.this_module section into the .text section, which is necessary for modules to load correctly. --- arch/v850/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/v850/Makefile b/arch/v850/Makefile index 0ab6a10ff973..d8341af1300a 100644 --- a/arch/v850/Makefile +++ b/arch/v850/Makefile @@ -1,8 +1,8 @@ # # arch/v850/Makefile # -# Copyright (C) 2001,02 NEC Corporation -# Copyright (C) 2001,02 Miles Bader +# Copyright (C) 2001,02,03 NEC Corporation +# Copyright (C) 2001,02,03 Miles Bader # # This file is included by the global makefile so that you can add your own # architecture-specific flags and dependencies. Remember to do have actions @@ -22,6 +22,11 @@ CFLAGS += -ffixed-r16 -mno-prolog-function CFLAGS += -fno-builtin CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" +# This prevents the linker from consolidating the .gnu.linkonce.this_module +# section into .text (which the v850 default linker script for -r does for +# some reason) +LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module + LDFLAGS_BLOB := -b binary --oformat elf32-little OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e -- 2.39.5