1 2017-07-19 Gustavo Romero <gromero@linux.vnet.ibm.com>
3 * elf.h: Add known type in notes segment descriptor for HTM SPRs.
5 2017-02-17 Ulf hermann <ulf.hermann@qt.io>
7 * Makefile.am: Add libelf_so_DEPS, which include libeu.a,
9 (libelf_so_LDLIBS): Add $(libelf_so_DEPS).
10 (libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map
11 from the right directory.
13 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
15 * libelfP.h: Don't include config.h.
17 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
19 * elf_begin.c: Use F_GETFD rather than F_GETFL.
21 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
23 * libelf.h: Define macros for various function attributes and use
26 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
28 * elf_update.c: Set ELF_F_MMAPPED flag if we mmap from elf_update.
30 2017-04-19 Mark Wielaard <mark@klomp.org>
32 * elf_getarsym.c (elf_getarsym): Initialize n to zero.
34 2017-03-27 Mark Wielaard <mark@klomp.org>
36 * elf32_updatefile.c (updatemmap): Always update last_positition.
37 (updatefile): Likewise.
39 2017-03-24 Mark Wielaard <mark@klomp.org>
41 * elf_compress.c (__libelf_decompress): Check insane compression
42 ratios before trying to allocate output buffer.
44 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
45 Mark Wielaard <mjw@redhat.com>
47 * gelf.h (gelf_newehdr): Change return type to void *.
48 (gelf_newphdr): Likewise.
49 * gelf_newehdr.c (gelf_newehdr): Likewise.
50 * gelf_newphdr.c (gelf_newphdr): Likewise.
52 2016-10-21 Mark Wielaard <mjw@redhat.com>
54 * elf_getdata.c (__libelf_set_rawdata_wrlock): Sanity check
55 offset and size before trying to malloc and read data.
57 2016-10-26 Mark Wielaard <mjw@redhat.com>
59 * elf_begin.c (read_file): Always set maxsize when parent == NULL.
61 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
63 * elf_getarsym.c (elf_getarsym): Open code rawmemchr when not
65 * elf_strptr.c: Include stdbool.h.
66 (validate_str): New function.
67 (elf_strptr): Use validate_str instead of memrchr.
69 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
71 * elf32_updatefile.c: Remove sys/param.h include.
72 * elf32_updatenull.c: Likewise. Add system.h include.
73 * elf_begin.c: Remove sys/param.h.
74 * elf_compress: Likewise. Add system.h include.
75 (MAX): Remove definition.
77 2016-08-07 Mark Wielaard <mjw@redhat.com>
79 * elf_compress.c (__libelf_reset_rawdata): Check scn->flags and
80 free rawdata_base when malloced. Set ELF_F_MALLOCED for scn->flags.
81 * elf_end.c (elf_end): Check scn->flags and free rawdata_base if
83 * libelfP.h (struct Elf_Scn): Document flags ELF_F_MALLOCED usage.
85 2016-07-06 Mark Wielaard <mjw@redhat.com>
87 * elf-knowledge.h (SH_FLAGS_COMBINE): Removed.
88 (SH_FLAGS_IMPORTANT): Likewise.
90 2016-07-06 Mark Wielaard <mjw@redhat.com>
92 * elf32_updatenull.c (updatenull_wrlock): Ignore e_type when
94 * elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): Only do sanity
95 checking if phdrs haven't been read in yet.
97 2016-06-24 John Ogness <john.ogness@linutronix.de>
99 * elf32_updatenull.c (updatenull_wrlock): Find first section.
100 * elf_nextscn.c (elf_nextscn): When scn is NULL start from 0th
103 2016-06-28 Richard Henderson <rth@redhat.com>
105 * elf.h: Update from glibc. Add lots of new EM_* definitions.
107 2016-04-14 Mark Wielaard <mjw@redhat.com>
109 * elf_compress.c (__libelf_compress): Free out_buf if deflateInit
112 2016-02-13 Mark Wielaard <mjw@redhat.com>
114 * elf32_updatefile.c (updatemmap): Free scns when out of memory.
116 2016-01-28 Mark Wielaard <mjw@redhat.com>
118 * elf.h: Update from glibc. Add new i386 and x86_64 relocations.
120 2016-02-12 Mark Wielaard <mjw@redhat.com>
122 * elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
124 2016-02-04 Mark Wielaard <mjw@redhat.com>
126 * elf_getdata.c (__libelf_set_rawdata_wrlock): Don't adjust align
127 for SHT_NOBITS sections.
129 2016-01-22 Chih-Hung Hsieh <chh@google.com>
131 * elf_compress.c (__libelf_compress): Move nested function
132 'do_deflate_cleanup' to file scope to compile with clang.
133 * elf_strptr.c (elf_strptr): Move nested function 'get_zdata'
134 to file scope to compile with clang.
136 2016-01-13 Mark Wielaard <mjw@redhat.com>
138 * libelf.h: Check SHF_COMPRESSED is defined. If not define it and the
139 associated ELF compression types/defines.
141 2015-11-26 Mark Wielaard <mjw@redhat.com>
143 * elf_compress.c (__libelf_decompress_elf): New function, extracted
145 (elf_compress): here. Check zdata_base use __libelf_decompress_elf.
146 * elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
148 * libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
149 (__libelf_decompress_elf): New internal function definition.
151 2015-10-21 Mark Wielaard <mjw@redhat.com>
153 * Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
155 * elf_compress.c: New file.
156 * elf_compress_gnu.c: Likewise.
157 * elf_begin.c (file_read_elf): Make a writable copy of the shdrs
159 * elf_end.c (elf_end): Free zdata_base.
160 * elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
161 ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
162 ELF_E_DECOMPRESS_ERROR.
163 * elf_data.c (__libelf_data_type): New internal function extracted
165 (convert_data): Handle SHF_COMPRESSED.
166 * elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
167 uncompressed section data size if SHF_COMPRESSED.
168 * elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
170 * libelf.h: Define elf_compress and elf_compress_gnu.
171 * libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
172 * libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
173 ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
174 ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
175 (__libelf_compress): New internal function definition.
176 (__libelf_decompress): Likewise.
177 (__libelf_reset_rawdata): Likewise.
178 (__libelf_data_type): Likewise.
179 (struct Elf_Scn): Add zdata_base.
181 2015-11-19 Mark Wielaard <mjw@redhat.com>
183 * Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
184 elf64_getchdr.c and gelf_getchdr.c.
185 (noinst_HEADERS): Add chdr_xlate.h.
186 * abstract.h: Define Chdr32 and Chdr64.
187 * chdr_xlate.h: New file.
188 * elf32_getchdr.c: New file.
189 * elf64_getchdr.c: New file.
190 * elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
191 and ELF_E_INVALID_SECTION_FLAGS.
192 * elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
193 ELF_T_CHDR for SHF_COMPRESSED sections.
194 * exttypes.h: Add Chdr32 and Chdr64.
195 * gelf.h (GElf_Chdr): New typedef.
196 (gelf_getchdr): New function definition.
197 * gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
198 * gelf_getchdr.c: New file.
199 * gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
200 * gelf_xlate.h: Add Chdr.
201 * libelf.h (Elf_Type): Add ELF_T_CHDR.
202 (elf32_getchdr): New function definition.
203 (elf64_getchdr): Likewise.
204 * libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
205 elf64_getchdr and gelf_getchdr.
206 * libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
207 and ELF_E_INVALID_SECTION_FLAGS.
209 2015-10-16 Mark Wielaard <mjw@redhat.com>
211 * Makefile.am (libelf_so_LDLIBS): Add -lz.
213 2015-10-14 Mark Wielaard <mjw@redhat.com>
215 * elf.h: Update from glibc. Add section compression constants and
218 2015-10-20 Jose E. Marchesi <jose.marchesi@oracle.com>
220 * elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
221 Fix the size argument to pread_retry.
223 2015-10-13 Chih-Hung Hsieh <chh@google.com>
225 * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
226 function 'fill_mmap' to file scope.
227 * elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
230 2015-10-09 Josh Stone <jistone@redhat.com>
232 * libelf.h: Replace loff_t with int64_t throughout.
234 2015-10-05 Mark Wielaard <mjw@redhat.com>
236 * elf_update.c (write_file): Only use posix_fallocate when using
237 mmap. Only report failure when errno is ENOSPC.
239 2015-10-09 Josh Stone <jistone@redhat.com>
241 * libelfP.h (struct Elf): Replace off64_t with off_t.
242 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
244 2015-10-05 Chih-Hung Hsieh <chh@google.com>
246 * elf_getarsym.c (elf_getarsym): Do not use
247 union of variable length arrays.
249 2015-10-05 Josh Stone <jistone@redhat.com>
251 * Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
253 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
255 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
256 relocation overflows in some platforms.
258 2015-09-29 Mark Wielaard <mjw@redhat.com>
260 * elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
261 (updatenull_wrlock): Always set e_shentsize.
263 2015-09-23 Mark Wielaard <mjw@redhat.com>
265 * elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
266 * elf32_getshdr.c (getshdr_rdlock): Likewise.
267 (getshdr_wrlock): Likewise.
268 * elf_error.c (__libelf_seterrno): Likewise.
269 * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
270 (__elf_getphdrnum_chk_rdlock): Likewise.
271 * elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
272 (__elf_getphdrnum_chk_rdlock): Likewise.
273 * elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
274 * elf_readall.c (__libelf_readall): Likewise.
275 * gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
277 2015-09-22 Mark Wielaard <mjw@redhat.com>
279 * *.c: Remove old-style function definitions.
281 2015-06-22 Mark Wielaard <mjw@redhat.com>
283 * dl-hash.h: Update from glibc.
285 2015-06-18 Mark Wielaard <mjw@redhat.com>
287 * elf32_updatefile.c (updatefile): Always free shdr_data and scns
288 when allocated on failure paths.
290 2015-06-18 Mark Wielaard <mjw@redhat.com>
292 * nlist.c (nlist): Check symscn shdr exists before use.
294 2015-06-16 Mark Wielaard <mjw@redhat.com>
296 * elf_update.c (write_file): Always also use ftruncate before
297 posix_fallocate to make sure file has the right size.
299 2015-06-04 Mark Wielaard <mjw@redhat.com>
301 * elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
302 ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
303 ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
304 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
305 of rawdata against requested type.
307 2015-06-02 Mark Wielaard <mjw@redhat.com>
309 * elf_getdata.c (convert_data): Make sure source data is properly
310 aligned for type before calling actual conversion function.
312 2015-06-04 Mark Wielaard <mjw@redhat.com>
314 * elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
317 2015-06-02 Mark Wielaard <mjw@redhat.com>
319 * elf_begin.c (file_read_elf): Split checks for ehdr and shdr
320 alignment, drop phdr alignment check.
322 2015-05-31 Mark Wielaard <mjw@redhat.com>
324 * elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
325 not alloca and free after conversion when a copy needs to be made.
327 2015-05-31 Mark Wielaard <mjw@redhat.com>
329 * elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
330 alloca and free after conversion when a copy needs to be made.
332 2015-05-31 Mark Wielaard <mjw@redhat.com>
334 * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
335 malloc, not alloca also in !ALLOW_UNALIGNED case.
337 2015-05-30 Mark Wielaard <mjw@redhat.com>
339 * gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
341 2015-05-30 Mark Wielaard <mjw@redhat.com>
343 * elf32_updatefile.c (updatemmap): Only call mempcpy and update
344 last_position when d_size is non-zero.
346 2015-05-17 Mark Wielaard <mjw@redhat.com>
348 * elf32_updatefile.c (updatefile): Allocate shdr_data and scns
349 with malloc, not alloca. Free after writing section headers.
351 2015-05-16 Mark Wielaard <mjw@redhat.com>
353 * elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
354 with malloc, not alloca. Free after writing section header.
356 2015-05-16 Mark Wielaard <mjw@redhat.com>
358 * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
359 malloc, not alloca. Call free after out.
361 2015-05-14 Mark Wielaard <mjw@redhat.com>
363 * elf_update.c (write_file): Use posix_fallocate instead of
364 ftruncate to extend file if necessary.
366 2015-05-13 Mark Wielaard <mjw@redhat.com>
368 * elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
369 e_phoff also to zero.
371 2015-05-12 Mark Wielaard <mjw@redhat.com>
373 * elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
375 * elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
376 to the elf image offset.
378 2015-05-12 Mark Wielaard <mjw@redhat.com>
380 * elf32_newphdr.c (newphdr): Call __libelf_seterrno with
381 ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
382 actually exists if we need to put extended phnum in section zero.
384 2015-05-08 Mark Wielaard <mjw@redhat.com>
386 * nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
388 2015-01-03 Mark Wielaard <mjw@redhat.com>
390 * version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
391 (elf_cvt_Verneed): Likewise.
393 2015-03-28 Mark Wielaard <mjw@redhat.com>
395 * elf.h: Update from glibc.
397 2015-03-23 Mark Wielaard <mjw@redhat.com>
399 * elf32_updatenull.c (updatenull_wrlock): Don't extend size with
400 SHT_NOBITS sh_offset.
402 2015-02-18 Mark Wielaard <mjw@redhat.com>
404 * libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
406 2015-02-07 Jan Kratochvil <jan.kratochvil@redhat.com>
408 * elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
411 2015-01-22 Mark Wielaard <mjw@redhat.com>
413 * elf_strptr (elf_strptr): Make sure returned string is NUL
416 2015-01-21 Mark Wielaard <mjw@redhat.com>
418 * elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
419 of rawdata_base != NULL before using rawdata directly.
421 2015-01-20 Mark Wielaard <mjw@redhat.com>
423 * libelfP.h (__elf_strptr_internal): New function declaration.
424 * elf_getdata.c (__libelf_set_data_list_rdlock): New internal
425 function extracted from...
426 (__elf_getdata_rdlock): ... here.
427 * elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
428 datalist if necessary.
430 2015-01-20 Mark Wielaard <mjw@redhat.com>
432 * elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
435 2014-12-30 Mark Wielaard <mjw@redhat.com>
437 * elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
438 (elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
439 * gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
440 and always check ndx against phnum.
441 * libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
443 2014-12-25 Mark Wielaard <mjw@redhat.com>
445 * elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
446 negative. Include start_offset in maxsize.
448 2014-12-28 Alexander Cherepanov <cherepan@mccme.ru>
450 * elf_begin.c (read_long_names): Don't miss '/' right after
451 another '/'. Fixes a dir traversal vuln in ar extraction.
453 2014-12-18 Ulrich Drepper <drepper@gmail.com>
455 * Makefile.am: Suppress output of textrel_check command.
457 2014-12-16 Mark Wielaard <mjw@redhat.com>
459 * elf_begin.c (read_long_names): Make sure long_names len fits
462 2014-12-15 Mark Wielaard <mjw@redhat.com>
464 * elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
466 2014-12-15 Mark Wielaard <mjw@redhat.com>
468 * elf_begin.c (read_long_names): Clear any garbage left in the
471 2014-12-11 Mark Wielaard <mjw@redhat.com>
473 * elf_begin.c (file_read_elf): Correct ELF64 section offset check.
475 2014-12-11 Mark Wielaard <mjw@redhat.com>
477 * elf_begin.c (read_long_names): Check for offset overflow.
478 (__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.
479 Don't allow it to go beyond end of file.
481 2014-12-09 Mark Wielaard <mjw@redhat.com>
483 * elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
485 2014-11-27 Mark Wielaard <mjw@redhat.com>
487 * Makefile.am (libelf.so): Use textrel_check.
489 2014-11-23 Mark Wielaard <mjw@redhat.com>
491 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
492 overflow check to unsigned.
494 2014-11-23 Mark Wielaard <mjw@redhat.com>
496 * note_xlate.h (elf_cvt_note): Copy over any leftover data if
497 src != dest. The data is probably part of truncated name/desc.
499 2014-11-22 Mark Wielaard <mjw@redhat.com>
501 * elf_getphdrnum.c (elf_getphdrnum): Sanity check the
502 __elf_getphdrnum_rdlock result.
504 2014-11-18 Mark Wielaard <mjw@redhat.com>
506 * version_xlate.h (elf_cvt_Verdef): Check for overflow.
507 (elf_cvt_Verneed): Likewise.
509 2014-11-17 Mark Wielaard <mjw@redhat.com>
511 * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
513 2014-11-16 Mark Wielaard <mjw@redhat.com>
515 * elf_getshdrstrndx.c: Check there are section headers before
518 2014-11-16 Mark Wielaard <mjw@redhat.com>
520 * elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
521 Check for too many pheaders.
522 * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
523 actually exists before handling PN_XNUM.
525 2014-11-16 Mark Wielaard <mjw@redhat.com>
527 * gelf_getnote.c (gelf_getnote): Check padding overflow.
529 2014-11-16 Mark Wielaard <mjw@redhat.com>
531 * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
532 and align as Elf64_Off and Elf64_Xword not size_t.
534 2014-11-14 Mark Wielaard <mjw@redhat.com>
536 * gelf_getnote.c (gelf_getnote): Check offset overflow.
538 2014-11-13 Mark Wielaard <mjw@redhat.com>
540 * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
543 2014-11-08 Mark Wielaard <mjw@redhat.com>
545 * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
547 2014-11-07 Mark Wielaard <mjw@redhat.com>
549 * elf_begin.c (file_read_elf): Correct sh_size check.
550 * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
553 2014-09-10 Petr Machata <pmachata@redhat.com>
555 * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
558 2014-07-07 Mark Wielaard <mjw@redhat.com>
560 * elf.h: Update from glibc.
562 2014-04-13 Mark Wielaard <mjw@redhat.com>
564 * Makefile.am: Remove !MUDFLAP conditions.
565 * elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
567 * elf_update.c (write_file): Remove _MUDFLAP condition.
569 2014-01-17 Jakub Jelinek <jakub@redhat.com>
570 Roland McGrath <roland@redhat.com>
572 * libelfP.h (INVALID_NDX): Define.
573 * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
574 * gelf_getlib.c (gelf_getlib): Likewise.
575 * gelf_getmove.c (gelf_getmove): Likewise.
576 * gelf_getrel.c (gelf_getrel): Likewise.
577 * gelf_getrela.c (gelf_getrela): Likewise.
578 * gelf_getsym.c (gelf_getsym): Likewise.
579 * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
580 * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
581 * gelf_getversym.c (gelf_getversym): Likewise.
582 * gelf_update_dyn.c (gelf_update_dyn): Likewise.
583 * gelf_update_lib.c (gelf_update_lib): Likewise.
584 * gelf_update_move.c (gelf_update_move): Likewise.
585 * gelf_update_rel.c (gelf_update_rel): Likewise.
586 * gelf_update_rela.c (gelf_update_rela): Likewise.
587 * gelf_update_sym.c (gelf_update_sym): Likewise.
588 * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
589 * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
590 * gelf_update_versym.c (gelf_update_versym): Likewise.
592 2014-01-17 Jakub Jelinek <jakub@redhat.com>
594 * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
595 table fits into object's bounds.
596 * elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
597 elf->map_address. Check if first section header fits into object's
599 * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
600 Check if section header table fits into object's bounds.
601 * elf_begin.c (get_shnum): Ensure section headers fits into
603 (file_read_elf): Make sure scncnt is small enough to allocate both
604 ElfXX_Shdr and Elf_Scn array. Make sure section and program header
605 tables fit into object's bounds. Avoid memory leak on failure.
606 * elf_newscn.c (elf_newscn): Check for overflow.
607 * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
608 (__elfw2(LIBELFBITS,updatefile)): Likewise.
609 * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
610 * elf_getarsym.c (elf_getarsym): Likewise.
612 2013-11-08 Mark Wielaard <mjw@redhat.com>
614 * elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
615 already directly mmapped.
617 2013-11-05 Mark Wielaard <mjw@redhat.com>
619 * elf32_updatefile.c (elfXX_updatefile): Copy all section headers
622 2013-11-01 Michael Forney <mforney@mforney.org>
624 * Makefile.am: Use READELF.
626 2013-10-01 Petr Machata <pmachata@redhat.com>
628 * elf.h: Update from glibc.
630 2013-06-17 Petr Machata <pmachata@redhat.com>
632 * elf.h: Update from glibc.
634 2013-08-28 Namhyung Kim <namhyung@gmail.com>
636 * gelf.h (gelf_fsize): Fix typo in comment.
638 2013-08-28 Mark Wielaard <mjw@redhat.com>
640 * gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
642 2013-08-27 Mark Wielaard <mjw@redhat.com>
644 * gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
646 2013-08-25 Kurt Roeckx <kurt@roeckx.be>
648 * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
649 dereference to avoid alignment problems.
651 2013-01-07 Roland McGrath <roland@hack.frob.com>
653 * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
654 would be unaligned and !ALLOW_UNALIGNED.
656 * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
657 dereference so as not to assume the field is naturally aligned.
659 2012-09-17 Petr Machata <pmachata@redhat.com>
661 * elf.h: Update from glibc.
663 2012-08-16 Roland McGrath <roland@hack.frob.com>
665 * elf.h: Update from glibc.
667 2012-08-14 Mark Wielaard <mjw@redhat.com>
669 * elf32_checksum.c (ebl_debugscn_p): Removed unused define and
670 confusing outdated comment.
672 2012-08-01 Petr Machata <pmachata@redhat.com>
674 * elf_getarsym (read_number_entries): New function.
675 (elf_getarsym): Handle 64-bit symbol table, stored in special
676 entry named "/SYM64/".
677 * elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
678 because it contains 64-bit symbol table.
680 2012-07-19 Mark Wielaard <mjw@redhat.com>
682 * elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
685 2012-07-17 Petr Machata <pmachata@redhat.com>
687 * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
688 integer number of records in case of ELF_T_NHDR.
690 2012-04-02 Mark Wielaard <mjw@redhat.com>
692 * elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
693 there are no nonempty sections at that offset.
695 2012-03-21 Roland McGrath <roland@hack.frob.com>
697 * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
699 2011-02-26 Mark Wielaard <mjw@redhat.com>
701 * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
703 2011-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
705 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
706 when MAXIMUM_SIZE == ~0.
708 2010-08-18 Roland McGrath <roland@redhat.com>
710 * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
712 Reported by Mark Hatle <mark.hatle@windriver.com>.
714 * exttypes.h: Add cases for ElfNN_Lib.
715 Reported by Mark Hatle <mark.hatle@windriver.com>.
717 2010-06-14 Ulrich Drepper <drepper@redhat.com>
719 * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
720 * gelf_update_phdr.c: Likewise.
721 * gelf_update_ehdr.c: Likewise.
723 2010-04-14 Roland McGrath <roland@redhat.com>
725 * elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
726 * elf_begin.c (file_read_elf): Don't set .phdr here.
728 2010-04-13 Roland McGrath <roland@redhat.com>
730 * elf.h: Update from glibc.
732 2010-04-06 Roland McGrath <roland@redhat.com>
734 * elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
737 2010-04-01 Petr Machata <pmachata@redhat.com>
739 * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
740 that do not need a conversion.
742 2010-03-11 Roland McGrath <roland@redhat.com>
744 * elf.h: Update from glibc.
746 2010-03-04 Ulrich Drepper <drepper@redhat.com>
748 * elf.h: Update from glibc.
750 2010-02-17 Roland McGrath <roland@redhat.com>
752 * elf_begin.c (file_read_elf): Leave section rawdata_base and
753 data_base pointers null when [sh_offset,sh_size) points outside
756 2010-02-15 Roland McGrath <roland@redhat.com>
758 * Makefile.am: Use config/eu.am for common stuff.
760 2010-01-07 Roland McGrath <roland@redhat.com>
762 * elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
763 * gelf_getphdr.c: Likewise.
764 * gelf_update_phdr.c: Likewise.
765 * elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
766 * elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
767 * elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
768 If COUNT is too large, use store PN_XNUM instead and set sh_info.
769 * elf_begin.c (file_read_elf): Always allocate space we can use later
770 for section 0 if doing RDWR.
772 * elf_getphdrnum.c: New file.
773 * Makefile.am (libelf_a_SOURCES): Add it.
774 * libelf.h: Declare elf_getphdrnum.
775 * libelfP.h: Declare __elf_getphdrnum_rdlock.
776 * libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
778 * elf.h: Update from glibc.
780 2009-10-23 Lubomir Rintel <lkundrak@v3.sk>
782 * elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
783 filling from section start, not shdr_end.
785 2009-11-10 Roland McGrath <roland@redhat.com>
787 * elf_readall.c (__libelf_readall): Fetch file size if not yet known.
789 2009-11-06 Mark Wielaard <mjw@redhat.com>
791 * elf_next.c (elf_next): Mark the archive header as unusable when
792 there is no next ar element.
794 2009-08-12 Mark Wielaard <mjw@redhat.com>
796 * Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
798 2009-07-26 Ulrich Drepper <drepper@redhat.com>
800 * elf.h: Update from glibc.
802 2009-07-21 Ulrich Drepper <drepper@redhat.com>
804 * elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
805 sections. Patch by Lubomir Rintel <lkundrak@v3.sk>.
807 2009-07-08 Roland McGrath <roland@redhat.com>
809 * libelfP.h (struct Elf): Remove unused ar.has_index field.
810 Reorder various members for optimal packing.
812 2009-07-08 Ulrich Drepper <drepper@redhat.com>
814 * elf.h: Update from glibc.
816 2009-06-13 Ulrich Drepper <drepper@redhat.com>
818 * Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
819 elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
820 * elf_getshnum.c: Renamed to...
821 * elf_getshdrnum.c: ...this. Rename function and add old name as
822 alias. Likewise for internal functions with derived names.
823 * elf_getshstrndx.c: Renamed to...
824 * elf_getshdrstrndx.c: ...this. Rename function and add old name as
825 alias. Likewise for internal functions with derived names.
826 * libelf.h: Add prototypes for new names. Make old names as
828 * libelfP.h: Rename internal function prototypes.
829 * libelf.map: Export for names.
830 * elf32_checksum.c: Don't use deprecated functions.
831 * elf32_getshdr.c: Likewise.
833 2009-06-01 Ulrich Drepper <drepper@redhat.com>
835 * elf.h: Update from glibc.
837 2009-04-14 Roland McGrath <roland@redhat.com>
839 * elf.h: Update from glibc.
841 2009-04-01 Roland McGrath <roland@redhat.com>
843 * elf.h: Update from glibc.
845 2009-02-10 Ulrich Drepper <drepper@redhat.com>
847 * elf32_updatefile.c (updatefile): For the zeroth section we still
848 have to copy the section header.
850 2009-02-01 Ulrich Drepper <drepper@redhat.com>
852 * elf_strptr.c: Add comment re possible problem.
854 2009-01-26 Ulrich Drepper <drepper@redhat.com>
856 * elf32_updatenull.c (updatenull_wrlock): Fix comment of
857 ELF_F_LAYOUT behaviour re section header table.
859 2009-01-22 Ulrich Drepper <drepper@redhat.com>
861 * elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
862 sections even if only the section at the start of the gap has been
864 (__elfXX_updatefile): Likewise.
866 2009-01-21 Ulrich Drepper <drepper@redhat.com>
868 * elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
869 handle sections for NOBITS sections.
870 (elfXX_updatefile): Likewise.
872 * elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
873 sections we haven't loaded, update last_position based on scn_start,
874 not based on old value. Don't run the loop for the dummy section 0.
875 (elfXX_updatefile): Don't run the loop for the dummy section 0.
877 2009-01-10 Ulrich Drepper <drepper@redhat.com>
879 * libelfP.h (_): We only have one translation domain, elfutils.
881 * Makefile.am: Use USE_LOCKS instead of USE_TLS.
882 * elf_error.c: Always use __thread. Remove all !USE_TLS code.
884 2009-01-04 Roland McGrath <roland@redhat.com>
886 * note_xlate.h (elf_cvt_note): Don't examine a size too small to
887 container a note header.
889 2008-12-11 Roland McGrath <roland@redhat.com>
891 * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
892 placement offset going backwards, for out-of-order or overlapping
893 (bogus) sh_offset layouts. It's a dumb use, but should not crash.
894 (__elfw2(LIBELFBITS,updatefile)): Likewise.
897 * libelf.h (Elf_Data): Whitespace fix.
899 2008-12-10 Roland McGrath <roland@redhat.com>
901 * elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
903 2008-10-22 Petr Machata <pmachata@redhat.com>
905 * elf_rawfile.c (elf_rawfile): Lock around elf-> references.
907 2008-10-21 Petr Machata <pmachata@redhat.com>
909 * libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
910 * elf32_getehdr.c (getehdr_rdlock): Move the code to new function
911 getehdr_impl and make it a wrapper. Rename to getehdr_wrlock.
912 (getehdr_impl): Guard elf->class init with wrlock.
913 (getehdr): Also make it a wrapper of getehdr_impl.
914 * elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
916 2008-10-20 Petr Machata <pmachata@redhat.com>
918 * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
919 code that reads mutable elf state. Relock to write lock to chain
920 the new chunk on the elf rawchunks list.
922 2008-10-20 Petr Machata <pmachata@redhat.com>
924 * elf32_checksum.c (checksum): Place a lock around the code that
925 processes data. Make it wrlock if the code needs to xlate the
926 data before processing.
928 2008-10-16 Petr Machata <pmachata@redhat.com>
931 (__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
932 (dup_elf): Adjust the call.
933 (elf_begin): New local function lock_dup_elf. Relocks the elf if
934 necessary before calling dup. Call this instead of dup_elf.
936 (elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
937 * elf_next.c (elf_next): Likewise.
938 * elf_rand.c (elf_rand): Likewise.
940 2008-10-14 Petr Machata <pmachata@redhat.com>
942 * elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
944 2008-11-26 Roland McGrath <roland@redhat.com>
946 * elf.h: Update from glibc.
948 2008-10-06 Roland McGrath <roland@redhat.com>
950 * elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
952 2008-08-27 Roland McGrath <roland@redhat.com>
954 * elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
956 * libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
958 2008-08-25 Roland McGrath <roland@redhat.com>
960 * Makefile.am (libelf_so_LDLIBS): New variable.
961 (libelf.so): Use it in the link.
963 2008-08-21 Petr Machata <pmachata@redhat.com>
965 * elf_getdata.c, libelfP.h
966 (__elf_getdata_internal): Rename to __elf_getdata_rdlock.
967 (__libelf_set_rawdata_wrlock): New function.
968 (__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
969 * elf32_updatenull.c, libelfP.h
970 (__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
972 2008-08-21 Petr Machata <pmachata@redhat.com>
974 * elf32_getphdr.c, libelfP.h
975 (__elfNN_getphdr_internal): Drop. Move __elfNN_getphdr_internal
976 code to __elfNN_getphdr_wrlock.
977 (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
978 (__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
979 wrappers of getphdr_impl.
981 2008-08-21 Petr Machata <pmachata@redhat.com>
983 * elf32_getehdr.c, libelfP.h
984 (__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
985 * gelf_getehdr, libelfP.h:
986 (__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
988 2008-08-21 Petr Machata <pmachata@redhat.com>
991 (__elfNN_getshdr_internal): Drop.
992 (load_shdr_wrlock, scn_valid): New functions, contain bits of
993 behaviour from __elfNN_getshdr_internal.
994 (__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
995 dropped _internal functions above.
997 (__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
999 2008-08-04 Petr Machata <pmachata@redhat.com>
1001 * libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
1003 2008-07-28 Roland McGrath <roland@redhat.com>
1005 * elf.h: Update from glibc.
1007 2008-03-31 Roland McGrath <roland@redhat.com>
1009 * elf32_offscn.c: Make sure shdrs have been read in.
1011 2008-02-19 Roland McGrath <roland@redhat.com>
1013 * elf.h: Update from glibc.
1015 2008-02-08 Roland McGrath <roland@redhat.com>
1017 * elf.h: Update from glibc.
1019 2008-01-31 Ulrich Drepper <drepper@redhat.com>
1021 * elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
1022 under construction and no raw data can be read from disk.
1024 2008-01-30 Roland McGrath <roland@redhat.com>
1026 * elf.h: Update from glibc.
1028 2008-01-26 Roland McGrath <roland@redhat.com>
1030 * elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
1031 Fixes various pastos in wrong type in sizeof, wrong string parsed.
1033 2008-01-20 Roland McGrath <roland@redhat.com>
1035 * elf_getaroff.c: Calculate from start_offset, instead of using
1036 parent's state.ar.offset field.
1038 2008-01-08 Roland McGrath <roland@redhat.com>
1040 * Makefile.am (euinclude): Variable removed.
1041 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1043 2008-01-03 Roland McGrath <roland@redhat.com>
1045 * common.h: Add __attribute__ ((unused)) to static functions.
1047 2007-12-20 Ulrich Drepper <drepper@redhat.com>
1049 * Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
1050 * libelfP.h (struct Elf_Scn): Add shndx_index field.
1051 Declare __elf_scnshndx_internal.
1052 * elf32_getshdr.c: Record location of extended section header.
1053 * elf_begin.c (file_read_elf): Likewise.
1054 * elf_scnshndx.c: New file.
1055 * libelf.h: Declare elf_scnshndx.
1056 * libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
1058 2007-11-12 Roland McGrath <roland@redhat.com>
1060 * libelf.h: Replace off64_t with loff_t throughout.
1061 Only that type name is unconditionally defined by <sys/types.h>
1063 2007-11-03 Roland McGrath <roland@redhat.com>
1065 * libelf.h (Elf_Data): Comment fix.
1067 2007-10-18 Roland McGrath <roland@redhat.com>
1069 * elf.h: Update from glibc.
1071 2007-10-07 Roland McGrath <roland@redhat.com>
1073 * elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
1074 member access in terminating name with no trailing /. Trim trailing
1075 spaces when there is no /.
1077 2007-10-04 Roland McGrath <roland@redhat.com>
1079 * elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
1081 2007-10-03 Roland McGrath <roland@redhat.com>
1083 * libelf.h (Elf_Data): Use off64_t for d_off.
1084 (Elf_Arhdr): Use off64_t for ar_size.
1085 (elf_update, elf_getbase, elf_getaroff): Return off64_t.
1087 * gelf_rawchunk.c: File removed.
1088 * gelf_freechunk.c: File removed.
1089 * Makefile.am (libelf_a_SOURCES): Remove them.
1090 * libelf.map (ELFUTILS_1.0): Remove exports.
1091 * gelf.h: Remove decls.
1093 * elf_getdata_rawchunk.c: New file.
1094 * Makefile.am (libelf_a_SOURCES): Add it.
1095 * libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
1096 * libelf.h: Declare it.
1097 * libelfP.h (Elf_Data_Chunk): New type.
1098 (struct Elf.elf): New member `rawchunks'.
1099 * elf_end.c (elf_end): Free recorded rawchunk buffers.
1101 2007-08-24 Roland McGrath <roland@redhat.com>
1103 * gelf_getnote.c: New file.
1104 * Makefile.am (libelf_a_SOURCES): Add it.
1105 * gelf.h: Declare gelf_getnote.
1106 * libelf.map (ELFUTILS_1.3): Add gelf_getnote.
1108 * libelfP.h (NOTE_ALIGN): New macro.
1109 * note_xlate.h: New file.
1110 * Makefile.am (noinst_HEADERS): Add it.
1111 * gelf_xlate.c: Include it.
1112 (__elf_xfctstom): Use elf_cvt_note.
1113 * elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
1114 (__libelf_set_rawdata): Likewise.
1116 2007-08-19 Roland McGrath <roland@redhat.com>
1118 * gelf_update_auxv.c: New file.
1119 * gelf_getauxv.c: New file.
1120 * Makefile.am (libelf_a_SOURCES): Add them.
1121 * gelf.h: Declare gelf_getauxv, gelf_update_auxv.
1122 * libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
1123 Export gelf_getauxv, gelf_update_auxv.
1125 * libelf.h (Elf_Type): Add ELF_T_AUXV.
1126 * abstract.h: Add auxv_t entries.
1127 * exttypes.h: Likewise.
1128 * gelf_xlate.h: Likewise.
1129 * gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
1130 * gelf_fsize.c (__libelf_type_sizes): Likewise.
1132 2007-08-12 Roland McGrath <roland@redhat.com>
1134 * elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
1135 and only tertiarily on index.
1137 2007-07-09 Roland McGrath <roland@redhat.com>
1139 * elf.h: Update from glibc.
1141 2007-04-22 Roland McGrath <roland@redhat.com>
1143 * elf.h: Update from glibc.
1145 2007-03-18 Roland McGrath <roland@redhat.com>
1147 * elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
1148 Return zero when the section headers do not fit within MAXSIZE.
1150 2007-03-09 Roland McGrath <roland@redhat.com>
1152 * libelfP.h (LIBELF_EV_IDX): New macro.
1153 (__libelf_type_align): New macro.
1154 [! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
1155 * elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
1156 (convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
1157 and __libelf_type_sizes, in place of old table.
1158 (__libc_type_aligns): New const variable.
1160 2007-02-04 Ulrich Drepper <drepper@redhat.com>
1162 * Makefile (libelf.so): Build with -z relro.
1164 * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1166 2007-01-30 Ulrich Drepper <drepper@redhat.com>
1168 * nlist.c: Close file descriptor before returning.
1170 2007-01-20 Roland McGrath <roland@redhat.com>
1172 * gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1173 convert the final word.
1175 * elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1176 MY_ELFDATA on !ALLOW_UNALIGNED machines.
1178 2007-01-18 Roland McGrath <roland@redhat.com>
1180 * gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1183 2006-10-13 Roland McGrath <roland@redhat.com>
1185 * elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1186 * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1188 2006-08-29 Roland McGrath <roland@redhat.com>
1190 * elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
1191 MY_ELFDATA on !ALLOW_UNALIGNED machines.
1192 Reported by Christian Aichinger <Greek0@gmx.net>.
1194 * Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1196 2006-08-08 Ulrich Drepper <drepper@redhat.com>
1198 * elf.h (DT_VALNUM): Update.
1199 (DT_ADDRNUM): Likewise.
1201 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1203 * elf32_updatefile.c: Adjust for internal_function_def removal.
1204 * elf32_updatenull.c: Likewise.
1205 * elf_begin.c: Likewise.
1206 * elf_getdata.c: Likewise.
1208 2006-07-11 Ulrich Drepper <drepper@redhat.com>
1210 * libelf.h: Define ELF_T_GNUHASH.
1211 * elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
1212 (shtype_map): Add SHT_GNU_HASH entries.
1213 * gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
1214 * gnuhash_xlate.h: New file.
1215 * Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
1217 2006-07-06 Ulrich Drepper <drepper@redhat.com>
1219 * elf_gnu_hash.c: New file.
1220 * libelf.h: Declare elf_gnu_hash.
1221 * Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
1222 * libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
1224 2006-06-15 Roland McGrath <roland@redhat.com>
1226 * libelf.h (elf_getarsym): Fix comment typo.
1227 Rename second parameter to be more explanatory.
1228 (elf_getident, elf_rawhide): Likewise.
1230 2006-05-28 Ulrich Drepper <drepper@redhat.com>
1232 * elf32_updatefile.c (updatemmap): Preserve section content if
1233 copying would overwrite them.
1234 Fix msync paramters.
1236 2006-04-04 Roland McGrath <roland@redhat.com>
1238 * elf32_updatefile.c (updatemmap): Handle other-endian case.
1240 2006-04-04 Ulrich Drepper <drepper@redhat.com>
1242 * elf32_updatefile.c (updatemmap): Cleanups. Remove shdr_dest
1243 variable. Before writing sections, make a copy of the section
1244 header data if necessary. Don't write section header while
1245 writing the section constent, it might overwrite some sections.
1246 Restore the pointer afterwards.
1247 * elf32_updatenull.c (updatenull): If the offset of a section in a
1248 file changed make sure we read the section so that it'll be written
1251 * elf_update.c: Remove debug message.
1253 2005-12-07 Roland McGrath <roland@redhat.com>
1255 * gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1256 (FETCH, STORE): New macros.
1257 (INLINE3): Use those to do alignment-friendly conversion.
1259 * elf32_getshdr.c: Include map_address and start_offset in alignment
1261 * elf32_getphdr.c: Likewise.
1263 2005-11-19 Roland McGrath <roland@redhat.com>
1265 * elf.h: Update from glibc.
1267 2005-11-17 Roland McGrath <roland@redhat.com>
1269 * elf.h: Update from glibc.
1271 2005-11-10 Roland McGrath <roland@redhat.com>
1273 * elf.h: Update from glibc.
1275 2005-09-09 Roland McGrath <roland@redhat.com>
1277 * elf_update.c (write_file): Stat the file and fchmod it after update
1278 if its mode had S_ISUID or S_ISGID bits set.
1280 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1282 * elf32_getphdr.c: Include <system.h>. Use pread_retry instead of
1283 pread. And branch prediction where useful.
1284 * elf_begin.c: Likewise.
1285 * elf_getdata.c: Likewise.
1286 * elf_getshstrndx.c: Likewise.
1287 * elf_readall.c: Likewise.
1288 * gelf_rawchunk.c: Likewise.
1289 * elf32_updatefile.c: Include <system.h>. Use pread_retry instead of
1290 pread. And branch prediction where useful.
1291 * elf_getarsym.c: Don't define pread_retry here.
1293 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1294 (%.os): Use COMPILE.os.
1295 (COMPILE.os): Filter out gconv options.
1297 2005-08-27 Ulrich Drepper <drepper@redhat.com>
1299 * elf_begin.c (file_read_elf): Avoid reading ELF header from file
1300 again. Instead accept additional parameter which points to it if we
1302 (get_shnum): Use passed in e_ident value as source of ELF header.
1304 2005-08-15 Ulrich Drepper <drepper@redhat.com>
1306 * elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
1308 * Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
1309 * libelf.map: Export elf_getaroff.
1310 * libelf.h: Declare elf_getaroff.
1311 * elf_getaroff.c: New file.
1313 2005-08-13 Ulrich Drepper <drepper@redhat.com>
1315 * elf_begin.c (get_shnum): Optimize memory handling. Always read from
1316 mapped file if available. Fix access to 64-bit sh_size. Recognize
1318 (file_read_elf): Likewise.
1320 2005-08-12 Roland McGrath <roland@redhat.com>
1322 * elf32_offscn.c: Do not match empty sections at OFFSET unless
1323 there are no nonempty sections at that offset.
1325 2005-08-07 Ulrich Drepper <drepper@redhat.com>
1327 * elf.h: Update from glibc.
1329 2005-08-06 Ulrich Drepper <drepper@redhat.com>
1331 * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1333 2005-08-03 Ulrich Drepper <drepper@redhat.com>
1335 * libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1336 new version ELFUTILS_1.1.1.
1338 2005-08-02 Ulrich Drepper <drepper@redhat.com>
1340 * elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
1341 * elf32_offscn.c: New file.
1342 * elf64_offscn.c: New file.
1343 * gelf_offscn.c: New file.
1344 * Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
1346 * libelf.sym: Export new symbols.
1348 2005-07-23 Ulrich Drepper <drepper@redhat.com>
1350 * elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
1351 sections here anymore.
1352 * elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
1354 * elf_update.c (elf_update): Get write lock, not read lock.
1356 * elf32_updatenull.c (updatenull): Get section headers if necessary
1359 2005-07-22 Ulrich Drepper <drepper@redhat.com>
1361 * elf32_updatenull.c (updatenull): If program header hasn't been loaded
1362 yet, try to do it now.
1363 Don't unnecessarily update overflow of section count in zeroth section
1365 If section content hasn't been read yet, do it before looking for the
1366 block size. If no section data present, infer size of section header.
1368 2005-05-11 Ulrich Drepper <drepper@redhat.com>
1370 * elf.h: Update again.
1372 2005-05-09 Ulrich Drepper <drepper@redhat.com>
1374 * elf.h: Update from glibc.
1376 2005-05-08 Roland McGrath <roland@redhat.com>
1378 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1379 * elf_update.c (write_file) [_MUDFLAP]: Likewise.
1381 2005-03-29 Ulrich Drepper <drepper@redhat.com>
1383 * elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
1384 * elf_end.c: Likewise.
1385 * elf_getdata.c: Likewise.
1386 * gelf_getehdr.c: Likewise.
1387 * nlist.c: Likewise.
1388 * libelfP.h: Add declarations of internal functions.
1390 2005-02-15 Ulrich Drepper <drepper@redhat.com>
1392 * common.h (CONVERT): Make sure all values are unsigned.
1393 (CONVERT_TO): Likewise.
1395 * Makefile.am (AM_CFLAGS): Add -Wformat=2.
1396 Fix rule to build libelf.so.
1398 2005-02-06 Ulrich Drepper <drepper@redhat.com>
1400 * Makefile.am: Cleanup AM_CFLAGS handling. Add -Wunused -Wextra.
1401 Remove lint handling.
1402 * elf32_getphdr.c: Minor cleanups.
1403 * elf32_getshdr.c: Likewise.
1404 * elf32_updatefile.c: Likewise.
1405 * elf32_updatenull.c: Likewise.
1406 * elf_begin.c: Likewise.
1407 * elf_error.c: Likewise.
1408 * elf_getarsym.c: Likewise.
1409 * elf_getdata.c: Likewise.
1410 * elf_update.c: Likewise.
1411 * gelf_xlate.c: Likewise.
1413 2005-02-05 Ulrich Drepper <drepper@redhat.com>
1415 * Makefile.am: Check for text relocations in constructed DSO.
1417 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1419 2005-02-04 Ulrich Drepper <drepper@redhat.com>
1421 * gelf_getehdr.c (gelf_getehdr): Slight optimization.
1423 * elf32_checksum.c (checksum): Do not look at NOBITS sections.
1425 * gelf.h: Add gelf_checksum prototype.
1427 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1429 * elf32_checksum.c: Make compile with gcc 4.0.
1430 * elf32_updatefile.c: Likewise.
1431 * elf32_updatenull.c: Likewise.
1432 * elf_begin.c: Likewise.
1433 * elf_error.c: Likewise.
1434 * elf_getdata.c: Likewise.
1435 * elf_getident.c: Likewise.
1437 2004-04-01 Ulrich Drepper <drepper@redhat.com>
1439 * elf.h: Update from glibc.
1441 2004-01-23 Ulrich Drepper <drepper@redhat.com>
1443 * elf_update.c: Fix locking.
1444 * elf_clone.c: Likewise.
1446 * libelf.h: Define ELF_T_LIB.
1447 * gelf_getlib.c: New file.
1448 * gelf_update_lib.c: New file.
1449 * gelf.h: Declare the new functions. Define GElf_Lib.
1450 * abstract.h: Define Lib, Lib32, Lib64.
1451 * gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
1452 * gelf_xlate.h: Add entry for ElfXX_Lib.
1453 * elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
1454 * libelf.map: Add new symbols to ELFUTILS_1.1.
1455 * Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
1458 2004-01-17 Ulrich Drepper <drepper@redhat.com>
1460 * Makefile.am: Support building with mudflap.
1462 * gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
1463 * dl-hash.h (_dl_elf_hash): Likewise.
1465 2004-01-05 Ulrich Drepper <drepper@redhat.com>
1467 * elf-knowledge.h: New file. From libelf subdir.
1468 * Makefile.am (euincludedir): Define.
1469 (euinclude_HEADERS): Add elf-knowledge.h.
1471 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1473 * elf.h: Define some PT_IA_64_HP_* constants.
1475 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1477 * libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
1478 state.elf64.scnincr to match state.elf{,32}.
1480 2003-08-12 Ulrich Drepper <drepper@redhat.com>
1482 * elf32_updatefile.c (__updatemmap): When writing back file where
1483 some sections have not been read in, count their sizes based on
1486 2003-08-11 Ulrich Drepper <drepper@redhat.com>
1488 * Moved to CVS archive.