Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66140
b: refs/heads/master
c: adff90a
h: refs/heads/master
v: v3
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed Oct 11, 2007
1 parent 42780da commit 9144265
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c67316e706cabc2145d6c8e97f0bd8f2a86d8a1
refs/heads/master: adff90a9333004d5459823665e8bcf6cb9214f79
15 changes: 0 additions & 15 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1853,21 +1853,6 @@ source "fs/Kconfig.binfmt"
config TRAD_SIGNALS
bool

config BUILD_ELF64
bool "Use 64-bit ELF format for building"
depends on 64BIT
help
A 64-bit kernel is usually built using the 64-bit ELF binary object
format as it's one that allows arbitrary 64-bit constructs. For
kernels that are loaded within the KSEG compatibility segments the
32-bit ELF format can optionally be used resulting in a somewhat
smaller binary, but this option is not explicitly supported by the
toolchain and since binutils 2.14 it does not even work at all.

Say Y to use the 64-bit format or N to use the 32-bit one.

If unsure say Y.

config BINFMT_IRIX
bool "Include IRIX binary compatibility"
depends on CPU_BIG_ENDIAN && 32BIT && BROKEN
Expand Down
23 changes: 20 additions & 3 deletions trunk/arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ vmlinux-32 = vmlinux.32
vmlinux-64 = vmlinux

cflags-y += -mabi=64
ifndef CONFIG_BUILD_ELF64
cflags-y += $(call cc-option,-msym32)
endif
endif

all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32)
Expand Down Expand Up @@ -576,6 +573,26 @@ else
JIFFIES = jiffies_64
endif

#
# Automatically detect the build format. By default we choose
# the elf format according to the load address.
# We can always force a build with a 64-bits symbol format by
# passing 'BUILD_ELF32=no' option to the make's command line.
#
ifdef CONFIG_64BIT
ifndef BUILD_ELF32
ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
BUILD_ELF32 = y
endif
endif

ifeq ($(BUILD_ELF32), y)
cflags-y += -msym32
else
cflags-y += -DCONFIG_BUILD_ELF64
endif
endif

AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y) \
-D"VMLINUX_LOAD_ADDRESS=$(load-y)"
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-mips/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/*
* __pa()/__va() should be used only during mem init.
*/
#ifdef CONFIG_64BIT
#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
#define __pa(x) \
({ \
unsigned long __x = (unsigned long)(x); \
Expand Down

0 comments on commit 9144265

Please sign in to comment.