packaging: update homepage url
[platform/upstream/elfutils.git] / libelf / ChangeLog
1 2015-11-26  Mark Wielaard  <mjw@redhat.com>
2
3         * elf_compress.c (__libelf_decompress_elf): New function, extracted
4         from...
5         (elf_compress): here. Check zdata_base use __libelf_decompress_elf.
6         * elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
7         use zdata.
8         * libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
9         (__libelf_decompress_elf): New internal function definition.
10
11 2015-10-21  Mark Wielaard  <mjw@redhat.com>
12
13         * Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
14         elf_compress_gnu.c.
15         * elf_compress.c: New file.
16         * elf_compress_gnu.c: Likewise.
17         * elf_begin.c (file_read_elf): Make a writable copy of the shdrs
18         for ELF_C_READ_MMAP.
19         * elf_end.c (elf_end): Free zdata_base.
20         * elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
21         ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
22         ELF_E_DECOMPRESS_ERROR.
23         * elf_data.c (__libelf_data_type): New internal function extracted
24         from convert_data.
25         (convert_data): Handle SHF_COMPRESSED.
26         * elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
27         uncompressed section data size if SHF_COMPRESSED.
28         * elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
29         ELF_C_READ_MMAP.
30         * libelf.h: Define elf_compress and elf_compress_gnu.
31         * libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
32         * libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
33         ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
34         ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
35         (__libelf_compress): New internal function definition.
36         (__libelf_decompress): Likewise.
37         (__libelf_reset_rawdata): Likewise.
38         (__libelf_data_type): Likewise.
39         (struct Elf_Scn): Add zdata_base.
40
41 2015-11-19  Mark Wielaard  <mjw@redhat.com>
42
43         * Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
44         elf64_getchdr.c and gelf_getchdr.c.
45         (noinst_HEADERS): Add chdr_xlate.h.
46         * abstract.h: Define Chdr32 and Chdr64.
47         * chdr_xlate.h: New file.
48         * elf32_getchdr.c: New file.
49         * elf64_getchdr.c: New file.
50         * elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
51         and ELF_E_INVALID_SECTION_FLAGS.
52         * elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
53         ELF_T_CHDR for SHF_COMPRESSED sections.
54         * exttypes.h: Add Chdr32 and Chdr64.
55         * gelf.h (GElf_Chdr): New typedef.
56         (gelf_getchdr): New function definition.
57         * gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
58         * gelf_getchdr.c: New file.
59         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
60         * gelf_xlate.h: Add Chdr.
61         * libelf.h (Elf_Type): Add ELF_T_CHDR.
62         (elf32_getchdr): New function definition.
63         (elf64_getchdr): Likewise.
64         * libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
65         elf64_getchdr and gelf_getchdr.
66         * libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
67         and ELF_E_INVALID_SECTION_FLAGS.
68
69 2015-10-16  Mark Wielaard  <mjw@redhat.com>
70
71         * Makefile.am (libelf_so_LDLIBS): Add -lz.
72
73 2015-10-14  Mark Wielaard  <mjw@redhat.com>
74
75         * elf.h: Update from glibc. Add section compression constants and
76         structures.
77
78 2015-10-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
79
80         * elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
81         Fix the size argument to pread_retry.
82
83 2015-10-13  Chih-Hung Hsieh  <chh@google.com>
84
85         * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
86         function 'fill_mmap' to file scope.
87         * elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
88         to file scope.
89
90 2015-10-09  Josh Stone  <jistone@redhat.com>
91
92         * libelf.h: Replace loff_t with int64_t throughout.
93
94 2015-10-05  Mark Wielaard  <mjw@redhat.com>
95
96         * elf_update.c (write_file): Only use posix_fallocate when using
97         mmap. Only report failure when errno is ENOSPC.
98
99 2015-10-09  Josh Stone  <jistone@redhat.com>
100
101         * libelfP.h (struct Elf): Replace off64_t with off_t.
102         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
103
104 2015-10-05  Chih-Hung Hsieh <chh@google.com>
105
106         * elf_getarsym.c (elf_getarsym): Do not use
107         union of variable length arrays.
108
109 2015-10-05  Josh Stone  <jistone@redhat.com>
110
111         * Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
112
113 2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
114
115         * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
116         relocation overflows in some platforms.
117
118 2015-09-29  Mark Wielaard  <mjw@redhat.com>
119
120         * elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
121         (updatenull_wrlock): Always set e_shentsize.
122
123 2015-09-23  Mark Wielaard  <mjw@redhat.com>
124
125         * elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
126         * elf32_getshdr.c (getshdr_rdlock): Likewise.
127         (getshdr_wrlock): Likewise.
128         * elf_error.c (__libelf_seterrno): Likewise.
129         * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
130         (__elf_getphdrnum_chk_rdlock): Likewise.
131         * elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
132         (__elf_getphdrnum_chk_rdlock): Likewise.
133         * elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
134         * elf_readall.c (__libelf_readall): Likewise.
135         * gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
136
137 2015-09-22  Mark Wielaard  <mjw@redhat.com>
138
139         * *.c: Remove old-style function definitions.
140
141 2015-06-22  Mark Wielaard  <mjw@redhat.com>
142
143         * dl-hash.h: Update from glibc.
144
145 2015-06-18  Mark Wielaard  <mjw@redhat.com>
146
147         * elf32_updatefile.c (updatefile): Always free shdr_data and scns
148         when allocated on failure paths.
149
150 2015-06-18  Mark Wielaard  <mjw@redhat.com>
151
152         * nlist.c (nlist): Check symscn shdr exists before use.
153
154 2015-06-16  Mark Wielaard  <mjw@redhat.com>
155
156         * elf_update.c (write_file): Always also use ftruncate before
157         posix_fallocate to make sure file has the right size.
158
159 2015-06-04  Mark Wielaard  <mjw@redhat.com>
160
161         * elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
162         ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
163         ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
164         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
165         of rawdata against requested type.
166
167 2015-06-02  Mark Wielaard  <mjw@redhat.com>
168
169         * elf_getdata.c (convert_data): Make sure source data is properly
170         aligned for type before calling actual conversion function.
171
172 2015-06-04  Mark Wielaard  <mjw@redhat.com>
173
174         * elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
175         direct access.
176
177 2015-06-02  Mark Wielaard  <mjw@redhat.com>
178
179         * elf_begin.c (file_read_elf): Split checks for ehdr and shdr
180         alignment, drop phdr alignment check.
181
182 2015-05-31  Mark Wielaard  <mjw@redhat.com>
183
184         * elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
185         not alloca and free after conversion when a copy needs to be made.
186
187 2015-05-31  Mark Wielaard  <mjw@redhat.com>
188
189         * elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
190         alloca and free after conversion when a copy needs to be made.
191
192 2015-05-31  Mark Wielaard  <mjw@redhat.com>
193
194         * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
195         malloc, not alloca also in !ALLOW_UNALIGNED case.
196
197 2015-05-30  Mark Wielaard  <mjw@redhat.com>
198
199         * gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
200
201 2015-05-30  Mark Wielaard  <mjw@redhat.com>
202
203         * elf32_updatefile.c (updatemmap): Only call mempcpy and update
204         last_position when d_size is non-zero.
205
206 2015-05-17  Mark Wielaard  <mjw@redhat.com>
207
208         * elf32_updatefile.c (updatefile): Allocate shdr_data and scns
209         with malloc, not alloca. Free after writing section headers.
210
211 2015-05-16  Mark Wielaard  <mjw@redhat.com>
212
213         * elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
214         with malloc, not alloca. Free after writing section header.
215
216 2015-05-16  Mark Wielaard  <mjw@redhat.com>
217
218         * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
219         malloc, not alloca. Call free after out.
220
221 2015-05-14  Mark Wielaard  <mjw@redhat.com>
222
223         * elf_update.c (write_file): Use posix_fallocate instead of
224         ftruncate to extend file if necessary.
225
226 2015-05-13  Mark Wielaard  <mjw@redhat.com>
227
228         * elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
229         e_phoff also to zero.
230
231 2015-05-12  Mark Wielaard  <mjw@redhat.com>
232
233         * elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
234         is a powerof2.
235         * elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
236         to the elf image offset.
237
238 2015-05-12  Mark Wielaard  <mjw@redhat.com>
239
240         * elf32_newphdr.c (newphdr): Call __libelf_seterrno with
241         ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
242         actually exists if we need to put extended phnum in section zero.
243
244 2015-05-08  Mark Wielaard  <mjw@redhat.com>
245
246         * nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
247
248 2015-01-03  Mark Wielaard  <mjw@redhat.com>
249
250         * version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
251         (elf_cvt_Verneed): Likewise.
252
253 2015-03-28  Mark Wielaard  <mjw@redhat.com>
254
255         * elf.h: Update from glibc.
256
257 2015-03-23  Mark Wielaard  <mjw@redhat.com>
258
259         * elf32_updatenull.c (updatenull_wrlock): Don't extend size with
260         SHT_NOBITS sh_offset.
261
262 2015-02-18  Mark Wielaard  <mjw@redhat.com>
263
264         * libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
265
266 2015-02-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
267
268         * elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
269         sh_addralign 0 as 1.
270
271 2015-01-22  Mark Wielaard  <mjw@redhat.com>
272
273         * elf_strptr (elf_strptr): Make sure returned string is NUL
274         terminated.
275
276 2015-01-21  Mark Wielaard  <mjw@redhat.com>
277
278         * elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
279         of rawdata_base != NULL before using rawdata directly.
280
281 2015-01-20  Mark Wielaard  <mjw@redhat.com>
282
283         * libelfP.h (__elf_strptr_internal): New function declaration.
284         * elf_getdata.c (__libelf_set_data_list_rdlock): New internal
285         function extracted from...
286         (__elf_getdata_rdlock): ... here.
287         * elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
288         datalist if necessary.
289
290 2015-01-20  Mark Wielaard  <mjw@redhat.com>
291
292         * elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
293         necessary.
294
295 2014-12-30  Mark Wielaard  <mjw@redhat.com>
296
297         * elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
298         (elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
299         * gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
300         and always check ndx against phnum.
301         * libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
302
303 2014-12-25  Mark Wielaard  <mjw@redhat.com>
304
305         * elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
306         negative. Include start_offset in maxsize.
307
308 2014-12-28  Alexander Cherepanov  <cherepan@mccme.ru>
309
310         * elf_begin.c (read_long_names): Don't miss '/' right after
311         another '/'. Fixes a dir traversal vuln in ar extraction.
312
313 2014-12-18  Ulrich Drepper  <drepper@gmail.com>
314
315         * Makefile.am: Suppress output of textrel_check command.
316
317 2014-12-16  Mark Wielaard  <mjw@redhat.com>
318
319         * elf_begin.c (read_long_names): Make sure long_names len fits
320         in mapped ELF file.
321
322 2014-12-15  Mark Wielaard  <mjw@redhat.com>
323
324         * elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
325
326 2014-12-15  Mark Wielaard  <mjw@redhat.com>
327
328         * elf_begin.c (read_long_names): Clear any garbage left in the
329         name table.
330
331 2014-12-11  Mark Wielaard  <mjw@redhat.com>
332
333         * elf_begin.c (file_read_elf): Correct ELF64 section offset check.
334
335 2014-12-11  Mark Wielaard  <mjw@redhat.com>
336
337         * elf_begin.c (read_long_names): Check for offset overflow.
338         (__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.
339         Don't allow it to go beyond end of file.
340
341 2014-12-09  Mark Wielaard  <mjw@redhat.com>
342
343         * elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
344
345 2014-11-27  Mark Wielaard  <mjw@redhat.com>
346
347         * Makefile.am (libelf.so): Use textrel_check.
348
349 2014-11-23  Mark Wielaard  <mjw@redhat.com>
350
351         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
352         overflow check to unsigned.
353
354 2014-11-23  Mark Wielaard  <mjw@redhat.com>
355
356         * note_xlate.h (elf_cvt_note): Copy over any leftover data if
357         src != dest. The data is probably part of truncated name/desc.
358
359 2014-11-22  Mark Wielaard  <mjw@redhat.com>
360
361         * elf_getphdrnum.c (elf_getphdrnum): Sanity check the
362         __elf_getphdrnum_rdlock result.
363
364 2014-11-18  Mark Wielaard  <mjw@redhat.com>
365
366         * version_xlate.h (elf_cvt_Verdef): Check for overflow.
367         (elf_cvt_Verneed): Likewise.
368
369 2014-11-17  Mark Wielaard  <mjw@redhat.com>
370
371         * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
372
373 2014-11-16  Mark Wielaard  <mjw@redhat.com>
374
375         * elf_getshdrstrndx.c: Check there are section headers before
376         handling SHN_XINDEX.
377
378 2014-11-16  Mark Wielaard  <mjw@redhat.com>
379
380         * elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
381         Check for too many pheaders.
382         * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
383         actually exists before handling PN_XNUM.
384
385 2014-11-16  Mark Wielaard  <mjw@redhat.com>
386
387         * gelf_getnote.c (gelf_getnote): Check padding overflow.
388
389 2014-11-16  Mark Wielaard  <mjw@redhat.com>
390
391         * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
392         and align as Elf64_Off and Elf64_Xword not size_t.
393
394 2014-11-14  Mark Wielaard  <mjw@redhat.com>
395
396         * gelf_getnote.c (gelf_getnote): Check offset overflow.
397
398 2014-11-13  Mark Wielaard  <mjw@redhat.com>
399
400         * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
401         check.
402
403 2014-11-08  Mark Wielaard  <mjw@redhat.com>
404
405         * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
406
407 2014-11-07  Mark Wielaard  <mjw@redhat.com>
408
409         * elf_begin.c (file_read_elf): Correct sh_size check.
410         * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
411         overflow.
412
413 2014-09-10  Petr Machata  <pmachata@redhat.com>
414
415         * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
416         file is unreadable.
417
418 2014-07-07  Mark Wielaard  <mjw@redhat.com>
419
420         * elf.h: Update from glibc.
421
422 2014-04-13  Mark Wielaard  <mjw@redhat.com>
423
424         * Makefile.am: Remove !MUDFLAP conditions.
425         * elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
426         defined.
427         * elf_update.c (write_file): Remove _MUDFLAP condition.
428
429 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
430             Roland McGrath  <roland@redhat.com>
431
432         * libelfP.h (INVALID_NDX): Define.
433         * gelf_getdyn.c (gelf_getdyn): Use it.  Remove ndx < 0 test if any.
434         * gelf_getlib.c (gelf_getlib): Likewise.
435         * gelf_getmove.c (gelf_getmove): Likewise.
436         * gelf_getrel.c (gelf_getrel): Likewise.
437         * gelf_getrela.c (gelf_getrela): Likewise.
438         * gelf_getsym.c (gelf_getsym): Likewise.
439         * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
440         * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
441         * gelf_getversym.c (gelf_getversym): Likewise.
442         * gelf_update_dyn.c (gelf_update_dyn): Likewise.
443         * gelf_update_lib.c (gelf_update_lib): Likewise.
444         * gelf_update_move.c (gelf_update_move): Likewise.
445         * gelf_update_rel.c (gelf_update_rel): Likewise.
446         * gelf_update_rela.c (gelf_update_rela): Likewise.
447         * gelf_update_sym.c (gelf_update_sym): Likewise.
448         * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
449         * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
450         * gelf_update_versym.c (gelf_update_versym): Likewise.
451
452 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
453
454         * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
455         table fits into object's bounds.
456         * elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
457         elf->map_address.  Check if first section header fits into object's
458         bounds.
459         * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
460         Check if section header table fits into object's bounds.
461         * elf_begin.c (get_shnum): Ensure section headers fits into
462         object's bounds.
463         (file_read_elf): Make sure scncnt is small enough to allocate both
464         ElfXX_Shdr and Elf_Scn array.  Make sure section and program header
465         tables fit into object's bounds.  Avoid memory leak on failure.
466         * elf_newscn.c (elf_newscn): Check for overflow.
467         * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
468         (__elfw2(LIBELFBITS,updatefile)): Likewise.
469         * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
470         * elf_getarsym.c (elf_getarsym): Likewise.
471
472 2013-11-08  Mark Wielaard  <mjw@redhat.com>
473
474         * elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
475         already directly mmapped.
476
477 2013-11-05  Mark Wielaard  <mjw@redhat.com>
478
479         * elf32_updatefile.c (elfXX_updatefile): Copy all section headers
480         if elf->flags dirty.
481
482 2013-11-01  Michael Forney  <mforney@mforney.org>
483
484         * Makefile.am: Use READELF.
485
486 2013-10-01  Petr Machata  <pmachata@redhat.com>
487
488         * elf.h: Update from glibc.
489
490 2013-06-17  Petr Machata  <pmachata@redhat.com>
491
492         * elf.h: Update from glibc.
493
494 2013-08-28  Namhyung Kim  <namhyung@gmail.com>
495
496         * gelf.h (gelf_fsize): Fix typo in comment.
497
498 2013-08-28  Mark Wielaard  <mjw@redhat.com>
499
500         * gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
501
502 2013-08-27  Mark Wielaard  <mjw@redhat.com>
503
504         * gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
505
506 2013-08-25  Kurt Roeckx  <kurt@roeckx.be>
507
508         * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
509         dereference to avoid alignment problems.
510
511 2013-01-07  Roland McGrath  <roland@hack.frob.com>
512
513         * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
514         would be unaligned and !ALLOW_UNALIGNED.
515
516         * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
517         dereference so as not to assume the field is naturally aligned.
518
519 2012-09-17  Petr Machata  <pmachata@redhat.com>
520
521         * elf.h: Update from glibc.
522
523 2012-08-16  Roland McGrath  <roland@hack.frob.com>
524
525         * elf.h: Update from glibc.
526
527 2012-08-14  Mark Wielaard  <mjw@redhat.com>
528
529         * elf32_checksum.c (ebl_debugscn_p): Removed unused define and
530         confusing outdated comment.
531
532 2012-08-01  Petr Machata  <pmachata@redhat.com>
533
534         * elf_getarsym (read_number_entries): New function.
535         (elf_getarsym): Handle 64-bit symbol table, stored in special
536         entry named "/SYM64/".
537         * elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
538         because it contains 64-bit symbol table.
539
540 2012-07-19  Mark Wielaard  <mjw@redhat.com>
541
542         * elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
543         to asserts.
544
545 2012-07-17  Petr Machata  <pmachata@redhat.com>
546
547         * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
548         integer number of records in case of ELF_T_NHDR.
549
550 2012-04-02  Mark Wielaard  <mjw@redhat.com>
551
552         * elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
553         there are no nonempty sections at that offset.
554
555 2012-03-21  Roland McGrath  <roland@hack.frob.com>
556
557         * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
558
559 2011-02-26  Mark Wielaard  <mjw@redhat.com>
560
561         * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
562
563 2011-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
564
565         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
566         when MAXIMUM_SIZE == ~0.
567
568 2010-08-18  Roland McGrath  <roland@redhat.com>
569
570         * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
571         and ELF_T_GNUHASH.
572         Reported by Mark Hatle <mark.hatle@windriver.com>.
573
574         * exttypes.h: Add cases for ElfNN_Lib.
575         Reported by Mark Hatle <mark.hatle@windriver.com>.
576
577 2010-06-14  Ulrich Drepper  <drepper@redhat.com>
578
579         * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
580         * gelf_update_phdr.c: Likewise.
581         * gelf_update_ehdr.c: Likewise.
582
583 2010-04-14  Roland McGrath  <roland@redhat.com>
584
585         * elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
586         * elf_begin.c (file_read_elf): Don't set .phdr here.
587
588 2010-04-13  Roland McGrath  <roland@redhat.com>
589
590         * elf.h: Update from glibc.
591
592 2010-04-06  Roland McGrath  <roland@redhat.com>
593
594         * elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
595         in error message.
596
597 2010-04-01  Petr Machata  <pmachata@redhat.com>
598
599         * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
600         that do not need a conversion.
601
602 2010-03-11  Roland McGrath  <roland@redhat.com>
603
604         * elf.h: Update from glibc.
605
606 2010-03-04  Ulrich Drepper  <drepper@redhat.com>
607
608         * elf.h: Update from glibc.
609
610 2010-02-17  Roland McGrath  <roland@redhat.com>
611
612         * elf_begin.c (file_read_elf): Leave section rawdata_base and
613         data_base pointers null when [sh_offset,sh_size) points outside
614         the mapped file.
615
616 2010-02-15  Roland McGrath  <roland@redhat.com>
617
618         * Makefile.am: Use config/eu.am for common stuff.
619
620 2010-01-07  Roland McGrath  <roland@redhat.com>
621
622         * elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
623         * gelf_getphdr.c: Likewise.
624         * gelf_update_phdr.c: Likewise.
625         * elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
626         * elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
627         * elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
628         If COUNT is too large, use store PN_XNUM instead and set sh_info.
629         * elf_begin.c (file_read_elf): Always allocate space we can use later
630         for section 0 if doing RDWR.
631
632         * elf_getphdrnum.c: New file.
633         * Makefile.am (libelf_a_SOURCES): Add it.
634         * libelf.h: Declare elf_getphdrnum.
635         * libelfP.h: Declare __elf_getphdrnum_rdlock.
636         * libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
637
638         * elf.h: Update from glibc.
639
640 2009-10-23  Lubomir Rintel  <lkundrak@v3.sk>
641
642         * elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
643         filling from section start, not shdr_end.
644
645 2009-11-10  Roland McGrath  <roland@redhat.com>
646
647         * elf_readall.c (__libelf_readall): Fetch file size if not yet known.
648
649 2009-11-06  Mark Wielaard  <mjw@redhat.com>
650
651         * elf_next.c (elf_next): Mark the archive header as unusable when
652         there is no next ar element.
653
654 2009-08-12  Mark Wielaard  <mjw@redhat.com>
655
656         * Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
657
658 2009-07-26  Ulrich Drepper  <drepper@redhat.com>
659
660         * elf.h: Update from glibc.
661
662 2009-07-21  Ulrich Drepper  <drepper@redhat.com>
663
664         * elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
665         sections.  Patch by Lubomir Rintel <lkundrak@v3.sk>.
666
667 2009-07-08  Roland McGrath  <roland@redhat.com>
668
669         * libelfP.h (struct Elf): Remove unused ar.has_index field.
670         Reorder various members for optimal packing.
671
672 2009-07-08  Ulrich Drepper  <drepper@redhat.com>
673
674         * elf.h: Update from glibc.
675
676 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
677
678         * Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
679         elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
680         * elf_getshnum.c: Renamed to...
681         * elf_getshdrnum.c: ...this.  Rename function and add old name as
682         alias.  Likewise for internal functions with derived names.
683         * elf_getshstrndx.c: Renamed to...
684         * elf_getshdrstrndx.c: ...this.  Rename function and add old name as
685         alias.  Likewise for internal functions with derived names.
686         * libelf.h: Add prototypes for new names.  Make old names as
687         deprecated.
688         * libelfP.h: Rename internal function prototypes.
689         * libelf.map: Export for names.
690         * elf32_checksum.c: Don't use deprecated functions.
691         * elf32_getshdr.c: Likewise.
692
693 2009-06-01  Ulrich Drepper  <drepper@redhat.com>
694
695         * elf.h: Update from glibc.
696
697 2009-04-14  Roland McGrath  <roland@redhat.com>
698
699         * elf.h: Update from glibc.
700
701 2009-04-01  Roland McGrath  <roland@redhat.com>
702
703         * elf.h: Update from glibc.
704
705 2009-02-10  Ulrich Drepper  <drepper@redhat.com>
706
707         * elf32_updatefile.c (updatefile): For the zeroth section we still
708         have to copy the section header.
709
710 2009-02-01  Ulrich Drepper  <drepper@redhat.com>
711
712         * elf_strptr.c: Add comment re possible problem.
713
714 2009-01-26  Ulrich Drepper  <drepper@redhat.com>
715
716         * elf32_updatenull.c (updatenull_wrlock): Fix comment of
717         ELF_F_LAYOUT behaviour re section header table.
718
719 2009-01-22  Ulrich Drepper  <drepper@redhat.com>
720
721         * elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
722         sections even if only the section at the start of the gap has been
723         changed.
724         (__elfXX_updatefile): Likewise.
725
726 2009-01-21  Ulrich Drepper  <drepper@redhat.com>
727
728         * elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
729         handle sections for NOBITS sections.
730         (elfXX_updatefile): Likewise.
731
732         * elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
733         sections we haven't loaded, update last_position based on scn_start,
734         not based on old value.  Don't run the loop for the dummy section 0.
735         (elfXX_updatefile): Don't run the loop for the dummy section 0.
736
737 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
738
739         * libelfP.h (_): We only have one translation domain, elfutils.
740
741         * Makefile.am: Use USE_LOCKS instead of USE_TLS.
742         * elf_error.c: Always use __thread.  Remove all !USE_TLS code.
743
744 2009-01-04  Roland McGrath  <roland@redhat.com>
745
746         * note_xlate.h (elf_cvt_note): Don't examine a size too small to
747         container a note header.
748
749 2008-12-11  Roland McGrath  <roland@redhat.com>
750
751         * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
752         placement offset going backwards, for out-of-order or overlapping
753         (bogus) sh_offset layouts.  It's a dumb use, but should not crash.
754         (__elfw2(LIBELFBITS,updatefile)): Likewise.
755         Fixes RHBZ#476136.
756
757         * libelf.h (Elf_Data): Whitespace fix.
758
759 2008-12-10  Roland McGrath  <roland@redhat.com>
760
761         * elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
762
763 2008-10-22  Petr Machata  <pmachata@redhat.com>
764
765         * elf_rawfile.c (elf_rawfile): Lock around elf-> references.
766
767 2008-10-21  Petr Machata  <pmachata@redhat.com>
768
769         * libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
770         * elf32_getehdr.c (getehdr_rdlock): Move the code to new function
771         getehdr_impl and make it a wrapper.  Rename to getehdr_wrlock.
772         (getehdr_impl): Guard elf->class init with wrlock.
773         (getehdr): Also make it a wrapper of getehdr_impl.
774         * elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
775
776 2008-10-20  Petr Machata  <pmachata@redhat.com>
777
778         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
779         code that reads mutable elf state.  Relock to write lock to chain
780         the new chunk on the elf rawchunks list.
781
782 2008-10-20  Petr Machata  <pmachata@redhat.com>
783
784         * elf32_checksum.c (checksum): Place a lock around the code that
785         processes data.  Make it wrlock if the code needs to xlate the
786         data before processing.
787
788 2008-10-16  Petr Machata  <pmachata@redhat.com>
789
790         * elf_begin.c
791         (__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
792         (dup_elf): Adjust the call.
793         (elf_begin): New local function lock_dup_elf.  Relocks the elf if
794         necessary before calling dup.  Call this instead of dup_elf.
795         * elf_getarhdr.c
796         (elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
797         * elf_next.c (elf_next): Likewise.
798         * elf_rand.c (elf_rand): Likewise.
799
800 2008-10-14  Petr Machata  <pmachata@redhat.com>
801
802         * elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
803
804 2008-11-26  Roland McGrath  <roland@redhat.com>
805
806         * elf.h: Update from glibc.
807
808 2008-10-06  Roland McGrath  <roland@redhat.com>
809
810         * elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
811
812 2008-08-27  Roland McGrath  <roland@redhat.com>
813
814         * elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
815
816         * libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
817
818 2008-08-25  Roland McGrath  <roland@redhat.com>
819
820         * Makefile.am (libelf_so_LDLIBS): New variable.
821         (libelf.so): Use it in the link.
822
823 2008-08-21  Petr Machata  <pmachata@redhat.com>
824
825         * elf_getdata.c, libelfP.h
826         (__elf_getdata_internal): Rename to __elf_getdata_rdlock.
827         (__libelf_set_rawdata_wrlock): New function.
828         (__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
829         * elf32_updatenull.c, libelfP.h
830         (__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
831
832 2008-08-21  Petr Machata  <pmachata@redhat.com>
833
834         * elf32_getphdr.c, libelfP.h
835         (__elfNN_getphdr_internal): Drop.  Move __elfNN_getphdr_internal
836         code to __elfNN_getphdr_wrlock.
837         (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
838         (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
839         wrappers of getphdr_impl.
840
841 2008-08-21  Petr Machata  <pmachata@redhat.com>
842
843         * elf32_getehdr.c, libelfP.h
844         (__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
845         * gelf_getehdr, libelfP.h:
846         (__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
847
848 2008-08-21  Petr Machata  <pmachata@redhat.com>
849
850         * elf32_getshdr.c
851         (__elfNN_getshdr_internal): Drop.
852         (load_shdr_wrlock, scn_valid): New functions, contain bits of
853         behaviour from __elfNN_getshdr_internal.
854         (__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
855         dropped _internal functions above.
856         * elf_getshnum.c
857         (__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
858
859 2008-08-04  Petr Machata  <pmachata@redhat.com>
860
861         * libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
862
863 2008-07-28  Roland McGrath  <roland@redhat.com>
864
865         * elf.h: Update from glibc.
866
867 2008-03-31  Roland McGrath  <roland@redhat.com>
868
869         * elf32_offscn.c: Make sure shdrs have been read in.
870
871 2008-02-19  Roland McGrath  <roland@redhat.com>
872
873         * elf.h: Update from glibc.
874
875 2008-02-08  Roland McGrath  <roland@redhat.com>
876
877         * elf.h: Update from glibc.
878
879 2008-01-31  Ulrich Drepper  <drepper@redhat.com>
880
881         * elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
882         under construction and no raw data can be read from disk.
883
884 2008-01-30  Roland McGrath  <roland@redhat.com>
885
886         * elf.h: Update from glibc.
887
888 2008-01-26  Roland McGrath  <roland@redhat.com>
889
890         * elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
891         Fixes various pastos in wrong type in sizeof, wrong string parsed.
892
893 2008-01-20  Roland McGrath  <roland@redhat.com>
894
895         * elf_getaroff.c: Calculate from start_offset, instead of using
896         parent's state.ar.offset field.
897
898 2008-01-08  Roland McGrath  <roland@redhat.com>
899
900         * Makefile.am (euinclude): Variable removed.
901         (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
902
903 2008-01-03  Roland McGrath  <roland@redhat.com>
904
905         * common.h: Add __attribute__ ((unused)) to static functions.
906
907 2007-12-20  Ulrich Drepper  <drepper@redhat.com>
908
909         * Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
910         * libelfP.h (struct Elf_Scn): Add shndx_index field.
911         Declare __elf_scnshndx_internal.
912         * elf32_getshdr.c: Record location of extended section header.
913         * elf_begin.c (file_read_elf): Likewise.
914         * elf_scnshndx.c: New file.
915         * libelf.h: Declare elf_scnshndx.
916         * libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
917
918 2007-11-12  Roland McGrath  <roland@redhat.com>
919
920         * libelf.h: Replace off64_t with loff_t throughout.
921         Only that type name is unconditionally defined by <sys/types.h>
922
923 2007-11-03  Roland McGrath  <roland@redhat.com>
924
925         * libelf.h (Elf_Data): Comment fix.
926
927 2007-10-18  Roland McGrath  <roland@redhat.com>
928
929         * elf.h: Update from glibc.
930
931 2007-10-07  Roland McGrath  <roland@redhat.com>
932
933         * elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
934         member access in terminating name with no trailing /.  Trim trailing
935         spaces when there is no /.
936
937 2007-10-04  Roland McGrath  <roland@redhat.com>
938
939         * elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
940
941 2007-10-03  Roland McGrath  <roland@redhat.com>
942
943         * libelf.h (Elf_Data): Use off64_t for d_off.
944         (Elf_Arhdr): Use off64_t for ar_size.
945         (elf_update, elf_getbase, elf_getaroff): Return off64_t.
946
947         * gelf_rawchunk.c: File removed.
948         * gelf_freechunk.c: File removed.
949         * Makefile.am (libelf_a_SOURCES): Remove them.
950         * libelf.map (ELFUTILS_1.0): Remove exports.
951         * gelf.h: Remove decls.
952
953         * elf_getdata_rawchunk.c: New file.
954         * Makefile.am (libelf_a_SOURCES): Add it.
955         * libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
956         * libelf.h: Declare it.
957         * libelfP.h (Elf_Data_Chunk): New type.
958         (struct Elf.elf): New member `rawchunks'.
959         * elf_end.c (elf_end): Free recorded rawchunk buffers.
960
961 2007-08-24  Roland McGrath  <roland@redhat.com>
962
963         * gelf_getnote.c: New file.
964         * Makefile.am (libelf_a_SOURCES): Add it.
965         * gelf.h: Declare gelf_getnote.
966         * libelf.map (ELFUTILS_1.3): Add gelf_getnote.
967
968         * libelfP.h (NOTE_ALIGN): New macro.
969         * note_xlate.h: New file.
970         * Makefile.am (noinst_HEADERS): Add it.
971         * gelf_xlate.c: Include it.
972         (__elf_xfctstom): Use elf_cvt_note.
973         * elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
974         (__libelf_set_rawdata): Likewise.
975
976 2007-08-19  Roland McGrath  <roland@redhat.com>
977
978         * gelf_update_auxv.c: New file.
979         * gelf_getauxv.c: New file.
980         * Makefile.am (libelf_a_SOURCES): Add them.
981         * gelf.h: Declare gelf_getauxv, gelf_update_auxv.
982         * libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
983         Export gelf_getauxv, gelf_update_auxv.
984
985         * libelf.h (Elf_Type): Add ELF_T_AUXV.
986         * abstract.h: Add auxv_t entries.
987         * exttypes.h: Likewise.
988         * gelf_xlate.h: Likewise.
989         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
990         * gelf_fsize.c (__libelf_type_sizes): Likewise.
991
992 2007-08-12  Roland McGrath  <roland@redhat.com>
993
994         * elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
995         and only tertiarily on index.
996
997 2007-07-09  Roland McGrath  <roland@redhat.com>
998
999         * elf.h: Update from glibc.
1000
1001 2007-04-22  Roland McGrath  <roland@redhat.com>
1002
1003         * elf.h: Update from glibc.
1004
1005 2007-03-18  Roland McGrath  <roland@redhat.com>
1006
1007         * elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
1008         Return zero when the section headers do not fit within MAXSIZE.
1009
1010 2007-03-09  Roland McGrath  <roland@redhat.com>
1011
1012         * libelfP.h (LIBELF_EV_IDX): New macro.
1013         (__libelf_type_align): New macro.
1014         [! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
1015         * elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
1016         (convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
1017         and __libelf_type_sizes, in place of old table.
1018         (__libc_type_aligns): New const variable.
1019
1020 2007-02-04  Ulrich Drepper  <drepper@redhat.com>
1021
1022         * Makefile (libelf.so): Build with -z relro.
1023
1024         * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1025
1026 2007-01-30  Ulrich Drepper  <drepper@redhat.com>
1027
1028         * nlist.c: Close file descriptor before returning.
1029
1030 2007-01-20  Roland McGrath  <roland@redhat.com>
1031
1032         * gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1033         convert the final word.
1034
1035         * elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1036         MY_ELFDATA on !ALLOW_UNALIGNED machines.
1037
1038 2007-01-18  Roland McGrath  <roland@redhat.com>
1039
1040         * gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1041         it on read error.
1042
1043 2006-10-13  Roland McGrath  <roland@redhat.com>
1044
1045         * elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1046         * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1047
1048 2006-08-29  Roland McGrath  <roland@redhat.com>
1049
1050         * elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
1051         MY_ELFDATA on !ALLOW_UNALIGNED machines.
1052         Reported by Christian Aichinger <Greek0@gmx.net>.
1053
1054         * Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1055
1056 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
1057
1058         * elf.h (DT_VALNUM): Update.
1059         (DT_ADDRNUM): Likewise.
1060
1061 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
1062
1063         * elf32_updatefile.c: Adjust for internal_function_def removal.
1064         * elf32_updatenull.c: Likewise.
1065         * elf_begin.c: Likewise.
1066         * elf_getdata.c: Likewise.
1067
1068 2006-07-11  Ulrich Drepper  <drepper@redhat.com>
1069
1070         * libelf.h: Define ELF_T_GNUHASH.
1071         * elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
1072         (shtype_map): Add SHT_GNU_HASH entries.
1073         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
1074         * gnuhash_xlate.h: New file.
1075         * Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
1076
1077 2006-07-06  Ulrich Drepper  <drepper@redhat.com>
1078
1079         * elf_gnu_hash.c: New file.
1080         * libelf.h: Declare elf_gnu_hash.
1081         * Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
1082         * libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
1083
1084 2006-06-15  Roland McGrath  <roland@redhat.com>
1085
1086         * libelf.h (elf_getarsym): Fix comment typo.
1087         Rename second parameter to be more explanatory.
1088         (elf_getident, elf_rawhide): Likewise.
1089
1090 2006-05-28  Ulrich Drepper  <drepper@redhat.com>
1091
1092         * elf32_updatefile.c (updatemmap): Preserve section content if
1093         copying would overwrite them.
1094         Fix msync paramters.
1095
1096 2006-04-04  Roland McGrath  <roland@redhat.com>
1097
1098         * elf32_updatefile.c (updatemmap): Handle other-endian case.
1099
1100 2006-04-04  Ulrich Drepper  <drepper@redhat.com>
1101
1102         * elf32_updatefile.c (updatemmap): Cleanups.  Remove shdr_dest
1103         variable.  Before writing sections, make a copy of the section
1104         header data if necessary.  Don't write section header while
1105         writing the section constent, it might overwrite some sections.
1106         Restore the pointer afterwards.
1107         * elf32_updatenull.c (updatenull): If the offset of a section in a
1108         file changed make sure we read the section so that it'll be written
1109         out.
1110
1111         * elf_update.c: Remove debug message.
1112
1113 2005-12-07  Roland McGrath  <roland@redhat.com>
1114
1115         * gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1116         (FETCH, STORE): New macros.
1117         (INLINE3): Use those to do alignment-friendly conversion.
1118
1119         * elf32_getshdr.c: Include map_address and start_offset in alignment
1120         calculations.
1121         * elf32_getphdr.c: Likewise.
1122
1123 2005-11-19  Roland McGrath  <roland@redhat.com>
1124
1125         * elf.h: Update from glibc.
1126
1127 2005-11-17  Roland McGrath  <roland@redhat.com>
1128
1129         * elf.h: Update from glibc.
1130
1131 2005-11-10  Roland McGrath  <roland@redhat.com>
1132
1133         * elf.h: Update from glibc.
1134
1135 2005-09-09  Roland McGrath  <roland@redhat.com>
1136
1137         * elf_update.c (write_file): Stat the file and fchmod it after update
1138         if its mode had S_ISUID or S_ISGID bits set.
1139
1140 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
1141
1142         * elf32_getphdr.c: Include <system.h>.  Use pread_retry instead of
1143         pread.  And branch prediction where useful.
1144         * elf_begin.c: Likewise.
1145         * elf_getdata.c: Likewise.
1146         * elf_getshstrndx.c: Likewise.
1147         * elf_readall.c: Likewise.
1148         * gelf_rawchunk.c: Likewise.
1149         * elf32_updatefile.c: Include <system.h>.  Use pread_retry instead of
1150         pread.  And branch prediction where useful.
1151         * elf_getarsym.c: Don't define pread_retry here.
1152
1153         * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1154         (%.os): Use COMPILE.os.
1155         (COMPILE.os): Filter out gconv options.
1156
1157 2005-08-27  Ulrich Drepper  <drepper@redhat.com>
1158
1159         * elf_begin.c (file_read_elf): Avoid reading ELF header from file
1160         again.  Instead accept additional parameter which points to it if we
1161         don't use mmap.
1162         (get_shnum): Use passed in e_ident value as source of ELF header.
1163
1164 2005-08-15  Ulrich Drepper  <drepper@redhat.com>
1165
1166         * elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
1167
1168         * Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
1169         * libelf.map: Export elf_getaroff.
1170         * libelf.h: Declare elf_getaroff.
1171         * elf_getaroff.c: New file.
1172
1173 2005-08-13  Ulrich Drepper  <drepper@redhat.com>
1174
1175         * elf_begin.c (get_shnum): Optimize memory handling.  Always read from
1176         mapped file if available.  Fix access to 64-bit sh_size.  Recognize
1177         overflow.
1178         (file_read_elf): Likewise.
1179
1180 2005-08-12  Roland McGrath  <roland@redhat.com>
1181
1182         * elf32_offscn.c: Do not match empty sections at OFFSET unless
1183         there are no nonempty sections at that offset.
1184
1185 2005-08-07  Ulrich Drepper  <drepper@redhat.com>
1186
1187         * elf.h: Update from glibc.
1188
1189 2005-08-06  Ulrich Drepper  <drepper@redhat.com>
1190
1191         * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1192
1193 2005-08-03  Ulrich Drepper  <drepper@redhat.com>
1194
1195         * libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1196         new version ELFUTILS_1.1.1.
1197
1198 2005-08-02  Ulrich Drepper  <drepper@redhat.com>
1199
1200         * elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
1201         * elf32_offscn.c: New file.
1202         * elf64_offscn.c: New file.
1203         * gelf_offscn.c: New file.
1204         * Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
1205         and gelf_offscn.c.
1206         * libelf.sym: Export new symbols.
1207
1208 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
1209
1210         * elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
1211         sections here anymore.
1212         * elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
1213
1214         * elf_update.c (elf_update): Get write lock, not read lock.
1215
1216         * elf32_updatenull.c (updatenull): Get section headers if necessary
1217         and possible.
1218
1219 2005-07-22  Ulrich Drepper  <drepper@redhat.com>
1220
1221         * elf32_updatenull.c (updatenull): If program header hasn't been loaded
1222         yet, try to do it now.
1223         Don't unnecessarily update overflow of section count in zeroth section
1224         sh_size field.
1225         If section content hasn't been read yet, do it before looking for the
1226         block size.  If no section data present, infer size of section header.
1227
1228 2005-05-11  Ulrich Drepper  <drepper@redhat.com>
1229
1230         * elf.h: Update again.
1231
1232 2005-05-09  Ulrich Drepper  <drepper@redhat.com>
1233
1234         * elf.h: Update from glibc.
1235
1236 2005-05-08  Roland McGrath  <roland@redhat.com>
1237
1238         * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1239         * elf_update.c (write_file) [_MUDFLAP]: Likewise.
1240
1241 2005-03-29  Ulrich Drepper  <drepper@redhat.com>
1242
1243         * elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
1244         * elf_end.c: Likewise.
1245         * elf_getdata.c: Likewise.
1246         * gelf_getehdr.c: Likewise.
1247         * nlist.c: Likewise.
1248         * libelfP.h: Add declarations of internal functions.
1249
1250 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
1251
1252         * common.h (CONVERT): Make sure all values are unsigned.
1253         (CONVERT_TO): Likewise.
1254
1255         * Makefile.am (AM_CFLAGS): Add -Wformat=2.
1256         Fix rule to build libelf.so.
1257
1258 2005-02-06  Ulrich Drepper  <drepper@redhat.com>
1259
1260         * Makefile.am: Cleanup AM_CFLAGS handling.  Add -Wunused -Wextra.
1261         Remove lint handling.
1262         * elf32_getphdr.c: Minor cleanups.
1263         * elf32_getshdr.c: Likewise.
1264         * elf32_updatefile.c: Likewise.
1265         * elf32_updatenull.c: Likewise.
1266         * elf_begin.c: Likewise.
1267         * elf_error.c: Likewise.
1268         * elf_getarsym.c: Likewise.
1269         * elf_getdata.c: Likewise.
1270         * elf_update.c: Likewise.
1271         * gelf_xlate.c: Likewise.
1272
1273 2005-02-05  Ulrich Drepper  <drepper@redhat.com>
1274
1275         * Makefile.am: Check for text relocations in constructed DSO.
1276
1277         * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1278
1279 2005-02-04  Ulrich Drepper  <drepper@redhat.com>
1280
1281         * gelf_getehdr.c (gelf_getehdr): Slight optimization.
1282
1283         * elf32_checksum.c (checksum): Do not look at NOBITS sections.
1284
1285         * gelf.h: Add gelf_checksum prototype.
1286
1287 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1288
1289         * elf32_checksum.c: Make compile with gcc 4.0.
1290         * elf32_updatefile.c: Likewise.
1291         * elf32_updatenull.c: Likewise.
1292         * elf_begin.c: Likewise.
1293         * elf_error.c: Likewise.
1294         * elf_getdata.c: Likewise.
1295         * elf_getident.c: Likewise.
1296
1297 2004-04-01  Ulrich Drepper  <drepper@redhat.com>
1298
1299         * elf.h: Update from glibc.
1300
1301 2004-01-23  Ulrich Drepper  <drepper@redhat.com>
1302
1303         * elf_update.c: Fix locking.
1304         * elf_clone.c: Likewise.
1305
1306         * libelf.h: Define ELF_T_LIB.
1307         * gelf_getlib.c: New file.
1308         * gelf_update_lib.c: New file.
1309         * gelf.h: Declare the new functions.  Define GElf_Lib.
1310         * abstract.h: Define Lib, Lib32, Lib64.
1311         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
1312         * gelf_xlate.h: Add entry for ElfXX_Lib.
1313         * elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
1314         * libelf.map: Add new symbols to ELFUTILS_1.1.
1315         * Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
1316         gelf_update_lib.c.
1317
1318 2004-01-17  Ulrich Drepper  <drepper@redhat.com>
1319
1320         * Makefile.am: Support building with mudflap.
1321
1322         * gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
1323         * dl-hash.h (_dl_elf_hash): Likewise.
1324
1325 2004-01-05  Ulrich Drepper  <drepper@redhat.com>
1326
1327         * elf-knowledge.h: New file.  From libelf subdir.
1328         * Makefile.am (euincludedir): Define.
1329         (euinclude_HEADERS): Add elf-knowledge.h.
1330
1331 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
1332
1333         * elf.h: Define some PT_IA_64_HP_* constants.
1334
1335 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
1336
1337         * libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
1338         state.elf64.scnincr to match state.elf{,32}.
1339
1340 2003-08-12  Ulrich Drepper  <drepper@redhat.com>
1341
1342         * elf32_updatefile.c (__updatemmap): When writing back file where
1343         some sections have not been read in, count their sizes based on
1344         the section header.
1345
1346 2003-08-11  Ulrich Drepper  <drepper@redhat.com>
1347
1348         * Moved to CVS archive.