• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12016-01-22  Chih-Hung Hsieh <chh@google.com>
2
3	* elf_compress.c (__libelf_compress): Move nested function
4	'do_deflate_cleanup' to file scope to compile with clang.
5	* elf_strptr.c (elf_strptr): Move nested function 'get_zdata'
6	to file scope to compile with clang.
7
82016-01-13  Mark Wielaard  <mjw@redhat.com>
9
10	* libelf.h: Check SHF_COMPRESSED is defined. If not define it and the
11	associated ELF compression types/defines.
12
132015-11-26  Mark Wielaard  <mjw@redhat.com>
14
15	* elf_compress.c (__libelf_decompress_elf): New function, extracted
16	from...
17	(elf_compress): here. Check zdata_base use __libelf_decompress_elf.
18	* elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
19	use zdata.
20	* libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
21	(__libelf_decompress_elf): New internal function definition.
22
232015-10-21  Mark Wielaard  <mjw@redhat.com>
24
25	* Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
26	elf_compress_gnu.c.
27	* elf_compress.c: New file.
28	* elf_compress_gnu.c: Likewise.
29	* elf_begin.c (file_read_elf): Make a writable copy of the shdrs
30	for ELF_C_READ_MMAP.
31	* elf_end.c (elf_end): Free zdata_base.
32	* elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
33	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
34	ELF_E_DECOMPRESS_ERROR.
35	* elf_data.c (__libelf_data_type): New internal function extracted
36	from convert_data.
37	(convert_data): Handle SHF_COMPRESSED.
38	* elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
39	uncompressed section data size if SHF_COMPRESSED.
40	* elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
41	ELF_C_READ_MMAP.
42	* libelf.h: Define elf_compress and elf_compress_gnu.
43	* libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
44	* libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
45	ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
46	ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
47	(__libelf_compress): New internal function definition.
48	(__libelf_decompress): Likewise.
49	(__libelf_reset_rawdata): Likewise.
50	(__libelf_data_type): Likewise.
51	(struct Elf_Scn): Add zdata_base.
52
532015-11-19  Mark Wielaard  <mjw@redhat.com>
54
55	* Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
56	elf64_getchdr.c and gelf_getchdr.c.
57	(noinst_HEADERS): Add chdr_xlate.h.
58	* abstract.h: Define Chdr32 and Chdr64.
59	* chdr_xlate.h: New file.
60	* elf32_getchdr.c: New file.
61	* elf64_getchdr.c: New file.
62	* elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
63	and ELF_E_INVALID_SECTION_FLAGS.
64	* elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
65	ELF_T_CHDR for SHF_COMPRESSED sections.
66	* exttypes.h: Add Chdr32 and Chdr64.
67	* gelf.h (GElf_Chdr): New typedef.
68	(gelf_getchdr): New function definition.
69	* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
70	* gelf_getchdr.c: New file.
71	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
72	* gelf_xlate.h: Add Chdr.
73	* libelf.h (Elf_Type): Add ELF_T_CHDR.
74	(elf32_getchdr): New function definition.
75	(elf64_getchdr): Likewise.
76	* libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
77	elf64_getchdr and gelf_getchdr.
78	* libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
79	and ELF_E_INVALID_SECTION_FLAGS.
80
812015-10-16  Mark Wielaard  <mjw@redhat.com>
82
83	* Makefile.am (libelf_so_LDLIBS): Add -lz.
84
852015-10-14  Mark Wielaard  <mjw@redhat.com>
86
87	* elf.h: Update from glibc. Add section compression constants and
88	structures.
89
902015-10-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
91
92	* elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
93	Fix the size argument to pread_retry.
94
952015-10-13  Chih-Hung Hsieh  <chh@google.com>
96
97	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
98	function 'fill_mmap' to file scope.
99	* elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
100	to file scope.
101
1022015-10-09  Josh Stone  <jistone@redhat.com>
103
104	* libelf.h: Replace loff_t with int64_t throughout.
105
1062015-10-05  Mark Wielaard  <mjw@redhat.com>
107
108	* elf_update.c (write_file): Only use posix_fallocate when using
109	mmap. Only report failure when errno is ENOSPC.
110
1112015-10-09  Josh Stone  <jistone@redhat.com>
112
113	* libelfP.h (struct Elf): Replace off64_t with off_t.
114	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
115
1162015-10-05  Chih-Hung Hsieh <chh@google.com>
117
118	* elf_getarsym.c (elf_getarsym): Do not use
119	union of variable length arrays.
120
1212015-10-05  Josh Stone  <jistone@redhat.com>
122
123	* Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
124
1252015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
126
127	* Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
128	relocation overflows in some platforms.
129
1302015-09-29  Mark Wielaard  <mjw@redhat.com>
131
132	* elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
133	(updatenull_wrlock): Always set e_shentsize.
134
1352015-09-23  Mark Wielaard  <mjw@redhat.com>
136
137	* elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
138	* elf32_getshdr.c (getshdr_rdlock): Likewise.
139	(getshdr_wrlock): Likewise.
140	* elf_error.c (__libelf_seterrno): Likewise.
141	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
142	(__elf_getphdrnum_chk_rdlock): Likewise.
143	* elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
144	(__elf_getphdrnum_chk_rdlock): Likewise.
145	* elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
146	* elf_readall.c (__libelf_readall): Likewise.
147	* gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
148
1492015-09-22  Mark Wielaard  <mjw@redhat.com>
150
151	* *.c: Remove old-style function definitions.
152
1532015-06-22  Mark Wielaard  <mjw@redhat.com>
154
155	* dl-hash.h: Update from glibc.
156
1572015-06-18  Mark Wielaard  <mjw@redhat.com>
158
159	* elf32_updatefile.c (updatefile): Always free shdr_data and scns
160	when allocated on failure paths.
161
1622015-06-18  Mark Wielaard  <mjw@redhat.com>
163
164	* nlist.c (nlist): Check symscn shdr exists before use.
165
1662015-06-16  Mark Wielaard  <mjw@redhat.com>
167
168	* elf_update.c (write_file): Always also use ftruncate before
169	posix_fallocate to make sure file has the right size.
170
1712015-06-04  Mark Wielaard  <mjw@redhat.com>
172
173	* elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
174	ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
175	ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
176	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
177	of rawdata against requested type.
178
1792015-06-02  Mark Wielaard  <mjw@redhat.com>
180
181	* elf_getdata.c (convert_data): Make sure source data is properly
182	aligned for type before calling actual conversion function.
183
1842015-06-04  Mark Wielaard  <mjw@redhat.com>
185
186	* elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
187	direct access.
188
1892015-06-02  Mark Wielaard  <mjw@redhat.com>
190
191	* elf_begin.c (file_read_elf): Split checks for ehdr and shdr
192	alignment, drop phdr alignment check.
193
1942015-05-31  Mark Wielaard  <mjw@redhat.com>
195
196	* elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
197	not alloca and free after conversion when a copy needs to be made.
198
1992015-05-31  Mark Wielaard  <mjw@redhat.com>
200
201	* elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
202	alloca and free after conversion when a copy needs to be made.
203
2042015-05-31  Mark Wielaard  <mjw@redhat.com>
205
206	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
207	malloc, not alloca also in !ALLOW_UNALIGNED case.
208
2092015-05-30  Mark Wielaard  <mjw@redhat.com>
210
211	* gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
212
2132015-05-30  Mark Wielaard  <mjw@redhat.com>
214
215	* elf32_updatefile.c (updatemmap): Only call mempcpy and update
216	last_position when d_size is non-zero.
217
2182015-05-17  Mark Wielaard  <mjw@redhat.com>
219
220	* elf32_updatefile.c (updatefile): Allocate shdr_data and scns
221	with malloc, not alloca. Free after writing section headers.
222
2232015-05-16  Mark Wielaard  <mjw@redhat.com>
224
225	* elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
226	with malloc, not alloca. Free after writing section header.
227
2282015-05-16  Mark Wielaard  <mjw@redhat.com>
229
230	* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
231	malloc, not alloca. Call free after out.
232
2332015-05-14  Mark Wielaard  <mjw@redhat.com>
234
235	* elf_update.c (write_file): Use posix_fallocate instead of
236	ftruncate to extend file if necessary.
237
2382015-05-13  Mark Wielaard  <mjw@redhat.com>
239
240	* elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
241	e_phoff also to zero.
242
2432015-05-12  Mark Wielaard  <mjw@redhat.com>
244
245	* elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
246	is a powerof2.
247	* elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
248	to the elf image offset.
249
2502015-05-12  Mark Wielaard  <mjw@redhat.com>
251
252	* elf32_newphdr.c (newphdr): Call __libelf_seterrno with
253	ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
254	actually exists if we need to put extended phnum in section zero.
255
2562015-05-08  Mark Wielaard  <mjw@redhat.com>
257
258	* nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
259
2602015-01-03  Mark Wielaard  <mjw@redhat.com>
261
262	* version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
263	(elf_cvt_Verneed): Likewise.
264
2652015-03-28  Mark Wielaard  <mjw@redhat.com>
266
267	* elf.h: Update from glibc.
268
2692015-03-23  Mark Wielaard  <mjw@redhat.com>
270
271	* elf32_updatenull.c (updatenull_wrlock): Don't extend size with
272	SHT_NOBITS sh_offset.
273
2742015-02-18  Mark Wielaard  <mjw@redhat.com>
275
276	* libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
277
2782015-02-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
279
280	* elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
281	sh_addralign 0 as 1.
282
2832015-01-22  Mark Wielaard  <mjw@redhat.com>
284
285	* elf_strptr (elf_strptr): Make sure returned string is NUL
286	terminated.
287
2882015-01-21  Mark Wielaard  <mjw@redhat.com>
289
290	* elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
291	of rawdata_base != NULL before using rawdata directly.
292
2932015-01-20  Mark Wielaard  <mjw@redhat.com>
294
295	* libelfP.h (__elf_strptr_internal): New function declaration.
296	* elf_getdata.c (__libelf_set_data_list_rdlock): New internal
297	function extracted from...
298	(__elf_getdata_rdlock): ... here.
299	* elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
300	datalist if necessary.
301
3022015-01-20  Mark Wielaard  <mjw@redhat.com>
303
304	* elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
305	necessary.
306
3072014-12-30  Mark Wielaard  <mjw@redhat.com>
308
309	* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
310	(elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
311	* gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
312	and always check ndx against phnum.
313	* libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
314
3152014-12-25  Mark Wielaard  <mjw@redhat.com>
316
317	* elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
318	negative. Include start_offset in maxsize.
319
3202014-12-28  Alexander Cherepanov  <cherepan@mccme.ru>
321
322	* elf_begin.c (read_long_names): Don't miss '/' right after
323	another '/'. Fixes a dir traversal vuln in ar extraction.
324
3252014-12-18  Ulrich Drepper  <drepper@gmail.com>
326
327	* Makefile.am: Suppress output of textrel_check command.
328
3292014-12-16  Mark Wielaard  <mjw@redhat.com>
330
331	* elf_begin.c (read_long_names): Make sure long_names len fits
332	in mapped ELF file.
333
3342014-12-15  Mark Wielaard  <mjw@redhat.com>
335
336	* elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow.
337
3382014-12-15  Mark Wielaard  <mjw@redhat.com>
339
340	* elf_begin.c (read_long_names): Clear any garbage left in the
341	name table.
342
3432014-12-11  Mark Wielaard  <mjw@redhat.com>
344
345	* elf_begin.c (file_read_elf): Correct ELF64 section offset check.
346
3472014-12-11  Mark Wielaard  <mjw@redhat.com>
348
349	* elf_begin.c (read_long_names): Check for offset overflow.
350	(__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.
351	Don't allow it to go beyond end of file.
352
3532014-12-09  Mark Wielaard  <mjw@redhat.com>
354
355	* elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow.
356
3572014-11-27  Mark Wielaard  <mjw@redhat.com>
358
359	* Makefile.am (libelf.so): Use textrel_check.
360
3612014-11-23  Mark Wielaard  <mjw@redhat.com>
362
363	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed
364	overflow check to unsigned.
365
3662014-11-23  Mark Wielaard  <mjw@redhat.com>
367
368	* note_xlate.h (elf_cvt_note): Copy over any leftover data if
369	src != dest. The data is probably part of truncated name/desc.
370
3712014-11-22  Mark Wielaard  <mjw@redhat.com>
372
373	* elf_getphdrnum.c (elf_getphdrnum): Sanity check the
374	__elf_getphdrnum_rdlock result.
375
3762014-11-18  Mark Wielaard  <mjw@redhat.com>
377
378	* version_xlate.h (elf_cvt_Verdef): Check for overflow.
379	(elf_cvt_Verneed): Likewise.
380
3812014-11-17  Mark Wielaard  <mjw@redhat.com>
382
383	* elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL.
384
3852014-11-16  Mark Wielaard  <mjw@redhat.com>
386
387	* elf_getshdrstrndx.c: Check there are section headers before
388	handling SHN_XINDEX.
389
3902014-11-16  Mark Wielaard  <mjw@redhat.com>
391
392	* elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero.
393	Check for too many pheaders.
394	* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero
395	actually exists before handling PN_XNUM.
396
3972014-11-16  Mark Wielaard  <mjw@redhat.com>
398
399	* gelf_getnote.c (gelf_getnote): Check padding overflow.
400
4012014-11-16  Mark Wielaard  <mjw@redhat.com>
402
403	* elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
404	and align as Elf64_Off and Elf64_Xword not size_t.
405
4062014-11-14  Mark Wielaard  <mjw@redhat.com>
407
408	* gelf_getnote.c (gelf_getnote): Check offset overflow.
409
4102014-11-13  Mark Wielaard  <mjw@redhat.com>
411
412	* elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow
413	check.
414
4152014-11-08  Mark Wielaard  <mjw@redhat.com>
416
417	* elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy.
418
4192014-11-07  Mark Wielaard  <mjw@redhat.com>
420
421	* elf_begin.c (file_read_elf): Correct sh_size check.
422	* elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned
423	overflow.
424
4252014-09-10  Petr Machata  <pmachata@redhat.com>
426
427	* elf_begin (read_unmmaped_file): Call __libelf_seterrno if the
428	file is unreadable.
429
4302014-07-07  Mark Wielaard  <mjw@redhat.com>
431
432	* elf.h: Update from glibc.
433
4342014-04-13  Mark Wielaard  <mjw@redhat.com>
435
436	* Makefile.am: Remove !MUDFLAP conditions.
437	* elf_begin.c (read_file): Don't clear use_mmap when _MUDFLAP is
438	defined.
439	* elf_update.c (write_file): Remove _MUDFLAP condition.
440
4412014-01-17  Jakub Jelinek  <jakub@redhat.com>
442	    Roland McGrath  <roland@redhat.com>
443
444	* libelfP.h (INVALID_NDX): Define.
445	* gelf_getdyn.c (gelf_getdyn): Use it.  Remove ndx < 0 test if any.
446	* gelf_getlib.c (gelf_getlib): Likewise.
447	* gelf_getmove.c (gelf_getmove): Likewise.
448	* gelf_getrel.c (gelf_getrel): Likewise.
449	* gelf_getrela.c (gelf_getrela): Likewise.
450	* gelf_getsym.c (gelf_getsym): Likewise.
451	* gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
452	* gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
453	* gelf_getversym.c (gelf_getversym): Likewise.
454	* gelf_update_dyn.c (gelf_update_dyn): Likewise.
455	* gelf_update_lib.c (gelf_update_lib): Likewise.
456	* gelf_update_move.c (gelf_update_move): Likewise.
457	* gelf_update_rel.c (gelf_update_rel): Likewise.
458	* gelf_update_rela.c (gelf_update_rela): Likewise.
459	* gelf_update_sym.c (gelf_update_sym): Likewise.
460	* gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
461	* gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
462	* gelf_update_versym.c (gelf_update_versym): Likewise.
463
4642014-01-17  Jakub Jelinek  <jakub@redhat.com>
465
466	* elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
467	table fits into object's bounds.
468	* elf_getshdrstrndx.c (elf_getshstrndx): Add elf->start_offset to
469	elf->map_address.  Check if first section header fits into object's
470	bounds.
471	* elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
472	Check if section header table fits into object's bounds.
473	* elf_begin.c (get_shnum): Ensure section headers fits into
474	object's bounds.
475	(file_read_elf): Make sure scncnt is small enough to allocate both
476	ElfXX_Shdr and Elf_Scn array.  Make sure section and program header
477	tables fit into object's bounds.  Avoid memory leak on failure.
478	* elf_newscn.c (elf_newscn): Check for overflow.
479	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
480	(__elfw2(LIBELFBITS,updatefile)): Likewise.
481	* elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
482	* elf_getarsym.c (elf_getarsym): Likewise.
483
4842013-11-08  Mark Wielaard  <mjw@redhat.com>
485
486	* elf32_updatefile.c (elfXX_updatemmap): Only memcpy ehdr when not
487	already directly mmapped.
488
4892013-11-05  Mark Wielaard  <mjw@redhat.com>
490
491	* elf32_updatefile.c (elfXX_updatefile): Copy all section headers
492	if elf->flags dirty.
493
4942013-11-01  Michael Forney  <mforney@mforney.org>
495
496	* Makefile.am: Use READELF.
497
4982013-10-01  Petr Machata  <pmachata@redhat.com>
499
500	* elf.h: Update from glibc.
501
5022013-06-17  Petr Machata  <pmachata@redhat.com>
503
504	* elf.h: Update from glibc.
505
5062013-08-28  Namhyung Kim  <namhyung@gmail.com>
507
508	* gelf.h (gelf_fsize): Fix typo in comment.
509
5102013-08-28  Mark Wielaard  <mjw@redhat.com>
511
512	* gelf_getauxv.c (gelf_getauxv): Add missing whitespace.
513
5142013-08-27  Mark Wielaard  <mjw@redhat.com>
515
516	* gelf_getauxv.c (gelf_getauxv): Remove unnecessary casts to char *.
517
5182013-08-25  Kurt Roeckx  <kurt@roeckx.be>
519
520	* gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
521	dereference to avoid alignment problems.
522
5232013-01-07  Roland McGrath  <roland@hack.frob.com>
524
525	* elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
526	would be unaligned and !ALLOW_UNALIGNED.
527
528	* elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
529	dereference so as not to assume the field is naturally aligned.
530
5312012-09-17  Petr Machata  <pmachata@redhat.com>
532
533	* elf.h: Update from glibc.
534
5352012-08-16  Roland McGrath  <roland@hack.frob.com>
536
537	* elf.h: Update from glibc.
538
5392012-08-14  Mark Wielaard  <mjw@redhat.com>
540
541	* elf32_checksum.c (ebl_debugscn_p): Removed unused define and
542	confusing outdated comment.
543
5442012-08-01  Petr Machata  <pmachata@redhat.com>
545
546	* elf_getarsym (read_number_entries): New function.
547	(elf_getarsym): Handle 64-bit symbol table, stored in special
548	entry named "/SYM64/".
549	* elf_begin.c (__libelf_next_arhdr_wrlock): Don't reject archive
550	because it contains 64-bit symbol table.
551
5522012-07-19  Mark Wielaard  <mjw@redhat.com>
553
554	* elf32_getshdr.c (load_shdr_wrlock): Add elf->flags & ELF_F_MALLOCED
555	to asserts.
556
5572012-07-17  Petr Machata  <pmachata@redhat.com>
558
559	* elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
560	integer number of records in case of ELF_T_NHDR.
561
5622012-04-02  Mark Wielaard  <mjw@redhat.com>
563
564	* elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
565	there are no nonempty sections at that offset.
566
5672012-03-21  Roland McGrath  <roland@hack.frob.com>
568
569	* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
570
5712011-02-26  Mark Wielaard  <mjw@redhat.com>
572
573	* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
574
5752011-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
576
577	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
578	when MAXIMUM_SIZE == ~0.
579
5802010-08-18  Roland McGrath  <roland@redhat.com>
581
582	* gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
583	and ELF_T_GNUHASH.
584	Reported by Mark Hatle <mark.hatle@windriver.com>.
585
586	* exttypes.h: Add cases for ElfNN_Lib.
587	Reported by Mark Hatle <mark.hatle@windriver.com>.
588
5892010-06-14  Ulrich Drepper  <drepper@redhat.com>
590
591	* gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
592	* gelf_update_phdr.c: Likewise.
593	* gelf_update_ehdr.c: Likewise.
594
5952010-04-14  Roland McGrath  <roland@redhat.com>
596
597	* elf32_getphdr.c: Check for e_phoff/size outside the file bounds.
598	* elf_begin.c (file_read_elf): Don't set .phdr here.
599
6002010-04-13  Roland McGrath  <roland@redhat.com>
601
602	* elf.h: Update from glibc.
603
6042010-04-06  Roland McGrath  <roland@redhat.com>
605
606	* elf_error.c (ELF_E_FD_MISMATCH_IDX): Avoid nonobvious abbreviation
607	in error message.
608
6092010-04-01  Petr Machata  <pmachata@redhat.com>
610
611	* elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data
612	that do not need a conversion.
613
6142010-03-11  Roland McGrath  <roland@redhat.com>
615
616	* elf.h: Update from glibc.
617
6182010-03-04  Ulrich Drepper  <drepper@redhat.com>
619
620	* elf.h: Update from glibc.
621
6222010-02-17  Roland McGrath  <roland@redhat.com>
623
624	* elf_begin.c (file_read_elf): Leave section rawdata_base and
625	data_base pointers null when [sh_offset,sh_size) points outside
626	the mapped file.
627
6282010-02-15  Roland McGrath  <roland@redhat.com>
629
630	* Makefile.am: Use config/eu.am for common stuff.
631
6322010-01-07  Roland McGrath  <roland@redhat.com>
633
634	* elf32_getphdr.c: Use __elf_getphdrnum_rdlock.
635	* gelf_getphdr.c: Likewise.
636	* gelf_update_phdr.c: Likewise.
637	* elf32_updatefile.c (__elf32_updatemmap, __elf32_updatefile): Likewise.
638	* elf32_updatenull.c (__elf32_updatenull_wrlock): Likewise.
639	* elf32_newphdr.c: Clear section 0's sh_info when resetting e_phnum.
640	If COUNT is too large, use store PN_XNUM instead and set sh_info.
641	* elf_begin.c (file_read_elf): Always allocate space we can use later
642	for section 0 if doing RDWR.
643
644	* elf_getphdrnum.c: New file.
645	* Makefile.am (libelf_a_SOURCES): Add it.
646	* libelf.h: Declare elf_getphdrnum.
647	* libelfP.h: Declare __elf_getphdrnum_rdlock.
648	* libelf.map (ELFUTILS_1.6): New set, add elf_getphdrnum.
649
650	* elf.h: Update from glibc.
651
6522009-10-23  Lubomir Rintel  <lkundrak@v3.sk>
653
654	* elf32_updatefile.c (fill_mmap): When starting past shdr_end, start
655	filling from section start, not shdr_end.
656
6572009-11-10  Roland McGrath  <roland@redhat.com>
658
659	* elf_readall.c (__libelf_readall): Fetch file size if not yet known.
660
6612009-11-06  Mark Wielaard  <mjw@redhat.com>
662
663	* elf_next.c (elf_next): Mark the archive header as unusable when
664	there is no next ar element.
665
6662009-08-12  Mark Wielaard  <mjw@redhat.com>
667
668	* Makefile.am (libelf.so): Use -Wl,-z,defs not -defs.
669
6702009-07-26  Ulrich Drepper  <drepper@redhat.com>
671
672	* elf.h: Update from glibc.
673
6742009-07-21  Ulrich Drepper  <drepper@redhat.com>
675
676	* elf32_updatefile.c (__elfXX_updatemmap): Fix handling of gaps between
677	sections.  Patch by Lubomir Rintel <lkundrak@v3.sk>.
678
6792009-07-08  Roland McGrath  <roland@redhat.com>
680
681	* libelfP.h (struct Elf): Remove unused ar.has_index field.
682	Reorder various members for optimal packing.
683
6842009-07-08  Ulrich Drepper  <drepper@redhat.com>
685
686	* elf.h: Update from glibc.
687
6882009-06-13  Ulrich Drepper  <drepper@redhat.com>
689
690	* Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
691	elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c.
692	* elf_getshnum.c: Renamed to...
693	* elf_getshdrnum.c: ...this.  Rename function and add old name as
694	alias.  Likewise for internal functions with derived names.
695	* elf_getshstrndx.c: Renamed to...
696	* elf_getshdrstrndx.c: ...this.  Rename function and add old name as
697	alias.  Likewise for internal functions with derived names.
698	* libelf.h: Add prototypes for new names.  Make old names as
699	deprecated.
700	* libelfP.h: Rename internal function prototypes.
701	* libelf.map: Export for names.
702	* elf32_checksum.c: Don't use deprecated functions.
703	* elf32_getshdr.c: Likewise.
704
7052009-06-01  Ulrich Drepper  <drepper@redhat.com>
706
707	* elf.h: Update from glibc.
708
7092009-04-14  Roland McGrath  <roland@redhat.com>
710
711	* elf.h: Update from glibc.
712
7132009-04-01  Roland McGrath  <roland@redhat.com>
714
715	* elf.h: Update from glibc.
716
7172009-02-10  Ulrich Drepper  <drepper@redhat.com>
718
719	* elf32_updatefile.c (updatefile): For the zeroth section we still
720	have to copy the section header.
721
7222009-02-01  Ulrich Drepper  <drepper@redhat.com>
723
724	* elf_strptr.c: Add comment re possible problem.
725
7262009-01-26  Ulrich Drepper  <drepper@redhat.com>
727
728	* elf32_updatenull.c (updatenull_wrlock): Fix comment of
729	ELF_F_LAYOUT behaviour re section header table.
730
7312009-01-22  Ulrich Drepper  <drepper@redhat.com>
732
733	* elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between
734	sections even if only the section at the start of the gap has been
735	changed.
736	(__elfXX_updatefile): Likewise.
737
7382009-01-21  Ulrich Drepper  <drepper@redhat.com>
739
740	* elf32_updatefile.c (__elfXX_updatemmap): Skip most of the loop to
741	handle sections for NOBITS sections.
742	(elfXX_updatefile): Likewise.
743
744	* elf32_updatefile.c (__elfXX_updatemmap): When skipping non-NOBITS
745	sections we haven't loaded, update last_position based on scn_start,
746	not based on old value.  Don't run the loop for the dummy section 0.
747	(elfXX_updatefile): Don't run the loop for the dummy section 0.
748
7492009-01-10  Ulrich Drepper  <drepper@redhat.com>
750
751	* libelfP.h (_): We only have one translation domain, elfutils.
752
753	* Makefile.am: Use USE_LOCKS instead of USE_TLS.
754	* elf_error.c: Always use __thread.  Remove all !USE_TLS code.
755
7562009-01-04  Roland McGrath  <roland@redhat.com>
757
758	* note_xlate.h (elf_cvt_note): Don't examine a size too small to
759	container a note header.
760
7612008-12-11  Roland McGrath  <roland@redhat.com>
762
763	* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Handle
764	placement offset going backwards, for out-of-order or overlapping
765	(bogus) sh_offset layouts.  It's a dumb use, but should not crash.
766	(__elfw2(LIBELFBITS,updatefile)): Likewise.
767	Fixes RHBZ#476136.
768
769	* libelf.h (Elf_Data): Whitespace fix.
770
7712008-12-10  Roland McGrath  <roland@redhat.com>
772
773	* elf_getarhdr.c (elf_getarhdr): Fix missing rename in last change.
774
7752008-10-22  Petr Machata  <pmachata@redhat.com>
776
777	* elf_rawfile.c (elf_rawfile): Lock around elf-> references.
778
7792008-10-21  Petr Machata  <pmachata@redhat.com>
780
781	* libelfP.h: Rename getehdr_rdlock to getehdr_wrlock.
782	* elf32_getehdr.c (getehdr_rdlock): Move the code to new function
783	getehdr_impl and make it a wrapper.  Rename to getehdr_wrlock.
784	(getehdr_impl): Guard elf->class init with wrlock.
785	(getehdr): Also make it a wrapper of getehdr_impl.
786	* elf32_updatenull.c (updatenull_wrlock): Call getehdr_wrlock.
787
7882008-10-20  Petr Machata  <pmachata@redhat.com>
789
790	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Lock around the
791	code that reads mutable elf state.  Relock to write lock to chain
792	the new chunk on the elf rawchunks list.
793
7942008-10-20  Petr Machata  <pmachata@redhat.com>
795
796	* elf32_checksum.c (checksum): Place a lock around the code that
797	processes data.  Make it wrlock if the code needs to xlate the
798	data before processing.
799
8002008-10-16  Petr Machata  <pmachata@redhat.com>
801
802	* elf_begin.c
803	(__libelf_next_arhdr): Rename to __libelf_next_arhdr_wrlock.
804	(dup_elf): Adjust the call.
805	(elf_begin): New local function lock_dup_elf.  Relocks the elf if
806	necessary before calling dup.  Call this instead of dup_elf.
807	* elf_getarhdr.c
808	(elf_getarhdr): Lock before calling __libelf_next_arhdr_wrlock.
809	* elf_next.c (elf_next): Likewise.
810	* elf_rand.c (elf_rand): Likewise.
811
8122008-10-14  Petr Machata  <pmachata@redhat.com>
813
814	* elf_getdata.c (__elf_getdata_rdlock): Lock before converting.
815
8162008-11-26  Roland McGrath  <roland@redhat.com>
817
818	* elf.h: Update from glibc.
819
8202008-10-06  Roland McGrath  <roland@redhat.com>
821
822	* elf_getarhdr.c (elf_getarhdr): Return NULL when passed NULL.
823
8242008-08-27  Roland McGrath  <roland@redhat.com>
825
826	* elf_begin.c (get_shnum): Avoid misaligned reads for matching endian.
827
828	* libelfP.h [!ALLOW_UNALIGNED] (__libelf_type_align): Fix CLASS index.
829
8302008-08-25  Roland McGrath  <roland@redhat.com>
831
832	* Makefile.am (libelf_so_LDLIBS): New variable.
833	(libelf.so): Use it in the link.
834
8352008-08-21  Petr Machata  <pmachata@redhat.com>
836
837	* elf_getdata.c, libelfP.h
838	(__elf_getdata_internal): Rename to __elf_getdata_rdlock.
839	(__libelf_set_rawdata_wrlock): New function.
840	(__libelf_set_rawdata): Make it a wrapper that calls *_wrlock.
841	* elf32_updatenull.c, libelfP.h
842	(__elfNN_updatenull): Rename to __elfNN_updatenull_wrlock.
843
8442008-08-21  Petr Machata  <pmachata@redhat.com>
845
846	* elf32_getphdr.c, libelfP.h
847	(__elfNN_getphdr_internal): Drop.  Move __elfNN_getphdr_internal
848	code to __elfNN_getphdr_wrlock.
849	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): New functions.
850	(__elfNN_getphdr_rdlock, __elfNN_getphdr_wrlock): Make these
851	wrappers of getphdr_impl.
852
8532008-08-21  Petr Machata  <pmachata@redhat.com>
854
855	* elf32_getehdr.c, libelfP.h
856	(__elfNN_getehdr_internal): Rename to __elfNN_getehdr_rdlock.
857	* gelf_getehdr, libelfP.h:
858	(__gelf_getehdr_internal): Rename to __gelf_getehdr_rdlock.
859
8602008-08-21  Petr Machata  <pmachata@redhat.com>
861
862	* elf32_getshdr.c
863	(__elfNN_getshdr_internal): Drop.
864	(load_shdr_wrlock, scn_valid): New functions, contain bits of
865	behaviour from __elfNN_getshdr_internal.
866	(__elfNN_getshdr_rdlock, __elfNN_getshdr_wrlock): Replacements for
867	dropped _internal functions above.
868	* elf_getshnum.c
869	(__elf_getshnum_internal): Rename to __elf_getshnum_rdlock.
870
8712008-08-04  Petr Machata  <pmachata@redhat.com>
872
873	* libelfP.h (RWLOCK_RDLOCK, RWLOCK_WRLOCK, RWLOCK_UNLOCK): New macros.
874
8752008-07-28  Roland McGrath  <roland@redhat.com>
876
877	* elf.h: Update from glibc.
878
8792008-03-31  Roland McGrath  <roland@redhat.com>
880
881	* elf32_offscn.c: Make sure shdrs have been read in.
882
8832008-02-19  Roland McGrath  <roland@redhat.com>
884
885	* elf.h: Update from glibc.
886
8872008-02-08  Roland McGrath  <roland@redhat.com>
888
889	* elf.h: Update from glibc.
890
8912008-01-31  Ulrich Drepper  <drepper@redhat.com>
892
893	* elf_strptr.c (elf_strptr): Don't fail if the ELF file is currently
894	under construction and no raw data can be read from disk.
895
8962008-01-30  Roland McGrath  <roland@redhat.com>
897
898	* elf.h: Update from glibc.
899
9002008-01-26  Roland McGrath  <roland@redhat.com>
901
902	* elf_begin.c (__libelf_next_arhdr): Rewrite conversions using a macro.
903	Fixes various pastos in wrong type in sizeof, wrong string parsed.
904
9052008-01-20  Roland McGrath  <roland@redhat.com>
906
907	* elf_getaroff.c: Calculate from start_offset, instead of using
908	parent's state.ar.offset field.
909
9102008-01-08  Roland McGrath  <roland@redhat.com>
911
912	* Makefile.am (euinclude): Variable removed.
913	(pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
914
9152008-01-03  Roland McGrath  <roland@redhat.com>
916
917	* common.h: Add __attribute__ ((unused)) to static functions.
918
9192007-12-20  Ulrich Drepper  <drepper@redhat.com>
920
921	* Makefile.am (libelf_a_SOURCES): Add elf_scnshndx.
922	* libelfP.h (struct Elf_Scn): Add shndx_index field.
923	Declare __elf_scnshndx_internal.
924	* elf32_getshdr.c: Record location of extended section header.
925	* elf_begin.c (file_read_elf): Likewise.
926	* elf_scnshndx.c: New file.
927	* libelf.h: Declare elf_scnshndx.
928	* libelf.map: Add elf_scnshndx to version ELFUTILS_1.4.
929
9302007-11-12  Roland McGrath  <roland@redhat.com>
931
932	* libelf.h: Replace off64_t with loff_t throughout.
933	Only that type name is unconditionally defined by <sys/types.h>
934
9352007-11-03  Roland McGrath  <roland@redhat.com>
936
937	* libelf.h (Elf_Data): Comment fix.
938
9392007-10-18  Roland McGrath  <roland@redhat.com>
940
941	* elf.h: Update from glibc.
942
9432007-10-07  Roland McGrath  <roland@redhat.com>
944
945	* elf_begin.c (__libelf_next_arhdr): Fix fencepost error and wrong
946	member access in terminating name with no trailing /.  Trim trailing
947	spaces when there is no /.
948
9492007-10-04  Roland McGrath  <roland@redhat.com>
950
951	* elf_end.c (elf_end): Don't free ELF->state.ar.ar_sym when it's -1l.
952
9532007-10-03  Roland McGrath  <roland@redhat.com>
954
955	* libelf.h (Elf_Data): Use off64_t for d_off.
956	(Elf_Arhdr): Use off64_t for ar_size.
957	(elf_update, elf_getbase, elf_getaroff): Return off64_t.
958
959	* gelf_rawchunk.c: File removed.
960	* gelf_freechunk.c: File removed.
961	* Makefile.am (libelf_a_SOURCES): Remove them.
962	* libelf.map (ELFUTILS_1.0): Remove exports.
963	* gelf.h: Remove decls.
964
965	* elf_getdata_rawchunk.c: New file.
966	* Makefile.am (libelf_a_SOURCES): Add it.
967	* libelf.map (ELFUTILS_1.3): Add elf_getdata_rawchunk.
968	* libelf.h: Declare it.
969	* libelfP.h (Elf_Data_Chunk): New type.
970	(struct Elf.elf): New member `rawchunks'.
971	* elf_end.c (elf_end): Free recorded rawchunk buffers.
972
9732007-08-24  Roland McGrath  <roland@redhat.com>
974
975	* gelf_getnote.c: New file.
976	* Makefile.am (libelf_a_SOURCES): Add it.
977	* gelf.h: Declare gelf_getnote.
978	* libelf.map (ELFUTILS_1.3): Add gelf_getnote.
979
980	* libelfP.h (NOTE_ALIGN): New macro.
981	* note_xlate.h: New file.
982	* Makefile.am (noinst_HEADERS): Add it.
983	* gelf_xlate.c: Include it.
984	(__elf_xfctstom): Use elf_cvt_note.
985	* elf_getdata.c (shtype_map, __libelf_type_align): Handle SHT_NOTE.
986	(__libelf_set_rawdata): Likewise.
987
9882007-08-19  Roland McGrath  <roland@redhat.com>
989
990	* gelf_update_auxv.c: New file.
991	* gelf_getauxv.c: New file.
992	* Makefile.am (libelf_a_SOURCES): Add them.
993	* gelf.h: Declare gelf_getauxv, gelf_update_auxv.
994	* libelf.map (ELFUTILS_1.3): New set, inherits fom ELFUTILS_1.2.
995	Export gelf_getauxv, gelf_update_auxv.
996
997	* libelf.h (Elf_Type): Add ELF_T_AUXV.
998	* abstract.h: Add auxv_t entries.
999	* exttypes.h: Likewise.
1000	* gelf_xlate.h: Likewise.
1001	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_AUXV entries.
1002	* gelf_fsize.c (__libelf_type_sizes): Likewise.
1003
10042007-08-12  Roland McGrath  <roland@redhat.com>
1005
1006	* elf32_updatefile.c (compare_sections): Sort secondarily on sh_size,
1007	and only tertiarily on index.
1008
10092007-07-09  Roland McGrath  <roland@redhat.com>
1010
1011	* elf.h: Update from glibc.
1012
10132007-04-22  Roland McGrath  <roland@redhat.com>
1014
1015	* elf.h: Update from glibc.
1016
10172007-03-18  Roland McGrath  <roland@redhat.com>
1018
1019	* elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
1020	Return zero when the section headers do not fit within MAXSIZE.
1021
10222007-03-09  Roland McGrath  <roland@redhat.com>
1023
1024	* libelfP.h (LIBELF_EV_IDX): New macro.
1025	(__libelf_type_align): New macro.
1026	[! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
1027	* elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
1028	(convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
1029	and __libelf_type_sizes, in place of old table.
1030	(__libc_type_aligns): New const variable.
1031
10322007-02-04  Ulrich Drepper  <drepper@redhat.com>
1033
1034	* Makefile (libelf.so): Build with -z relro.
1035
1036	* elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE.
1037
10382007-01-30  Ulrich Drepper  <drepper@redhat.com>
1039
1040	* nlist.c: Close file descriptor before returning.
1041
10422007-01-20  Roland McGrath  <roland@redhat.com>
1043
1044	* gnuhash_xlate.h (elf_cvt_gnuhash): Fix fence-post error so we
1045	convert the final word.
1046
1047	* elf32_getshdr.c: Don't byteswap shdr fields when EI_DATA matches
1048	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1049
10502007-01-18  Roland McGrath  <roland@redhat.com>
1051
1052	* gelf_rawchunk.c (gelf_rawchunk): Clear RESULT pointer after freeing
1053	it on read error.
1054
10552006-10-13  Roland McGrath  <roland@redhat.com>
1056
1057	* elf32_updatenull.c: Look for and accept phdr also for ET_CORE.
1058	* elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
1059
10602006-08-29  Roland McGrath  <roland@redhat.com>
1061
1062	* elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
1063	MY_ELFDATA on !ALLOW_UNALIGNED machines.
1064	Reported by Christian Aichinger <Greek0@gmx.net>.
1065
1066	* Makefile.am (CLEANFILES): Add libelf.so.$(VERSION).
1067
10682006-08-08  Ulrich Drepper  <drepper@redhat.com>
1069
1070	* elf.h (DT_VALNUM): Update.
1071	(DT_ADDRNUM): Likewise.
1072
10732006-07-12  Ulrich Drepper  <drepper@redhat.com>
1074
1075	* elf32_updatefile.c: Adjust for internal_function_def removal.
1076	* elf32_updatenull.c: Likewise.
1077	* elf_begin.c: Likewise.
1078	* elf_getdata.c: Likewise.
1079
10802006-07-11  Ulrich Drepper  <drepper@redhat.com>
1081
1082	* libelf.h: Define ELF_T_GNUHASH.
1083	* elf_getdata.c (TYPEIDX): Handle SHT_GNU_HASH.
1084	(shtype_map): Add SHT_GNU_HASH entries.
1085	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_GNUHASH entries.
1086	* gnuhash_xlate.h: New file.
1087	* Makefile.am (noinst_HEADERS): Add gnuhash_xlate.h.
1088
10892006-07-06  Ulrich Drepper  <drepper@redhat.com>
1090
1091	* elf_gnu_hash.c: New file.
1092	* libelf.h: Declare elf_gnu_hash.
1093	* Makefile.am (libelf_a_SOURCES): Add elf_gnu_hash.
1094	* libelf.map: Add elf_gnu_map for version ELFUTILS_1.2.
1095
10962006-06-15  Roland McGrath  <roland@redhat.com>
1097
1098	* libelf.h (elf_getarsym): Fix comment typo.
1099	Rename second parameter to be more explanatory.
1100	(elf_getident, elf_rawhide): Likewise.
1101
11022006-05-28  Ulrich Drepper  <drepper@redhat.com>
1103
1104	* elf32_updatefile.c (updatemmap): Preserve section content if
1105	copying would overwrite them.
1106	Fix msync paramters.
1107
11082006-04-04  Roland McGrath  <roland@redhat.com>
1109
1110	* elf32_updatefile.c (updatemmap): Handle other-endian case.
1111
11122006-04-04  Ulrich Drepper  <drepper@redhat.com>
1113
1114	* elf32_updatefile.c (updatemmap): Cleanups.  Remove shdr_dest
1115	variable.  Before writing sections, make a copy of the section
1116	header data if necessary.  Don't write section header while
1117	writing the section constent, it might overwrite some sections.
1118	Restore the pointer afterwards.
1119	* elf32_updatenull.c (updatenull): If the offset of a section in a
1120	file changed make sure we read the section so that it'll be written
1121	out.
1122
1123	* elf_update.c: Remove debug message.
1124
11252005-12-07  Roland McGrath  <roland@redhat.com>
1126
1127	* gelf_xlate.c [! ALLOW_UNALIGNED] (union unaligned): New type.
1128	(FETCH, STORE): New macros.
1129	(INLINE3): Use those to do alignment-friendly conversion.
1130
1131	* elf32_getshdr.c: Include map_address and start_offset in alignment
1132	calculations.
1133	* elf32_getphdr.c: Likewise.
1134
11352005-11-19  Roland McGrath  <roland@redhat.com>
1136
1137	* elf.h: Update from glibc.
1138
11392005-11-17  Roland McGrath  <roland@redhat.com>
1140
1141	* elf.h: Update from glibc.
1142
11432005-11-10  Roland McGrath  <roland@redhat.com>
1144
1145	* elf.h: Update from glibc.
1146
11472005-09-09  Roland McGrath  <roland@redhat.com>
1148
1149	* elf_update.c (write_file): Stat the file and fchmod it after update
1150	if its mode had S_ISUID or S_ISGID bits set.
1151
11522005-08-28  Ulrich Drepper  <drepper@redhat.com>
1153
1154	* elf32_getphdr.c: Include <system.h>.  Use pread_retry instead of
1155	pread.  And branch prediction where useful.
1156	* elf_begin.c: Likewise.
1157	* elf_getdata.c: Likewise.
1158	* elf_getshstrndx.c: Likewise.
1159	* elf_readall.c: Likewise.
1160	* gelf_rawchunk.c: Likewise.
1161	* elf32_updatefile.c: Include <system.h>.  Use pread_retry instead of
1162	pread.  And branch prediction where useful.
1163	* elf_getarsym.c: Don't define pread_retry here.
1164
1165	* Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1166	(%.os): Use COMPILE.os.
1167	(COMPILE.os): Filter out gconv options.
1168
11692005-08-27  Ulrich Drepper  <drepper@redhat.com>
1170
1171	* elf_begin.c (file_read_elf): Avoid reading ELF header from file
1172	again.  Instead accept additional parameter which points to it if we
1173	don't use mmap.
1174	(get_shnum): Use passed in e_ident value as source of ELF header.
1175
11762005-08-15  Ulrich Drepper  <drepper@redhat.com>
1177
1178	* elf_begin.c (__libelf_next_arhdr): Use TEMP_FAILURE_RETRY.
1179
1180	* Makefile (libelf_a_SOURCES): Add elf_getaroff.c.
1181	* libelf.map: Export elf_getaroff.
1182	* libelf.h: Declare elf_getaroff.
1183	* elf_getaroff.c: New file.
1184
11852005-08-13  Ulrich Drepper  <drepper@redhat.com>
1186
1187	* elf_begin.c (get_shnum): Optimize memory handling.  Always read from
1188	mapped file if available.  Fix access to 64-bit sh_size.  Recognize
1189	overflow.
1190	(file_read_elf): Likewise.
1191
11922005-08-12  Roland McGrath  <roland@redhat.com>
1193
1194	* elf32_offscn.c: Do not match empty sections at OFFSET unless
1195	there are no nonempty sections at that offset.
1196
11972005-08-07  Ulrich Drepper  <drepper@redhat.com>
1198
1199	* elf.h: Update from glibc.
1200
12012005-08-06  Ulrich Drepper  <drepper@redhat.com>
1202
1203	* Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
1204
12052005-08-03  Ulrich Drepper  <drepper@redhat.com>
1206
1207	* libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
1208	new version ELFUTILS_1.1.1.
1209
12102005-08-02  Ulrich Drepper  <drepper@redhat.com>
1211
1212	* elf_error.c: Add handling of ELF_E_INVALID_OFFSET.
1213	* elf32_offscn.c: New file.
1214	* elf64_offscn.c: New file.
1215	* gelf_offscn.c: New file.
1216	* Makefile.am (libelf_a_SOURCES): Add elf32_offscn.c, elf64_offscn.c,
1217	and gelf_offscn.c.
1218	* libelf.sym: Export new symbols.
1219
12202005-07-23  Ulrich Drepper  <drepper@redhat.com>
1221
1222	* elf-knowledge.h (SECTION_STRIP_P): Don't handle removal of debug
1223	sections here anymore.
1224	* elf32_checksum.c: Adjust for change in SECTION_STRIP_P interface.
1225
1226	* elf_update.c (elf_update): Get write lock, not read lock.
1227
1228	* elf32_updatenull.c (updatenull): Get section headers if necessary
1229	and possible.
1230
12312005-07-22  Ulrich Drepper  <drepper@redhat.com>
1232
1233	* elf32_updatenull.c (updatenull): If program header hasn't been loaded
1234	yet, try to do it now.
1235	Don't unnecessarily update overflow of section count in zeroth section
1236	sh_size field.
1237	If section content hasn't been read yet, do it before looking for the
1238	block size.  If no section data present, infer size of section header.
1239
12402005-05-11  Ulrich Drepper  <drepper@redhat.com>
1241
1242	* elf.h: Update again.
1243
12442005-05-09  Ulrich Drepper  <drepper@redhat.com>
1245
1246	* elf.h: Update from glibc.
1247
12482005-05-08  Roland McGrath  <roland@redhat.com>
1249
1250	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1251	* elf_update.c (write_file) [_MUDFLAP]: Likewise.
1252
12532005-03-29  Ulrich Drepper  <drepper@redhat.com>
1254
1255	* elf32_checksum.c: Use INTUSE and INTDEF to avoid PLTs.
1256	* elf_end.c: Likewise.
1257	* elf_getdata.c: Likewise.
1258	* gelf_getehdr.c: Likewise.
1259	* nlist.c: Likewise.
1260	* libelfP.h: Add declarations of internal functions.
1261
12622005-02-15  Ulrich Drepper  <drepper@redhat.com>
1263
1264	* common.h (CONVERT): Make sure all values are unsigned.
1265	(CONVERT_TO): Likewise.
1266
1267	* Makefile.am (AM_CFLAGS): Add -Wformat=2.
1268	Fix rule to build libelf.so.
1269
12702005-02-06  Ulrich Drepper  <drepper@redhat.com>
1271
1272	* Makefile.am: Cleanup AM_CFLAGS handling.  Add -Wunused -Wextra.
1273	Remove lint handling.
1274	* elf32_getphdr.c: Minor cleanups.
1275	* elf32_getshdr.c: Likewise.
1276	* elf32_updatefile.c: Likewise.
1277	* elf32_updatenull.c: Likewise.
1278	* elf_begin.c: Likewise.
1279	* elf_error.c: Likewise.
1280	* elf_getarsym.c: Likewise.
1281	* elf_getdata.c: Likewise.
1282	* elf_update.c: Likewise.
1283	* gelf_xlate.c: Likewise.
1284
12852005-02-05  Ulrich Drepper  <drepper@redhat.com>
1286
1287	* Makefile.am: Check for text relocations in constructed DSO.
1288
1289	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -Werror -fpic -fmudflap.
1290
12912005-02-04  Ulrich Drepper  <drepper@redhat.com>
1292
1293	* gelf_getehdr.c (gelf_getehdr): Slight optimization.
1294
1295	* elf32_checksum.c (checksum): Do not look at NOBITS sections.
1296
1297	* gelf.h: Add gelf_checksum prototype.
1298
12992004-09-25  Ulrich Drepper  <drepper@redhat.com>
1300
1301	* elf32_checksum.c: Make compile with gcc 4.0.
1302	* elf32_updatefile.c: Likewise.
1303	* elf32_updatenull.c: Likewise.
1304	* elf_begin.c: Likewise.
1305	* elf_error.c: Likewise.
1306	* elf_getdata.c: Likewise.
1307	* elf_getident.c: Likewise.
1308
13092004-04-01  Ulrich Drepper  <drepper@redhat.com>
1310
1311	* elf.h: Update from glibc.
1312
13132004-01-23  Ulrich Drepper  <drepper@redhat.com>
1314
1315	* elf_update.c: Fix locking.
1316	* elf_clone.c: Likewise.
1317
1318	* libelf.h: Define ELF_T_LIB.
1319	* gelf_getlib.c: New file.
1320	* gelf_update_lib.c: New file.
1321	* gelf.h: Declare the new functions.  Define GElf_Lib.
1322	* abstract.h: Define Lib, Lib32, Lib64.
1323	* gelf_xlate.c (__elf_xfctstom): Add ELF_T_LIB entry.
1324	* gelf_xlate.h: Add entry for ElfXX_Lib.
1325	* elf_getdata.c: Recognize SHT_GNU_LIBLIST as a known section type.
1326	* libelf.map: Add new symbols to ELFUTILS_1.1.
1327	* Makefile.am (libelf_a_SOURCES): Add gelf_getlib.c and
1328	gelf_update_lib.c.
1329
13302004-01-17  Ulrich Drepper  <drepper@redhat.com>
1331
1332	* Makefile.am: Support building with mudflap.
1333
1334	* gelf_xlate.c (INLINE3): Avoid using cast as lvalue.
1335	* dl-hash.h (_dl_elf_hash): Likewise.
1336
13372004-01-05  Ulrich Drepper  <drepper@redhat.com>
1338
1339	* elf-knowledge.h: New file.  From libelf subdir.
1340	* Makefile.am (euincludedir): Define.
1341	(euinclude_HEADERS): Add elf-knowledge.h.
1342
13432003-09-24  Ulrich Drepper  <drepper@redhat.com>
1344
1345	* elf.h: Define some PT_IA_64_HP_* constants.
1346
13472003-09-23  Jakub Jelinek  <jakub@redhat.com>
1348
1349	* libelfP.h (struct Elf): Move state.elf64.sizestr_offset after
1350	state.elf64.scnincr to match state.elf{,32}.
1351
13522003-08-12  Ulrich Drepper  <drepper@redhat.com>
1353
1354	* elf32_updatefile.c (__updatemmap): When writing back file where
1355	some sections have not been read in, count their sizes based on
1356	the section header.
1357
13582003-08-11  Ulrich Drepper  <drepper@redhat.com>
1359
1360	* Moved to CVS archive.
1361