Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:uclibc commit in: dev-libs/elfutils/files/, dev-libs/elfutils/
Date: Wed, 22 May 2013 12:35:59
Message-Id: 1369226197.aeea696ab0dbb8012b2dbb2b3f1b655ad02d0644.blueness@gentoo
1 commit: aeea696ab0dbb8012b2dbb2b3f1b655ad02d0644
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 22 12:36:37 2013 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed May 22 12:36:37 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=aeea696a
7
8 dev-libs/elfutils: remove profiling support
9
10 ---
11 dev-libs/elfutils/elfutils-0.155.ebuild | 1 +
12 .../elfutils-0.155-remove-profiling-support.patch | 145 ++++++++++++++++++++
13 2 files changed, 146 insertions(+), 0 deletions(-)
14
15 diff --git a/dev-libs/elfutils/elfutils-0.155.ebuild b/dev-libs/elfutils/elfutils-0.155.ebuild
16 index 0e46d90..4d94af8 100644
17 --- a/dev-libs/elfutils/elfutils-0.155.ebuild
18 +++ b/dev-libs/elfutils/elfutils-0.155.ebuild
19 @@ -38,6 +38,7 @@ src_prepare() {
20 epatch "${FILESDIR}"/${PN}-0.155-fallback-assert.patch
21 epatch "${FILESDIR}"/${PN}-0.155-link-argp-standalone.patch
22 epatch "${FILESDIR}"/${PN}-0.155-remove-mtrace.patch
23 + epatch "${FILESDIR}"/${PN}-0.155-remove-profiling-support.patch
24 eautoreconf
25
26 sed -i -e 's:-Werror::g' $(find -name Makefile.in) || die
27
28 diff --git a/dev-libs/elfutils/files/elfutils-0.155-remove-profiling-support.patch b/dev-libs/elfutils/files/elfutils-0.155-remove-profiling-support.patch
29 new file mode 100644
30 index 0000000..f97682f
31 --- /dev/null
32 +++ b/dev-libs/elfutils/files/elfutils-0.155-remove-profiling-support.patch
33 @@ -0,0 +1,145 @@
34 +diff -Naur elfutils-0.155.orig/src/ld.h elfutils-0.155/src/ld.h
35 +--- elfutils-0.155.orig/src/ld.h 2012-08-27 18:29:31.000000000 +0000
36 ++++ elfutils-0.155/src/ld.h 2013-05-22 12:21:43.171830137 +0000
37 +@@ -291,7 +291,7 @@
38 + const char **(*lib_extensions) (struct ld_state *)
39 + __attribute__ ((__const__));
40 + #define LIB_EXTENSION(state) \
41 +- DL_CALL_FCT ((state)->callbacks.lib_extensions, (state))
42 ++ ((state)->callbacks.lib_extensions)(state)
43 +
44 + /* Process the given file. If the file is not yet open, open it.
45 + The first parameter is a file descriptor for the file which can
46 +@@ -302,12 +302,12 @@
47 + int (*file_process) (int fd, struct usedfiles *, struct ld_state *,
48 + struct usedfiles **);
49 + #define FILE_PROCESS(fd, file, state, nextp) \
50 +- DL_CALL_FCT ((state)->callbacks.file_process, (fd, file, state, nextp))
51 ++ ((state)->callbacks.file_process)(fd, file, state, nextp)
52 +
53 + /* Close the given file. */
54 + int (*file_close) (struct usedfiles *, struct ld_state *);
55 + #define FILE_CLOSE(file, state) \
56 +- DL_CALL_FCT ((state)->callbacks.file_close, (file, state))
57 ++ ((state)->callbacks.file_close)(file, state)
58 +
59 + /* Create the output sections now. This requires knowledge about
60 + all the sections we will need. It may be necessary to sort the
61 +@@ -319,99 +319,97 @@
62 + output routines. */
63 + void (*create_sections) (struct ld_state *);
64 + #define CREATE_SECTIONS(state) \
65 +- DL_CALL_FCT ((state)->callbacks.create_sections, (state))
66 ++ ((state)->callbacks.create_sections)(state)
67 +
68 + /* Determine whether we have any non-weak unresolved references left. */
69 + int (*flag_unresolved) (struct ld_state *);
70 + #define FLAG_UNRESOLVED(state) \
71 +- DL_CALL_FCT ((state)->callbacks.flag_unresolved, (state))
72 ++ ((state)->callbacks.flag_unresolved)(state)
73 +
74 + /* Create the sections which are generated by the linker and are not
75 + present in the input file. */
76 + void (*generate_sections) (struct ld_state *);
77 + #define GENERATE_SECTIONS(state) \
78 +- DL_CALL_FCT ((state)->callbacks.generate_sections, (state))
79 ++ ((state)->callbacks.generate_sections)(state)
80 +
81 + /* Open the output file. The file name is given or "a.out". We
82 + create as much of the ELF structure as possible. */
83 + int (*open_outfile) (struct ld_state *, int, int, int);
84 + #define OPEN_OUTFILE(state, machine, class, data) \
85 +- DL_CALL_FCT ((state)->callbacks.open_outfile, (state, machine, class, data))
86 ++ ((state)->callbacks.open_outfile)(state, machine, class, data)
87 +
88 + /* Create the data for the output file. */
89 + int (*create_outfile) (struct ld_state *);
90 + #define CREATE_OUTFILE(state) \
91 +- DL_CALL_FCT ((state)->callbacks.create_outfile, (state))
92 ++ ((state)->callbacks.create_outfile)(state)
93 +
94 + /* Process a relocation section. */
95 + void (*relocate_section) (struct ld_state *, Elf_Scn *, struct scninfo *,
96 + const Elf32_Word *);
97 + #define RELOCATE_SECTION(state, outscn, first, dblindirect) \
98 +- DL_CALL_FCT ((state)->callbacks.relocate_section, (state, outscn, first, \
99 +- dblindirect))
100 ++ ((state)->callbacks.relocate_section)(state, outscn, first, dblindirect)
101 +
102 + /* Allocate a data buffer for the relocations of the given output
103 + section. */
104 + void (*count_relocations) (struct ld_state *, struct scninfo *);
105 + #define COUNT_RELOCATIONS(state, scninfo) \
106 +- DL_CALL_FCT ((state)->callbacks.count_relocations, (state, scninfo))
107 ++ ((state)->callbacks.count_relocations)(state, scninfo)
108 +
109 + /* Create relocations for executable or DSO. */
110 + void (*create_relocations) (struct ld_state *, const Elf32_Word *);
111 + #define CREATE_RELOCATIONS(state, dlbindirect) \
112 +- DL_CALL_FCT ((state)->callbacks.create_relocations, (state, dblindirect))
113 ++ ((state)->callbacks.create_relocations)(state, dblindirect)
114 +
115 + /* Finalize the output file. */
116 + int (*finalize) (struct ld_state *);
117 + #define FINALIZE(state) \
118 +- DL_CALL_FCT ((state)->callbacks.finalize, (state))
119 ++ ((state)->callbacks.finalize)(state)
120 +
121 + /* Check whether special section number is known. */
122 + bool (*special_section_number_p) (struct ld_state *, size_t);
123 + #define SPECIAL_SECTION_NUMBER_P(state, number) \
124 +- DL_CALL_FCT ((state)->callbacks.special_section_number_p, (state, number))
125 ++ ((state)->callbacks.special_section_number_p)(state, number)
126 +
127 + /* Check whether section type is known. */
128 + bool (*section_type_p) (struct ld_state *, XElf_Word);
129 + #define SECTION_TYPE_P(state, type) \
130 +- DL_CALL_FCT ((state)->callbacks.section_type_p, (state, type))
131 ++ ((state)->callbacks.section_type_p)(state, type)
132 +
133 + /* Return section flags for .dynamic section. */
134 + XElf_Xword (*dynamic_section_flags) (struct ld_state *);
135 + #define DYNAMIC_SECTION_FLAGS(state) \
136 +- DL_CALL_FCT ((state)->callbacks.dynamic_section_flags, (state))
137 ++ ((state)->callbacks.dynamic_section_flags)(state)
138 +
139 + /* Create the data structures for the .plt section and initialize it. */
140 + void (*initialize_plt) (struct ld_state *, Elf_Scn *scn);
141 + #define INITIALIZE_PLT(state, scn) \
142 +- DL_CALL_FCT ((state)->callbacks.initialize_plt, (state, scn))
143 ++ ((state)->callbacks.initialize_plt)(state, scn)
144 +
145 + /* Create the data structures for the .rel.plt section and initialize it. */
146 + void (*initialize_pltrel) (struct ld_state *, Elf_Scn *scn);
147 + #define INITIALIZE_PLTREL(state, scn) \
148 +- DL_CALL_FCT ((state)->callbacks.initialize_pltrel, (state, scn))
149 ++ ((state)->callbacks.initialize_pltrel)(state, scn)
150 +
151 + /* Finalize the .plt section the what belongs to them. */
152 + void (*finalize_plt) (struct ld_state *, size_t, size_t, struct symbol **);
153 + #define FINALIZE_PLT(state, nsym, nsym_dyn, ndxtosym) \
154 +- DL_CALL_FCT ((state)->callbacks.finalize_plt, (state, nsym, nsym_dyn, \
155 +- ndxtosym))
156 ++ ((state)->callbacks.finalize_plt)(state, nsym, nsym_dyn, ndxtosym)
157 +
158 + /* Create the data structures for the .got section and initialize it. */
159 + void (*initialize_got) (struct ld_state *, Elf_Scn *scn);
160 + #define INITIALIZE_GOT(state, scn) \
161 +- DL_CALL_FCT ((state)->callbacks.initialize_got, (state, scn))
162 ++ ((state)->callbacks.initialize_got)(state, scn)
163 +
164 + /* Create the data structures for the .got.plt section and initialize it. */
165 + void (*initialize_gotplt) (struct ld_state *, Elf_Scn *scn);
166 + #define INITIALIZE_GOTPLT(state, scn) \
167 +- DL_CALL_FCT ((state)->callbacks.initialize_gotplt, (state, scn))
168 ++ ((state)->callbacks.initialize_gotplt)(state, scn)
169 +
170 + /* Return the tag corresponding to the native relocation type for
171 + the platform. */
172 + int (*rel_type) (struct ld_state *);
173 + #define REL_TYPE(state) \
174 +- DL_CALL_FCT ((state)->callbacks.rel_type, (state))
175 ++ ((state)->callbacks.rel_type)(state)
176 + };
177 +
178 +