1 2015-11-26 Mark Wielaard <mjw@redhat.com>
3 * elf_compress.c (__libelf_decompress_elf): New function, extracted
5 (elf_compress): here. Check zdata_base use __libelf_decompress_elf.
6 * elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
8 * libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
9 (__libelf_decompress_elf): New internal function definition.
11 2015-10-21 Mark Wielaard <mjw@redhat.com>
13 * Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
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
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
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
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.
41 2015-11-19 Mark Wielaard <mjw@redhat.com>
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.
69 2015-10-16 Mark Wielaard <mjw@redhat.com>
71 * Makefile.am (libelf_so_LDLIBS): Add -lz.
73 2015-10-14 Mark Wielaard <mjw@redhat.com>
75 * elf.h: Update from glibc. Add section compression constants and
78 2015-10-20 Jose E. Marchesi <jose.marchesi@oracle.com>
80 * elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
81 Fix the size argument to pread_retry.
83 2015-10-13 Chih-Hung Hsieh <chh@google.com>
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'
90 2015-10-09 Josh Stone <jistone@redhat.com>
92 * libelf.h: Replace loff_t with int64_t throughout.
94 2015-10-05 Mark Wielaard <mjw@redhat.com>
96 * elf_update.c (write_file): Only use posix_fallocate when using
97 mmap. Only report failure when errno is ENOSPC.
99 2015-10-09 Josh Stone <jistone@redhat.com>
101 * libelfP.h (struct Elf): Replace off64_t with off_t.
102 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
104 2015-10-05 Chih-Hung Hsieh <chh@google.com>
106 * elf_getarsym.c (elf_getarsym): Do not use
107 union of variable length arrays.
109 2015-10-05 Josh Stone <jistone@redhat.com>
111 * Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
113 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
115 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
116 relocation overflows in some platforms.
118 2015-09-29 Mark Wielaard <mjw@redhat.com>
120 * elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
121 (updatenull_wrlock): Always set e_shentsize.
123 2015-09-23 Mark Wielaard <mjw@redhat.com>
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.
137 2015-09-22 Mark Wielaard <mjw@redhat.com>
139 * *.c: Remove old-style function definitions.
141 2015-06-22 Mark Wielaard <mjw@redhat.com>
143 * dl-hash.h: Update from glibc.
145 2015-06-18 Mark Wielaard <mjw@redhat.com>
147 * elf32_updatefile.c (updatefile): Always free shdr_data and scns
148 when allocated on failure paths.
150 2015-06-18 Mark Wielaard <mjw@redhat.com>
152 * nlist.c (nlist): Check symscn shdr exists before use.
154 2015-06-16 Mark Wielaard <mjw@redhat.com>
156 * elf_update.c (write_file): Always also use ftruncate before
157 posix_fallocate to make sure file has the right size.
159 2015-06-04 Mark Wielaard <mjw@redhat.com>
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.
167 2015-06-02 Mark Wielaard <mjw@redhat.com>
169 * elf_getdata.c (convert_data): Make sure source data is properly
170 aligned for type before calling actual conversion function.
172 2015-06-04 Mark Wielaard <mjw@redhat.com>
174 * elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
177 2015-06-02 Mark Wielaard <mjw@redhat.com>
179 * elf_begin.c (file_read_elf): Split checks for ehdr and shdr
180 alignment, drop phdr alignment check.
182 2015-05-31 Mark Wielaard <mjw@redhat.com>
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.
187 2015-05-31 Mark Wielaard <mjw@redhat.com>
189 * elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
190 alloca and free after conversion when a copy needs to be made.
192 2015-05-31 Mark Wielaard <mjw@redhat.com>
194 * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
195 malloc, not alloca also in !ALLOW_UNALIGNED case.
197 2015-05-30 Mark Wielaard <mjw@redhat.com>
199 * gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
201 2015-05-30 Mark Wielaard <mjw@redhat.com>
203 * elf32_updatefile.c (updatemmap): Only call mempcpy and update
204 last_position when d_size is non-zero.
206 2015-05-17 Mark Wielaard <mjw@redhat.com>
208 * elf32_updatefile.c (updatefile): Allocate shdr_data and scns
209 with malloc, not alloca. Free after writing section headers.
211 2015-05-16 Mark Wielaard <mjw@redhat.com>
213 * elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
214 with malloc, not alloca. Free after writing section header.
216 2015-05-16 Mark Wielaard <mjw@redhat.com>
218 * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
219 malloc, not alloca. Call free after out.
221 2015-05-14 Mark Wielaard <mjw@redhat.com>
223 * elf_update.c (write_file): Use posix_fallocate instead of
224 ftruncate to extend file if necessary.
226 2015-05-13 Mark Wielaard <mjw@redhat.com>
228 * elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
229 e_phoff also to zero.
231 2015-05-12 Mark Wielaard <mjw@redhat.com>
233 * elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
235 * elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
236 to the elf image offset.
238 2015-05-12 Mark Wielaard <mjw@redhat.com>
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.
244 2015-05-08 Mark Wielaard <mjw@redhat.com>
246 * nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
248 2015-01-03 Mark Wielaard <mjw@redhat.com>
250 * version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
251 (elf_cvt_Verneed): Likewise.
253 2015-03-28 Mark Wielaard <mjw@redhat.com>
255 * elf.h: Update from glibc.
257 2015-03-23 Mark Wielaard <mjw@redhat.com>
259 * elf32_updatenull.c (updatenull_wrlock): Don't extend size with
260 SHT_NOBITS sh_offset.
262 2015-02-18 Mark Wielaard <mjw@redhat.com>
264 * libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
266 2015-02-07 Jan Kratochvil <jan.kratochvil@redhat.com>
268 * elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
271 2015-01-22 Mark Wielaard <mjw@redhat.com>
273 * elf_strptr (elf_strptr): Make sure returned string is NUL
276 2015-01-21 Mark Wielaard <mjw@redhat.com>
278 * elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
279 of rawdata_base != NULL before using rawdata directly.
281 2015-01-20 Mark Wielaard <mjw@redhat.com>
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.
290 2015-01-20 Mark Wielaard <mjw@redhat.com>
292 * elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
295 2014-12-30 Mark Wielaard <mjw@redhat.com>
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.
303 2014-12-25 Mark Wielaard <mjw@redhat.com>
305 * elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
306 negative. Include start_offset in maxsize.
308 2014-12-28 Alexander Cherepanov <cherepan@mccme.ru>
310 * elf_begin.c (read_long_names): Don't miss '/' right after
311 another '/'. Fixes a dir traversal vuln in ar extraction.
313 2014-12-18 Ulrich Drepper <drepper@gmail.com>
315 * Makefile.am: Suppress output of textrel_check command.
317 2014-12-16 Mark Wielaard <mjw@redhat.com>
319 * elf_begin.c (read_long_names): Make sure long_names len fits
322 2014-12-15 Mark Wielaard <mjw@redhat.com>
324 * elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
326 2014-12-15 Mark Wielaard <mjw@redhat.com>
328 * elf_begin.c (read_long_names): Clear any garbage left in the
331 2014-12-11 Mark Wielaard <mjw@redhat.com>
333 * elf_begin.c (file_read_elf): Correct ELF64 section offset check.
335 2014-12-11 Mark Wielaard <mjw@redhat.com>
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.
341 2014-12-09 Mark Wielaard <mjw@redhat.com>
343 * elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
345 2014-11-27 Mark Wielaard <mjw@redhat.com>
347 * Makefile.am (libelf.so): Use textrel_check.
349 2014-11-23 Mark Wielaard <mjw@redhat.com>
351 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
352 overflow check to unsigned.
354 2014-11-23 Mark Wielaard <mjw@redhat.com>
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.
359 2014-11-22 Mark Wielaard <mjw@redhat.com>
361 * elf_getphdrnum.c (elf_getphdrnum): Sanity check the
362 __elf_getphdrnum_rdlock result.
364 2014-11-18 Mark Wielaard <mjw@redhat.com>
366 * version_xlate.h (elf_cvt_Verdef): Check for overflow.
367 (elf_cvt_Verneed): Likewise.
369 2014-11-17 Mark Wielaard <mjw@redhat.com>
371 * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
373 2014-11-16 Mark Wielaard <mjw@redhat.com>
375 * elf_getshdrstrndx.c: Check there are section headers before
378 2014-11-16 Mark Wielaard <mjw@redhat.com>
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.
385 2014-11-16 Mark Wielaard <mjw@redhat.com>
387 * gelf_getnote.c (gelf_getnote): Check padding overflow.
389 2014-11-16 Mark Wielaard <mjw@redhat.com>
391 * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
392 and align as Elf64_Off and Elf64_Xword not size_t.
394 2014-11-14 Mark Wielaard <mjw@redhat.com>
396 * gelf_getnote.c (gelf_getnote): Check offset overflow.
398 2014-11-13 Mark Wielaard <mjw@redhat.com>
400 * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
403 2014-11-08 Mark Wielaard <mjw@redhat.com>
405 * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
407 2014-11-07 Mark Wielaard <mjw@redhat.com>
409 * elf_begin.c (file_read_elf): Correct sh_size check.
410 * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
413 2014-09-10 Petr Machata <pmachata@redhat.com>
415 * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
418 2014-07-07 Mark Wielaard <mjw@redhat.com>
420 * elf.h: Update from glibc.
422 2014-04-13 Mark Wielaard <mjw@redhat.com>
424 * Makefile.am: Remove !MUDFLAP conditions.
425 * elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
427 * elf_update.c (write_file): Remove _MUDFLAP condition.
429 2014-01-17 Jakub Jelinek <jakub@redhat.com>
430 Roland McGrath <roland@redhat.com>
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.
452 2014-01-17 Jakub Jelinek <jakub@redhat.com>
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
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
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.
472 2013-11-08 Mark Wielaard <mjw@redhat.com>
474 * elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
475 already directly mmapped.
477 2013-11-05 Mark Wielaard <mjw@redhat.com>
479 * elf32_updatefile.c (elfXX_updatefile): Copy all section headers
482 2013-11-01 Michael Forney <mforney@mforney.org>
484 * Makefile.am: Use READELF.
486 2013-10-01 Petr Machata <pmachata@redhat.com>
488 * elf.h: Update from glibc.
490 2013-06-17 Petr Machata <pmachata@redhat.com>
492 * elf.h: Update from glibc.
494 2013-08-28 Namhyung Kim <namhyung@gmail.com>
496 * gelf.h (gelf_fsize): Fix typo in comment.
498 2013-08-28 Mark Wielaard <mjw@redhat.com>
500 * gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
502 2013-08-27 Mark Wielaard <mjw@redhat.com>
504 * gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
506 2013-08-25 Kurt Roeckx <kurt@roeckx.be>
508 * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
509 dereference to avoid alignment problems.
511 2013-01-07 Roland McGrath <roland@hack.frob.com>
513 * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
514 would be unaligned and !ALLOW_UNALIGNED.
516 * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
517 dereference so as not to assume the field is naturally aligned.
519 2012-09-17 Petr Machata <pmachata@redhat.com>
521 * elf.h: Update from glibc.
523 2012-08-16 Roland McGrath <roland@hack.frob.com>
525 * elf.h: Update from glibc.
527 2012-08-14 Mark Wielaard <mjw@redhat.com>
529 * elf32_checksum.c (ebl_debugscn_p): Removed unused define and
530 confusing outdated comment.
532 2012-08-01 Petr Machata <pmachata@redhat.com>
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.
540 2012-07-19 Mark Wielaard <mjw@redhat.com>
542 * elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
545 2012-07-17 Petr Machata <pmachata@redhat.com>
547 * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
548 integer number of records in case of ELF_T_NHDR.
550 2012-04-02 Mark Wielaard <mjw@redhat.com>
552 * elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
553 there are no nonempty sections at that offset.
555 2012-03-21 Roland McGrath <roland@hack.frob.com>
557 * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
559 2011-02-26 Mark Wielaard <mjw@redhat.com>
561 * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
563 2011-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
565 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
566 when MAXIMUM_SIZE == ~0.
568 2010-08-18 Roland McGrath <roland@redhat.com>
570 * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
572 Reported by Mark Hatle <mark.hatle@windriver.com>.
574 * exttypes.h: Add cases for ElfNN_Lib.
575 Reported by Mark Hatle <mark.hatle@windriver.com>.
577 2010-06-14 Ulrich Drepper <drepper@redhat.com>
579 * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
580 * gelf_update_phdr.c: Likewise.
581 * gelf_update_ehdr.c: Likewise.
583 2010-04-14 Roland McGrath <roland@redhat.com>
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.
588 2010-04-13 Roland McGrath <roland@redhat.com>
590 * elf.h: Update from glibc.
592 2010-04-06 Roland McGrath <roland@redhat.com>
594 * elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
597 2010-04-01 Petr Machata <pmachata@redhat.com>
599 * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
600 that do not need a conversion.
602 2010-03-11 Roland McGrath <roland@redhat.com>
604 * elf.h: Update from glibc.
606 2010-03-04 Ulrich Drepper <drepper@redhat.com>
608 * elf.h: Update from glibc.
610 2010-02-17 Roland McGrath <roland@redhat.com>
612 * elf_begin.c (file_read_elf): Leave section rawdata_base and
613 data_base pointers null when [sh_offset,sh_size) points outside
616 2010-02-15 Roland McGrath <roland@redhat.com>
618 * Makefile.am: Use config/eu.am for common stuff.
620 2010-01-07 Roland McGrath <roland@redhat.com>
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.
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.
638 * elf.h: Update from glibc.
640 2009-10-23 Lubomir Rintel <lkundrak@v3.sk>
642 * elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
643 filling from section start, not shdr_end.
645 2009-11-10 Roland McGrath <roland@redhat.com>
647 * elf_readall.c (__libelf_readall): Fetch file size if not yet known.
649 2009-11-06 Mark Wielaard <mjw@redhat.com>
651 * elf_next.c (elf_next): Mark the archive header as unusable when
652 there is no next ar element.
654 2009-08-12 Mark Wielaard <mjw@redhat.com>
656 * Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
658 2009-07-26 Ulrich Drepper <drepper@redhat.com>
660 * elf.h: Update from glibc.
662 2009-07-21 Ulrich Drepper <drepper@redhat.com>
664 * elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
665 sections. Patch by Lubomir Rintel <lkundrak@v3.sk>.
667 2009-07-08 Roland McGrath <roland@redhat.com>
669 * libelfP.h (struct Elf): Remove unused ar.has_index field.
670 Reorder various members for optimal packing.
672 2009-07-08 Ulrich Drepper <drepper@redhat.com>
674 * elf.h: Update from glibc.
676 2009-06-13 Ulrich Drepper <drepper@redhat.com>
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
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.
693 2009-06-01 Ulrich Drepper <drepper@redhat.com>
695 * elf.h: Update from glibc.
697 2009-04-14 Roland McGrath <roland@redhat.com>
699 * elf.h: Update from glibc.
701 2009-04-01 Roland McGrath <roland@redhat.com>
703 * elf.h: Update from glibc.
705 2009-02-10 Ulrich Drepper <drepper@redhat.com>
707 * elf32_updatefile.c (updatefile): For the zeroth section we still
708 have to copy the section header.
710 2009-02-01 Ulrich Drepper <drepper@redhat.com>
712 * elf_strptr.c: Add comment re possible problem.
714 2009-01-26 Ulrich Drepper <drepper@redhat.com>
716 * elf32_updatenull.c (updatenull_wrlock): Fix comment of
717 ELF_F_LAYOUT behaviour re section header table.
719 2009-01-22 Ulrich Drepper <drepper@redhat.com>
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
724 (__elfXX_updatefile): Likewise.
726 2009-01-21 Ulrich Drepper <drepper@redhat.com>
728 * elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
729 handle sections for NOBITS sections.
730 (elfXX_updatefile): Likewise.
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.
737 2009-01-10 Ulrich Drepper <drepper@redhat.com>
739 * libelfP.h (_): We only have one translation domain, elfutils.
741 * Makefile.am: Use USE_LOCKS instead of USE_TLS.
742 * elf_error.c: Always use __thread. Remove all !USE_TLS code.
744 2009-01-04 Roland McGrath <roland@redhat.com>
746 * note_xlate.h (elf_cvt_note): Don't examine a size too small to
747 container a note header.
749 2008-12-11 Roland McGrath <roland@redhat.com>
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.
757 * libelf.h (Elf_Data): Whitespace fix.
759 2008-12-10 Roland McGrath <roland@redhat.com>
761 * elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
763 2008-10-22 Petr Machata <pmachata@redhat.com>
765 * elf_rawfile.c (elf_rawfile): Lock around elf-> references.
767 2008-10-21 Petr Machata <pmachata@redhat.com>
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.
776 2008-10-20 Petr Machata <pmachata@redhat.com>
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.
782 2008-10-20 Petr Machata <pmachata@redhat.com>
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.
788 2008-10-16 Petr Machata <pmachata@redhat.com>
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.
796 (elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
797 * elf_next.c (elf_next): Likewise.
798 * elf_rand.c (elf_rand): Likewise.
800 2008-10-14 Petr Machata <pmachata@redhat.com>
802 * elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
804 2008-11-26 Roland McGrath <roland@redhat.com>
806 * elf.h: Update from glibc.
808 2008-10-06 Roland McGrath <roland@redhat.com>
810 * elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
812 2008-08-27 Roland McGrath <roland@redhat.com>
814 * elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
816 * libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
818 2008-08-25 Roland McGrath <roland@redhat.com>
820 * Makefile.am (libelf_so_LDLIBS): New variable.
821 (libelf.so): Use it in the link.
823 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
832 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
841 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
848 2008-08-21 Petr Machata <pmachata@redhat.com>
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.
857 (__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
859 2008-08-04 Petr Machata <pmachata@redhat.com>
861 * libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
863 2008-07-28 Roland McGrath <roland@redhat.com>
865 * elf.h: Update from glibc.
867 2008-03-31 Roland McGrath <roland@redhat.com>
869 * elf32_offscn.c: Make sure shdrs have been read in.
871 2008-02-19 Roland McGrath <roland@redhat.com>
873 * elf.h: Update from glibc.
875 2008-02-08 Roland McGrath <roland@redhat.com>
877 * elf.h: Update from glibc.
879 2008-01-31 Ulrich Drepper <drepper@redhat.com>
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.
884 2008-01-30 Roland McGrath <roland@redhat.com>
886 * elf.h: Update from glibc.
888 2008-01-26 Roland McGrath <roland@redhat.com>
890 * elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
891 Fixes various pastos in wrong type in sizeof, wrong string parsed.
893 2008-01-20 Roland McGrath <roland@redhat.com>
895 * elf_getaroff.c: Calculate from start_offset, instead of using
896 parent's state.ar.offset field.
898 2008-01-08 Roland McGrath <roland@redhat.com>
900 * Makefile.am (euinclude): Variable removed.
901 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
903 2008-01-03 Roland McGrath <roland@redhat.com>
905 * common.h: Add __attribute__ ((unused)) to static functions.
907 2007-12-20 Ulrich Drepper <drepper@redhat.com>
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.
918 2007-11-12 Roland McGrath <roland@redhat.com>
920 * libelf.h: Replace off64_t with loff_t throughout.
921 Only that type name is unconditionally defined by <sys/types.h>
923 2007-11-03 Roland McGrath <roland@redhat.com>
925 * libelf.h (Elf_Data): Comment fix.
927 2007-10-18 Roland McGrath <roland@redhat.com>
929 * elf.h: Update from glibc.
931 2007-10-07 Roland McGrath <roland@redhat.com>
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 /.
937 2007-10-04 Roland McGrath <roland@redhat.com>
939 * elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
941 2007-10-03 Roland McGrath <roland@redhat.com>
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.
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.
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.
961 2007-08-24 Roland McGrath <roland@redhat.com>
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.
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.
976 2007-08-19 Roland McGrath <roland@redhat.com>
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.
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.
992 2007-08-12 Roland McGrath <roland@redhat.com>
994 * elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
995 and only tertiarily on index.
997 2007-07-09 Roland McGrath <roland@redhat.com>
999 * elf.h: Update from glibc.
1001 2007-04-22 Roland McGrath <roland@redhat.com>
1003 * elf.h: Update from glibc.
1005 2007-03-18 Roland McGrath <roland@redhat.com>
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.
1010 2007-03-09 Roland McGrath <roland@redhat.com>
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.
1020 2007-02-04 Ulrich Drepper <drepper@redhat.com>
1022 * Makefile (libelf.so): Build with -z relro.
1024 * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1026 2007-01-30 Ulrich Drepper <drepper@redhat.com>
1028 * nlist.c: Close file descriptor before returning.
1030 2007-01-20 Roland McGrath <roland@redhat.com>
1032 * gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1033 convert the final word.
1035 * elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1036 MY_ELFDATA on !ALLOW_UNALIGNED machines.
1038 2007-01-18 Roland McGrath <roland@redhat.com>
1040 * gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1043 2006-10-13 Roland McGrath <roland@redhat.com>
1045 * elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1046 * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1048 2006-08-29 Roland McGrath <roland@redhat.com>
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>.
1054 * Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1056 2006-08-08 Ulrich Drepper <drepper@redhat.com>
1058 * elf.h (DT_VALNUM): Update.
1059 (DT_ADDRNUM): Likewise.
1061 2006-07-12 Ulrich Drepper <drepper@redhat.com>
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.
1068 2006-07-11 Ulrich Drepper <drepper@redhat.com>
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.
1077 2006-07-06 Ulrich Drepper <drepper@redhat.com>
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.
1084 2006-06-15 Roland McGrath <roland@redhat.com>
1086 * libelf.h (elf_getarsym): Fix comment typo.
1087 Rename second parameter to be more explanatory.
1088 (elf_getident, elf_rawhide): Likewise.
1090 2006-05-28 Ulrich Drepper <drepper@redhat.com>
1092 * elf32_updatefile.c (updatemmap): Preserve section content if
1093 copying would overwrite them.
1094 Fix msync paramters.
1096 2006-04-04 Roland McGrath <roland@redhat.com>
1098 * elf32_updatefile.c (updatemmap): Handle other-endian case.
1100 2006-04-04 Ulrich Drepper <drepper@redhat.com>
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
1111 * elf_update.c: Remove debug message.
1113 2005-12-07 Roland McGrath <roland@redhat.com>
1115 * gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1116 (FETCH, STORE): New macros.
1117 (INLINE3): Use those to do alignment-friendly conversion.
1119 * elf32_getshdr.c: Include map_address and start_offset in alignment
1121 * elf32_getphdr.c: Likewise.
1123 2005-11-19 Roland McGrath <roland@redhat.com>
1125 * elf.h: Update from glibc.
1127 2005-11-17 Roland McGrath <roland@redhat.com>
1129 * elf.h: Update from glibc.
1131 2005-11-10 Roland McGrath <roland@redhat.com>
1133 * elf.h: Update from glibc.
1135 2005-09-09 Roland McGrath <roland@redhat.com>
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.
1140 2005-08-28 Ulrich Drepper <drepper@redhat.com>
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.
1153 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1154 (%.os): Use COMPILE.os.
1155 (COMPILE.os): Filter out gconv options.
1157 2005-08-27 Ulrich Drepper <drepper@redhat.com>
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
1162 (get_shnum): Use passed in e_ident value as source of ELF header.
1164 2005-08-15 Ulrich Drepper <drepper@redhat.com>
1166 * elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
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.
1173 2005-08-13 Ulrich Drepper <drepper@redhat.com>
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
1178 (file_read_elf): Likewise.
1180 2005-08-12 Roland McGrath <roland@redhat.com>
1182 * elf32_offscn.c: Do not match empty sections at OFFSET unless
1183 there are no nonempty sections at that offset.
1185 2005-08-07 Ulrich Drepper <drepper@redhat.com>
1187 * elf.h: Update from glibc.
1189 2005-08-06 Ulrich Drepper <drepper@redhat.com>
1191 * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1193 2005-08-03 Ulrich Drepper <drepper@redhat.com>
1195 * libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1196 new version ELFUTILS_1.1.1.
1198 2005-08-02 Ulrich Drepper <drepper@redhat.com>
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,
1206 * libelf.sym: Export new symbols.
1208 2005-07-23 Ulrich Drepper <drepper@redhat.com>
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.
1214 * elf_update.c (elf_update): Get write lock, not read lock.
1216 * elf32_updatenull.c (updatenull): Get section headers if necessary
1219 2005-07-22 Ulrich Drepper <drepper@redhat.com>
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
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.
1228 2005-05-11 Ulrich Drepper <drepper@redhat.com>
1230 * elf.h: Update again.
1232 2005-05-09 Ulrich Drepper <drepper@redhat.com>
1234 * elf.h: Update from glibc.
1236 2005-05-08 Roland McGrath <roland@redhat.com>
1238 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1239 * elf_update.c (write_file) [_MUDFLAP]: Likewise.
1241 2005-03-29 Ulrich Drepper <drepper@redhat.com>
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.
1250 2005-02-15 Ulrich Drepper <drepper@redhat.com>
1252 * common.h (CONVERT): Make sure all values are unsigned.
1253 (CONVERT_TO): Likewise.
1255 * Makefile.am (AM_CFLAGS): Add -Wformat=2.
1256 Fix rule to build libelf.so.
1258 2005-02-06 Ulrich Drepper <drepper@redhat.com>
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.
1273 2005-02-05 Ulrich Drepper <drepper@redhat.com>
1275 * Makefile.am: Check for text relocations in constructed DSO.
1277 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1279 2005-02-04 Ulrich Drepper <drepper@redhat.com>
1281 * gelf_getehdr.c (gelf_getehdr): Slight optimization.
1283 * elf32_checksum.c (checksum): Do not look at NOBITS sections.
1285 * gelf.h: Add gelf_checksum prototype.
1287 2004-09-25 Ulrich Drepper <drepper@redhat.com>
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.
1297 2004-04-01 Ulrich Drepper <drepper@redhat.com>
1299 * elf.h: Update from glibc.
1301 2004-01-23 Ulrich Drepper <drepper@redhat.com>
1303 * elf_update.c: Fix locking.
1304 * elf_clone.c: Likewise.
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
1318 2004-01-17 Ulrich Drepper <drepper@redhat.com>
1320 * Makefile.am: Support building with mudflap.
1322 * gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
1323 * dl-hash.h (_dl_elf_hash): Likewise.
1325 2004-01-05 Ulrich Drepper <drepper@redhat.com>
1327 * elf-knowledge.h: New file. From libelf subdir.
1328 * Makefile.am (euincludedir): Define.
1329 (euinclude_HEADERS): Add elf-knowledge.h.
1331 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1333 * elf.h: Define some PT_IA_64_HP_* constants.
1335 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1337 * libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
1338 state.elf64.scnincr to match state.elf{,32}.
1340 2003-08-12 Ulrich Drepper <drepper@redhat.com>
1342 * elf32_updatefile.c (__updatemmap): When writing back file where
1343 some sections have not been read in, count their sizes based on
1346 2003-08-11 Ulrich Drepper <drepper@redhat.com>
1348 * Moved to CVS archive.