xref: /aosp_15_r20/external/elfutils/libelf/ChangeLog (revision 7304104da70ce23c86437a01be71edd1a2d7f37e)
12023-09-09  Yanglin Xun  <[email protected]>
2
3 * libelf.h: Fix typo in comment
4
52023-04-01  Youling Tang  <[email protected]>
6
7	* elf.h: Update from glibc.
8
92023-03-03  Mark Wielaard  <[email protected]>
10
11	* libelf.h: Define ELFCOMPRESS_ZSTD if undefined.
12	(elf_compress): Document ELFCOMPRESS_ZSTD compression type.
13
142023-02-20  Mark Wielaard  <[email protected]>
15
16	* gnuhash_xlate.h (elf_cvt_gnuhash): memmove any left over bytes.
17
182022-11-30  Mark Wielaard  <[email protected]>
19
20	* elf.h: Update from glibc.
21
222022-10-28  Mark Wielaard  <[email protected]>
23
24	* elf.h: Update from glibc.
25
262022-10-21  Yonggang Luo  <[email protected]>
27
28	* libelf_crc32.c: Remove LIB_SYSTEM_H define.
29
302022-09-20  Yonggang Luo  <[email protected]>
31
32	* elf32_checksum.c: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
33	* elf32_xlatetof.c: Likewise.
34	* elf_getarsym.c: Likewise.
35
362022-10-16  Yonggang Luo  <[email protected]>
37
38	* common.h: Remove ar.h, byteswap.h and endian.h.
39	* elf32_checksum.c: Remove endian.h.
40	* elf32_getphdr.c: Remove unistd.h and system.h.
41	* elf32_getshdr.c: Remove unistd.h.h and system.h.
42	* elf32_updatefile.c: Remove unistd.h, sys/mman.h and system.h.
43	* elf32_updatenull.c: Remove endian.h and system.h.
44	* elf32_xlatetof.c: Remove endian.h.
45	* elf32_xlatetom.c: Likewise.
46	* elf_begin.c: Remove unistd.h, sys/mman.h and system.h.
47	* elf_cntl.c: Remove unistd.h.
48	* elf_compress.c: Remove system.h and unistd.h.
49	* elf_end.c: Remove sys.mman.h.
50	* elf_getarsym.c: Remove byteswap.h, endian.h, unistd.h and
51	system.h.
52	* elf_getdata.c: Remove unistd.h and system.h.
53	* elf_getdata_rawchunk.c: Remove unistd.h and system.h.
54	* elf_getshdrstrndx.c: Likewise.
55	* elf_readall.c: Likewise.
56	* elf_update.c: Remove unistd.h and sys/mman.h.
57	* gelf_xlate.c: Remove byteswap.h.
58	* libelfP.h: Add system.h.
59	* nlist.c: Remove unistd.h.
60
612022-08-28  Mark Wielaard  <[email protected]>
62
63	* elf_begin.c (__libelf_next_arhdr_wrlock): Add OCT_FIELD macro,
64	like INT_FIELD but use strtol with octal base 8. Use for ar_mode.
65
662022-08-08  Andreas Schwab  <[email protected]>
67
68	* elf.h: Update from glibc.
69
702022-04-24  Mark Wielaard  <[email protected]>
71
72	* elf_update.c (write_file): Check HAVE_MREMAP.
73
742022-04-01  Mark Wielaard  <[email protected]>
75
76	* libelfP.h (struct Elf_Data_Chunk): Add an int64_t offset field.
77	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check whether the
78	requested chunk, offset, size and type, was already handed out.
79	Set new Elf_Data_Chunk offset field.
80
812022-03-29  Mark Wielaard  <[email protected]>
82
83	* gelf_xlate.c (START): Define and use sz variable.
84	(END): Use sz variable to decide whether to do a memmove.
85
862022-03-24  Mark Wielaard  <[email protected]>
87
88	* elf.h: Update from glibc.
89
902022-03-22  Mark Wielaard  <[email protected]>
91
92	* elf_getdata.c (__libelf_type_aligns): ELF_T_GNUHASH has different
93	alignment for ELFCLASS32 and ELFCLASS64.
94
952022-03-20  Mark Wielaard  <[email protected]>
96
97	* version_xlate.h (elf_cvt_Verdef): Make sure aux_offset and
98	def_offset don't overflow.
99	(elf_cvt_Verneed): Make sure aux_offset and need_offset don't
100	overflow.
101
1022022-03-18  Mark Wielaard  <[email protected]>
103
104	* version_xlate.h (elf_cvt_Verdef): Check alignment of def_offset
105	and aux_offset.
106	(elf_cvt_Verneed): Check alignment of need_offset and aux_offset.
107
1082022-03-17  Mark Wielaard  <[email protected]>
109
110	* elf_begin.c (read_long_names): Check ar_size starts with a digit.
111
1122022-03-17  Mark Wielaard  <[email protected]>
113
114	* elf_begin.c (get_shnum): Take offset into account for Shdr
115	alignment check.
116
1172021-12-19  Mark Wielaard  <[email protected]>
118
119	* elf_begin.c (file_read_elf): Cast ehdr to uintptr_t before e_shoff
120	alignment check. Only set shdr state when scncnt is larger than zero.
121
1222021-12-16  Mark Wielaard  <[email protected]>
123
124	* libelfP.h (NOTE_ALIGN4): And with negative unsigned long.
125	(NOTE_ALIGN8): Likewise.
126
1272021-12-15  Mark Wielaard  <[email protected]>
128
129	* elf_begin.c (get_shnum): Use offsetof to get field of unaligned
130	struct.
131
1322021-09-06  Dmitry V. Levin  <[email protected]>
133
134	* common.h (allocate_elf): Remove cast of calloc return value.
135	* elf_newdata.c (elf_newdata): Likewise.
136	* elf_getscn.c (elf_getscn): Remove casts of calloc return values.
137	* elf_newscn.c (elf_newscn): Likewise.
138	* elf32_updatefile.c (__elfw2): Remove casts of malloc return values.
139	* elf_getdata.c (convert_data): Likewise.
140	(__libelf_set_rawdata_wrlock): Remove cast of malloc return value.
141	* elf_begin.c (read_long_names): Remove cast of malloc return value.
142	* elf_readall.c (__libelf_readall): Likewise.
143	* elf_getarsym.c (elf_getarsym): Remove casts of malloc and realloc
144	return values.
145
1462021-07-19  Mark Wielaard  <[email protected]>
147
148	* elf_strptr.c (validate_str): Check last char is zero first before
149	calling memrchr on the whole block.
150
1512021-06-09  Andrei Homescu  <[email protected]>
152
153	* elf_getdata.c: Fix d_align for sections where alignment is larger
154	than offset.
155
1562020-12-12  Mark Wielaard  <[email protected]>
157
158	* elf.h: Update from glibc.
159
1602020-12-16  Dmitry V. Levin  <[email protected]>
161
162	* libelfP.h (_): Remove.
163
1642020-12-15  Mark Wielaard  <[email protected]>
165
166	* elf_begin.c (get_shnum): Make sure the full Ehdr is available.
167
1682020-12-12  Dmitry V. Levin  <[email protected]>
169
170	* common.h: Fix spelling typo in comment.
171	* gelf.h: Likewise.
172	* libelf.h: Likewise.
173	* libelfP.h: Likewise.
174	* elf32_checksum.c (elfw2): Likewise.
175	* elf_begin.c (dup_elf, write_file): Likewise.
176	* elf_compress.c (__libelf_compress): Likewise.
177	* elf_compress_gnu.c (elf_compress_gnu): Likewise.
178
1792020-12-11  Dmitry V. Levin  <[email protected]>
180
181	* Makefile.am (GCC_INCLUDE): Remove.
182
1832020-12-09  Dmitry V. Levin  <[email protected]>
184
185	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
186	(libelf_so_SOURCES): Remove.
187	(CLEANFILES): Add libelf.so.
188
1892020-11-30  Dmitry V. Levin  <[email protected]>
190
191	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
192
1932020-11-06  Mark Wielaard  <[email protected]>
194
195	* elf-knowledge.h (SH_ENTSIZE_HASH): Update comment.
196
1972020-11-01  Mark Wielaard  <[email protected]>
198
199	* elf_strptr.c (elf_strptr): Check shdr is not NULL.
200
2012020-11-01  Mark Wielaard  <[email protected]>
202
203	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Set *dst to zero on
204	error.
205
2062020-11-01  Mark Wielaard  <[email protected]>
207
208	* libelfP.h (__libelf_data_type): Take an GElf_Ehdr instead of an
209	Elf handle.
210	* elf_getdata.c (__libelf_data_type): Likewise. And check ehdr
211	directly instead of fetching a new one.
212	(__libelf_set_rawdata_wrlock): Fetch Ehdr, report an error when that
213	fails, otherwise call __libelf_data_type.
214
2152020-10-28  Mark Wielaard  <[email protected]>
216
217	* elf.h: Update from glibc.
218
2192020-08-28  Mark Wielaard  <[email protected]>
220
221	* elf.h: Update from glibc.
222
2232020-08-19  Mark Wielaard  <[email protected]>
224
225	* elf32_updatenull.c (updatenull_wrlock): Fixup the sh_addralign
226	of an SHF_COMPRESSED section if necessary.
227
2282020-06-04  Mark Wielaard  <[email protected]>
229
230	* elf.h: Update from glibc.
231
2322020-05-08  Mark Wielaard  <[email protected]>
233
234	* elf_strptr.c (elf_strptr): Check shdr is not NULL.
235
2362020-05-08  Mark Wielaard  <[email protected]>
237
238	* elf_getdata.c (__libelf_set_rawdata_wrlock): Check
239	__gelf_getehdr_rdlock return value.
240
2412020-04-25  Mark Wielaard  <[email protected]>
242
243	* elf_compress.c (__libelf_compress): Remove free (out_buf).
244
2452020-03-18  Omar Sandoval  <[email protected]>
246
247	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Call
248	__elf{32,64}_getshdr_rdlock if the shdr is not cached.
249
2502019-03-20  Matthias Maennich  <[email protected]>
251
252	* elf_compress.c (__libelf_compress): Always call deflate_cleanup
253	in failure path. Call deflateEnd only once.
254	(__libelf_decompress): Call inflateEnd only once.
255
2562019-06-18  Mark Wielaard  <[email protected]>
257
258	* common.h (allocate_elf): Use int64_t instead of off_t for offset.
259	* elf32_newphdr.c (newphdr): Document why Elf32/64_Word is correct.
260	* elf32_updatefile.c (fill): Use int64_t instead of off_t for pos.
261	(updatefile): Define last_offset, shdr_offset and scn_start as
262	int64_t instead of off_t.
263	* elf32_updatenull.c: Define Elf32_SizeWord and Elf64_SizeWord.
264	(updatenull_wrlock): Return int64_t instead of off_t. Define size,
265	sh_entsize, sh_align and sh_size as SizeWords. Define offset as
266	int64_t.  Cast data->d_off to SizeWord instead of GElf_Word. Drop
267	size GElf_Word cast. Cast offset to SizeWord instead of GElf_Word
268	when comparing with sh_size.
269	* elf_begin.c (get_shnum): Define offset as int64_t instead of
270	off_t. Document why use GElf_Word is correct.
271	(file_read_elf): Define offset as int64_t instead of off_t.
272	(__libelf_read_mmaped_file): Likewise.
273	(read_unmmaped_file): Likewise.
274	(read_file): Likewise.
275	* elf_getaroff.c (elf_getaroff): Return int64_t.
276	* elf_getbase.c (elf_getbase): Likewise.
277	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Define offset as
278	int64_t instead of off_t.
279	* elf_update.c (write_file): Return int64_t instead of off_t,
280	define size as int64_t instead of off_t.
281	(elf_update): Likewise.
282	* libelfP.h (struct Elf): Define start_offset, sizestr_offset and
283	offset as int64_t.
284	(__libelf_read_mmaped_file): Define offset as int64_t.
285	(__elf32_updatenull_wrlock): Return int64_t.
286	(__elf64_updatenull_wrlock): Return int64_t.
287
2882019-05-12  Mark Wielaard  <[email protected]>
289
290	* elf32_updatenull.c (updatenull_wrlock): Mark shdr_flags dirty if
291	either offset or size changed.
292
2932019-05-01  Mark Wielaard  <[email protected]>
294
295	* gelf_getnote.c (gelf_getnote): Check n_namesz doesn't overflow
296	offset.
297
2982019-04-30  Mark Wielaard  <[email protected]>
299
300	* note_xlate.h (elf_cvt_note): Indicate we only translated the note
301	header if we ran out of data by updating len, src and dest.
302
3032019-04-01  Mao Han  <[email protected]>
304
305	* elf.h: Update from glibc.
306
3072019-03-07  Mark Wielaard  <[email protected]>
308
309	* elf32_updatefile.c (updatemmap): Use posix_memalign instead of
310	aligned_alloc.
311
3122019-03-06  Mark Wielaard  <[email protected]>
313
314	* elf32_updatefile.c (updatemmap): Free scns before returning
315	allocation failure.
316
3172019-02-24  Mark Wielaard  <[email protected]>
318
319	* gelf_xlate.c (__elf_xfctstof): Remove alias.
320	* libelfP.h (__elf_xfctstof): Remove definition.
321
3222019-02-24  Mark Wielaard  <[email protected]>
323
324	* elf32_fsize.c (local_strong_alias): Remove definition.
325	(msize): Remove alias.
326	* libelfP.h (__elf32_msize): Remove definition.
327	(__elf64_msize): Likewise.
328
3292019-02-21  Mark Wielaard  <[email protected]>
330
331	* common.h (determine_kind): Only accept EV_CURRENT.
332	* elf32_fsize.c (fsize): Just check version is EV_CURRENT.
333	Use __libelf_type_size without version dimension.
334	* elf32_updatefile.c (updatemmap): Define fctp from __elf_xfctstom
335	without version dimension.
336	(updatefile): Likewise.
337	* elf32_updatenull.c (default_ehdr): Check e_version is EV_CURRENT.
338	(updatenull_wrlock): Check d_version is EV_CURRENT.
339	(elf32_xlatetof): Likewise. And get recsize without version
340	dimension from __elf_xfctstom.
341	(elf32_xlatetom): Likewise.
342	* elf_begin.c (elf_begin): Check __libelf_version is EV_CURRENT.
343	* elf_compress.c (__libelf_reset_rawdata): Set d_version to
344	EV_CURRENT.
345	* elf_getdata.c (shtype_map): Remove version dimension.
346	(__libelf_type_aligns): Likewise.
347	(__libelf_data_type): Use shtype_map without version dimension.
348	(convert_data): Remove unused version argument. Get fp from
349	__elf_xfctstom without version dimensions.
350	(__libelf_set_data_list_rdlock): Call convert_data without version.
351	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Call __elfcfctstom
352	conversion function without version dimensions. Set d_version to
353	EV_CURRENT.
354	* elf_newdata.c (elf_newdata): Set d_version to EV_CURRENT.
355	* elf_version.c (__libelf_version_initialized): Removed.
356	(__libelf_version): Initialized to EV_NONE.
357	(elf_version): Always return EV_CURRENT for EV_NONE version.
358	Only accept (and return) EV_CURRENT as version.
359	* gelf_fsize.c (__libelf_type_sizes): Remove version dimension.
360	(gelf_fsize): Only accept EV_CURRENT as version.
361	Use __libelf_type_sizes without version dimension.
362	* gelf_xlate.c (__elf_xftstom): Remove version dimensions.
363	* libelfP.h (__elf_xfctstom): Defined without version dimensions.
364	(__elf_xfctstof): Likewise.
365	(__libelf_type_sizes): Define without version dimension.
366	(elf_typesize): Define using __libelf_type_sizes without version
367	dimension.
368	(__libelf_version_initialized): Remove definition.
369	(__libelf_version): Add definition.
370	(LIBELF_EV_IDX): Removed define.
371	(__libelf_type_aligns): Remove version dimension.
372	* nlist.c (nlist): Call elf_version unconditionally.
373
3742019-02-19  Mark Wielaard  <[email protected]>
375
376	* elf_compress.c (do_deflate_cleanup): Remove ei_data argument,
377	check cdatap is not NULL before calling free.
378	(deflate_cleanup): Add cdata as argument.
379	(__libelf_compress): Also check whether the d_size is not zero
380	before converting data. Call deflate_cleanup with an extra
381	argument depending on whether there is converted data to free.
382	Always allocate allocate at least one byte for buf_out.
383
3842019-02-14  Mark Wielaard  <[email protected]>
385
386	* elf_begin.c (read_long_names): Make sure ar_size is properly
387	terminated. Sanity check len early if we can.
388
3892019-01-18  Mark Wielaard  <[email protected]>
390
391	* Makefile.am (INSTALL_ELFH): Add elf.h to include_HEADERS when
392	defined, otherwise (the default) add elf.h to noinst_HEADERS.
393
3942019-01-16  Mark Wielaard  <[email protected]>
395
396	* note_xlate.h (elf_cvt_note): Check n_namesz and n_descsz don't
397	overflow note_len into note header.
398
3992018-11-17  Mark Wielaard  <[email protected]>
400
401	* elf32_updatefile.c (updatemmap): Make sure to call convert
402	function on a properly aligned destination.
403
4042018-11-16  Mark Wielaard  <[email protected]>
405
406	* libebl.h (__elf32_msize): Mark with const attribute.
407	(__elf64_msize): Likewise.
408
4092018-11-13  Mark Wielaard  <[email protected]>
410
411	* elf_getdata.c (__libelf_set_rawdata_wrlock): Explicitly set the
412	alignment of SHF_COMPRESSED data to the alignment of ELF_T_CHDR.
413	* elf_compress.c (elf_compress): After compression set sh_addralign
414	to the alignment of ELF_T_CHDR.
415
4162018-11-09  Mark Wielaard  <[email protected]>
417
418	* elf_compress_gnu.c (elf_compress_gnu): Use elf_getdata.
419
4202018-11-12  Mark Wielaard  <[email protected]>
421
422	* elf-knowledge.c (ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX): New define.
423	(NT_GNU_BUILD_ATTRIBUTE_{OPEN,FUNC}): Likewise.
424	(GNU_BUILD_ATTRIBUTE_TYPE_{NUMERIC,STRING,BOOL_TRUE,BOOL_FALSE}):
425	Likewise.
426	(GNU_BUILD_ATTRIBUTE_{VERSION,STACK_PROT,RELRO,STACK_SIZE,TOOL,ABI,
427	PIC,SHORT_ENUM}): Likewise.
428
4292018-11-09  Mark Wielaard  <[email protected]>
430
431	* elf_compress.c (__libelf_reset_rawdata): Make rawdata change
432	explicit by calling __libelf_set_data_list.
433	* elf_getdata.c (convert_data): Don't convert if type is ELF_T_BYTE
434	even if endianness is different.
435
4362018-10-18  Mark Wielaard  <[email protected]>
437
438	* libelf.h (Elf_Type): Add ELF_T_NHDR8.
439	* libelfP.h (__libelf_data_type): Add align argument.
440	(NOTE_ALIGN): Split into...
441	(NOTE_ALIGN4): ... and ...
442	(NOTE_ALIGN8): this.
443	* elf32_xlatetom.c (xlatetom): Recognize both ELF_T_NHDR and
444	ELF_T_NHDR8.
445	* elf_compress.c (elf_compress): Pass zdata_align to
446	__libelf_data_type.
447	* elf_compress_gnu.c (elf_compress_gnu): Pass sh_addralign to
448	__libelf_data_type.
449	* elf_getdata.c (shtype_map): Add ELF_T_NHDR8.
450	(__libelf_data_type): Take align as extra argument, use it to
451	determine Elf_Type.
452	(__libelf_set_rawdata_wrlock): Recognize ELF_T_NHDR8. Pass align to
453	__libelf_data_type.
454	* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_NHDR8.
455	* gelf_getnote.c (gelf_getnote): Use Elf_Type of Elf_Data to calculate
456	padding.
457	* gelf_xlate.c (__elf_xfctstom): Set ELF_T_NHDR to elf_cvt_note4,
458	add ELF_T_NHDR8.
459	* note_xlate.h (elf_cvt_note): Take nhdr8 argument and use it to
460	determine padding.
461	(elf_cvt_note4): New function.
462	(elf_cvt_note8): Likewise.
463
4642018-09-13  Mark Wielaard  <[email protected]>
465
466	* elf32_updatefile.c (updatemmap): Use shnum, not ehdr->e_shnum.
467	* elf_getscn.c (elf_getscn): Create section zero if it is requested,
468	but doesn't exist yet.
469
4702018-09-12  Mark Wielaard  <[email protected]>
471
472	* elf32_updatefile.c (updatemmap): Use memmove, not memcpy.
473	* elf_update.c (write_file): Try to mremap if file needs to be
474	extended.
475
4762018-08-18  Mark Wielaard  <[email protected]>
477
478	* libelf.h (elf_compress_gnu): Add documentation about
479	interaction between SHF_COMPRESED and elf_compress_gnu.
480	* elf_compress_gnu.c (elf_compress_gnu): Return error if section
481	sh_flags has SHF_COMPRESSED set.
482
4832018-07-27  Mark Wielaard  <[email protected]>
484
485	* libelf.h (elf_getshdrstrndx): Fix documentation.
486	(elf_getshstrndx): Likewise.
487
4882018-06-19  Mark Wielaard  <[email protected]>
489
490	* libelfP.h (__libelf_type_align): Remove !ALLOW_UNALIGNED guard.
491	* elf_getdata.c (__libelf_type_aligns): Likewise.
492	(convert_data): Remove ALLOW_UNALIGNED check.
493	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
494
4952018-06-21  Mark Wielaard  <[email protected]>
496
497	* elf.h: Update from glibc.
498
4992018-04-19  Andreas Schwab  <[email protected]>
500
501	* elf.h: Update from glibc.
502
5032018-02-16  Mark Wielaard  <[email protected]>
504
505	* elf.h: Update from glibc.
506
5072018-02-09  Joshua Watt  <[email protected]>
508
509	* elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro
510	instead of comment.
511	* elf_begin.c (read_unmmaped_file): Likewise.
512	(elf_begin): Likewise.
513	* elf_cntl.c (elf_cntl): Likewise.
514
5152017-10-04  Mark Wielaard  <[email protected]>
516
517	* elf_begin.c (file_read_elf): Skip sanity checking e_shoff if scncnt
518	is zero, we won't use it then.
519
5202017-10-04  Mark Wielaard  <[email protected]>
521
522	* libelfP.h: Add ELF_E_INVALID_ELF to error values enum.
523	* elf_error.c (ELF_E_INVALID_ELF_IDX): New define. Use it as value
524	for ELF_E_INVALID_ELF in msgidx.
525	* elf_getshdrstrndx.c (elf_getshdrstrndx): Distinquish between pread
526	failing and not having enough data.
527	* elf_begin.c (get_shnum): Likewise. Explicitly set libelf errno on
528	too large value.
529	(file_read_elf): Make sure to always set libelf errno when returning
530	NULL. Distinquish between i/o file and elf data errors.
531
5322017-08-18  Ulf Hermann  <[email protected]>
533
534	* gelf_xlate.c: Use attribute_packed.
535
5362017-04-27  Ulf Hermann  <[email protected]>
537
538	* libelfP.h: Use attribute_hidden.
539
5402017-04-27  Ulf Hermann  <[email protected]>
541
542	* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
543
5442017-08-15  Mark Wielaard  <[email protected]>
545
546	* elf.h: Update from glibc. Add new powerpc note descriptors.
547
5482017-07-19  Gustavo Romero <[email protected]>
549
550	* elf.h: Add known type in notes segment descriptor for HTM SPRs.
551
5522017-02-17  Ulf hermann  <[email protected]>
553
554	* Makefile.am: Add libelf_so_DEPS, which include libeu.a,
555	libelf_so_LIBS.
556	(libelf_so_LDLIBS): Add $(libelf_so_DEPS).
557	(libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map
558	from the right directory.
559
5602017-04-20  Ulf Hermann  <[email protected]>
561
562	* libelfP.h: Don't include config.h.
563
5642017-04-20  Ulf Hermann  <[email protected]>
565
566	* elf_begin.c: Use F_GETFD rather than F_GETFL.
567
5682017-04-20  Ulf Hermann  <[email protected]>
569
570	* libelf.h: Define macros for various function attributes and use
571	them.
572
5732017-04-20  Ulf Hermann  <[email protected]>
574
575	* elf_update.c: Set ELF_F_MMAPPED flag if we mmap from elf_update.
576
5772017-04-19  Mark Wielaard  <[email protected]>
578
579	* elf_getarsym.c (elf_getarsym): Initialize n to zero.
580
5812017-03-27  Mark Wielaard  <[email protected]>
582
583	* elf32_updatefile.c (updatemmap): Always update last_positition.
584	(updatefile): Likewise.
585
5862017-03-24  Mark Wielaard  <[email protected]>
587
588	* elf_compress.c (__libelf_decompress): Check insane compression
589	ratios before trying to allocate output buffer.
590
5912016-10-11  Akihiko Odaki  <[email protected]>
592	    Mark Wielaard  <[email protected]>
593
594	* gelf.h (gelf_newehdr): Change return type to void *.
595	(gelf_newphdr): Likewise.
596	* gelf_newehdr.c (gelf_newehdr): Likewise.
597	* gelf_newphdr.c (gelf_newphdr): Likewise.
598
5992016-10-21  Mark Wielaard  <[email protected]>
600
601	* elf_getdata.c (__libelf_set_rawdata_wrlock): Sanity check
602	offset and size before trying to malloc and read data.
603
6042016-10-26  Mark Wielaard  <[email protected]>
605
606	* elf_begin.c (read_file): Always set maxsize when parent == NULL.
607
6082016-10-11  Akihiko Odaki  <[email protected]>
609
610	* elf_getarsym.c (elf_getarsym): Open code rawmemchr when not
611	available.
612	* elf_strptr.c: Include stdbool.h.
613	(validate_str): New function.
614	(elf_strptr): Use validate_str instead of memrchr.
615
6162016-10-11  Akihiko Odaki  <[email protected]>
617
618	* elf32_updatefile.c: Remove sys/param.h include.
619	* elf32_updatenull.c: Likewise. Add system.h include.
620	* elf_begin.c: Remove sys/param.h.
621	* elf_compress: Likewise. Add system.h include.
622	(MAX): Remove definition.
623
6242016-08-07  Mark Wielaard  <[email protected]>
625
626	* elf_compress.c (__libelf_reset_rawdata): Check scn->flags and
627	free rawdata_base when malloced. Set ELF_F_MALLOCED for scn->flags.
628	* elf_end.c (elf_end): Check scn->flags and free rawdata_base if
629	malloced.
630	* libelfP.h (struct Elf_Scn): Document flags ELF_F_MALLOCED usage.
631
6322016-07-06  Mark Wielaard  <[email protected]>
633
634	* elf-knowledge.h (SH_FLAGS_COMBINE): Removed.
635	(SH_FLAGS_IMPORTANT): Likewise.
636
6372016-07-06  Mark Wielaard  <[email protected]>
638
639	* elf32_updatenull.c (updatenull_wrlock): Ignore e_type when
640	updating phdrs.
641	* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): Only do sanity
642	checking if phdrs haven't been read in yet.
643
6442016-06-24  John Ogness  <[email protected]>
645
646	* elf32_updatenull.c (updatenull_wrlock): Find first section.
647	* elf_nextscn.c (elf_nextscn): When scn is NULL start from 0th
648	section.
649
6502016-06-28  Richard Henderson  <[email protected]>
651
652	* elf.h: Update from glibc.  Add lots of new EM_* definitions.
653
6542016-04-14  Mark Wielaard  <[email protected]>
655
656	* elf_compress.c (__libelf_compress): Free out_buf if deflateInit
657	fails.
658
6592016-02-13  Mark Wielaard  <[email protected]>
660
661	* elf32_updatefile.c (updatemmap): Free scns when out of memory.
662
6632016-01-28  Mark Wielaard  <[email protected]>
664
665	* elf.h: Update from glibc. Add new i386 and x86_64 relocations.
666
6672016-02-12  Mark Wielaard  <[email protected]>
668
669	* elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
670
6712016-02-04  Mark Wielaard  <[email protected]>
672
673	* elf_getdata.c (__libelf_set_rawdata_wrlock): Don't adjust align
674	for SHT_NOBITS sections.
675
6762016-01-22  Chih-Hung Hsieh <[email protected]>
677
678	* elf_compress.c (__libelf_compress): Move nested function
679	'do_deflate_cleanup' to file scope to compile with clang.
680	* elf_strptr.c (elf_strptr): Move nested function 'get_zdata'
681	to file scope to compile with clang.
682
6832016-01-13  Mark Wielaard  <[email protected]>
684
685	* libelf.h: Check SHF_COMPRESSED is defined. If not define it and the
686	associated ELF compression types/defines.
687
6882015-11-26  Mark Wielaard  <[email protected]>
689
690	* elf_compress.c (__libelf_decompress_elf): New function, extracted
691	from...
692	(elf_compress): here. Check zdata_base use __libelf_decompress_elf.
693	* elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
694	use zdata.
695	* libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
696	(__libelf_decompress_elf): New internal function definition.
697
6982015-10-21  Mark Wielaard  <[email protected]>
699
700	* Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
701	elf_compress_gnu.c.
702	* elf_compress.c: New file.
703	* elf_compress_gnu.c: Likewise.
704	* elf_begin.c (file_read_elf): Make a writable copy of the shdrs
705	for ELF_C_READ_MMAP.
706	* elf_end.c (elf_end): Free zdata_base.
707	* elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
708	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
709	ELF_E_DECOMPRESS_ERROR.
710	* elf_data.c (__libelf_data_type): New internal function extracted
711	from convert_data.
712	(convert_data): Handle SHF_COMPRESSED.
713	* elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
714	uncompressed section data size if SHF_COMPRESSED.
715	* elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
716	ELF_C_READ_MMAP.
717	* libelf.h: Define elf_compress and elf_compress_gnu.
718	* libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
719	* libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
720	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
721	ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
722	(__libelf_compress): New internal function definition.
723	(__libelf_decompress): Likewise.
724	(__libelf_reset_rawdata): Likewise.
725	(__libelf_data_type): Likewise.
726	(struct Elf_Scn): Add zdata_base.
727
7282015-11-19  Mark Wielaard  <[email protected]>
729
730	* Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
731	elf64_getchdr.c and gelf_getchdr.c.
732	(noinst_HEADERS): Add chdr_xlate.h.
733	* abstract.h: Define Chdr32 and Chdr64.
734	* chdr_xlate.h: New file.
735	* elf32_getchdr.c: New file.
736	* elf64_getchdr.c: New file.
737	* elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
738	and ELF_E_INVALID_SECTION_FLAGS.
739	* elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
740	ELF_T_CHDR for SHF_COMPRESSED sections.
741	* exttypes.h: Add Chdr32 and Chdr64.
742	* gelf.h (GElf_Chdr): New typedef.
743	(gelf_getchdr): New function definition.
744	* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
745	* gelf_getchdr.c: New file.
746	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
747	* gelf_xlate.h: Add Chdr.
748	* libelf.h (Elf_Type): Add ELF_T_CHDR.
749	(elf32_getchdr): New function definition.
750	(elf64_getchdr): Likewise.
751	* libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
752	elf64_getchdr and gelf_getchdr.
753	* libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
754	and ELF_E_INVALID_SECTION_FLAGS.
755
7562015-10-16  Mark Wielaard  <[email protected]>
757
758	* Makefile.am (libelf_so_LDLIBS): Add -lz.
759
7602015-10-14  Mark Wielaard  <[email protected]>
761
762	* elf.h: Update from glibc. Add section compression constants and
763	structures.
764
7652015-10-20  Jose E. Marchesi  <[email protected]>
766
767	* elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
768	Fix the size argument to pread_retry.
769
7702015-10-13  Chih-Hung Hsieh  <[email protected]>
771
772	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
773	function 'fill_mmap' to file scope.
774	* elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
775	to file scope.
776
7772015-10-09  Josh Stone  <[email protected]>
778
779	* libelf.h: Replace loff_t with int64_t throughout.
780
7812015-10-05  Mark Wielaard  <[email protected]>
782
783	* elf_update.c (write_file): Only use posix_fallocate when using
784	mmap. Only report failure when errno is ENOSPC.
785
7862015-10-09  Josh Stone  <[email protected]>
787
788	* libelfP.h (struct Elf): Replace off64_t with off_t.
789	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
790
7912015-10-05  Chih-Hung Hsieh <[email protected]>
792
793	* elf_getarsym.c (elf_getarsym): Do not use
794	union of variable length arrays.
795
7962015-10-05  Josh Stone  <[email protected]>
797
798	* Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
799
8002015-09-24  Jose E. Marchesi  <[email protected]>
801
802	* Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
803	relocation overflows in some platforms.
804
8052015-09-29  Mark Wielaard  <[email protected]>
806
807	* elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
808	(updatenull_wrlock): Always set e_shentsize.
809
8102015-09-23  Mark Wielaard  <[email protected]>
811
812	* elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
813	* elf32_getshdr.c (getshdr_rdlock): Likewise.
814	(getshdr_wrlock): Likewise.
815	* elf_error.c (__libelf_seterrno): Likewise.
816	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
817	(__elf_getphdrnum_chk_rdlock): Likewise.
818	* elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
819	(__elf_getphdrnum_chk_rdlock): Likewise.
820	* elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
821	* elf_readall.c (__libelf_readall): Likewise.
822	* gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
823
8242015-09-22  Mark Wielaard  <[email protected]>
825
826	* *.c: Remove old-style function definitions.
827
8282015-06-22  Mark Wielaard  <[email protected]>
829
830	* dl-hash.h: Update from glibc.
831
8322015-06-18  Mark Wielaard  <[email protected]>
833
834	* elf32_updatefile.c (updatefile): Always free shdr_data and scns
835	when allocated on failure paths.
836
8372015-06-18  Mark Wielaard  <[email protected]>
838
839	* nlist.c (nlist): Check symscn shdr exists before use.
840
8412015-06-16  Mark Wielaard  <[email protected]>
842
843	* elf_update.c (write_file): Always also use ftruncate before
844	posix_fallocate to make sure file has the right size.
845
8462015-06-04  Mark Wielaard  <[email protected]>
847
848	* elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
849	ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
850	ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
851	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
852	of rawdata against requested type.
853
8542015-06-02  Mark Wielaard  <[email protected]>
855
856	* elf_getdata.c (convert_data): Make sure source data is properly
857	aligned for type before calling actual conversion function.
858
8592015-06-04  Mark Wielaard  <[email protected]>
860
861	* elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
862	direct access.
863
8642015-06-02  Mark Wielaard  <[email protected]>
865
866	* elf_begin.c (file_read_elf): Split checks for ehdr and shdr
867	alignment, drop phdr alignment check.
868
8692015-05-31  Mark Wielaard  <[email protected]>
870
871	* elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
872	not alloca and free after conversion when a copy needs to be made.
873
8742015-05-31  Mark Wielaard  <[email protected]>
875
876	* elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
877	alloca and free after conversion when a copy needs to be made.
878
8792015-05-31  Mark Wielaard  <[email protected]>
880
881	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
882	malloc, not alloca also in !ALLOW_UNALIGNED case.
883
8842015-05-30  Mark Wielaard  <[email protected]>
885
886	* gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
887
8882015-05-30  Mark Wielaard  <[email protected]>
889
890	* elf32_updatefile.c (updatemmap): Only call mempcpy and update
891	last_position when d_size is non-zero.
892
8932015-05-17  Mark Wielaard  <[email protected]>
894
895	* elf32_updatefile.c (updatefile): Allocate shdr_data and scns
896	with malloc, not alloca. Free after writing section headers.
897
8982015-05-16  Mark Wielaard  <[email protected]>
899
900	* elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
901	with malloc, not alloca. Free after writing section header.
902
9032015-05-16  Mark Wielaard  <[email protected]>
904
905	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
906	malloc, not alloca. Call free after out.
907
9082015-05-14  Mark Wielaard  <[email protected]>
909
910	* elf_update.c (write_file): Use posix_fallocate instead of
911	ftruncate to extend file if necessary.
912
9132015-05-13  Mark Wielaard  <[email protected]>
914
915	* elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
916	e_phoff also to zero.
917
9182015-05-12  Mark Wielaard  <[email protected]>
919
920	* elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
921	is a powerof2.
922	* elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
923	to the elf image offset.
924
9252015-05-12  Mark Wielaard  <[email protected]>
926
927	* elf32_newphdr.c (newphdr): Call __libelf_seterrno with
928	ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
929	actually exists if we need to put extended phnum in section zero.
930
9312015-05-08  Mark Wielaard  <[email protected]>
932
933	* nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
934
9352015-01-03  Mark Wielaard  <[email protected]>
936
937	* version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
938	(elf_cvt_Verneed): Likewise.
939
9402015-03-28  Mark Wielaard  <[email protected]>
941
942	* elf.h: Update from glibc.
943
9442015-03-23  Mark Wielaard  <[email protected]>
945
946	* elf32_updatenull.c (updatenull_wrlock): Don't extend size with
947	SHT_NOBITS sh_offset.
948
9492015-02-18  Mark Wielaard  <[email protected]>
950
951	* libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
952
9532015-02-07  Jan Kratochvil  <[email protected]>
954
955	* elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
956	sh_addralign 0 as 1.
957
9582015-01-22  Mark Wielaard  <[email protected]>
959
960	* elf_strptr (elf_strptr): Make sure returned string is NUL
961	terminated.
962
9632015-01-21  Mark Wielaard  <[email protected]>
964
965	* elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
966	of rawdata_base != NULL before using rawdata directly.
967
9682015-01-20  Mark Wielaard  <[email protected]>
969
970	* libelfP.h (__elf_strptr_internal): New function declaration.
971	* elf_getdata.c (__libelf_set_data_list_rdlock): New internal
972	function extracted from...
973	(__elf_getdata_rdlock): ... here.
974	* elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
975	datalist if necessary.
976
9772015-01-20  Mark Wielaard  <[email protected]>
978
979	* elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
980	necessary.
981
9822014-12-30  Mark Wielaard  <[email protected]>
983
984	* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
985	(elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
986	* gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
987	and always check ndx against phnum.
988	* libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
989
9902014-12-25  Mark Wielaard  <[email protected]>
991
992	* elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
993	negative. Include start_offset in maxsize.
994
9952014-12-28  Alexander Cherepanov  <[email protected]>
996
997	* elf_begin.c (read_long_names): Don't miss '/' right after
998	another '/'. Fixes a dir traversal vuln in ar extraction.
999
10002014-12-18  Ulrich Drepper  <[email protected]>
1001
1002	* Makefile.am: Suppress output of textrel_check command.
1003
10042014-12-16  Mark Wielaard  <[email protected]>
1005
1006	* elf_begin.c (read_long_names): Make sure long_names len fits
1007	in mapped ELF file.
1008
10092014-12-15  Mark Wielaard  <[email protected]>
1010
1011	* elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
1012
10132014-12-15  Mark Wielaard  <[email protected]>
1014
1015	* elf_begin.c (read_long_names): Clear any garbage left in the
1016	name table.
1017
10182014-12-11  Mark Wielaard  <[email protected]>
1019
1020	* elf_begin.c (file_read_elf): Correct ELF64 section offset check.
1021
10222014-12-11  Mark Wielaard  <[email protected]>
1023
1024	* elf_begin.c (read_long_names): Check for offset overflow.
1025	(__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.
1026	Don't allow it to go beyond end of file.
1027
10282014-12-09  Mark Wielaard  <[email protected]>
1029
1030	* elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
1031
10322014-11-27  Mark Wielaard  <[email protected]>
1033
1034	* Makefile.am (libelf.so): Use textrel_check.
1035
10362014-11-23  Mark Wielaard  <[email protected]>
1037
1038	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
1039	overflow check to unsigned.
1040
10412014-11-23  Mark Wielaard  <[email protected]>
1042
1043	* note_xlate.h (elf_cvt_note): Copy over any leftover data if
1044	src != dest. The data is probably part of truncated name/desc.
1045
10462014-11-22  Mark Wielaard  <[email protected]>
1047
1048	* elf_getphdrnum.c (elf_getphdrnum): Sanity check the
1049	__elf_getphdrnum_rdlock result.
1050
10512014-11-18  Mark Wielaard  <[email protected]>
1052
1053	* version_xlate.h (elf_cvt_Verdef): Check for overflow.
1054	(elf_cvt_Verneed): Likewise.
1055
10562014-11-17  Mark Wielaard  <[email protected]>
1057
1058	* elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
1059
10602014-11-16  Mark Wielaard  <[email protected]>
1061
1062	* elf_getshdrstrndx.c: Check there are section headers before
1063	handling SHN_XINDEX.
1064
10652014-11-16  Mark Wielaard  <[email protected]>
1066
1067	* elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
1068	Check for too many pheaders.
1069	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
1070	actually exists before handling PN_XNUM.
1071
10722014-11-16  Mark Wielaard  <[email protected]>
1073
1074	* gelf_getnote.c (gelf_getnote): Check padding overflow.
1075
10762014-11-16  Mark Wielaard  <[email protected]>
1077
1078	* elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
1079	and align as Elf64_Off and Elf64_Xword not size_t.
1080
10812014-11-14  Mark Wielaard  <[email protected]>
1082
1083	* gelf_getnote.c (gelf_getnote): Check offset overflow.
1084
10852014-11-13  Mark Wielaard  <[email protected]>
1086
1087	* elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
1088	check.
1089
10902014-11-08  Mark Wielaard  <[email protected]>
1091
1092	* elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
1093
10942014-11-07  Mark Wielaard  <[email protected]>
1095
1096	* elf_begin.c (file_read_elf): Correct sh_size check.
1097	* elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
1098	overflow.
1099
11002014-09-10  Petr Machata  <[email protected]>
1101
1102	* elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
1103	file is unreadable.
1104
11052014-07-07  Mark Wielaard  <[email protected]>
1106
1107	* elf.h: Update from glibc.
1108
11092014-04-13  Mark Wielaard  <[email protected]>
1110
1111	* Makefile.am: Remove !MUDFLAP conditions.
1112	* elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
1113	defined.
1114	* elf_update.c (write_file): Remove _MUDFLAP condition.
1115
11162014-01-17  Jakub Jelinek  <[email protected]>
1117	    Roland McGrath  <[email protected]>
1118
1119	* libelfP.h (INVALID_NDX): Define.
1120	* gelf_getdyn.c (gelf_getdyn): Use it.  Remove ndx < 0 test if any.
1121	* gelf_getlib.c (gelf_getlib): Likewise.
1122	* gelf_getmove.c (gelf_getmove): Likewise.
1123	* gelf_getrel.c (gelf_getrel): Likewise.
1124	* gelf_getrela.c (gelf_getrela): Likewise.
1125	* gelf_getsym.c (gelf_getsym): Likewise.
1126	* gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
1127	* gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
1128	* gelf_getversym.c (gelf_getversym): Likewise.
1129	* gelf_update_dyn.c (gelf_update_dyn): Likewise.
1130	* gelf_update_lib.c (gelf_update_lib): Likewise.
1131	* gelf_update_move.c (gelf_update_move): Likewise.
1132	* gelf_update_rel.c (gelf_update_rel): Likewise.
1133	* gelf_update_rela.c (gelf_update_rela): Likewise.
1134	* gelf_update_sym.c (gelf_update_sym): Likewise.
1135	* gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
1136	* gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
1137	* gelf_update_versym.c (gelf_update_versym): Likewise.
1138
11392014-01-17  Jakub Jelinek  <[email protected]>
1140
1141	* elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
1142	table fits into object's bounds.
1143	* elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
1144	elf->map_address.  Check if first section header fits into object's
1145	bounds.
1146	* elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
1147	Check if section header table fits into object's bounds.
1148	* elf_begin.c (get_shnum): Ensure section headers fits into
1149	object's bounds.
1150	(file_read_elf): Make sure scncnt is small enough to allocate both
1151	ElfXX_Shdr and Elf_Scn array.  Make sure section and program header
1152	tables fit into object's bounds.  Avoid memory leak on failure.
1153	* elf_newscn.c (elf_newscn): Check for overflow.
1154	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
1155	(__elfw2(LIBELFBITS,updatefile)): Likewise.
1156	* elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
1157	* elf_getarsym.c (elf_getarsym): Likewise.
1158
11592013-11-08  Mark Wielaard  <[email protected]>
1160
1161	* elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
1162	already directly mmapped.
1163
11642013-11-05  Mark Wielaard  <[email protected]>
1165
1166	* elf32_updatefile.c (elfXX_updatefile): Copy all section headers
1167	if elf->flags dirty.
1168
11692013-11-01  Michael Forney  <[email protected]>
1170
1171	* Makefile.am: Use READELF.
1172
11732013-10-01  Petr Machata  <[email protected]>
1174
1175	* elf.h: Update from glibc.
1176
11772013-06-17  Petr Machata  <[email protected]>
1178
1179	* elf.h: Update from glibc.
1180
11812013-08-28  Namhyung Kim  <[email protected]>
1182
1183	* gelf.h (gelf_fsize): Fix typo in comment.
1184
11852013-08-28  Mark Wielaard  <[email protected]>
1186
1187	* gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
1188
11892013-08-27  Mark Wielaard  <[email protected]>
1190
1191	* gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
1192
11932013-08-25  Kurt Roeckx  <[email protected]>
1194
1195	* gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
1196	dereference to avoid alignment problems.
1197
11982013-01-07  Roland McGrath  <[email protected]>
1199
1200	* elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
1201	would be unaligned and !ALLOW_UNALIGNED.
1202
1203	* elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
1204	dereference so as not to assume the field is naturally aligned.
1205
12062012-09-17  Petr Machata  <[email protected]>
1207
1208	* elf.h: Update from glibc.
1209
12102012-08-16  Roland McGrath  <[email protected]>
1211
1212	* elf.h: Update from glibc.
1213
12142012-08-14  Mark Wielaard  <[email protected]>
1215
1216	* elf32_checksum.c (ebl_debugscn_p): Removed unused define and
1217	confusing outdated comment.
1218
12192012-08-01  Petr Machata  <[email protected]>
1220
1221	* elf_getarsym (read_number_entries): New function.
1222	(elf_getarsym): Handle 64-bit symbol table, stored in special
1223	entry named "/SYM64/".
1224	* elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
1225	because it contains 64-bit symbol table.
1226
12272012-07-19  Mark Wielaard  <[email protected]>
1228
1229	* elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
1230	to asserts.
1231
12322012-07-17  Petr Machata  <[email protected]>
1233
1234	* elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
1235	integer number of records in case of ELF_T_NHDR.
1236
12372012-04-02  Mark Wielaard  <[email protected]>
1238
1239	* elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
1240	there are no nonempty sections at that offset.
1241
12422012-03-21  Roland McGrath  <[email protected]>
1243
1244	* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
1245
12462011-02-26  Mark Wielaard  <[email protected]>
1247
1248	* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
1249
12502011-01-05  Jan Kratochvil  <[email protected]>
1251
1252	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
1253	when MAXIMUM_SIZE == ~0.
1254
12552010-08-18  Roland McGrath  <[email protected]>
1256
1257	* gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
1258	and ELF_T_GNUHASH.
1259	Reported by Mark Hatle <[email protected]>.
1260
1261	* exttypes.h: Add cases for ElfNN_Lib.
1262	Reported by Mark Hatle <[email protected]>.
1263
12642010-06-14  Ulrich Drepper  <[email protected]>
1265
1266	* gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
1267	* gelf_update_phdr.c: Likewise.
1268	* gelf_update_ehdr.c: Likewise.
1269
12702010-04-14  Roland McGrath  <[email protected]>
1271
1272	* elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
1273	* elf_begin.c (file_read_elf): Don't set .phdr here.
1274
12752010-04-13  Roland McGrath  <[email protected]>
1276
1277	* elf.h: Update from glibc.
1278
12792010-04-06  Roland McGrath  <[email protected]>
1280
1281	* elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
1282	in error message.
1283
12842010-04-01  Petr Machata  <[email protected]>
1285
1286	* elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
1287	that do not need a conversion.
1288
12892010-03-11  Roland McGrath  <[email protected]>
1290
1291	* elf.h: Update from glibc.
1292
12932010-03-04  Ulrich Drepper  <[email protected]>
1294
1295	* elf.h: Update from glibc.
1296
12972010-02-17  Roland McGrath  <[email protected]>
1298
1299	* elf_begin.c (file_read_elf): Leave section rawdata_base and
1300	data_base pointers null when [sh_offset,sh_size) points outside
1301	the mapped file.
1302
13032010-02-15  Roland McGrath  <[email protected]>
1304
1305	* Makefile.am: Use config/eu.am for common stuff.
1306
13072010-01-07  Roland McGrath  <[email protected]>
1308
1309	* elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
1310	* gelf_getphdr.c: Likewise.
1311	* gelf_update_phdr.c: Likewise.
1312	* elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
1313	* elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
1314	* elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
1315	If COUNT is too large, use store PN_XNUM instead and set sh_info.
1316	* elf_begin.c (file_read_elf): Always allocate space we can use later
1317	for section 0 if doing RDWR.
1318
1319	* elf_getphdrnum.c: New file.
1320	* Makefile.am (libelf_a_SOURCES): Add it.
1321	* libelf.h: Declare elf_getphdrnum.
1322	* libelfP.h: Declare __elf_getphdrnum_rdlock.
1323	* libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
1324
1325	* elf.h: Update from glibc.
1326
13272009-10-23  Lubomir Rintel  <[email protected]>
1328
1329	* elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
1330	filling from section start, not shdr_end.
1331
13322009-11-10  Roland McGrath  <[email protected]>
1333
1334	* elf_readall.c (__libelf_readall): Fetch file size if not yet known.
1335
13362009-11-06  Mark Wielaard  <[email protected]>
1337
1338	* elf_next.c (elf_next): Mark the archive header as unusable when
1339	there is no next ar element.
1340
13412009-08-12  Mark Wielaard  <[email protected]>
1342
1343	* Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
1344
13452009-07-26  Ulrich Drepper  <[email protected]>
1346
1347	* elf.h: Update from glibc.
1348
13492009-07-21  Ulrich Drepper  <[email protected]>
1350
1351	* elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
1352	sections.  Patch by Lubomir Rintel <[email protected]>.
1353
13542009-07-08  Roland McGrath  <[email protected]>
1355
1356	* libelfP.h (struct Elf): Remove unused ar.has_index field.
1357	Reorder various members for optimal packing.
1358
13592009-07-08  Ulrich Drepper  <[email protected]>
1360
1361	* elf.h: Update from glibc.
1362
13632009-06-13  Ulrich Drepper  <[email protected]>
1364
1365	* Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
1366	elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
1367	* elf_getshnum.c: Renamed to...
1368	* elf_getshdrnum.c: ...this.  Rename function and add old name as
1369	alias.  Likewise for internal functions with derived names.
1370	* elf_getshstrndx.c: Renamed to...
1371	* elf_getshdrstrndx.c: ...this.  Rename function and add old name as
1372	alias.  Likewise for internal functions with derived names.
1373	* libelf.h: Add prototypes for new names.  Make old names as
1374	deprecated.
1375	* libelfP.h: Rename internal function prototypes.
1376	* libelf.map: Export for names.
1377	* elf32_checksum.c: Don't use deprecated functions.
1378	* elf32_getshdr.c: Likewise.
1379
13802009-06-01  Ulrich Drepper  <[email protected]>
1381
1382	* elf.h: Update from glibc.
1383
13842009-04-14  Roland McGrath  <[email protected]>
1385
1386	* elf.h: Update from glibc.
1387
13882009-04-01  Roland McGrath  <[email protected]>
1389
1390	* elf.h: Update from glibc.
1391
13922009-02-10  Ulrich Drepper  <[email protected]>
1393
1394	* elf32_updatefile.c (updatefile): For the zeroth section we still
1395	have to copy the section header.
1396
13972009-02-01  Ulrich Drepper  <[email protected]>
1398
1399	* elf_strptr.c: Add comment re possible problem.
1400
14012009-01-26  Ulrich Drepper  <[email protected]>
1402
1403	* elf32_updatenull.c (updatenull_wrlock): Fix comment of
1404	ELF_F_LAYOUT behaviour re section header table.
1405
14062009-01-22  Ulrich Drepper  <[email protected]>
1407
1408	* elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
1409	sections even if only the section at the start of the gap has been
1410	changed.
1411	(__elfXX_updatefile): Likewise.
1412
14132009-01-21  Ulrich Drepper  <[email protected]>
1414
1415	* elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
1416	handle sections for NOBITS sections.
1417	(elfXX_updatefile): Likewise.
1418
1419	* elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
1420	sections we haven't loaded, update last_position based on scn_start,
1421	not based on old value.  Don't run the loop for the dummy section 0.
1422	(elfXX_updatefile): Don't run the loop for the dummy section 0.
1423
14242009-01-10  Ulrich Drepper  <[email protected]>
1425
1426	* libelfP.h (_): We only have one translation domain, elfutils.
1427
1428	* Makefile.am: Use USE_LOCKS instead of USE_TLS.
1429	* elf_error.c: Always use __thread.  Remove all !USE_TLS code.
1430
14312009-01-04  Roland McGrath  <[email protected]>
1432
1433	* note_xlate.h (elf_cvt_note): Don't examine a size too small to
1434	container a note header.
1435
14362008-12-11  Roland McGrath  <[email protected]>
1437
1438	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
1439	placement offset going backwards, for out-of-order or overlapping
1440	(bogus) sh_offset layouts.  It's a dumb use, but should not crash.
1441	(__elfw2(LIBELFBITS,updatefile)): Likewise.
1442	Fixes RHBZ#476136.
1443
1444	* libelf.h (Elf_Data): Whitespace fix.
1445
14462008-12-10  Roland McGrath  <[email protected]>
1447
1448	* elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
1449
14502008-10-22  Petr Machata  <[email protected]>
1451
1452	* elf_rawfile.c (elf_rawfile): Lock around elf-> references.
1453
14542008-10-21  Petr Machata  <[email protected]>
1455
1456	* libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
1457	* elf32_getehdr.c (getehdr_rdlock): Move the code to new function
1458	getehdr_impl and make it a wrapper.  Rename to getehdr_wrlock.
1459	(getehdr_impl): Guard elf->class init with wrlock.
1460	(getehdr): Also make it a wrapper of getehdr_impl.
1461	* elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
1462
14632008-10-20  Petr Machata  <[email protected]>
1464
1465	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
1466	code that reads mutable elf state.  Relock to write lock to chain
1467	the new chunk on the elf rawchunks list.
1468
14692008-10-20  Petr Machata  <[email protected]>
1470
1471	* elf32_checksum.c (checksum): Place a lock around the code that
1472	processes data.  Make it wrlock if the code needs to xlate the
1473	data before processing.
1474
14752008-10-16  Petr Machata  <[email protected]>
1476
1477	* elf_begin.c
1478	(__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
1479	(dup_elf): Adjust the call.
1480	(elf_begin): New local function lock_dup_elf.  Relocks the elf if
1481	necessary before calling dup.  Call this instead of dup_elf.
1482	* elf_getarhdr.c
1483	(elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
1484	* elf_next.c (elf_next): Likewise.
1485	* elf_rand.c (elf_rand): Likewise.
1486
14872008-10-14  Petr Machata  <[email protected]>
1488
1489	* elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
1490
14912008-11-26  Roland McGrath  <[email protected]>
1492
1493	* elf.h: Update from glibc.
1494
14952008-10-06  Roland McGrath  <[email protected]>
1496
1497	* elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
1498
14992008-08-27  Roland McGrath  <[email protected]>
1500
1501	* elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
1502
1503	* libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
1504
15052008-08-25  Roland McGrath  <[email protected]>
1506
1507	* Makefile.am (libelf_so_LDLIBS): New variable.
1508	(libelf.so): Use it in the link.
1509
15102008-08-21  Petr Machata  <[email protected]>
1511
1512	* elf_getdata.c, libelfP.h
1513	(__elf_getdata_internal): Rename to __elf_getdata_rdlock.
1514	(__libelf_set_rawdata_wrlock): New function.
1515	(__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
1516	* elf32_updatenull.c, libelfP.h
1517	(__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
1518
15192008-08-21  Petr Machata  <[email protected]>
1520
1521	* elf32_getphdr.c, libelfP.h
1522	(__elfNN_getphdr_internal): Drop.  Move __elfNN_getphdr_internal
1523	code to __elfNN_getphdr_wrlock.
1524	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
1525	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
1526	wrappers of getphdr_impl.
1527
15282008-08-21  Petr Machata  <[email protected]>
1529
1530	* elf32_getehdr.c, libelfP.h
1531	(__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
1532	* gelf_getehdr, libelfP.h:
1533	(__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
1534
15352008-08-21  Petr Machata  <[email protected]>
1536
1537	* elf32_getshdr.c
1538	(__elfNN_getshdr_internal): Drop.
1539	(load_shdr_wrlock, scn_valid): New functions, contain bits of
1540	behaviour from __elfNN_getshdr_internal.
1541	(__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
1542	dropped _internal functions above.
1543	* elf_getshnum.c
1544	(__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
1545
15462008-08-04  Petr Machata  <[email protected]>
1547
1548	* libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
1549
15502008-07-28  Roland McGrath  <[email protected]>
1551
1552	* elf.h: Update from glibc.
1553
15542008-03-31  Roland McGrath  <[email protected]>
1555
1556	* elf32_offscn.c: Make sure shdrs have been read in.
1557
15582008-02-19  Roland McGrath  <[email protected]>
1559
1560	* elf.h: Update from glibc.
1561
15622008-02-08  Roland McGrath  <[email protected]>
1563
1564	* elf.h: Update from glibc.
1565
15662008-01-31  Ulrich Drepper  <[email protected]>
1567
1568	* elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
1569	under construction and no raw data can be read from disk.
1570
15712008-01-30  Roland McGrath  <[email protected]>
1572
1573	* elf.h: Update from glibc.
1574
15752008-01-26  Roland McGrath  <[email protected]>
1576
1577	* elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
1578	Fixes various pastos in wrong type in sizeof, wrong string parsed.
1579
15802008-01-20  Roland McGrath  <[email protected]>
1581
1582	* elf_getaroff.c: Calculate from start_offset, instead of using
1583	parent's state.ar.offset field.
1584
15852008-01-08  Roland McGrath  <[email protected]>
1586
1587	* Makefile.am (euinclude): Variable removed.
1588	(pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1589
15902008-01-03  Roland McGrath  <[email protected]>
1591
1592	* common.h: Add __attribute__ ((unused)) to static functions.
1593
15942007-12-20  Ulrich Drepper  <[email protected]>
1595
1596	* Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
1597	* libelfP.h (struct Elf_Scn): Add shndx_index field.
1598	Declare __elf_scnshndx_internal.
1599	* elf32_getshdr.c: Record location of extended section header.
1600	* elf_begin.c (file_read_elf): Likewise.
1601	* elf_scnshndx.c: New file.
1602	* libelf.h: Declare elf_scnshndx.
1603	* libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
1604
16052007-11-12  Roland McGrath  <[email protected]>
1606
1607	* libelf.h: Replace off64_t with loff_t throughout.
1608	Only that type name is unconditionally defined by <sys/types.h>
1609
16102007-11-03  Roland McGrath  <[email protected]>
1611
1612	* libelf.h (Elf_Data): Comment fix.
1613
16142007-10-18  Roland McGrath  <[email protected]>
1615
1616	* elf.h: Update from glibc.
1617
16182007-10-07  Roland McGrath  <[email protected]>
1619
1620	* elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
1621	member access in terminating name with no trailing /.  Trim trailing
1622	spaces when there is no /.
1623
16242007-10-04  Roland McGrath  <[email protected]>
1625
1626	* elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
1627
16282007-10-03  Roland McGrath  <[email protected]>
1629
1630	* libelf.h (Elf_Data): Use off64_t for d_off.
1631	(Elf_Arhdr): Use off64_t for ar_size.
1632	(elf_update, elf_getbase, elf_getaroff): Return off64_t.
1633
1634	* gelf_rawchunk.c: File removed.
1635	* gelf_freechunk.c: File removed.
1636	* Makefile.am (libelf_a_SOURCES): Remove them.
1637	* libelf.map (ELFUTILS_1.0): Remove exports.
1638	* gelf.h: Remove decls.
1639
1640	* elf_getdata_rawchunk.c: New file.
1641	* Makefile.am (libelf_a_SOURCES): Add it.
1642	* libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
1643	* libelf.h: Declare it.
1644	* libelfP.h (Elf_Data_Chunk): New type.
1645	(struct Elf.elf): New member `rawchunks'.
1646	* elf_end.c (elf_end): Free recorded rawchunk buffers.
1647
16482007-08-24  Roland McGrath  <[email protected]>
1649
1650	* gelf_getnote.c: New file.
1651	* Makefile.am (libelf_a_SOURCES): Add it.
1652	* gelf.h: Declare gelf_getnote.
1653	* libelf.map (ELFUTILS_1.3): Add gelf_getnote.
1654
1655	* libelfP.h (NOTE_ALIGN): New macro.
1656	* note_xlate.h: New file.
1657	* Makefile.am (noinst_HEADERS): Add it.
1658	* gelf_xlate.c: Include it.
1659	(__elf_xfctstom): Use elf_cvt_note.
1660	* elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
1661	(__libelf_set_rawdata): Likewise.
1662
16632007-08-19  Roland McGrath  <[email protected]>
1664
1665	* gelf_update_auxv.c: New file.
1666	* gelf_getauxv.c: New file.
1667	* Makefile.am (libelf_a_SOURCES): Add them.
1668	* gelf.h: Declare gelf_getauxv, gelf_update_auxv.
1669	* libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
1670	Export gelf_getauxv, gelf_update_auxv.
1671
1672	* libelf.h (Elf_Type): Add ELF_T_AUXV.
1673	* abstract.h: Add auxv_t entries.
1674	* exttypes.h: Likewise.
1675	* gelf_xlate.h: Likewise.
1676	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
1677	* gelf_fsize.c (__libelf_type_sizes): Likewise.
1678
16792007-08-12  Roland McGrath  <[email protected]>
1680
1681	* elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
1682	and only tertiarily on index.
1683
16842007-07-09  Roland McGrath  <[email protected]>
1685
1686	* elf.h: Update from glibc.
1687
16882007-04-22  Roland McGrath  <[email protected]>
1689
1690	* elf.h: Update from glibc.
1691
16922007-03-18  Roland McGrath  <[email protected]>
1693
1694	* elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
1695	Return zero when the section headers do not fit within MAXSIZE.
1696
16972007-03-09  Roland McGrath  <[email protected]>
1698
1699	* libelfP.h (LIBELF_EV_IDX): New macro.
1700	(__libelf_type_align): New macro.
1701	[! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
1702	* elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
1703	(convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
1704	and __libelf_type_sizes, in place of old table.
1705	(__libc_type_aligns): New const variable.
1706
17072007-02-04  Ulrich Drepper  <[email protected]>
1708
1709	* Makefile (libelf.so): Build with -z relro.
1710
1711	* elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1712
17132007-01-30  Ulrich Drepper  <[email protected]>
1714
1715	* nlist.c: Close file descriptor before returning.
1716
17172007-01-20  Roland McGrath  <[email protected]>
1718
1719	* gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1720	convert the final word.
1721
1722	* elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1723	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1724
17252007-01-18  Roland McGrath  <[email protected]>
1726
1727	* gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1728	it on read error.
1729
17302006-10-13  Roland McGrath  <[email protected]>
1731
1732	* elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1733	* elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1734
17352006-08-29  Roland McGrath  <[email protected]>
1736
1737	* elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
1738	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1739	Reported by Christian Aichinger <[email protected]>.
1740
1741	* Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1742
17432006-08-08  Ulrich Drepper  <[email protected]>
1744
1745	* elf.h (DT_VALNUM): Update.
1746	(DT_ADDRNUM): Likewise.
1747
17482006-07-12  Ulrich Drepper  <[email protected]>
1749
1750	* elf32_updatefile.c: Adjust for internal_function_def removal.
1751	* elf32_updatenull.c: Likewise.
1752	* elf_begin.c: Likewise.
1753	* elf_getdata.c: Likewise.
1754
17552006-07-11  Ulrich Drepper  <[email protected]>
1756
1757	* libelf.h: Define ELF_T_GNUHASH.
1758	* elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
1759	(shtype_map): Add SHT_GNU_HASH entries.
1760	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
1761	* gnuhash_xlate.h: New file.
1762	* Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
1763
17642006-07-06  Ulrich Drepper  <[email protected]>
1765
1766	* elf_gnu_hash.c: New file.
1767	* libelf.h: Declare elf_gnu_hash.
1768	* Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
1769	* libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
1770
17712006-06-15  Roland McGrath  <[email protected]>
1772
1773	* libelf.h (elf_getarsym): Fix comment typo.
1774	Rename second parameter to be more explanatory.
1775	(elf_getident, elf_rawhide): Likewise.
1776
17772006-05-28  Ulrich Drepper  <[email protected]>
1778
1779	* elf32_updatefile.c (updatemmap): Preserve section content if
1780	copying would overwrite them.
1781	Fix msync paramters.
1782
17832006-04-04  Roland McGrath  <[email protected]>
1784
1785	* elf32_updatefile.c (updatemmap): Handle other-endian case.
1786
17872006-04-04  Ulrich Drepper  <[email protected]>
1788
1789	* elf32_updatefile.c (updatemmap): Cleanups.  Remove shdr_dest
1790	variable.  Before writing sections, make a copy of the section
1791	header data if necessary.  Don't write section header while
1792	writing the section constent, it might overwrite some sections.
1793	Restore the pointer afterwards.
1794	* elf32_updatenull.c (updatenull): If the offset of a section in a
1795	file changed make sure we read the section so that it'll be written
1796	out.
1797
1798	* elf_update.c: Remove debug message.
1799
18002005-12-07  Roland McGrath  <[email protected]>
1801
1802	* gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1803	(FETCH, STORE): New macros.
1804	(INLINE3): Use those to do alignment-friendly conversion.
1805
1806	* elf32_getshdr.c: Include map_address and start_offset in alignment
1807	calculations.
1808	* elf32_getphdr.c: Likewise.
1809
18102005-11-19  Roland McGrath  <[email protected]>
1811
1812	* elf.h: Update from glibc.
1813
18142005-11-17  Roland McGrath  <[email protected]>
1815
1816	* elf.h: Update from glibc.
1817
18182005-11-10  Roland McGrath  <[email protected]>
1819
1820	* elf.h: Update from glibc.
1821
18222005-09-09  Roland McGrath  <[email protected]>
1823
1824	* elf_update.c (write_file): Stat the file and fchmod it after update
1825	if its mode had S_ISUID or S_ISGID bits set.
1826
18272005-08-28  Ulrich Drepper  <[email protected]>
1828
1829	* elf32_getphdr.c: Include <system.h>.  Use pread_retry instead of
1830	pread.  And branch prediction where useful.
1831	* elf_begin.c: Likewise.
1832	* elf_getdata.c: Likewise.
1833	* elf_getshstrndx.c: Likewise.
1834	* elf_readall.c: Likewise.
1835	* gelf_rawchunk.c: Likewise.
1836	* elf32_updatefile.c: Include <system.h>.  Use pread_retry instead of
1837	pread.  And branch prediction where useful.
1838	* elf_getarsym.c: Don't define pread_retry here.
1839
1840	* Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1841	(%.os): Use COMPILE.os.
1842	(COMPILE.os): Filter out gconv options.
1843
18442005-08-27  Ulrich Drepper  <[email protected]>
1845
1846	* elf_begin.c (file_read_elf): Avoid reading ELF header from file
1847	again.  Instead accept additional parameter which points to it if we
1848	don't use mmap.
1849	(get_shnum): Use passed in e_ident value as source of ELF header.
1850
18512005-08-15  Ulrich Drepper  <[email protected]>
1852
1853	* elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
1854
1855	* Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
1856	* libelf.map: Export elf_getaroff.
1857	* libelf.h: Declare elf_getaroff.
1858	* elf_getaroff.c: New file.
1859
18602005-08-13  Ulrich Drepper  <[email protected]>
1861
1862	* elf_begin.c (get_shnum): Optimize memory handling.  Always read from
1863	mapped file if available.  Fix access to 64-bit sh_size.  Recognize
1864	overflow.
1865	(file_read_elf): Likewise.
1866
18672005-08-12  Roland McGrath  <[email protected]>
1868
1869	* elf32_offscn.c: Do not match empty sections at OFFSET unless
1870	there are no nonempty sections at that offset.
1871
18722005-08-07  Ulrich Drepper  <[email protected]>
1873
1874	* elf.h: Update from glibc.
1875
18762005-08-06  Ulrich Drepper  <[email protected]>
1877
1878	* Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1879
18802005-08-03  Ulrich Drepper  <[email protected]>
1881
1882	* libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1883	new version ELFUTILS_1.1.1.
1884
18852005-08-02  Ulrich Drepper  <[email protected]>
1886
1887	* elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
1888	* elf32_offscn.c: New file.
1889	* elf64_offscn.c: New file.
1890	* gelf_offscn.c: New file.
1891	* Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
1892	and gelf_offscn.c.
1893	* libelf.sym: Export new symbols.
1894
18952005-07-23  Ulrich Drepper  <[email protected]>
1896
1897	* elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
1898	sections here anymore.
1899	* elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
1900
1901	* elf_update.c (elf_update): Get write lock, not read lock.
1902
1903	* elf32_updatenull.c (updatenull): Get section headers if necessary
1904	and possible.
1905
19062005-07-22  Ulrich Drepper  <[email protected]>
1907
1908	* elf32_updatenull.c (updatenull): If program header hasn't been loaded
1909	yet, try to do it now.
1910	Don't unnecessarily update overflow of section count in zeroth section
1911	sh_size field.
1912	If section content hasn't been read yet, do it before looking for the
1913	block size.  If no section data present, infer size of section header.
1914
19152005-05-11  Ulrich Drepper  <[email protected]>
1916
1917	* elf.h: Update again.
1918
19192005-05-09  Ulrich Drepper  <[email protected]>
1920
1921	* elf.h: Update from glibc.
1922
19232005-05-08  Roland McGrath  <[email protected]>
1924
1925	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1926	* elf_update.c (write_file) [_MUDFLAP]: Likewise.
1927
19282005-03-29  Ulrich Drepper  <[email protected]>
1929
1930	* elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
1931	* elf_end.c: Likewise.
1932	* elf_getdata.c: Likewise.
1933	* gelf_getehdr.c: Likewise.
1934	* nlist.c: Likewise.
1935	* libelfP.h: Add declarations of internal functions.
1936
19372005-02-15  Ulrich Drepper  <[email protected]>
1938
1939	* common.h (CONVERT): Make sure all values are unsigned.
1940	(CONVERT_TO): Likewise.
1941
1942	* Makefile.am (AM_CFLAGS): Add -Wformat=2.
1943	Fix rule to build libelf.so.
1944
19452005-02-06  Ulrich Drepper  <[email protected]>
1946
1947	* Makefile.am: Cleanup AM_CFLAGS handling.  Add -Wunused -Wextra.
1948	Remove lint handling.
1949	* elf32_getphdr.c: Minor cleanups.
1950	* elf32_getshdr.c: Likewise.
1951	* elf32_updatefile.c: Likewise.
1952	* elf32_updatenull.c: Likewise.
1953	* elf_begin.c: Likewise.
1954	* elf_error.c: Likewise.
1955	* elf_getarsym.c: Likewise.
1956	* elf_getdata.c: Likewise.
1957	* elf_update.c: Likewise.
1958	* gelf_xlate.c: Likewise.
1959
19602005-02-05  Ulrich Drepper  <[email protected]>
1961
1962	* Makefile.am: Check for text relocations in constructed DSO.
1963
1964	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1965
19662005-02-04  Ulrich Drepper  <[email protected]>
1967
1968	* gelf_getehdr.c (gelf_getehdr): Slight optimization.
1969
1970	* elf32_checksum.c (checksum): Do not look at NOBITS sections.
1971
1972	* gelf.h: Add gelf_checksum prototype.
1973
19742004-09-25  Ulrich Drepper  <[email protected]>
1975
1976	* elf32_checksum.c: Make compile with gcc 4.0.
1977	* elf32_updatefile.c: Likewise.
1978	* elf32_updatenull.c: Likewise.
1979	* elf_begin.c: Likewise.
1980	* elf_error.c: Likewise.
1981	* elf_getdata.c: Likewise.
1982	* elf_getident.c: Likewise.
1983
19842004-04-01  Ulrich Drepper  <[email protected]>
1985
1986	* elf.h: Update from glibc.
1987
19882004-01-23  Ulrich Drepper  <[email protected]>
1989
1990	* elf_update.c: Fix locking.
1991	* elf_clone.c: Likewise.
1992
1993	* libelf.h: Define ELF_T_LIB.
1994	* gelf_getlib.c: New file.
1995	* gelf_update_lib.c: New file.
1996	* gelf.h: Declare the new functions.  Define GElf_Lib.
1997	* abstract.h: Define Lib, Lib32, Lib64.
1998	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
1999	* gelf_xlate.h: Add entry for ElfXX_Lib.
2000	* elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
2001	* libelf.map: Add new symbols to ELFUTILS_1.1.
2002	* Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
2003	gelf_update_lib.c.
2004
20052004-01-17  Ulrich Drepper  <[email protected]>
2006
2007	* Makefile.am: Support building with mudflap.
2008
2009	* gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
2010	* dl-hash.h (_dl_elf_hash): Likewise.
2011
20122004-01-05  Ulrich Drepper  <[email protected]>
2013
2014	* elf-knowledge.h: New file.  From libelf subdir.
2015	* Makefile.am (euincludedir): Define.
2016	(euinclude_HEADERS): Add elf-knowledge.h.
2017
20182003-09-24  Ulrich Drepper  <[email protected]>
2019
2020	* elf.h: Define some PT_IA_64_HP_* constants.
2021
20222003-09-23  Jakub Jelinek  <[email protected]>
2023
2024	* libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
2025	state.elf64.scnincr to match state.elf{,32}.
2026
20272003-08-12  Ulrich Drepper  <[email protected]>
2028
2029	* elf32_updatefile.c (__updatemmap): When writing back file where
2030	some sections have not been read in, count their sizes based on
2031	the section header.
2032
20332003-08-11  Ulrich Drepper  <[email protected]>
2034
2035	* Moved to CVS archive.
2036