1 |
vapier 09/12/01 05:50:11 |
2 |
|
3 |
Modified: paxelf.c paxelf.h |
4 |
Log: |
5 |
split st_type and st_bind lookup functions |
6 |
|
7 |
Revision Changes Path |
8 |
1.64 pax-utils/paxelf.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.c?rev=1.64&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.c?rev=1.64&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.c?r1=1.63&r2=1.64 |
13 |
|
14 |
Index: paxelf.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v |
17 |
retrieving revision 1.63 |
18 |
retrieving revision 1.64 |
19 |
diff -u -r1.63 -r1.64 |
20 |
--- paxelf.c 30 Dec 2008 12:59:42 -0000 1.63 |
21 |
+++ paxelf.c 1 Dec 2009 05:50:11 -0000 1.64 |
22 |
@@ -1,7 +1,7 @@ |
23 |
/* |
24 |
* Copyright 2003-2007 Gentoo Foundation |
25 |
* Distributed under the terms of the GNU General Public License v2 |
26 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.63 2008/12/30 12:59:42 vapier Exp $ |
27 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.64 2009/12/01 05:50:11 vapier Exp $ |
28 |
* |
29 |
* Copyright 2005-2007 Ned Ludd - <solar@g.o> |
30 |
* Copyright 2005-2007 Mike Frysinger - <vapier@g.o> |
31 |
@@ -414,6 +414,15 @@ |
32 |
QUERY(STT_FILE), |
33 |
QUERY(STT_LOPROC), |
34 |
QUERY(STT_HIPROC), |
35 |
+ { 0, 0 } |
36 |
+}; |
37 |
+const char *get_elfstttype(int type) |
38 |
+{ |
39 |
+ return find_pairtype(elf_stttypes, ELF32_ST_TYPE(type)); |
40 |
+} |
41 |
+ |
42 |
+/* translate elf STB_ defines */ |
43 |
+static pairtype elf_stbtypes[] = { |
44 |
QUERY(STB_LOCAL), |
45 |
QUERY(STB_GLOBAL), |
46 |
QUERY(STB_WEAK), |
47 |
@@ -421,9 +430,9 @@ |
48 |
QUERY(STB_HIPROC), |
49 |
{ 0, 0 } |
50 |
}; |
51 |
-const char *get_elfstttype(int type) |
52 |
+const char *get_elfstbtype(int type) |
53 |
{ |
54 |
- return find_pairtype(elf_stttypes, type & 0xF); |
55 |
+ return find_pairtype(elf_stbtypes, ELF32_ST_BIND(type)); |
56 |
} |
57 |
|
58 |
/* Read an ELF into memory */ |
59 |
|
60 |
|
61 |
|
62 |
1.51 pax-utils/paxelf.h |
63 |
|
64 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.h?rev=1.51&view=markup |
65 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.h?rev=1.51&content-type=text/plain |
66 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxelf.h?r1=1.50&r2=1.51 |
67 |
|
68 |
Index: paxelf.h |
69 |
=================================================================== |
70 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxelf.h,v |
71 |
retrieving revision 1.50 |
72 |
retrieving revision 1.51 |
73 |
diff -u -r1.50 -r1.51 |
74 |
--- paxelf.h 17 Jun 2008 17:07:57 -0000 1.50 |
75 |
+++ paxelf.h 1 Dec 2009 05:50:11 -0000 1.51 |
76 |
@@ -1,7 +1,7 @@ |
77 |
/* |
78 |
* Copyright 2005-2007 Gentoo Foundation |
79 |
* Distributed under the terms of the GNU General Public License v2 |
80 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.h,v 1.50 2008/06/17 17:07:57 solar Exp $ |
81 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.h,v 1.51 2009/12/01 05:50:11 vapier Exp $ |
82 |
* |
83 |
* Copyright 2005-2007 Ned Ludd - <solar@g.o> |
84 |
* Copyright 2005-2007 Mike Frysinger - <vapier@g.o> |
85 |
@@ -57,6 +57,7 @@ |
86 |
extern const char *get_elfemtype(elfobj *elf); |
87 |
extern const char *get_elfptype(int type); |
88 |
extern const char *get_elfdtype(int type); |
89 |
+extern const char *get_elfstbtype(int type); |
90 |
extern const char *get_elfshttype(int type); |
91 |
extern const char *get_elfstttype(int type); |
92 |
extern void *elf_findsecbyname(elfobj *elf, const char *name); |