* [PATCH] Use `--unique=.gnu.linkonce.this_module' linker flag for modules on v850
@ 2003-01-14 4:37 Miles Bader
0 siblings, 0 replies; only message in thread
From: Miles Bader @ 2003-01-14 4:37 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
This prevents the linker from merging the .gnu.linkonce.this_module section
into the .text section, which is necessary for modules to load correctly.
diff -ruN -X../cludes linux-2.5.57-uc0.orig/arch/v850/Makefile linux-2.5.57-uc0/arch/v850/Makefile
--- linux-2.5.57-uc0.orig/arch/v850/Makefile 2002-12-16 12:53:44.000000000 +0900
+++ linux-2.5.57-uc0/arch/v850/Makefile 2003-01-14 11:16:53.000000000 +0900
@@ -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 += -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-14 4:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 4:37 [PATCH] Use `--unique=.gnu.linkonce.this_module' linker flag for modules on v850 Miles Bader
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).