Messages in this thread Patch in this message | | | Date | Thu, 28 May 1998 23:12:24 +0200 | From | Pavel Machek <> | Subject | Re: Why all glibc2 programs are FPU programs |
| |
Hi!
> > I originally thought that patch to kernel is going to be big and > > heavy. If it is not (2 lines seem reasonable to me), could you please > > post proposed kernel modification?
[instructions skipped]
> Beside this all to do is to make sure all ports define FPUCW_DEFAULT > and also use this value in the code (I don't know whether such a macro > already exists; if not it's high time to add one). That's all.
I tried to find similar macro, and I failed. I tried to find what value FPU is initialized to at i386, and I failed, too. Ok, at least I've successfully applied your "patch" and turned it into real patch so it is easier to handle. I made that change to kernel I'm running at, so it is not _too_ toxic.
Someone with better knowledge of architectures and FPU initialization should probably take it, change 0 into real value, and put it into real kernel. (Dave?)
Pavel
--- linux/include/linux/elf.h.ulrich Thu May 28 22:10:34 1998 +++ linux/include/linux/elf.h Thu May 28 22:11:33 1998 @@ -130,5 +130,7 @@ #define AT_PLATFORM 15 /* string identifying cpu for optimizations */ #define AT_HWCAP 16 /* arch dependent hints at cpu capabilities */ +#define AT_LINUX_FPUCW 17 /* initial settings of FPU */ + typedef struct dynamic{ Elf32_Sword d_tag; union{ --- linux/fs/binfmt_elf.c.ulrich Thu May 28 22:11:56 1998 +++ linux/fs/binfmt_elf.c Thu May 28 22:24:56 1998 @@ -156,14 +156,14 @@ __put_user ((id), sp+(nr*2)); \ __put_user ((val), sp+(nr*2+1)); \ - sp -= 2; + sp -= 6; NEW_AUX_ENT(0, AT_NULL, 0); + NEW_AUX_ENT(1, AT_HWCAP, hwcap); + NEW_AUX_ENT(2, AT_LINUX_FPUCW, 0 /* FPUCW_DEFAULT */ ); if (k_platform) { sp -= 2; NEW_AUX_ENT(0, AT_PLATFORM, (elf_addr_t)(unsigned long) u_platform); } - sp -= 2; - NEW_AUX_ENT(0, AT_HWCAP, hwcap); if (exec) { sp -= 11*2; -- I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |