/[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.66 Revision 1.67
1/* 1/*
2 * Copyright 2003-2005 Gentoo Foundation 2 * Copyright 2003-2005 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.66 2005/06/01 22:37:38 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.67 2005/06/03 02:56:18 vapier Exp $
5 * 5 *
6 ******************************************************************** 6 ********************************************************************
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the 9 * published by the Free Software Foundation; either version 2 of the
33#include <dirent.h> 33#include <dirent.h>
34#include <getopt.h> 34#include <getopt.h>
35#include <assert.h> 35#include <assert.h>
36#include "paxelf.h" 36#include "paxelf.h"
37 37
38static const char *rcsid = "$Id: scanelf.c,v 1.66 2005/06/01 22:37:38 vapier Exp $"; 38static const char *rcsid = "$Id: scanelf.c,v 1.67 2005/06/03 02:56:18 vapier Exp $";
39#define argv0 "scanelf" 39#define argv0 "scanelf"
40 40
41 41
42 42
43/* prototypes */ 43/* prototypes */
383 unsigned long i; 383 unsigned long i;
384 void *symtab_void, *strtab_void; 384 void *symtab_void, *strtab_void;
385 385
386 if (!find_sym) return NULL; 386 if (!find_sym) return NULL;
387 387
388 /* debug sections */
388 symtab_void = elf_findsecbyname(elf, ".symtab"); 389 symtab_void = elf_findsecbyname(elf, ".symtab");
389 strtab_void = elf_findsecbyname(elf, ".strtab"); 390 strtab_void = elf_findsecbyname(elf, ".strtab");
391 /* fall back to runtime sections */
392 if (!symtab_void || !strtab_void) {
393 symtab_void = elf_findsecbyname(elf, ".dynsym");
394 strtab_void = elf_findsecbyname(elf, ".dynstr");
395 }
390 396
391 if (symtab_void && strtab_void) { 397 if (symtab_void && strtab_void) {
392 char *base, *basemem; 398 char *base, *basemem;
393 basemem = xstrdup(filename); 399 basemem = xstrdup(filename);
394 base = basename(basemem); 400 base = basename(basemem);

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

  ViewVC Help
Powered by ViewVC 1.1.20