[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: objcopy problem.
> From: "=?ks_c_5601-1987?B?UmFuZHkgTGVlXCjAzMO1uLhcKQ==?=" <firstname.lastname@example.org>
> Date: Mon, 30 Apr 2001 10:39:38 +0900
> I linked libm.a in kernel to use ceil(..) and floor(..) math functions.
> All is OK except making vmlinux.bin.
> File size of vmlinux.bin is almost 1.6GB(Giga bytes).
> Without libm.a, vmlinux.bin is generated normally. And all is working OK.
> How do I correct this problem?
While Dragan Stancevic is right in that floating-point
operations should generally stay out of the kernel (Linus will
not accept such changes in the official kernel IIRC), but it
should be *possible* to do it. For example, it might help
The math library is compiled with -ffunction-sections
-fdata-sections, which causes individual variables and functions
to be placed in their own sections.
I think the problem is that with the math library you now link
in sections that are not handled by the kernel linker script,
and that those sections are placed at a location that makes the
executable to appear that large. (IIRC, on some file-systems
the file is actually "sparse"; it has holes.) Use readelf-cris
or objdump-cris on the executable to find out the section names
of the sections that are malplaced; they should have names such
as ".text._ceil" and ".text._floor" and similar
".data._variable_name" and are probably placed at the end of the
executable. Edit the linker script to add those section names
at an appropriate place (close to the other ".text..." sections)
and you should be fine.
- objcopy problem.
- From: "=?ks_c_5601-1987?B?UmFuZHkgTGVlXCjAzMO1uLhcKQ==?=" <email@example.com>