/[gentoo-projects]/pax-utils/scanelf.c
Gentoo

Diff of /pax-utils/scanelf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.135 Revision 1.136
1/* 1/*
2 * Copyright 2003-2006 Gentoo Foundation 2 * Copyright 2003-2006 Gentoo Foundation
3 * Distributed under the terms of the GNU General Public License v2 3 * Distributed under the terms of the GNU General Public License v2
4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.135 2006/03/16 17:00:21 solar Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.136 2006/03/17 15:27:00 solar Exp $
5 * 5 *
6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10#include "paxinc.h" 10#include "paxinc.h"
11 11
12static const char *rcsid = "$Id: scanelf.c,v 1.135 2006/03/16 17:00:21 solar Exp $"; 12static const char *rcsid = "$Id: scanelf.c,v 1.136 2006/03/17 15:27:00 solar Exp $";
13#define argv0 "scanelf" 13#define argv0 "scanelf"
14 14
15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
16 16
17#define do_state(option, flag) \ 17#define do_state(option, flag) \
929 if (!find_section) 929 if (!find_section)
930 return NULL; 930 return NULL;
931 931
932#define FIND_SECTION(B) \ 932#define FIND_SECTION(B) \
933 if (elf->elf_class == ELFCLASS ## B) { \ 933 if (elf->elf_class == ELFCLASS ## B) { \
934 int invert; \
934 Elf ## B ## _Shdr *section; \ 935 Elf ## B ## _Shdr *section; \
936 invert = (*find_section == '!' ? 1 : 0); \
935 section = SHDR ## B (elf_findsecbyname(elf, find_section)); \ 937 section = SHDR ## B (elf_findsecbyname(elf, find_section+invert)); \
936 if (section != NULL) \ 938 if ((section == NULL && invert) || (section != NULL && !invert)) \
937 *found_section = 1; \ 939 *found_section = 1; \
938 } 940 }
939 FIND_SECTION(32) 941 FIND_SECTION(32)
940 FIND_SECTION(64) 942 FIND_SECTION(64)
941 943

Legend:
Removed from v.1.135  
changed lines
  Added in v.1.136

  ViewVC Help
Powered by ViewVC 1.1.20