1 2014-11-27 Mark Wielaard <mjw@redhat.com>
3 * Makefile.am (libelf.so): Use textrel_check.
5 2014-11-23 Mark Wielaard <mjw@redhat.com>
7 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
8 overflow check to unsigned.
10 2014-11-23 Mark Wielaard <mjw@redhat.com>
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.
15 2014-11-22 Mark Wielaard <mjw@redhat.com>
17 * elf_getphdrnum.c (elf_getphdrnum): Sanity check the
18 __elf_getphdrnum_rdlock result.
20 2014-11-18 Mark Wielaard <mjw@redhat.com>
22 * version_xlate.h (elf_cvt_Verdef): Check for overflow.
23 (elf_cvt_Verneed): Likewise.
25 2014-11-17 Mark Wielaard <mjw@redhat.com>
27 * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
29 2014-11-16 Mark Wielaard <mjw@redhat.com>
31 * elf_getshdrstrndx.c: Check there are section headers before
34 2014-11-16 Mark Wielaard <mjw@redhat.com>
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.
41 2014-11-16 Mark Wielaard <mjw@redhat.com>
43 * gelf_getnote.c (gelf_getnote): Check padding overflow.
45 2014-11-16 Mark Wielaard <mjw@redhat.com>
47 * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
48 and align as Elf64_Off and Elf64_Xword not size_t.
50 2014-11-14 Mark Wielaard <mjw@redhat.com>
52 * gelf_getnote.c (gelf_getnote): Check offset overflow.
54 2014-11-13 Mark Wielaard <mjw@redhat.com>
56 * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
59 2014-11-08 Mark Wielaard <mjw@redhat.com>
61 * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
63 2014-11-07 Mark Wielaard <mjw@redhat.com>
65 * elf_begin.c (file_read_elf): Correct sh_size check.
66 * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
69 2014-09-10 Petr Machata <pmachata@redhat.com>
71 * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
74 2014-07-07 Mark Wielaard <mjw@redhat.com>
76 * elf.h: Update from glibc.
78 2014-04-13 Mark Wielaard <mjw@redhat.com>
80 * Makefile.am: Remove !MUDFLAP conditions.
81 * elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
83 * elf_update.c (write_file): Remove _MUDFLAP condition.
85 2014-01-17 Jakub Jelinek <jakub@redhat.com>
86 Roland McGrath <roland@redhat.com>
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.
108 2014-01-17 Jakub Jelinek <jakub@redhat.com>
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
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
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.
128 2013-11-08 Mark Wielaard <mjw@redhat.com>
130 * elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
131 already directly mmapped.
133 2013-11-05 Mark Wielaard <mjw@redhat.com>
135 * elf32_updatefile.c (elfXX_updatefile): Copy all section headers
138 2013-11-01 Michael Forney <mforney@mforney.org>
140 * Makefile.am: Use READELF.
142 2013-10-01 Petr Machata <pmachata@redhat.com>
144 * elf.h: Update from glibc.
146 2013-06-17 Petr Machata <pmachata@redhat.com>
148 * elf.h: Update from glibc.
150 2013-08-28 Namhyung Kim <namhyung@gmail.com>
152 * gelf.h (gelf_fsize): Fix typo in comment.
154 2013-08-28 Mark Wielaard <mjw@redhat.com>
156 * gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
158 2013-08-27 Mark Wielaard <mjw@redhat.com>
160 * gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
162 2013-08-25 Kurt Roeckx <kurt@roeckx.be>
164 * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
165 dereference to avoid alignment problems.
167 2013-01-07 Roland McGrath <roland@hack.frob.com>
169 * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
170 would be unaligned and !ALLOW_UNALIGNED.
172 * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
173 dereference so as not to assume the field is naturally aligned.
175 2012-09-17 Petr Machata <pmachata@redhat.com>
177 * elf.h: Update from glibc.
179 2012-08-16 Roland McGrath <roland@hack.frob.com>
181 * elf.h: Update from glibc.
183 2012-08-14 Mark Wielaard <mjw@redhat.com>
185 * elf32_checksum.c (ebl_debugscn_p): Removed unused define and
186 confusing outdated comment.
188 2012-08-01 Petr Machata <pmachata@redhat.com>
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.
196 2012-07-19 Mark Wielaard <mjw@redhat.com>
198 * elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
201 2012-07-17 Petr Machata <pmachata@redhat.com>
203 * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
204 integer number of records in case of ELF_T_NHDR.
206 2012-04-02 Mark Wielaard <mjw@redhat.com>
208 * elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
209 there are no nonempty sections at that offset.
211 2012-03-21 Roland McGrath <roland@hack.frob.com>
213 * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
215 2011-02-26 Mark Wielaard <mjw@redhat.com>
217 * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
219 2011-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
221 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
222 when MAXIMUM_SIZE == ~0.
224 2010-08-18 Roland McGrath <roland@redhat.com>
226 * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
228 Reported by Mark Hatle <mark.hatle@windriver.com>.
230 * exttypes.h: Add cases for ElfNN_Lib.
231 Reported by Mark Hatle <mark.hatle@windriver.com>.
233 2010-06-14 Ulrich Drepper <drepper@redhat.com>
235 * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
236 * gelf_update_phdr.c: Likewise.
237 * gelf_update_ehdr.c: Likewise.
239 2010-04-14 Roland McGrath <roland@redhat.com>
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.
244 2010-04-13 Roland McGrath <roland@redhat.com>
246 * elf.h: Update from glibc.
248 2010-04-06 Roland McGrath <roland@redhat.com>
250 * elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
253 2010-04-01 Petr Machata <pmachata@redhat.com>
255 * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
256 that do not need a conversion.
258 2010-03-11 Roland McGrath <roland@redhat.com>
260 * elf.h: Update from glibc.
262 2010-03-04 Ulrich Drepper <drepper@redhat.com>
264 * elf.h: Update from glibc.
266 2010-02-17 Roland McGrath <roland@redhat.com>
268 * elf_begin.c (file_read_elf): Leave section rawdata_base and
269 data_base pointers null when [sh_offset,sh_size) points outside
272 2010-02-15 Roland McGrath <roland@redhat.com>
274 * Makefile.am: Use config/eu.am for common stuff.
276 2010-01-07 Roland McGrath <roland@redhat.com>
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.
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.
294 * elf.h: Update from glibc.
296 2009-10-23 Lubomir Rintel <lkundrak@v3.sk>
298 * elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
299 filling from section start, not shdr_end.
301 2009-11-10 Roland McGrath <roland@redhat.com>
303 * elf_readall.c (__libelf_readall): Fetch file size if not yet known.
305 2009-11-06 Mark Wielaard <mjw@redhat.com>
307 * elf_next.c (elf_next): Mark the archive header as unusable when
308 there is no next ar element.
310 2009-08-12 Mark Wielaard <mjw@redhat.com>
312 * Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
314 2009-07-26 Ulrich Drepper <drepper@redhat.com>
316 * elf.h: Update from glibc.
318 2009-07-21 Ulrich Drepper <drepper@redhat.com>
320 * elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
321 sections. Patch by Lubomir Rintel <lkundrak@v3.sk>.
323 2009-07-08 Roland McGrath <roland@redhat.com>
325 * libelfP.h (struct Elf): Remove unused ar.has_index field.
326 Reorder various members for optimal packing.
328 2009-07-08 Ulrich Drepper <drepper@redhat.com>
330 * elf.h: Update from glibc.
332 2009-06-13 Ulrich Drepper <drepper@redhat.com>
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
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.
349 2009-06-01 Ulrich Drepper <drepper@redhat.com>
351 * elf.h: Update from glibc.
353 2009-04-14 Roland McGrath <roland@redhat.com>
355 * elf.h: Update from glibc.
357 2009-04-01 Roland McGrath <roland@redhat.com>
359 * elf.h: Update from glibc.
361 2009-02-10 Ulrich Drepper <drepper@redhat.com>
363 * elf32_updatefile.c (updatefile): For the zeroth section we still
364 have to copy the section header.
366 2009-02-01 Ulrich Drepper <drepper@redhat.com>
368 * elf_strptr.c: Add comment re possible problem.
370 2009-01-26 Ulrich Drepper <drepper@redhat.com>
372 * elf32_updatenull.c (updatenull_wrlock): Fix comment of
373 ELF_F_LAYOUT behaviour re section header table.
375 2009-01-22 Ulrich Drepper <drepper@redhat.com>
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
380 (__elfXX_updatefile): Likewise.
382 2009-01-21 Ulrich Drepper <drepper@redhat.com>
384 * elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
385 handle sections for NOBITS sections.
386 (elfXX_updatefile): Likewise.
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.
393 2009-01-10 Ulrich Drepper <drepper@redhat.com>
395 * libelfP.h (_): We only have one translation domain, elfutils.
397 * Makefile.am: Use USE_LOCKS instead of USE_TLS.
398 * elf_error.c: Always use __thread. Remove all !USE_TLS code.
400 2009-01-04 Roland McGrath <roland@redhat.com>
402 * note_xlate.h (elf_cvt_note): Don't examine a size too small to
403 container a note header.
405 2008-12-11 Roland McGrath <roland@redhat.com>
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.
413 * libelf.h (Elf_Data): Whitespace fix.
415 2008-12-10 Roland McGrath <roland@redhat.com>
417 * elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
419 2008-10-22 Petr Machata <pmachata@redhat.com>
421 * elf_rawfile.c (elf_rawfile): Lock around elf-> references.
423 2008-10-21 Petr Machata <pmachata@redhat.com>
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.
432 2008-10-20 Petr Machata <pmachata@redhat.com>
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.
438 2008-10-20 Petr Machata <pmachata@redhat.com>
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.
444 2008-10-16 Petr Machata <pmachata@redhat.com>
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.
452 (elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
453 * elf_next.c (elf_next): Likewise.
454 * elf_rand.c (elf_rand): Likewise.
456 2008-10-14 Petr Machata <pmachata@redhat.com>
458 * elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
460 2008-11-26 Roland McGrath <roland@redhat.com>
462 * elf.h: Update from glibc.
464 2008-10-06 Roland McGrath <roland@redhat.com>
466 * elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
468 2008-08-27 Roland McGrath <roland@redhat.com>
470 * elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
472 * libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
474 2008-08-25 Roland McGrath <roland@redhat.com>
476 * Makefile.am (libelf_so_LDLIBS): New variable.
477 (libelf.so): Use it in the link.
479 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
488 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
497 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
504 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
513 (__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
515 2008-08-04 Petr Machata <pmachata@redhat.com>
517 * libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
519 2008-07-28 Roland McGrath <roland@redhat.com>
521 * elf.h: Update from glibc.
523 2008-03-31 Roland McGrath <roland@redhat.com>
525 * elf32_offscn.c: Make sure shdrs have been read in.
527 2008-02-19 Roland McGrath <roland@redhat.com>
529 * elf.h: Update from glibc.
531 2008-02-08 Roland McGrath <roland@redhat.com>
533 * elf.h: Update from glibc.
535 2008-01-31 Ulrich Drepper <drepper@redhat.com>
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.
540 2008-01-30 Roland McGrath <roland@redhat.com>
542 * elf.h: Update from glibc.
544 2008-01-26 Roland McGrath <roland@redhat.com>
546 * elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
547 Fixes various pastos in wrong type in sizeof, wrong string parsed.
549 2008-01-20 Roland McGrath <roland@redhat.com>
551 * elf_getaroff.c: Calculate from start_offset, instead of using
552 parent's state.ar.offset field.
554 2008-01-08 Roland McGrath <roland@redhat.com>
556 * Makefile.am (euinclude): Variable removed.
557 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
559 2008-01-03 Roland McGrath <roland@redhat.com>
561 * common.h: Add __attribute__ ((unused)) to static functions.
563 2007-12-20 Ulrich Drepper <drepper@redhat.com>
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.
574 2007-11-12 Roland McGrath <roland@redhat.com>
576 * libelf.h: Replace off64_t with loff_t throughout.
577 Only that type name is unconditionally defined by <sys/types.h>
579 2007-11-03 Roland McGrath <roland@redhat.com>
581 * libelf.h (Elf_Data): Comment fix.
583 2007-10-18 Roland McGrath <roland@redhat.com>
585 * elf.h: Update from glibc.
587 2007-10-07 Roland McGrath <roland@redhat.com>
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 /.
593 2007-10-04 Roland McGrath <roland@redhat.com>
595 * elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
597 2007-10-03 Roland McGrath <roland@redhat.com>
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.
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.
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.
617 2007-08-24 Roland McGrath <roland@redhat.com>
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.
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.
632 2007-08-19 Roland McGrath <roland@redhat.com>
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.
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.
648 2007-08-12 Roland McGrath <roland@redhat.com>
650 * elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
651 and only tertiarily on index.
653 2007-07-09 Roland McGrath <roland@redhat.com>
655 * elf.h: Update from glibc.
657 2007-04-22 Roland McGrath <roland@redhat.com>
659 * elf.h: Update from glibc.
661 2007-03-18 Roland McGrath <roland@redhat.com>
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.
666 2007-03-09 Roland McGrath <roland@redhat.com>
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.
676 2007-02-04 Ulrich Drepper <drepper@redhat.com>
678 * Makefile (libelf.so): Build with -z relro.
680 * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
682 2007-01-30 Ulrich Drepper <drepper@redhat.com>
684 * nlist.c: Close file descriptor before returning.
686 2007-01-20 Roland McGrath <roland@redhat.com>
688 * gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
689 convert the final word.
691 * elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
692 MY_ELFDATA on !ALLOW_UNALIGNED machines.
694 2007-01-18 Roland McGrath <roland@redhat.com>
696 * gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
699 2006-10-13 Roland McGrath <roland@redhat.com>
701 * elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
702 * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
704 2006-08-29 Roland McGrath <roland@redhat.com>
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>.
710 * Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
712 2006-08-08 Ulrich Drepper <drepper@redhat.com>
714 * elf.h (DT_VALNUM): Update.
715 (DT_ADDRNUM): Likewise.
717 2006-07-12 Ulrich Drepper <drepper@redhat.com>
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.
724 2006-07-11 Ulrich Drepper <drepper@redhat.com>
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.
733 2006-07-06 Ulrich Drepper <drepper@redhat.com>
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.
740 2006-06-15 Roland McGrath <roland@redhat.com>
742 * libelf.h (elf_getarsym): Fix comment typo.
743 Rename second parameter to be more explanatory.
744 (elf_getident, elf_rawhide): Likewise.
746 2006-05-28 Ulrich Drepper <drepper@redhat.com>
748 * elf32_updatefile.c (updatemmap): Preserve section content if
749 copying would overwrite them.
752 2006-04-04 Roland McGrath <roland@redhat.com>
754 * elf32_updatefile.c (updatemmap): Handle other-endian case.
756 2006-04-04 Ulrich Drepper <drepper@redhat.com>
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
767 * elf_update.c: Remove debug message.
769 2005-12-07 Roland McGrath <roland@redhat.com>
771 * gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
772 (FETCH, STORE): New macros.
773 (INLINE3): Use those to do alignment-friendly conversion.
775 * elf32_getshdr.c: Include map_address and start_offset in alignment
777 * elf32_getphdr.c: Likewise.
779 2005-11-19 Roland McGrath <roland@redhat.com>
781 * elf.h: Update from glibc.
783 2005-11-17 Roland McGrath <roland@redhat.com>
785 * elf.h: Update from glibc.
787 2005-11-10 Roland McGrath <roland@redhat.com>
789 * elf.h: Update from glibc.
791 2005-09-09 Roland McGrath <roland@redhat.com>
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.
796 2005-08-28 Ulrich Drepper <drepper@redhat.com>
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.
809 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
810 (%.os): Use COMPILE.os.
811 (COMPILE.os): Filter out gconv options.
813 2005-08-27 Ulrich Drepper <drepper@redhat.com>
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
818 (get_shnum): Use passed in e_ident value as source of ELF header.
820 2005-08-15 Ulrich Drepper <drepper@redhat.com>
822 * elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
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.
829 2005-08-13 Ulrich Drepper <drepper@redhat.com>
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
834 (file_read_elf): Likewise.
836 2005-08-12 Roland McGrath <roland@redhat.com>
838 * elf32_offscn.c: Do not match empty sections at OFFSET unless
839 there are no nonempty sections at that offset.
841 2005-08-07 Ulrich Drepper <drepper@redhat.com>
843 * elf.h: Update from glibc.
845 2005-08-06 Ulrich Drepper <drepper@redhat.com>
847 * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
849 2005-08-03 Ulrich Drepper <drepper@redhat.com>
851 * libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
852 new version ELFUTILS_1.1.1.
854 2005-08-02 Ulrich Drepper <drepper@redhat.com>
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,
862 * libelf.sym: Export new symbols.
864 2005-07-23 Ulrich Drepper <drepper@redhat.com>
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.
870 * elf_update.c (elf_update): Get write lock, not read lock.
872 * elf32_updatenull.c (updatenull): Get section headers if necessary
875 2005-07-22 Ulrich Drepper <drepper@redhat.com>
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
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.
884 2005-05-11 Ulrich Drepper <drepper@redhat.com>
886 * elf.h: Update again.
888 2005-05-09 Ulrich Drepper <drepper@redhat.com>
890 * elf.h: Update from glibc.
892 2005-05-08 Roland McGrath <roland@redhat.com>
894 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
895 * elf_update.c (write_file) [_MUDFLAP]: Likewise.
897 2005-03-29 Ulrich Drepper <drepper@redhat.com>
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.
904 * libelfP.h: Add declarations of internal functions.
906 2005-02-15 Ulrich Drepper <drepper@redhat.com>
908 * common.h (CONVERT): Make sure all values are unsigned.
909 (CONVERT_TO): Likewise.
911 * Makefile.am (AM_CFLAGS): Add -Wformat=2.
912 Fix rule to build libelf.so.
914 2005-02-06 Ulrich Drepper <drepper@redhat.com>
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.
929 2005-02-05 Ulrich Drepper <drepper@redhat.com>
931 * Makefile.am: Check for text relocations in constructed DSO.
933 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
935 2005-02-04 Ulrich Drepper <drepper@redhat.com>
937 * gelf_getehdr.c (gelf_getehdr): Slight optimization.
939 * elf32_checksum.c (checksum): Do not look at NOBITS sections.
941 * gelf.h: Add gelf_checksum prototype.
943 2004-09-25 Ulrich Drepper <drepper@redhat.com>
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.
953 2004-04-01 Ulrich Drepper <drepper@redhat.com>
955 * elf.h: Update from glibc.
957 2004-01-23 Ulrich Drepper <drepper@redhat.com>
959 * elf_update.c: Fix locking.
960 * elf_clone.c: Likewise.
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
974 2004-01-17 Ulrich Drepper <drepper@redhat.com>
976 * Makefile.am: Support building with mudflap.
978 * gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
979 * dl-hash.h (_dl_elf_hash): Likewise.
981 2004-01-05 Ulrich Drepper <drepper@redhat.com>
983 * elf-knowledge.h: New file. From libelf subdir.
984 * Makefile.am (euincludedir): Define.
985 (euinclude_HEADERS): Add elf-knowledge.h.
987 2003-09-24 Ulrich Drepper <drepper@redhat.com>
989 * elf.h: Define some PT_IA_64_HP_* constants.
991 2003-09-23 Jakub Jelinek <jakub@redhat.com>
993 * libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
994 state.elf64.scnincr to match state.elf{,32}.
996 2003-08-12 Ulrich Drepper <drepper@redhat.com>
998 * elf32_updatefile.c (__updatemmap): When writing back file where
999 some sections have not been read in, count their sizes based on
1002 2003-08-11 Ulrich Drepper <drepper@redhat.com>
1004 * Moved to CVS archive.