• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12019-06-18  Mark Wielaard  <mark@klomp.org>
2
3	* common.h (allocate_elf): Use int64_t instead of off_t for offset.
4	* elf32_newphdr.c (newphdr): Document why Elf32/64_Word is correct.
5	* elf32_updatefile.c (fill): Use int64_t instead of off_t for pos.
6	(updatefile): Define last_offset, shdr_offset and scn_start as
7	int64_t instead of off_t.
8	* elf32_updatenull.c: Define Elf32_SizeWord and Elf64_SizeWord.
9	(updatenull_wrlock): Return int64_t instead of off_t. Define size,
10	sh_entsize, sh_align and sh_size as SizeWords. Define offset as
11	int64_t.  Cast data->d_off to SizeWord instead of GElf_Word. Drop
12	size GElf_Word cast. Cast offset to SizeWord instead of GElf_Word
13	when comparing with sh_size.
14	* elf_begin.c (get_shnum): Define offset as int64_t instead of
15	off_t. Document why use GElf_Word is correct.
16	(file_read_elf): Define offset as int64_t instead of off_t.
17	(__libelf_read_mmaped_file): Likewise.
18	(read_unmmaped_file): Likewise.
19	(read_file): Likewise.
20	* elf_getaroff.c (elf_getaroff): Return int64_t.
21	* elf_getbase.c (elf_getbase): Likewise.
22	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Define offset as
23	int64_t instead of off_t.
24	* elf_update.c (write_file): Return int64_t instead of off_t,
25	define size as int64_t instead of off_t.
26	(elf_update): Likewise.
27	* libelfP.h (struct Elf): Define start_offset, sizestr_offset and
28	offset as int64_t.
29	(__libelf_read_mmaped_file): Define offset as int64_t.
30	(__elf32_updatenull_wrlock): Return int64_t.
31	(__elf64_updatenull_wrlock): Return int64_t.
32
332019-05-12  Mark Wielaard  <mark@klomp.org>
34
35	* elf32_updatenull.c (updatenull_wrlock): Mark shdr_flags dirty if
36	either offset or size changed.
37
382019-05-01  Mark Wielaard  <mark@klomp.org>
39
40	* gelf_getnote.c (gelf_getnote): Check n_namesz doesn't overflow
41	offset.
42
432019-04-30  Mark Wielaard  <mark@klomp.org>
44
45	* note_xlate.h (elf_cvt_note): Indicate we only translated the note
46	header if we ran out of data by updating len, src and dest.
47
482019-04-01  Mao Han  <han_mao@c-sky.com>
49
50	* elf.h: Update from glibc.
51
522019-03-07  Mark Wielaard  <mark@klomp.org>
53
54	* elf32_updatefile.c (updatemmap): Use posix_memalign instead of
55	aligned_alloc.
56
572019-03-06  Mark Wielaard  <mark@klomp.org>
58
59	* elf32_updatefile.c (updatemmap): Free scns before returning
60	allocation failure.
61
622019-02-24  Mark Wielaard  <mark@klomp.org>
63
64	* gelf_xlate.c (__elf_xfctstof): Remove alias.
65	* libelfP.h (__elf_xfctstof): Remove definition.
66
672019-02-24  Mark Wielaard  <mark@klomp.org>
68
69	* elf32_fsize.c (local_strong_alias): Remove definition.
70	(msize): Remove alias.
71	* libelfP.h (__elf32_msize): Remove definition.
72	(__elf64_msize): Likewise.
73
742019-02-21  Mark Wielaard  <mark@klomp.org>
75
76	* common.h (determine_kind): Only accept EV_CURRENT.
77	* elf32_fsize.c (fsize): Just check version is EV_CURRENT.
78	Use __libelf_type_size without version dimension.
79	* elf32_updatefile.c (updatemmap): Define fctp from __elf_xfctstom
80	without version dimension.
81	(updatefile): Likewise.
82	* elf32_updatenull.c (default_ehdr): Check e_version is EV_CURRENT.
83	(updatenull_wrlock): Check d_version is EV_CURRENT.
84	(elf32_xlatetof): Likewise. And get recsize without version
85	dimension from __elf_xfctstom.
86	(elf32_xlatetom): Likewise.
87	* elf_begin.c (elf_begin): Check __libelf_version is EV_CURRENT.
88	* elf_compress.c (__libelf_reset_rawdata): Set d_version to
89	EV_CURRENT.
90	* elf_getdata.c (shtype_map): Remove version dimension.
91	(__libelf_type_aligns): Likewise.
92	(__libelf_data_type): Use shtype_map without version dimension.
93	(convert_data): Remove unused version argument. Get fp from
94	__elf_xfctstom without version dimensions.
95	(__libelf_set_data_list_rdlock): Call convert_data without version.
96	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Call __elfcfctstom
97	conversion function without version dimensions. Set d_version to
98	EV_CURRENT.
99	* elf_newdata.c (elf_newdata): Set d_version to EV_CURRENT.
100	* elf_version.c (__libelf_version_initialized): Removed.
101	(__libelf_version): Initialized to EV_NONE.
102	(elf_version): Always return EV_CURRENT for EV_NONE version.
103	Only accept (and return) EV_CURRENT as version.
104	* gelf_fsize.c (__libelf_type_sizes): Remove version dimension.
105	(gelf_fsize): Only accept EV_CURRENT as version.
106	Use __libelf_type_sizes without version dimension.
107	* gelf_xlate.c (__elf_xftstom): Remove version dimensions.
108	* libelfP.h (__elf_xfctstom): Defined without version dimensions.
109	(__elf_xfctstof): Likewise.
110	(__libelf_type_sizes): Define without version dimension.
111	(elf_typesize): Define using __libelf_type_sizes without version
112	dimension.
113	(__libelf_version_initialized): Remove definition.
114	(__libelf_version): Add definition.
115	(LIBELF_EV_IDX): Removed define.
116	(__libelf_type_aligns): Remove version dimension.
117	* nlist.c (nlist): Call elf_version unconditionally.
118
1192019-02-19  Mark Wielaard  <mark@klomp.org>
120
121	* elf_compress.c (do_deflate_cleanup): Remove ei_data argument,
122	check cdatap is not NULL before calling free.
123	(deflate_cleanup): Add cdata as argument.
124	(__libelf_compress): Also check whether the d_size is not zero
125	before converting data. Call deflate_cleanup with an extra
126	argument depending on whether there is converted data to free.
127	Always allocate allocate at least one byte for buf_out.
128
1292019-02-14  Mark Wielaard  <mark@klomp.org>
130
131	* elf_begin.c (read_long_names): Make sure ar_size is properly
132	terminated. Sanity check len early if we can.
133
1342019-01-18  Mark Wielaard  <mark@klomp.org>
135
136	* Makefile.am (INSTALL_ELFH): Add elf.h to include_HEADERS when
137	defined, otherwise (the default) add elf.h to noinst_HEADERS.
138
1392019-01-16  Mark Wielaard  <mark@klomp.org>
140
141	* note_xlate.h (elf_cvt_note): Check n_namesz and n_descsz don't
142	overflow note_len into note header.
143
1442018-11-17  Mark Wielaard  <mark@klomp.org>
145
146	* elf32_updatefile.c (updatemmap): Make sure to call convert
147	function on a properly aligned destination.
148
1492018-11-16  Mark Wielaard  <mark@klomp.org>
150
151	* libebl.h (__elf32_msize): Mark with const attribute.
152	(__elf64_msize): Likewise.
153
1542018-11-13  Mark Wielaard  <mark@klomp.org>
155
156	* elf_getdata.c (__libelf_set_rawdata_wrlock): Explicitly set the
157	alignment of SHF_COMPRESSED data to the alignment of ELF_T_CHDR.
158	* elf_compress.c (elf_compress): After compression set sh_addralign
159	to the alignment of ELF_T_CHDR.
160
1612018-11-09  Mark Wielaard  <mark@klomp.org>
162
163	* elf_compress_gnu.c (elf_compress_gnu): Use elf_getdata.
164
1652018-11-12  Mark Wielaard  <mark@klomp.org>
166
167	* elf-knowledge.c (ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX): New define.
168	(NT_GNU_BUILD_ATTRIBUTE_{OPEN,FUNC}): Likewise.
169	(GNU_BUILD_ATTRIBUTE_TYPE_{NUMERIC,STRING,BOOL_TRUE,BOOL_FALSE}):
170	Likewise.
171	(GNU_BUILD_ATTRIBUTE_{VERSION,STACK_PROT,RELRO,STACK_SIZE,TOOL,ABI,
172	PIC,SHORT_ENUM}): Likewise.
173
1742018-11-09  Mark Wielaard  <mark@klomp.org>
175
176	* elf_compress.c (__libelf_reset_rawdata): Make rawdata change
177	explicit by calling __libelf_set_data_list.
178	* elf_getdata.c (convert_data): Don't convert if type is ELF_T_BYTE
179	even if endianness is different.
180
1812018-10-18  Mark Wielaard  <mark@klomp.org>
182
183	* libelf.h (Elf_Type): Add ELF_T_NHDR8.
184	* libelfP.h (__libelf_data_type): Add align argument.
185	(NOTE_ALIGN): Split into...
186	(NOTE_ALIGN4): ... and ...
187	(NOTE_ALIGN8): this.
188	* elf32_xlatetom.c (xlatetom): Recognize both ELF_T_NHDR and
189	ELF_T_NHDR8.
190	* elf_compress.c (elf_compress): Pass zdata_align to
191	__libelf_data_type.
192	* elf_compress_gnu.c (elf_compress_gnu): Pass sh_addralign to
193	__libelf_data_type.
194	* elf_getdata.c (shtype_map): Add ELF_T_NHDR8.
195	(__libelf_data_type): Take align as extra argument, use it to
196	determine Elf_Type.
197	(__libelf_set_rawdata_wrlock): Recognize ELF_T_NHDR8. Pass align to
198	__libelf_data_type.
199	* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_NHDR8.
200	* gelf_getnote.c (gelf_getnote): Use Elf_Type of Elf_Data to calculate
201	padding.
202	* gelf_xlate.c (__elf_xfctstom): Set ELF_T_NHDR to elf_cvt_note4,
203	add ELF_T_NHDR8.
204	* note_xlate.h (elf_cvt_note): Take nhdr8 argument and use it to
205	determine padding.
206	(elf_cvt_note4): New function.
207	(elf_cvt_note8): Likewise.
208
2092018-09-13  Mark Wielaard  <mark@klomp.org>
210
211	* elf32_updatefile.c (updatemmap): Use shnum, not ehdr->e_shnum.
212	* elf_getscn.c (elf_getscn): Create section zero if it is requested,
213	but doesn't exist yet.
214
2152018-09-12  Mark Wielaard  <mark@klomp.org>
216
217	* elf32_updatefile.c (updatemmap): Use memmove, not memcpy.
218	* elf_update.c (write_file): Try to mremap if file needs to be
219	extended.
220
2212018-08-18  Mark Wielaard  <mark@klomp.org>
222
223	* libelf.h (elf_compress_gnu): Add documentation about
224	interaction between SHF_COMPRESED and elf_compress_gnu.
225	* elf_compress_gnu.c (elf_compress_gnu): Return error if section
226	sh_flags has SHF_COMPRESSED set.
227
2282018-07-27  Mark Wielaard  <mark@klomp.org>
229
230	* libelf.h (elf_getshdrstrndx): Fix documentation.
231	(elf_getshstrndx): Likewise.
232
2332018-06-19  Mark Wielaard  <mark@klomp.org>
234
235	* libelfP.h (__libelf_type_align): Remove !ALLOW_UNALIGNED guard.
236	* elf_getdata.c (__libelf_type_aligns): Likewise.
237	(convert_data): Remove ALLOW_UNALIGNED check.
238	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
239
2402018-06-21  Mark Wielaard  <mark@klomp.org>
241
242	* elf.h: Update from glibc.
243
2442018-04-19  Andreas Schwab  <schwab@suse.de>
245
246	* elf.h: Update from glibc.
247
2482018-02-16  Mark Wielaard  <mark@klomp.org>
249
250	* elf.h: Update from glibc.
251
2522018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
253
254	* elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro
255	instead of comment.
256	* elf_begin.c (read_unmmaped_file): Likewise.
257	(elf_begin): Likewise.
258	* elf_cntl.c (elf_cntl): Likewise.
259
2602017-10-04  Mark Wielaard  <mark@klomp.org>
261
262	* elf_begin.c (file_read_elf): Skip sanity checking e_shoff if scncnt
263	is zero, we won't use it then.
264
2652017-10-04  Mark Wielaard  <mark@klomp.org>
266
267	* libelfP.h: Add ELF_E_INVALID_ELF to error values enum.
268	* elf_error.c (ELF_E_INVALID_ELF_IDX): New define. Use it as value
269	for ELF_E_INVALID_ELF in msgidx.
270	* elf_getshdrstrndx.c (elf_getshdrstrndx): Distinquish between pread
271	failing and not having enough data.
272	* elf_begin.c (get_shnum): Likewise. Explicitly set libelf errno on
273	too large value.
274	(file_read_elf): Make sure to always set libelf errno when returning
275	NULL. Distinquish between i/o file and elf data errors.
276
2772017-08-18  Ulf Hermann  <ulf.hermann@qt.io>
278
279	* gelf_xlate.c: Use attribute_packed.
280
2812017-04-27  Ulf Hermann  <ulf.hermann@qt.io>
282
283	* libelfP.h: Use attribute_hidden.
284
2852017-04-27  Ulf Hermann  <ulf.hermann@qt.io>
286
287	* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
288
2892017-08-15  Mark Wielaard  <mark@klomp.org>
290
291	* elf.h: Update from glibc. Add new powerpc note descriptors.
292
2932017-07-19  Gustavo Romero <gromero@linux.vnet.ibm.com>
294
295	* elf.h: Add known type in notes segment descriptor for HTM SPRs.
296
2972017-02-17  Ulf hermann  <ulf.hermann@qt.io>
298
299	* Makefile.am: Add libelf_so_DEPS, which include libeu.a,
300	libelf_so_LIBS.
301	(libelf_so_LDLIBS): Add $(libelf_so_DEPS).
302	(libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map
303	from the right directory.
304
3052017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
306
307	* libelfP.h: Don't include config.h.
308
3092017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
310
311	* elf_begin.c: Use F_GETFD rather than F_GETFL.
312
3132017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
314
315	* libelf.h: Define macros for various function attributes and use
316	them.
317
3182017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
319
320	* elf_update.c: Set ELF_F_MMAPPED flag if we mmap from elf_update.
321
3222017-04-19  Mark Wielaard  <mark@klomp.org>
323
324	* elf_getarsym.c (elf_getarsym): Initialize n to zero.
325
3262017-03-27  Mark Wielaard  <mark@klomp.org>
327
328	* elf32_updatefile.c (updatemmap): Always update last_positition.
329	(updatefile): Likewise.
330
3312017-03-24  Mark Wielaard  <mark@klomp.org>
332
333	* elf_compress.c (__libelf_decompress): Check insane compression
334	ratios before trying to allocate output buffer.
335
3362016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
337	    Mark Wielaard  <mjw@redhat.com>
338
339	* gelf.h (gelf_newehdr): Change return type to void *.
340	(gelf_newphdr): Likewise.
341	* gelf_newehdr.c (gelf_newehdr): Likewise.
342	* gelf_newphdr.c (gelf_newphdr): Likewise.
343
3442016-10-21  Mark Wielaard  <mjw@redhat.com>
345
346	* elf_getdata.c (__libelf_set_rawdata_wrlock): Sanity check
347	offset and size before trying to malloc and read data.
348
3492016-10-26  Mark Wielaard  <mjw@redhat.com>
350
351	* elf_begin.c (read_file): Always set maxsize when parent == NULL.
352
3532016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
354
355	* elf_getarsym.c (elf_getarsym): Open code rawmemchr when not
356	available.
357	* elf_strptr.c: Include stdbool.h.
358	(validate_str): New function.
359	(elf_strptr): Use validate_str instead of memrchr.
360
3612016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
362
363	* elf32_updatefile.c: Remove sys/param.h include.
364	* elf32_updatenull.c: Likewise. Add system.h include.
365	* elf_begin.c: Remove sys/param.h.
366	* elf_compress: Likewise. Add system.h include.
367	(MAX): Remove definition.
368
3692016-08-07  Mark Wielaard  <mjw@redhat.com>
370
371	* elf_compress.c (__libelf_reset_rawdata): Check scn->flags and
372	free rawdata_base when malloced. Set ELF_F_MALLOCED for scn->flags.
373	* elf_end.c (elf_end): Check scn->flags and free rawdata_base if
374	malloced.
375	* libelfP.h (struct Elf_Scn): Document flags ELF_F_MALLOCED usage.
376
3772016-07-06  Mark Wielaard  <mjw@redhat.com>
378
379	* elf-knowledge.h (SH_FLAGS_COMBINE): Removed.
380	(SH_FLAGS_IMPORTANT): Likewise.
381
3822016-07-06  Mark Wielaard  <mjw@redhat.com>
383
384	* elf32_updatenull.c (updatenull_wrlock): Ignore e_type when
385	updating phdrs.
386	* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): Only do sanity
387	checking if phdrs haven't been read in yet.
388
3892016-06-24  John Ogness  <john.ogness@linutronix.de>
390
391	* elf32_updatenull.c (updatenull_wrlock): Find first section.
392	* elf_nextscn.c (elf_nextscn): When scn is NULL start from 0th
393	section.
394
3952016-06-28  Richard Henderson  <rth@redhat.com>
396
397	* elf.h: Update from glibc.  Add lots of new EM_* definitions.
398
3992016-04-14  Mark Wielaard  <mjw@redhat.com>
400
401	* elf_compress.c (__libelf_compress): Free out_buf if deflateInit
402	fails.
403
4042016-02-13  Mark Wielaard  <mjw@redhat.com>
405
406	* elf32_updatefile.c (updatemmap): Free scns when out of memory.
407
4082016-01-28  Mark Wielaard  <mjw@redhat.com>
409
410	* elf.h: Update from glibc. Add new i386 and x86_64 relocations.
411
4122016-02-12  Mark Wielaard  <mjw@redhat.com>
413
414	* elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
415
4162016-02-04  Mark Wielaard  <mjw@redhat.com>
417
418	* elf_getdata.c (__libelf_set_rawdata_wrlock): Don't adjust align
419	for SHT_NOBITS sections.
420
4212016-01-22  Chih-Hung Hsieh <chh@google.com>
422
423	* elf_compress.c (__libelf_compress): Move nested function
424	'do_deflate_cleanup' to file scope to compile with clang.
425	* elf_strptr.c (elf_strptr): Move nested function 'get_zdata'
426	to file scope to compile with clang.
427
4282016-01-13  Mark Wielaard  <mjw@redhat.com>
429
430	* libelf.h: Check SHF_COMPRESSED is defined. If not define it and the
431	associated ELF compression types/defines.
432
4332015-11-26  Mark Wielaard  <mjw@redhat.com>
434
435	* elf_compress.c (__libelf_decompress_elf): New function, extracted
436	from...
437	(elf_compress): here. Check zdata_base use __libelf_decompress_elf.
438	* elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
439	use zdata.
440	* libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
441	(__libelf_decompress_elf): New internal function definition.
442
4432015-10-21  Mark Wielaard  <mjw@redhat.com>
444
445	* Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
446	elf_compress_gnu.c.
447	* elf_compress.c: New file.
448	* elf_compress_gnu.c: Likewise.
449	* elf_begin.c (file_read_elf): Make a writable copy of the shdrs
450	for ELF_C_READ_MMAP.
451	* elf_end.c (elf_end): Free zdata_base.
452	* elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
453	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
454	ELF_E_DECOMPRESS_ERROR.
455	* elf_data.c (__libelf_data_type): New internal function extracted
456	from convert_data.
457	(convert_data): Handle SHF_COMPRESSED.
458	* elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
459	uncompressed section data size if SHF_COMPRESSED.
460	* elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
461	ELF_C_READ_MMAP.
462	* libelf.h: Define elf_compress and elf_compress_gnu.
463	* libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
464	* libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
465	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
466	ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
467	(__libelf_compress): New internal function definition.
468	(__libelf_decompress): Likewise.
469	(__libelf_reset_rawdata): Likewise.
470	(__libelf_data_type): Likewise.
471	(struct Elf_Scn): Add zdata_base.
472
4732015-11-19  Mark Wielaard  <mjw@redhat.com>
474
475	* Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
476	elf64_getchdr.c and gelf_getchdr.c.
477	(noinst_HEADERS): Add chdr_xlate.h.
478	* abstract.h: Define Chdr32 and Chdr64.
479	* chdr_xlate.h: New file.
480	* elf32_getchdr.c: New file.
481	* elf64_getchdr.c: New file.
482	* elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
483	and ELF_E_INVALID_SECTION_FLAGS.
484	* elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
485	ELF_T_CHDR for SHF_COMPRESSED sections.
486	* exttypes.h: Add Chdr32 and Chdr64.
487	* gelf.h (GElf_Chdr): New typedef.
488	(gelf_getchdr): New function definition.
489	* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
490	* gelf_getchdr.c: New file.
491	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
492	* gelf_xlate.h: Add Chdr.
493	* libelf.h (Elf_Type): Add ELF_T_CHDR.
494	(elf32_getchdr): New function definition.
495	(elf64_getchdr): Likewise.
496	* libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
497	elf64_getchdr and gelf_getchdr.
498	* libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
499	and ELF_E_INVALID_SECTION_FLAGS.
500
5012015-10-16  Mark Wielaard  <mjw@redhat.com>
502
503	* Makefile.am (libelf_so_LDLIBS): Add -lz.
504
5052015-10-14  Mark Wielaard  <mjw@redhat.com>
506
507	* elf.h: Update from glibc. Add section compression constants and
508	structures.
509
5102015-10-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
511
512	* elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
513	Fix the size argument to pread_retry.
514
5152015-10-13  Chih-Hung Hsieh  <chh@google.com>
516
517	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
518	function 'fill_mmap' to file scope.
519	* elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
520	to file scope.
521
5222015-10-09  Josh Stone  <jistone@redhat.com>
523
524	* libelf.h: Replace loff_t with int64_t throughout.
525
5262015-10-05  Mark Wielaard  <mjw@redhat.com>
527
528	* elf_update.c (write_file): Only use posix_fallocate when using
529	mmap. Only report failure when errno is ENOSPC.
530
5312015-10-09  Josh Stone  <jistone@redhat.com>
532
533	* libelfP.h (struct Elf): Replace off64_t with off_t.
534	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
535
5362015-10-05  Chih-Hung Hsieh <chh@google.com>
537
538	* elf_getarsym.c (elf_getarsym): Do not use
539	union of variable length arrays.
540
5412015-10-05  Josh Stone  <jistone@redhat.com>
542
543	* Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
544
5452015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
546
547	* Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
548	relocation overflows in some platforms.
549
5502015-09-29  Mark Wielaard  <mjw@redhat.com>
551
552	* elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
553	(updatenull_wrlock): Always set e_shentsize.
554
5552015-09-23  Mark Wielaard  <mjw@redhat.com>
556
557	* elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
558	* elf32_getshdr.c (getshdr_rdlock): Likewise.
559	(getshdr_wrlock): Likewise.
560	* elf_error.c (__libelf_seterrno): Likewise.
561	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
562	(__elf_getphdrnum_chk_rdlock): Likewise.
563	* elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
564	(__elf_getphdrnum_chk_rdlock): Likewise.
565	* elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
566	* elf_readall.c (__libelf_readall): Likewise.
567	* gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
568
5692015-09-22  Mark Wielaard  <mjw@redhat.com>
570
571	* *.c: Remove old-style function definitions.
572
5732015-06-22  Mark Wielaard  <mjw@redhat.com>
574
575	* dl-hash.h: Update from glibc.
576
5772015-06-18  Mark Wielaard  <mjw@redhat.com>
578
579	* elf32_updatefile.c (updatefile): Always free shdr_data and scns
580	when allocated on failure paths.
581
5822015-06-18  Mark Wielaard  <mjw@redhat.com>
583
584	* nlist.c (nlist): Check symscn shdr exists before use.
585
5862015-06-16  Mark Wielaard  <mjw@redhat.com>
587
588	* elf_update.c (write_file): Always also use ftruncate before
589	posix_fallocate to make sure file has the right size.
590
5912015-06-04  Mark Wielaard  <mjw@redhat.com>
592
593	* elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
594	ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
595	ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
596	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
597	of rawdata against requested type.
598
5992015-06-02  Mark Wielaard  <mjw@redhat.com>
600
601	* elf_getdata.c (convert_data): Make sure source data is properly
602	aligned for type before calling actual conversion function.
603
6042015-06-04  Mark Wielaard  <mjw@redhat.com>
605
606	* elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
607	direct access.
608
6092015-06-02  Mark Wielaard  <mjw@redhat.com>
610
611	* elf_begin.c (file_read_elf): Split checks for ehdr and shdr
612	alignment, drop phdr alignment check.
613
6142015-05-31  Mark Wielaard  <mjw@redhat.com>
615
616	* elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
617	not alloca and free after conversion when a copy needs to be made.
618
6192015-05-31  Mark Wielaard  <mjw@redhat.com>
620
621	* elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
622	alloca and free after conversion when a copy needs to be made.
623
6242015-05-31  Mark Wielaard  <mjw@redhat.com>
625
626	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
627	malloc, not alloca also in !ALLOW_UNALIGNED case.
628
6292015-05-30  Mark Wielaard  <mjw@redhat.com>
630
631	* gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
632
6332015-05-30  Mark Wielaard  <mjw@redhat.com>
634
635	* elf32_updatefile.c (updatemmap): Only call mempcpy and update
636	last_position when d_size is non-zero.
637
6382015-05-17  Mark Wielaard  <mjw@redhat.com>
639
640	* elf32_updatefile.c (updatefile): Allocate shdr_data and scns
641	with malloc, not alloca. Free after writing section headers.
642
6432015-05-16  Mark Wielaard  <mjw@redhat.com>
644
645	* elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
646	with malloc, not alloca. Free after writing section header.
647
6482015-05-16  Mark Wielaard  <mjw@redhat.com>
649
650	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
651	malloc, not alloca. Call free after out.
652
6532015-05-14  Mark Wielaard  <mjw@redhat.com>
654
655	* elf_update.c (write_file): Use posix_fallocate instead of
656	ftruncate to extend file if necessary.
657
6582015-05-13  Mark Wielaard  <mjw@redhat.com>
659
660	* elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
661	e_phoff also to zero.
662
6632015-05-12  Mark Wielaard  <mjw@redhat.com>
664
665	* elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
666	is a powerof2.
667	* elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
668	to the elf image offset.
669
6702015-05-12  Mark Wielaard  <mjw@redhat.com>
671
672	* elf32_newphdr.c (newphdr): Call __libelf_seterrno with
673	ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
674	actually exists if we need to put extended phnum in section zero.
675
6762015-05-08  Mark Wielaard  <mjw@redhat.com>
677
678	* nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
679
6802015-01-03  Mark Wielaard  <mjw@redhat.com>
681
682	* version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
683	(elf_cvt_Verneed): Likewise.
684
6852015-03-28  Mark Wielaard  <mjw@redhat.com>
686
687	* elf.h: Update from glibc.
688
6892015-03-23  Mark Wielaard  <mjw@redhat.com>
690
691	* elf32_updatenull.c (updatenull_wrlock): Don't extend size with
692	SHT_NOBITS sh_offset.
693
6942015-02-18  Mark Wielaard  <mjw@redhat.com>
695
696	* libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
697
6982015-02-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
699
700	* elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
701	sh_addralign 0 as 1.
702
7032015-01-22  Mark Wielaard  <mjw@redhat.com>
704
705	* elf_strptr (elf_strptr): Make sure returned string is NUL
706	terminated.
707
7082015-01-21  Mark Wielaard  <mjw@redhat.com>
709
710	* elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
711	of rawdata_base != NULL before using rawdata directly.
712
7132015-01-20  Mark Wielaard  <mjw@redhat.com>
714
715	* libelfP.h (__elf_strptr_internal): New function declaration.
716	* elf_getdata.c (__libelf_set_data_list_rdlock): New internal
717	function extracted from...
718	(__elf_getdata_rdlock): ... here.
719	* elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
720	datalist if necessary.
721
7222015-01-20  Mark Wielaard  <mjw@redhat.com>
723
724	* elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
725	necessary.
726
7272014-12-30  Mark Wielaard  <mjw@redhat.com>
728
729	* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
730	(elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
731	* gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
732	and always check ndx against phnum.
733	* libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
734
7352014-12-25  Mark Wielaard  <mjw@redhat.com>
736
737	* elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
738	negative. Include start_offset in maxsize.
739
7402014-12-28  Alexander Cherepanov  <cherepan@mccme.ru>
741
742	* elf_begin.c (read_long_names): Don't miss '/' right after
743	another '/'. Fixes a dir traversal vuln in ar extraction.
744
7452014-12-18  Ulrich Drepper  <drepper@gmail.com>
746
747	* Makefile.am: Suppress output of textrel_check command.
748
7492014-12-16  Mark Wielaard  <mjw@redhat.com>
750
751	* elf_begin.c (read_long_names): Make sure long_names len fits
752	in mapped ELF file.
753
7542014-12-15  Mark Wielaard  <mjw@redhat.com>
755
756	* elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
757
7582014-12-15  Mark Wielaard  <mjw@redhat.com>
759
760	* elf_begin.c (read_long_names): Clear any garbage left in the
761	name table.
762
7632014-12-11  Mark Wielaard  <mjw@redhat.com>
764
765	* elf_begin.c (file_read_elf): Correct ELF64 section offset check.
766
7672014-12-11  Mark Wielaard  <mjw@redhat.com>
768
769	* elf_begin.c (read_long_names): Check for offset overflow.
770	(__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.
771	Don't allow it to go beyond end of file.
772
7732014-12-09  Mark Wielaard  <mjw@redhat.com>
774
775	* elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
776
7772014-11-27  Mark Wielaard  <mjw@redhat.com>
778
779	* Makefile.am (libelf.so): Use textrel_check.
780
7812014-11-23  Mark Wielaard  <mjw@redhat.com>
782
783	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
784	overflow check to unsigned.
785
7862014-11-23  Mark Wielaard  <mjw@redhat.com>
787
788	* note_xlate.h (elf_cvt_note): Copy over any leftover data if
789	src != dest. The data is probably part of truncated name/desc.
790
7912014-11-22  Mark Wielaard  <mjw@redhat.com>
792
793	* elf_getphdrnum.c (elf_getphdrnum): Sanity check the
794	__elf_getphdrnum_rdlock result.
795
7962014-11-18  Mark Wielaard  <mjw@redhat.com>
797
798	* version_xlate.h (elf_cvt_Verdef): Check for overflow.
799	(elf_cvt_Verneed): Likewise.
800
8012014-11-17  Mark Wielaard  <mjw@redhat.com>
802
803	* elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
804
8052014-11-16  Mark Wielaard  <mjw@redhat.com>
806
807	* elf_getshdrstrndx.c: Check there are section headers before
808	handling SHN_XINDEX.
809
8102014-11-16  Mark Wielaard  <mjw@redhat.com>
811
812	* elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
813	Check for too many pheaders.
814	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
815	actually exists before handling PN_XNUM.
816
8172014-11-16  Mark Wielaard  <mjw@redhat.com>
818
819	* gelf_getnote.c (gelf_getnote): Check padding overflow.
820
8212014-11-16  Mark Wielaard  <mjw@redhat.com>
822
823	* elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
824	and align as Elf64_Off and Elf64_Xword not size_t.
825
8262014-11-14  Mark Wielaard  <mjw@redhat.com>
827
828	* gelf_getnote.c (gelf_getnote): Check offset overflow.
829
8302014-11-13  Mark Wielaard  <mjw@redhat.com>
831
832	* elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
833	check.
834
8352014-11-08  Mark Wielaard  <mjw@redhat.com>
836
837	* elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
838
8392014-11-07  Mark Wielaard  <mjw@redhat.com>
840
841	* elf_begin.c (file_read_elf): Correct sh_size check.
842	* elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
843	overflow.
844
8452014-09-10  Petr Machata  <pmachata@redhat.com>
846
847	* elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
848	file is unreadable.
849
8502014-07-07  Mark Wielaard  <mjw@redhat.com>
851
852	* elf.h: Update from glibc.
853
8542014-04-13  Mark Wielaard  <mjw@redhat.com>
855
856	* Makefile.am: Remove !MUDFLAP conditions.
857	* elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
858	defined.
859	* elf_update.c (write_file): Remove _MUDFLAP condition.
860
8612014-01-17  Jakub Jelinek  <jakub@redhat.com>
862	    Roland McGrath  <roland@redhat.com>
863
864	* libelfP.h (INVALID_NDX): Define.
865	* gelf_getdyn.c (gelf_getdyn): Use it.  Remove ndx < 0 test if any.
866	* gelf_getlib.c (gelf_getlib): Likewise.
867	* gelf_getmove.c (gelf_getmove): Likewise.
868	* gelf_getrel.c (gelf_getrel): Likewise.
869	* gelf_getrela.c (gelf_getrela): Likewise.
870	* gelf_getsym.c (gelf_getsym): Likewise.
871	* gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
872	* gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
873	* gelf_getversym.c (gelf_getversym): Likewise.
874	* gelf_update_dyn.c (gelf_update_dyn): Likewise.
875	* gelf_update_lib.c (gelf_update_lib): Likewise.
876	* gelf_update_move.c (gelf_update_move): Likewise.
877	* gelf_update_rel.c (gelf_update_rel): Likewise.
878	* gelf_update_rela.c (gelf_update_rela): Likewise.
879	* gelf_update_sym.c (gelf_update_sym): Likewise.
880	* gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
881	* gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
882	* gelf_update_versym.c (gelf_update_versym): Likewise.
883
8842014-01-17  Jakub Jelinek  <jakub@redhat.com>
885
886	* elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
887	table fits into object's bounds.
888	* elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
889	elf->map_address.  Check if first section header fits into object's
890	bounds.
891	* elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
892	Check if section header table fits into object's bounds.
893	* elf_begin.c (get_shnum): Ensure section headers fits into
894	object's bounds.
895	(file_read_elf): Make sure scncnt is small enough to allocate both
896	ElfXX_Shdr and Elf_Scn array.  Make sure section and program header
897	tables fit into object's bounds.  Avoid memory leak on failure.
898	* elf_newscn.c (elf_newscn): Check for overflow.
899	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
900	(__elfw2(LIBELFBITS,updatefile)): Likewise.
901	* elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
902	* elf_getarsym.c (elf_getarsym): Likewise.
903
9042013-11-08  Mark Wielaard  <mjw@redhat.com>
905
906	* elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
907	already directly mmapped.
908
9092013-11-05  Mark Wielaard  <mjw@redhat.com>
910
911	* elf32_updatefile.c (elfXX_updatefile): Copy all section headers
912	if elf->flags dirty.
913
9142013-11-01  Michael Forney  <mforney@mforney.org>
915
916	* Makefile.am: Use READELF.
917
9182013-10-01  Petr Machata  <pmachata@redhat.com>
919
920	* elf.h: Update from glibc.
921
9222013-06-17  Petr Machata  <pmachata@redhat.com>
923
924	* elf.h: Update from glibc.
925
9262013-08-28  Namhyung Kim  <namhyung@gmail.com>
927
928	* gelf.h (gelf_fsize): Fix typo in comment.
929
9302013-08-28  Mark Wielaard  <mjw@redhat.com>
931
932	* gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
933
9342013-08-27  Mark Wielaard  <mjw@redhat.com>
935
936	* gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
937
9382013-08-25  Kurt Roeckx  <kurt@roeckx.be>
939
940	* gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
941	dereference to avoid alignment problems.
942
9432013-01-07  Roland McGrath  <roland@hack.frob.com>
944
945	* elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
946	would be unaligned and !ALLOW_UNALIGNED.
947
948	* elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
949	dereference so as not to assume the field is naturally aligned.
950
9512012-09-17  Petr Machata  <pmachata@redhat.com>
952
953	* elf.h: Update from glibc.
954
9552012-08-16  Roland McGrath  <roland@hack.frob.com>
956
957	* elf.h: Update from glibc.
958
9592012-08-14  Mark Wielaard  <mjw@redhat.com>
960
961	* elf32_checksum.c (ebl_debugscn_p): Removed unused define and
962	confusing outdated comment.
963
9642012-08-01  Petr Machata  <pmachata@redhat.com>
965
966	* elf_getarsym (read_number_entries): New function.
967	(elf_getarsym): Handle 64-bit symbol table, stored in special
968	entry named "/SYM64/".
969	* elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
970	because it contains 64-bit symbol table.
971
9722012-07-19  Mark Wielaard  <mjw@redhat.com>
973
974	* elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
975	to asserts.
976
9772012-07-17  Petr Machata  <pmachata@redhat.com>
978
979	* elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
980	integer number of records in case of ELF_T_NHDR.
981
9822012-04-02  Mark Wielaard  <mjw@redhat.com>
983
984	* elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
985	there are no nonempty sections at that offset.
986
9872012-03-21  Roland McGrath  <roland@hack.frob.com>
988
989	* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
990
9912011-02-26  Mark Wielaard  <mjw@redhat.com>
992
993	* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
994
9952011-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
996
997	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
998	when MAXIMUM_SIZE == ~0.
999
10002010-08-18  Roland McGrath  <roland@redhat.com>
1001
1002	* gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
1003	and ELF_T_GNUHASH.
1004	Reported by Mark Hatle <mark.hatle@windriver.com>.
1005
1006	* exttypes.h: Add cases for ElfNN_Lib.
1007	Reported by Mark Hatle <mark.hatle@windriver.com>.
1008
10092010-06-14  Ulrich Drepper  <drepper@redhat.com>
1010
1011	* gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
1012	* gelf_update_phdr.c: Likewise.
1013	* gelf_update_ehdr.c: Likewise.
1014
10152010-04-14  Roland McGrath  <roland@redhat.com>
1016
1017	* elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
1018	* elf_begin.c (file_read_elf): Don't set .phdr here.
1019
10202010-04-13  Roland McGrath  <roland@redhat.com>
1021
1022	* elf.h: Update from glibc.
1023
10242010-04-06  Roland McGrath  <roland@redhat.com>
1025
1026	* elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
1027	in error message.
1028
10292010-04-01  Petr Machata  <pmachata@redhat.com>
1030
1031	* elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
1032	that do not need a conversion.
1033
10342010-03-11  Roland McGrath  <roland@redhat.com>
1035
1036	* elf.h: Update from glibc.
1037
10382010-03-04  Ulrich Drepper  <drepper@redhat.com>
1039
1040	* elf.h: Update from glibc.
1041
10422010-02-17  Roland McGrath  <roland@redhat.com>
1043
1044	* elf_begin.c (file_read_elf): Leave section rawdata_base and
1045	data_base pointers null when [sh_offset,sh_size) points outside
1046	the mapped file.
1047
10482010-02-15  Roland McGrath  <roland@redhat.com>
1049
1050	* Makefile.am: Use config/eu.am for common stuff.
1051
10522010-01-07  Roland McGrath  <roland@redhat.com>
1053
1054	* elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
1055	* gelf_getphdr.c: Likewise.
1056	* gelf_update_phdr.c: Likewise.
1057	* elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
1058	* elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
1059	* elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
1060	If COUNT is too large, use store PN_XNUM instead and set sh_info.
1061	* elf_begin.c (file_read_elf): Always allocate space we can use later
1062	for section 0 if doing RDWR.
1063
1064	* elf_getphdrnum.c: New file.
1065	* Makefile.am (libelf_a_SOURCES): Add it.
1066	* libelf.h: Declare elf_getphdrnum.
1067	* libelfP.h: Declare __elf_getphdrnum_rdlock.
1068	* libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
1069
1070	* elf.h: Update from glibc.
1071
10722009-10-23  Lubomir Rintel  <lkundrak@v3.sk>
1073
1074	* elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
1075	filling from section start, not shdr_end.
1076
10772009-11-10  Roland McGrath  <roland@redhat.com>
1078
1079	* elf_readall.c (__libelf_readall): Fetch file size if not yet known.
1080
10812009-11-06  Mark Wielaard  <mjw@redhat.com>
1082
1083	* elf_next.c (elf_next): Mark the archive header as unusable when
1084	there is no next ar element.
1085
10862009-08-12  Mark Wielaard  <mjw@redhat.com>
1087
1088	* Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
1089
10902009-07-26  Ulrich Drepper  <drepper@redhat.com>
1091
1092	* elf.h: Update from glibc.
1093
10942009-07-21  Ulrich Drepper  <drepper@redhat.com>
1095
1096	* elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
1097	sections.  Patch by Lubomir Rintel <lkundrak@v3.sk>.
1098
10992009-07-08  Roland McGrath  <roland@redhat.com>
1100
1101	* libelfP.h (struct Elf): Remove unused ar.has_index field.
1102	Reorder various members for optimal packing.
1103
11042009-07-08  Ulrich Drepper  <drepper@redhat.com>
1105
1106	* elf.h: Update from glibc.
1107
11082009-06-13  Ulrich Drepper  <drepper@redhat.com>
1109
1110	* Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
1111	elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
1112	* elf_getshnum.c: Renamed to...
1113	* elf_getshdrnum.c: ...this.  Rename function and add old name as
1114	alias.  Likewise for internal functions with derived names.
1115	* elf_getshstrndx.c: Renamed to...
1116	* elf_getshdrstrndx.c: ...this.  Rename function and add old name as
1117	alias.  Likewise for internal functions with derived names.
1118	* libelf.h: Add prototypes for new names.  Make old names as
1119	deprecated.
1120	* libelfP.h: Rename internal function prototypes.
1121	* libelf.map: Export for names.
1122	* elf32_checksum.c: Don't use deprecated functions.
1123	* elf32_getshdr.c: Likewise.
1124
11252009-06-01  Ulrich Drepper  <drepper@redhat.com>
1126
1127	* elf.h: Update from glibc.
1128
11292009-04-14  Roland McGrath  <roland@redhat.com>
1130
1131	* elf.h: Update from glibc.
1132
11332009-04-01  Roland McGrath  <roland@redhat.com>
1134
1135	* elf.h: Update from glibc.
1136
11372009-02-10  Ulrich Drepper  <drepper@redhat.com>
1138
1139	* elf32_updatefile.c (updatefile): For the zeroth section we still
1140	have to copy the section header.
1141
11422009-02-01  Ulrich Drepper  <drepper@redhat.com>
1143
1144	* elf_strptr.c: Add comment re possible problem.
1145
11462009-01-26  Ulrich Drepper  <drepper@redhat.com>
1147
1148	* elf32_updatenull.c (updatenull_wrlock): Fix comment of
1149	ELF_F_LAYOUT behaviour re section header table.
1150
11512009-01-22  Ulrich Drepper  <drepper@redhat.com>
1152
1153	* elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
1154	sections even if only the section at the start of the gap has been
1155	changed.
1156	(__elfXX_updatefile): Likewise.
1157
11582009-01-21  Ulrich Drepper  <drepper@redhat.com>
1159
1160	* elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
1161	handle sections for NOBITS sections.
1162	(elfXX_updatefile): Likewise.
1163
1164	* elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
1165	sections we haven't loaded, update last_position based on scn_start,
1166	not based on old value.  Don't run the loop for the dummy section 0.
1167	(elfXX_updatefile): Don't run the loop for the dummy section 0.
1168
11692009-01-10  Ulrich Drepper  <drepper@redhat.com>
1170
1171	* libelfP.h (_): We only have one translation domain, elfutils.
1172
1173	* Makefile.am: Use USE_LOCKS instead of USE_TLS.
1174	* elf_error.c: Always use __thread.  Remove all !USE_TLS code.
1175
11762009-01-04  Roland McGrath  <roland@redhat.com>
1177
1178	* note_xlate.h (elf_cvt_note): Don't examine a size too small to
1179	container a note header.
1180
11812008-12-11  Roland McGrath  <roland@redhat.com>
1182
1183	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
1184	placement offset going backwards, for out-of-order or overlapping
1185	(bogus) sh_offset layouts.  It's a dumb use, but should not crash.
1186	(__elfw2(LIBELFBITS,updatefile)): Likewise.
1187	Fixes RHBZ#476136.
1188
1189	* libelf.h (Elf_Data): Whitespace fix.
1190
11912008-12-10  Roland McGrath  <roland@redhat.com>
1192
1193	* elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
1194
11952008-10-22  Petr Machata  <pmachata@redhat.com>
1196
1197	* elf_rawfile.c (elf_rawfile): Lock around elf-> references.
1198
11992008-10-21  Petr Machata  <pmachata@redhat.com>
1200
1201	* libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
1202	* elf32_getehdr.c (getehdr_rdlock): Move the code to new function
1203	getehdr_impl and make it a wrapper.  Rename to getehdr_wrlock.
1204	(getehdr_impl): Guard elf->class init with wrlock.
1205	(getehdr): Also make it a wrapper of getehdr_impl.
1206	* elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
1207
12082008-10-20  Petr Machata  <pmachata@redhat.com>
1209
1210	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
1211	code that reads mutable elf state.  Relock to write lock to chain
1212	the new chunk on the elf rawchunks list.
1213
12142008-10-20  Petr Machata  <pmachata@redhat.com>
1215
1216	* elf32_checksum.c (checksum): Place a lock around the code that
1217	processes data.  Make it wrlock if the code needs to xlate the
1218	data before processing.
1219
12202008-10-16  Petr Machata  <pmachata@redhat.com>
1221
1222	* elf_begin.c
1223	(__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
1224	(dup_elf): Adjust the call.
1225	(elf_begin): New local function lock_dup_elf.  Relocks the elf if
1226	necessary before calling dup.  Call this instead of dup_elf.
1227	* elf_getarhdr.c
1228	(elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
1229	* elf_next.c (elf_next): Likewise.
1230	* elf_rand.c (elf_rand): Likewise.
1231
12322008-10-14  Petr Machata  <pmachata@redhat.com>
1233
1234	* elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
1235
12362008-11-26  Roland McGrath  <roland@redhat.com>
1237
1238	* elf.h: Update from glibc.
1239
12402008-10-06  Roland McGrath  <roland@redhat.com>
1241
1242	* elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
1243
12442008-08-27  Roland McGrath  <roland@redhat.com>
1245
1246	* elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
1247
1248	* libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
1249
12502008-08-25  Roland McGrath  <roland@redhat.com>
1251
1252	* Makefile.am (libelf_so_LDLIBS): New variable.
1253	(libelf.so): Use it in the link.
1254
12552008-08-21  Petr Machata  <pmachata@redhat.com>
1256
1257	* elf_getdata.c, libelfP.h
1258	(__elf_getdata_internal): Rename to __elf_getdata_rdlock.
1259	(__libelf_set_rawdata_wrlock): New function.
1260	(__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
1261	* elf32_updatenull.c, libelfP.h
1262	(__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
1263
12642008-08-21  Petr Machata  <pmachata@redhat.com>
1265
1266	* elf32_getphdr.c, libelfP.h
1267	(__elfNN_getphdr_internal): Drop.  Move __elfNN_getphdr_internal
1268	code to __elfNN_getphdr_wrlock.
1269	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
1270	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
1271	wrappers of getphdr_impl.
1272
12732008-08-21  Petr Machata  <pmachata@redhat.com>
1274
1275	* elf32_getehdr.c, libelfP.h
1276	(__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
1277	* gelf_getehdr, libelfP.h:
1278	(__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
1279
12802008-08-21  Petr Machata  <pmachata@redhat.com>
1281
1282	* elf32_getshdr.c
1283	(__elfNN_getshdr_internal): Drop.
1284	(load_shdr_wrlock, scn_valid): New functions, contain bits of
1285	behaviour from __elfNN_getshdr_internal.
1286	(__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
1287	dropped _internal functions above.
1288	* elf_getshnum.c
1289	(__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
1290
12912008-08-04  Petr Machata  <pmachata@redhat.com>
1292
1293	* libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
1294
12952008-07-28  Roland McGrath  <roland@redhat.com>
1296
1297	* elf.h: Update from glibc.
1298
12992008-03-31  Roland McGrath  <roland@redhat.com>
1300
1301	* elf32_offscn.c: Make sure shdrs have been read in.
1302
13032008-02-19  Roland McGrath  <roland@redhat.com>
1304
1305	* elf.h: Update from glibc.
1306
13072008-02-08  Roland McGrath  <roland@redhat.com>
1308
1309	* elf.h: Update from glibc.
1310
13112008-01-31  Ulrich Drepper  <drepper@redhat.com>
1312
1313	* elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
1314	under construction and no raw data can be read from disk.
1315
13162008-01-30  Roland McGrath  <roland@redhat.com>
1317
1318	* elf.h: Update from glibc.
1319
13202008-01-26  Roland McGrath  <roland@redhat.com>
1321
1322	* elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
1323	Fixes various pastos in wrong type in sizeof, wrong string parsed.
1324
13252008-01-20  Roland McGrath  <roland@redhat.com>
1326
1327	* elf_getaroff.c: Calculate from start_offset, instead of using
1328	parent's state.ar.offset field.
1329
13302008-01-08  Roland McGrath  <roland@redhat.com>
1331
1332	* Makefile.am (euinclude): Variable removed.
1333	(pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1334
13352008-01-03  Roland McGrath  <roland@redhat.com>
1336
1337	* common.h: Add __attribute__ ((unused)) to static functions.
1338
13392007-12-20  Ulrich Drepper  <drepper@redhat.com>
1340
1341	* Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
1342	* libelfP.h (struct Elf_Scn): Add shndx_index field.
1343	Declare __elf_scnshndx_internal.
1344	* elf32_getshdr.c: Record location of extended section header.
1345	* elf_begin.c (file_read_elf): Likewise.
1346	* elf_scnshndx.c: New file.
1347	* libelf.h: Declare elf_scnshndx.
1348	* libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
1349
13502007-11-12  Roland McGrath  <roland@redhat.com>
1351
1352	* libelf.h: Replace off64_t with loff_t throughout.
1353	Only that type name is unconditionally defined by <sys/types.h>
1354
13552007-11-03  Roland McGrath  <roland@redhat.com>
1356
1357	* libelf.h (Elf_Data): Comment fix.
1358
13592007-10-18  Roland McGrath  <roland@redhat.com>
1360
1361	* elf.h: Update from glibc.
1362
13632007-10-07  Roland McGrath  <roland@redhat.com>
1364
1365	* elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
1366	member access in terminating name with no trailing /.  Trim trailing
1367	spaces when there is no /.
1368
13692007-10-04  Roland McGrath  <roland@redhat.com>
1370
1371	* elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
1372
13732007-10-03  Roland McGrath  <roland@redhat.com>
1374
1375	* libelf.h (Elf_Data): Use off64_t for d_off.
1376	(Elf_Arhdr): Use off64_t for ar_size.
1377	(elf_update, elf_getbase, elf_getaroff): Return off64_t.
1378
1379	* gelf_rawchunk.c: File removed.
1380	* gelf_freechunk.c: File removed.
1381	* Makefile.am (libelf_a_SOURCES): Remove them.
1382	* libelf.map (ELFUTILS_1.0): Remove exports.
1383	* gelf.h: Remove decls.
1384
1385	* elf_getdata_rawchunk.c: New file.
1386	* Makefile.am (libelf_a_SOURCES): Add it.
1387	* libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
1388	* libelf.h: Declare it.
1389	* libelfP.h (Elf_Data_Chunk): New type.
1390	(struct Elf.elf): New member `rawchunks'.
1391	* elf_end.c (elf_end): Free recorded rawchunk buffers.
1392
13932007-08-24  Roland McGrath  <roland@redhat.com>
1394
1395	* gelf_getnote.c: New file.
1396	* Makefile.am (libelf_a_SOURCES): Add it.
1397	* gelf.h: Declare gelf_getnote.
1398	* libelf.map (ELFUTILS_1.3): Add gelf_getnote.
1399
1400	* libelfP.h (NOTE_ALIGN): New macro.
1401	* note_xlate.h: New file.
1402	* Makefile.am (noinst_HEADERS): Add it.
1403	* gelf_xlate.c: Include it.
1404	(__elf_xfctstom): Use elf_cvt_note.
1405	* elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
1406	(__libelf_set_rawdata): Likewise.
1407
14082007-08-19  Roland McGrath  <roland@redhat.com>
1409
1410	* gelf_update_auxv.c: New file.
1411	* gelf_getauxv.c: New file.
1412	* Makefile.am (libelf_a_SOURCES): Add them.
1413	* gelf.h: Declare gelf_getauxv, gelf_update_auxv.
1414	* libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
1415	Export gelf_getauxv, gelf_update_auxv.
1416
1417	* libelf.h (Elf_Type): Add ELF_T_AUXV.
1418	* abstract.h: Add auxv_t entries.
1419	* exttypes.h: Likewise.
1420	* gelf_xlate.h: Likewise.
1421	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
1422	* gelf_fsize.c (__libelf_type_sizes): Likewise.
1423
14242007-08-12  Roland McGrath  <roland@redhat.com>
1425
1426	* elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
1427	and only tertiarily on index.
1428
14292007-07-09  Roland McGrath  <roland@redhat.com>
1430
1431	* elf.h: Update from glibc.
1432
14332007-04-22  Roland McGrath  <roland@redhat.com>
1434
1435	* elf.h: Update from glibc.
1436
14372007-03-18  Roland McGrath  <roland@redhat.com>
1438
1439	* elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
1440	Return zero when the section headers do not fit within MAXSIZE.
1441
14422007-03-09  Roland McGrath  <roland@redhat.com>
1443
1444	* libelfP.h (LIBELF_EV_IDX): New macro.
1445	(__libelf_type_align): New macro.
1446	[! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
1447	* elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
1448	(convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
1449	and __libelf_type_sizes, in place of old table.
1450	(__libc_type_aligns): New const variable.
1451
14522007-02-04  Ulrich Drepper  <drepper@redhat.com>
1453
1454	* Makefile (libelf.so): Build with -z relro.
1455
1456	* elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1457
14582007-01-30  Ulrich Drepper  <drepper@redhat.com>
1459
1460	* nlist.c: Close file descriptor before returning.
1461
14622007-01-20  Roland McGrath  <roland@redhat.com>
1463
1464	* gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1465	convert the final word.
1466
1467	* elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1468	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1469
14702007-01-18  Roland McGrath  <roland@redhat.com>
1471
1472	* gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1473	it on read error.
1474
14752006-10-13  Roland McGrath  <roland@redhat.com>
1476
1477	* elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1478	* elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1479
14802006-08-29  Roland McGrath  <roland@redhat.com>
1481
1482	* elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
1483	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1484	Reported by Christian Aichinger <Greek0@gmx.net>.
1485
1486	* Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1487
14882006-08-08  Ulrich Drepper  <drepper@redhat.com>
1489
1490	* elf.h (DT_VALNUM): Update.
1491	(DT_ADDRNUM): Likewise.
1492
14932006-07-12  Ulrich Drepper  <drepper@redhat.com>
1494
1495	* elf32_updatefile.c: Adjust for internal_function_def removal.
1496	* elf32_updatenull.c: Likewise.
1497	* elf_begin.c: Likewise.
1498	* elf_getdata.c: Likewise.
1499
15002006-07-11  Ulrich Drepper  <drepper@redhat.com>
1501
1502	* libelf.h: Define ELF_T_GNUHASH.
1503	* elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
1504	(shtype_map): Add SHT_GNU_HASH entries.
1505	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
1506	* gnuhash_xlate.h: New file.
1507	* Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
1508
15092006-07-06  Ulrich Drepper  <drepper@redhat.com>
1510
1511	* elf_gnu_hash.c: New file.
1512	* libelf.h: Declare elf_gnu_hash.
1513	* Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
1514	* libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
1515
15162006-06-15  Roland McGrath  <roland@redhat.com>
1517
1518	* libelf.h (elf_getarsym): Fix comment typo.
1519	Rename second parameter to be more explanatory.
1520	(elf_getident, elf_rawhide): Likewise.
1521
15222006-05-28  Ulrich Drepper  <drepper@redhat.com>
1523
1524	* elf32_updatefile.c (updatemmap): Preserve section content if
1525	copying would overwrite them.
1526	Fix msync paramters.
1527
15282006-04-04  Roland McGrath  <roland@redhat.com>
1529
1530	* elf32_updatefile.c (updatemmap): Handle other-endian case.
1531
15322006-04-04  Ulrich Drepper  <drepper@redhat.com>
1533
1534	* elf32_updatefile.c (updatemmap): Cleanups.  Remove shdr_dest
1535	variable.  Before writing sections, make a copy of the section
1536	header data if necessary.  Don't write section header while
1537	writing the section constent, it might overwrite some sections.
1538	Restore the pointer afterwards.
1539	* elf32_updatenull.c (updatenull): If the offset of a section in a
1540	file changed make sure we read the section so that it'll be written
1541	out.
1542
1543	* elf_update.c: Remove debug message.
1544
15452005-12-07  Roland McGrath  <roland@redhat.com>
1546
1547	* gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1548	(FETCH, STORE): New macros.
1549	(INLINE3): Use those to do alignment-friendly conversion.
1550
1551	* elf32_getshdr.c: Include map_address and start_offset in alignment
1552	calculations.
1553	* elf32_getphdr.c: Likewise.
1554
15552005-11-19  Roland McGrath  <roland@redhat.com>
1556
1557	* elf.h: Update from glibc.
1558
15592005-11-17  Roland McGrath  <roland@redhat.com>
1560
1561	* elf.h: Update from glibc.
1562
15632005-11-10  Roland McGrath  <roland@redhat.com>
1564
1565	* elf.h: Update from glibc.
1566
15672005-09-09  Roland McGrath  <roland@redhat.com>
1568
1569	* elf_update.c (write_file): Stat the file and fchmod it after update
1570	if its mode had S_ISUID or S_ISGID bits set.
1571
15722005-08-28  Ulrich Drepper  <drepper@redhat.com>
1573
1574	* elf32_getphdr.c: Include <system.h>.  Use pread_retry instead of
1575	pread.  And branch prediction where useful.
1576	* elf_begin.c: Likewise.
1577	* elf_getdata.c: Likewise.
1578	* elf_getshstrndx.c: Likewise.
1579	* elf_readall.c: Likewise.
1580	* gelf_rawchunk.c: Likewise.
1581	* elf32_updatefile.c: Include <system.h>.  Use pread_retry instead of
1582	pread.  And branch prediction where useful.
1583	* elf_getarsym.c: Don't define pread_retry here.
1584
1585	* Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1586	(%.os): Use COMPILE.os.
1587	(COMPILE.os): Filter out gconv options.
1588
15892005-08-27  Ulrich Drepper  <drepper@redhat.com>
1590
1591	* elf_begin.c (file_read_elf): Avoid reading ELF header from file
1592	again.  Instead accept additional parameter which points to it if we
1593	don't use mmap.
1594	(get_shnum): Use passed in e_ident value as source of ELF header.
1595
15962005-08-15  Ulrich Drepper  <drepper@redhat.com>
1597
1598	* elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
1599
1600	* Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
1601	* libelf.map: Export elf_getaroff.
1602	* libelf.h: Declare elf_getaroff.
1603	* elf_getaroff.c: New file.
1604
16052005-08-13  Ulrich Drepper  <drepper@redhat.com>
1606
1607	* elf_begin.c (get_shnum): Optimize memory handling.  Always read from
1608	mapped file if available.  Fix access to 64-bit sh_size.  Recognize
1609	overflow.
1610	(file_read_elf): Likewise.
1611
16122005-08-12  Roland McGrath  <roland@redhat.com>
1613
1614	* elf32_offscn.c: Do not match empty sections at OFFSET unless
1615	there are no nonempty sections at that offset.
1616
16172005-08-07  Ulrich Drepper  <drepper@redhat.com>
1618
1619	* elf.h: Update from glibc.
1620
16212005-08-06  Ulrich Drepper  <drepper@redhat.com>
1622
1623	* Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1624
16252005-08-03  Ulrich Drepper  <drepper@redhat.com>
1626
1627	* libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1628	new version ELFUTILS_1.1.1.
1629
16302005-08-02  Ulrich Drepper  <drepper@redhat.com>
1631
1632	* elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
1633	* elf32_offscn.c: New file.
1634	* elf64_offscn.c: New file.
1635	* gelf_offscn.c: New file.
1636	* Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
1637	and gelf_offscn.c.
1638	* libelf.sym: Export new symbols.
1639
16402005-07-23  Ulrich Drepper  <drepper@redhat.com>
1641
1642	* elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
1643	sections here anymore.
1644	* elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
1645
1646	* elf_update.c (elf_update): Get write lock, not read lock.
1647
1648	* elf32_updatenull.c (updatenull): Get section headers if necessary
1649	and possible.
1650
16512005-07-22  Ulrich Drepper  <drepper@redhat.com>
1652
1653	* elf32_updatenull.c (updatenull): If program header hasn't been loaded
1654	yet, try to do it now.
1655	Don't unnecessarily update overflow of section count in zeroth section
1656	sh_size field.
1657	If section content hasn't been read yet, do it before looking for the
1658	block size.  If no section data present, infer size of section header.
1659
16602005-05-11  Ulrich Drepper  <drepper@redhat.com>
1661
1662	* elf.h: Update again.
1663
16642005-05-09  Ulrich Drepper  <drepper@redhat.com>
1665
1666	* elf.h: Update from glibc.
1667
16682005-05-08  Roland McGrath  <roland@redhat.com>
1669
1670	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1671	* elf_update.c (write_file) [_MUDFLAP]: Likewise.
1672
16732005-03-29  Ulrich Drepper  <drepper@redhat.com>
1674
1675	* elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
1676	* elf_end.c: Likewise.
1677	* elf_getdata.c: Likewise.
1678	* gelf_getehdr.c: Likewise.
1679	* nlist.c: Likewise.
1680	* libelfP.h: Add declarations of internal functions.
1681
16822005-02-15  Ulrich Drepper  <drepper@redhat.com>
1683
1684	* common.h (CONVERT): Make sure all values are unsigned.
1685	(CONVERT_TO): Likewise.
1686
1687	* Makefile.am (AM_CFLAGS): Add -Wformat=2.
1688	Fix rule to build libelf.so.
1689
16902005-02-06  Ulrich Drepper  <drepper@redhat.com>
1691
1692	* Makefile.am: Cleanup AM_CFLAGS handling.  Add -Wunused -Wextra.
1693	Remove lint handling.
1694	* elf32_getphdr.c: Minor cleanups.
1695	* elf32_getshdr.c: Likewise.
1696	* elf32_updatefile.c: Likewise.
1697	* elf32_updatenull.c: Likewise.
1698	* elf_begin.c: Likewise.
1699	* elf_error.c: Likewise.
1700	* elf_getarsym.c: Likewise.
1701	* elf_getdata.c: Likewise.
1702	* elf_update.c: Likewise.
1703	* gelf_xlate.c: Likewise.
1704
17052005-02-05  Ulrich Drepper  <drepper@redhat.com>
1706
1707	* Makefile.am: Check for text relocations in constructed DSO.
1708
1709	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1710
17112005-02-04  Ulrich Drepper  <drepper@redhat.com>
1712
1713	* gelf_getehdr.c (gelf_getehdr): Slight optimization.
1714
1715	* elf32_checksum.c (checksum): Do not look at NOBITS sections.
1716
1717	* gelf.h: Add gelf_checksum prototype.
1718
17192004-09-25  Ulrich Drepper  <drepper@redhat.com>
1720
1721	* elf32_checksum.c: Make compile with gcc 4.0.
1722	* elf32_updatefile.c: Likewise.
1723	* elf32_updatenull.c: Likewise.
1724	* elf_begin.c: Likewise.
1725	* elf_error.c: Likewise.
1726	* elf_getdata.c: Likewise.
1727	* elf_getident.c: Likewise.
1728
17292004-04-01  Ulrich Drepper  <drepper@redhat.com>
1730
1731	* elf.h: Update from glibc.
1732
17332004-01-23  Ulrich Drepper  <drepper@redhat.com>
1734
1735	* elf_update.c: Fix locking.
1736	* elf_clone.c: Likewise.
1737
1738	* libelf.h: Define ELF_T_LIB.
1739	* gelf_getlib.c: New file.
1740	* gelf_update_lib.c: New file.
1741	* gelf.h: Declare the new functions.  Define GElf_Lib.
1742	* abstract.h: Define Lib, Lib32, Lib64.
1743	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
1744	* gelf_xlate.h: Add entry for ElfXX_Lib.
1745	* elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
1746	* libelf.map: Add new symbols to ELFUTILS_1.1.
1747	* Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
1748	gelf_update_lib.c.
1749
17502004-01-17  Ulrich Drepper  <drepper@redhat.com>
1751
1752	* Makefile.am: Support building with mudflap.
1753
1754	* gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
1755	* dl-hash.h (_dl_elf_hash): Likewise.
1756
17572004-01-05  Ulrich Drepper  <drepper@redhat.com>
1758
1759	* elf-knowledge.h: New file.  From libelf subdir.
1760	* Makefile.am (euincludedir): Define.
1761	(euinclude_HEADERS): Add elf-knowledge.h.
1762
17632003-09-24  Ulrich Drepper  <drepper@redhat.com>
1764
1765	* elf.h: Define some PT_IA_64_HP_* constants.
1766
17672003-09-23  Jakub Jelinek  <jakub@redhat.com>
1768
1769	* libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
1770	state.elf64.scnincr to match state.elf{,32}.
1771
17722003-08-12  Ulrich Drepper  <drepper@redhat.com>
1773
1774	* elf32_updatefile.c (__updatemmap): When writing back file where
1775	some sections have not been read in, count their sizes based on
1776	the section header.
1777
17782003-08-11  Ulrich Drepper  <drepper@redhat.com>
1779
1780	* Moved to CVS archive.
1781