libctf: fix uninitialized variable in symbol serialization error handling
[deliverable/binutils-gdb.git] / libctf / ChangeLog
1 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-create.c (ctf_serialize): Fix shadowing.
4
5 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
6
7 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
8 (ctf_add_forward): Likewise.
9 (ctf_add_typedef): Likewise.
10
11 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
12
13 * ctf-open.c (init_types): Rip out code to check anonymous typedef
14 nodes.
15 * ctf-create.c (ctf_add_reftype): Likewise.
16 * ctf-lookup.c (refresh_pptrtab): Likewise.
17
18 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
19
20 * ctf-impl.c (_libctf_nonnull_): Add parameters.
21 (LCTF_LINKING): New flag.
22 (ctf_dict_t) <ctf_link_flags>: Mention it.
23 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
24 (ctf_write): Likewise, including in child dictionaries.
25 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
26 are no reported symbols.
27 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
28 the variable has been reported as a symbol by the linker.
29 (symtypetab_skippable): Mention relationship between SYMFP and the
30 flags.
31 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
32 were reported and force-indexing is off (i.e., we are doing a
33 final link).
34 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
35 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
36 case). Turn sorting off if this is a non-final link. Only delete
37 nonstatic vars if we are filtering symbols and the linker has
38 reported some.
39 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
40 New test of variable and symtypetab section population when
41 ld -r is used.
42 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
43 Likewise, when ld of an executable is used.
44 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
45 Likewise, when ld -shared alone is used.
46 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
47 Lookup programs for the above.
48 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
49 test, testing survival of symbols across ctf_write paths.
50 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
51 nonshared, suppressing linking of the SOURCE with -shared.
52
53 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
54
55 * ctf-create.c (membadd): Transform ""-named members into
56 NULL-named ones.
57 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
58
59 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
60
61 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
62 base type if looking up a nonexistent pointer type.
63 * testsuite/libctf-regression/pptrtab*: Test it.
64
65 2021-01-13 Alan Modra <amodra@gmail.com>
66
67 * Makefile.in: Regenerate.
68
69 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
70
71 PR binutils/26792
72 * configure.ac: Use GNU_MAKE_JOBSERVER.
73 * aclocal.m4: Regenerated.
74 * configure: Likewise.
75
76 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
77
78 PR ld/27173
79 * configure: Regenerated.
80
81 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
82
83 * configure: Regenerated.
84
85 2021-01-09 Nick Clifton <nickc@redhat.com>
86
87 * 2.36 release branch crated.
88
89 2021-01-09 Alan Modra <amodra@gmail.com>
90
91 * configure: Regenerate.
92
93 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
94
95 * configure: Regenerate.
96
97 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
98
99 * testsuite/libctf-lookup/struct-iteration.c (main):
100 ctf_member_count returns an int.
101
102 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
103
104 * Makefile.am (BASEDIR): New.
105 (BFDDIR): Likewise.
106 (check-DEJAGNU): Add development.exp to prerequisites.
107 (development.exp): New.
108 (CONFIG_STATUS_DEPENDENCIES): New.
109 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
110 (DISTCLEANFILES): Likewise.
111 * Makefile.in: Regenerated.
112 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
113 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
114 * testsuite/libctf-regression/regression.exp: Likewise.
115
116 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
117
118 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
119 properly.
120
121 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
122
123 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
124 <ctf_pptrtab_len>: New.
125 <ctf_pptrtab_typemax>: New.
126 * ctf-create.c (ctf_serialize): Update accordingly.
127 (ctf_add_reftype): Note that we don't need to update pptrtab here,
128 despite updating ptrtab.
129 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
130 (ctf_import): Likewise.
131 (ctf_import_unref): Likewise.
132 * ctf-lookup.c (grow_pptrtab): New.
133 (refresh_pptrtab): New, update a pptrtab.
134 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
135 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
136 use it in addition to the parent's ptrtab when parent dicts are
137 searched.
138 * testsuite/libctf-regression/regression.exp: New testsuite for
139 regression tests.
140 * testsuite/libctf-regression/pptrtab*: New test.
141 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
142 writable CTF dicts.
143 * testsuite/libctf-writable/pptrtab*: New test.
144
145 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
146
147 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
148
149 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
150
151 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
152 <ctn_next>: ... here.
153 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
154 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
155 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
156 (ctf_member_next): ... this. Support recursive unnamed member
157 iteration (off by default).
158 (ctf_member_info): Look up members in unnamed sub-structs.
159 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
160 (ctf_dedup_emit_struct_members): Likewise.
161 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
162 members, and a normal member after the end.
163 * testsuite/libctf-lookup/struct-iteration.c: Verify that
164 ctf_member_count is consistent with the number of successful returns
165 from a non-recursive ctf_member_next.
166 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
167 over struct members.
168 * testsuite/libctf-lookup/struct-lookup.c: New test.
169 * testsuite/libctf-lookup/struct-lookup.lk: New test.
170
171 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
172
173 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
174 (ctf_link_write): Call it.
175
176 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
177
178 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
179 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
180 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
181
182 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
183
184 * Makefile.am (EXPECT): New.
185 (RUNTEST): Likewise.
186 (RUNTESTFLAGS): Likewise.
187 (CC_FOR_TARGET): Likewise.
188 (check-DEJAGNU): Likewise.
189 (AUTOMAKE_OPTIONS): Add dejagnu.
190 * Makefile.in: Regenerated.
191 * testsuite/config/default.exp: New.
192 * testsuite/lib/ctf-lib.exp: Likewise.
193 * testsuite/libctf-lookup/enum.lk: New test.
194 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
195 * testsuite/libctf-lookup/enum.c: New lookup test.
196 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
197 * testsuite/libctf-lookup/lookup.exp: New.
198
199 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
200
201 * configure.ac (BFD_LIBADD): Remove.
202 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
203 (SHARED_LIBADD): Rename to...
204 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
205 linking statically.
206 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
207 libctf uses libintl.
208 (libctf_la_LIBADD): Reference libbfd.la directly, not via
209 BFD_LIBADD.
210 (libctf_la_DEPENDENCIES): Remove.
211 * Makefile.in: Regenerate.
212 * configure: Likewise.
213
214 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
215
216 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
217 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
218 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
219 (CTF_FT_REFS): New.
220 (CTF_FT_BITFIELD): Likewise.
221 (CTF_FT_ID): Likewise.
222 (ctf_dump_member): Do not do indentation here. Migrate the
223 type-printing parts of this into...
224 (ctf_dump_format_type): ... here, to be shared by all type printers.
225 Get the errno value for non-representable types right. Do not print
226 bitfield info for non-bitfields. Improve the format and indentation
227 of other type output. Shuffle spacing around to make all indentation
228 either 'width of column' or 4 chars.
229 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
230 (ctf_dump_objts): Likewise. Spacing shuffle.
231 (ctf_dump_var): Likewise.
232 (type_hex_digits): Migrate down in the file, to above its new user.
233 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
234 ctf_dump_format_type. Don't trim off excess linefeeds now we no
235 longer generate them. Dump enumerated types.
236
237 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
238
239 * ctf-types.c (ctf_type_resolve): Improve comment.
240 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
241 Emit errors into the right dict.
242 (ctf_type_align): Likewise.
243 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
244 when adding a member without explicit offset when this member, or
245 the previous member, is incomplete.
246 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
247 forwards.
248 (ctf_dump_member): Do not try to print their alignment.
249
250 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
251
252 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
253 (ctf_dump_format_type): Don't emit the size for function objects.
254 Dump the element type of arrays like we dump the pointed-to type of
255 pointers, etc.
256
257 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
258
259 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
260 (ctf_dump_header): Add 0x to the hex magic number.
261 (ctf_dump_str): Add 0x to the hex string offsets.
262 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
263 (ctf_dump_type): Adjust. Free it when we're done.
264 (type_hex_digits): New.
265 (ctf_dump_member): Align output depending on the width of the type
266 ID being generated. Use printf padding, not a loop, to generate
267 indentation.
268
269 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
270
271 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
272
273 2021-01-04 Nicolas Boulenguez <nicolas@debian.org>
274
275 PR 27117
276 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
277 ACLOCAL_AMFLAGS -I dirs.
278 * configure: Regenerate.
279
280 2021-01-01 Alan Modra <amodra@gmail.com>
281
282 Update year range in copyright notice of all files.
283
284 For older changes see ChangeLog-2020
285 \f
286 Copyright (C) 2021 Free Software Foundation, Inc.
287
288 Copying and distribution of this file, with or without modification,
289 are permitted in any medium without royalty provided the copyright
290 notice and this notice are preserved.
291
292 Local Variables:
293 mode: change-log
294 left-margin: 8
295 fill-column: 74
296 version-control: never
297 End:
This page took 0.047821 seconds and 5 git commands to generate.