From: Blaisorblade <blaisorblade@yahoo.it>
To: Antoine Martin <antoine@nagafix.co.uk>
Cc: UML devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] Re: 2.4.32-bs2
Date: Sun, 11 Dec 2005 17:47:30 +0100 [thread overview]
Message-ID: <200512111747.30441.blaisorblade@yahoo.it> (raw)
In-Reply-To: <1134007824.32598.48.camel@localhost.localdomain>
On Thursday 08 December 2005 03:10, Antoine Martin wrote:
> All,
>
> Talking about tty logging and fake ide reminded of the current state of
> UML on 2.4 kernels:
> http://uml.nagafix.co.uk/uml-2.4.32-bs2.patch.bz2
> Is Blaisorblade's 2.4.28-bs2 patch tweaked to apply cleanly on 2.4.32.
There should be (I think) just offsets, not even fuzzes, so there should be no
problem.
> Plus another tweak to avoid duplicated symbols when linking with newer
> libc.a, the patch is based on this one:
> http://seclists.org/lists/linux-kernel/2004/Nov/1048.html
> But I'm not sure I did it right, so please check it (bottom of this
> email is the modified Makefile)
Seems correct for what I can see. Ah, no, there's a 2.4 / 2.6 conversion
problem, see below.
> /usr/lib/libc.a: could not read symbols: Bad value
I'd like to see the exact cmd line producing this. Possibly seeing also gcc -v
output with that cmd line would help.
(After seeing if there's anything strange with the file itself, but I think
you can compile on the same box some
> Any idea why that is? It happens when I use:
> i686-pc-linux-gnu-3.4.4-vanilla
> but not with:
> i686-pc-linux-gnu-3.3.6-vanilla
The first thing I'd do there (since this is the fscking 2.4, not the shining
2.6) is doing a make mrproper ARCH=um between the two compiles... 2.4 kbuild
was so erratic that even recently I was bitten from it, too... I started
writing a patch (missing export_symbol, I thought) to discover that a) the
code seemed right and b) the code _was_ right.
Afterwards I'd be curious if some strange Gentoo thing is mixing
runtime .so/.a libraries of the two compilers (I've had this happening for
c++, and programs crashing after linking with both gcc 3.3 and gcc 3.4 stdc++
libraries - fix_libtool_files.sh on Gentoo was my friend in the end). Note
that you need to be especially lucky to trigger this - of the whole KDE
3.4.3, most was linked this way, but only "juk" suffered.
No idea, I'll look at it a bit (maybe), but it's very strange. Note that I
recall compiling that with GCC 3.4.x (.3?) - I wanted to support 3.4 when
releasing -bs2.
> Problem is that the resulting kernel cannot be executed!
> $ kernel32-2.4.32-bs2: cannot execute binary file
file vmlinux-* and/or dmesg|tail would maybe help on what was going on.
> The other problem with this patch is that I can't get it to compile with
> SUBARCH=i386 on amd64.
> (even though -bs2 contains a SUBARCH fix - maybe I didn't merge it
> properly?)
Hmm, I never compiled 2.4 kernels on x86_64 machines. Probably I backported
just an earlier attempt - in fact I thought I'd done it on 2.6, but until I
started testing it, it didn't work.
For that, I'm sorry but you need a chroot - just too much work and I've not
the time to work on this.
> Any ideas?
> Antoine
> Here is the modified Makefile
Next time send a patch (even cut 'n' paste, but a patch).
> $ cat linux-2.4.32-bs2/arch/um/kernel/tt/Makefile
> #
> # Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
> # Licensed under the GPL
> #
>
> O_TARGET = tt.o
>
> obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o
> process_kern.o \
> syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o
> \
> uaccess.o uaccess_user.o
> extra-y := unmap_fin.o
> clean-files := unmap_tmp.o
Get rid of these lines, they didn't exist. Extra-y must be expressed, but ok,
it's already coded (see below). (clean-files is for make clean).
> obj-$(CONFIG_PT_PROXY) += gdb_kern.o
>
> subdir-y = sys-$(SUBARCH)
> subdir-$(CONFIG_PT_PROXY) += ptproxy
>
> obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
>
> export-objs = ksyms.o
>
> USER_OBJS = $(filter %_user.o,$(obj-y)) gdb.o time.o tracer.o
>
> UNMAP_CFLAGS := $(patsubst -pg -DPROFILING,,$(USER_CFLAGS))
> UNMAP_CFLAGS := $(patsubst -fprofile-arcs -ftest-coverage,,
> $(UNMAP_CFLAGS))
>
> include $(TOPDIR)/Rules.make
>
> $(USER_OBJS) : %.o: %.c
> $(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
USER_CFLAGS and CFLAGS_$@ are in the wrong order, the latter must be able to
override the former. Not that it should be a problem here... (and it's even
in the original, so don't worry).
> $(O_TARGET) : unmap_fin.o
The above is the (approximate) equivalent of extra-y setting.
> unmap.o: unmap.c
> $(CC) $(UNMAP_CFLAGS) -c -o $@ $<
>
> unmap_fin.o : unmap.o
> ld -r -o unmap_tmp.o unmap.o -lc -L/usr/lib
> objcopy unmap_tmp.o unmap_fin.o -G switcheroo
Yep, these are correct.
> clean :
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-12-11 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 2:10 [uml-devel] 2.4.32-bs2 Antoine Martin
2005-12-11 16:47 ` Blaisorblade [this message]
2005-12-11 19:19 ` [uml-devel] 2.4.32-bs2 Antoine Martin
2005-12-11 19:43 ` Blaisorblade
2005-12-12 2:24 ` [uml-devel] [PATCH] " Antoine Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200512111747.30441.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=antoine@nagafix.co.uk \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox