Re: [RFC PATCH v1 05/40] Revert some of "binfmt_elf: cleanups"
From: Mikael Pettersson <hidden>
Date: 2012-11-01 13:38:49
Also in:
linux-fsdevel
James Hogan writes:
> The commit "binfmt_elf: cleanups"
> (f670d0ecda73b7438eec9ed108680bc5f5362ad8) removed an ifndef elf_map but
> this breaks compilation on metag architecture which does define elf_map.
>
> This adds the ifndef back in as it was before, but does not affect the
> other cleanups made by that patch.
Since this is part of your patch submission to upstream the metag
kernel support, I have no objection to reverting this fragment of
my patch if/when the metag code gets upstreamed.
Acked-by: Mikael Pettersson <redacted>
>
> Signed-off-by: James Hogan [off-list ref]
> Cc: Mikael Pettersson [off-list ref]
> Cc: Alexander Viro [off-list ref]
> Cc: linux-fsdevel@vger.kernel.org
> ---
> fs/binfmt_elf.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> index 1b52956..14d1fbd 100644
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
> @@ -314,6 +314,8 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
> return 0;
> }
>
> +#ifndef elf_map
> +
> static unsigned long elf_map(struct file *filep, unsigned long addr,
> struct elf_phdr *eppnt, int prot, int type,
> unsigned long total_size)
> @@ -348,6 +350,8 @@ static unsigned long elf_map(struct file *filep, unsigned long addr,
> return(map_addr);
> }
>
> +#endif /* !elf_map */
> +
> static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr)
> {
> int i, first_idx = -1, last_idx = -1;
> --
> 1.7.7.6
>
>