Use CHAR_BIT instead of NBBY in libctf
[external/binutils.git] / libctf / ChangeLog
1 2019-06-04  Tom Tromey  <tromey@adacore.com>
2
3         * ctf-create.c (ctf_add_encoded, ctf_add_slice)
4         (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
5
6 2019-06-04  Nick Alcock  <nick.alcock@oracle.com>
7
8         * configure.ac: Check for O_CLOEXEC.
9         * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
10         * config.h.in: Regenerate.
11         * configure: Likewise.
12
13 2019-06-04  Nick Alcock  <nick.alcock@oracle.com>
14
15         * qsort_r.c: Rename to...
16         * ctf-qsort_r.c: ... this.
17         (_quicksort): Define to ctf_qsort_r.
18         * ctf-decls.h (qsort_r): Remove.
19         (ctf_qsort_r): Add.
20         (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
21         (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
22         * Makefile.am (libctf_a_LIBADD): Remove.
23         (libctf_a_SOURCES): New, add ctf-qsort_r.c.
24         * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
25         * ctf-create.c (ctf_update): Likewise.
26         * configure.ac: Check for BSD versus GNU qsort_r signature.
27         * Makefile.in: Regenerate.
28         * config.h.in: Likewise.
29         * configure: Likewise.
30
31 2019-06-03  Nick Alcock  <nick.alcock@oracle.com>
32
33         * ctf-dump.c (ctf_dump_funcs): Free in the right place.
34
35 2019-05-29  Nick Alcock  <nick.alcock@oracle.com>
36
37         * Makefile.am (ZLIB): New.
38         (ZLIBINC): Likewise.
39         (AM_CFLAGS): Use them.
40         (libctf_a_LIBADD): New, for LIBOBJS.
41         * configure.ac: Check for zlib, endian.h, and qsort_r.
42         * ctf-endian.h: New, providing htole64 and le64toh.
43         * swap.h: Code style fixes.
44         (bswap_identity_64): New.
45         * qsort_r.c: New, from gnulib (with one added #include).
46         * ctf-decls.h: New, providing a conditional qsort_r declaration,
47         and unconditional definitions of MIN and MAX.
48         * ctf-impl.h: Use it.  Do not use <sys/errno.h>.
49         (ctf_set_errno): Now returns unsigned long.
50         * ctf-util.c (ctf_set_errno): Adjust here too.
51         * ctf-archive.c: Use ctf-endian.h.
52         (ctf_arc_open_by_offset): Use memset, not bzero.  Drop cts_type,
53         cts_flags and cts_offset.
54         (ctf_arc_write): Drop debugging dependent on the size of off_t.
55         * ctf-create.c: Provide a definition of roundup if not defined.
56         (ctf_create): Drop cts_type, cts_flags and cts_offset.
57         (ctf_add_reftype): Do not check if type IDs are below zero.
58         (ctf_add_slice): Likewise.
59         (ctf_add_typedef): Likewise.
60         (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
61         when known error-free.  Drop CTF_ERR usage for functions returning
62         int.
63         (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
64         int.
65         (ctf_add_variable): Likewise.
66         (enumcmp): Likewise.
67         (enumadd): Likewise.
68         (membcmp): Likewise.
69         (ctf_add_type): Likewise.  Cast error-returning ssize_t's to size_t
70         when known error-free.
71         * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
72         returning int: use CTF_ERR for functions returning ctf_type_id.
73         (ctf_dump_label): Likewise.
74         (ctf_dump_objts): Likewise.
75         * ctf-labels.c (ctf_label_topmost): Likewise.
76         (ctf_label_iter): Likewise.
77         (ctf_label_info): Likewise.
78         * ctf-lookup.c (ctf_func_args): Likewise.
79         * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
80         (ctf_bufopen): Likewise.  Use zlib types as needed.
81         * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
82         returning int.
83         (ctf_enum_iter): Likewise.
84         (ctf_type_size): Likewise.
85         (ctf_type_align): Likewise.  Cast to size_t where appropriate.
86         (ctf_type_kind_unsliced): Likewise.
87         (ctf_type_kind): Likewise.
88         (ctf_type_encoding): Likewise.
89         (ctf_member_info): Likewise.
90         (ctf_array_info): Likewise.
91         (ctf_enum_value): Likewise.
92         (ctf_type_rvisit): Likewise.
93         * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
94         cts_offset.
95         (ctf_simple_open): Likewise.
96         (ctf_bfdopen_ctfsect): Likewise.  Set cts_size properly.
97         * Makefile.in: Regenerate.
98         * aclocal.m4: Likewise.
99         * config.h: Likewise.
100         * configure: Likewise.
101
102 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
103
104         * configure.in: Check for bfd_section_from_elf_index.
105         * configure: Regenerate.
106         * config.h.in [HAVE_BFD_ELF]: Likewise.
107         * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
108         abfd is potentially unused now.
109
110 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
111
112         * Makefile.am: New.
113         * Makefile.in: Regenerated.
114         * config.h.in: Likewise.
115         * aclocal.m4: Likewise.
116         * configure: Likewise.
117
118 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
119
120         * ctf-dump.c: New.
121
122 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
123
124         * ctf-labels.c: New.
125
126 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
127
128         * ctf-impl.h (_libctf_version): New declaration.
129         * ctf-subr.c (_libctf_version): Define it.
130         (ctf_version): New.
131
132 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
133
134         * ctf-create.c (enumcmp): New.
135         (enumadd): Likewise.
136         (membcmp): Likewise.
137         (membadd): Likewise.
138         (ctf_add_type): Likewise.
139
140 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
141
142         * ctf-lookup.c (isqualifier): New.
143         (ctf_lookup_by_name): Likewise.
144         (struct ctf_lookup_var_key): Likewise.
145         (ctf_lookup_var): Likewise.
146         (ctf_lookup_variable): Likewise.
147         (ctf_lookup_symbol_name): Likewise.
148         (ctf_lookup_by_symbol): Likewise.
149         (ctf_func_info): Likewise.
150         (ctf_func_args): Likewise.
151
152 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
153
154         * ctf-decl.c: New file.
155         * ctf-types.c: Likewise.
156         * ctf-impl.h: New declarations.
157
158 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
159
160         * ctf-open-bfd.c: New file.
161         * ctf-open.c (ctf_close): New.
162         * ctf-impl.h: Include bfd.h.
163         (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
164         (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
165         ctfi_bfd_close.
166         (ctf_bfdopen_ctfsect): New declaration.
167         (_CTF_SECTION): likewise.
168
169 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
170
171         * ctf-archive.c: New.
172         * ctf-impl.h (ctf_archive_internal): New type.
173         (ctf_arc_open_internal): New declaration.
174         (ctf_arc_bufopen): Likewise.
175         (ctf_arc_close_internal): Likewise.
176
177 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
178
179         * ctf-open.c: New file.
180         * swap.h: Likewise.
181
182 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
183
184         * ctf-create.c: New file.
185         * ctf-lookup.c: New file.
186
187 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
188
189         * ctf-impl.h: New definitions and declarations for type creation
190         and lookup.
191
192 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
193
194         * ctf-hash.c: New file.
195         * ctf-impl.h: New declarations.
196
197 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
198
199         * ctf-error.c: New file.
200
201 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
202
203         * ctf-util.c: New file.
204         * elf.h: Likewise.
205         * ctf-impl.h: Include it, and add declarations.
206
207 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
208
209         * ctf-impl.h: New file.
210         * ctf-subr.c: New file.
211
212 \f
213 Local Variables:
214 mode: change-log
215 left-margin: 8
216 fill-column: 76
217 version-control: never
218 End: