All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches
       [not found] ` <410E5CFA.5000504@enterasys.com>
@ 2004-08-06 20:29   ` D. Bahi
  2004-08-09 21:28     ` Jeff Dike
  0 siblings, 1 reply; 5+ messages in thread
From: D. Bahi @ 2004-08-06 20:29 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: user-mode-linux-user


[-- Attachment #1.1: Type: text/plain, Size: 1840 bytes --]

this patch fixes the unresolved link time error
with a conditional around the definition of CAN_KMALLOC

and removes the unnedded -SEARCH_DIR line from dyn_link.ld.in
(this actually gets in the way if using a non- system toolchain
and it's removal should not affect any properly built toolchain).
--
db

D. Bahi wrote:
> sorry about my own follow up - it's a trivial bug:
> 
> rather than wrap CAN_KMALLOC with multiple macro conditionals
> to avoid 'tracing_pid' being referenced i just added the line
> 
>   int tracing_pid = -1
> 
> to arch/um/kern/skas/process.c so that it parallels kern/tt/tracer.c
> this might mask more critical references introduced in the future
> however. so the multiple macro fix would be the proper one i guess...
> 
> 
> D. Bahi wrote:
> 
>> i think this has been like this for some time... as i remember
>> trying to turn of TT completely in earlier releases:
>>
>> CONFIG_MODE_SKAS=y
>> CONFIG_X86_CMPXCHG=y
>> # CONFIG_MODE_TT is not set
>> # CONFIG_STATIC_LINK is not set
>>
>> results in:
>>
>> gcc -Wl,-T,arch/um/dyn_link.ld -Wl,-rpath,/lib  -Wl,--wrap,malloc 
>> -Wl,--wrap,free -Wl,--wrap,calloc \
>>         -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil
>> arch/um/main.o(.text+0x363): In function `__wrap_malloc':
>> arch/um/main.c:187: undefined reference to `tracing_pid'
>> arch/um/main.o(.text+0x3e2): In function `__wrap_free':
>> arch/um/main.c:231: undefined reference to `tracing_pid'
>> arch/um/main.o(.text+0x425):arch/um/main.c:235: undefined reference to 
>> `tracing_pid'
>> collect2: ld returned 1 exit status
>> make: *** [linux] Error 1
>>
>> arch/um/main.c:187 is in void *__wrap_malloc(int size)
>> ==>    else ret = um_vmalloc(size);
>>
>> arch/um/main.c:231 and :235 are in void __wrap_free(void *ptr)
>> ==>        if(CAN_KMALLOC())
>> ==>        if(CAN_KMALLOC())
>>
> 

