]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Use `--unique=.gnu.linkonce.this_module' linker flag for modules on v850
authorMiles Bader <miles@lsi.nec.co.jp>
Mon, 13 Jan 2003 12:58:21 +0000 (04:58 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 13 Jan 2003 12:58:21 +0000 (04:58 -0800)
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

index 0ab6a10ff973d71c8f8134b9bdcd01d32aa8a76c..d8341af1300abc6623da32aa603f4be8c7931be9 100644 (file)
@@ -1,8 +1,8 @@
 #
 # arch/v850/Makefile
 #
-#  Copyright (C) 2001,02  NEC Corporation
-#  Copyright (C) 2001,02  Miles Bader <miles@gnu.org>
+#  Copyright (C) 2001,02,03  NEC Corporation
+#  Copyright (C) 2001,02,03  Miles Bader <miles@gnu.org>
 #
 # 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