Add configure --disable-textrelcheck option to enable CC=afl-fuzz on 32bit.
[platform/upstream/elfutils.git] / libelf / ChangeLog
1 2014-11-27  Mark Wielaard  <mjw@redhat.com>
2
3         * Makefile.am (libelf.so): Use textrel_check.
4
5 2014-11-23  Mark Wielaard  <mjw@redhat.com>
6
7         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
8         overflow check to unsigned.
9
10 2014-11-23  Mark Wielaard  <mjw@redhat.com>
11
12         * note_xlate.h (elf_cvt_note): Copy over any leftover data if
13         src != dest. The data is probably part of truncated name/desc.
14
15 2014-11-22  Mark Wielaard  <mjw@redhat.com>
16
17         * elf_getphdrnum.c (elf_getphdrnum): Sanity check the
18         __elf_getphdrnum_rdlock result.
19
20 2014-11-18  Mark Wielaard  <mjw@redhat.com>
21
22         * version_xlate.h (elf_cvt_Verdef): Check for overflow.
23         (elf_cvt_Verneed): Likewise.
24
25 2014-11-17  Mark Wielaard  <mjw@redhat.com>
26
27         * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
28
29 2014-11-16  Mark Wielaard  <mjw@redhat.com>
30
31         * elf_getshdrstrndx.c: Check there are section headers before
32         handling SHN_XINDEX.
33
34 2014-11-16  Mark Wielaard  <mjw@redhat.com>
35
36         * elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
37         Check for too many pheaders.
38         * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
39         actually exists before handling PN_XNUM.
40
41 2014-11-16  Mark Wielaard  <mjw@redhat.com>
42
43         * gelf_getnote.c (gelf_getnote): Check padding overflow.
44
45 2014-11-16  Mark Wielaard  <mjw@redhat.com>
46
47         * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
48         and align as Elf64_Off and Elf64_Xword not size_t.
49
50 2014-11-14  Mark Wielaard  <mjw@redhat.com>
51
52         * gelf_getnote.c (gelf_getnote): Check offset overflow.
53
54 2014-11-13  Mark Wielaard  <mjw@redhat.com>
55
56         * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
57         check.
58
59 2014-11-08  Mark Wielaard  <mjw@redhat.com>
60
61         * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
62
63 2014-11-07  Mark Wielaard  <mjw@redhat.com>
64
65         * elf_begin.c (file_read_elf): Correct sh_size check.
66         * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
67         overflow.
68
69 2014-09-10  Petr Machata  <pmachata@redhat.com>
70
71         * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
72         file is unreadable.
73
74 2014-07-07  Mark Wielaard  <mjw@redhat.com>
75
76         * elf.h: Update from glibc.
77
78 2014-04-13  Mark Wielaard  <mjw@redhat.com>
79
80         * Makefile.am: Remove !MUDFLAP conditions.
81         * elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
82         defined.
83         * elf_update.c (write_file): Remove _MUDFLAP condition.
84
85 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
86             Roland McGrath  <roland@redhat.com>
87
88         * libelfP.h (INVALID_NDX): Define.
89         * gelf_getdyn.c (gelf_getdyn): Use it.  Remove ndx < 0 test if any.
90         * gelf_getlib.c (gelf_getlib): Likewise.
91         * gelf_getmove.c (gelf_getmove): Likewise.
92         * gelf_getrel.c (gelf_getrel): Likewise.
93         * gelf_getrela.c (gelf_getrela): Likewise.
94         * gelf_getsym.c (gelf_getsym): Likewise.
95         * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
96         * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
97         * gelf_getversym.c (gelf_getversym): Likewise.
98         * gelf_update_dyn.c (gelf_update_dyn): Likewise.
99         * gelf_update_lib.c (gelf_update_lib): Likewise.
100         * gelf_update_move.c (gelf_update_move): Likewise.
101         * gelf_update_rel.c (gelf_update_rel): Likewise.
102         * gelf_update_rela.c (gelf_update_rela): Likewise.
103         * gelf_update_sym.c (gelf_update_sym): Likewise.
104         * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
105         * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
106         * gelf_update_versym.c (gelf_update_versym): Likewise.
107
108 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
109
110         * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
111         table fits into object's bounds.
112         * elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
113         elf->map_address.  Check if first section header fits into object's
114         bounds.
115         * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
116         Check if section header table fits into object's bounds.
117         * elf_begin.c (get_shnum): Ensure section headers fits into
118         object's bounds.
119         (file_read_elf): Make sure scncnt is small enough to allocate both
120         ElfXX_Shdr and Elf_Scn array.  Make sure section and program header
121         tables fit into object's bounds.  Avoid memory leak on failure.
122         * elf_newscn.c (elf_newscn): Check for overflow.
123         * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
124         (__elfw2(LIBELFBITS,updatefile)): Likewise.
125         * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
126         * elf_getarsym.c (elf_getarsym): Likewise.
127
128 2013-11-08  Mark Wielaard  <mjw@redhat.com>
129
130         * elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
131         already directly mmapped.
132
133 2013-11-05  Mark Wielaard  <mjw@redhat.com>
134
135         * elf32_updatefile.c (elfXX_updatefile): Copy all section headers
136         if elf->flags dirty.
137
138 2013-11-01  Michael Forney  <mforney@mforney.org>
139
140         * Makefile.am: Use READELF.
141
142 2013-10-01  Petr Machata  <pmachata@redhat.com>
143
144         * elf.h: Update from glibc.
145
146 2013-06-17  Petr Machata  <pmachata@redhat.com>
147
148         * elf.h: Update from glibc.
149
150 2013-08-28  Namhyung Kim  <namhyung@gmail.com>
151
152         * gelf.h (gelf_fsize): Fix typo in comment.
153
154 2013-08-28  Mark Wielaard  <mjw@redhat.com>
155
156         * gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
157
158 2013-08-27  Mark Wielaard  <mjw@redhat.com>
159
160         * gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
161
162 2013-08-25  Kurt Roeckx  <kurt@roeckx.be>
163
164         * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
165         dereference to avoid alignment problems.
166
167 2013-01-07  Roland McGrath  <roland@hack.frob.com>
168
169         * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
170         would be unaligned and !ALLOW_UNALIGNED.
171
172         * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
173         dereference so as not to assume the field is naturally aligned.
174
175 2012-09-17  Petr Machata  <pmachata@redhat.com>
176
177         * elf.h: Update from glibc.
178
179 2012-08-16  Roland McGrath  <roland@hack.frob.com>
180
181         * elf.h: Update from glibc.
182
183 2012-08-14  Mark Wielaard  <mjw@redhat.com>
184
185         * elf32_checksum.c (ebl_debugscn_p): Removed unused define and
186         confusing outdated comment.
187
188 2012-08-01  Petr Machata  <pmachata@redhat.com>
189
190         * elf_getarsym (read_number_entries): New function.
191         (elf_getarsym): Handle 64-bit symbol table, stored in special
192         entry named "/SYM64/".
193         * elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
194         because it contains 64-bit symbol table.
195
196 2012-07-19  Mark Wielaard  <mjw@redhat.com>
197
198         * elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
199         to asserts.
200
201 2012-07-17  Petr Machata  <pmachata@redhat.com>
202
203         * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
204         integer number of records in case of ELF_T_NHDR.
205
206 2012-04-02  Mark Wielaard  <mjw@redhat.com>
207
208         * elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
209         there are no nonempty sections at that offset.
210
211 2012-03-21  Roland McGrath  <roland@hack.frob.com>
212
213         * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
214
215 2011-02-26  Mark Wielaard  <mjw@redhat.com>
216
217         * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
218
219 2011-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
220
221         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
222         when MAXIMUM_SIZE == ~0.
223
224 2010-08-18  Roland McGrath  <roland@redhat.com>
225
226         * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
227         and ELF_T_GNUHASH.
228         Reported by Mark Hatle <mark.hatle@windriver.com>.
229
230         * exttypes.h: Add cases for ElfNN_Lib.
231         Reported by Mark Hatle <mark.hatle@windriver.com>.
232
233 2010-06-14  Ulrich Drepper  <drepper@redhat.com>
234
235         * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
236         * gelf_update_phdr.c: Likewise.
237         * gelf_update_ehdr.c: Likewise.
238
239 2010-04-14  Roland McGrath  <roland@redhat.com>
240
241         * elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
242         * elf_begin.c (file_read_elf): Don't set .phdr here.
243
244 2010-04-13  Roland McGrath  <roland@redhat.com>
245
246         * elf.h: Update from glibc.
247
248 2010-04-06  Roland McGrath  <roland@redhat.com>
249
250         * elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
251         in error message.
252
253 2010-04-01  Petr Machata  <pmachata@redhat.com>
254
255         * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
256         that do not need a conversion.
257
258 2010-03-11  Roland McGrath  <roland@redhat.com>
259
260         * elf.h: Update from glibc.
261
262 2010-03-04  Ulrich Drepper  <drepper@redhat.com>
263
264         * elf.h: Update from glibc.
265
266 2010-02-17  Roland McGrath  <roland@redhat.com>
267
268         * elf_begin.c (file_read_elf): Leave section rawdata_base and
269         data_base pointers null when [sh_offset,sh_size) points outside
270         the mapped file.
271
272 2010-02-15  Roland McGrath  <roland@redhat.com>
273
274         * Makefile.am: Use config/eu.am for common stuff.
275
276 2010-01-07  Roland McGrath  <roland@redhat.com>
277
278         * elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
279         * gelf_getphdr.c: Likewise.
280         * gelf_update_phdr.c: Likewise.
281         * elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
282         * elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
283         * elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
284         If COUNT is too large, use store PN_XNUM instead and set sh_info.
285         * elf_begin.c (file_read_elf): Always allocate space we can use later
286         for section 0 if doing RDWR.
287
288         * elf_getphdrnum.c: New file.
289         * Makefile.am (libelf_a_SOURCES): Add it.
290         * libelf.h: Declare elf_getphdrnum.
291         * libelfP.h: Declare __elf_getphdrnum_rdlock.
292         * libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
293
294         * elf.h: Update from glibc.
295
296 2009-10-23  Lubomir Rintel  <lkundrak@v3.sk>
297
298         * elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
299         filling from section start, not shdr_end.
300
301 2009-11-10  Roland McGrath  <roland@redhat.com>
302
303         * elf_readall.c (__libelf_readall): Fetch file size if not yet known.
304
305 2009-11-06  Mark Wielaard  <mjw@redhat.com>
306
307         * elf_next.c (elf_next): Mark the archive header as unusable when
308         there is no next ar element.
309
310 2009-08-12  Mark Wielaard  <mjw@redhat.com>
311
312         * Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
313
314 2009-07-26  Ulrich Drepper  <drepper@redhat.com>
315
316         * elf.h: Update from glibc.
317
318 2009-07-21  Ulrich Drepper  <drepper@redhat.com>
319
320         * elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
321         sections.  Patch by Lubomir Rintel <lkundrak@v3.sk>.
322
323 2009-07-08  Roland McGrath  <roland@redhat.com>
324
325         * libelfP.h (struct Elf): Remove unused ar.has_index field.
326         Reorder various members for optimal packing.
327
328 2009-07-08  Ulrich Drepper  <drepper@redhat.com>
329
330         * elf.h: Update from glibc.
331
332 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
333
334         * Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
335         elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
336         * elf_getshnum.c: Renamed to...
337         * elf_getshdrnum.c: ...this.  Rename function and add old name as
338         alias.  Likewise for internal functions with derived names.
339         * elf_getshstrndx.c: Renamed to...
340         * elf_getshdrstrndx.c: ...this.  Rename function and add old name as
341         alias.  Likewise for internal functions with derived names.
342         * libelf.h: Add prototypes for new names.  Make old names as
343         deprecated.
344         * libelfP.h: Rename internal function prototypes.
345         * libelf.map: Export for names.
346         * elf32_checksum.c: Don't use deprecated functions.
347         * elf32_getshdr.c: Likewise.
348
349 2009-06-01  Ulrich Drepper  <drepper@redhat.com>
350
351         * elf.h: Update from glibc.
352
353 2009-04-14  Roland McGrath  <roland@redhat.com>
354
355         * elf.h: Update from glibc.
356
357 2009-04-01  Roland McGrath  <roland@redhat.com>
358
359         * elf.h: Update from glibc.
360
361 2009-02-10  Ulrich Drepper  <drepper@redhat.com>
362
363         * elf32_updatefile.c (updatefile): For the zeroth section we still
364         have to copy the section header.
365
366 2009-02-01  Ulrich Drepper  <drepper@redhat.com>
367
368         * elf_strptr.c: Add comment re possible problem.
369
370 2009-01-26  Ulrich Drepper  <drepper@redhat.com>
371
372         * elf32_updatenull.c (updatenull_wrlock): Fix comment of
373         ELF_F_LAYOUT behaviour re section header table.
374
375 2009-01-22  Ulrich Drepper  <drepper@redhat.com>
376
377         * elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
378         sections even if only the section at the start of the gap has been
379         changed.
380         (__elfXX_updatefile): Likewise.
381
382 2009-01-21  Ulrich Drepper  <drepper@redhat.com>
383
384         * elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
385         handle sections for NOBITS sections.
386         (elfXX_updatefile): Likewise.
387
388         * elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
389         sections we haven't loaded, update last_position based on scn_start,
390         not based on old value.  Don't run the loop for the dummy section 0.
391         (elfXX_updatefile): Don't run the loop for the dummy section 0.
392
393 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
394
395         * libelfP.h (_): We only have one translation domain, elfutils.
396
397         * Makefile.am: Use USE_LOCKS instead of USE_TLS.
398         * elf_error.c: Always use __thread.  Remove all !USE_TLS code.
399
400 2009-01-04  Roland McGrath  <roland@redhat.com>
401
402         * note_xlate.h (elf_cvt_note): Don't examine a size too small to
403         container a note header.
404
405 2008-12-11  Roland McGrath  <roland@redhat.com>
406
407         * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
408         placement offset going backwards, for out-of-order or overlapping
409         (bogus) sh_offset layouts.  It's a dumb use, but should not crash.
410         (__elfw2(LIBELFBITS,updatefile)): Likewise.
411         Fixes RHBZ#476136.
412
413         * libelf.h (Elf_Data): Whitespace fix.
414
415 2008-12-10  Roland McGrath  <roland@redhat.com>
416
417         * elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
418
419 2008-10-22  Petr Machata  <pmachata@redhat.com>
420
421         * elf_rawfile.c (elf_rawfile): Lock around elf-> references.
422
423 2008-10-21  Petr Machata  <pmachata@redhat.com>
424
425         * libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
426         * elf32_getehdr.c (getehdr_rdlock): Move the code to new function
427         getehdr_impl and make it a wrapper.  Rename to getehdr_wrlock.
428         (getehdr_impl): Guard elf->class init with wrlock.
429         (getehdr): Also make it a wrapper of getehdr_impl.
430         * elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
431
432 2008-10-20  Petr Machata  <pmachata@redhat.com>
433
434         * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
435         code that reads mutable elf state.  Relock to write lock to chain
436         the new chunk on the elf rawchunks list.
437
438 2008-10-20  Petr Machata  <pmachata@redhat.com>
439
440         * elf32_checksum.c (checksum): Place a lock around the code that
441         processes data.  Make it wrlock if the code needs to xlate the
442         data before processing.
443
444 2008-10-16  Petr Machata  <pmachata@redhat.com>
445
446         * elf_begin.c
447         (__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
448         (dup_elf): Adjust the call.
449         (elf_begin): New local function lock_dup_elf.  Relocks the elf if
450         necessary before calling dup.  Call this instead of dup_elf.
451         * elf_getarhdr.c
452         (elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
453         * elf_next.c (elf_next): Likewise.
454         * elf_rand.c (elf_rand): Likewise.
455
456 2008-10-14  Petr Machata  <pmachata@redhat.com>
457
458         * elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
459
460 2008-11-26  Roland McGrath  <roland@redhat.com>
461
462         * elf.h: Update from glibc.
463
464 2008-10-06  Roland McGrath  <roland@redhat.com>
465
466         * elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
467
468 2008-08-27  Roland McGrath  <roland@redhat.com>
469
470         * elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
471
472         * libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
473
474 2008-08-25  Roland McGrath  <roland@redhat.com>
475
476         * Makefile.am (libelf_so_LDLIBS): New variable.
477         (libelf.so): Use it in the link.
478
479 2008-08-21  Petr Machata  <pmachata@redhat.com>
480
481         * elf_getdata.c, libelfP.h
482         (__elf_getdata_internal): Rename to __elf_getdata_rdlock.
483         (__libelf_set_rawdata_wrlock): New function.
484         (__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
485         * elf32_updatenull.c, libelfP.h
486         (__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
487
488 2008-08-21  Petr Machata  <pmachata@redhat.com>
489
490         * elf32_getphdr.c, libelfP.h
491         (__elfNN_getphdr_internal): Drop.  Move __elfNN_getphdr_internal
492         code to __elfNN_getphdr_wrlock.
493         (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
494         (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
495         wrappers of getphdr_impl.
496
497 2008-08-21  Petr Machata  <pmachata@redhat.com>
498
499         * elf32_getehdr.c, libelfP.h
500         (__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
501         * gelf_getehdr, libelfP.h:
502         (__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
503
504 2008-08-21  Petr Machata  <pmachata@redhat.com>
505
506         * elf32_getshdr.c
507         (__elfNN_getshdr_internal): Drop.
508         (load_shdr_wrlock, scn_valid): New functions, contain bits of
509         behaviour from __elfNN_getshdr_internal.
510         (__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
511         dropped _internal functions above.
512         * elf_getshnum.c
513         (__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
514
515 2008-08-04  Petr Machata  <pmachata@redhat.com>
516
517         * libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
518
519 2008-07-28  Roland McGrath  <roland@redhat.com>
520
521         * elf.h: Update from glibc.
522
523 2008-03-31  Roland McGrath  <roland@redhat.com>
524
525         * elf32_offscn.c: Make sure shdrs have been read in.
526
527 2008-02-19  Roland McGrath  <roland@redhat.com>
528
529         * elf.h: Update from glibc.
530
531 2008-02-08  Roland McGrath  <roland@redhat.com>
532
533         * elf.h: Update from glibc.
534
535 2008-01-31  Ulrich Drepper  <drepper@redhat.com>
536
537         * elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
538         under construction and no raw data can be read from disk.
539
540 2008-01-30  Roland McGrath  <roland@redhat.com>
541
542         * elf.h: Update from glibc.
543
544 2008-01-26  Roland McGrath  <roland@redhat.com>
545
546         * elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
547         Fixes various pastos in wrong type in sizeof, wrong string parsed.
548
549 2008-01-20  Roland McGrath  <roland@redhat.com>
550
551         * elf_getaroff.c: Calculate from start_offset, instead of using
552         parent's state.ar.offset field.
553
554 2008-01-08  Roland McGrath  <roland@redhat.com>
555
556         * Makefile.am (euinclude): Variable removed.
557         (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
558
559 2008-01-03  Roland McGrath  <roland@redhat.com>
560
561         * common.h: Add __attribute__ ((unused)) to static functions.
562
563 2007-12-20  Ulrich Drepper  <drepper@redhat.com>
564
565         * Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
566         * libelfP.h (struct Elf_Scn): Add shndx_index field.
567         Declare __elf_scnshndx_internal.
568         * elf32_getshdr.c: Record location of extended section header.
569         * elf_begin.c (file_read_elf): Likewise.
570         * elf_scnshndx.c: New file.
571         * libelf.h: Declare elf_scnshndx.
572         * libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
573
574 2007-11-12  Roland McGrath  <roland@redhat.com>
575
576         * libelf.h: Replace off64_t with loff_t throughout.
577         Only that type name is unconditionally defined by <sys/types.h>
578
579 2007-11-03  Roland McGrath  <roland@redhat.com>
580
581         * libelf.h (Elf_Data): Comment fix.
582
583 2007-10-18  Roland McGrath  <roland@redhat.com>
584
585         * elf.h: Update from glibc.
586
587 2007-10-07  Roland McGrath  <roland@redhat.com>
588
589         * elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
590         member access in terminating name with no trailing /.  Trim trailing
591         spaces when there is no /.
592
593 2007-10-04  Roland McGrath  <roland@redhat.com>
594
595         * elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
596
597 2007-10-03  Roland McGrath  <roland@redhat.com>
598
599         * libelf.h (Elf_Data): Use off64_t for d_off.
600         (Elf_Arhdr): Use off64_t for ar_size.
601         (elf_update, elf_getbase, elf_getaroff): Return off64_t.
602
603         * gelf_rawchunk.c: File removed.
604         * gelf_freechunk.c: File removed.
605         * Makefile.am (libelf_a_SOURCES): Remove them.
606         * libelf.map (ELFUTILS_1.0): Remove exports.
607         * gelf.h: Remove decls.
608
609         * elf_getdata_rawchunk.c: New file.
610         * Makefile.am (libelf_a_SOURCES): Add it.
611         * libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
612         * libelf.h: Declare it.
613         * libelfP.h (Elf_Data_Chunk): New type.
614         (struct Elf.elf): New member `rawchunks'.
615         * elf_end.c (elf_end): Free recorded rawchunk buffers.
616
617 2007-08-24  Roland McGrath  <roland@redhat.com>
618
619         * gelf_getnote.c: New file.
620         * Makefile.am (libelf_a_SOURCES): Add it.
621         * gelf.h: Declare gelf_getnote.
622         * libelf.map (ELFUTILS_1.3): Add gelf_getnote.
623
624         * libelfP.h (NOTE_ALIGN): New macro.
625         * note_xlate.h: New file.
626         * Makefile.am (noinst_HEADERS): Add it.
627         * gelf_xlate.c: Include it.
628         (__elf_xfctstom): Use elf_cvt_note.
629         * elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
630         (__libelf_set_rawdata): Likewise.
631
632 2007-08-19  Roland McGrath  <roland@redhat.com>
633
634         * gelf_update_auxv.c: New file.
635         * gelf_getauxv.c: New file.
636         * Makefile.am (libelf_a_SOURCES): Add them.
637         * gelf.h: Declare gelf_getauxv, gelf_update_auxv.
638         * libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
639         Export gelf_getauxv, gelf_update_auxv.
640
641         * libelf.h (Elf_Type): Add ELF_T_AUXV.
642         * abstract.h: Add auxv_t entries.
643         * exttypes.h: Likewise.
644         * gelf_xlate.h: Likewise.
645         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
646         * gelf_fsize.c (__libelf_type_sizes): Likewise.
647
648 2007-08-12  Roland McGrath  <roland@redhat.com>
649
650         * elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
651         and only tertiarily on index.
652
653 2007-07-09  Roland McGrath  <roland@redhat.com>
654
655         * elf.h: Update from glibc.
656
657 2007-04-22  Roland McGrath  <roland@redhat.com>
658
659         * elf.h: Update from glibc.
660
661 2007-03-18  Roland McGrath  <roland@redhat.com>
662
663         * elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
664         Return zero when the section headers do not fit within MAXSIZE.
665
666 2007-03-09  Roland McGrath  <roland@redhat.com>
667
668         * libelfP.h (LIBELF_EV_IDX): New macro.
669         (__libelf_type_align): New macro.
670         [! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
671         * elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
672         (convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
673         and __libelf_type_sizes, in place of old table.
674         (__libc_type_aligns): New const variable.
675
676 2007-02-04  Ulrich Drepper  <drepper@redhat.com>
677
678         * Makefile (libelf.so): Build with -z relro.
679
680         * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
681
682 2007-01-30  Ulrich Drepper  <drepper@redhat.com>
683
684         * nlist.c: Close file descriptor before returning.
685
686 2007-01-20  Roland McGrath  <roland@redhat.com>
687
688         * gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
689         convert the final word.
690
691         * elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
692         MY_ELFDATA on !ALLOW_UNALIGNED machines.
693
694 2007-01-18  Roland McGrath  <roland@redhat.com>
695
696         * gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
697         it on read error.
698
699 2006-10-13  Roland McGrath  <roland@redhat.com>
700
701         * elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
702         * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
703
704 2006-08-29  Roland McGrath  <roland@redhat.com>
705
706         * elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
707         MY_ELFDATA on !ALLOW_UNALIGNED machines.
708         Reported by Christian Aichinger <Greek0@gmx.net>.
709
710         * Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
711
712 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
713
714         * elf.h (DT_VALNUM): Update.
715         (DT_ADDRNUM): Likewise.
716
717 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
718
719         * elf32_updatefile.c: Adjust for internal_function_def removal.
720         * elf32_updatenull.c: Likewise.
721         * elf_begin.c: Likewise.
722         * elf_getdata.c: Likewise.
723
724 2006-07-11  Ulrich Drepper  <drepper@redhat.com>
725
726         * libelf.h: Define ELF_T_GNUHASH.
727         * elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
728         (shtype_map): Add SHT_GNU_HASH entries.
729         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
730         * gnuhash_xlate.h: New file.
731         * Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
732
733 2006-07-06  Ulrich Drepper  <drepper@redhat.com>
734
735         * elf_gnu_hash.c: New file.
736         * libelf.h: Declare elf_gnu_hash.
737         * Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
738         * libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
739
740 2006-06-15  Roland McGrath  <roland@redhat.com>
741
742         * libelf.h (elf_getarsym): Fix comment typo.
743         Rename second parameter to be more explanatory.
744         (elf_getident, elf_rawhide): Likewise.
745
746 2006-05-28  Ulrich Drepper  <drepper@redhat.com>
747
748         * elf32_updatefile.c (updatemmap): Preserve section content if
749         copying would overwrite them.
750         Fix msync paramters.
751
752 2006-04-04  Roland McGrath  <roland@redhat.com>
753
754         * elf32_updatefile.c (updatemmap): Handle other-endian case.
755
756 2006-04-04  Ulrich Drepper  <drepper@redhat.com>
757
758         * elf32_updatefile.c (updatemmap): Cleanups.  Remove shdr_dest
759         variable.  Before writing sections, make a copy of the section
760         header data if necessary.  Don't write section header while
761         writing the section constent, it might overwrite some sections.
762         Restore the pointer afterwards.
763         * elf32_updatenull.c (updatenull): If the offset of a section in a
764         file changed make sure we read the section so that it'll be written
765         out.
766
767         * elf_update.c: Remove debug message.
768
769 2005-12-07  Roland McGrath  <roland@redhat.com>
770
771         * gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
772         (FETCH, STORE): New macros.
773         (INLINE3): Use those to do alignment-friendly conversion.
774
775         * elf32_getshdr.c: Include map_address and start_offset in alignment
776         calculations.
777         * elf32_getphdr.c: Likewise.
778
779 2005-11-19  Roland McGrath  <roland@redhat.com>
780
781         * elf.h: Update from glibc.
782
783 2005-11-17  Roland McGrath  <roland@redhat.com>
784
785         * elf.h: Update from glibc.
786
787 2005-11-10  Roland McGrath  <roland@redhat.com>
788
789         * elf.h: Update from glibc.
790
791 2005-09-09  Roland McGrath  <roland@redhat.com>
792
793         * elf_update.c (write_file): Stat the file and fchmod it after update
794         if its mode had S_ISUID or S_ISGID bits set.
795
796 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
797
798         * elf32_getphdr.c: Include <system.h>.  Use pread_retry instead of
799         pread.  And branch prediction where useful.
800         * elf_begin.c: Likewise.
801         * elf_getdata.c: Likewise.
802         * elf_getshstrndx.c: Likewise.
803         * elf_readall.c: Likewise.
804         * gelf_rawchunk.c: Likewise.
805         * elf32_updatefile.c: Include <system.h>.  Use pread_retry instead of
806         pread.  And branch prediction where useful.
807         * elf_getarsym.c: Don't define pread_retry here.
808
809         * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
810         (%.os): Use COMPILE.os.
811         (COMPILE.os): Filter out gconv options.
812
813 2005-08-27  Ulrich Drepper  <drepper@redhat.com>
814
815         * elf_begin.c (file_read_elf): Avoid reading ELF header from file
816         again.  Instead accept additional parameter which points to it if we
817         don't use mmap.
818         (get_shnum): Use passed in e_ident value as source of ELF header.
819
820 2005-08-15  Ulrich Drepper  <drepper@redhat.com>
821
822         * elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
823
824         * Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
825         * libelf.map: Export elf_getaroff.
826         * libelf.h: Declare elf_getaroff.
827         * elf_getaroff.c: New file.
828
829 2005-08-13  Ulrich Drepper  <drepper@redhat.com>
830
831         * elf_begin.c (get_shnum): Optimize memory handling.  Always read from
832         mapped file if available.  Fix access to 64-bit sh_size.  Recognize
833         overflow.
834         (file_read_elf): Likewise.
835
836 2005-08-12  Roland McGrath  <roland@redhat.com>
837
838         * elf32_offscn.c: Do not match empty sections at OFFSET unless
839         there are no nonempty sections at that offset.
840
841 2005-08-07  Ulrich Drepper  <drepper@redhat.com>
842
843         * elf.h: Update from glibc.
844
845 2005-08-06  Ulrich Drepper  <drepper@redhat.com>
846
847         * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
848
849 2005-08-03  Ulrich Drepper  <drepper@redhat.com>
850
851         * libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
852         new version ELFUTILS_1.1.1.
853
854 2005-08-02  Ulrich Drepper  <drepper@redhat.com>
855
856         * elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
857         * elf32_offscn.c: New file.
858         * elf64_offscn.c: New file.
859         * gelf_offscn.c: New file.
860         * Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
861         and gelf_offscn.c.
862         * libelf.sym: Export new symbols.
863
864 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
865
866         * elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
867         sections here anymore.
868         * elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
869
870         * elf_update.c (elf_update): Get write lock, not read lock.
871
872         * elf32_updatenull.c (updatenull): Get section headers if necessary
873         and possible.
874
875 2005-07-22  Ulrich Drepper  <drepper@redhat.com>
876
877         * elf32_updatenull.c (updatenull): If program header hasn't been loaded
878         yet, try to do it now.
879         Don't unnecessarily update overflow of section count in zeroth section
880         sh_size field.
881         If section content hasn't been read yet, do it before looking for the
882         block size.  If no section data present, infer size of section header.
883
884 2005-05-11  Ulrich Drepper  <drepper@redhat.com>
885
886         * elf.h: Update again.
887
888 2005-05-09  Ulrich Drepper  <drepper@redhat.com>
889
890         * elf.h: Update from glibc.
891
892 2005-05-08  Roland McGrath  <roland@redhat.com>
893
894         * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
895         * elf_update.c (write_file) [_MUDFLAP]: Likewise.
896
897 2005-03-29  Ulrich Drepper  <drepper@redhat.com>
898
899         * elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
900         * elf_end.c: Likewise.
901         * elf_getdata.c: Likewise.
902         * gelf_getehdr.c: Likewise.
903         * nlist.c: Likewise.
904         * libelfP.h: Add declarations of internal functions.
905
906 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
907
908         * common.h (CONVERT): Make sure all values are unsigned.
909         (CONVERT_TO): Likewise.
910
911         * Makefile.am (AM_CFLAGS): Add -Wformat=2.
912         Fix rule to build libelf.so.
913
914 2005-02-06  Ulrich Drepper  <drepper@redhat.com>
915
916         * Makefile.am: Cleanup AM_CFLAGS handling.  Add -Wunused -Wextra.
917         Remove lint handling.
918         * elf32_getphdr.c: Minor cleanups.
919         * elf32_getshdr.c: Likewise.
920         * elf32_updatefile.c: Likewise.
921         * elf32_updatenull.c: Likewise.
922         * elf_begin.c: Likewise.
923         * elf_error.c: Likewise.
924         * elf_getarsym.c: Likewise.
925         * elf_getdata.c: Likewise.
926         * elf_update.c: Likewise.
927         * gelf_xlate.c: Likewise.
928
929 2005-02-05  Ulrich Drepper  <drepper@redhat.com>
930
931         * Makefile.am: Check for text relocations in constructed DSO.
932
933         * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
934
935 2005-02-04  Ulrich Drepper  <drepper@redhat.com>
936
937         * gelf_getehdr.c (gelf_getehdr): Slight optimization.
938
939         * elf32_checksum.c (checksum): Do not look at NOBITS sections.
940
941         * gelf.h: Add gelf_checksum prototype.
942
943 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
944
945         * elf32_checksum.c: Make compile with gcc 4.0.
946         * elf32_updatefile.c: Likewise.
947         * elf32_updatenull.c: Likewise.
948         * elf_begin.c: Likewise.
949         * elf_error.c: Likewise.
950         * elf_getdata.c: Likewise.
951         * elf_getident.c: Likewise.
952
953 2004-04-01  Ulrich Drepper  <drepper@redhat.com>
954
955         * elf.h: Update from glibc.
956
957 2004-01-23  Ulrich Drepper  <drepper@redhat.com>
958
959         * elf_update.c: Fix locking.
960         * elf_clone.c: Likewise.
961
962         * libelf.h: Define ELF_T_LIB.
963         * gelf_getlib.c: New file.
964         * gelf_update_lib.c: New file.
965         * gelf.h: Declare the new functions.  Define GElf_Lib.
966         * abstract.h: Define Lib, Lib32, Lib64.
967         * gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
968         * gelf_xlate.h: Add entry for ElfXX_Lib.
969         * elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
970         * libelf.map: Add new symbols to ELFUTILS_1.1.
971         * Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
972         gelf_update_lib.c.
973
974 2004-01-17  Ulrich Drepper  <drepper@redhat.com>
975
976         * Makefile.am: Support building with mudflap.
977
978         * gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
979         * dl-hash.h (_dl_elf_hash): Likewise.
980
981 2004-01-05  Ulrich Drepper  <drepper@redhat.com>
982
983         * elf-knowledge.h: New file.  From libelf subdir.
984         * Makefile.am (euincludedir): Define.
985         (euinclude_HEADERS): Add elf-knowledge.h.
986
987 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
988
989         * elf.h: Define some PT_IA_64_HP_* constants.
990
991 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
992
993         * libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
994         state.elf64.scnincr to match state.elf{,32}.
995
996 2003-08-12  Ulrich Drepper  <drepper@redhat.com>
997
998         * elf32_updatefile.c (__updatemmap): When writing back file where
999         some sections have not been read in, count their sizes based on
1000         the section header.
1001
1002 2003-08-11  Ulrich Drepper  <drepper@redhat.com>
1003
1004         * Moved to CVS archive.