[-- Attachment #1.2: skas_no_tt_dynlink --]
[-- Type: text/plain, Size: 944 bytes --]

--- linux-2.4.26_uml-patch-2.4.26-2um.orig/arch/um/dyn_link.ld.in	2004-08-01 07:52:46.000000000 -0400
+++ linux-2.4.26_uml-patch-2.4.26-2um_incrementals/arch/um/dyn_link.ld.in	2004-08-06 15:48:51.000000000 -0400
@@ -1,7 +1,7 @@
 OUTPUT_FORMAT("ELF_FORMAT")
 OUTPUT_ARCH(ELF_ARCH)
 ENTRY(_start)
-SEARCH_DIR("/usr/local/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
+
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
 SECTIONS

--- linux-2.4.26_uml-patch-2.4.26-2um.orig/arch/um/main.c	2004-08-01 07:52:46.000000000 -0400
+++ linux-2.4.26_uml-patch-2.4.26-2um_incrementals/arch/um/main.c	2004-08-06 15:52:38.000000000 -0400
@@ -171,8 +171,13 @@
 	return(uml_exitcode);
 }
 
+#ifdef UML_CONFIG_MODE_TT
 #define CAN_KMALLOC() \
 	(kmalloc_ok && CHOOSE_MODE((getpid() != tracing_pid), 1))
+#else
+#define CAN_KMALLOC() \
+	(kmalloc_ok)
+#endif
 
 extern void *__real_malloc(int);
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

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

* Re: [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches
  2004-08-06 20:29   ` [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches D. Bahi
@ 2004-08-09 21:28     ` Jeff Dike
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Dike @ 2004-08-09 21:28 UTC (permalink / raw)
  To: D. Bahi; +Cc: user-mode-linux-devel, user-mode-linux-user

dbahi@enterasys.com said:
> this patch fixes the unresolved link time error with a conditional
> around the definition of CAN_KMALLOC 

I don't see that here.  If you look at the definition of CHOOSE_MODE, you'll
see that it's conditional on CONFIG_MODE_TT and CONFIG_MODE_SKAS in such a
way that if a mode is configured out, any code associated with it disappears.

I think you didn't do that build from a clean pool.

				Jeff



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* RE: [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches
@ 2004-08-09 22:13 Bahi, David
  2004-08-09 23:52 ` Jeff Dike
  0 siblings, 1 reply; 5+ messages in thread
From: Bahi, David @ 2004-08-09 22:13 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel, user-mode-linux-user

right. clean tree builts w/o MODE_TT just fine.

had previously built with _BOTH_ modes; and then:

    make ARCH=um xconfig   # turn MODE_TT off
    make ARCH=um dep
#   make ARCH=um clean     # failed to do this. doh!
    make ARCH=um linux

given the chance, the macro does the job it should.

i don't suppose there is some depencency checking 
that could be improved to fix this - requiring a 
clean seems obsessive-compulsive <grin>.

pardon the noise.

> -----Original Message-----
> From: Jeff Dike [mailto:jdike@addtoit.com] 
> Sent: Monday, August 09, 2004 5:29 PM
> To: Bahi, David
> Cc: user-mode-linux-devel@lists.sourceforge.net; 
> user-mode-linux-user@lists.sourceforge.net
> Subject: Re: [uml-devel] PATCH -- Was: link error MODE_SKAS 
> and ! MODE_TT in 2.4.26-2 + uml.sf.net patches 
> 
> dbahi@enterasys.com said:
> > this patch fixes the unresolved link time error with a conditional
> > around the definition of CAN_KMALLOC 
> 
> I don't see that here.  If you look at the definition of 
> CHOOSE_MODE, you'll
> see that it's conditional on CONFIG_MODE_TT and 
> CONFIG_MODE_SKAS in such a
> way that if a mode is configured out, any code associated 
> with it disappears.
> 
> I think you didn't do that build from a clean pool.
> 
> 				Jeff
> 
> 


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches
  2004-08-09 22:13 Bahi, David
@ 2004-08-09 23:52 ` Jeff Dike
  2004-08-20 12:08   ` BlaisorBlade
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Dike @ 2004-08-09 23:52 UTC (permalink / raw)
  To: Bahi, David; +Cc: user-mode-linux-devel, user-mode-linux-user

dbahi@enterasys.com said:
> i don't suppose there is some depencency checking  that could be
> improved to fix this - requiring a  clean seems obsessive-compulsive
> <grin>. 

Probably.  The UML build is in need of a good reaming.  The other major
symptom of this is when you try a -j make.

				Jeff



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches
  2004-08-09 23:52 ` Jeff Dike
@ 2004-08-20 12:08   ` BlaisorBlade
  0 siblings, 0 replies; 5+ messages in thread
From: BlaisorBlade @ 2004-08-20 12:08 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Jeff Dike, Bahi, David, user-mode-linux-user

Alle 01:52, martedì 10 agosto 2004, Jeff Dike ha scritto:
> dbahi@enterasys.com said:
> > i don't suppose there is some depencency checking  that could be
> > improved to fix this - requiring a  clean seems obsessive-compulsive
> > <grin>.
>
> Probably.  The UML build is in need of a good reaming.  The other major
> symptom of this is when you try a -j make.
I've fixed that very properly in my tree. Please don't work on that right now, 
I'll be back in a week or two. However I'm uploading a snapshot (2.6.7-bb6) 
just now. You will find it here, but please be careful (read comments in the 
series file). And remember I've worked onto 2.6.6-um1, so there is still a 
lot of common stuff. 
http://www.user-mode-linux.org/~blaisorblade/patches/bb/uml-2.6.7-bb6.tar.bz2

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2004-08-20 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <410E5994.4060606@enterasys.com>
     [not found] ` <410E5CFA.5000504@enterasys.com>
2004-08-06 20:29   ` [uml-devel] PATCH -- Was: link error MODE_SKAS and ! MODE_TT in 2.4.26-2 + uml.sf.net patches D. Bahi
2004-08-09 21:28     ` Jeff Dike
2004-08-09 22:13 Bahi, David
2004-08-09 23:52 ` Jeff Dike
2004-08-20 12:08   ` BlaisorBlade

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.