General TC > Remasters / Remixes - Unofficial

Application segmentation fault after rebuilding kernel

(1/4) > >>

settimid:
Hi all

I have a TC 3.8.4 with kernel 2.6.33.3-tinycore64 from here: http://distro.ibiblio.org/tinycorelinux/3.x/archive/3.8.4/distribution_files/ (file bzImage64)
All is fine, my C software run perfectly with this setup.

Now i try to rebuild kernel from source (as first step, without changing anything from its default)


--- Code: ---wget http://distro.ibiblio.org/tinycorelinux/3.x/release/src/kernel/linux-2.6.33.3-patched.tbz2
wget http://distro.ibiblio.org/tinycorelinux/3.x/release/src/kernel/config-2.6.33.3-tinycore64
tar xf linux-2.6.33.3-patched.tbz2
cd linux-2.6.33.3
make mrproper
cp ../config-2.6.33.3-tinycore64 .config
make oldconfig
make

--- End code ---

This create a bzImage under arch/x86/boot/bzImage that I copy as bzImage64 to replace the original one.

The OS boot up and all seem to be ok, except that if I run my C application i have a segmentation fault as soon as I call
--- Code: ---gettimeofday()
--- End code ---
or
--- Code: ---time()
--- End code ---
system function.

Googling about gettimeofday and segmentation fault this seem to be related to VDSO (Virtual Dynamically-linked Shared Object) https://man7.org/linux/man-pages/man7/vdso.7.html but I have no idea of how to solve this issue.

Any hint?

curaga:
You also need to replace the modules if you used a different compiler version. Though your symptoms are rather curious, not sure what exactly is the cause.

settimid:
Hi curaga, here is something more about my setup

I build kernel source (and my software as well) using a Suse 11.3 64bit, that run a very similar kernel (2.6.34 x86_64).
My C code is compiled with static linking (gcc -static) as per requirement.


--- Quote ---You also need to replace the modules if you used a different compiler version. Though your symptoms are rather curious, not sure what exactly is the cause.
--- End quote ---

Yes, I imagine it could be something like this, but what do you exactly mean?
Should I replace modules in my target tinycore or in my build machine (or both) and what is the correct procedure to do this?

curaga:
You only copied bzImage to the target. You also need to copy the modules, via the "make modules_install INSTALL_MOD_PATH=/tmp/foo" command; replace the old modules inside the initrd with those, maybe pack some into extensions if you want.

The cause of your crash however could be in suse's glibc. It's possible it was set to require 2.6.34, and crashing on 2.6.33 in a time func could be caused by that.
edit: Oh, I just re-read your post, and you said your program works fine with the original kernel.

settimid:

--- Quote ---You only copied bzImage to the target. You also need to copy the modules, via the "make modules_install INSTALL_MOD_PATH=/tmp/foo" command; replace the old modules inside the initrd with those, maybe pack some into extensions if you want.
--- End quote ---

Hi curaga
I tried to do as you suggest, i.e. compile the kernel modules and then update the microcore64.gz file by replacing the contents of the /lib/modules/2.6.33.3-tinycore64 folder (unpacking and packing it) but nothing changed.

Navigation

[0] Message Index

[#] Next page

Go to full version