• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12021-02-03 Timm Bäder <tbaeder@redhat.com>
2
3	* ar.c (do_oper_extract): Extract should_truncate_fname function
4	to...
5	(should_truncate_fname): ...here. New file scope function taking
6	size_t pointer to be read and/or set.
7
82021-02-02 Timm Bäder <tbaeder@redhat.com>
9
10	* readelf.c (print_debug_line_section): Remove unnecessary
11	show_op_index variable, replace with (op_index > 0).
12
132021-01-08  Timm Bäder  <tbaeder@redhat.com>
14
15	* readelf.c (print_cfa_program): Lift regname function to...
16	(regname): ...here. New file scope function add ebl and regnamebuf
17	as arguments.
18
192021-01-08  Timm Bäder  <tbaeder@redhat.com>
20
21	* readelf.c (print_attributes): Lift left function to...
22	(left): ...here. New file scope function taking Elf_Data and char
23	pointers.
24
252021-01-08  Timm Bäder  <tbaeder@redhat.com>
26
27	* readelf.c (handle_core_registers): Lift same_set function to...
28	(same_set): ...here. New file scope function adding regs and
29	maxnreg arguments.
30
312021-01-08  Timm Bäder  <tbaeder@redhat.com>
32
33	* readelf.c (parse_opt): Lift add_dump_section function to...
34	(add_dump_section): ...here. New top level function. Added key
35	argument.
36
372021-01-08  Timm Bäder  <tbaeder@redhat.com>
38
39	* arlib-argp.c (help_filter): Lift text_for_default function to...
40	(text_for_default): ... here. New file scope function taking text
41	as argument.
42
432021-01-08  Timm Bäder  <tbaeder@redhat.com>
44
45	* addr2line.c (handle_address): Move show_note and show_int up to
46	file scope.
47	(show_note: New static inline function.
48	(show_int): Likewise.
49
502021-01-08  Timm Bäder  <tbaeder@redhat.com>
51
52	* strip.c (handle_elf): Remove no_symtab_updates function and
53	calls inside the switch statement. Add checks and (possibly)
54	continue, before switch statement is called.
55
562021-01-08  Timm Bäder  <tbaeder@redhat.com>
57
58	* strip.c (handle_elf): Move inlined update_section_size function
59	to...
60	(update_section_size): ...here. New static function that takes as
61	extra arguments the Elf_Scn, debug_elf, section cnt and fname.
62
632021-01-08  Timm Bäder  <tbaeder@redhat.com>
64
65	* strip.c (remove_debug_relocations): Rewrite inlined relocate
66	function to file static. Do R_*_NONE, reloc_simple_type and
67	ebl_debug_scn_p checks before calling new relocate function.
68	(relocate): New file static function from
69	remove_debug_relocate. Remove R_*_NONE, reloc_simple_type and
70	ebl_debugscn_p checks.
71
722021-01-08  Timm Bäder  <tbaeder@redhat.com>
73
74	* strip.c (handle_elf): Expand inlined function check_preserved.
75
762021-01-12  Mark Wielaard  <mark@klomp.org>
77
78	* elflint.c (EXTRA_SHFLAGS): New define.
79	(check_sections): Use EXTRA_SHFLAGS. Add SHF_GNU_RETAIN to
80	ALL_SH_FLAGS.
81
822020-12-31  Sergei Trofimovich  <slyfox@gentoo.org>
83
84	* elflint.c (section_flags_string): Add NEWFLAG for GNU_RETAIN,
85	ORDERED and EXCLUDE.
86
872020-12-31  Sergei Trofimovich  <slyfox@gentoo.org>
88
89	* elflint.c (section_flags_string): Update cp pointer after
90	snprintf for unknown flags.
91
922020-12-16  Érico Nogueira  <ericonr@disroot.org>
93
94	* readelf.c (qsort_r): Use qsort for improved portability.
95
962020-12-20  Dmitry V. Levin  <ldv@altlinux.org>
97
98	* .gitignore: New file.
99
1002020-12-12  Mark Wielaard  <mark@klomp.org>
101
102	* elflint.c (check_sections): Handle SHF_GNU_RETAIN.
103	* readelf.c (print_shdr): Likewise.
104
1052020-12-16  Dmitry V. Levin  <ldv@altlinux.org>
106
107	* *.c: Replace gettext(...) with _(...).
108
109	* unstrip.c (_): Remove.
110
1112020-12-15  Mark Wielaard  <mark@klomp.org>
112
113	* elflint.c (check_symtab): Always print symbol name (if known)
114	in error messages.
115
1162020-12-12  Dmitry V. Levin  <ldv@altlinux.org>
117
118	* ar.c (write_member, do_oper_insert): Fix spelling typo in comment.
119	* elfclassify.c (issue, elf_issue, is_unstripped): Likewise.
120	* elfcompress.c (process_file): Likewise.
121	* elflint.c (be_quiet, check_gnu_hash): Likewise.
122	* readelf.c (print_phdr, handle_gnu_hash,
123	dwarf_locexpr_opcode_string): Likewise.
124	* size.c (totals_class): Likewise.
125	* strings.c (read_elf): Likewise.
126	* strip.c (handle_elf): Likewise.
127
128	* readelf.c (print_debug_addr_section): Fix spelling typo in error
129	diagnostics.
130	* strip.c (options): Fix spelling typos in argp help text.
131	* strings.c (options): Likewise.
132	* stack.c (options): Likewise.
133
1342020-11-01  Érico N. Rolim  <erico.erc@gmail.com>
135
136	* unstrip.c (make_directories): Use ACCESSPERMS for mkdir.
137	(handle_file): Use DEFFILEMODE for open with O_CREAT for ET_REL
138	files, ACCESSPERMS otherwise.
139
1402020-11-01  Érico N. Rolim  <erico.erc@gmail.com>
141
142	* Makefile.am (nm_LDADD): Add obstack_LIBS.
143	(ranlib_LDADD): Likewise.
144	(ar_LDADD): Likewise.
145
1462020-10-27  Érico N. Rolim  <erico.erc@gmail.com>
147
148	* unstrip.c (make_directories): Use strndup, not strndupa.
149
1502020-09-28  Mark Wielaard  <mark@klomp.org>
151
152	* readelf.c (next_listptr_offset): Take idx as pointer, to be updated
153	and use new Dwarf_Off as offset to match.
154	(listptr_attr): New function.
155	(print_debug_loclists_section): Check for DW_AT_GNU_locviews to show
156	view pairs.
157	(print_debug_loc_section): Adjust next_listptr_offset call.
158
1592020-09-03  Mark Wielaard  <mark@klomp.org>
160
161	* readelf.c (print_cfa_program): Take ehdr as argument. Use it to
162	recognize DW_CFA_AARCH64_negate_ra_state.
163	(print_debug_frame_section): Pass ehdr to print_cfa_program.
164	(print_debug): Don't warn if we dump frames, but cannot get dbg.
165
1662020-09-01  Mark Wielaard  <mark@klomp.org>
167
168	* readelf.c (print_debug_ranges_section): Base address entry can
169	be first.
170	(print_debug_loc_section): Likewise.
171
1722020-09-04  Mark Wielaard  <mark@klomp.org>
173
174	* elflint.c (special_sections): Add .debug_line_str.
175
1762020-08-26  Mark Wielaard  <mark@klomp.org>
177
178	* readelf.c (print_debug_line_section): It is not an error if there
179	are no line number statements at the end of a debug line section.
180
1812020-07-19  Mark Wielaard  <mark@klomp.org>
182
183	* elfclassify.c (process_current_path): Handle fwrite failing.
184
1852020-07-05  Mark Wielaard  <mark@klomp.org>
186
187	* stack.c (module_callback): Don't assert if dwfl_module_info fails.
188	* unstrip.c (adjust_relocs): Produce a proper error when HAS
189	section has inconsistent size or entsize.
190	(match_module): Don't assert if dwfl_module_info fails.
191
1922020-06-16  Mark Wielaard  <mark@klomp.org>
193
194	* ar.c (do_oper_extract): Split large if statement. Call fchown
195	before fchmod and explicitly ignore the return value.
196	(do_oper_delete): Likewise.
197	(do_oper_insert): Likewise.
198	* ranlib.c (handle_file): Likewise.
199
2002020-06-16  Mark Wielaard  <mark@klomp.org>
201
202	* elflint.c (check_elf_header): Explicitly check and ignore
203	any error from elf_compress.
204
2052020-06-07  Mark Wielaard  <mark@klomp.org>
206
207	* nm.c (sort_by_name_strtab): Replace by...
208	(sort_by_name_elf): New static Elf pointer and ...
209	(sort_by_name_ndx): New static size_t index.
210	(sort_by_name): Use elf_strptr to get symbol string.
211	(show_symbols): Set sort_by_name_elf and sort_by_name_ndx.
212
2132020-06-06  Mark Wielaard  <mark@klomp.org>
214
215	* nm.c (show_symbols_sysv): Skip no name and STT_FILE symbols.
216	When not printing address and size pad strings. Strip "GNU_"
217	prefix from binding name.
218	(class_type_char): Use 'V' for weak symbols, 'C' for common
219	symbols and 'T' for weak functions.
220	(show_symbols_posix): Skip STT_FILE symbols. Don't print value and
221	size when undefined.
222
2232020-06-04  Mark Wielaard  <mark@klomp.org>
224
225	* elflint.c (check_program_header): Remove PT_GNU_PROPERTY define.
226
2272020-05-14  Mark Wielaard  <mark@klomp.org>
228
229	* size.c (show_bsd): Set printf format based on radix.
230
2312020-05-09  Mark Wielaard  <mark@klomp.org>
232
233	* elflint.c (process_elf_file): Error out if ebl_openbackend fails.
234	* objdump.c (handle_elf): Likewise.
235	* nm.c (handle_elf): Likewise. Move full name string construction
236	forward, so it can be used in the error message.
237
2382020-04-17  Mark Wielaard  <mark@klomp.org>
239
240	* readelf.c (print_debug): Check .gnu.debuglto_ prefix.
241
2422020-04-16  Mark Wielaard  <mark@klomp.org>
243
244	* elflint.c (check_sections): Mask out SHF_EXCLUDE from processor
245	specific section flags when --gnu is given.
246
2472020-02-08  Mark Wielaard  <mark@klomp.org>
248
249	* elflint.c (check_program_header): Handle PT_GNU_PROPERTY.
250
2512020-02-07  Mark Wielaard  <mark@klomp.org>
252
253	* elflint.c (check_symtab): Check st_info isn't too big.
254
2552020-01-16  Mark Wielaard  <mark@klomp.org>
256
257	* nm.c (show_symbols_sysv): Iterate over all symbols starting
258	at index zero.
259
2602019-11-26  Mark Wielaard  <mark@klomp.org>
261
262	* Makefile.am (BUILD_STATIC): Add libraries needed for libdw.
263
2642019-10-26  Mark Wielaard  <mark@klomp.org>
265
266	* unstrip.c (collect_symbols): Check symbol strings are
267	terminated.
268
2692019-10-18  Mark Wielaard  <mark@klomp.org>
270
271	* unstrip.c (adjust_relocs): Set versym data d_size to the actual
272	size allocated.
273
2742019-10-20  Mark Wielaard  <mark@klomp.org>
275
276	* unstrip.c (copy_elided_sections): Set and check max_off.
277
2782019-10-21  Mark Wielaard  <mark@klomp.org>
279
280	* unstrip.c (adjust_relocs): Add map_size argument and check ndx
281	against it.
282	(adjust_all_relocs): Add map_size argument and pass it to
283	adjust_relocs.
284	(add_new_section_symbols): Call adjust_all_relocs with symndx_map
285	size.
286	(collect)symbols): Check sym and string data can be found.
287	(compare_symbols_output): Call error when (different) symbols are
288	equal.
289	(new_shstrtab): Make unstripped_strent array one larger. Check
290	stripped_shnum isn't zero.
291	(copy_elided_sections): Add ndx_sec_num as size of ndx_section
292	array. Check sh_link and sh_info are not larger than ndx_sec_num.
293	Allocate symbols and symndx_map arrays on heap, not stack. Pass
294	map sizes to adjust_all_relocs.
295
2962019-09-28  Dmitry V. Levin  <ldv@altlinux.org>
297
298	* elflint.c (main): When an input file cannot be opened,
299	include its name into the error diagnostics.
300	* readelf.c (main): Likewise.
301
3022019-09-02  Mark Wielaard  <mark@klomp.org>
303
304	* readelf.c (PRINT_DYNSYM_TABLE): New argp key value.
305	(argp_opt): Add syn-sym.
306	(print_dynsym_table): New static bool.
307	(parse_opt): Handle PRINT_DYNSYM_TABLE.
308	(process_elf_file): Check print_dynsym_table.
309
3102019-08-27  Mark Wielaard  <mark@klomp.org>
311
312	* readelf.c (for_each_section_argument): Call (*dump) also for
313	section numbers.
314
3152019-08-26  Mark Wielaard  <mark@klomp.org>
316
317	* nm.c (show_symbols): Remember nentries_orig and check before
318	freeing sym_mem.
319
3202019-07-05  Omar Sandoval  <osandov@fb.com>
321
322	* Makefile.am: Remove -ldl.
323	(elflint_LDADD): Add $(libdw).
324	(elfcmp_LDADD): Add $(libdw).
325	(objdump_LDADD): Add $(libdw).
326
3272019-08-26  Mark Wielaard  <mark@klomp.org>
328
329	* readelf (options): Add OPTION_ARG_OPTIONAL "SECTION" for notes.
330	(notes_section): New global variable.
331	(parse_opt): Set notes_section.
332	(handle_notes): Check if notes_section is set.
333
3342019-07-26  Florian Weimer  <fweimer@redhat.com>
335	    Mark Wielaard  <mark@klomp.org>
336
337	* Makefile.am (bin_PROGRAMS): Add elfclassify.
338	(elfclassify_LDADD): New variable.
339	* elfclassify.c: New tool.
340
3412019-07-13  Mao Han  <han_mao@c-sky.com>
342
343	* elflint.c: Add C-SKY.
344
3452019-06-28  Mark Wielaard  <mark@klomp.org>
346
347	* readelf.c (print_ehdr): Use dwelf_elf_e_machine_string instead of
348	ebl->name. If unknown print hex value.
349
3502019-06-25  Mark Wielaard  <mark@klomp.org>
351
352	* stack.c (parse_opt): Fix dwfl_core_file_attach error message.
353
3542019-06-18  Mark Wielaard  <mark@klomp.org>
355
356	* strip.c (handle_elf): Use elf_begin ELF_C_WRITE, instead of
357	ELF_C_WRITE_MMAP.
358
3592019-05-10  Mark Wielaard  <mark@klomp.org>
360
361	* readelf.c (struct attrcb_args): Rename die to dies.
362	(attr_callback): Get current current die using dies[level].
363	Handle DW_AT_discr_list as block, not as constant.
364	(print_debug_units): pass dies, not dies[level] as args.
365
3662019-05-09  Mark Wielaard  <mark@klomp.org>
367
368	* readelf.c (cleanup_list): New function.
369	(main): Call cleanup_list for dump_data_sections and string_sections.
370
3712019-04-28  Mark Wielaard  <mark@klomp.org>
372
373	* unstrip.c (add_new_section_symbols): Call ELF_CHECK after
374	gelf_getsymshndx.
375	(new_shstrtab): Call ELF_CHECK after gelf_getshdr.
376
3772019-04-28  Mark Wielaard  <mark@klomp.org>
378
379	* size.c (show_sysv): Call INTERNAL_ERROR if gelf_getshdr
380	returns NULL.
381	(show_sysv_one_line): Call error with EXIT_FAILURE if
382	gelf_getshdr returns NULL.
383
3842019-04-28  Mark Wielaard  <mark@klomp.org>
385
386	* nm.c (show_symbols_sysv): Check gelf_getshdr doesn't return
387	NULL. Simplify naming of invalid sections, don't use alloca.
388
3892019-04-28  Mark Wielaard  <mark@klomp.org>
390
391	* elfcmp.c (main): Check shdr1 and shdr2 are not NULL.
392
3932019-04-03  Mark Wielaard  <mark@klomp.org>
394
395	* readelf.c (attr_callback): Print DW_AT_data_member_location as
396	decimal offset, not hex number.
397
3982019-03-29  Mark Wielaard  <mark@klomp.org>
399
400	* readelf.c (print_debug_macinfo_section): Check cus[0] is not the
401	sentinel.
402
4032019-03-27  Mark Wielaard  <mark@klomp.org>
404
405	* strip.c (handle_elf): Assert that symbol section number exists.
406
4072019-01-24  Mark Wielaard  <mark@klomp.org>
408
409	* strip.c (handle_elf): Fix check test for SHN_XINDEX symbol.
410
4112019-01-22  Mark Wielaard  <mark@klomp.org>
412
413	* readelf.c (print_debug_line_section): Check we are not at end of
414	line data when reading parameters for unknown opcodes.
415
4162019-01-20  Mark Wielaard  <mark@klomp.org>
417
418	* readelf.c (print_debug_line_section): Check terminating NUL byte
419	for dir and file tables.
420
4212019-01-16  Mark Wielaard  <mark@klomp.org>
422
423	* readelf (handle_core_note): Pass desc to ebl_core_note.
424
4252018-11-10  Mark Wielaard  <mark@klomp.org>
426
427	* elflint.c (check_program_header): Allow PT_GNU_EH_FRAME segment
428	to be matched against SHT_X86_64_UNWIND section.
429
4302018-11-09  Mark Wielaard  <mark@klomp.org>
431
432	* strip.c (remove_debug_relocations): Check if section is gnu
433	compressed and decompress and recompress it.
434
4352018-11-12  Mark Wielaard  <mark@klomp.org>
436
437	* elflint.c (check_note_data): Recognize NT_GNU_BUILD_ATTRIBUTE_OPEN
438	and NT_GNU_BUILD_ATTRIBUTE_OPEN.
439	* readelf.c (handle_notes_data): Handle
440	ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX. Pass nhdr.n_namesz to
441	ebl_object_note.
442
4432018-11-11  Mark Wielaard  <mark@klomp.org>
444
445	* readelf.c (handle_notes_data): Pass n_descsz to
446	ebl_object_note_type_name.
447	* elflint.c (check_note_data): Recognize NT_VERSION, add owner
448	name to unknown note error.
449
4502018-10-20  Mark Wielaard  <mark@klomp.org>
451
452	* readelf.c (process_elf_file): Use dwelf_elf_begin to open pure_elf.
453
4542018-10-26  Mark Wielaard  <mark@klomp.org>
455
456	* strip.c (OPT_RELOC_DEBUG_ONLY): New define.
457	(options): Add reloc-debug-sections-only.
458	(reloc_debug_only): New static bool.
459	(main): Check reloc_debug_only is the only strip option used.
460	(parse_opt): Handle OPT_RELOC_DEBUG_ONLY.
461	(handle_debug_relocs): New function.
462	(handle_elf): Add local variables lastsec_offset and lastsec_size.
463	Handle reloc_debug_only.
464
4652018-10-24  Mark Wielaard  <mark@klomp.org>
466
467	* strip.c (handle_elf): Extract code to update shdrstrndx into...
468	(update_shdrstrndx): ... this new function.
469
4702018-10-24  Mark Wielaard  <mark@klomp.org>
471
472	* strip.c (handle_elf): Extract code into separate functions...
473	(secndx_name): ... new function.
474	(get_xndxdata): Likewise.
475	(remove_debug_relocations): Likewise.
476
4772018-10-24  Mark Wielaard  <mark@klomp.org>
478
479	* strip.c (handle_elf): Always copy over phdrs if there are any
480	and check phnum instead of e_type to determine whether to move
481	allocated sections.
482
4832018-11-02  Mark Wielaard  <mark@klomp.org>
484
485	* unstrip.c (copy_elf): Add ELF_CHECK to make sure gelf_getehdr ()
486	doesn't return NULL.
487
4882018-10-18  Mark Wielaard  <mark@klomp.org>
489
490	* elflint.c (check_note_data): Recognize NT_GNU_PROPERTY_TYPE_0.
491	(check_note): Use p_align to pass either ELF_T_NHDR or ELF_T_NHDR8 to
492	elf_getdata_rawchunk.
493	* readelf (handle_notes): Likewise.
494
4952018-10-24  Mark Wielaard  <mark@klomp.org>
496
497	* addr2line.c (print_addrsym): Use elf_getshdrstrndx instead of
498	Ehdr field.
499
5002018-10-24  Mark Wielaard  <mark@klomp.org>
501
502	* readelf.c (section_name): Remove ehdr argument, lookup shstrndx.
503	(print_debug_abbrev_section): Don't pass ehdr.
504	(print_debug_addr_section): Likewise.
505	(print_decoded_aranges_section): Likewise.
506	(print_debug_aranges_section): Likewise.
507	(print_debug_rnglists_section): Likewise.
508	(print_debug_ranges_section): Likewise.
509	(print_debug_units): Likewise.
510	(print_decoded_line_section): Likewise.
511	(print_debug_line_section): Likewise.
512	(print_debug_loclists_section): Likewise.
513	(print_debug_loc_section): Likewise.
514	(print_debug_macinfo_section): Likewise.
515	(print_debug_macro_section): Likewise.
516	(print_debug_pubnames_section): Likewise.
517	(print_debug_str_section): Liekwise.
518	(print_debug_str_offsets_section): Likewise.
519	(print_gdb_index_section): Likewise.
520
5212018-10-16  Mark Wielaard  <mark@klomp.org>
522
523	* readelf.c (print_debug_frame_section): Make sure readp is never
524	greater than cieend.
525
5262018-10-19  Mark Wielaard  <mark@klomp.org>
527
528	* dwfl_module_getdwarf.c (adjust_relocs): Check sh_entsize is not
529	zero.
530	(add_new_section_symbols): Likewise.
531	(copy_elided_sections): Likewise.
532
5332018-10-18  Mark Wielaard  <mark@klomp.org>
534
535	* size.c (handle_ar): Only close elf if prefix was NULL.
536
5372018-10-18  Mark Wielaard  <mark@klomp.org>
538
539	* arlib.c (arlib_add_symbols): Check that sh_entsize is not zero.
540
5412018-10-14  Mark Wielaard  <mark@klomp.org>
542
543	* ar.c (do_oper_extract): Assume epoch if ar_date is bogus.
544
5452018-10-14  Mark Wielaard  <mark@klomp.org>
546
547	* findtextrel.c (process_file): Check that sh_entsize is not zero.
548
5492018-10-13  Mark Wielaard  <mark@klomp.org>
550
551	* readelf.c (print_debug_macro_section): Use elf_getdata. Print
552	decoded flag string.
553
5542018-10-19  Mark Wielaard  <mark@klomp.org>
555
556	* unstrip.c (copy_elided_sections): Renumber group section indexes.
557
5582018-10-12  Mark Wielaard  <mark@klomp.org>
559
560	* strip.c (handle_elf): Don't remove SHF_GROUP flag from sections.
561	Skip group section flag when renumbering section indexes.
562	* unstrip.c (struct section): Add sig field.
563	(compare_unalloc_sections): Take and use sig1 and sig2 as arguments.
564	(compare_sections): Pass signatures to compare_unalloc_sections.
565	(get_group_sig): New function.
566	(find_alloc_sections_prelink): Set signature.
567	(copy_elided_sections): Likewise and pass them on.
568	(find_unalloc_section): Take and pass signatures.
569
5702018-10-02  Andreas Schwab  <schwab@suse.de>
571
572	* strip.c (handle_elf): Handle ADD/SUB relocation.
573
5742018-09-13  Mark Wielaard  <mark@klomp.org>
575
576	* readelf.c (print_shdr): Get number of section with elf_getshdrnum.
577	(print_phdr): Likewise.
578
5792018-09-13  Mark Wielaard  <mark@klomp.org>
580
581	* strip.c (handle_elf): Check against shstrndx, not e_shstrndx.
582	Explicitly set shdrstrndx for debug file.
583	* unstrip.c (copy_elf): Explicitly copy shstrndx.
584	(find_alloc_sections_prelink): Document shnum usage.
585
5862018-09-13  Mark Wielaard  <mark@klomp.org>
587
588	* elflint.c (check_elf_header): Use shnum instead of e_shnum for all
589	checks.
590	(check_symtab): Use shstrndx instead of e_shstrndx to get section
591	names.
592
5932018-09-13  Mark Wielaard  <mark@klomp.org>
594
595	* elfcmp.c (main): Get, check and shdrstrndx for section names.
596
5972018-09-12  Mark Wielaard  <mark@klomp.org>
598
599	* elfcmp.c (main): Call ebl_section_strip_p without ehdr.
600	* strip.c (handle_elf): Likewise.
601
6022018-09-12  Mark Wielaard  <mark@klomp.org>
603
604	* elflint.c (check_symtab): Call ebl_check_special_symbol without
605	ehdr.
606
6072018-07-30  Mark Wielaard  <mark@klomp.org>
608
609	* strip.c (handle_elf): Track allocated/unallocated sections seen. Set
610	section offset of unallocated sections after handling all allocated
611	sections.
612
6132018-08-18  Mark Wielaard  <mark@klomp.org>
614
615	* readelf.c (print_debug_aranges_section): Make sure there is enough
616	data to read the header segment size.
617
6182018-08-18  Mark Wielaard  <mark@klomp.org>
619
620	* elflint.c (check_sysv_hash): Calculate needed size using unsigned
621	long long int to prevent overflow.
622	(check_sysv_hash64): Calculate maxwords used separately before
623	comparison to prevent overflow.
624
6252018-07-24  Mark Wielaard  <mark@klomp.org>
626
627	* unstrip.c (compare_unalloc_sections): Also compare sh_size.
628
6292018-07-21  Mark Wielaard  <mark@klomp.org>
630
631	* unstrip.c (adjust_all_relocs): Skip SHT_GROUP sections.
632
6332018-07-21  Mark Wielaard  <mark@klomp.org>
634
635	* elfcompress.c (get_sections): New function.
636	(process_file): Check whether section needs to change. Don't rewrite
637	file if no section data needs changing.
638	(main): Update 'force' help text.
639
6402018-07-21  Mark Wielaard  <mark@klomp.org>
641
642	* elfcompress.c (process_file): Swap fchmod and fchown calls.
643
6442018-07-04  Mark Wielaard  <mark@klomp.org>
645
646	* readelf.c (print_debug_addr_section): Rename index var to uidx.
647	(attr_callback): Rename index var to word.
648	(print_debug_str_offsets_section): Rename index var to uidx.
649
6502018-07-04  Ross Burton <ross.burton@intel.com>
651
652	* addr2line.c: Remove error.h include.
653	* ar.c: Likewise.
654	* arlib.c: Likewise and add system.h include.
655	* arlib2.c: Likewise.
656	* elfcmp.c: Likewise.
657	* elfcompress.c: Likewise.
658	* elflint.c: Likewise.
659	* findtextrel.c: Likewise.
660	* nm.c: Likewise.
661	* objdump.c: Likewise.
662	* ranlib.c: Likewise.
663	* readelf.c: Likewise.
664	* stack.c: Likewise.
665	* strings.c: Likewise.
666	* strip.c: Likewise.
667	* unstrip.c: Likewise.
668
6692018-06-25  Mark Wielaard  <mark@klomp.org>
670
671	* readelf.c (print_decoded_line_section): Use dwarf_next_lines
672	instead of dwarf_nextcu.
673	(print_debug_line_section): Don't explicitly lookup CU.
674
6752018-06-15  Mark Wielaard  <mark@klomp.org>
676
677	* readelf.c (attr_callback): Only print block as expressions if it
678	isn't DW_FORM_data16.
679
6802018-06-12  Mark Wielaard  <mark@klomp.org>
681
682	* readelf.c (print_form_data): Check we have 4, not 2, bytes
683	available for DW_FORM_block4.
684
6852018-06-12  Mark Wielaard  <mark@klomp.org>
686
687	* readelf.c (print_form_data): Don't increase strreadp after use.
688	Do increase readp for DW_FORM_strx[1234].
689
6902018-06-16  Mark Wielaard  <mark@klomp.org>
691
692	* readelf.c (print_debug_loc_section): Make sure next_off doesn't
693	overflow d_buf.
694
6952018-06-13  Mark Wielaard  <mark@klomp.org>
696
697	* readelf.c (die_type_sign_bytes): New function.
698	(attr_callback): Recognized DW_FORM_implicit_cost as signed. Use
699	die_type_sign_bytes to lookup the signedness and size of const
700	values.
701
7022018-06-11  Mark Wielaard  <mark@klomp.org>
703
704	* readelf.c (print_form_data): Don't reuse readp and readendp when
705	reading str_offsets section.
706
7072018-06-10  Mark Wielaard  <mark@klomp.org>
708
709	* readelf.c (print_form_data): Don't cast value to ptrdiff_t, cast
710	ptrdiff_t to size_t.
711
7122018-06-08  Mark Wielaard  <mark@klomp.org>
713
714	* readelf.c (print_debug_rnglists_section): Calculate max_entries
715	instead of needed bytes to prevent overflowing. Always print
716	max_entries (but not more).
717	(print_debug_loclists_section): Likewise.
718
7192018-06-08  Mark Wielaard  <mark@klomp.org>
720
721	* readelf.c (print_debug_line_section): Stop printing directories
722	and files when we are at the end of the unit data.
723
7242018-06-07  Mark Wielaard  <mark@klomp.org>
725
726	* readelf.c (format_result): Removed.
727	(format_result_size): Removed.
728	(format_dwarf_addr): Renamed to...
729	(print_dwarf_addr): ...this. Simply call printf, don't setup buffer,
730	don't call sprintf.
731	(print_ops): Use print_dwarf_addr instead of format_dwarf_addr.
732	(print_debug_addr_section): Likewise.
733	(print_debug_aranges_section): Likewise.
734	(print_debug_rnglists_section): Likewise.
735	(print_debug_ranges_section): Likewise.
736	(print_debug_frame_section): Likewise.
737	(attr_callback): Likewise.
738	(print_decoded_line_section): Likewise.
739	(print_debug_line_section): Likewise.
740	(print_debug_loclists_section): Likewise.
741	(print_debug_loc_section): Likewise.
742	(print_gdb_index_section): Likewsie.
743
7442018-06-05  Mark Wielaard  <mark@klomp.org>
745
746	* readelf.c (print_debug_addr_section): Set unit_length always to
747	(next_unitp - readp) in case we don't have a real header.
748
7492018-06-05  Mark Wielaard  <mark@klomp.org>
750
751	* readelf.c (print_debug_loc_section): Set begin to idx when failing
752	to read the start address if DW_LLE_GNU_start_end_entry.
753
7542018-06-05  Mark Wielaard  <mark@klomp.org>
755
756	* readelf.c (handle_sysv_hash): Don't leak lengths array when
757	detecting an invalid chain.
758	(handle_sysv_hash64): Likewise.
759
7602018-06-05  Mark Wielaard  <mark@klomp.org>
761
762	* readelf.c (print_debug_macro_section): Extend vendor array by one
763	to include max DW_MACRO_hi_user opcode.
764
7652018-06-07  Mark Wielaard  <mark@klomp.org>
766
767	* readelf.c (main): Lookup "no" for no_str.
768	(print_debug_abbrev_section): Use yes_str and no_str.
769	(print_form_data): Likewise.
770
7712018-06-04  Mark Wielaard  <mark@klomp.org>
772
773	* readelf (format_result): New static char pointer.
774	(format_result_size): New static size_t.
775	(format_dwarf_addr): Calculate max string size, reuse format_result
776	if possible, otherwise realloc. Use sprintf on result, not asprintf.
777	(print_ops): Don't free format_dwarf_addr, make sure result is
778	printed before calling format_dwarf_addr again.
779	(print_debug_addr_section): Likewise.
780	(print_debug_aranges_section): Likewise.
781	(print_debug_rnglists_section): Likewise.
782	(print_debug_ranges_section): Likewise.
783	(print_debug_frame_section): Likewise.
784	(attr_callback): Likewise.
785	(print_decoded_line_section): Likewise.
786	(print_debug_line_section): Likewise.
787	(print_debug_loclists_section): Likewise.
788	(print_debug_loc_section): Likewise.
789	(print_gdb_index_section): Likewsie.
790
7912018-06-04  Mark Wielaard  <mark@klomp.org>
792
793	* readelf.c (yes_str): New static char pointer.
794	(no_str): Likewise.
795	(main): Set yes_str and no_str using gettext.
796	(attr_callback): Use yes_str and no_str instead of calling gettext.
797
7982018-06-04  Mark Wielaard  <mark@klomp.org>
799
800	* readelf.c (main): Call __fsetlocking (stdout, FSETLOCKING_BYCALLER).
801
8022018-05-31  Mark Wielaard  <mark@klomp.org>
803
804	* readelf.c (print_debug_units): Print the dwo name and id when
805	unable to find a .dwo file.
806
8072018-05-31  Mark Wielaard  <mark@klomp.org>
808
809	* readelf.c (enum section_e): Make section_types not an alias of
810	section_info.
811	(section_all): Add section_types.
812	(parse_opt): Add both section_info and section_types for "info"
813	and "info+".
814	(print_debug_units): Don't be silent for debug_types.
815
8162018-05-31  Mark Wielaard  <mark@klomp.org>
817
818	* readelf.c (attr_callback): Only register section_loc when not
819	looking at a split dwarf from a skeleton.
820
8212018-05-30  Mark Wielaard  <mark@klomp.org>
822
823	* readelf.c (print_debug_loc_section): Use correct listptr for
824	locview attribute.
825
8262018-05-31  Mark Wielaard  <mark@klomp.org>
827
828	* readelf.c (print_debug_units): Check offset against -1 not ~0ul.
829
8302018-05-29  Mark Wielaard  <mark@klomp.org>
831
832	* readelf.c (print_debug_loc_section): Handle GNU DebugFission list
833	entries.
834
8352018-05-29  Mark Wielaard  <mark@klomp.org>
836
837	* readelf.c (print_debug): Record and reset section_info status in
838	implicit_debug_sections and print_debug_sections.
839
8402018-05-28  Mark Wielaard  <mark@klomp.org>
841
842	* readelf.c (print_debug_units): Turn "Could not find split compile
843	unit" into an Warning instead of an error.
844
8452018-04-29  Mark Wielaard  <mark@klomp.org>
846
847	* readelf.c (parse_opt): Request implicit section_info for "str".
848	(known_stroffbases): New static variable.
849	(attr_callbackattr_callback): Handle DW_AT_str_offets_base.
850	(print_debug_str_offsets_section): New function.
851	(print_debug): Handle .debug_str_offsets as section_str. Reset
852	known_stroffbases.
853
8542018-04-27  Mark Wielaard  <mark@klomp.org>
855
856	* readelf.c (options): Add addr.
857	(enum section_e): Add section_addr.
858	(section_all): Add section_addr.
859	(parse_opt): Parse "addr".
860	(known_addrbases): New static variable.
861	(get_listptr): New function.
862	(print_debug_addr_section): Likewise.
863	(attr_callback): Handle DW_AT_addr_base and DW_AT_GNU_addr_base.
864	(print_debug): Add NEW_SECTION (addr). Reset known_addrbases.
865
8662018-04-07  Mark Wielaard  <mark@klomp.org>
867
868	* readelf.c (attr_callback): Handle DW_FORM_loclistx and
869	DW_AT_segment.
870
8712018-04-12  Mark Wielaard  <mark@klomp.org>
872
873	* readelf.c (dwarf_loc_list_encoding_string): New functions.
874	(dwarf_loc_list_encoding_name): Likewise.
875	(known_loclistptr): Renamed and split in two...
876	(known_locsptr): this and ...
877	(known_loclistsptr): this.
878	(listptr_base): Split out...
879	(cudie_base): ...this.
880	(is_split_dwarf): New function.
881	(attr_callback): Handle DW_AT_loclists_base and notice sec_offset
882	in correct list.
883	(print_debug_rnglists_section): Use spit_dwarf_cu_base.
884	(print_debug_loclists_section): New function.
885	(print_debug_loc_section): Use known_locsptr instead of
886	known_loclistptr.
887	(print_debug): Recognize .debug_loclists. Reset known_locsptr and
888	known_loclistsptr.
889
8902018-05-25  Mark Wielaard  <mark@klomp.org>
891
892	* readelf.c (DWARF_SKELETON): New constant.
893	(do_not_close_dwfl): New bool.
894	(options): Add dwarf-skeleton.
895	(dwarf_skeleton): New static variable.
896	(parse_opt): Handle DWARF_SKELETON, set dwarf_skeleton.
897	(create_dwfl): New function, with code extracted from...
898	(process_file): ...here. Check do_not_close_dwfl.
899	(is_split_darf): New function.
900	(getone_dwflmod): Likewise.
901	(print_debug): Use new functions to find skeleton DWARF file to use
902	when inspecting .dwo split DWARF file.
903
9042018-04-11  Mark Wielaard  <mark@klomp.org>
905
906	* readelf.c (dwarf_range_list_encoding_string): New function.
907	(dwarf_range_list_encoding_name): Likewise.
908	(known_rnglistptr): New static variable.
909	(listptr_cu): New function.
910	(print_debug_rnglists_section): Likewise.
911	(attr_callback): Call notice_listptr for DW_AT_ranges. Handle
912	DW_AT_rnglists_base. Handle DW_FORM_rnglistx. DW_AT_start_scope
913	can also have a rnglist.
914	(print_debug_units): Do (silently) scan split DWARF also for
915	debug_ranges before DWARF5 to catch all rangelistptrs.
916	(print_debug): Recognize .debug_rnglists. Reset known_rnglistptr.
917
9182018-01-21  Mark Wielaard  <mark@klomp.org>
919
920	* readelf.c (get_indexed_addr): New function.
921	(print_ops): Handle DW_OP_addrx, DW_OP_GNU_addr_index,
922	DW_OP_constx, DW_OP_GNU_const_index separately and resolve
923	address.
924	(attr_callback): Print index and address for
925	DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
926
9272018-01-19  Mark Wielaard  <mark@klomp.org>
928
929	* readelf.c (options): Add info+.
930	(show_split_units): New static boolean defaulting to false.
931	(parse_opt): For all (no arg) --debug-dump set show_split_units
932	to yes. For "info+" enable section_info and show_split_units.
933	(attrcb_args): Add is_split field.
934	(attr_callback): Use is_split to format DIE offsets differently.
935	(print_debug_units): Likewise. Get subdie (type or split) only
936	when needed. When not silent reiterate over split DIEs when
937	found.
938
9392018-05-15  Mark Wielaard  <mark@klomp.org>
940
941	* readelf.c (print_debug_units): Print unit type and id for any
942	unit type that has it even when version < 5.
943
9442018-05-14  Mark Wielaard  <mark@klomp.org>
945
946	* readelf.c (print_ops): Handle DW_OP_GNU_addr_index and
947	DW_OP_GNU_const_index.
948	(attr_callback): Handle DW_FORM_GNU_addr_index as DW_FORM_addrx.
949	Handle DW_FORM_GNU_str_index as DW_FORM_constx. Add as_hex_id.
950	Handle DW_AT_GNU_dwo_id as_hex_id.
951	(print_form_data): Handle DW_FORM_GNU_str_index as DW_FORM_strx.
952
9532018-05-12  Mark Wielaard  <mark@klomp.org>
954
955	* readelf.c (print_debug): Also recognize .dwo section name variants.
956
9572018-05-15  Dmitry V. Levin  <ldv@altlinux.org>
958
959	* elflint.c (check_elf_header): Fix typo in error diagnostics.
960
9612018-05-15  Mark Wielaard  <mark@klomp.org>
962
963	* readelf.c (print_form_data): Cast comparisons against offset_len to
964	ptrdiff_t.
965	(print_debug_line_section): Print uint64_t as PRIu64.
966
9672018-05-11  Mark Wielaard  <mark@klomp.org>
968
969	* readelf.c (print_debug_macro_section): Use libdw_valid_user_form.
970	Use print_form_data for strx and sup strings.
971
9722018-05-09  Mark Wielaard  <mark@klomp.org>
973
974	* readelf.c (dwarf_line_content_description_string): New function.
975	(dwarf_line_content_description_name): Likewise.
976	(print_bytes): Likewise.
977	(print_form_data): Likewise. Based on code taken from...
978	(print_debug_macro_section): ...here. Now calls print_form_data
979	and str_offsets_base_off.
980	(print_debug_line_section): Parse DWARF5 header, directory and file
981	name tables.
982
9832018-05-12  Mark Wielaard  <mark@klomp.org>
984
985	* addr2line.c (main): Add fflush (stdout) after handle_address ()
986	when reading from stdin.
987
9882018-04-24  Mark Wielaard  <mark@klomp.org>
989
990	* readelf.c (print_debug_aranges_section): Try elf_rawdata if no
991	sectiondata.
992	(print_debug_ranges_section): Likewise.
993	(print_debug_frame_section): Likewise.
994	(print_debug_line_section): Likewise. Check for data == NULL.
995	(print_debug_loc_section): Likewise.
996	(print_debug_macinfo_section): Likewise.
997	(print_debug_macro_section): Likewise.
998
9992018-04-28  Mark Wielaard  <mark@klomp.org>
1000
1001	* readelf.c (print_debug): If .debug_info is needed implicitly by
1002	then handle it first before handling any other debug section.
1003	(parse_opt): Set implicit_debug_sections to section_info when
1004	showing all debug sections.
1005
10062018-05-05  Mark Wielaard  <mark@klomp.org>
1007
1008	* readelf.c (attr_callback): Handle DW_FORM_ref_sup4 and
1009	DW_FORM_ref_sup8 as references.
1010
10112018-04-24  Mark Wielaard  <mark@klomp.org>
1012
1013	* readelf.c (print_debug_str_section): Take raw section data. Don't
1014	use dwarf_getstring, but determine start and end of string from
1015	offset and section data directly.
1016	(print_debug): Handle ".debug_line_str" like ".debug_str".
1017
10182018-04-19  Andreas Schwab  <schwab@suse.de>
1019
1020	* elflint.c (valid_e_machine): Add EM_RISCV.
1021
10222018-04-16  Mark Wielaard  <mark@klomp.org>
1023
1024	* readelf.c (print_debug_line_section). In advance_pc, advance
1025	using op_addr_advance, not op_advance.
1026
10272018-04-14  Mark Wielaard  <mark@klomp.org>
1028
1029	* readelf.c (attr_callback): Only show errors when not silent.
1030
10312018-03-23  Mark Wielaard  <mark@klomp.org>
1032
1033	* readelf.c (attr_callback): Handle DW_FORM_strx[1234].
1034
10352018-03-22  Mark Wielaard  <mark@klomp.org>
1036
1037	* readelf.c (attr_callback): Handle DW_FORM_addrx[1234].
1038
10392018-03-28  Mark Wielaard  <mark@klomp.org>
1040
1041	* readelf.c (handle_sysv_hash): Break bucket chain after nchain
1042	entries are found.
1043	(handle_sysv_hash64): Likewise.
1044
10452018-03-27  Mark Wielaard  <mark@klomp.org>
1046
1047	* readelf.c (attr_callback): Print dwarf_dieoffset as %PRIx64,
1048	not %zx.
1049
10502018-03-20  Mark Wielaard  <mark@klomp.org>
1051
1052	* readelf.c (attr_callback): Report error when DW_AT_decl_file or
1053	DW_AT_call_file cannot be resolved.
1054
10552018-03-06  Mark Wielaard  <mark@klomp.org>
1056
1057	* readelf.c (print_ops): Handle DW_OP_addrx, DW_OP_constx,
1058	DW_OP_implicit_pointer, DW_OP_entry_value, DW_OP_const_type,
1059	DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type,
1060	DW_OP_convert, DW_OP_reinterpret.
1061
10622018-03-01  Mark Wielaard  <mark@klomp.org>
1063
1064	* readelf.c (struct listptr): Add attr field.
1065	(compare_listptr): Warn when two listptrs for the same offset have
1066	different attributes.
1067	(notice_listptr): Take attr as argument and add it to listptr.
1068	(skip_listptr_hole): New attr argument.
1069	(next_listptr_offset): New function.
1070	(print_debug_ranges_section): Pass NULL attr to skip_listptr_hole.
1071	(attr_callback): Handle DW_AT_GNU_locviews. Call notice_listptr with
1072	attr.
1073	(print_debug_loc_section): Keep track of which attr is associated with
1074	a listptr. If the attr is DW_AT_GNU_locview print view pairs till the
1075	next listptr offset.
1076
10772018-02-09  Mark Wielaard  <mark@klomp.org>
1078
1079	* elflint.c (check_group): Make sure we can read a complete
1080	element when iterating over the group.
1081
10822018-02-09  Mark Wielaard  <mark@klomp.org>
1083
1084	* readelf.c (attr_callback): Handle DW_FORM_data16 as Dwarf_Block.
1085
10862018-02-09  Mark Wielaard  <mark@klomp.org>
1087
1088	* readelf.c (print_debug_abbrev_section): Print the value of a
1089	DW_FORM_implicit_const using dwarf_getabbrevattr_data.
1090	(attr_callback): Handle DW_FORM_implicit_const.
1091
10922018-01-30  Mark Wielaard  <mark@klomp.org>
1093
1094	* readelf.c (dwarf_unit_string): New function.
1095	(dwarf_unit_name): Likewise.
1096	(print_debug_units): Use dwarf_get_units and dwarf_cu_die instead
1097	of dwarf_next_unit. Print unit type, id and subdie if available.
1098
10992018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
1100
1101	* addr2line.c (handle_address): Use FALLTHROUGH macro instead of
1102	comment.
1103	* elfcompress.c (parse_opt): Likewise.
1104	* elflint.c (check_dynamic): Likewise.
1105	(check_sections): Likewise.
1106	(check_note_data): Likewise.
1107	* objdump.c (parse_opt): Likewise.
1108	* readelf.c (parse_opt): Likewise.
1109	(attr_callback): Likewise.
1110	(handle_auxv_note): Likewise.
1111	* strings.c (parse_opt): Likewise.
1112	* backtrace.c (callback_verify): Likewise.
1113
11142018-01-25  Mark Wielaard  <mark@klomp.org>
1115
1116	* readelf.c (print_debug_ranges_section): Initialize cu to last_cu.
1117	(print_debug_loc_section): Likewise.
1118
11192018-01-01  Mark Wielaard  <mark@klomp.org>
1120
1121	* readelf.c (attr_callback): Use dwarf_form_name for unknown forms.
1122	(print_debug_macro_section): Print form using dwarf_form_name.
1123
11242017-12-28  Mark Wielaard  <mark@klomp.org>
1125
1126	* readelf.c (print_debug_units): Print DIE offset in error message
1127	as hex.
1128
11292017-12-18  Mark Wielaard  <mark@klomp.org>
1130
1131	* readelf.c (handle_notes_data): Don't use EXIT_FAILURE in error.
1132	Adjust error message depending on whether or not we got data.
1133
11342017-12-07  Mark Wielaard  <mark@klomp.org>
1135
1136	* readelf.c (print_ops): Update data pointer and print arguments
1137	to DW_OP_call2 and DW_OP_call4 as DIE offsets.
1138
11392017-11-29  Mark Wielaard  <mark@klomp.org>
1140
1141	* readelf.c (argp_options): Add "section-groups", 'g'.
1142
11432017-11-29  Mark Wielaard  <mark@klomp.org>
1144
1145	* readelf.c (print_debug_loc_section): Print CU base and unresolved
1146	addresses. Adjust formatting.
1147
11482017-11-29  Mark Wielaard  <mark@klomp.org>
1149
1150	* readelf.c (print_debug_ranges_section): Print CU base and unresolved
1151	addresses. Adjust formatting.
1152
11532017-11-29  Mark Wielaard  <mark@klomp.org>
1154
1155	* readelf.c (attr_callback): Set valuestr to resolved file name
1156	for DW_AT_decl_file and DW_AT_call_file.
1157
11582017-11-29  Mark Wielaard  <mark@klomp.org>
1159
1160	* readelf.c (print_debug_units): Print abbrev code after DIE tag.
1161
11622017-11-29  Mark Wielaard  <mark@klomp.org>
1163
1164	* readelf.c (print_ops): Use only2 space for index. re-indent +5
1165	for DW_OP_GNU_entry_value.
1166
11672017-11-21  Mark Wielaard  <mark@klomp.org>
1168
1169	* readelf.c (attr_callback): Print attribute name and form in error
1170	message. If only the value cannot be retrieved/resolved don't abort.
1171
11722017-10-03  Mark Wielaard  <mark@klomp.org>
1173
1174	* readelf.c (attr_callback): Print DIE offset in error messages.
1175
11762017-11-03  Mark Wielaard  <mark@klomp.org>
1177
1178	* readelf.c (print_ops): Handle DW_OP_GNU_variable_value. Print
1179	referenced DIE as offset.
1180
11812017-09-10  Mark Wielaard  <mark@klomp.org>
1182
1183	* ar.c (do_oper_delete): Remove DEBUG conditional check.
1184	(no0print): Return bool. Check snprintf return value.
1185	(do_oper_insert): Initialize elf. Remove DEBUG conditional check.
1186	Check no0print calls succeed. Explicitly elf_end found elfs.
1187	(do_oper_extract): Make sure we don't create an empty variable
1188	length array.
1189
11902017-09-01  Mark Wielaard  <mark@klomp.org>
1191
1192	* stack.c (main): Replace \v in doc string with \n\n.
1193	* unstrip.c (main): Likewise.
1194
11952017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
1196
1197	* stack.c: Print pid_t using %lld.
1198
11992017-08-18  Ulf Hermann  <ulf.hermann@qt.io>
1200
1201	* readelf.c: Hardcode the signal numbers for non-linux systems.
1202
12032017-07-26  Mark Wielaard  <mark@klomp.org>
1204
1205	* readelf.c (print_debug_macro_section): Accept either version 4 or
1206	version 5. Use DW_MACRO names instead of DW_MACRO_GNU names. Add
1207	minimal support for DW_MACRO_define_sup, DW_MACRO_undef_sup,
1208	DW_MACRO_import_sup, DW_MACRO_define_strx and DW_MACRO_undef_strx.
1209
12102017-07-26  Mark Wielaard  <mark@klomp.org>
1211
1212	* readelf.c (dwarf_defaulted_string): New function.
1213	(dwarf_defaulted_name): Likewise.
1214	(attr_callback): Use dwarf_defaulted_name to get value of
1215	DW_AT_defaulted.
1216
12172017-07-20  Mark Wielaard  <mark@klomp.org>
1218
1219	* strip.c (handle_elf): Deal with data marker symbols pointing to
1220	debug sections (they can be removed).
1221
12222017-07-14  Mark Wielaard  <mark@klomp.org>
1223
1224	* strip (OPT_KEEP_SECTION): New define.
1225	(options): Add documentation for remove-section. Add keep-section.
1226	(struct section_pattern): New data type.
1227	(keep_secs, remove_secs): New globals.
1228	(add_pattern, free_sec_patterns, free_patterns, section_name_matches):
1229	New functions.
1230	(main): Call free_patterns.
1231	(parse_opt): Handle 'R' and OPT_KEEP_SECTION. Check remove_comment
1232	on ARGP_KEY_SUCCESS.
1233	(handle_elf): Handle and sanity check keep_secs and remove_secs.
1234
12352017-06-07  Mark Wielaard  <mark@klomp.org>
1236
1237	* strip.c (handle_elf): Introduce new handle_elf boolean. Use it to
1238	determine whether to create an output and/or debug file. Remove new
1239	output file on error.
1240
12412017-06-06  Mark Wielaard  <mark@klomp.org>
1242
1243	* strip.c (handle_elf): Assume e_shstrndx section can be removed.
1244
12452017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
1246
1247	* readelf.c: Include strings.h.
1248
12492017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
1250
1251	* unstrip.c: Check shnum for 0 before subtracting from it.
1252
12532017-04-20  Ulf Hermann <ulf.hermann@qt.io>
1254
1255	* readelf.c: Replace YESSTR and NOSTR with gettext ("yes") and
1256	gettext ("no"), respectively.
1257
12582017-04-05  Mark Wielaard  <mark@klomp.org>
1259
1260	* elflint.c (check_elf_header): Decompress all sections.
1261
12622017-03-28  Mark Wielaard  <mark@klomp.org>
1263
1264	* elflint (check_group): Don't check if there is no flag word.
1265
12662017-03-27  Mark Wielaard  <mark@klomp.org>
1267
1268	* elflint.c (check_elf_header): Sanity check phnum and shnum.
1269
12702017-03-27  Mark Wielaard  <mark@klomp.org>
1271
1272	* elflint.c (check_sysv_hash): Return early if section size is
1273	too small.
1274	(check_sysv_hash64): Likewise.
1275	(check_hash): Calculate expect_entsize to check section size.
1276
12772017-03-27  Mark Wielaard  <mark@klomp.org>
1278
1279	* elflint.c (check_symtab_shndx): Check data->d_size.
1280
12812017-03-24  Mark Wielaard  <mjw@redhat.com>
1282
1283	* elfcmp.c (main): If n_namesz == 0 then the note name data is the
1284	empty string.
1285	* readelf.c (handle_notes_data): Likewise.
1286
12872017-03-24  Mark Wielaard  <mjw@redhat.com>
1288
1289	* readelf.c (handle_gnu_hash): Check inner < max_nsyms before
1290	indexing into chain array.
1291
12922017-02-16  Ulf Hermann  <ulf.hermann@qt.io>
1293
1294	* addr2line.c: Include printversion.h
1295	* ar.c: Likewise.
1296	* elflint.c: Likewise.
1297	* nm.c: Likewise.
1298	* objdump.c: Likewise.
1299	* ranlib.c: Likewise.
1300	* readelf.c: Likewise.
1301	* size.c: Likewise.
1302	* stack.c: Likewise.
1303	* strings.c: Likewise.
1304	* strip.c: Likewise.
1305	* elfcmp.c: Include printversion.h, remove system.h include.
1306	* elfcompress.c: Likewise.
1307	* findtextrel.c: Likewise.
1308	* unstrip.c: Likewise.
1309
13102017-02-14  Ulf Hermann  <ulf.hermann@qt.io>
1311
1312	* nm.c: Include color.h.
1313	* objdump.c: Likewise.
1314
13152016-12-24  Mark Wielaard  <mark@klomp.org>
1316
1317	* Makefile.am (findtextrel_LDADD): Add $(libeu).
1318	(addr2line_LDADD): Likewise.
1319	(elfcmp_LDADD): Likewise.
1320	* addr2line.c (print_version): Removed.
1321	* ar.c (print_version): Likewise.
1322	* elfcmp.c (print_version): Likewise.
1323	* elfcompress.c (print_version): Likewise.
1324	* elflint.c (print_version): Likewise.
1325	* findtextrel.c (print_version): Likewise.
1326	* nm.c (print_version): Likewise.
1327	* objdump.c: Likewise.
1328	* ranlib.c: Likewise.
1329	* readelf.c: Likewise.
1330	* size.c: Likewise.
1331	* stack.c: Likewise.
1332	* strings.c: Likewise.
1333	* strip.c: Likewise.
1334	* unstrip.c: Likewise.
1335
13362016-11-17  Mark Wielaard  <mjw@redhat.com>
1337
1338	* readelf.c (options): Add optional arg SECTION for symbols.
1339	(symbol_table_section): New static variable.
1340	(parse_opt): Set symbol_table_section on 's'.
1341	(print_symtab): Filter on symbol_table_section name is set.
1342
13432016-11-10  Mark Wielaard  <mjw@redhat.com>
1344
1345	* ar.c (write_member): Make sure tmpbuf is large enough to contain
1346	a starting '/' and ending '\0' char.
1347	(do_oper_insert): Likewise.
1348	* arlib.c (arlib_finalize): Format tmpbuf as PRId32 decimal.
1349
13502016-11-02  Mark Wielaard  <mjw@redhat.com>
1351
1352	* addr2line.c (handle_address): Add fallthrough comment.
1353	* elfcompress.c (parse_opt): Adjust fallthrough comment.
1354	* elflint.c (parse_opt): Add missing break after 'd' case.
1355	(check_sections): Add fallthrough comments.
1356	* objdump.c (parse_opt): Add explantion for fallthrough comment.
1357
13582016-10-22  Kevin Cernekee  <cernekee@chromium.org>
1359
1360	* unstrip.c: Fix "invalid string offset" error caused by using the
1361	  unstripped .symtab with the stripped .strtab.
1362
13632016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
1364
1365	* arlib.c: Remove system.h include, add libeu.h include.
1366	* arlib2.c: Remove sys/param.h include.
1367	* elfcompress.c: Add libeu.h include.
1368	* elflint.c: Remove sys/param.h include, add libeu.h include.
1369	* nm.c: Likewise.
1370	* objdump.c: Likewise.
1371	* ranlib.c: Likewise.
1372	* readelf.c: Likewise.
1373	* size.c: Remove sys/param.h include.
1374	* strings.c: Likewise, add libeu.h include.
1375	* strip.c: Likewise.
1376	* unstrip.c: Likewise.
1377
13782016-10-06  Mark Wielaard  <mjw@redhat.com>
1379
1380	* strip.c (handle_elf): Don't remove real symbols from allocated
1381	symbol tables.
1382
13832016-08-25  Mark Wielaard  <mjw@redhat.com>
1384
1385	* strip.c (handle_elf): Recompress with ELF_CHF_FORCE.
1386
13872016-08-06  Mark Wielaard  <mjw@redhat.com>
1388
1389	* strip.c (handle_elf): Uncompress and recompress relocation target
1390	section if necessary.
1391
13922016-07-08  Mark Wielaard  <mjw@redhat.com>
1393
1394	* Makefile.am (strip_LDADD): Add libdw.
1395	* elfcompress.c (process_file): Use dwelf_strtab functions instead of
1396	ebl_strtab.
1397	* strip.c (handle_elf): Likewise.
1398	* unstrip.c (new_shstrtab): Likewise.
1399
14002016-07-06  Mark Wielaard  <mjw@redhat.com>
1401
1402	* elf32-i386.script, i386_ld.c, ld.c, ld.h, ldgeneric.c, ldlex.l,
1403	ldscript.y, libld_elf_i386.map, none_ld.c, sectionhash.c,
1404	sectionhash.h, symbolhash.c, symbolhash.h, unaligned.h,
1405	versionhash.c, versionhash.h, xelf.h: Removed.
1406	* Makefile.am (YACC): Removed.
1407	(AM_YFLAGS): Removed.
1408	(AM_LFLAGS): Removed.
1409	(native_ld): Removed.
1410	(base_cpu): Removed.
1411	(bin_PROGRAMS): Removed ld.
1412	(ld_dsos): Removed.
1413	(ld_SOURCES): Removed.
1414	(noinst_LIBRARIES): Only libar.a.
1415	(EXTRA_DIST): Just arlib.h and debugpred.h.
1416	(ld_LDADD): Removed.
1417	(ld_LDFLAGS): Removed.
1418	(ldlex.o): Removed.
1419	(ldscript.h): Removed.
1420	(libld*): Removed.
1421	(CLEANFILES): Just *.gconv.
1422	(MAINTAINERCLEANFILES): Removed.
1423
14242016-07-06  Mark Wielaard  <mjw@redhat.com>
1425
1426	* unstrip.c (copy_elided_sections): Use unstripped_strent[] from
1427	index zero, instead of one.
1428
14292016-06-28  Richard Henderson <rth@redhat.com>
1430
1431	* elflint.c (valid_e_machine): Add EM_BPF.
1432
14332016-04-11  David Abdurachmanov  <davidlt@cern.ch>
1434
1435	* elfcmp.c (main): Fix self-comparison error with GCC 6.
1436
14372016-03-21  Mark Wielaard  <mjw@redhat.com>
1438
1439	* nm.c (show_symbols): Check for malloc size argument overflow.
1440
14412016-02-13  Mark Wielaard  <mjw@redhat.com>
1442
1443	* readelf.c (print_scngrp): Call error when gelf_getshdr fails.
1444	(print_symtab): Likewise.
1445	(handle_hash): Likewise.
1446	(dump_data_section): Print a warning if decompressing fails.
1447	(print_string_section): Likewise.
1448
14492016-02-13  Mark Wielaard  <mjw@redhat.com>
1450
1451	* elfcompress.c (parse_opt): Don't fallthrough after processing -q.
1452
14532016-02-12  Mark Wielaard  <mjw@redhat.com>
1454
1455	* strip.c (handle_elf): Correct elf_assert shndxdata check.
1456
14572016-02-09  Mark Wielaard  <mjw@redhat.com>
1458
1459	* readelf.c (read_encoded): Move up.
1460	(print_cfa_program): Add encoding argument. Use it for read_encoded
1461	when reading DW_CFA_set_loc op.
1462	(print_debug_frame_section): Pass fde_encoding to print_cfa_program.
1463
14642016-02-09  Mark Wielaard  <mjw@redhat.com>
1465
1466	* elflint.c (compare_hash_gnu_hash): Check hash sh_entsize against
1467	sizeof (Elf64_Xword). Correct invalid sh_entsize error message
1468	section idx and name.
1469
14702016-01-13  Mark Wielaard  <mjw@redhat.com>
1471
1472	* elflint.c (check_elf_header): Recognize ELFOSABI_FREEBSD.
1473
14742016-01-08  Mark Wielaard  <mjw@redhat.com>
1475
1476	* elfcompress.c (compress_section): Use %zu to print size_t.
1477	* readelf.c (print_shdr): Use %zx to print size_t.
1478
14792015-12-16  Mark Wielaard  <mjw@redhat.com>
1480
1481	* elfcompress.c: New file.
1482	* Makefile.am (bin_PROGRAMS): Add elfcompress.
1483	(elfcompress_LDADD): New variable.
1484
14852015-12-18  Mark Wielaard  <mjw@redhat.com>
1486
1487	* elflint.c (section_flags_string): Add NEWFLAG COMPRESSED.
1488	(check_sections): SHF_COMPRESSED can be on any special section.
1489	SHF_COMPRESSED is a valid section flag. SHF_COMPRESSED cannot
1490	be used together with SHF_ALLOC or with SHT_NOBITS. Should have
1491	a valid Chdr.
1492
14932015-10-20  Mark Wielaard  <mjw@redhat.com>
1494
1495	* readelf.c (options): Expand -z help text.
1496	(dump_data_section): Check whether we need and can decompress section
1497	data and call elf_rawzdata if so,
1498	(print_string_section): Likewise.
1499	(elf_contains_chdrs): New function.
1500	(process_elf_file): Rename print_unrelocated to print_unchanged,
1501	use elf_contains_chdrs.
1502	(print_scngrp): Check whether section is compressed before use.
1503	(print_symtab): Likewise.
1504	(handle_hash): Likewise.
1505
15062015-10-16  Mark Wielaard  <mjw@redhat.com>
1507
1508	* readelf.c (argp_option): Describe --decompress,-z.
1509	(print_decompress): New bool.
1510	(parse_opt): Handle -z.
1511	(elf_ch_type_name): New function.
1512	(print_shdr): Print section compress information.
1513
15142015-12-31  Mark Wielaard  <mjw@redhat.com>
1515
1516	* elflint.c (check_symtab): Add _edata and _end (plus extra underscore
1517	variants) to to the list of possibly dangling symbols.
1518
15192015-12-02  Mark Wielaard  <mjw@redhat.com>
1520
1521	* nm.c (process_file): Accept fd and pass it on.
1522	(handle_elf): Likewise.
1523	(find_no_debuginfo): New.
1524	(struct getdbg): Likewise.
1525	(getdbg_dwflmod): Likewise.
1526	(show_symbols): Take fd. If the file is ET_REL use libdwfl to get
1527	the relocated Dwarf.
1528
15292015-12-02  Mark Wielaard  <mjw@redhat.com>
1530
1531	* nm.c (get_local_names): Check for duplicates in local_root tree.
1532
15332015-12-02  Mark Wielaard  <mjw@redhat.com>
1534
1535	* unstrip.c (struct data_list): New.
1536	(new_data_list): Likewise.
1537	(record_new_data): Likewise.
1538	(free_new_data): Likewise.
1539	(adjust_relocs): Call record_new_data.
1540	(add_new_section_symbols): Likewise.
1541	(copy_elided_sections): Call free_new_data.
1542
15432015-12-01  Mark Wielaard  <mjw@redhat.com>
1544
1545	* elfcmp.c (main): Close ebl1 and ebl2 backends.
1546
15472015-10-16  Mark Wielaard  <mjw@redhat.com>
1548
1549	* Makefile.am [BUILD_STATIC](libdw): Add -lz.
1550	[BUILD_STATIC](libelf): Likewise.
1551
15522015-10-16  Mark Wielaard  <mjw@redhat.com>
1553
1554	* elflint.c (check_symtab): Don't check TLS symbol value against TLS
1555	phdr offset in debuginfo files.
1556	(check_sections): Don't try to match section offsets to phdrs offsets
1557	in debuginfo files.
1558
15592015-10-16  Mark Wielaard  <mjw@redhat.com>
1560
1561	* elflint.c (check_reloc_shdr): Reject only desthdrs if they have both
1562	SHF_MERGE and SHF_STRINGS set.
1563
15642015-10-13  Jose E. Marchesi  <jose.marchesi@oracle.com>
1565
1566	* elflint.c (check_sections): Do not rely on
1567	ebl_check_special_section when checking debuginfo files.  Also
1568	check that the type of WE sections in debuginfo files is NOBITS.
1569
15702015-10-13  Mark Wielaard  <mjw@redhat.com>
1571
1572	* elflint.c (check_program_header): Check relro flags are a subset
1573	of the load segment if they don't fully overlap.
1574
15752015-10-07  Mark Wielaard  <mjw@redhat.com>
1576
1577	* Makefile.am (ldlex_no_Wstack_usage): New.
1578	* ldlex.l ([RWX]): Make cnt unsigned.
1579
15802015-10-09  Josh Stone  <jistone@redhat.com>
1581
1582	* elflint.c (main): Replace stat64 and fstat64 with stat and fstat.
1583	* readelf.c (process_file): Likewise.
1584	(process_elf_file): Replace off64_t with off_t.
1585	* findtextrel.c (process_file): Replace open64 with open.
1586	* ld.c (main): Replace sizeof (off64_t) with 8.
1587	* strings.c: Replace off64_t with off_t throughout.
1588	(main): Replace stat64 and fstat64 with stat and fstat.
1589	(map_file): Replace mmap64 with mmap.
1590	(read_block): Likewise, and replace lseek64 with lseek.
1591	* strip.c (handle_elf): Replace ftruncate64 with ftruncate.
1592	(process_file): Replace stat64 and fstat64 with stat and fstat.
1593	* unstrip.c (parse_opt): Replace stat64 with stat.
1594	(handle_file): Replace open64 with open.
1595	(open_file): Likewise.
1596
15972015-10-08  Chih-Hung Hsieh  <chh@google.com>
1598
1599	* ld.c (determine_output_format): Move recursive nested
1600	function "try" to file scope.
1601
16022015-10-04  Mark Wielaard  <mjw@redhat.com>
1603
1604	* strip.c (handle_elf): Only sanity check section symbols to not
1605	kept discarded sections if we are creating a debug file.
1606
16072015-10-07  Mark Wielaard  <mjw@redhat.com>
1608
1609	* unstrip.c (MAX): Removed.
1610	(find_alloc_sections_prelink): Allocate exact amount of bytes for
1611	shdrs.
1612
16132015-10-05  Chih-Hung Hsieh <chh@google.com>
1614
1615	* unstrip.c (find_alloc_sections_prelink): Do not allocate
1616	on stack union types with variable length arrays; use xmalloc
1617	for such dynamic sized objects.
1618	* readelf.c (handle_core_item): Likewise, but use alloca
1619	for small variable size data object and add assert(count < 128).
1620
16212015-10-05  Josh Stone  <jistone@redhat.com>
1622
1623	* Makefile.am (libld_elf_i386.so): Add AM_V_CCLD silencer.
1624	(.deps/none_ld.Po): Always silence the dummy command.
1625	(make-debug-archive): Add AM_V_GEN and AM_V_at silencers.
1626
16272015-10-02  Mark Wielaard  <mjw@redhat.com>
1628
1629	* unstrip.c (copy_elided_sections): Use SH_INFO_LINK_P, not just
1630	SHF_INFO_LINK.
1631
16322015-10-02  Mark Wielaard  <mjw@redhat.com>
1633
1634	* strip.c (handle_elf): Don't move around allocated NOBITS sections.
1635	Don't just mark the section header string table as unused.
1636	* unstrip.c (copy_elided_sections): Add header names to strtab if
1637	shstrndx equals the symtab strtabndx.
1638
16392015-09-22  Mark Wielaard  <mjw@redhat.com>
1640
1641	* strip.c (cleanup_debug): Remove old-style function definitions.
1642
16432015-09-09  Chih-Hung Hsieh  <chh@google.com>
1644
1645	* readelf.c (print_debug_exception_table): Initialize variable before
1646	it is used, because compiler does not know that error never returns.
1647	(dump_arhive_index): Likewise.
1648
16492015-09-04  Chih-Hung Hsieh  <chh@google.com>
1650
1651	* elflint.c (check_group): Replace %Z length modifier with %z.
1652	(check_note_data): Likewise.
1653	* findtextrel.c (process_file): Likewise.
1654	* readelf.c (handle_dynamic): Likewise.
1655	(handle_symtab): Likewise.
1656	(handle_verneed): Likewise.
1657	(handle_verdef): Likewise.
1658	(handle_versym): Likewise.
1659	(print_hash_info): Likewise.
1660	(print_decoded_aranges_section): Likewise.
1661	(print_debug_aranges_section): Likewise.
1662	(print_debug_line_section): Likewise.
1663	(hex_dump): Likewise.
1664	(dump_data_section): Likewise.
1665	(print_string_section): Likewise.
1666	(dump_archive_index): Likewise.
1667	* unstrip.c (adjust_relocs): Likewise.
1668	(collect_symbols): likewise.
1669	(get_section_name): Likewise.
1670	(find_alloc_sections_prelink): Likewise.
1671	(copy_elided_sections): Likewise.
1672	* ldscript.y (add_id_list): Add missing '%s'.
1673
16742015-09-03  Mark Wielaard  <mjw@redhat.com>
1675
1676	* readelf.c (handle_core_item): Handle right shift >= 32 bits.
1677
16782015-08-11  Mark Wielaard  <mjw@redhat.com>
1679
1680	* elflint.c (check_sections): When gnuld and a NOBITS section falls
1681	inside a segment make sure any ELF file contents is zero.
1682
16832015-07-29  Mark Wielaard  <mjw@redhat.com>
1684
1685	* unstrip.c (sections_flags_match): New function.
1686	(sections_match): Use sections_flags_match.
1687	(find_alloc_sections_prelink): Only clear matched sections if there
1688	is an undo section.
1689	(copy_elided_sections): Add SHF_INFO_LINK to shdr_mem.sh_flags if
1690	necessary.
1691
16922015-06-27  Pino Toscano  <toscano.pino@tiscali.it>
1693
1694	* src/strings.c: Define MAP_POPULATE if not defined already.
1695
16962015-06-27  Mark Wielaard  <mjw@redhat.com>
1697
1698	* nm.c (show_symbols): First call elf_getdata, then allocate memory.
1699
17002015-06-18  Mark Wielaard  <mjw@redhat.com>
1701
1702	* findtextrel.c (process_file): Free segments after use.
1703
17042015-06-18  Mark Wielaard  <mjw@redhat.com>
1705
1706	* readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals
1707	phdr2 pointer.
1708
17092015-06-18  Mark Wielaard  <mjw@redhat.com>
1710
1711	* readelf.c (handle_gnu_hash): Free lengths on invalid_data.
1712
17132015-06-18  Mark Wielaard  <mjw@redhat.com>
1714
1715	* elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
1716	exists. Warn otherwise.
1717
17182015-06-18  Mark Wielaard  <mjw@redhat.com>
1719
1720	* nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
1721	known whether or not we stack allocated memory.
1722
17232015-06-18  Mark Wielaard  <mjw@redhat.com>
1724
1725	* strings.c (readelf): Use "<unknown>" if we cannot retrieve section
1726	name.
1727
17282015-06-09  Mark Wielaard  <mjw@redhat.com>
1729
1730	* addr2line.c (print_dwarf_function): Always free scopes before
1731	returning.
1732
17332015-06-09  Mark Wielaard  <mjw@redhat.com>
1734
1735	* strip.c (handle_ar): Mark as unused.
1736	(process_file): Produce an error when trying to handle an ar.
1737
17382015-05-30  Mark Wielaard  <mjw@redhat.com>
1739
1740	* elfcmp.c (main): Only call memcmp when d_size != 0.
1741
17422015-05-23  Mark Wielaard  <mjw@redhat.com>
1743
1744	* Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint,
1745	findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage.
1746
17472015-05-21  Mark Wielaard  <mjw@redhat.com>
1748
1749	* addr2line.c (handle_address): Set scopes to NULL after free.
1750
17512015-05-20  Mark Wielaard  <mjw@redhat.com>
1752
1753	* addr2line.c (OPT_PRETTY): New constant define.
1754	(argp_option): Add "pretty-print".
1755	(pretty): New static bool.
1756	(parse_opt): Set pretty.
1757	(print_dwarf_function): Adjust output when pretty is set.
1758	(print_addrsym): Likewise.
1759	(handle_address): Likewise.
1760
17612015-05-20  Mark Wielaard  <mjw@redhat.com>
1762
1763	* Makefile.am (addr2line_LDADD): Add demanglelib.
1764	* addr2line.c (argp_option): Move demangle under output format.
1765	(demangle): New static bool.
1766	(demangle_buffer_len): New static size_t.
1767	(demangle_buffer): New static char *.
1768	(main): free demangle_buffer.
1769	(parse_opt): Set demangle.
1770	(symname): New static function.
1771	(get_diename): Use symname.
1772	(print_dwarf_function): Likewise.
1773	(print_addrsym): Likewise.
1774	(handle_address): Likewise.
1775
17762015-05-20  Mark Wielaard  <mjw@redhat.com>
1777
1778	* addr2line.c (argp_option): Add "addresses", 'a'.
1779	(print_addresses): New static bool.
1780	(parse_opt): Set print_addresses.
1781	(get_addr_width): New static function.
1782	(handle_address): Print address if print_addresses is true.
1783
17842015-05-20  Mark Wielaard  <mjw@redhat.com>
1785
1786	* addr2line.c (handle_address): Call strtoumax with base 16. Make
1787	sure all input has been processed.
1788
17892015-05-20  Mark Wielaard  <mjw@redhat.com>
1790
1791	* addr2line (argp_option): Group 'section' under "Input format
1792	options".
1793
17942015-05-12  Mark Wielaard  <mjw@redhat.com>
1795
1796	* strip.c (debug_fd): New static variable.
1797	(tmp_debug_fname): Likewise.
1798	(cleanup_debug): New function using the above to clean up temporary
1799	debug file.
1800	(INTERNAL_ERROR): Call cleanup_debug.
1801	(handle_elf): Use debug_fd and tmp_debug_fname statics and call
1802	cleanup_debug before any error. Use output_fname instead of fname in
1803	error messages when it exists (-o was given). SHT_NOBITS sections
1804	can also be moved freely even if SHF_ALLOC is set. Add various
1805	sanity checks. Use elf_assert instead of plain assert.
1806
18072015-05-08  Mark Wielaard  <mjw@redhat.com>
1808
1809	* nm.c (show_symbols): Call gelf_fsize with EV_CURRENT.
1810	* strip.c (handle_elf): Likewise.
1811
18122015-05-06  Mark Wielaard  <mjw@redhat.com>
1813
1814	* elflint.c (check_gnu_hash): Return early when 2nd hash function
1815	shift too big. Check there is enough data available. Make sure
1816	bitmask_words is not zero.
1817	(check_verdef): Use Elf64_Word for shdr->sh_info cnt.
1818	(check_verneed): Likewise.
1819	(check_attributes): Break when vendor name isn't terminated.
1820	Add overflow check for subsection_len.
1821
18222015-05-05  Mark Wielaard  <mjw@redhat.com>
1823
1824	* nm.c (show_symbols): Handle dwarf_linesrc returning NULL.
1825
18262015-05-04  Max Filippov  <jcmvbkbc@gmail.com>
1827
1828	* ar.c (do_oper_extract): Replace struct timeval with struct timespec
1829	and futimes with futimens.
1830	* strip.c (process_file): Replace struct timeval with struct timespec.
1831	(handle_elf, handle_ar): Replace struct timeval with struct timespec
1832	in prototype. Replace futimes with futimens.
1833
18342015-05-04  Max Filippov  <jcmvbkbc@gmail.com>
1835
1836	* addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
1837	* ar.c: Likewise.
1838	* ld.c: Likewise.
1839	* nm.c: Likewise.
1840	* objdump.c: Likewise.
1841	* ranlib.c: Likewise.
1842	* size.c: Likewise.
1843	* strip.c: Likewise.
1844	* unstrip.c: Likewise.
1845
18462015-05-04  Anthony G. Basile  <blueness@gentoo.org>
1847
1848	* Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
1849	(ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
1850	(elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
1851	(ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
1852
18532015-03-22  Mark Wielaard  <mjw@redhat.com>
1854
1855	* readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
1856	before subtracting cie_id. And cast cie_offset to Dwarf_Off before
1857	comparison.
1858
18592015-03-22  Mark Wielaard  <mjw@redhat.com>
1860
1861	* readelf.c (print_gdb_index_section): Check all offsets used
1862	against section d_size.
1863
18642015-03-17  Mark Wielaard  <mjw@redhat.com>
1865
1866	* readelf.c (print_debug): Don't return, but always use dummy_dbg.
1867
18682015-03-17  Mark Wielaard  <mjw@redhat.com>
1869
1870	* readelf.c (print_gdb_index_section): Add overflow checking for
1871	dataend checks.
1872
18732015-03-14  Mark Wielaard  <mjw@redhat.com>
1874
1875	* nm.c (INTERNAL_ERROR): Remove __DATE__.
1876	* objdump.c (INTERNAL_ERROR): Likewise.
1877	* size.c (INTERNAL_ERROR): Likewise.
1878	* strip.c (INTERNAL_ERROR): Likewise.
1879
18802015-03-18  Petr Machata  <pmachata@redhat.com>
1881
1882	* readelf.c (dwarf_tag_string, dwarf_attr_string)
1883	(dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
1884	(dwarf_encoding_string, dwarf_access_string)
1885	(dwarf_visibility_string, dwarf_virtuality_string)
1886	(dwarf_identifier_case_string, dwarf_calling_convention_string)
1887	(dwarf_ordering_string, dwarf_discr_list_string)
1888	(dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
1889	to match the API changes.
1890
18912015-03-09  Mark Wielaard  <mjw@redhat.com>
1892
1893	* elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
1894
18952015-01-03  Mark Wielaard  <mjw@redhat.com>
1896
1897	* elfcmp (main): Check section name is not NULL. Check sh_entsize
1898	is not zero for symbol tables. Check phdrs are not NULL.
1899	(search_for_copy_reloc): Check sh_entsize is not zero.
1900
19012014-12-30  Mark Wielaard  <mjw@redhat.com>
1902
1903	* elflint.c (check_scn_group): Check d_buf and name are not NULL.
1904	(is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
1905	zero.
1906	(check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
1907	(check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
1908	Check shdr and symshdr sh_entsize are not zero.
1909	(check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
1910	Check symshdr->sh_entsize is not zero. Check data->d_buf is not
1911	NULL.
1912	(compare_hash_gnu_hash): Check sections d_buf are not NULL.
1913	Check section data is large enough. Use gnu_symbias.
1914	(check_group): Check section val is valid.
1915	(has_copy_reloc): Check sh_entsize is not zero.
1916	(check_versym): Likewise.
1917	(unknown_dependency_p): Likewise.
1918	(check_verneed): Break on invalid ref or offset. Don't assert.
1919	Report error when next offset is zero, but more vers expected.
1920	(check_verdef): Likewise.
1921	(check_attributes): Make sure d_buf is not NULL.
1922	(check_note): Likewise.
1923	(check_note_section): Likewise.
1924	(check_program_header): Make sure section name is not NULL.
1925
19262014-12-26  Mark Wielaard  <mjw@redhat.com>
1927
1928	* strings.c (read_elf): Produce error when section data falls outside
1929	file.
1930
19312014-12-26  Mark Wielaard  <mjw@redhat.com>
1932
1933	* nm.c (show_symbols): Guard against divide by zero in error check.
1934	Add section index number in error message.
1935
19362014-12-26  Mark Wielaard  <mjw@redhat.com>
1937
1938	* nm.c (handle_ar): Skip over /SYM64/ entries.
1939
19402014-12-26  Mark Wielaard  <mjw@redhat.com>
1941
1942	* nm.c (handle_ar): Break on arsym with invalid offset.
1943
19442014-12-20  Mark Wielaard  <mjw@redhat.com>
1945
1946	* readelf.c (print_debug_macinfo_section): Mark cus sentinel files
1947	as -1 non-existent. Check macoff against sentinel cus.
1948
19492014-12-20  Mark Wielaard  <mjw@redhat.com>
1950
1951	* readelf.c (print_debug_exception_table): Add max_action overflow
1952	check. Check action_table_end before reading slib128. Check
1953	max_ar_filter underflow.
1954
19552014-12-18  Ulrich Drepper  <drepper@gmail.com>
1956
1957	* Makefile.am: Suppress output of textrel_check command.
1958
19592014-12-17  Mark Wielaard  <mjw@redhat.com>
1960
1961	* readelf.c (print_cfa_program): Add bounds check before each op that
1962	takes at least one argument.
1963
19642014-12-16  Mark Wielaard  <mjw@redhat.com>
1965
1966	* readelf.c (print_decoded_line_section): Print dwarf_errmsg if
1967	dwarf_onesrcline or dwarf_linesrc fails.
1968
19692014-12-16  Mark Wielaard  <mjw@redhat.com>
1970
1971	* readelf.c (print_debug_line_section): Correct overflow check for
1972	unit_length.
1973	(print_debug_aranges_section): Correct overflow check for length.
1974
19752014-12-15  Mark Wielaard  <mjw@redhat.com>
1976
1977	* readelf.c (notice_listptr): Return false if offset doesn't fit
1978	in 61-bits.
1979	(attr_callback): Warn if loclist or rangelist offset doesn't fit.
1980
19812014-12-15  Mark Wielaard  <mjw@redhat.com>
1982
1983	* readelf.c (print_ops): Don't assert when addr_size or ref_size
1984	is not 4 or 8, just report invalid data.
1985
19862014-12-15  Mark Wielaard  <mjw@redhat.com>
1987
1988	* readelf.c (print_gdb_index_section): Add more bounds checks.
1989
19902014-12-15  Mark Wielaard  <mjw@redhat.com>
1991
1992	* readelf.c (print_debug_line_section): Check there is enough room
1993	for DW_LNE_set_address argument. Make sure there is enough room
1994	for the the initial unit_length.
1995
19962014-12-14  Mark Wielaard  <mjw@redhat.com>
1997
1998	* elflint.c (check_attributes): Call get_uleb128 with end pointer.
1999	* readelf.c (print_attributes): Likewise.
2000	(print_ops): Likewise and also for get_sleb128.
2001	(print_cfa_program): Likewise and add more readp bounds checks.
2002	(read_encoded): Likewise.
2003	(print_debug_frame_section): Likewise.
2004	(print_debug_line_section): Likewise.
2005	(print_debug_macinfo_section): Likewise.
2006	(print_debug_macro_section): Likewise.
2007	(print_debug_exception_table): Likewise.
2008
20092014-12-16  Mark Wielaard  <mjw@redhat.com>
2010
2011	* elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
2012	difference doesn't wrap around before returning as int.
2013
20142014-12-11  Mark Wielaard  <mjw@redhat.com>
2015
2016	* readelf.c (print_debug_exception_table): Check TType base offset
2017	and Action table are sane.
2018
20192014-12-11  Mark Wielaard  <mjw@redhat.com>
2020
2021	* readelf.c (print_debug_frame_section): Check number of augmentation
2022	chars to print.
2023
20242014-12-09  Mark Wielaard  <mjw@redhat.com>
2025
2026	* readelf.c (handle_file_note): Check count fits data section and
2027	doesn't overflow fptr.
2028
20292014-12-08  Mark Wielaard  <mjw@redhat.com>
2030
2031	* readelf.c (print_debug_exception_table): Report invalid data if
2032	action table doesn't immediately follow call site table.
2033
20342014-12-10  Josh Stone  <jistone@redhat.com>
2035
2036	* addr2line.c (get_diename): New, get linkage_name or name.
2037	* addr2line.c (print_dwarf_function): Use get_diename.
2038	* addr2line.c (handle_address): Likewise.
2039	* addr2line.c (print_diesym): Removed.
2040
20412014-12-10  Josh Stone  <jistone@redhat.com>
2042
2043	* addr2line.c (handle_address): Find the proper inline parents.
2044
20452014-12-07  Mark Wielaard  <mjw@redhat.com>
2046
2047	* readelf.c (print_debug_line_section): max_ops_per_instr cannot
2048	be zero.
2049
20502014-12-07  Mark Wielaard  <mjw@redhat.com>
2051
2052	* readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
2053	and DW_OP_GNU_implicit_pointer.
2054
20552014-12-04  Mark Wielaard  <mjw@redhat.com>
2056
2057	* objdump.c (show_relocs_x): Make sure destshdr exists.
2058	(show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
2059	(show_relocs_rela): Likewise.
2060	(show_relocs): Make sure destshdr, symshdr and symdata exists.
2061
20622014-11-30  Mark Wielaard  <mjw@redhat.com>
2063
2064	* readelf.c (handle_sysv_hash64): Fix overflow check.
2065
20662014-11-28  Mark Wielaard  <mjw@redhat.com>
2067
2068	* readelf.c (handle_relocs_rel): Don't reuse destshdr to store
2069	section header of a relocation against a STT_SECTION symbol. Use
2070	a new local variable secshdr.
2071	(handle_relocs_rela): Likewise.
2072
20732014-11-26  Mark Wielaard  <mjw@redhat.com>
2074
2075	* readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
2076	to ptrdiff_t for comparison.
2077
20782014-11-24  Mark Wielaard  <mjw@redhat.com>
2079
2080	* readelf.c (print_debug_line_section): Check line_range is not zero
2081	before usage.
2082
20832014-11-23  Mark Wielaard  <mjw@redhat.com>
2084
2085	* readelf.c (print_debug_aranges_section): Check length to catch
2086	nexthdr overflow.
2087
20882014-11-21  Mark Wielaard  <mjw@redhat.com>
2089
2090	* readelf.c (print_attributes): Guard against empty section.
2091	Document attribute format. Break when vendor name isn't terminated.
2092	Add overflow check for subsection_len. Handle both gnu and non-gnu
2093	attribute tags.
2094
20952014-11-22  Mark Wielaard  <mjw@redhat.com>
2096
2097	* elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
2098	* findtextrel.c (process_file): Use elf_getphdrnum.
2099	* readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
2100	(print_phdr): Check phnum.
2101	* size.c (show_segments): Use elf_getphdrnum.
2102	* strip.c (handle_elf): Likewise.
2103	* unstrip.c (copy_elf): Likewise.
2104	(copy_elided_sections): Likewise.
2105	(handle_file): Likewise.
2106
21072014-11-18  Mark Wielaard  <mjw@redhat.com>
2108
2109	* readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
2110	length.
2111
21122014-11-17  Mark Wielaard  <mjw@redhat.com>
2113
2114	* readelf.c (handle_verneed): Check vna_next and vn_next exist.
2115	(handle_verdef): Check vda_next and vd_next exist.
2116	(handle_versym): Check vd_next, vna_next and vn_next exist.
2117	Check vername and filename are not NULL before use.
2118
21192014-11-17  Mark Wielaard  <mjw@redhat.com>
2120
2121	* elfcmp.c (main): Check section names are NULL before use.
2122	* objdump.c (section_match): Likewise.
2123	* size.c (show_sysv): Likewise.
2124
21252014-11-17  Mark Wielaard  <mjw@redhat.com>
2126
2127	* readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
2128	or 8 instead of just calling print_cfa_program.
2129
21302014-11-16  Mark Wielaard  <mjw@redhat.com>
2131
2132	* readelf (process_elf_file): Set phnum to zero if there aren't
2133	actually any pheaders.
2134	(print_phdr): Check there actually is a phdr.
2135
21362014-11-16  Mark Wielaard  <mjw@redhat.com>
2137
2138	* readelf.c (print_cfa_program): Check block len before calling
2139	print_ops.
2140
21412014-11-14  Mark Wielaard  <mjw@redhat.com>
2142
2143	* readelf.c (print_debug_frame_section): Sanity Check CIE
2144	unit_length and augmentationlen.
2145
21462014-11-14  Mark Wielaard  <mjw@redhat.com>
2147
2148	* readelf.c (handle_versym): Check def == NULL before use.
2149
21502014-11-08  Mark Wielaard  <mjw@redhat.com>
2151
2152	* readelf.c (handle_versym): Initialize vername and filename array
2153	elements.
2154
21552014-11-07  Mark Wielaard  <mjw@redhat.com>
2156
2157	* readelf.c (handle_sysv_hash): Sanity check section contents.
2158	(handle_sysv_hash64): Likewise.
2159	(handle_gnu_hash): Likewise.
2160
21612014-09-14  Petr Machata  <pmachata@redhat.com>
2162
2163	* readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
2164
21652014-09-12  Petr Machata  <pmachata@redhat.com>
2166
2167	* readelf.c (encoded_ptr_size): In the switch statement, change
2168	magic constants 3 and 4 to DW_EH_PE_* counterparts.  Still accept
2169	0.  Print diagnostic for anything else.
2170
21712014-08-25  Josh Stone  <jistone@redhat.com>
2172
2173	* Makefile.am: Prevent premature @AR@ replacement in a sed expression.
2174
21752014-07-04  Menanteau Guy  <menantea@linux.vnet.ibm.com>
2176	    Mark Wielaard  <mjw@redhat.com>
2177
2178	* elflint (check_symtab): Add ".TOC." to the list of possibly
2179	dangling symbols because of sourceware PR13621.
2180
21812014-06-14  Mark Wielaard  <mjw@redhat.com>
2182
2183	* elflint (check_symtab): Use ebl_func_addr_mask on st_value.
2184
21852014-05-27  Mark Wielaard  <mjw@redhat.com>
2186
2187	* readelf.c (print_debug): Skip section if name is NULL.
2188
21892014-05-26  Mark Wielaard  <mjw@redhat.com>
2190
2191	* readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
2192	does, when sh_info == 0.
2193
21942014-05-26  Mark Wielaard  <mjw@redhat.com>
2195
2196	* unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
2197	section when sh_size of the original and undo .bss section are equal.
2198
21992014-05-26  Mark Wielaard  <mjw@redhat.com>
2200
2201	* unstrip.c (options): Add --force, -F.
2202	(struct arg_info): Add bool force.
2203	(parse_opt): Handle 'F', set force.
2204	(handle_explicit_files): Add force argument, add warn function,
2205	separate check ehdr field checks, use warn.
2206	(handle_dwfl_module): Add force argument, pass on to
2207	handle_explicit_files.
2208	(handle_output_dir_module): Add force argument, pass on to
2209	handle_dwfl_module.
2210	(handle_implicit_modules): Pass info->force to handle_dwfl_module and
2211	handle_output_dir_module.
2212	(main): Pass info.force to handle_explicit_files.
2213
22142014-05-19  Mark Wielaard  <mjw@redhat.com>
2215
2216	* elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
2217
22182014-05-01  Mark Wielaard  <mjw@redhat.com>
2219
2220	* readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
2221	if looking for alternate debug file.
2222
22232014-04-11  Mark Wielaard  <mjw@redhat.com>
2224
2225	* Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
2226
22272014-04-22  Mark Wielaard  <mjw@redhat.com>
2228
2229	* readelf.c (handle_core_item): Make sure variable length array
2230	contains at least enough space for terminating zero char.
2231
22322014-04-22  Mark Wielaard  <mjw@redhat.com>
2233
2234	* readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
2235	left shift.
2236
22372014-03-13  Mark Wielaard  <mjw@redhat.com>
2238
2239	* Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
2240	LDADD lines.
2241	* strings.c (process_chunk): Remove _MUDFLAP condition.
2242
22432014-04-09  Mark Wielaard  <mjw@redhat.com>
2244
2245	* readelf.c (print_debug_aranges_section): Don't get the raw section
2246	data, use the possibly decompressed .[z]debug sectiondata.
2247	(print_debug_ranges_section): Likewise.
2248	(print_debug_frame_section): Likewise.
2249	(print_debug_line_section): Likewise.
2250	(print_debug_loc_section): Likewise.
2251	(print_debug_macinfo_section): Likewise.
2252	(print_debug_macro_section): Likewise.
2253
22542014-04-10  Mark Wielaard  <mjw@redhat.com>
2255
2256	* readelf.c (buf_read_ulong): Pass actual long size to convert.
2257
22582014-03-05  Mark Wielaard  <mjw@redhat.com>
2259
2260	* readelf.c (attr_callback): Print DW_FORM_sdata values as signed
2261	numbers.
2262
22632014-02-24  Mark Wielaard  <mjw@redhat.com>
2264
2265	* readelf (print_phdr): Check there is a SHT_PROGBITS section at the
2266	offset given by p_offsets for a PT_INTERP segment before trying to
2267	display the interpreter string.
2268
22692014-02-07  Mark Wielaard  <mjw@redhat.com>
2270
2271	* readelf.c (print_phdr): Check phdr->p_filesz and make sure
2272	interpreter string is zero terminated before calling printf.
2273
22742014-01-22  Mark Wielaard  <mjw@redhat.com>
2275
2276	* Makefile.am (nm_no_Wformat): Removed.
2277	(size_no_Wformat): Likewise.
2278	(strings_no_Wformat): Likewise.
2279	(addr2line_no_Wformat): Likewise.
2280	* size.c (show_sysv): Use fmtstr directly as literal in printf.
2281	(show_sysv_one_line): Likewise.
2282	* strings.c (locfmt): Removed.
2283	(radix): New static enum.
2284	(parse_opt): Set radix, not locfmt.
2285	(process_chunk_mb): Use fmtstr directly as literal in printf based
2286	on radix.
2287	(process_chunk): Likewise.
2288	* nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
2289	(show_symbols_bsd): Likewise.
2290	(show_symbols_posix): Likewise.
2291
22922014-01-21  Mark Wielaard  <mjw@redhat.com>
2293
2294	* stack.c (show_inlines): New static boolean.
2295	(print_frame): New function split out from...
2296	(print_frames): ..here. If show_inlines is true and we found a
2297	DIE for the frame address, call print_inline_frames otherwise
2298	call print_frame. Keep track of and track frame_nr.
2299	(print_inline_frames): New function.
2300	(parse_opt): Handle '-i'.
2301	(main): Add 'i' to options.
2302
23032014-01-27  Mark Wielaard  <mjw@redhat.com>
2304
2305	* stack.c (maxframes): Initialize to 256.
2306	(main): Document new default in options. Document magic number
2307	used in frames.allocated initialization.
2308
23092014-01-20  Mark Wielaard  <mjw@redhat.com>
2310
2311	* stack.c (show_debugname): New static boolean.
2312	(die_name): New function.
2313	(print_frames): If show_debugname is true set symname to the
2314	first function-like DIE with a name in scope for the address in
2315	the debuginfo.
2316	(parse_opt): Handle '-d'.
2317	(main): Add 'd' to options.
2318
23192014-01-20  Mark Wielaard  <mjw@redhat.com>
2320
2321	* addr2line.c (handle_address): Initialize scopes to NULL.
2322
23232014-01-17  Roland McGrath  <roland@redhat.com>
2324
2325	* strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
2326	st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
2327	Don't use assert on input values, instead bail with "illformed" error.
2328
23292014-01-17  Roland McGrath  <roland@redhat.com>
2330
2331	* readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
2332	(handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
2333	(handle_scngrp): Check for bogus sh_info.
2334
23352014-01-17  Jakub Jelinek  <jakub@redhat.com>
2336
2337	* elflint.c (section_name): Return "<invalid>" instead of
2338	crashing on invalid section name.
2339	(check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
2340	check_symtab_shndx, check_hash, check_versym): Robustify.
2341	(check_hash): Don't check entries beyond end of section.
2342	(check_note): Don't crash if gelf_rawchunk fails.
2343
23442014-01-17  Petr Machata  <pmachata@redhat.com>
2345
2346	* readelf.c (handle_dynamic, handle_relocs_rel)
2347	(handle_relocs_rela, handle_versym, print_liblist):
2348	Use gelf_fsize instead of relying on shdr->sh_entsize.
2349
23502014-01-14  Mark Wielaard  <mjw@redhat.com>
2351
2352	* readelf.c (print_debug_macro_section): Clear vendor array before
2353	use.
2354
23552014-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2356
2357	Fix corruption of non-C++ symbols by the demangler.
2358	* nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
2359	(show_symbols): Check for _Z.
2360	* stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
2361
23622014-01-02  Mark Wielaard  <mjw@redhat.com>
2363
2364	* stack.c (show_raw): Declare unconditionally.
2365	(parse_opt): Handle '-r' unconditionally.
2366	(main): Show "raw" option even without USE_DEMANGLE.
2367
23682014-01-02  Mark Wielaard  <mjw@redhat.com>
2369
2370	* stack.c (print_frames): Print 0x before build-id hex-offset.
2371
23722014-01-02  Mark Wielaard  <mjw@redhat.com>
2373
2374	* stack.c (maxframes): Increase to 2048.
2375	(struct frames): Add allocated field.
2376	(frame_callback): If frames used is frames allocated, realloc.
2377	(print_frames): Show an error if maxframes has been reached.
2378	(parse_opt): Allow -n 0 for unlimited frames.
2379	(main): Document -n 0 and new default 2048 frames. Allocate initial
2380	number of frames with malloc.
2381
23822013-12-30  Mark Wielaard  <mjw@redhat.com>
2383
2384	* stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
2385	or dwfl_core_file_attach and check for errors.
2386
23872013-12-28  Mark Wielaard  <mjw@redhat.com>
2388
2389	* stack.c (print_frames): Remove address width code and use...
2390	(get_addr_width): ...this new function.
2391	(show_modules): New static boolean.
2392	(module_callback): New static function.
2393	(parse_opt): Handle '-l'.
2394	(main): Add 'l' to options. If show_modules then use dwfl_getmodules
2395	with module_callback to show all detected modules and possible
2396	build_id, elf and dwarf files.
2397
23982013-12-27  Mark Wielaard  <mjw@redhat.com>
2399
2400	* stack.c (frames_shown): New static boolean.
2401	(EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
2402	(frame_callback): Return -1 on error. Don't print error.
2403	(print_frames): Add arguments, tid, dwflerr and what. Print tid.
2404	If there was an error report it with address and module if possible.
2405	Record whether any frames were actually printed.
2406	(thread_callback): Collect tid and err, pass it to print_frames.
2407	(parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
2408	if dwfl_linux_proc_report returned it. Check whether we are properly
2409	attached with dwfl_pid.
2410	(main): Document exit status. Don't report DWARF_CB_ABORT from
2411	callbacks as error. Pass real errors to print_frames. Return
2412	EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
2413	were any non-fatal errors.
2414
24152013-12-23  Mark Wielaard  <mjw@redhat.com>
2416
2417	* Makefile.am (stack_LDADD): Add demanglelib.
2418	* stack.c (show_quiet): New static boolean, default false.
2419	(show_raw): Likewise.
2420	(demangle_buffer_len): New static size_t.
2421	(demangle_buffer): New static char *.
2422	(print_frames): Don't resolve pc name if show_quiet. Demangle name
2423	unless show_raw.
2424	(parse_opt): Handle '-q' and '-r'.
2425	(main): Add 'q' and 'r' to options. Free demangle_buffer.
2426
24272013-12-23  Mark Wielaard  <mjw@redhat.com>
2428
2429	* stack.c (OPT_DEBUGINFO): New define.
2430	(OPT_COREFILE): Likewise.
2431	(pid): New static.
2432	(core_fd): Likewise.
2433	(core): Likewise.
2434	(exec): Likewise.
2435	(debuginfo_path): Likewise.
2436	(parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
2437	Do argument sanity checking. Setup Dwfl.
2438	(main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
2439	Remove argp_child children, simplify argp doc, remove custom
2440	usage message and construction of dwfl with dwfl_standard_argp.
2441	Use pid directly as tid. close core and core_fd if opened. Print
2442	pid of process or core.
2443
24442013-12-23  Mark Wielaard  <mjw@redhat.com>
2445
2446	* stack.c (show_build_id): New static boolean.
2447	(print_frames): Print module build-id, load address and pc offset
2448	if show_build_id is true.
2449	(parse_opt): Handle '-b'.
2450	(main): Add -b to options.
2451
24522013-12-22  Mark Wielaard  <mjw@redhat.com>
2453
2454	* stack.c (maxframes): New static unsigned. Initialize to 64.
2455	(struct frame): New struct.
2456	(struct frames): Likewise.
2457	(dwfl): New static Dwfl pointer.
2458	(frame_callback): Use arg as struct frames and fill it next frame.
2459	Return DWARF_CB_ABORT when maxframes has been reached. Move
2460	printing of frame to...
2461	(print_frames): ...here. New function.
2462	(thread_callback): Use arg as struct frames and set frames to zero.
2463	Call print_frames.
2464	(parse_opt): Handle '-n'.
2465	(main): Add -n to options. Allocate frames using maxframes. Pass
2466	frames to frame_callback and thread_callback.
2467
24682013-12-20  Mark Wielaard  <mjw@redhat.com>
2469
2470	* stack.c (show_one_tid): New static boolean.
2471	(parse_opt): Handle '-1'.
2472	(main): Add -1 to options. Call dwfl_getthread_frames when
2473	show_one_tid is true.
2474
24752013-12-18  Mark Wielaard  <mjw@redhat.com>
2476
2477	* addr2line.c (options): Add symbol-sections, 'x'.
2478	(show_symbol_sections): New static bool.
2479	(parse_opt): Handle 'x'.
2480	(print_addrsym): Use dwfl_module_addrinfo value.r
2481	Also show section of address with show_symbol_sections.
2482	(find_symbol): Use dwfl_module_getsym_info and set value.
2483	(handle_address): Request value and use it instead of sym.st_value.
2484	* readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
2485	name and offset.
2486
24872013-12-17  Masatake YAMATO  <yamato@redhat.com>
2488	    Mark Wielaard  <mjw@redhat.com>
2489
2490	* stack.c (show_activation, show_module, show_source): New variables.
2491	(parse_opt): Set show_activation if -a option is given.
2492	Set show_module if -m option is given. Set show_source if -s option
2493	is given. Set all show booleans when -v option is given.
2494	(main): Added `-a', `-m', `-s', and `-v' to the help message.
2495	(frame_callback): Print module and source file information.
2496
24972013-11-25  Petr Machata  <pmachata@redhat.com>
2498
2499	* elflint.c (valid_e_machine): Add EM_AARCH64.
2500
25012013-11-14  Petr Machata  <pmachata@redhat.com>
2502
2503	* readelf.c (handle_core_item) <'h'>: New branch for handling
2504	fields that shouldn't be displayed.
2505
25062013-11-10  Mark Wielaard  <mjw@redhat.com>
2507
2508	* stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
2509	ARGP_PROGRAM_BUG_ADDRESS_DEF.
2510	(print_version): New function.
2511
25122013-11-09  Mark Wielaard  <mjw@redhat.com>
2513
2514	* arlib.c (arlib_init): Call snprintf before using the result
2515	with memcpy.
2516	(arlib_finalize): Likewise.
2517	* nm.c (show_symbols_sysv): Don't modify cnt inside assert.
2518
25192013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2520
2521	* Makefile.am (bin_PROGRAMS): Add stack.
2522	(stack_LDADD): New.
2523	* stack.c: New file.
2524
25252013-11-05  Mark Wielaard  <mjw@redhat.com>
2526
2527	* readelf.c (print_debug_ranges_section): Cast address to size_t
2528	before comparison.
2529	(print_debug_loc_section): Likewise.
2530
25312013-10-18  Mark Wielaard  <mjw@redhat.com>
2532
2533	* ar.c (main): Correct operation check when instance_specifed is set.
2534
25352013-09-26  Petr Machata  <pmachata@redhat.com>
2536
2537	* readelf.c (handle_file_note): New function.
2538	(handle_notes_data): Call it to handle NT_FILE notes.
2539
25402013-09-26  Petr Machata  <pmachata@redhat.com>
2541
2542	* readelf.c (handle_siginfo_note): New function.
2543	(handle_notes_data): Call it to handle NT_SIGINFO notes.
2544	(buf_read_int, buf_read_ulong, buf_has_data): New functions.
2545
25462013-08-13  Mark Wielaard  <mjw@redhat.com>
2547
2548	* addr2line.c (options): Add "inlines", 'i'.
2549	(show_inlines): New bool.
2550	(parse_opt): Handle 'i'.
2551	(print_diesym): New static function.
2552	(print_src): New function taking code from...
2553	(handle_address): here. Call print_src. Print inlines.
2554
25552013-08-12  Mark Wielaard  <mjw@redhat.com>
2556
2557	* addr2line.c (main): If there is a newline char at end of buf,
2558	then remove it.
2559
25602013-07-05  Mark Wielaard  <mjw@redhat.com>
2561
2562	* readelf.c (print_ops): Take CU as argument, use it to print
2563	parameter_ref DIE offset.
2564	(struct listptr): Replace base field with cu.
2565	(listptr_base): New function.
2566	(compare_listptr): Use listptr_base.
2567	(notice_listptr): Take CU as argument.
2568	(skip_listptr_hole): Likewise.
2569	(print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
2570	(print_cfa_program): Pass NULL as CU to print_ops.
2571	(struct attrcb_args): Replace cu_base field with cu.
2572	(attr_callback): Pass cu not cu_base to notice_listptr.
2573	(print_debug_units): Don't calculate base, just set cu.
2574	(print_debug_loc_section): Pass cu to skip_listptr_hole and
2575	print_ops.
2576
25772013-05-06  Mark Wielaard  <mjw@redhat.com>
2578
2579	* readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
2580	argument as DIE offset.
2581
25822013-04-24  Mark Wielaard  <mjw@redhat.com>
2583
2584	* Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
2585
25862013-03-25  Mark Wielaard  <mjw@redhat.com>
2587
2588	* readelf.c (argp_options): Add decodedline.
2589	(decodedline): New boolean initialized to false.
2590	(parse_opt): Set decodedline when arg is decodedline.
2591	(print_decoded_line_section): New function.
2592	(print_debug_line_section): Call print_decoded_line_section when
2593	decodedline is true.
2594
25952013-03-25  Mark Wielaard  <mjw@redhat.com>
2596
2597	* readelf.c (argp_option): Add decodedaranges.
2598	(decodedaranges): New boolean initialized to false.
2599	(parse_opt): Set decodedaranges when arg is decodedaranges.
2600	(print_debug_aranges_section): Reimplemented and original
2601	implementation renamed to...
2602	(print_decoded_aranges_section): this.
2603
26042013-03-25  Mark Wielaard  <mjw@redhat.com>
2605
2606	* readelf.c (attrcb_args): Add Dwarf_Die.
2607	(attr_callback): When highpc is in constant form also print as
2608	address.
2609	(print_debug_units): Set args.die.
2610
26112013-03-19  Mark Wielaard  <mjw@redhat.com>
2612
2613	* readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
2614
26152013-03-18  Mark Wielaard  <mjw@redhat.com>
2616
2617	* readelf.c (print_gdb_index_section): Accept version 8.
2618
26192013-03-01  Mark Wielaard  <mjw@redhat.com>
2620
2621	* findtextrel.c (process_file): Release ELF and close file when not
2622	text relocations are found.
2623	* strip.c (handle_elf): Track memory used for .debuglink section data
2624	and free when done.
2625
26262013-02-24  Mark Wielaard  <mjw@redhat.com>
2627
2628	* elflint.c (check_symtab): Add __bss_start__ to the list of symbols
2629	allowed to have out of section values because of GNU ld bugs.
2630
26312013-02-06  Mark Wielaard  <mjw@redhat.com>
2632
2633	* elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
2634	list of symbols allowed to have out of section values because of
2635	GNU ld bugs in either .symtab or .dynsym, but only when they are
2636	zero sized.
2637
26382013-01-24  Mark Wielaard  <mjw@redhat.com>
2639
2640	* readelf.c (argp_option): Add unresolved-address-offsets, U.
2641	(print_unresolved_addresses): New static.
2642	(parse_opt): Handle 'U', set print_unprocessed_values.
2643	(format_dwarf_addr): Take and handle new raw argument.
2644	(print_ops): Call format_dwarf_addr with raw offset values.
2645	(print_debug_ranges_section): Likewise.
2646	(print_debug_frame_section): Likewise.
2647	(attr_callback): Likewise.
2648	(print_debug_line_section): Likewise.
2649	(print_debug_loc_section): Likewise.
2650	(print_gdb_index_section): Likewise.
2651
26522013-01-18  Mark Wielaard  <mjw@redhat.com>
2653
2654	* readelf.c (struct listptr): Add base Dwarf_Addr field.
2655	(compare_listptr): Warn for same offset with different base.
2656	(notice_listptr): Take base argument and set it.
2657	(skip_listptr_hole): Likewise.
2658	(struct attrcb_args): Removed unused cu_offset field.
2659	Add cu_base Dwarf_Addr field.
2660	(attr_callback): Call notice_listptr with cbargs->cu_base.
2661	(print_debug_units): Set args.cu_base.
2662	(print_debug_ranges_section): Get base and use for format_dwarf_addr.
2663	(print_debug_loc_section): Likewise.
2664
26652013-01-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
2666
2667	* readelf.c (handle_core_items): Limit special repeated items handling
2668	to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
2669
26702012-12-18  Mark Wielaard  <mark@bordewijk.wildebeest.org>
2671
2672	* readelf.c (ELF_INPUT_SECTION): New argp key value.
2673	(argp_option): Add elf-section.
2674	(elf_input_section): New static.
2675	(parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
2676	(open_input_section): New function.
2677	(process_file): Call open_input_section if elf_input_section set.
2678
26792013-01-13  David Abdurachmanov  <David.Abdurachmanov@cern.ch>
2680
2681	ar.c (do_oper_delete): Fix num passed to memset.
2682
26832012-12-21  Mark Wielaard  <mjw@redhat.com>
2684
2685	* readelf.c (print_debug_frame_section): Adjust FDE start address
2686	if pcrel before feeding it to format_dwarf_addr.
2687
26882012-12-21  Mark Wielaard  <mjw@redhat.com>
2689
2690	* addr2line.c (main): Call dwfl_end.
2691
26922012-12-11  Roland McGrath  <roland@hack.frob.com>
2693
2694	* nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
2695	sh_name case.
2696	Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
2697
26982012-10-16  Mark Wielaard  <mjw@redhat.com>
2699
2700	* readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
2701	calculated beginning after the operand and 2-byte constant.
2702
27032012-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
2704
2705	* readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
2706	(WRAP_COLUMN): ... here.
2707	(print_core_item): Remove parameter format_max.  Update function
2708	comment.  Replace FORMAT_MAX by the real output width.
2709	(handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
2710	calls of print_core_item, remove variable maxfmt, change
2711	ITEM_WRAP_COLUMN to WRAP_COLUMN.
2712	(handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
2713	calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
2714
27152012-10-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
2716
2717	* readelf.c (handle_core_item) <b>: Make run an outer block variable.
2718	Increase run only if LASTBIT != 0.  Print last element only if RUN > 0.
2719
27202012-08-27  Mark Wielaard  <mjw@redhat.com>
2721
2722	* readelf.c (print_debug_macro_section): Print offset as PRIx64.
2723
27242012-08-27  Mark Wielaard  <mjw@redhat.com>
2725
2726	* readelf.c (register_info): Handle loc == NULL.
2727
27282012-08-22  Jeff Kenton  <jkenton@tilera.com>
2729
2730	* elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
2731
27322012-08-16  Mark Wielaard  <mjw@redhat.com>
2733
2734	* readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
2735	Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
2736	appropriate.
2737	(dwarf_attr_name): Likewise.
2738	(dwarf_form_name): Likewise.
2739	(dwarf_lang_name): Likewise.
2740	(dwarf_inline_name): Likewise.
2741	(dwarf_encoding_name): Likewise.
2742	(dwarf_access_name): Likewise.
2743	(dwarf_visibility_name): Likewise.
2744	(dwarf_virtuality_name): Likewise.
2745	(dwarf_identifier_case_name): Likewise.
2746	(dwarf_calling_convention_name): Likewise.
2747	(dwarf_ordering_name): Likewise.
2748	(dwarf_discr_list_name): Likewise.
2749	(print_ops): Remove KNOWN.  Use dwarf_locexpr_opcode_string.
2750	(attr_callback): Call new dwarf_foobar_name instead of old
2751	dwarf_foobar_string functions.
2752	(dwarf_tag_string): New function using known-dwarf.h macros.
2753	(dwarf_attr_string): Likewise.
2754	(dwarf_form_string): Likewise.
2755	(dwarf_lang_string): Likewise.
2756	(dwarf_inline_string): Likewise.
2757	(dwarf_encoding_string): Likewise.
2758	(dwarf_access_string): Likewise.
2759	(dwarf_visibility_string): Likewise.
2760	(dwarf_virtuality_string): Likewise.
2761	(dwarf_identifier_case_string): Likewise.
2762	(dwarf_calling_convention_string): Likewise.
2763	(dwarf_ordering_string): Likewise.
2764	(dwarf_discr_list_string): Likewise.
2765	(dwarf_locexpr_opcode_string): Likewise.
2766
27672012-06-27  Mark Wielaard  <mjw@redhat.com>
2768
2769	* readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
2770	DW_FORM_GNU_strp_alt.
2771	(attr_callback): Likewise.
2772
27732012-07-30  Petr Machata  <pmachata@redhat.com>
2774
2775	* nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
2776	corresponding printf) so that those that are referenced by only
2777	one of the formatting strings are at the end.
2778
27792012-07-29  Mark Wielaard  <mjw@redhat.com>
2780
2781	* readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
2782	(print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
2783
27842012-07-19  Mark Wielaard  <mjw@redhat.com>
2785
2786	* readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
2787
27882012-07-11  Mark Wielaard  <mjw@redhat.com>
2789
2790	* readelf.c (options): Add macro to help of debug-dump.
2791	(section_e): Add section_macro.
2792	(section_all): Add section_macro.
2793	(parse_opt): Handle macro.
2794	(print_debug_macro_section): New function.
2795	(print_debug): Add NEW_SECTION (macro).
2796
27972012-07-10  Mark Wielaard  <mjw@redhat.com>
2798
2799	* readelf.c (print_gdb_index_section): Add version 7 support.
2800	Keep track of cu_nr. Print kind and static/global flag for each
2801	symbol. When a symbol is in the TU list add 'T'.
2802
28032012-06-26  Mark Wielaard  <mjw@redhat.com>
2804
2805	* readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
2806
28072012-06-22  Mark Wielaard  <mjw@redhat.com>
2808
2809	* readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
2810	for gcc 4.7 -Wformat.
2811
28122012-05-09  Roland McGrath  <roland@hack.frob.com>
2813
2814	* elflint (check_sections): Allow zero sized sections at (filesz) end
2815	of segment. And make check overflow-proofed.
2816
28172012-04-24  Mark Wielaard  <mjw@redhat.com>
2818
2819	* readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
2820	DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
2821
28222012-03-28  Roland McGrath  <roland@hack.frob.com>
2823
2824	* elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
2825
28262012-03-28  Mark Wielaard  <mjw@redhat.com>
2827
2828	* readelf.c (print_debug_abbrev_section): Check there is Dwarf
2829	section data.
2830	(print_debug_str_section): Likewise.
2831
28322012-03-21  Mark Wielaard  <mjw@redhat.com>
2833
2834	* readelf.c (print_gdb_index_section): Accept version 6.
2835
28362012-01-31  Mark Wielaard  <mjw@redhat.com>
2837
2838	* readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
2839
28402012-01-21  Ulrich Drepper  <drepper@gmail.com>
2841
2842	* addr2line.c: Update copyright year.
2843	* ar.c: Likewise.
2844	* elfcmp.c: Likewise.
2845	* elflint.c: Likewise.
2846	* findtextrel.c: Likewise.
2847	* ld.c: Likewise.
2848	* nm.c: Likewise.
2849	* objdump.c: Likewise.
2850	* ranlib.c: Likewise.
2851	* readelf.c: Likewise.
2852	* size.c: Likewise.
2853	* strings.c: Likewise.
2854	* strip.c: Likewise.
2855	* unstrip.c: Likewise.
2856
2857	* nm.c (argp_children): Define.
2858	(argp): Hook up argp_children.
2859	(handle_ar): Optimize puts call.
2860	(show_symbols_bsd): Use positional parameters to also print color
2861	codes.  Don't print STT_FILE symbols.
2862	* objdump.c (options): Improve help text.
2863	(argp_children): Define.
2864	(argp): Hook up argp_children.
2865	(disasm_info): Add elements for color codes.
2866	(disasm_output): Print color codes as well.
2867	(show_disasm): Set up disasm_info data for callback.
2868
28692012-01-20  Roland McGrath  <roland@hack.frob.com>
2870
2871	* arlib-argp.c (arlib_deterministic_output): Initialize from
2872	configured value.
2873	(help_filter): New function.
2874	(argp): Use it.
2875
2876	* ar.c (main): Handle oper_none as usage error.
2877
2878	* arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
2879
2880	* ranlib.c (argp): Use arlib_argp_children.
2881
2882	* arlib.c (arlib_init): Obey arlib_deterministic_output.
2883
2884	* arlib-argp.c: New file.
2885	* Makefile.am (libar_a_SOURCES): Add it.
2886	* arlib.h (arlib_deterministic_output, arlib_argp_children):
2887	Declare new variables.
2888	* ar.c (deterministic_output): Variable removed.
2889	(do_oper_insert): Use arlib_deterministic_output instead.
2890	(options, parse_opt): Don't handle -D here.  Add group numbers.
2891	(argp): Use arlib_argp_children.
2892
28932011-12-20  Roland McGrath  <roland@hack.frob.com>
2894
2895	* readelf.c (print_debug): Initialize DUMMY_DBG.elf.
2896	Reported by Karel Klic <kklic@redhat.com>.
2897
28982011-11-05  Roland McGrath  <roland@hack.frob.com>
2899
2900	* ar.c (deterministic_output): New flag variable.
2901	(options, parse_opt): Grok -D to set it.
2902	(do_oper_insert): When set, use zero from mtime, uid, and gid.
2903
2904	* ar.c (do_oper_insert): Fix check on elf_rawfile return value.
2905
29062011-10-04  Marek Polacek  <mpolacek@redhat.com>
2907
2908	* readelf.c (register_info): Assume the right size of an array.
2909
29102011-10-03  Ulrich Drepper  <drepper@gmail.com>
2911
2912	* nm.c: Recognize option --mark-special.  Still recognize --mark-weak
2913	but don't show it in help anymore.
2914	(mark_special): Renamed from mark_weak.
2915	(parse_opt): Adjust.
2916	(class_type_char): Take additional parameters for ELF file and ELF
2917	header.  Treat TLS symbols like objects.
2918	In case of D symbols, show u for unique symbols, R for symbols in
2919	read-only sections, B for symbols in BSS sections.
2920	(show_symbols_bsd): Take additional parameters for ELF file and ELF
2921	header.  Adjust for class_type_char change.  Show TLS symbols with
2922	@ after them in case --mark-special is selected.
2923	(show_symbols_posix): Likewise.
2924	(show_symbols): Adjust calls to show_symbols_bsd and
2925	show_symbols_posix.
2926	(show_symbols_sysv): Avoid printing address and size for undefined
2927	symbols.  Don't print initial special entry and section entries.
2928
29292011-10-02  Ulrich Drepper  <drepper@gmail.com>
2930
2931	* Makefile.am (demanglelib): Define.
2932	(nm_LDADD): Add demanglelib.
2933	* nm.c (options): Add -C option.
2934	(demangle): Define as global variable.
2935	(parse_opt): Recognize -C.
2936	(show_symbols_sysv): Handle demangling.
2937	(show_symbols_bad): Likewise.
2938	(show_symbols_posix): Likewise.
2939	(show_symbols): Likewise.
2940
29412011-07-09  Roland McGrath  <roland@hack.frob.com>
2942
2943	* readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
2944
2945	* ar.c (parse_opt): Grok -u.
2946
29472011-05-30  Mark Wielaard  <mjw@redhat.com>
2948
2949	* strip.c (relocate): Make offset check overflow-proof.
2950
29512011-05-23  Mark Wielaard  <mjw@redhat.com>
2952
2953	* strip.c (relocate): Take new arguments is_rela to indicate
2954	whether the relocation is from a SHT_REL or SHT_RELA section.
2955	Relocate against any debug section symbol, not just STT_SECTION
2956	symbols. For SHT_REL relocations, fetch addend from offset and
2957	add it to symbol value if not zero.
2958
29592011-05-23  Mark Wielaard  <mjw@redhat.com>
2960
2961	* strip.c (OPT_RELOC_DEBUG): New option.
2962	(argp_option): Add new --reloc-debug-sections option.
2963	(main): Check new option.
2964	(parse_opt): Likewise.
2965	(handle_elf): Remove any relocations between debug sections
2966	in ET_REL for the debug file when requested.
2967
29682011-05-18  Mark Wielaard  <mjw@redhat.com>
2969
2970	* strip.c (handle_elf): Make sure all sections of a removed group
2971	section are removed too. Don't discard SHT_GROUP sections, copy
2972	section table before it gets modified. Section group signature
2973	symbols don't have to be retained.
2974
29752011-05-16  Jakub Jelinek  <jakub@redhat.com>
2976
2977	* readelf.c (print_ops): Handle DW_OP_GNU_const_type,
2978	DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
2979	and DW_OP_GNU_reinterpret.
2980
29812011-05-17  Mark Wielaard  <mjw@redhat.com>
2982
2983	* readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
2984	DW_TAG_GNU_call_site_parameter return strings.
2985
29862011-05-11  Marek Polacek  <mpolacek@redhat.com>
2987
2988	* nm.c (show_symbols_sysv): Remove unused if/else, remove
2989	unused `prefix' and `fname' parameters.
2990
29912011-05-07  Marek Polacek  <mpolacek@redhat.com>
2992
2993	* unstrip.c (compare_sections_nonrel): Mark this function as static.
2994
29952011-04-26  Mark Wielaard  <mjw@redhat.com>
2996
2997	* readelf.c (handle_notes_data): Call ebl_object_note_type_name
2998	with note name.
2999
30002011-04-14  Mark Wielaard  <mjw@redhat.com>
3001
3002	* readelf.c (options): Add gdb_index.
3003	(section_e): Define section_gdb_index.
3004	(parse_opt): Recognize gdb_index debug-dump argument.
3005	(print_gdb_index_section): New function.
3006	(print_debug): Add gdb_index to debug_sections.
3007
30082011-03-24  Petr Machata  <pmachata@redhat.com>
3009
3010	* readelf.c (print_debug_line_section): Emit initial space for all
3011	opcode lines.  Print offset in front of each opcode.
3012
30132011-03-22  Marek Polacek  <mpolacek@redhat.com>
3014
3015	* readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
3016
30172011-03-22  Mark Wielaard  <mjw@redhat.com>
3018
3019	* readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
3020	and DW_TAG_GNU_call_site_parameter.
3021	(dwarf_attr_string): Support DW_AT_GNU_call_site_value,
3022	DW_AT_GNU_call_site_data_value,
3023	DW_AT_GNU_call_site_target,
3024	DW_AT_GNU_call_site_target_clobbered,
3025	DW_AT_GNU_tail_call,
3026	DW_AT_GNU_all_tail_call_sites,
3027	DW_AT_GNU_all_call_sites,
3028	and DW_AT_GNU_all_source_call_sites.
3029	(print_ops): Handle DW_OP_GNU_entry_value.
3030	(attr_callback): Handle DW_AT_GNU_call_site_value,
3031	DW_AT_GNU_call_site_data_value,
3032	DW_AT_GNU_call_site_target,
3033	and DW_AT_GNU_call_site_target_clobbered.
3034
30352011-03-10  Mark Wielaard  <mjw@redhat.com>
3036
3037	* elflint.c (check_symtab): Use ebl_check_st_other_bits.
3038
30392011-02-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
3040
3041	* readelf.c (reset_listptr): Clear TABLE->TABLE.
3042
30432011-02-25  Mark Wielaard  <mjw@redhat.com>
3044
3045	* readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
3046	(dwarf_form_string): Properly format and return unknown form.
3047
30482011-02-23  Roland McGrath  <roland@redhat.com>
3049
3050	* readelf.c (section_name): New function.
3051	(print_debug_abbrev_section): Use it instead of constant.
3052	(print_debug_aranges_section): Likewise.
3053	(print_debug_ranges_section): Likewise.
3054	(print_debug_units): Likewise.
3055	(print_debug_line_section): Likewise.
3056	(print_debug_loc_section): Likewise.
3057	(print_debug_macinfo_section): Likewise.
3058	(print_debug_pubnames_section): Likewise.
3059	(print_debug_str_section): Likewise.
3060	(print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
3061	(print_debug_abbrev_section): Use decoded d_size, not sh_size.
3062	(print_debug_str_section): Likewise.
3063
3064	* readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
3065
30662011-02-11  Roland McGrath  <roland@redhat.com>
3067
3068	* elfcmp.c (verbose): New variable.
3069	(options, parse_opt): Grok -l/--verbose to set it.
3070	(main): Under -l, keep going after first difference.
3071
3072	* elfcmp.c (ignore_build_id): New variable.
3073	(options, parse_opt): Grok --ignore-build-id to set it.
3074	(main): For SHT_NOTE sections, compare note details rather than raw
3075	bytes.  Under --ignore-build-id, don't complain about differing build
3076	ID contents if lengths match.
3077
30782011-02-08  Roland McGrath  <roland@redhat.com>
3079
3080	* ldscript.y (filename_id_star): Remove unused variable.
3081
3082	* unstrip.c (copy_elided_sections): Remove unused variable.
3083
3084	* elflint.c (check_dynamic): Remove unused variables.
3085
3086	* elflint.c (check_symtab): Warn about missing xndx section only once.
3087
3088	* ldgeneric.c (check_for_duplicate2): Remove unused variable.
3089
30902011-01-06  Roland McGrath  <roland@redhat.com>
3091
3092	* strip.c (handle_elf): Under --strip-sections, remove all
3093	non-allocated sections and never generate .gnu_debuglink.
3094
30952011-01-04  Roland McGrath  <roland@redhat.com>
3096
3097	* strip.c (remove_shdrs): New variable.
3098	(options, parse_opt): Grok --strip-sections to set it.
3099	(handle_elf): When that's set, truncate off .shstrtab and shdrs.
3100
31012010-11-10  Roland McGrath  <roland@redhat.com>
3102
3103	* findtextrel.c (process_file): Don't assume order of sections.
3104	Reported by Mike Hommey <mh@glandium.org>.
3105
31062010-07-26  Roland McGrath  <roland@redhat.com>
3107
3108	* readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
3109
31102010-08-30  Roland McGrath  <roland@redhat.com>
3111
3112	Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
3113	* readelf.c (parse_opt): Add section_info to implicit_debug_sections
3114	for ranges, loc.
3115	(struct listptr, struct listptr_table): New types.
3116	(compare_listptr, reset_listptr, sort_listptr): New functions.
3117	(notice_listptr, skip_listptr_hole): New functions.
3118	(struct attrcb_args): Add silent member.
3119	(attr_callback): Call notice_listptr for loclistptr and rangelistptr.
3120	Suppress output if silent, but still call notice_listptr.
3121	(print_debug_units): Suppress output if section_info not requested.
3122	(print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
3123	(print_debug_ranges_section): Likewise.
3124	(print_debug): Call reset_listptr on both tables.
3125
3126	* readelf.c (print_debug_ranges_section): Print empty list.
3127	(print_debug_loc_section): Likewise.
3128
3129	* readelf.c (print_debug_loc_section): Check for bogus length
3130	before calling print_ops.
3131	(print_ops): Check harder for bogus data that would read off end.
3132
31332010-08-11  Roland McGrath  <roland@redhat.com>
3134
3135	* readelf.c (for_each_section_argument): Process all sections with
3136	matching name, not just the first.
3137
31382010-07-26  Roland McGrath  <roland@redhat.com>
3139
3140	* readelf.c (print_ops): Take new argument for CU version.
3141	Fix DW_OP_call_ref decoding to depend on it.
3142	(print_debug_loc_section): Update caller.
3143	(print_cfa_program): Take new argument, pass it down.
3144	(print_debug_frame_section): Update caller.
3145	(struct attrcb_args): New member version.
3146	(print_debug_units): Initialize it.
3147
31482010-07-02  Roland McGrath  <roland@redhat.com>
3149
3150	* readelf.c (print_debug_frame_section): Use format_dwarf_addr for
3151	initial_location.
3152
31532010-06-30  Roland McGrath  <roland@redhat.com>
3154
3155	* strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
3156	Ignore st_size for a non-S_ISREG file descriptor.
3157	(read_block): Move assert after no-mmap bail-out.
3158	(read_block_no_mmap): Fix size calculations for moving buffer remnant.
3159
31602010-06-22  Roland McGrath  <roland@redhat.com>
3161
3162	* readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
3163
31642010-06-21  Roland McGrath  <roland@redhat.com>
3165
3166	* readelf.c (dwarf_tag_string): Handle new v4 tags.
3167	(dwarf_attr_string): Add new attributes.
3168	(dwarf_tag_string): Handle DW_TAG_GNU_*.
3169
3170	* readelf.c (print_ops): Use 64-bit types for LEB128 operands.
3171	(print_cfa_program): Likewise.
3172
31732010-06-20  Roland McGrath  <roland@redhat.com>
3174
3175	* readelf.c (print_debug_units): New function, broken out of ...
3176	(print_debug_info_section): ... here.  Call it.
3177	(print_debug_types_section): New function.
3178	(enum section_e): Add section_types alias for section_info.
3179	(print_debug): Add types to the sections table.
3180
3181	* readelf.c (print_debug_frame_section): Handle version 4 format.
3182
3183	* readelf.c (print_debug_line_section): Handle version 4 format.
3184
31852010-06-14  Roland McGrath  <roland@redhat.com>
3186
3187	* unstrip.c (copy_elided_sections): Make sure all sections' data have
3188	been read in before we write anything out.
3189
31902010-06-04  Roland McGrath  <roland@redhat.com>
3191
3192	* unstrip.c (update_shdr): New function.
3193	(update_sh_size): Call it instead of gelf_update_shdr.
3194	(adjust_relocs, add_new_section_symbols): Likewise.
3195	(new_shstrtab, copy_elided_sections): Likewise.
3196
3197	* unstrip.c (copy_elided_sections): Bail if stripped file has more
3198	sections than unstripped file, rather than getting confused later.
3199
32002010-06-01  Roland McGrath  <roland@redhat.com>
3201
3202	* readelf.c (dwarf_form_string): Handle DWARF 4 forms.
3203	(attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
3204	DW_FORM_sec_offset, DW_FORM_ref_sig8.
3205
3206	* readelf.c (print_debug): Don't bail if libdw setup fails.
3207	Suppress complaint if we only want .eh_frame anyway.
3208
32092010-05-28  Ulrich Drepper  <drepper@redhat.com>
3210
3211	* readelf.c (attr_callback): Also print form information.
3212
32132010-05-19  Roland McGrath  <roland@redhat.com>
3214
3215	* addr2line.c (find_symbol): Short-circuit on empty name.
3216	(handle_address): Handle SYMBOL with no +OFFSET.
3217
32182010-05-08  Roland McGrath  <roland@redhat.com>
3219
3220	* readelf.c (print_ops): Take new arg OFFSET_SIZE.
3221	Use that for DW_OP_call_ref, not ADDRSIZE.
3222	(print_cfa_program): Update caller.
3223	(struct attrcb_args): Add offset_size field.
3224	(attr_callback): Use it for print_ops call.
3225	(print_debug_info_section): Initialize it.
3226	(print_ops): Likewise.
3227
32282010-04-14  Roland McGrath  <roland@redhat.com>
3229
3230	* readelf.c (handle_core_item): Fix bitmask printing.
3231
32322010-04-06  Roland McGrath  <roland@redhat.com>
3233
3234	* ld.c (options): Fix some typos in messages.
3235	* elflint.c (check_scn_group, check_group): Likewise.
3236	* ldscript.y (add_id_list): Likewise.
3237	* readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
3238	before translated string containing a literal %.
3239
32402010-02-26  Roland McGrath  <roland@redhat.com>
3241
3242	* readelf.c (process_file): Don't leak an fd in failure case.
3243
32442010-02-15  Roland McGrath  <roland@redhat.com>
3245
3246	* Makefile.am: Use config/eu.am for common stuff.
3247
3248	* readelf.c (print_debug_frame_section): Add a cast to avoid sign
3249	mismatch in comparison.
3250
32512010-02-02  Roland McGrath  <roland@redhat.com>
3252
3253	* readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
3254	(read_encoded): Likewise.
3255	(print_debug_frame_section): Check for bogus augmentation length.
3256	For P augmentation, use read_encoded, print the encoding description,
3257	and use hex for unsigned values.
3258
32592010-01-15  Roland McGrath  <roland@redhat.com>
3260
3261	* ar.c: Include <sys/stat.h>.
3262	* elflint.c: Likewise.
3263	* readelf.c: Likewise.
3264	* strip.c: Likewise.
3265	* unstrip.c: Likewise
3266
32672010-01-07  Roland McGrath  <roland@redhat.com>
3268
3269	* readelf.c (print_ehdr): Handle PN_XNUM.
3270	(phnum): New static variable.
3271	(process_elf_file): Set it with elf_getphdrnum.
3272	(print_phdr): Use phnum instead of EHDR->e_phnum.
3273	(print_dynamic, handle_notes): Likewise.
3274	(handle_relocs_rel, handle_relocs_rela): Likewise.
3275
3276	* elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
3277
3278	* elflint.c (phnum): New static variable.
3279	(check_elf_header): Set it, handling PN_XNUM.
3280	Use that in place of EHDR->e_phnum throughout.
3281	(check_symtab, check_reloc_shdr, check_dynamic): Likewise.
3282	(unknown_dependency_p, check_sections, check_program_header): Likewise.
3283
32842010-01-05  Roland McGrath  <roland@redhat.com>
3285
3286	* readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
3287	DW_AT_GNU_template_name.
3288
32892010-01-04  Roland McGrath  <roland@redhat.com>
3290
3291	* readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
3292	(handle_core_note): Pass NHDR and NAME to ebl_core_note.
3293	(handle_core_item): Handle .format of '\n' as \n-separated strings.
3294
3295	* readelf.c (implicit_debug_sections): New variable.
3296	(parse_opt): Set it instead of print_debug_sections for -a.
3297	OR them together for print_debug check.
3298	(print_debug): OR them together for section check.
3299
3300	* readelf.c (options): Repartition into set implied by -a and others.
3301	Correct -a text to match reality.
3302
3303	* readelf.c (struct section_argument): Add bool member 'implicit'.
3304	(parse_opt): Set it for -a cases, clear it for -x args.
3305	(for_each_section_argument): Don't complain about a missing section by
3306	name if it's implicit.
3307
33082009-11-16  Roland McGrath  <roland@redhat.com>
3309
3310	* readelf.c (print_string_section): Punt SHT_NOBITS like empty
3311	sections, just as dump_data_section already does.
3312
33132009-09-21  Ulrich Drepper  <drepper@redhat.com>
3314
3315	* elflint.c (special_sections): Allow MERGE and STRINGS flags to be
3316	set for .comment section.
3317	Patch by Mark Wielaard <mjw@redhat.com>.
3318
33192009-09-08  Roland McGrath  <roland@redhat.com>
3320
3321	* ar.c (main): Fix typo in message format.
3322
33232009-08-21  Roland McGrath  <roland@redhat.com>
3324
3325	* readelf.c (attr_callback): Use print_block only when we don't use
3326	print_ops.
3327
33282009-08-14  Roland McGrath  <roland@redhat.com>
3329
3330	* ar.c (do_oper_extract): Use pathconf instead of statfs.
3331
33322009-08-01  Ulrich Drepper  <drepper@redhat.com>
3333
3334	* debugpred.h: Add two most const.
3335
33362009-07-26  Mark Wielaard  <mjw@redhat.com>
3337
3338	* elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
3339
33402009-07-25  Mark Wielaard  <mjw@redhat.com>
3341
3342	* Makefile.am (addr2line_LDADD): Add $(libelf).
3343
33442009-07-24  Roland McGrath  <roland@redhat.com>
3345
3346	* readelf.c (print_block): New function.
3347	(print_ops): Use it.
3348	(attr_callback): Use it for DW_FORM_block* forms.
3349
33502009-07-20  Mark Wielaard  <mjw@redhat.com>
3351
3352	* readelf.c (print_ops): Add handling of DW_OP_implicit_value
3353	and DW_OP_stack_value.
3354
33552009-07-14  Ulrich Drepper  <drepper@redhat.com>
3356
3357	* elflint.c (check_elf_header): Allow Linux ABI.
3358	(check_symtab): Handle STB_GNU_UNIQUE.
3359
33602009-07-08  Mark Wielaard  <mjw@redhat.com>
3361
3362	* readelf.c (attr_callback): Handle DW_Form constants for
3363	DW_AT_data_member_location.
3364
33652009-07-06  Roland McGrath  <roland@redhat.com>
3366
3367	* readelf.c (register_info): New function.  Handle unknown register #s.
3368	(print_cfa_program): Use it.
3369	(handle_core_register, handle_core_registers): Likewise.
3370
33712009-06-28  Roland McGrath  <roland@redhat.com>
3372
3373	* readelf.c (print_address_names): New static variable.
3374	(options, parse_opt): Grok -N/--numeric-addresses to clear it.
3375	(format_dwarf_addr): Don't look up name if !print_address_names.
3376
33772009-06-13  Ulrich Drepper  <drepper@redhat.com>
3378
3379	* ldgeneric.c: Don't use deprecated libelf functions.
3380	* nm.c: Likewise.
3381	* objdump.c: Likewise.
3382	* readelf.c: Likewise.
3383	* size.c: Likewise.
3384	* strip.c: Likewise.
3385	* unstrip.c: Likewise.
3386	* ld.h: Fix up comment.
3387
33882009-06-01  Ulrich Drepper  <drepper@redhat.com>
3389
3390	* readelf.c (print_relocs): Expect ELF header argument and pass on
3391	to handle_relocs_rel* functions. Adjust caller.
3392	(handle_relocs_rel): Add ELF header argument.  Add special case for
3393	the IRELATIVE relocations in statically linked executables.
3394	(handle_relocs_rela): Likewise.
3395
33962009-04-29  Ulrich Drepper  <drepper@redhat.com>
3397
3398	* elflint.c (check_symtab): Add tests of st_other field.
3399
34002009-04-23  Ulrich Drepper  <drepper@redhat.com>
3401
3402	* Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
3403
34042009-04-20  Roland McGrath  <roland@redhat.com>
3405
3406	* addr2line.c (print_dwarf_function): Honor -s and -A for file names
3407	of inline call sites.
3408
3409	* addr2line.c (just_section): New variable.
3410	(adjust_to_section): New function, broken out of ...
3411	(handle_address): ... here.
3412	(options, parse_opt): Add -j/--section=NAME to set it.
3413
34142009-04-15  Roland McGrath  <roland@redhat.com>
3415
3416	* readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
3417	64-bit format header, DW_CIE_ID_32 in 32-bit format header.
3418
34192009-04-14  Roland McGrath  <roland@redhat.com>
3420
3421	* readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
3422	like SHT_GNU_ATTRIBUTES.
3423
3424	* readelf.c (handle_core_registers): Fix error message.
3425
3426	* strip.c (handle_elf: check_preserved): Don't note any change when
3427	.debug_data is already filled from a previous pass.
3428
34292009-02-05  Ulrich Drepper  <drepper@redhat.com>
3430
3431	* objdump.c (show_relocs_x): Minor cleanups.
3432
3433	* readelf.c (print_cfa_program): Correct a few labels.
3434	Print first DW_CFA_expression and DW_CFA_val_expression parameter
3435	as register.
3436
34372009-02-01  Ulrich Drepper  <drepper@redhat.com>
3438
3439	* objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
3440	into ...
3441	(show_relocs_x): ...here.  New function.
3442	(show_relocs): Better spacing in output.
3443
3444	* objdump.c (show_relocs_rela): Show offsets as signed values.
3445
3446	* ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
3447	Improve some error messages.
3448	Use program_invocation_short_name instead of AR macro.
3449	* Makefile.am (CFLAGS_ar): Remove.
3450	* elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
3451	* objdump.c (parse_opt): Likewise.
3452	* readelf.c (parse_opt): Likewise.
3453
34542009-01-27  Roland McGrath  <roland@redhat.com>
3455
3456	* readelf.c (print_ops): Notice short length, don't overrun buffer
3457	(still need to fix LEB128).
3458
3459	* readelf.c (print_ops): Fix DW_OP_call[24] decoding.
3460
3461	* readelf.c (print_ops): Print (empty)\n when LEN == 0.
3462
34632009-01-24  Ulrich Drepper  <drepper@redhat.com>
3464
3465	* readelf.c (print_debug_frame_section): Fix computation of vma_base
3466	for PC-relative mode.
3467
34682009-01-23  Ulrich Drepper  <drepper@redhat.com>
3469
3470	* size.c (process_file): When handling archive, close file descriptor
3471	here.  For unknown file format also close file descriptor.
3472	(handle_ar): Don't close file descriptor here.
3473
3474	* readelf.c (parse_opt): Move code to add to dump_data_sections and
3475	string_sections list in local function add_dump_section.  Adjust 'x'
3476	key handling.  For 'a' key add .strtab, .dynstr, and .comment section
3477	to string_sections list.
3478
34792009-01-22  Roland McGrath  <roland@redhat.com>
3480
3481	* readelf.c (print_phdr): Don't print section mapping when no sections.
3482
3483	* Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
3484
3485	* readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
3486	and reset it only for the 'true' cases.
3487
3488	* Makefile.am (addr2line_no_Wformat): New variable.
3489
3490	* readelf.c (print_debug_frame_section): Use t instead of j formats
3491	for ptrdiff_t OFFSET.
3492
34932009-01-21  Ulrich Drepper  <drepper@redhat.com>
3494
3495	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
3496	test.  Handle debuginfo files.
3497	(check_exception_data): First sanity test.
3498
34992009-01-17  Ulrich Drepper  <drepper@redhat.com>
3500
3501	* readelf.c (print_debug_exception_table): Show target of ar_disp
3502	field.
3503
3504	* elflint.c (check_program_header): Add most consistency checks for
3505	PT_GNU_EH_FRAME entry.
3506
3507	* addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
3508	ARGP_PROGRAM_BUG_ADDRESS_DEF.
3509	* ar.c: Likewise.
3510	* elfcmp.c: Likewise.
3511	* elflint.c: Likewise.
3512	* findtextrel.c: Likewise.
3513	* ld.c: Likewise.
3514	* nm.c: Likewise.
3515	* objdump.c: Likewise.
3516	* ranlib.c: Likewise.
3517	* readelf.c: Likewise.
3518
3519	* size.c: Likewise.
3520	* strings.c: Likewise.
3521	* strip.c: Likewise.
3522	* unstrip.c: Likewise.
3523
35242009-01-16  Ulrich Drepper  <drepper@redhat.com>
3525
3526	* elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
3527	matches .eh_frame_hdr section, if it is available.  Also check that
3528	the segment is allocated, not writable, not executable.
3529
3530	* readelf.c: Add -e option.  Dump exception and unwind related
3531	sections.  Add -e to -a.
3532	(print_encoding_base): Handle DW_EH_PE_omit.
3533	(print_debug_exception_table): Beginning of support.
3534	(print_debug): Hook up print_debug_exception_table for
3535	.gcc_except_table sections.
3536
3537	* readelf.c (print_debug_frame_section): Some fixes for last change.
3538
35392009-01-15  Ulrich Drepper  <drepper@redhat.com>
3540
3541	* readelf.c (print_encoding): Now a toplevel function.
3542	(print_relinfo): Likewise.
3543	(print_encoding_base): Broken out of print_debug_frame_section.
3544	(print_debug_frame_section): Print different header for .eh_frame
3545	sections.  Fix recognition of matching CIEs in .debug_frame sections.
3546	Print absolute offset for PC-relative FDE locations.  Don't print
3547	table header for FDEs if the table is empty.
3548	(read_encoded): New function.
3549	(print_debug_frame_hdr_section): New function.
3550	(print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
3551	sections.
3552
3553	* readelf.c (handle_relocs_rel): Print section number.
3554	(print_debug_abbrev_section): Likewise.
3555	(print_debug_aranges_section): Likewise.
3556	(print_debug_ranges_section): Likewise.
3557	(print_debug_info_section): Likewise.
3558	(print_debug_line_section): Likewise.
3559	(print_debug_loc_section): Likewise.
3560	(print_debug_macinfo_section): Likewise.
3561	(print_debug_pubnames_section): Likewise.
3562	(print_debug_str_section): Likewise.
3563
35642009-01-10  Ulrich Drepper  <drepper@redhat.com>
3565
3566	* strings.c (read_block): Fix typo in error message string.
3567
35682009-01-07  Ulrich Drepper  <drepper@redhat.com>
3569
3570	* ld.c (ld_new_searchdir): Fix adding to search path list.
3571
35722009-01-06  Ulrich Drepper  <drepper@redhat.com>
3573
3574	* readelf.c: Implement call frame debug section dumping.
3575
35762009-01-05  Roland McGrath  <roland@redhat.com>
3577
3578	* elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
3579	Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
3580
35812009-01-01  Ulrich Drepper  <drepper@redhat.com>
3582
3583	* addr2line.c: Update copyright year.
3584	* ar.c: Likewise.
3585	* elfcmp.c: Likewise.
3586	* elflint.c: Likewise.
3587	* findtextrel.c: Likewise.
3588	* ld.c: Likewise.
3589	* nm.c: Likewise.
3590	* objdump.c: Likewise.
3591	* ranlib.c: Likewise.
3592	* readelf.c: Likewise.
3593	* size.c: Likewise.
3594	* strings.c: Likewise.
3595	* strip.c: Likewise.
3596	* unstrip.c: Likewise.
3597
35982008-12-11  Roland McGrath  <roland@redhat.com>
3599
3600	* nm.c (sym_name): New function.
3601	(show_symbols_sysv): Use it in place of elf_strptr.
3602	(show_symbols_bsd, show_symbols_posix): Likewise.
3603	Fixes RHBZ#476136.
3604
3605	* nm.c (show_symbols_sysv): Use an alloca'd backup section name when
3606	elf_strptr fails.
3607
36082008-12-02  Roland McGrath  <roland@redhat.com>
3609
3610	* readelf.c (count_dwflmod, process_file): Don't presume encoding of
3611	nonzero OFFSET argument to dwfl_getmodules.
3612
36132008-08-07  Roland McGrath  <roland@redhat.com>
3614
3615	* addr2line.c (main): Pass string to handle_address.
3616	(see_one_module): New function, subroutine of handle_address.
3617	(find_symbol): Likewise.
3618	(handle_address): Take string argument rather than address.
3619	Convert plain number, or handle strings like "(section)+offset"
3620	or "symbol+offset".
3621
36222008-08-01  Roland McGrath  <roland@redhat.com>
3623
3624	* readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
3625	For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
3626
3627	* readelf.c (convert): Take new argument SIZE.
3628	(handle_core_register, handle_core_item): Update callers.
3629	(handle_core_item): Take new arg REPEATED_SIZE.
3630	(handle_core_items): Special case for a singleton item,
3631	let handle_core_item handle repeats if it wants to.
3632
3633	* readelf.c (handle_core_items): Give abridged output
3634	for identical groups repeated more than twice.
3635
36362008-07-04  Roland McGrath  <roland@redhat.com>
3637
3638	* readelf.c (handle_core_items): Handle ELF_T_ADDR.
3639
36402008-04-10  Roland McGrath  <roland@redhat.com>
3641
3642	* strip.c (handle_elf): Don't keep sections that kept symbol tables
3643	refer to.  Instead, just be sure to preserve the original symbol
3644	table in the debug file so those symbols go with their sections and
3645	can be elided from the stripped version of the symbol table.
3646
3647	* strip.c (handle_elf): When a discarded section kept in the debug
3648	file refers to a nondiscard section via sh_link/sh_info, preserve
3649	that nondiscarded section unmodified in the debug file as well.
3650	Skip adjustment of discarded sections symbol table references when
3651	that symbol table is copied in this way.
3652
3653	* elflint.c (check_symtab): Don't crash from missing symbol names
3654	after diagnosing bogus strtab.
3655
3656	* strip.c (handle_elf): Cosmetic cleanup in special section contents
3657	adjustment for symtab changes.
3658
36592008-03-31  Roland McGrath  <roland@redhat.com>
3660
3661	* elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
3662	must be SHT_PROGBITS, must not be SHF_WRITE.  Let backend hook
3663	excuse a special section.
3664
36652008-03-27  Roland McGrath  <roland@redhat.com>
3666
3667	* elflint.c (check_sections): Check that executability and writability
3668	of sections is reflected in segment p_flags.
3669
36702008-03-26  Roland McGrath  <roland@redhat.com>
3671
3672	* elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
3673	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
3674	is valid in RELRO.
3675
36762008-02-29  Roland McGrath  <roland@redhat.com>
3677
3678	* readelf.c (print_attributes): Add a cast.
3679	* elflint.c (check_attributes): Likewise.
3680
3681	* unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
3682	with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
3683	(add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
3684
36852008-02-03  Ulrich Drepper  <drepper@redhat.com>
3686
3687	* i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
3688	when linked into executable.
3689	(elf_i386_create_relocations): Likewise.
3690
36912008-02-20  Roland McGrath  <roland@redhat.com>
3692
3693	* readelf.c (print_attributes): New function.
3694	(process_elf_file): Call it under -A.
3695
3696	* elflint.c (check_attributes): Implement it for real.
3697
36982008-02-19  Roland McGrath  <roland@redhat.com>
3699
3700	* elflint.c (special_sections): Handle .gnu.attributes section.
3701	(check_sections): Likewise.
3702	(check_attributes): New function.
3703
37042008-02-10  Roland McGrath  <roland@redhat.com>
3705
3706	* elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
3707	sections and ET_REL files.
3708
37092008-02-02  Ulrich Drepper  <drepper@redhat.com>
3710
3711	* elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
3712	* i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
3713	and R_386_TLS_LE.
3714	(elf_i386_create_relocations): Likewise.
3715	* ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
3716	elements.
3717	* ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
3718	(ld_generic_create_outfile): Add PT_TLS entry to program  header.
3719	Fix generation of PT_GNU_STACK entry.
3720
37212008-02-01  Ulrich Drepper  <drepper@redhat.com>
3722
3723	* ld.c (replace_args): Prevent loop over replacements if the parameter
3724	is only two characters long.
3725
3726	* ld.c: Recognize sha1 argument for --build-id parameter.
3727	* ldgeneric.c (create_build_id_section): Handle sha1.
3728	(compute_hash_sum): New function.  Broken out of compute_build_id.
3729	Take hash function and context as parameters.
3730	(compute_build_id): Use compute_hash_sum for md5 and the new sha1
3731	implementation.
3732
37332008-01-31  Ulrich Drepper  <drepper@redhat.com>
3734
3735	* elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
3736	* ld.c: Recognize --build-id command line parameter.
3737	* ld.h: Define scn_dot_note_gnu_build_id.
3738	(struct ld_state): Add build_id and buildidscnidx elements.
3739	* ldgeneric.c: Implement --build-id command line parameter.
3740	* ldlex.l (ID): Recognize - as valid character after the first one.
3741
37422008-01-29  Ulrich Drepper  <drepper@redhat.com>
3743
3744	* ld.c (replace_args): New function.
3745	(main): Use it to rewrite old-style parameters.
3746
3747	* elf32-i386.script: Add .gnu.hash section.
3748	* ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
3749	(fillin_special_symbol): Initialize st_size.
3750	(sortfct_hashval): New function.
3751	(create_gnu_hash): New function.
3752	(create_hash): New function.
3753	(ld_generic_create_outfile): Use the new functions to create the
3754	hash tables.
3755
3756	* elflint.c (check_gnu_hash): Fix index value printed in error message.
3757
37582008-01-24  Ulrich Drepper  <drepper@redhat.com>
3759
3760	* elflint.c (check_group): Check that signature symbol for section
3761	group is not an empty string.
3762	* ldgeneric.c: Remove magic assignment of indices in the dynsym
3763	section.  Start implementation of --hash-style.
3764	* i386_ld.c: Likewise.
3765	* ld.c: Recognize --hash-style.
3766	* ld.h (struct scninfo): Add comdat_group.
3767	Add additional parameter to finalize_plt callback.
3768
37692008-01-22  Ulrich Drepper  <drepper@redhat.com>
3770
3771	* ld.h (struct callbacks): Add initialize_gotplt.
3772	(struct scnhead): Add scn_dot_gotplt.
3773	(struct ld_state): Add gotpltscnidx.
3774	* i386_ld.c (elf_i386_initialize_plt): Minor optimization.
3775	(elf_i386_initialize_pltrel): Likewise.
3776	(elf_i386_initialize_got): There is now a separate .got.plt, so
3777	don't do the PLT-related work here.  Initialize d_type.
3778	(elf_i386_initialize_gotplt): New function.
3779	(elf_i386_plt0): Use ud2a after indirect jump.
3780	(elf_i386_pic_plt0_entry): Likewise.
3781	(elf_i386_finalize_plt): Reference now .got.plt.
3782	(elf_i386_count_relocations): For GOT entries which need no relocation
3783	don't bump nrel_got.
3784	(elf_i386_create_relocations): Also get .got.plt.  Rewrite R-386_GOT32
3785	handling for split .got/.got.plt.
3786	(elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
3787	* elf32-i386.script: Sort sections for security.  There are no .got
3788	input sections.  Add .got.plt.
3789	* ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
3790	(ld_generic_create_outfile): Initialize .got.plt section.
3791	Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
3792
37932008-01-19  Ulrich Drepper  <drepper@redhat.com>
3794
3795	* i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
3796	symbols are not carried over into statically linked output files.
3797	Add dummy entries for more TLS relocations.
3798
3799	* ld.c (options): Add long names for -( and -).
3800
3801	* ldgeneric.c (check_definition): For newly found definitions don't
3802	mark section as used if symbol is absolute.
3803	(extract_from_archive): Only assign archive sequence number the first
3804	time the archive is handled.  Update ld_state.last_archive_used
3805	if any symbol was used.  Remove nround variable.
3806	(file_process2): When using symbol from an archive, update
3807	ld_state.group_start_archive, ld_state.archives, and
3808	ld_state.tailarchives.
3809	(ld_generic_file_process): If group is not handled anymore, after
3810	freeing ELF handles for the archives, clear ld_state.archives and
3811	*nextp.  Fix wrong logic in recognizing first iteration of group
3812	loop.  When clearing flags, also clear ld_state.group_start_archive.
3813
38142008-01-11  Ulrich Drepper  <drepper@redhat.com>
3815
3816	* objdump.c (show_disasm): Adjust disassembler format string for
3817	removal of %e.
3818
38192008-01-04  Roland McGrath  <roland@redhat.com>
3820
3821	* readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
3822	a size greater than the items cover means multiple sets of items.
3823	(handle_core_note): Update caller.
3824
38252008-01-04  Roland McGrath  <roland@redhat.com>
3826
3827	* strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
3828
38292008-01-03  Roland McGrath  <roland@redhat.com>
3830
3831	* ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
3832
3833	* elflint.c (check_dynamic): Remove duplicate initializer.
3834
38352008-01-02  Ulrich Drepper  <drepper@redhat.com>
3836
3837	* addr2line.c: Update copyright year.
3838	* ar.c: Likewise.
3839	* elfcmp.c: Likewise.
3840	* elflint.c: Likewise.
3841	* findtextrel.c: Likewise.
3842	* ld.c: Likewise.
3843	* nm.c: Likewise.
3844	* objdump.c: Likewise.
3845	* ranlib.c: Likewise.
3846	* readelf.c: Likewise.
3847	* size.c: Likewise.
3848	* strings.c: Likewise.
3849	* strip.c: Likewise.
3850	* unstrip.c: Likewise.
3851
38522007-12-30  Ulrich Drepper  <drepper@redhat.com>
3853
3854	* objdump (show_disasm): Use %e after third parameter.
3855
38562007-12-21  Ulrich Drepper  <drepper@redhat.com>
3857
3858	* strip.c: Fix wrong parenthesis in a few branch predictions.
3859	* strings.c: Likewise.
3860
38612007-12-20  Ulrich Drepper  <drepper@redhat.com>
3862
3863	* Makefile.am (DEFS): Add DEBUGPRED.
3864	* addr2line.c: Include debugpred.h.
3865	* ar.c: Likewise.
3866	* elfcmp.c: Likewise.
3867	* elflint.c: Likewise.
3868	* findtextrel.c: Likewise.
3869	* nm.c: Likewise.
3870	* objdump.c: Likewise.
3871	* ranlib.c: Likewise.
3872	* readelf.c: Likewise.
3873	* size.c: Likewise.
3874	* strings.c: Likewise.
3875	* strip.c: Likewise.
3876	* unstrip.c: Likewise.
3877	* debugpred.h: New file.
3878
3879	* readelf.c (handle_relocs_rel): Use elf_scnshndx.
3880	(handle_relocs_rela): Likewise.
3881
3882	* readelf.c: Add lots of likely/unlikely.
3883
3884	* elflint.c: Minor cleanups.
3885
38862007-11-19  Roland McGrath  <roland@redhat.com>
3887
3888	* readelf.c (print_ops): Handle all bad op codes gracefully.
3889	Print their numbers instead of just ???.
3890
38912007-11-09  Roland McGrath  <roland@redhat.com>
3892
3893	* readelf.c (attr_callback): Handle DW_AT_data_location.
3894	Handle block forms to mean a DWARF expression for DW_AT_allocated,
3895	DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
3896	DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
3897	DW_AT_upper_bound.
3898
38992007-10-20  Roland McGrath  <roland@redhat.com>
3900
3901	* unstrip.c (options): Update -R description.
3902	(struct symbol): Put symbol details a union with a size_t pointer
3903	`duplicate'.
3904	(compare_symbols_output): Use null ->name as marker for discard
3905	symbols, not zero *->map.
3906	(copy_elided_sections): Record forwarding pointers for discarded
3907	duplicates and fill SYMNDX_MAP elements through them.
3908
3909	* readelf.c (process_file): Set offline_next_address to 0 at start.
3910	(struct process_dwflmod_args): New type.
3911	(process_dwflmod): Take args in it, pass fd to process_elf_file.
3912	(process_file): Update caller; dup FD for passing to libdwfl.
3913	(process_elf_file): Take new arg FD.  For ET_REL file when
3914	displaying data affected by libdwfl relocation, open a new Elf handle.
3915
39162007-10-17  Roland McGrath  <roland@redhat.com>
3917
3918	* readelf.c (print_debug_line_section): For invalid data inside a
3919	unit with plausible length, keep printing at the next unit boundary.
3920
3921	* readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
3922
39232007-10-16  Roland McGrath  <roland@redhat.com>
3924
3925	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
3926
39272007-10-15  Roland McGrath  <roland@redhat.com>
3928
3929	* make-debug-archive.in: New file.
3930	* Makefile.am (EXTRA_DIST): Add it.
3931	(make-debug-archive): New target.
3932	(bin_SCRIPTS, CLEANFILES): Add it.
3933
39342007-10-10  Roland McGrath  <roland@redhat.com>
3935
3936	* elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
3937	Use it to check MERGE|STRINGS for .debug_str.
3938	(check_sections): Handle exact_or_gnuld.
3939
39402007-10-08  Roland McGrath  <roland@redhat.com>
3941
3942	* readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
3943	64-bit struct timeval with 32-bit tv_usec.
3944
39452007-10-07  Roland McGrath  <roland@redhat.com>
3946
3947	* readelf.c (check_archive_index): New function.
3948	(process_file): Call it.  Change signature to take only fd and name.
3949	Use libdwfl to open the file, then iterate on its modules (multiple
3950	for an archive) to print file name and call process_elf_file.
3951	(main): Update caller.  Let process_file do elf_begin.
3952	(count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
3953	(process_elf_file): Take only Dwfl_Module * argument.
3954	Don't print the file name here.
3955	(print_debug_*_section): Take Dwfl_Module * argument.
3956	(print_debug): Likewise.  Update caller.
3957	(format_dwarf_addr): New function.
3958	(print_debug_ranges_section): Use it.
3959	(attr_callback): Likewise.
3960	(print_debug_line_section, print_debug_loc_section): Likewise.
3961
3962	* readelf.c (print_debug_ranges_section): Translate all strings.
3963	(print_debug_loc_section): Likewise.
3964
3965	* unstrip.c (copy_elided_sections): Initialize SEC.
3966
3967	* ar.c (do_oper_insert): Put trailing / on short names.
3968
3969	* arlib.h (MAX_AR_NAME_LEN): Decrease by one.
3970
3971	* arlib2.c (arlib_add_long_name): Adjust for header size.
3972
3973	* arlib.c (arlib_finalize): Pad long name table to keep size even.
3974
3975	* ar.c (do_oper_insert): Use write_retry for padding write.
3976
3977	* ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
3978	Unconditionally set FOUND[CNT]->elf when setting ->mem.
3979	(remember_long_name): New function.
3980	(do_oper_insert): Call it.  Correctly use length of basename,
3981	not original name.  Don't store long name twice for new member.
3982
39832007-10-06  Roland McGrath  <roland@redhat.com>
3984
3985	* elflint.c (check_note): Skip empty segment.
3986	(check_note_section): Skip empty section.
3987
3988	* unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
3989	(handle_output_dir_module, handle_implicit_modules): Pass it down.
3990	(handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
3991	(compare_alloc_sections): Take new arg REL, ignore address if true.
3992	(compare_sections): Likewise, pass it down.
3993	(compare_sections_rel, compare_sections_nonrel): New functions.
3994	(find_alloc_sections_prelink, copy_elided_sections): Use them
3995	instead of compare_sections.
3996	(sections_match): New function, broken out of ...
3997	(find_alloc_section): ... here.
3998	(copy_elided_sections): Reorganize section match-up logic.
3999	Use sections_match for SHF_ALLOC in ET_REL.
4000	For ET_REL, let the nonzero sh_addr from the debug file dominate.
4001
4002	* unstrip.c (add_new_section_symbols): Take new arg REL.
4003	When true, do not update section symbol values.
4004	(collect_symbols): Likewise.  Update section symbols with address
4005	of chosen output section, not original section.
4006	(check_symtab_section_symbols, copy_elided_sections): Update callers.
4007
4008	* unstrip.c (compare_alloc_sections): At the same address, preserve
4009	original section order.
4010
4011	* elflint.c (special_sections): Don't require MERGE|STRINGS for
4012	.debug_str, it didn't always have them with older tools.
4013
4014	* elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
4015
40162007-10-05  Roland McGrath  <roland@redhat.com>
4017
4018	* elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
4019	ET_REL file.
4020
4021	* elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
4022	SHN_UNDEF as "bad section".  Use shndx value in messages.
4023
4024	* elflint.c (special_sections): Add ".debug_str".  Decrement namelen
4025	for ".debug" so it matches as a prefix.
4026	(IS_KNOWN_SPECIAL): New macro.
4027	(check_sections): Use it for ".plt" match.  Cite wrong SHT_NOBITS
4028	type even under -d, for a .debug* or .shstrtab section.
4029
4030	* readelf.c (print_ops): Use hex for address operand.
4031
40322007-10-04  Roland McGrath  <roland@redhat.com>
4033
4034	* unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
4035	.gnu_debuglink section to SHN_UNDEF.  Drop STT_SECTION symbols for
4036	sections mapped to SHN_UNDEF.
4037
40382007-10-04  Ulrich Drepper  <drepper@redhat.com>
4039
4040	* readelf.c (dump_archive_index): Avoid warning about uninitialized
4041	variable with older glibc versions.
4042	Add some branch prediction.
4043
40442007-10-04  Roland McGrath  <roland@redhat.com>
4045
4046	* readelf.c (print_archive_index): New variable.
4047	(options, parse_opt): Accept -c/--archive-index to set it.
4048	(dump_archive_index): New function.
4049	(process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
4050	Call dump_archive_index on archives if set.
4051	(main): Update caller.
4052	(any_control_option): Give it file scope, moved out of ...
4053	(parse_opt): ... here.
4054
40552007-10-03  Roland McGrath  <roland@redhat.com>
4056
4057	* unstrip.c (struct arg_info): Add `list' flag.
4058	(options, parse_opt): Grok -n/--list to set it.
4059	(list_module): New function.
4060	(handle_implicit_modules): Call it under -n.
4061
4062	* elflint.c (check_note_section): New function.
4063	(check_sections): Call it for SHT_NOTE.
4064
4065	* readelf.c (handle_notes): Use sections when available.
4066
4067	* elflint.c (check_note_data): New function, broken out of ...
4068	(check_note): ... here.  Call it and elf_getdata_rawchunk.
4069
4070	* readelf.c (handle_auxv_note): Take offset as argument, not buffer.
4071	Use elf_getdata_rawchunk and gelf_getauxv.
4072	(handle_notes_data): New function, broken out of ...
4073	(handle_notes): ... here.  Call it and elf_getdata_rawchunk.
4074
40752007-10-01  Roland McGrath  <roland@redhat.com>
4076
4077	* readelf.c (hex_dump): Fix transposed subtraction generating spaces.
4078
4079	* readelf.c (hex_dump): Fix line header to be hex instead of decimal.
4080
40812007-09-10  Roland McGrath  <roland@redhat.com>
4082
4083	* readelf.c (options): Give -p optional argument, alias --string-dump.
4084	(string_sections, string_sections_tail): New static variables.
4085	(parse_opt): Set them when -p has an argument.
4086	(print_string_section): New function, broken out of ...
4087	(print_strings): ... here.  Call it.
4088	(dump_data_section): New function, broken out of ...
4089	(dump_data): ... here.  Call it.
4090	(for_each_section_argument): New function, broken out of ...
4091	(dump_data): ... here.  Call it.
4092	(dump_strings): New function.
4093
40942007-08-31  Roland McGrath  <roland@redhat.com>
4095
4096	* readelf.c (print_strings): Typo fix.
4097
40982007-08-23  Roland McGrath  <roland@redhat.com>
4099
4100	* readelf.c (printf_with_wrap): Function removed.
4101	(REGISTER_WRAP_COLUMN): New macro.
4102	(handle_core_register): Use print_core_item instead.
4103	(struct register_info): New type.
4104	(compare_registers, compare_register_sets): New functions.
4105	(register_bitpos, compare_sets_by_info): New functions.
4106	(handle_core_registers): Use those to segregate and sort registers
4107	for display.
4108
4109	* readelf.c (ITEM_WRAP_COLUMN): New macro.
4110	(print_core_item): New function.
4111	(handle_core_item): Use it instead of printf_with_wrap.
4112	(compare_core_items, compare_core_item_groups): New functions.
4113	(handle_core_items): Use them.  Sort by group and force line breaks
4114	between groups.
4115
4116	* readelf.c (handle_core_registers, handle_core_items): New functions,
4117	broken out of ...
4118	(handle_core_note): ... here.   Call them.
4119
41202007-08-22  Roland McGrath  <roland@redhat.com>
4121
4122	* unstrip.c (new_shstrtab): New function, broken out of ...
4123	(copy_elided_sections): ... here.
4124
41252007-08-20  Roland McGrath  <roland@redhat.com>
4126
4127	Avoid local function trampolines in nm binary.
4128	* nm.c (sort_by_address): Move to a static function instead of local
4129	inside show_symbols.
4130	(sort_by_name_strtab): New static variable.
4131	(sort_by_name): Use it.  Move to a static function instead of local
4132	inside show_symbols.
4133	(show_symbols): Set sort_by_name_strtab.
4134
41352007-08-19  Roland McGrath  <roland@redhat.com>
4136
4137	* readelf.c (handle_auxv_note): New function.
4138	(handle_notes): Call it.
4139
4140	* readelf.c (printf_with_wrap, convert): New functions.
4141	(handle_core_item, (handle_core_register): New functions.
4142	(handle_notes): Call those with details from ebl_core_note.
4143
41442007-08-12  Roland McGrath  <roland@redhat.com>
4145
4146	* elflint.c (check_note): Accept type 0 with name "Linux".
4147
4148	* elflint.c (special_sections): Accept SHF_ALLOC for ".note".
4149
4150	* elflint.c (section_flags_string): Return "none" for 0, not "".
4151
41522007-08-11  Roland McGrath  <roland@redhat.com>
4153
4154	* elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
4155
41562007-08-04  Ulrich Drepper  <drepper@redhat.com>
4157
4158	* readelf.c (hex_dump): Use isprint to determine whether to print
4159	character itself or full stop character.
4160	(dump_data): No need to check endp for NULL after strtol call.
4161
41622007-08-03  Roland McGrath  <roland@redhat.com>
4163
4164	* readelf.c (print_string_sections): New variable.
4165	(options, parse_opt): Handle --strings/-p to set it.
4166	(print_strings): New function.
4167	(process_elf_file): Call it under -p.
4168
4169	* readelf.c (options): Add hidden aliases --segments, --sections,
4170	as taken by binutils readelf.
4171
41722007-08-01  Roland McGrath  <roland@redhat.com>
4173
4174	* readelf.c (dump_data_sections, dump_data_sections_tail):
4175	New variables.
4176	(options, parse_opt): Handle --hex-dump/-x, set them.
4177	(hex_dump): New function.
4178	(dump_data): New function, call it.
4179	(process_elf_file): Call it.
4180
41812007-07-25  Roland McGrath  <roland@redhat.com>
4182
4183	* addr2line.c (show_symbols): New variable.
4184	(print_addrsym): New function.
4185	(handle_address): Call it.
4186	(options, parse_opt): Handle -S/--symbols.
4187
41882007-06-05  Ulrich Drepper  <drepper@redhat.com>
4189
4190	* addr2line.c: Update for latest autoconf header.
4191	* ar.c: Likewise.
4192	* elfcmp.c: Likewise.
4193	* elflint.c: Likewise.
4194	* findtextrel.c: Likewise.
4195	* ld.c: Likewise.
4196	* ldgeneric.c: Likewise.
4197	* nm.c: Likewise.
4198	* objdump.c: Likewise.
4199	* ranlib.c: Likewise.
4200	* readelf.c: Likewise.
4201	* size.c: Likewise.
4202	* strings.c: Likewise.
4203	* strip.c: Likewise.
4204	* unstrip.c: Likewise.
4205
42062007-05-18  Roland McGrath  <roland@redhat.com>
4207
4208	* unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
4209	stripped file, so as not to duplicate a section copied in both.
4210
4211	* strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
4212
42132007-05-17  Roland McGrath  <roland@redhat.com>
4214
4215	* unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
4216
4217	* unstrip.c (handle_file): Tweak BIAS != 0 warning.
4218
4219	* unstrip.c (handle_file): Take new arg CREATE_DIRS.  If set,
4220	call make_directories here.
4221	(handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
4222	(handle_dwfl_module): Likewise.
4223	(handle_implicit_modules): Update callers.
4224	(handle_output_dir_module): Likewise.  Don't do make_directories here.
4225
4226	* unstrip.c (get_section_name): New function, broken out of ...
4227	(copy_elided_sections): here.  Update callers.
4228	(find_alloc_section): Broken out of ...
4229	(copy_elided_sections): ... here.  Update caller.
4230	(symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
4231	update STT_SECTION symbols' st_value fields as a side effect.
4232	(check_symtab_section_symbols): Update caller.
4233	(add_new_section_symbols): Set st_value in symbols added.
4234	(collect_symbols): Reset S->value for STT_SECTION symbols recorded.
4235	Take new arg SPLIT_BSS.  Adjust S->shndx recorded for symbols moved
4236	from .bss to .dynbss.
4237	(find_alloc_sections_prelink): New function.  Associate debug file
4238	allocated SHT_NOBITS shdrs with stripped moved by prelink via
4239	.gnu.prelink_undo information.
4240	(copy_elided_sections): Call it when we couldn't find every allocated
4241	section.  Don't use a debug file non-NOBITS section if SHF_ALLOC.
4242	Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
4243	(handle_file): Update callers.
4244
4245	* unstrip.c (copy_elided_sections): Ignore unfound unallocated section
4246	named ".comment".
4247
4248	* elflint.c (check_sections): Fix association of segments with
4249	sections when p_memsz > p_filesz.
4250
42512007-04-29  Roland McGrath  <roland@redhat.com>
4252
4253	* addr2line.c (options, main): Tweak argp group settings to fix
4254	usage output.
4255
42562007-04-28  Roland McGrath  <roland@redhat.com>
4257
4258	* strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
4259	sizes to match sections adjusted in the stripped file.
4260
42612007-04-24  Roland McGrath  <roland@redhat.com>
4262
4263	* elfcmp.c (OPT_HASH_INEXACT): New macro.
4264	(hash_inexact): New variable.
4265	(options, parse_opt): Add --hash-inexact option to set it.
4266	(hash_content_equivalent): New function.
4267	(main): Call it for differing SHT_HASH sections under --hash-inexact.
4268
42692007-04-23  Roland McGrath  <roland@redhat.com>
4270
4271	* unstrip.c: New file.
4272	* Makefile.am (bin_PROGRAMS): Add it.
4273	(unstrip_LDADD): New variable.
4274
4275	* strip.c (options): Allow --output for -o.
4276
42772007-02-15  Ulrich Drepper  <drepper@redhat.com>
4278
4279	* readelf.c: Remove unused code.  Add a few consts.
4280
42812007-02-15  Roland McGrath  <roland@redhat.com>
4282
4283	* readelf.c (print_debug): Fix brainos in SHDR test.
4284
42852007-02-05  Roland McGrath  <roland@redhat.com>
4286
4287	* ar.c: Include <limits.h>, since we use LONG_MAX.
4288
42892007-02-05  Ulrich Drepper  <drepper@redhat.com>
4290
4291	* ar.c: Add ugly hack to work around gcc complaining that we
4292	ignore fchown's return value.
4293	(do_oper_insert): Handle error when writing padding.
4294	* ranlib.c: Add fchown complain work around.
4295
4296	* arlib.c: Make symtab a global variable.  Change all users.
4297	* arlib2.c: Likewise.
4298	* ranlib.c: Likewise.
4299	* ar.c: Likewise.
4300	* arlib.h: Declare it.
4301
43022007-01-11  Roland McGrath  <roland@redhat.com>
4303
4304	* elflint.c (check_sections): Use ebl_machine_section_flag_check on
4305	SHF_MASKPROC bits separately from generic sh_flags validation.
4306
43072007-02-04  Ulrich Drepper  <drepper@redhat.com>
4308
4309	* ar.c: New file.
4310	* arlib.c: New file.
4311	* arlib2.c: New file.
4312	* arlib.h: New file.
4313	* Makefile (noinst_LIBRARIES): Add libar.
4314	(libar_a_SOURCES): Define.
4315	(ar_LDADD): Define.
4316	(CFLAGS_ar): Define.
4317	* ranlib.c: Change to use arlib.
4318
4319	* elflint.c (check_symtab): Work around GNU ld bug which omits
4320	sections but not symbols in those sections.
4321
43222007-01-10  Ulrich Drepper  <drepper@redhat.com>
4323
4324	* addr2line.c: Update copyright year.
4325	* elfcmp.c: Likewise.
4326	* elflint.c: Likewise.
4327	* findtextrel.c: Likewise.
4328	* ld.c: Likewise.
4329	* nm.c: Likewise.
4330	* objdump.c: Likewise.
4331	* ranlib.c:  Likewise.
4332	* readelf.c: Likewise.
4333	* size.c: Likewise.
4334	* strings.c: Likewise.
4335	* strip.c: Likewise.
4336
43372006-12-09  Ulrich Drepper  <drepper@redhat.com>
4338
4339	* elflint.c (compare_hash_gnu_hash): New function.  Report if the
4340	two hash tables have different content (module expected omission
4341	of undefined symbols).
4342
43432006-10-31  Roland McGrath  <roland@redhat.com>
4344
4345	* elflint.c (check_program_header): Don't complain about
4346	p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
4347
43482006-09-19  Jakub Jelinek  <jakub@redhat.com>
4349
4350	* strip.c (process_file): Disallow -f on archives.
4351
43522006-10-09  Roland McGrath  <roland@redhat.com>
4353
4354	* Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
4355
43562006-08-29  Roland McGrath  <roland@redhat.com>
4357
4358	* Makefile.am (MAINTAINERCLEANFILES): New variable.
4359
4360	* readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
4361	Reported by Christian Aichinger <Greek0@gmx.net>.
4362
4363	* elflint.c (valid_e_machine): Add EM_ALPHA.
4364	Reported by Christian Aichinger <Greek0@gmx.net>.
4365
43662006-08-08  Ulrich Drepper  <drepper@redhat.com>
4367
4368	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
4369	Keep track of which "high DT" entries are present.
4370	Check that either old or GNU-style hash table is present.
4371	If GNU-style hash table is used a symbol table is mandatory.
4372	Check that if any prelink entry is present all of them are.
4373	(check_gnu_hash): Only fail for undefined symbols in GNU-style hash
4374	table if they don't refer to functions.
4375
43762006-07-17  Roland McGrath  <roland@redhat.com>
4377
4378	* elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
4379	(add_version): Likewise for argument.
4380	(check_versym): Cast constant to GElf_Versym for comparison.
4381
43822006-07-12  Roland McGrath  <roland@redhat.com>
4383
4384	* readelf.c (handle_gnu_hash): Add casts for machines where
4385	Elf32_Word != unsigned int.
4386
43872006-07-12  Ulrich Drepper  <drepper@redhat.com>
4388
4389	* elflint.c (check_sysv_hash64): Fix printf format.
4390
43912006-07-11  Roland McGrath  <roland@redhat.com>
4392
4393	* addr2line.c (options): English fix in -f doc string.
4394
4395	* addr2line.c (use_comp_dir): New variable.
4396	(options, parse_opt): Grok -A/--absolute to set it.
4397	(handle_address): If set, prepend dwfl_line_comp_dir results to
4398	relative file names.
4399
44002006-07-06  Ulrich Drepper  <drepper@redhat.com>
4401
4402	* elflint.c: Adjust for latest new hash table format.
4403	* readelf.c: Likewise.
4404
4405	* elflint.c (check_versym): Ignore hidden bit when comparing version
4406	numbers.
4407
44082006-07-05  Ulrich Drepper  <drepper@redhat.com>
4409
4410	* ldgeneric.c (ld_generic_create_outfile): Correctly recognize
4411	discarded COMDAT symbols.
4412
4413	* i386_ld.c (elf_i386_count_relocations): Lot of corrections.
4414	(elf_i386_create_relocations): Likewise.
4415	* ld.h (struct symbol): Add local and hidden bits.
4416	* ld.c (create_special_section_symbol): These synthsized symbols
4417	are local and hidden.
4418	* ldgeneric.c (file_process2): Check whether input file matches
4419	the emulation.
4420	(fillin_special_symbol): Create symbols as local and/or hidden
4421	if requested.
4422	(ld_generic_create_outfile): Make local copy of symbol.
4423	Don't hide global, defined symbols in dynamic symbol table unless
4424	requested.  Synthetic symbols have no version information.
4425
4426	* elflint.c: Add support for checking 64-bit SysV-style hash tables.
4427	* readelf.c: Add support for printing 64-bit SysV-style hash tables.
4428
44292006-07-04  Ulrich Drepper  <drepper@redhat.com>
4430
4431	* elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
4432	testing.
4433
44342006-07-03  Ulrich Drepper  <drepper@redhat.com>
4435
4436	* elflint.c: Add testing of DT_GNU_HASH.
4437	* readelf.c: Implement showing histogram for DT_GNU_HASH section.
4438
4439	* Makefile.am: Add hacks to create dependency files for non-generic
4440	linker.
4441
44422006-06-12  Ulrich Drepper  <drepper@redhat.com>
4443
4444	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
4445	section if creating a DSO and no interpreter is given.
4446	(ld_generic_create_outfile): Don't store reference to symbols in
4447	discarded COMDAT groups.  Don't create PHDR and INTERP program header
4448	for DSO if no interpreter is specified.
4449	(create_verneed_data): Pretty printing.
4450
4451	* ldscript.y (content): If a DSO is created don't set default
4452	interpreter from linker script.
4453
4454	* i386_ld.c (elf_i386_count_relocations): Do not add relocations
4455	for symbols in discarded COMDAT groups.
4456	(elf_i386_create_relocations): Likewise.
4457	* ld.h (struct scninfo): Add unused_comdat.
4458	* ldgeneric.c (add_section): Also check group signature when
4459	matching COMDAT sections.
4460	(add_relocatable_file): Ignore symbols in COMDAT group which are
4461	discarded.
4462
4463	* elflint.c (check_one_reloc): For *_NONE relocs only check type
4464	and symbol reference.
4465
44662006-06-11  Ulrich Drepper  <drepper@redhat.com>
4467
4468	* elflint.c (check_dynamic): Fix checking value of tags which are
4469	offsets in the string section.  Make sure DT_STRTAB points to the
4470	section referenced in sh_link.
4471
4472	* ld.c (options): Add headers.  Add short option 'R' for '--rpath'.
4473
4474	* ld.c: Recognize --eh-frame-hdr option.
4475	* ld.h (struct ld_state): Add eh_frame_hdr field.
4476	* ldgeneric.c (struct unw_eh_frame_hdr): Define.
4477
4478	* ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
4479	SH_FLAGS_COMBINE.
4480	(add_relocatable_file): Minor optimization of last change.
4481	(match_section): Don't preserve SHF_GROUP flag any longer.
4482
44832006-06-10  Ulrich Drepper  <drepper@redhat.com>
4484
4485	* ld.c (parse_z_option): Recognize execstack and noexecstack.
4486	Handle record and ignore as position dependent options.
4487	(parse_z_option_2): Handle ignore and record here.
4488	* ld.h (struct ld_state): Add execstack field.
4489	* ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
4490	sections.
4491	(ld_generic_create_outfile): Fix program header creation in native
4492	linker.  Add PT_GNU_STACK program header.
4493
44942006-06-09  Ulrich Drepper  <drepper@redhat.com>
4495
4496	* i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
4497	for PLT entries if there is no local definition.
4498
4499	* ld.c (parse_option): Handle -z ignore like --as-needed and
4500	-z record like --no-as-needed.
4501	* ld.h (struct ld_state): Remove ignore_unused_dsos field.
4502	* ldgeneric.c (new_generated_scn): Always compute ndt_needed by
4503	looping over DSOs.  When deciding about adding DT_NEEDED entries
4504	use ->as_needed instead of ignore_unused_dsos.
4505
45062006-05-31  Ulrich Drepper  <drepper@redhat.com>
4507
4508	* ld.c: Recognize --as-needed and --no-as-needed options.
4509	* ld.h (struct usedfile): Add as_needed field.
4510	(struct ld_state): Likewise.
4511	* ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
4512	the list.
4513	* ldscript.y (filename_id_list): Split to correctly parse all
4514	combinations.
4515	(mark_as_needed): Fix loop.
4516
45172006-05-28  Ulrich Drepper  <drepper@redhat.com>
4518
4519	* addr2line.c (print_dwarf_function): Use unsigned type for lineno
4520	and colno.
4521
45222006-05-27  Ulrich Drepper  <drepper@redhat.com>
4523
4524	* readelf.c (handle_relocs_rela): Better notations for addon value.
4525	(print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
4526
45272006-04-04  Ulrich Drepper  <drepper@redhat.com>
4528
4529	* addr2line.c: Update copyright year.
4530	* elfcmp.c: Likewise.
4531	* elflint.c: Likewise.
4532	* findtextrel.c: Likewise.
4533	* ld.c: Likewise.
4534	* nm.c: Likewise.
4535	* objdump.c: Likewise.
4536	* ranlib.c: Likewise.
4537	* readelf.c: Likewise.
4538	* size.c: Likewise.
4539	* strings.c: Likewise.
4540	* strip.c: Likewise.
4541
45422006-03-09  Roland McGrath  <roland@redhat.com>
4543
4544	* Makefile.am (AM_LDFLAGS): New variable.
4545
45462006-03-01  Roland McGrath  <roland@redhat.com>
4547
4548	* readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
4549	for dwarf.h changes matching 3.0 spec.
4550	(dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
4551
45522005-12-04  Ulrich Drepper  <drepper@redhat.com>
4553
4554	* elflint.c (check_one_reloc): If relocation section is not loaded,
4555	don't check whether the relocations modify read-only sections or
4556	loaded and unloaded sections.
4557
45582005-11-28  Ulrich Drepper  <drepper@redhat.com>
4559
4560	* elflint.c (check_one_reloc): Take additional parameters.  Use
4561	them to determine whether relocation is valid in this type of
4562	file.  DSOs and executables can contain relocation sections in
4563	unloaded sections which just show the relocations the linker
4564	applied.  Adjust all callers.
4565	(check_program_header): Check that PT_PHDR is loaded and that offset
4566	matches the one in the ELF header.
4567
45682005-10-26  Roland McGrath  <roland@redhat.com>
4569
4570	* nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
4571
45722005-09-03  Ulrich Drepper  <drepper@redhat.com>
4573
4574	* strip.c (handle_elf): Unify some error messages.
4575	* ld.c (main): Likewise.
4576	* ldgeneric.c (open_elf): Likewise.
4577	* elfcmp.c (main): Likewise.
4578	* elflint.c (check_elf_header): Likewise.
4579
4580	* size.c (process_file): Fix typo in error message.
4581
4582	* readelf.c: Lots of little cleanups.  Use _unlocked functions.
4583
45842005-09-02  Ulrich Drepper  <drepper@redhat.com>
4585
4586	* strings.c (main): Reset elfmap variable after munmap call.
4587	[_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
4588
45892005-08-28  Ulrich Drepper  <drepper@redhat.com>
4590
4591	* ranlib.c: Don't define pread_retry and write_retry here.
4592
4593	* Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
4594	(CLEANFILES): Add *.gcno *.gcda *.gconv.
4595
4596	* strings.c (process_chunk): Reorder expressions in conditional
4597	(process_chunk_mb): Likewise.
4598
4599	* strings.c: New file.
4600	* Makefile.am (bin_PROGRAMS): Add strings.
4601	(strings_no_Wstring): Define.
4602	(strings_LDADD): Define.
4603
46042005-08-27  Roland McGrath  <roland@redhat.com>
4605
4606	* addr2line.c (dwarf_diename_integrate): Function removed.
4607	(print_dwarf_function): Use plain dwarf_diename.
4608
46092005-08-24  Ulrich Drepper  <drepper@redhat.com>
4610
4611	* elflint.c (check_versym): Versioned symbols should not have
4612	local binding.
4613
46142005-08-15  Ulrich Drepper  <drepper@redhat.com>
4615
4616	* elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
4617	undefined.
4618
4619	* Makefile.am: Add rules to build ranlib.
4620	* ranlib.c: New file.
4621
46222005-08-14  Roland McGrath  <roland@redhat.com>
4623
4624	* elflint.c (check_sections): Use ebl_section_type_name and allow any
4625	sh_type it recognizes.
4626
4627	* elflint.c (check_sections): Print unknown flags in hex, don't
4628	truncate high bits.  Print section number and name for unknown type.
4629
46302005-08-13  Roland McGrath  <roland@redhat.com>
4631
4632	* elflint.c (check_program_header): Use ebl_segment_type_name and
4633	allow any p_type it recognizes.  Include p_type value in error
4634	message for unknown type.
4635
46362005-08-13  Ulrich Drepper  <drepper@redhat.com>
4637
4638	* elflint.c (check_symtab): Simplify last change a bit.  Pass ehdr
4639	to ebl_check_special_symbol.
4640	(check_sections): Pass ehdr to ebl_bss_plt_p.
4641
46422005-08-12  Roland McGrath  <roland@redhat.com>
4643
4644	* elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
4645	refers to the right section if it's not SHN_ABS.
4646	Let ebl_check_special_symbol override _G_O_T_ value and size checks.
4647
4648	* elflint.c (check_sections): Don't complain about a non-NOBITS
4649	section taking no segment space, if it's sh_size is 0.
4650
4651	* elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
4652	be PROGBITS or NOBITS.
4653
4654	* elflint.c (check_symtab): Use ebl_check_special_symbol to override
4655	standard st_value and st_size checks.
4656
46572005-07-28  Roland McGrath  <roland@redhat.com>
4658
4659	* addr2line.c (options, parse_opt): Don't handle -e here.
4660	(executable): Variable removed.
4661	(argp_children): New static variable.
4662	(argp): Use it.  Make const.
4663	(main): Fill in argp_children from dwfl_standard_argp ().
4664	Let libdwfl handle file selection, pass Dwfl handle to handle_address.
4665	(print_dwarf_function): New function.  Try to figure out inline chain.
4666	(elf_getname): Function removed, libdwfl does it for us.
4667	(handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
4668	Use dwfl_module_addrname instead of elf_getname.
4669	Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
4670	* Makefile.am (INCLUDES): Add libdwfl directory to path.
4671
46722005-08-10  Ulrich Drepper  <drepper@redhat.com>
4673
4674	* strip.c (parse_opt): STATE parameter is now used.
4675	Various little cleanups.
4676
4677	* readelf.c (print_debug_line_section): Correct fallout of renaming
4678	of DW_LNS_set_epilog_begin.
4679
46802005-08-08  Roland McGrath  <roland@redhat.com>
4681
4682	* strip.c (options, parse_opt): Grok -R .comment for compatibility
4683	with binutils strip.  Likewise -d, -S, as aliases for -g.
4684	Likewise ignore -s/--strip-all.
4685
46862005-08-07  Roland McGrath  <roland@redhat.com>
4687
4688	* strip.c (process_file): Open read-only when using a different output
4689	file.
4690
46912005-08-06  Ulrich Drepper  <drepper@redhat.com>
4692
4693	* elflint.c (in_nobits_scn): New function.
4694	(check_versym): Allow references for defined symbols against versions
4695	of other DSOs also for symbols in nobits sections.
4696	Move a few variables around.
4697
4698	* Makefile.am (AM_CFLAGS): Avoid duplication.
4699	Link with statis libs if BUILD_STATIC.
4700
47012005-08-05  Ulrich Drepper  <drepper@redhat.com>
4702
4703	* elflint.c: Many, many more tests.  Mostly related to symbol
4704	versioning.  Those sections should now be completely checked.
4705
4706	* readelf.c (print_dynamic): Use gelf_offscn.
4707
47082005-08-04  Ulrich Drepper  <drepper@redhat.com>
4709
4710	* elflint.c: Add lots more tests: more extension symbol table sanity,
4711	versioning section tests, hash table tests.  General cleanup.
4712
47132005-08-02  Ulrich Drepper  <drepper@redhat.com>
4714
4715	* objdump.c: New file.
4716	* Makefile.am (bin_PROGRAMS): Add objdump.
4717	(objdump_LDADD): Define.
4718
4719	* elflint.c (check_reloc_shdr): New function split out from check_rela
4720	and check_rel.
4721	(check_one_reloc): New function.  Likewise.
4722	(check_rela): Use check_reloc_shdr and check_one_reloc.
4723	(check_rel): Likewise.
4724	(check_program_header): Check that PT_DYNAMIC entry matches .dynamic
4725	section.
4726	Add checks that relocations against read-only segments are flagged,
4727	that the text relocation flag is not set unnecessarily, and that
4728	relocations in one section are either against loaded or not-loaded
4729	segments.
4730
47312005-08-01  Ulrich Drepper  <drepper@redhat.com>
4732
4733	* elfcmp.c (main): Ignore section count and section name string table
4734	section index.
4735
47362005-07-27  Roland McGrath  <roland@redhat.com>
4737
4738	* elfcmp.c: Include <locale.h>.
4739
47402005-07-27  Ulrich Drepper  <drepper@redhat.com>
4741
4742	* elfcmp.c: Print name and index of differing section.
4743
47442005-07-24  Ulrich Drepper  <drepper@redhat.com>
4745
4746	* elfcmp.c: Implement comparing gaps between sections.
4747
47482005-07-23  Ulrich Drepper  <drepper@redhat.com>
4749
4750	* elflint.c: Include libeblP.h instead of libebl.h.
4751	* nm.c: Likewise.
4752	* readelf.c: Likewise.
4753	* elfcmp.c: Likewise.
4754
4755	* elfcmp.c (main): Compare individual ELF header fields, excluding
4756	e_shoff instead of the whole struct at once.
4757	Use ebl_section_strip_p instead of SECTION_STRIP_P.
4758	* strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
4759
47602005-07-22  Ulrich Drepper  <drepper@redhat.com>
4761
4762	* elfcmp.c (main): Take empty section into account when comparing
4763	section content.
4764
4765	* elflint.c (check_dynamic): Check that d_tag value is >= 0 before
4766	using it.
4767
47682005-07-21  Ulrich Drepper  <drepper@redhat.com>
4769
4770	* elfcmp.c: New file.
4771	* Makefile.am (bin_PROGRAMS): Add elfcmp.
4772	(elfcmp_LDADD): Define.
4773
4774	* elflint.c (check_rela): Check that copy relocations only reference
4775	object symbols or symbols with unknown type.
4776	(check_rel): Likewise.
4777
47782005-06-08  Roland McGrath  <roland@redhat.com>
4779
4780	* readelf.c (print_ops): Add consts.
4781
47822005-05-31  Roland McGrath  <roland@redhat.com>
4783
4784	* readelf.c (print_debug_abbrev_section): Don't bail after first CU's
4785	abbreviations.  Print a header line before each CU section.
4786
4787	* readelf.c (print_debug_loc_section): Fix indentation for larger
4788	address size.
4789
47902005-05-30  Roland McGrath  <roland@redhat.com>
4791
4792	* readelf.c (print_debug_line_section): Print section offset of each
4793	CU's table, so they are easy to find from seeing the stmt_list value.
4794
4795	* readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
4796	(attr_callback): Grok DW_AT_ranges and print offset in hex.
4797
4798	* readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
4799	(print_debug_ranges_section, print_debug_loc_section): Likewise.
4800
4801	* readelf.c (print_ops): Take different args for indentation control.
4802	(attr_callback): Caller updated.
4803	Grok several more block-form attributes as being location expressions.
4804	For those same attributes with udata forms, format output differently
4805	for location list offset.
4806	(print_debug_loc_section): Implement it for real.
4807
4808	* readelf.c (options): Mention ranges for --debug-dump.
4809	(enum section_e): Add section_ranges.
4810	(parse_opt): Grok "ranges" for -w/--debug-dump.
4811	(print_debug_ranges_section): New function.
4812	(print_debug): Handle .debug_ranges section.
4813
48142005-05-30  Ulrich Drepper  <drepper@redhat.com>
4815
4816	* readelf.c (handle_notes): At least x86-64 need not have the note
4817	section values aligned to 8 bytes.
4818
48192005-05-18  Ulrich Drepper  <drepper@redhat.com>
4820
4821	* readelf.c (dwarf_tag_string): Add new tags.
4822
48232005-05-08  Roland McGrath  <roland@redhat.com>
4824
4825	* strip.c (handle_elf): Don't translate hash and versym data formats,
4826	elf_getdata already did it for us.
4827
48282005-05-07  Ulrich Drepper  <drepper@redhat.com>
4829
4830	* Makefile.am (findtextrel_LDADD): Add $(libmudflap).
4831	(addr2line_LDADD): Likewise.
4832
48332005-05-03  Roland McGrath  <roland@redhat.com>
4834
4835	* strip.c (handle_elf): Apply symbol table fixups to discarded
4836	relocation sections when they are being saved in the debug file.
4837
4838	* strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
4839	and gelf_xlatetof, not the native byte order.
4840
4841	* strip.c (parse_opt): Give error if -f or -o is repeated.
4842	(main): Exit if argp_parse returns nonzero.
4843
4844	* strip.c (debug_fname_embed): New variable.
4845	(options, parse_opt): New option -F to set it.
4846
48472005-05-07  Ulrich Drepper  <drepper@redhat.com>
4848
4849	* readelf.c (parse_opt): Make any_control_option variable
4850	local.  Simplify some tests.
4851
48522005-05-03  Roland McGrath  <roland@redhat.com>
4853
4854	* strip.c (crc32_file): Function removed (now in ../lib).
4855
48562005-05-03  Roland McGrath  <roland@redhat.com>
4857
4858	* elflint.c (is_debuginfo): New variable.
4859	(options, parse_opt): New option --debuginfo/-d to set it.
4860	(check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
4861	(check_note): If is_debuginfo, don't try to get note contents.
4862
48632005-04-24  Ulrich Drepper  <drepper@redhat.com>
4864
4865	* readelf.c (print_debug_abbrev_section): Don't print error when end of
4866	section reached.
4867
48682005-04-14  Ulrich Drepper  <drepper@redhat.com>
4869
4870	* readelf.c (dwarf_encoding_string): New function.
4871	(dwarf_inline_string): New function.
4872	(dwarf_access_string): New function.
4873	(dwarf_visibility_string): New function.
4874	(dwarf_virtuality_string): New function.
4875	(dwarf_identifier_case_string): New function.
4876	(dwarf_calling_convention_string): New function.
4877	(dwarf_ordering_string): New function.
4878	(dwarf_discr_list_string): New function.
4879	(attr_callback): Decode man more attribute values.
4880
48812005-04-01  Ulrich Drepper  <drepper@redhat.com>
4882
4883	* addr2line.c: Finish implementation of -f option.
4884
48852005-03-29  Ulrich Drepper  <drepper@redhat.com>
4886
4887	* addr2line.c: New file.
4888	* Makefile.am (bin_PROGRAMS): Add addr2line.
4889	Define addr2line_LDADD.
4890
4891	* findtextrel.c: Use new dwarf_addrdie function.
4892
4893	* findtextrel.c: Fix usage message and re-add accidentally removed
4894	line.
4895
48962005-03-28  Ulrich Drepper  <drepper@redhat.com>
4897
4898	* findtextrel.c: New file.
4899	* Makefile: Add rules to build findtextrel.
4900
49012005-02-15  Ulrich Drepper  <drepper@redhat.com>
4902
4903	* ldlex.l: Provide ECHO definition to avoid warning.
4904
4905	* elflint.c (check_program_header): Fix typo in RELRO test.
4906
4907	* Makefile.am (AM_CFLAGS): Add more warning options.
4908	* elflint.c: Fix warnings introduced by the new warning options.
4909	* i386_ld.c: Likewise.
4910	* ld.c: Likewise.
4911	* ld.h: Likewise.
4912	* ldgeneric.c: Likewise.
4913	* nm.c: Likewise.
4914	* readelf.c: Likewise.
4915	* sectionhash.c: Likewise.
4916	* size.c: Likewise.
4917	* string.c: Likewise.
4918
49192005-02-05  Ulrich Drepper  <drepper@redhat.com>
4920
4921	* Makefile.am: Check for text relocations in constructed DSOs.
4922
4923	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.  Link all apps
4924	with -lmudflap.
4925
4926	* ldscript.y: Add as_needed handling.
4927	* ldlex.l: Recognize AS_NEEDED token.
4928	* ld.h (struct filename_list): Add as_needed flag.
4929
49302005-02-04  Ulrich Drepper  <drepper@redhat.com>
4931
4932	* elflint.c (check_symtab): Correctly determine size of GOT section.
4933
49342005-01-19  Ulrich Drepper  <drepper@redhat.com>
4935
4936	* ld.c: Remove unnecessary more_help function.  Print bug report
4937	address using argp.
4938	* strip.c: Likewise.
4939	* size.c: Likewise.
4940	* nm.c: Likewise.
4941	* readelf.c: Likewise.
4942	* elflint.c: Likewise.
4943
4944	* elflint.c (main): Don't check for parameter problems here.
4945	(parse_opt): Do it here, where we get informed about some of them
4946	anyway.
4947
4948	* readelf.c (main): Don't check for parameter problems here.
4949	(parse_opt): Do it here, where we get informed about some of them
4950	anyway.
4951
49522005-01-11  Ulrich Drepper  <drepper@redhat.com>
4953
4954	* strip.c: Update copyright year.
4955	* readelf.c: Likewise.
4956	* size.c: Likewise.
4957	* nm.c: Likewise.
4958	* ld.c: Likewise.
4959	* elflint.c: Likewise.
4960
4961	* elflint.c (check_symtab): Don't warn about wrong size for
4962	_DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
4963
49642004-10-05  Ulrich Drepper  <drepper@redhat.com>
4965
4966	* readelf.c (print_phdr): In section mapping, also indicate
4967	sections in read-only segments.
4968
49692004-09-25  Ulrich Drepper  <drepper@redhat.com>
4970
4971	* readelf.c: Make compile with gcc 4.0.
4972	* strip.c: Likewise.
4973
49742004-08-16  Ulrich Drepper  <drepper@redhat.com>
4975
4976	* strip.c (handle_elf): Rewrite dynamic memory handling to use of
4977	allocate to work around gcc 3.4 bug.
4978
49792004-01-25  Ulrich Drepper  <drepper@redhat.com>
4980
4981	* ldlex.l (invalid_char): Better error message.
4982
49832004-01-23  Ulrich Drepper  <drepper@redhat.com>
4984
4985	* readelf.c: Print SHT_GNU_LIBLIST sections.
4986
4987	* none_ld.c: New file.
4988
49892004-01-21  Ulrich Drepper  <drepper@redhat.com>
4990
4991	* Makefile.am: Enable building of machine specific linker.
4992
49932004-01-20  Ulrich Drepper  <drepper@redhat.com>
4994
4995	* Makefile.am: Support building with mudflap.
4996
4997	* i386_ld.c: Fix warnings gcc 3.4 spits out.
4998	* ldgeneric.c: Likewise.
4999	* ldscript.y: Likewise.
5000	* readelf.c: Likewise.
5001	* strip.c: Likewise.
5002
5003	* readelf.c (print_debug_line_section): Determine address size
5004	correctly.
5005
50062004-01-19  Ulrich Drepper  <drepper@redhat.com>
5007
5008	* readelf.c (print_phdr): Show which sections are covered by the
5009	PT_GNU_RELRO entry.
5010
5011	* elflint.c (check_program_header): Check PT_GNU_RELRO entry.
5012
5013	* readelf.c (print_debug_macinfo_section): Implement.
5014
50152004-01-18  Ulrich Drepper  <drepper@redhat.com>
5016
5017	* readelf.c (print_debug_line_section): Implement.
5018
50192004-01-17  Ulrich Drepper  <drepper@redhat.com>
5020
5021	* src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
5022	* src/ld.c: Likewise.
5023	* src/nm.c: Likewise.
5024	* src/readelf.c: Likewise.
5025	* src/size.c: Likewise.
5026	* src/strip.c: Likewise.
5027
5028	* strip.c: Add a few more unlikely.  Reduce scope of some variables.
5029
5030	* Makefile.am: Support building with mudflap.
5031
50322004-01-16  Ulrich Drepper  <drepper@redhat.com>
5033
5034	* readelf.c (print_debug_info_section): Free dies memory.
5035
5036	* readelf.c: Print .debug_info section content.
5037
50382004-01-13  Ulrich Drepper  <drepper@redhat.com>
5039
5040	* readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
5041
50422004-01-12  Ulrich Drepper  <drepper@redhat.com>
5043
5044	* readelf.c (print_debug_aranges): Implement using libdw.
5045
50462004-01-11  Ulrich Drepper  <drepper@redhat.com>
5047
5048	* nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
5049
5050	* readelf.c: Use libdw instead of libdwarf.  Not all of the old
5051	behavior is available yet.
5052	* Makefile.am: Link readelf with libdw.  Remove libdwarf include path.
5053
50542004-01-09  Ulrich Drepper  <drepper@redhat.com>
5055
5056	* nm.c (get_local_names): Adjust call to dwarf_nextcu.
5057
5058	* nm.c: Implement getting information about local variables.
5059
50602004-01-07  Ulrich Drepper  <drepper@redhat.com>
5061
5062	* nm.c: Read also debug information for local symbols.
5063
50642004-01-05  Ulrich Drepper  <drepper@redhat.com>
5065
5066	* nm.c: Shuffle dwarf handling code around so the maximum column
5067	width can be computed ahead of printing.  Avoid collection symbols
5068	which are not printed anyway.
5069
5070	* nm.c: Rewrite dwarf handling to use libdw.
5071	* Makefile.am (AM_CFLAGS): Add -std parameter.
5072	(INCLUDES): Find header in libdw subdir.
5073	(nm_LDADD): Replace libdwarf with libdw.
5074
5075	* elflint.c: Update copyright year.
5076	* readelf.c: Likewise.
5077	* size.c: Likewise.
5078	* strip.c: Likewise.
5079	* nm.c: Likewise.
5080
50812003-12-31  Ulrich Drepper  <drepper@redhat.com>
5082
5083	* strip.c (process_file): Close file before returning.
5084
50852003-11-19  Ulrich Drepper  <drepper@redhat.com>
5086
5087	* readelf.c (handle_dynamic): Make column for tag name wider.
5088
50892003-09-29  Ulrich Drepper  <drepper@redhat.com>
5090
5091	* readelf.c (handle_dynamic): Always terminate tag name with a space.
5092
50932003-09-25  Ulrich Drepper  <drepper@redhat.com>
5094
5095	* strip.c (process_file): Don't mmap the input file, we modify the
5096	data structures and don't want the change end up on disk.
5097
50982003-09-23  Jakub Jelinek  <jakub@redhat.com>
5099
5100	* unaligned.h (union u_2ubyte_unaligned,
5101	union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
5102	packed attribute.
5103	(add_2ubyte_unaligned, add_4ubyte_unaligned,
5104	add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
5105	Read/store value through _ptr->u instead of *_ptr.
5106
51072003-09-22  Ulrich Drepper  <drepper@redhat.com>
5108
5109	* size.c (show_sysv): Change type of maxlen to int.
5110
5111	* strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
5112	buckets.
5113
5114	* i386_ld.c: Many many fixes and extensions.
5115	* ld.c: Likewise.
5116	* ldgeneric.c: Likewise.
5117
51182003-08-16  Ulrich Drepper  <drepper@redhat.com>
5119
5120	* ldgeneric.c (check_definition): Don't add symbol on dso_list if
5121	the reference is from another DSO.
5122
51232003-08-15  Ulrich Drepper  <drepper@redhat.com>
5124
5125	* ldgeneric.c (find_entry_point): It is no fatal error if no entry
5126	point is found when creating a DSO.
5127
51282003-08-14  Ulrich Drepper  <drepper@redhat.com>
5129
5130	* ld.c (main): Always call FLAG_UNRESOLVED.
5131	* ldgeneric.c (ld_generic_flag_unresolved): Only complain about
5132	undefined symbols if not creating DSO or ld_state.nodefs is not set.
5133
51342003-08-13  Ulrich Drepper  <drepper@redhat.com>
5135
5136	* Makefile.in: Depend on libebl.a, not libebl.so.
5137
5138	* ld.c (main): Mark stream for linker script as locked by caller.
5139	(read_version_script): Likewise.
5140	* ldlex.c: Define fread and fwrite to _unlocked variant.
5141
5142	* i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
5143	target_bswap_32.
5144	* unaligned.h: Define target_bswap_16, target_bswap_32, and
5145	target_bswap_64.
5146	(store_2ubyte_unaligned, store_4ubyte_unaligned,
5147	store_8ubyte_unaligned): Define using new macros.
5148
51492003-08-12  Ulrich Drepper  <drepper@redhat.com>
5150
5151	* i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
5152	possibly unaligned memory.  Support use of big endian machines.
5153
51542003-08-11  Ulrich Drepper  <drepper@redhat.com>
5155
5156	* Moved to CVS archive.
5157