Skip to content

Commit

Permalink
[PATCH] headers_check: move kernel-only #includes within <asm-i386/el…
Browse files Browse the repository at this point in the history
…f.h>

Some files which don't exist in userspace were being included unconditionally
in asm-i386/elf.h.  Move the offending #includes down a few lines so that
they're protected by #ifdef __KERNEL__

In fact, we probably want to kill off all userspace use of asm/elf.h -- but we
aren't there yet, so we should at least make it possible to include it for
now.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
David Woodhouse authored and Linus Torvalds committed Sep 13, 2006
1 parent b40c274 commit 651c923
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/asm-i386/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/processor.h>
#include <asm/system.h> /* for savesegment */
#include <asm/auxvec.h>
#include <asm/desc.h>

#include <linux/utsname.h>

Expand Down Expand Up @@ -48,6 +45,12 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386

#ifdef __KERNEL__

#include <asm/processor.h>
#include <asm/system.h> /* for savesegment */
#include <asm/desc.h>

/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
contains a pointer to a function which might be registered using `atexit'.
This provides a mean for the dynamic linker to call DT_FINI functions for
Expand Down Expand Up @@ -111,7 +114,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t;

#define ELF_PLATFORM (system_utsname.machine)

#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) do { } while (0)

/*
Expand Down

0 comments on commit 651c923

Please sign in to comment.