All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  Prevent .gnu.linkonce.this_module section from being merged with other sections
@ 2003-01-09  9:49 Miles Bader
  2003-01-10  8:32 ` Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Miles Bader @ 2003-01-09  9:49 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

As I mentioned in an earlier email, this is necessary on the v850
because the default -r linker-script merges .gnu.linkonce.t* into the
.text output section.  I don't think it will hurt any other platforms.

diff -ruN -X../cludes linux-2.5.55-moo.orig/Makefile linux-2.5.55-moo/Makefile
--- linux-2.5.55-moo.orig/Makefile	2003-01-09 14:03:45.000000000 +0900
+++ linux-2.5.55-moo/Makefile	2003-01-09 14:07:36.000000000 +0900
@@ -163,7 +164,7 @@
 MODFLAGS	= -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
-LDFLAGS_MODULE  = -r
+LDFLAGS_MODULE  = -r --unique=.gnu.linkonce.this_module
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Prevent .gnu.linkonce.this_module section from being merged with other sections
  2003-01-09  9:49 [PATCH] Prevent .gnu.linkonce.this_module section from being merged with other sections Miles Bader
@ 2003-01-10  8:32 ` Rusty Russell
  2003-01-10  9:39   ` Miles Bader
  0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2003-01-10  8:32 UTC (permalink / raw)
  To: Miles Bader; +Cc: linux-kernel

In message <20030109094923.63723374A@mcspd15.ucom.lsi.nec.co.jp> you write:
> --- linux-2.5.55-moo.orig/Makefile	2003-01-09 14:03:45.000000000 +0900
> +++ linux-2.5.55-moo/Makefile	2003-01-09 14:07:36.000000000 +0900
> @@ -163,7 +164,7 @@
>  MODFLAGS	= -DMODULE
>  CFLAGS_MODULE   = $(MODFLAGS)
>  AFLAGS_MODULE   = $(MODFLAGS)
> -LDFLAGS_MODULE  = -r
> +LDFLAGS_MODULE  = -r --unique=.gnu.linkonce.this_module

No!  Does this not work?

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.55/arch/v850/Makefile working-2.5.55-strlen/arch/v850/Makefile
--- linux-2.5.55/arch/v850/Makefile	2003-01-02 12:46:15.000000000 +1100
+++ working-2.5.55-strlen/arch/v850/Makefile	2003-01-10 19:32:09.000000000 +1100
@@ -24,7 +24,7 @@ CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uC
 
 LDFLAGS_BLOB := -b binary --oformat elf32-little
 OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e
-
+LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module
 
 HEAD := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o
 core-y += $(arch_dir)/kernel/

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Prevent .gnu.linkonce.this_module section from being merged with other sections
  2003-01-10  8:32 ` Rusty Russell
@ 2003-01-10  9:39   ` Miles Bader
  0 siblings, 0 replies; 3+ messages in thread
From: Miles Bader @ 2003-01-10  9:39 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

Rusty Russell <rusty@rustcorp.com.au> writes:
> > +++ linux-2.5.55-moo/Makefile	2003-01-09 14:07:36.000000000 +0900
> > -LDFLAGS_MODULE  = -r
> > +LDFLAGS_MODULE  = -r --unique=.gnu.linkonce.this_module
> 
> No!  Does this not work?
> 
> +++ working-2.5.55-strlen/arch/v850/Makefile	2003-01-10 19:32:09.000000000 +1100
> +LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module

That'll probably work too.

[Though since the module loader depends on .gnu.linkonce.this_module
being a unique section, I think the global option should be OK as well]

-Miles
-- 
Is it true that nothing can be known?  If so how do we know this?  -Woody Allen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-10  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09  9:49 [PATCH] Prevent .gnu.linkonce.this_module section from being merged with other sections Miles Bader
2003-01-10  8:32 ` Rusty Russell
2003-01-10  9:39   ` Miles Bader

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.