Skip to content

Commit

Permalink
Revert some of "binfmt_elf: cleanups"
Browse files Browse the repository at this point in the history
The commit "binfmt_elf: cleanups"
(f670d0e) removed an ifndef elf_map but
this breaks compilation for metag 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.

Signed-off-by: James Hogan <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: [email protected]
Acked-by: Mikael Pettersson <[email protected]>
  • Loading branch information
James Hogan committed Mar 2, 2013
1 parent 4dd3c95 commit c07380b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,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)
Expand Down Expand Up @@ -355,6 +357,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;
Expand Down

0 comments on commit c07380b

Please sign in to comment.