svn commit: r195356 - projects/mips/sys/mips/include
Warner Losh
imp at FreeBSD.org
Sun Jul 5 07:00:52 UTC 2009
Author: imp
Date: Sun Jul 5 07:00:51 2009
New Revision: 195356
URL: http://svn.freebsd.org/changeset/base/195356
Log:
Define __ELF_WORD_SIZE appropriately for n64. Note for N32 I believe
this is correct. While registers are 64-bit, n32 is a 32-bit ABI and
lives in a 32-bit world (with explicit 64-bit registers, however).
Change an 8, which was 4 + 4 or sizeof(int) + SZREG to be a simple '4
+ SZREG' to reflect the actual offset of the structure in question.
Modified:
projects/mips/sys/mips/include/elf.h
Modified: projects/mips/sys/mips/include/elf.h
==============================================================================
--- projects/mips/sys/mips/include/elf.h Sun Jul 5 06:56:51 2009 (r195355)
+++ projects/mips/sys/mips/include/elf.h Sun Jul 5 07:00:51 2009 (r195356)
@@ -41,8 +41,12 @@
/* Information taken from MIPS ABI supplemental */
#ifndef __ELF_WORD_SIZE
+#if defined(__mips_n64)
+#define __ELF_WORD_SIZE 64 /* Used by <sys/elf_generic.h> */
+#else
#define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */
#endif
+#endif
#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
#include <sys/elf_generic.h>
More information about the svn-src-projects
mailing list