xref: /aosp_15_r20/external/elfutils/src/ChangeLog (revision 7304104da70ce23c86437a01be71edd1a2d7f37e)
12023-03-27  Di Chen  <[email protected]>
2
3	* readelf.c (options): Support dynamic symtab print with '-Ds'.
4	(process_symtab): New function.
5	(handle_dynamic_symtab): Likewise.
6	(handle_symtab): Return true if symtab was printed. Move printing
7	code to process_symtab and call that function.
8	(print_symtab): Call handle_dynamic_symtab for SHT_DYNSYM when
9	using dynamic segment.
10	(enum dyn_idx): Include i_symtab_shndx, i_verneednum and
11	i_verdefnum.
12	(process_elf_file): Only call print_symtab for SHT_SYMTAB when not
13	use_dynamic_segment.
14	(get_dynscn_addrs): Handle DT_VERDEFNUM, DT_VERNEEDNUM and
15	DT_SYMTAB_SHNDX.
16
172023-03-03  Mark Wielaard  <[email protected]>
18
19	* readelf (process_elf_file): ebl_closebackend only after
20	comparing ebl pointer.
21
222023-02-12  Mark Wielaard  <[email protected]>
23
24	* readelf.c (print_attributes): Add comment about check.
25	(read_encoded): Check readp >= endp before reading
26	DW_EH_PE_uleb128 and DW_EH_PE_sleb128.
27	* elflint.c (check_attributes): Check r >= q before reading
28	uleb128.
29	(print_debug_frame_section): Check augmentation length can be read
30	as uleb128.
31	(print_debug_exception_table): Likewise for ttype_base_offset,
32	call_site_table_len and action.
33
342023-01-22  Mark Wielaard  <[email protected]>
35
36	* addr2line.c (options): Separate --demangle and -C.
37	(parse_opt): Ignore 'b'.
38
392023-01-10  Mark Wielaard  <[email protected]>
40
41	* readelf.c (get_debug_elf_data): New function.
42	(print_debug_abbrev_section): Use get_debug_elf_data.
43	(print_debug_addr_section): Likewise.
44	(print_debug_aranges_section): Likewise.
45	(print_debug_rnglists_section): Likewise.
46	(print_debug_ranges_section): Likewise.
47	(print_debug_frame_section): Likewise.
48	(print_debug_units): Likewise.
49	(print_debug_line_section): Likewise.
50	(print_debug_loclists_section): Likewise.
51	(print_debug_loc_section): Likewise.
52	(print_debug_macinfo_section): Likewise.
53	(print_debug_macro_section): Likewise.
54	(print_debug_str_section): Likewise.
55	(print_debug_str_offsets_section): Likewise.
56	(print_debug_pubnames_section): Likewise.
57
582022-12-21  Shahab Vahedi  <[email protected]>
59
60	* elflint.c (valid_e_machine): Add EM_ARCV2.
61
622022-12-02  Hengqi Chen  <[email protected]>
63
64	* elflint.c (valid_e_machine): Add EM_LOONGARCH.
65
662022-11-03  Mark Wielaard  <[email protected]>
67
68	* readelf.c (get_dynscn_addrs): Check gelf_getdyn doesn't
69	return NULL.
70
712022-11-03  Mark Wielaard  <[email protected]>
72
73	* readelf.c (handle_dynamic): Check phdr != NULL when
74	use_dynamic_segment, otherwise check shdr != NULL.
75
762022-10-28  Arsen Arsenović  <[email protected]>
77
78	* readelf.c (options): Add Binutils-style --syms alias.
79
802022-10-19  Mark Wielaard  <[email protected]>
81
82	* readelf.c (dwarf_loc_list_encoding_string): Handle
83	DW_LLE_GNU_view_pair.
84	(print_debug_loclists_section): Likewise.
85
862022-09-20  Yonggang Luo  <[email protected]>
87
88	* arlib.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
89
902022-08-28  Mark Wielaard  <[email protected]>
91
92	* ar.c (do_oper_extract): Predecrement instance before compare
93	to zero.
94	(do_oper_delete): Likewise.
95
962022-08-10  Andreas Schwab  <[email protected]>
97
98	* readelf.c (print_attributes): Also handle SHT_RISCV_ATTRIBUTES.
99
1002022-08-09  Andreas Schwab  <[email protected]>
101
102	* elflint.c (check_program_header): Don't complain about p_filesz
103	> p_memsz if p_memsz is zero and p_type is PT_RISCV_ATTRIBUTES.
104
1052022-08-01  Mark Wielaard  <[email protected]>
106
107	* readelf.c (handle_dynamic): Pass start of buffer to memrchr.
108	Use dyn->d_un.d_val for offsets instead of d_ptr.
109
1102022-04-28  Di Chen  <[email protected]>
111
112	* readelf.c (options): Add use-dynamic 'D'.
113	(use_dynamic_segment): New static bool.
114	(enum dyn_idx): New.
115	(get_dynscn_strtab): New function.
116	(get_dynscn_addrs): Likewise.
117	(find_offsets): Likewise.
118	(parse_opt): Handle 'D'.
119	(handle_dynamic): New argument phdr. Get data either through the shdr
120	or phdr.  Print segment info when use_dynamic_segment. Use
121	get_dynscn_strtab. Get library name and paths through strtab_data.
122
1232022-05-09  Mark Wielaard  <[email protected]>
124
125	* strip.c (remove_debug_relocations): Check gelf_getshdr, gelf_getrela,
126	gelf_getrel and gelf_getsymshndx don't return NULL.
127
1282022-05-10  Mark Wielaard  <[email protected]>
129
130	* elfcompress.c (process_file): Sanity check shstrtab_name,
131	shstrtab_newname and symstrents are only set once.
132
1332022-04-24  Mark Wielaard  <[email protected]>
134
135	* elfclassify.c (main): Use classify_flag_no_stdin for no-std in options.
136
1372022-04-19  Mark Wielaard  <[email protected]>
138
139	* readelf.c (get_dyn_ents): Define dyn_mem outside the while loop.
140
1412022-03-01  Di Chen  <[email protected]>
142
143	* readelf.c (get_dyn_ents): New function.
144	(handle_dynamic): Use get_dyn_ents to get the actual number of
145	Dynamic entries in the section.
146
1472022-03-27  Mark Wielaard  <[email protected]>
148
149	* addr2line.c: Replace error (EXIT_FAILURE, ...) with error_exit(...).
150	* ar.c: Likewise.
151	* arlib.c: Likewise.
152	* elfcompress.c: Likewise.
153	* nm.c: Likewise.
154	* objdump.c: Likewise.
155	* readelf.c: Likewise.
156	* size.c: Likewise.
157	* strings.c: Likewise.
158	* strip.c: Likewise.
159	* unstrip.c: Likewise.
160
1612022-03-24  Mark Wielaard  <[email protected]>
162
163	* elflint.c (check_note_data): Recognize NT_FDO_PACKAGING_METADATA.
164
1652022-03-11  Mark Wielaard  <[email protected]>
166
167	* addr2line.c (OPT_RELATIVE): New constant.
168	(options): Add --relative.
169	(use_comp_dir): Initialize to true.
170	(parse_opt): Handle OPT_RELATIVE.
171
1722021-12-04  Mark Wielaard  <[email protected]>
173
174	* readelf.c (print_ehdr): Pass sizeof (buf) - 1 to strncpy.
175
1762021-10-20  John M Mellor-Crummey  <[email protected]>
177
178	* readelf.c (print_debug_line_section): Try to read
179	debug_str_offset if available.  Handle DW_LNE_NVIDIA_inlined_call
180	and DW_LNE_NVIDIA_set_function_name.
181
1822021-10-06  Mark Wielaard  <[email protected]>
183
184	* elflint.c (check_sections): Don't dereference databits if bad.
185
1862021-09-09  Dmitry V. Levin  <[email protected]>
187
188	* findtextrel.c: Include "libeu.h".
189	(open_rootdir_file): New function.
190	(process_file): Use it to open file inside rootdir.
191	* Makefile.am (findtextrel_no_Wstack_usage): Remove.
192
1932021-09-06  Dmitry V. Levin  <[email protected]>
194
195	* objdump.c (show_disasm): Replace asprintf followed by
196	error(EXIT_FAILURE) with xasprintf.
197	* readelf.c (handle_gnu_hash): Likewise.
198	* unstrip.c (handle_output_dir_module, main): Likewise.
199
200	* elflint.c (check_sections): Remove cast of xcalloc return value.
201	* findtextrel.c (process_file): Remove casts of malloc and realloc
202	return values.
203	* nm.c (get_local_names, show_symbols_sysv, show_symbols): Remove
204	casts of xmalloc return values.
205	* readelf.c (print_hash_info, handle_sysv_hash, handle_sysv_hash64,
206	handle_gnu_hash): Remove cast of xcalloc return value.
207	(print_debug_units): Remove casts of xmalloc return values.
208	* strip.c (handle_elf): Remove casts of xcalloc and xmalloc return
209	values.
210
2112021-09-05  Dmitry V. Levin  <[email protected]>
212
213	* Makefile.am (AM_LDFLAGS): Add $(STACK_USAGE_NO_ERROR).
214
2152021-08-20  Saleem Abdulrasool  <[email protected]>
216
217	* elfclassify.c: Remove error.h include.
218
2192021-03-18  Timm Bäder  <[email protected]>
220
221	* readelf.c (run_advance_pc): New static inline function
222	lifted from...
223	(print_debug_line_section): ... here. Define advance_pc
224	using run_advance_pc.
225
2262021-07-03  Mark Wielaard  <[email protected]>
227
228	* readelf.c (compare_listptr): Fix dwarf_attr_name argument.
229
2302021-06-18  Mark Wielaard  <[email protected]>
231
232	* unstrip.c (adjust_relocs): Check gelf_getrel and geld_getrela.
233
2342021-06-18  Mark Wielaard  <[email protected]>
235
236	* strip.c (remove_debug_relocations): Check gelf_update results.
237	(update_section_size): Likewise.
238
2392021-06-06  Sergei Trofimovich  <[email protected]>
240
241	* elflint.c (buffer_left): Mark as 'static' to avoid external linkage
242	failure.
243
2442021-05-12  Dmitry V. Levin  <[email protected]>
245
246	* elfcompress.c (process_file): Return 1 instead of -1 in case of an
247	error.
248
249	* elfcompress.c (process_file): Remove redundant assignment in case of
250	"Nothing to do".
251
252	* elfcompress.c (process_file): Set res to 0 in case of "Nothing to do".
253
2542021-04-19  Martin Liska  <[email protected]>
255
256	* elfclassify.c (run_classify): Use startswith.
257	* elfcompress.c (process_file): Likewise.
258	* nm.c (show_symbols_sysv): Likewise.
259	* readelf.c (print_debug): Likewise.
260	(handle_notes_data): Likewise.
261	(dump_data_section): Likewise.
262	(print_string_section): Likewise.
263	* strip.c (remove_debug_relocations): Likewise.
264
2652021-04-03  Mark Wielaard  <[email protected]>
266
267	* nm.c (show_symbols): close dwfl_fd if dwfl_begin fails.
268
2692021-04-03  Mark Wielaard  <[email protected]>
270
271	* unstrip.c (handle_output_dir_module): Free output_file when done.
272
2732021-04-03  Mark Wielaard  <[email protected]>
274
275	* ar.c (do_oper_insert): Always close newfd.
276
2772021-03-03  Mark Wielaard  <[email protected]>
278
279	* readelf.c (handle_symtab): Sanity check verneed vna_next,
280	vn_next and verdef vd_next offsets.
281
2822021-03-02  Timm Bäder  <[email protected]>
283
284	* elfcompress.c (process_file): Remove cleanup() function and
285	replace it with a cleanup label at the end of the function.
286	Initialize res to -1.
287
2882021-02-17  Timm Bäder  <[email protected]>
289
290	* elfcompress.c (process_file): Move get_sections function...
291	(get_section): ...to top-level static function taking an
292	sections array and shnum.
293
2942021-02-17  Timm Bäder  <[email protected]>
295
296	* elfcompress.c (process_file): Move get_section function...
297	(get_section): ...to top-level static function taking an
298	sections array.
299
3002021-02-17  Timm Bäder  <[email protected]>
301
302	* elfcompress.c (process_file): Move set_section function...
303	(set_section): ...to top-level static function taking a
304	section array.
305
3062021-02-17  Timm Bäder  <[email protected]>
307
308	* unstrip.c (handle_implicit_modules): Inline the next function
309	in three places. This is simply dwfl_getmodules with match_module
310	callback providing mmi.
311
3122021-02-17  Timm Bäder  <[email protected]>
313
314	* unstrip.c (handle_explicit_files): Move warn function...
315	(warn): ...here as top-level static function taking stripped,
316	unstripped files and force flag as extra arguments.
317
3182021-02-17  Timm Bäder  <[email protected]>
319
320	* unstrip.c (copy_elided_sections): Inline find_unalloc_section
321	function into calling location. The sec pointer is set to NULL
322	before the if-else statement and only set when match is found.
323
3242021-02-17  Timm Bäder  <[email protected]>
325
326	* unstrip.c (find_alloc_sections_prelink): Move check_match to...
327	(check_match): Adjusted to return whether there was no match,
328	which indicates a failure. So callers are adjusted to or the
329	result into a local fail boolean.
330
3312021-02-17  Timm Bäder  <[email protected]>
332
333	* unstrip.c (adjust_relocs): Move adjust_reloc function to...
334	(adjust_reloc): ... here as static top-level function taking
335	a map array and size as extra arguments.
336
3372021-02-17  Timm Bäder  <[email protected]>
338
339	* elflint.c (check_attributes): Rename and move left function...
340	(buffer_left): ...as static toplevel function taking both an
341	Elf_Data pointer argument and the unsigned char pointer p.
342
3432021-02-17  Timm Bäder  <[email protected]>
344
345	* elflint.c (check_attributes): Rename and move pos function...
346	(buffer_pos): ...as static toplevel function taking an extra
347	Elf_Data pointer argument.
348
3492021-02-12  Mark Wielaard  <[email protected]>
350
351	* readelf.c (print_debug_units): Type DIE offset is from start CU.
352
3532021-02-12  Mark Wielaard  <[email protected]>
354
355	* readelf.c (attr_callback): Don't handle blocks as expression
356	blocks for DWARF version 4 or higher.
357
3582021-02-03 Timm Bäder <[email protected]>
359
360	* ar.c (do_oper_extract): Extract should_truncate_fname function
361	to...
362	(should_truncate_fname): ...here. New file scope function taking
363	size_t pointer to be read and/or set.
364
3652021-02-02 Timm Bäder <[email protected]>
366
367	* readelf.c (print_debug_line_section): Remove unnecessary
368	show_op_index variable, replace with (op_index > 0).
369
3702021-01-08  Timm Bäder  <[email protected]>
371
372	* readelf.c (print_cfa_program): Lift regname function to...
373	(regname): ...here. New file scope function add ebl and regnamebuf
374	as arguments.
375
3762021-01-08  Timm Bäder  <[email protected]>
377
378	* readelf.c (print_attributes): Lift left function to...
379	(left): ...here. New file scope function taking Elf_Data and char
380	pointers.
381
3822021-01-08  Timm Bäder  <[email protected]>
383
384	* readelf.c (handle_core_registers): Lift same_set function to...
385	(same_set): ...here. New file scope function adding regs and
386	maxnreg arguments.
387
3882021-01-08  Timm Bäder  <[email protected]>
389
390	* readelf.c (parse_opt): Lift add_dump_section function to...
391	(add_dump_section): ...here. New top level function. Added key
392	argument.
393
3942021-01-08  Timm Bäder  <[email protected]>
395
396	* arlib-argp.c (help_filter): Lift text_for_default function to...
397	(text_for_default): ... here. New file scope function taking text
398	as argument.
399
4002021-01-08  Timm Bäder  <[email protected]>
401
402	* addr2line.c (handle_address): Move show_note and show_int up to
403	file scope.
404	(show_note: New static inline function.
405	(show_int): Likewise.
406
4072021-01-08  Timm Bäder  <[email protected]>
408
409	* strip.c (handle_elf): Remove no_symtab_updates function and
410	calls inside the switch statement. Add checks and (possibly)
411	continue, before switch statement is called.
412
4132021-01-08  Timm Bäder  <[email protected]>
414
415	* strip.c (handle_elf): Move inlined update_section_size function
416	to...
417	(update_section_size): ...here. New static function that takes as
418	extra arguments the Elf_Scn, debug_elf, section cnt and fname.
419
4202021-01-08  Timm Bäder  <[email protected]>
421
422	* strip.c (remove_debug_relocations): Rewrite inlined relocate
423	function to file static. Do R_*_NONE, reloc_simple_type and
424	ebl_debug_scn_p checks before calling new relocate function.
425	(relocate): New file static function from
426	remove_debug_relocate. Remove R_*_NONE, reloc_simple_type and
427	ebl_debugscn_p checks.
428
4292021-01-08  Timm Bäder  <[email protected]>
430
431	* strip.c (handle_elf): Expand inlined function check_preserved.
432
4332021-01-12  Mark Wielaard  <[email protected]>
434
435	* elflint.c (EXTRA_SHFLAGS): New define.
436	(check_sections): Use EXTRA_SHFLAGS. Add SHF_GNU_RETAIN to
437	ALL_SH_FLAGS.
438
4392020-12-31  Sergei Trofimovich  <[email protected]>
440
441	* elflint.c (section_flags_string): Add NEWFLAG for GNU_RETAIN,
442	ORDERED and EXCLUDE.
443
4442020-12-31  Sergei Trofimovich  <[email protected]>
445
446	* elflint.c (section_flags_string): Update cp pointer after
447	snprintf for unknown flags.
448
4492020-12-16  Érico Nogueira  <[email protected]>
450
451	* readelf.c (qsort_r): Use qsort for improved portability.
452
4532020-12-20  Dmitry V. Levin  <[email protected]>
454
455	* .gitignore: New file.
456
4572020-12-12  Mark Wielaard  <[email protected]>
458
459	* elflint.c (check_sections): Handle SHF_GNU_RETAIN.
460	* readelf.c (print_shdr): Likewise.
461
4622020-12-16  Dmitry V. Levin  <[email protected]>
463
464	* *.c: Replace gettext(...) with _(...).
465
466	* unstrip.c (_): Remove.
467
4682020-12-15  Mark Wielaard  <[email protected]>
469
470	* elflint.c (check_symtab): Always print symbol name (if known)
471	in error messages.
472
4732020-12-12  Dmitry V. Levin  <[email protected]>
474
475	* ar.c (write_member, do_oper_insert): Fix spelling typo in comment.
476	* elfclassify.c (issue, elf_issue, is_unstripped): Likewise.
477	* elfcompress.c (process_file): Likewise.
478	* elflint.c (be_quiet, check_gnu_hash): Likewise.
479	* readelf.c (print_phdr, handle_gnu_hash,
480	dwarf_locexpr_opcode_string): Likewise.
481	* size.c (totals_class): Likewise.
482	* strings.c (read_elf): Likewise.
483	* strip.c (handle_elf): Likewise.
484
485	* readelf.c (print_debug_addr_section): Fix spelling typo in error
486	diagnostics.
487	* strip.c (options): Fix spelling typos in argp help text.
488	* strings.c (options): Likewise.
489	* stack.c (options): Likewise.
490
4912020-11-01  Érico N. Rolim  <[email protected]>
492
493	* unstrip.c (make_directories): Use ACCESSPERMS for mkdir.
494	(handle_file): Use DEFFILEMODE for open with O_CREAT for ET_REL
495	files, ACCESSPERMS otherwise.
496
4972020-11-01  Érico N. Rolim  <[email protected]>
498
499	* Makefile.am (nm_LDADD): Add obstack_LIBS.
500	(ranlib_LDADD): Likewise.
501	(ar_LDADD): Likewise.
502
5032020-10-27  Érico N. Rolim  <[email protected]>
504
505	* unstrip.c (make_directories): Use strndup, not strndupa.
506
5072020-09-28  Mark Wielaard  <[email protected]>
508
509	* readelf.c (next_listptr_offset): Take idx as pointer, to be updated
510	and use new Dwarf_Off as offset to match.
511	(listptr_attr): New function.
512	(print_debug_loclists_section): Check for DW_AT_GNU_locviews to show
513	view pairs.
514	(print_debug_loc_section): Adjust next_listptr_offset call.
515
5162020-09-03  Mark Wielaard  <[email protected]>
517
518	* readelf.c (print_cfa_program): Take ehdr as argument. Use it to
519	recognize DW_CFA_AARCH64_negate_ra_state.
520	(print_debug_frame_section): Pass ehdr to print_cfa_program.
521	(print_debug): Don't warn if we dump frames, but cannot get dbg.
522
5232020-09-01  Mark Wielaard  <[email protected]>
524
525	* readelf.c (print_debug_ranges_section): Base address entry can
526	be first.
527	(print_debug_loc_section): Likewise.
528
5292020-09-04  Mark Wielaard  <[email protected]>
530
531	* elflint.c (special_sections): Add .debug_line_str.
532
5332020-08-26  Mark Wielaard  <[email protected]>
534
535	* readelf.c (print_debug_line_section): It is not an error if there
536	are no line number statements at the end of a debug line section.
537
5382020-07-19  Mark Wielaard  <[email protected]>
539
540	* elfclassify.c (process_current_path): Handle fwrite failing.
541
5422020-07-05  Mark Wielaard  <[email protected]>
543
544	* stack.c (module_callback): Don't assert if dwfl_module_info fails.
545	* unstrip.c (adjust_relocs): Produce a proper error when HAS
546	section has inconsistent size or entsize.
547	(match_module): Don't assert if dwfl_module_info fails.
548
5492020-06-16  Mark Wielaard  <[email protected]>
550
551	* ar.c (do_oper_extract): Split large if statement. Call fchown
552	before fchmod and explicitly ignore the return value.
553	(do_oper_delete): Likewise.
554	(do_oper_insert): Likewise.
555	* ranlib.c (handle_file): Likewise.
556
5572020-06-16  Mark Wielaard  <[email protected]>
558
559	* elflint.c (check_elf_header): Explicitly check and ignore
560	any error from elf_compress.
561
5622020-06-07  Mark Wielaard  <[email protected]>
563
564	* nm.c (sort_by_name_strtab): Replace by...
565	(sort_by_name_elf): New static Elf pointer and ...
566	(sort_by_name_ndx): New static size_t index.
567	(sort_by_name): Use elf_strptr to get symbol string.
568	(show_symbols): Set sort_by_name_elf and sort_by_name_ndx.
569
5702020-06-06  Mark Wielaard  <[email protected]>
571
572	* nm.c (show_symbols_sysv): Skip no name and STT_FILE symbols.
573	When not printing address and size pad strings. Strip "GNU_"
574	prefix from binding name.
575	(class_type_char): Use 'V' for weak symbols, 'C' for common
576	symbols and 'T' for weak functions.
577	(show_symbols_posix): Skip STT_FILE symbols. Don't print value and
578	size when undefined.
579
5802020-06-04  Mark Wielaard  <[email protected]>
581
582	* elflint.c (check_program_header): Remove PT_GNU_PROPERTY define.
583
5842020-05-14  Mark Wielaard  <[email protected]>
585
586	* size.c (show_bsd): Set printf format based on radix.
587
5882020-05-09  Mark Wielaard  <[email protected]>
589
590	* elflint.c (process_elf_file): Error out if ebl_openbackend fails.
591	* objdump.c (handle_elf): Likewise.
592	* nm.c (handle_elf): Likewise. Move full name string construction
593	forward, so it can be used in the error message.
594
5952020-04-17  Mark Wielaard  <[email protected]>
596
597	* readelf.c (print_debug): Check .gnu.debuglto_ prefix.
598
5992020-04-16  Mark Wielaard  <[email protected]>
600
601	* elflint.c (check_sections): Mask out SHF_EXCLUDE from processor
602	specific section flags when --gnu is given.
603
6042020-02-08  Mark Wielaard  <[email protected]>
605
606	* elflint.c (check_program_header): Handle PT_GNU_PROPERTY.
607
6082020-02-07  Mark Wielaard  <[email protected]>
609
610	* elflint.c (check_symtab): Check st_info isn't too big.
611
6122020-01-16  Mark Wielaard  <[email protected]>
613
614	* nm.c (show_symbols_sysv): Iterate over all symbols starting
615	at index zero.
616
6172019-11-26  Mark Wielaard  <[email protected]>
618
619	* Makefile.am (BUILD_STATIC): Add libraries needed for libdw.
620
6212019-10-26  Mark Wielaard  <[email protected]>
622
623	* unstrip.c (collect_symbols): Check symbol strings are
624	terminated.
625
6262019-10-18  Mark Wielaard  <[email protected]>
627
628	* unstrip.c (adjust_relocs): Set versym data d_size to the actual
629	size allocated.
630
6312019-10-20  Mark Wielaard  <[email protected]>
632
633	* unstrip.c (copy_elided_sections): Set and check max_off.
634
6352019-10-21  Mark Wielaard  <[email protected]>
636
637	* unstrip.c (adjust_relocs): Add map_size argument and check ndx
638	against it.
639	(adjust_all_relocs): Add map_size argument and pass it to
640	adjust_relocs.
641	(add_new_section_symbols): Call adjust_all_relocs with symndx_map
642	size.
643	(collect)symbols): Check sym and string data can be found.
644	(compare_symbols_output): Call error when (different) symbols are
645	equal.
646	(new_shstrtab): Make unstripped_strent array one larger. Check
647	stripped_shnum isn't zero.
648	(copy_elided_sections): Add ndx_sec_num as size of ndx_section
649	array. Check sh_link and sh_info are not larger than ndx_sec_num.
650	Allocate symbols and symndx_map arrays on heap, not stack. Pass
651	map sizes to adjust_all_relocs.
652
6532019-09-28  Dmitry V. Levin  <[email protected]>
654
655	* elflint.c (main): When an input file cannot be opened,
656	include its name into the error diagnostics.
657	* readelf.c (main): Likewise.
658
6592019-09-02  Mark Wielaard  <[email protected]>
660
661	* readelf.c (PRINT_DYNSYM_TABLE): New argp key value.
662	(argp_opt): Add syn-sym.
663	(print_dynsym_table): New static bool.
664	(parse_opt): Handle PRINT_DYNSYM_TABLE.
665	(process_elf_file): Check print_dynsym_table.
666
6672019-08-27  Mark Wielaard  <[email protected]>
668
669	* readelf.c (for_each_section_argument): Call (*dump) also for
670	section numbers.
671
6722019-08-26  Mark Wielaard  <[email protected]>
673
674	* nm.c (show_symbols): Remember nentries_orig and check before
675	freeing sym_mem.
676
6772019-07-05  Omar Sandoval  <[email protected]>
678
679	* Makefile.am: Remove -ldl.
680	(elflint_LDADD): Add $(libdw).
681	(elfcmp_LDADD): Add $(libdw).
682	(objdump_LDADD): Add $(libdw).
683
6842019-08-26  Mark Wielaard  <[email protected]>
685
686	* readelf (options): Add OPTION_ARG_OPTIONAL "SECTION" for notes.
687	(notes_section): New global variable.
688	(parse_opt): Set notes_section.
689	(handle_notes): Check if notes_section is set.
690
6912019-07-26  Florian Weimer  <[email protected]>
692	    Mark Wielaard  <[email protected]>
693
694	* Makefile.am (bin_PROGRAMS): Add elfclassify.
695	(elfclassify_LDADD): New variable.
696	* elfclassify.c: New tool.
697
6982019-07-13  Mao Han  <[email protected]>
699
700	* elflint.c: Add C-SKY.
701
7022019-06-28  Mark Wielaard  <[email protected]>
703
704	* readelf.c (print_ehdr): Use dwelf_elf_e_machine_string instead of
705	ebl->name. If unknown print hex value.
706
7072019-06-25  Mark Wielaard  <[email protected]>
708
709	* stack.c (parse_opt): Fix dwfl_core_file_attach error message.
710
7112019-06-18  Mark Wielaard  <[email protected]>
712
713	* strip.c (handle_elf): Use elf_begin ELF_C_WRITE, instead of
714	ELF_C_WRITE_MMAP.
715
7162019-05-10  Mark Wielaard  <[email protected]>
717
718	* readelf.c (struct attrcb_args): Rename die to dies.
719	(attr_callback): Get current current die using dies[level].
720	Handle DW_AT_discr_list as block, not as constant.
721	(print_debug_units): pass dies, not dies[level] as args.
722
7232019-05-09  Mark Wielaard  <[email protected]>
724
725	* readelf.c (cleanup_list): New function.
726	(main): Call cleanup_list for dump_data_sections and string_sections.
727
7282019-04-28  Mark Wielaard  <[email protected]>
729
730	* unstrip.c (add_new_section_symbols): Call ELF_CHECK after
731	gelf_getsymshndx.
732	(new_shstrtab): Call ELF_CHECK after gelf_getshdr.
733
7342019-04-28  Mark Wielaard  <[email protected]>
735
736	* size.c (show_sysv): Call INTERNAL_ERROR if gelf_getshdr
737	returns NULL.
738	(show_sysv_one_line): Call error with EXIT_FAILURE if
739	gelf_getshdr returns NULL.
740
7412019-04-28  Mark Wielaard  <[email protected]>
742
743	* nm.c (show_symbols_sysv): Check gelf_getshdr doesn't return
744	NULL. Simplify naming of invalid sections, don't use alloca.
745
7462019-04-28  Mark Wielaard  <[email protected]>
747
748	* elfcmp.c (main): Check shdr1 and shdr2 are not NULL.
749
7502019-04-03  Mark Wielaard  <[email protected]>
751
752	* readelf.c (attr_callback): Print DW_AT_data_member_location as
753	decimal offset, not hex number.
754
7552019-03-29  Mark Wielaard  <[email protected]>
756
757	* readelf.c (print_debug_macinfo_section): Check cus[0] is not the
758	sentinel.
759
7602019-03-27  Mark Wielaard  <[email protected]>
761
762	* strip.c (handle_elf): Assert that symbol section number exists.
763
7642019-01-24  Mark Wielaard  <[email protected]>
765
766	* strip.c (handle_elf): Fix check test for SHN_XINDEX symbol.
767
7682019-01-22  Mark Wielaard  <[email protected]>
769
770	* readelf.c (print_debug_line_section): Check we are not at end of
771	line data when reading parameters for unknown opcodes.
772
7732019-01-20  Mark Wielaard  <[email protected]>
774
775	* readelf.c (print_debug_line_section): Check terminating NUL byte
776	for dir and file tables.
777
7782019-01-16  Mark Wielaard  <[email protected]>
779
780	* readelf (handle_core_note): Pass desc to ebl_core_note.
781
7822018-11-10  Mark Wielaard  <[email protected]>
783
784	* elflint.c (check_program_header): Allow PT_GNU_EH_FRAME segment
785	to be matched against SHT_X86_64_UNWIND section.
786
7872018-11-09  Mark Wielaard  <[email protected]>
788
789	* strip.c (remove_debug_relocations): Check if section is gnu
790	compressed and decompress and recompress it.
791
7922018-11-12  Mark Wielaard  <[email protected]>
793
794	* elflint.c (check_note_data): Recognize NT_GNU_BUILD_ATTRIBUTE_OPEN
795	and NT_GNU_BUILD_ATTRIBUTE_OPEN.
796	* readelf.c (handle_notes_data): Handle
797	ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX. Pass nhdr.n_namesz to
798	ebl_object_note.
799
8002018-11-11  Mark Wielaard  <[email protected]>
801
802	* readelf.c (handle_notes_data): Pass n_descsz to
803	ebl_object_note_type_name.
804	* elflint.c (check_note_data): Recognize NT_VERSION, add owner
805	name to unknown note error.
806
8072018-10-20  Mark Wielaard  <[email protected]>
808
809	* readelf.c (process_elf_file): Use dwelf_elf_begin to open pure_elf.
810
8112018-10-26  Mark Wielaard  <[email protected]>
812
813	* strip.c (OPT_RELOC_DEBUG_ONLY): New define.
814	(options): Add reloc-debug-sections-only.
815	(reloc_debug_only): New static bool.
816	(main): Check reloc_debug_only is the only strip option used.
817	(parse_opt): Handle OPT_RELOC_DEBUG_ONLY.
818	(handle_debug_relocs): New function.
819	(handle_elf): Add local variables lastsec_offset and lastsec_size.
820	Handle reloc_debug_only.
821
8222018-10-24  Mark Wielaard  <[email protected]>
823
824	* strip.c (handle_elf): Extract code to update shdrstrndx into...
825	(update_shdrstrndx): ... this new function.
826
8272018-10-24  Mark Wielaard  <[email protected]>
828
829	* strip.c (handle_elf): Extract code into separate functions...
830	(secndx_name): ... new function.
831	(get_xndxdata): Likewise.
832	(remove_debug_relocations): Likewise.
833
8342018-10-24  Mark Wielaard  <[email protected]>
835
836	* strip.c (handle_elf): Always copy over phdrs if there are any
837	and check phnum instead of e_type to determine whether to move
838	allocated sections.
839
8402018-11-02  Mark Wielaard  <[email protected]>
841
842	* unstrip.c (copy_elf): Add ELF_CHECK to make sure gelf_getehdr ()
843	doesn't return NULL.
844
8452018-10-18  Mark Wielaard  <[email protected]>
846
847	* elflint.c (check_note_data): Recognize NT_GNU_PROPERTY_TYPE_0.
848	(check_note): Use p_align to pass either ELF_T_NHDR or ELF_T_NHDR8 to
849	elf_getdata_rawchunk.
850	* readelf (handle_notes): Likewise.
851
8522018-10-24  Mark Wielaard  <[email protected]>
853
854	* addr2line.c (print_addrsym): Use elf_getshdrstrndx instead of
855	Ehdr field.
856
8572018-10-24  Mark Wielaard  <[email protected]>
858
859	* readelf.c (section_name): Remove ehdr argument, lookup shstrndx.
860	(print_debug_abbrev_section): Don't pass ehdr.
861	(print_debug_addr_section): Likewise.
862	(print_decoded_aranges_section): Likewise.
863	(print_debug_aranges_section): Likewise.
864	(print_debug_rnglists_section): Likewise.
865	(print_debug_ranges_section): Likewise.
866	(print_debug_units): Likewise.
867	(print_decoded_line_section): Likewise.
868	(print_debug_line_section): Likewise.
869	(print_debug_loclists_section): Likewise.
870	(print_debug_loc_section): Likewise.
871	(print_debug_macinfo_section): Likewise.
872	(print_debug_macro_section): Likewise.
873	(print_debug_pubnames_section): Likewise.
874	(print_debug_str_section): Liekwise.
875	(print_debug_str_offsets_section): Likewise.
876	(print_gdb_index_section): Likewise.
877
8782018-10-16  Mark Wielaard  <[email protected]>
879
880	* readelf.c (print_debug_frame_section): Make sure readp is never
881	greater than cieend.
882
8832018-10-19  Mark Wielaard  <[email protected]>
884
885	* dwfl_module_getdwarf.c (adjust_relocs): Check sh_entsize is not
886	zero.
887	(add_new_section_symbols): Likewise.
888	(copy_elided_sections): Likewise.
889
8902018-10-18  Mark Wielaard  <[email protected]>
891
892	* size.c (handle_ar): Only close elf if prefix was NULL.
893
8942018-10-18  Mark Wielaard  <[email protected]>
895
896	* arlib.c (arlib_add_symbols): Check that sh_entsize is not zero.
897
8982018-10-14  Mark Wielaard  <[email protected]>
899
900	* ar.c (do_oper_extract): Assume epoch if ar_date is bogus.
901
9022018-10-14  Mark Wielaard  <[email protected]>
903
904	* findtextrel.c (process_file): Check that sh_entsize is not zero.
905
9062018-10-13  Mark Wielaard  <[email protected]>
907
908	* readelf.c (print_debug_macro_section): Use elf_getdata. Print
909	decoded flag string.
910
9112018-10-19  Mark Wielaard  <[email protected]>
912
913	* unstrip.c (copy_elided_sections): Renumber group section indexes.
914
9152018-10-12  Mark Wielaard  <[email protected]>
916
917	* strip.c (handle_elf): Don't remove SHF_GROUP flag from sections.
918	Skip group section flag when renumbering section indexes.
919	* unstrip.c (struct section): Add sig field.
920	(compare_unalloc_sections): Take and use sig1 and sig2 as arguments.
921	(compare_sections): Pass signatures to compare_unalloc_sections.
922	(get_group_sig): New function.
923	(find_alloc_sections_prelink): Set signature.
924	(copy_elided_sections): Likewise and pass them on.
925	(find_unalloc_section): Take and pass signatures.
926
9272018-10-02  Andreas Schwab  <[email protected]>
928
929	* strip.c (handle_elf): Handle ADD/SUB relocation.
930
9312018-09-13  Mark Wielaard  <[email protected]>
932
933	* readelf.c (print_shdr): Get number of section with elf_getshdrnum.
934	(print_phdr): Likewise.
935
9362018-09-13  Mark Wielaard  <[email protected]>
937
938	* strip.c (handle_elf): Check against shstrndx, not e_shstrndx.
939	Explicitly set shdrstrndx for debug file.
940	* unstrip.c (copy_elf): Explicitly copy shstrndx.
941	(find_alloc_sections_prelink): Document shnum usage.
942
9432018-09-13  Mark Wielaard  <[email protected]>
944
945	* elflint.c (check_elf_header): Use shnum instead of e_shnum for all
946	checks.
947	(check_symtab): Use shstrndx instead of e_shstrndx to get section
948	names.
949
9502018-09-13  Mark Wielaard  <[email protected]>
951
952	* elfcmp.c (main): Get, check and shdrstrndx for section names.
953
9542018-09-12  Mark Wielaard  <[email protected]>
955
956	* elfcmp.c (main): Call ebl_section_strip_p without ehdr.
957	* strip.c (handle_elf): Likewise.
958
9592018-09-12  Mark Wielaard  <[email protected]>
960
961	* elflint.c (check_symtab): Call ebl_check_special_symbol without
962	ehdr.
963
9642018-07-30  Mark Wielaard  <[email protected]>
965
966	* strip.c (handle_elf): Track allocated/unallocated sections seen. Set
967	section offset of unallocated sections after handling all allocated
968	sections.
969
9702018-08-18  Mark Wielaard  <[email protected]>
971
972	* readelf.c (print_debug_aranges_section): Make sure there is enough
973	data to read the header segment size.
974
9752018-08-18  Mark Wielaard  <[email protected]>
976
977	* elflint.c (check_sysv_hash): Calculate needed size using unsigned
978	long long int to prevent overflow.
979	(check_sysv_hash64): Calculate maxwords used separately before
980	comparison to prevent overflow.
981
9822018-07-24  Mark Wielaard  <[email protected]>
983
984	* unstrip.c (compare_unalloc_sections): Also compare sh_size.
985
9862018-07-21  Mark Wielaard  <[email protected]>
987
988	* unstrip.c (adjust_all_relocs): Skip SHT_GROUP sections.
989
9902018-07-21  Mark Wielaard  <[email protected]>
991
992	* elfcompress.c (get_sections): New function.
993	(process_file): Check whether section needs to change. Don't rewrite
994	file if no section data needs changing.
995	(main): Update 'force' help text.
996
9972018-07-21  Mark Wielaard  <[email protected]>
998
999	* elfcompress.c (process_file): Swap fchmod and fchown calls.
1000
10012018-07-04  Mark Wielaard  <[email protected]>
1002
1003	* readelf.c (print_debug_addr_section): Rename index var to uidx.
1004	(attr_callback): Rename index var to word.
1005	(print_debug_str_offsets_section): Rename index var to uidx.
1006
10072018-07-04  Ross Burton <[email protected]>
1008
1009	* addr2line.c: Remove error.h include.
1010	* ar.c: Likewise.
1011	* arlib.c: Likewise and add system.h include.
1012	* arlib2.c: Likewise.
1013	* elfcmp.c: Likewise.
1014	* elfcompress.c: Likewise.
1015	* elflint.c: Likewise.
1016	* findtextrel.c: Likewise.
1017	* nm.c: Likewise.
1018	* objdump.c: Likewise.
1019	* ranlib.c: Likewise.
1020	* readelf.c: Likewise.
1021	* stack.c: Likewise.
1022	* strings.c: Likewise.
1023	* strip.c: Likewise.
1024	* unstrip.c: Likewise.
1025
10262018-06-25  Mark Wielaard  <[email protected]>
1027
1028	* readelf.c (print_decoded_line_section): Use dwarf_next_lines
1029	instead of dwarf_nextcu.
1030	(print_debug_line_section): Don't explicitly lookup CU.
1031
10322018-06-15  Mark Wielaard  <[email protected]>
1033
1034	* readelf.c (attr_callback): Only print block as expressions if it
1035	isn't DW_FORM_data16.
1036
10372018-06-12  Mark Wielaard  <[email protected]>
1038
1039	* readelf.c (print_form_data): Check we have 4, not 2, bytes
1040	available for DW_FORM_block4.
1041
10422018-06-12  Mark Wielaard  <[email protected]>
1043
1044	* readelf.c (print_form_data): Don't increase strreadp after use.
1045	Do increase readp for DW_FORM_strx[1234].
1046
10472018-06-16  Mark Wielaard  <[email protected]>
1048
1049	* readelf.c (print_debug_loc_section): Make sure next_off doesn't
1050	overflow d_buf.
1051
10522018-06-13  Mark Wielaard  <[email protected]>
1053
1054	* readelf.c (die_type_sign_bytes): New function.
1055	(attr_callback): Recognized DW_FORM_implicit_cost as signed. Use
1056	die_type_sign_bytes to lookup the signedness and size of const
1057	values.
1058
10592018-06-11  Mark Wielaard  <[email protected]>
1060
1061	* readelf.c (print_form_data): Don't reuse readp and readendp when
1062	reading str_offsets section.
1063
10642018-06-10  Mark Wielaard  <[email protected]>
1065
1066	* readelf.c (print_form_data): Don't cast value to ptrdiff_t, cast
1067	ptrdiff_t to size_t.
1068
10692018-06-08  Mark Wielaard  <[email protected]>
1070
1071	* readelf.c (print_debug_rnglists_section): Calculate max_entries
1072	instead of needed bytes to prevent overflowing. Always print
1073	max_entries (but not more).
1074	(print_debug_loclists_section): Likewise.
1075
10762018-06-08  Mark Wielaard  <[email protected]>
1077
1078	* readelf.c (print_debug_line_section): Stop printing directories
1079	and files when we are at the end of the unit data.
1080
10812018-06-07  Mark Wielaard  <[email protected]>
1082
1083	* readelf.c (format_result): Removed.
1084	(format_result_size): Removed.
1085	(format_dwarf_addr): Renamed to...
1086	(print_dwarf_addr): ...this. Simply call printf, don't setup buffer,
1087	don't call sprintf.
1088	(print_ops): Use print_dwarf_addr instead of format_dwarf_addr.
1089	(print_debug_addr_section): Likewise.
1090	(print_debug_aranges_section): Likewise.
1091	(print_debug_rnglists_section): Likewise.
1092	(print_debug_ranges_section): Likewise.
1093	(print_debug_frame_section): Likewise.
1094	(attr_callback): Likewise.
1095	(print_decoded_line_section): Likewise.
1096	(print_debug_line_section): Likewise.
1097	(print_debug_loclists_section): Likewise.
1098	(print_debug_loc_section): Likewise.
1099	(print_gdb_index_section): Likewsie.
1100
11012018-06-05  Mark Wielaard  <[email protected]>
1102
1103	* readelf.c (print_debug_addr_section): Set unit_length always to
1104	(next_unitp - readp) in case we don't have a real header.
1105
11062018-06-05  Mark Wielaard  <[email protected]>
1107
1108	* readelf.c (print_debug_loc_section): Set begin to idx when failing
1109	to read the start address if DW_LLE_GNU_start_end_entry.
1110
11112018-06-05  Mark Wielaard  <[email protected]>
1112
1113	* readelf.c (handle_sysv_hash): Don't leak lengths array when
1114	detecting an invalid chain.
1115	(handle_sysv_hash64): Likewise.
1116
11172018-06-05  Mark Wielaard  <[email protected]>
1118
1119	* readelf.c (print_debug_macro_section): Extend vendor array by one
1120	to include max DW_MACRO_hi_user opcode.
1121
11222018-06-07  Mark Wielaard  <[email protected]>
1123
1124	* readelf.c (main): Lookup "no" for no_str.
1125	(print_debug_abbrev_section): Use yes_str and no_str.
1126	(print_form_data): Likewise.
1127
11282018-06-04  Mark Wielaard  <[email protected]>
1129
1130	* readelf (format_result): New static char pointer.
1131	(format_result_size): New static size_t.
1132	(format_dwarf_addr): Calculate max string size, reuse format_result
1133	if possible, otherwise realloc. Use sprintf on result, not asprintf.
1134	(print_ops): Don't free format_dwarf_addr, make sure result is
1135	printed before calling format_dwarf_addr again.
1136	(print_debug_addr_section): Likewise.
1137	(print_debug_aranges_section): Likewise.
1138	(print_debug_rnglists_section): Likewise.
1139	(print_debug_ranges_section): Likewise.
1140	(print_debug_frame_section): Likewise.
1141	(attr_callback): Likewise.
1142	(print_decoded_line_section): Likewise.
1143	(print_debug_line_section): Likewise.
1144	(print_debug_loclists_section): Likewise.
1145	(print_debug_loc_section): Likewise.
1146	(print_gdb_index_section): Likewsie.
1147
11482018-06-04  Mark Wielaard  <[email protected]>
1149
1150	* readelf.c (yes_str): New static char pointer.
1151	(no_str): Likewise.
1152	(main): Set yes_str and no_str using gettext.
1153	(attr_callback): Use yes_str and no_str instead of calling gettext.
1154
11552018-06-04  Mark Wielaard  <[email protected]>
1156
1157	* readelf.c (main): Call __fsetlocking (stdout, FSETLOCKING_BYCALLER).
1158
11592018-05-31  Mark Wielaard  <[email protected]>
1160
1161	* readelf.c (print_debug_units): Print the dwo name and id when
1162	unable to find a .dwo file.
1163
11642018-05-31  Mark Wielaard  <[email protected]>
1165
1166	* readelf.c (enum section_e): Make section_types not an alias of
1167	section_info.
1168	(section_all): Add section_types.
1169	(parse_opt): Add both section_info and section_types for "info"
1170	and "info+".
1171	(print_debug_units): Don't be silent for debug_types.
1172
11732018-05-31  Mark Wielaard  <[email protected]>
1174
1175	* readelf.c (attr_callback): Only register section_loc when not
1176	looking at a split dwarf from a skeleton.
1177
11782018-05-30  Mark Wielaard  <[email protected]>
1179
1180	* readelf.c (print_debug_loc_section): Use correct listptr for
1181	locview attribute.
1182
11832018-05-31  Mark Wielaard  <[email protected]>
1184
1185	* readelf.c (print_debug_units): Check offset against -1 not ~0ul.
1186
11872018-05-29  Mark Wielaard  <[email protected]>
1188
1189	* readelf.c (print_debug_loc_section): Handle GNU DebugFission list
1190	entries.
1191
11922018-05-29  Mark Wielaard  <[email protected]>
1193
1194	* readelf.c (print_debug): Record and reset section_info status in
1195	implicit_debug_sections and print_debug_sections.
1196
11972018-05-28  Mark Wielaard  <[email protected]>
1198
1199	* readelf.c (print_debug_units): Turn "Could not find split compile
1200	unit" into an Warning instead of an error.
1201
12022018-04-29  Mark Wielaard  <[email protected]>
1203
1204	* readelf.c (parse_opt): Request implicit section_info for "str".
1205	(known_stroffbases): New static variable.
1206	(attr_callbackattr_callback): Handle DW_AT_str_offets_base.
1207	(print_debug_str_offsets_section): New function.
1208	(print_debug): Handle .debug_str_offsets as section_str. Reset
1209	known_stroffbases.
1210
12112018-04-27  Mark Wielaard  <[email protected]>
1212
1213	* readelf.c (options): Add addr.
1214	(enum section_e): Add section_addr.
1215	(section_all): Add section_addr.
1216	(parse_opt): Parse "addr".
1217	(known_addrbases): New static variable.
1218	(get_listptr): New function.
1219	(print_debug_addr_section): Likewise.
1220	(attr_callback): Handle DW_AT_addr_base and DW_AT_GNU_addr_base.
1221	(print_debug): Add NEW_SECTION (addr). Reset known_addrbases.
1222
12232018-04-07  Mark Wielaard  <[email protected]>
1224
1225	* readelf.c (attr_callback): Handle DW_FORM_loclistx and
1226	DW_AT_segment.
1227
12282018-04-12  Mark Wielaard  <[email protected]>
1229
1230	* readelf.c (dwarf_loc_list_encoding_string): New functions.
1231	(dwarf_loc_list_encoding_name): Likewise.
1232	(known_loclistptr): Renamed and split in two...
1233	(known_locsptr): this and ...
1234	(known_loclistsptr): this.
1235	(listptr_base): Split out...
1236	(cudie_base): ...this.
1237	(is_split_dwarf): New function.
1238	(attr_callback): Handle DW_AT_loclists_base and notice sec_offset
1239	in correct list.
1240	(print_debug_rnglists_section): Use spit_dwarf_cu_base.
1241	(print_debug_loclists_section): New function.
1242	(print_debug_loc_section): Use known_locsptr instead of
1243	known_loclistptr.
1244	(print_debug): Recognize .debug_loclists. Reset known_locsptr and
1245	known_loclistsptr.
1246
12472018-05-25  Mark Wielaard  <[email protected]>
1248
1249	* readelf.c (DWARF_SKELETON): New constant.
1250	(do_not_close_dwfl): New bool.
1251	(options): Add dwarf-skeleton.
1252	(dwarf_skeleton): New static variable.
1253	(parse_opt): Handle DWARF_SKELETON, set dwarf_skeleton.
1254	(create_dwfl): New function, with code extracted from...
1255	(process_file): ...here. Check do_not_close_dwfl.
1256	(is_split_darf): New function.
1257	(getone_dwflmod): Likewise.
1258	(print_debug): Use new functions to find skeleton DWARF file to use
1259	when inspecting .dwo split DWARF file.
1260
12612018-04-11  Mark Wielaard  <[email protected]>
1262
1263	* readelf.c (dwarf_range_list_encoding_string): New function.
1264	(dwarf_range_list_encoding_name): Likewise.
1265	(known_rnglistptr): New static variable.
1266	(listptr_cu): New function.
1267	(print_debug_rnglists_section): Likewise.
1268	(attr_callback): Call notice_listptr for DW_AT_ranges. Handle
1269	DW_AT_rnglists_base. Handle DW_FORM_rnglistx. DW_AT_start_scope
1270	can also have a rnglist.
1271	(print_debug_units): Do (silently) scan split DWARF also for
1272	debug_ranges before DWARF5 to catch all rangelistptrs.
1273	(print_debug): Recognize .debug_rnglists. Reset known_rnglistptr.
1274
12752018-01-21  Mark Wielaard  <[email protected]>
1276
1277	* readelf.c (get_indexed_addr): New function.
1278	(print_ops): Handle DW_OP_addrx, DW_OP_GNU_addr_index,
1279	DW_OP_constx, DW_OP_GNU_const_index separately and resolve
1280	address.
1281	(attr_callback): Print index and address for
1282	DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
1283
12842018-01-19  Mark Wielaard  <[email protected]>
1285
1286	* readelf.c (options): Add info+.
1287	(show_split_units): New static boolean defaulting to false.
1288	(parse_opt): For all (no arg) --debug-dump set show_split_units
1289	to yes. For "info+" enable section_info and show_split_units.
1290	(attrcb_args): Add is_split field.
1291	(attr_callback): Use is_split to format DIE offsets differently.
1292	(print_debug_units): Likewise. Get subdie (type or split) only
1293	when needed. When not silent reiterate over split DIEs when
1294	found.
1295
12962018-05-15  Mark Wielaard  <[email protected]>
1297
1298	* readelf.c (print_debug_units): Print unit type and id for any
1299	unit type that has it even when version < 5.
1300
13012018-05-14  Mark Wielaard  <[email protected]>
1302
1303	* readelf.c (print_ops): Handle DW_OP_GNU_addr_index and
1304	DW_OP_GNU_const_index.
1305	(attr_callback): Handle DW_FORM_GNU_addr_index as DW_FORM_addrx.
1306	Handle DW_FORM_GNU_str_index as DW_FORM_constx. Add as_hex_id.
1307	Handle DW_AT_GNU_dwo_id as_hex_id.
1308	(print_form_data): Handle DW_FORM_GNU_str_index as DW_FORM_strx.
1309
13102018-05-12  Mark Wielaard  <[email protected]>
1311
1312	* readelf.c (print_debug): Also recognize .dwo section name variants.
1313
13142018-05-15  Dmitry V. Levin  <[email protected]>
1315
1316	* elflint.c (check_elf_header): Fix typo in error diagnostics.
1317
13182018-05-15  Mark Wielaard  <[email protected]>
1319
1320	* readelf.c (print_form_data): Cast comparisons against offset_len to
1321	ptrdiff_t.
1322	(print_debug_line_section): Print uint64_t as PRIu64.
1323
13242018-05-11  Mark Wielaard  <[email protected]>
1325
1326	* readelf.c (print_debug_macro_section): Use libdw_valid_user_form.
1327	Use print_form_data for strx and sup strings.
1328
13292018-05-09  Mark Wielaard  <[email protected]>
1330
1331	* readelf.c (dwarf_line_content_description_string): New function.
1332	(dwarf_line_content_description_name): Likewise.
1333	(print_bytes): Likewise.
1334	(print_form_data): Likewise. Based on code taken from...
1335	(print_debug_macro_section): ...here. Now calls print_form_data
1336	and str_offsets_base_off.
1337	(print_debug_line_section): Parse DWARF5 header, directory and file
1338	name tables.
1339
13402018-05-12  Mark Wielaard  <[email protected]>
1341
1342	* addr2line.c (main): Add fflush (stdout) after handle_address ()
1343	when reading from stdin.
1344
13452018-04-24  Mark Wielaard  <[email protected]>
1346
1347	* readelf.c (print_debug_aranges_section): Try elf_rawdata if no
1348	sectiondata.
1349	(print_debug_ranges_section): Likewise.
1350	(print_debug_frame_section): Likewise.
1351	(print_debug_line_section): Likewise. Check for data == NULL.
1352	(print_debug_loc_section): Likewise.
1353	(print_debug_macinfo_section): Likewise.
1354	(print_debug_macro_section): Likewise.
1355
13562018-04-28  Mark Wielaard  <[email protected]>
1357
1358	* readelf.c (print_debug): If .debug_info is needed implicitly by
1359	then handle it first before handling any other debug section.
1360	(parse_opt): Set implicit_debug_sections to section_info when
1361	showing all debug sections.
1362
13632018-05-05  Mark Wielaard  <[email protected]>
1364
1365	* readelf.c (attr_callback): Handle DW_FORM_ref_sup4 and
1366	DW_FORM_ref_sup8 as references.
1367
13682018-04-24  Mark Wielaard  <[email protected]>
1369
1370	* readelf.c (print_debug_str_section): Take raw section data. Don't
1371	use dwarf_getstring, but determine start and end of string from
1372	offset and section data directly.
1373	(print_debug): Handle ".debug_line_str" like ".debug_str".
1374
13752018-04-19  Andreas Schwab  <[email protected]>
1376
1377	* elflint.c (valid_e_machine): Add EM_RISCV.
1378
13792018-04-16  Mark Wielaard  <[email protected]>
1380
1381	* readelf.c (print_debug_line_section). In advance_pc, advance
1382	using op_addr_advance, not op_advance.
1383
13842018-04-14  Mark Wielaard  <[email protected]>
1385
1386	* readelf.c (attr_callback): Only show errors when not silent.
1387
13882018-03-23  Mark Wielaard  <[email protected]>
1389
1390	* readelf.c (attr_callback): Handle DW_FORM_strx[1234].
1391
13922018-03-22  Mark Wielaard  <[email protected]>
1393
1394	* readelf.c (attr_callback): Handle DW_FORM_addrx[1234].
1395
13962018-03-28  Mark Wielaard  <[email protected]>
1397
1398	* readelf.c (handle_sysv_hash): Break bucket chain after nchain
1399	entries are found.
1400	(handle_sysv_hash64): Likewise.
1401
14022018-03-27  Mark Wielaard  <[email protected]>
1403
1404	* readelf.c (attr_callback): Print dwarf_dieoffset as %PRIx64,
1405	not %zx.
1406
14072018-03-20  Mark Wielaard  <[email protected]>
1408
1409	* readelf.c (attr_callback): Report error when DW_AT_decl_file or
1410	DW_AT_call_file cannot be resolved.
1411
14122018-03-06  Mark Wielaard  <[email protected]>
1413
1414	* readelf.c (print_ops): Handle DW_OP_addrx, DW_OP_constx,
1415	DW_OP_implicit_pointer, DW_OP_entry_value, DW_OP_const_type,
1416	DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type,
1417	DW_OP_convert, DW_OP_reinterpret.
1418
14192018-03-01  Mark Wielaard  <[email protected]>
1420
1421	* readelf.c (struct listptr): Add attr field.
1422	(compare_listptr): Warn when two listptrs for the same offset have
1423	different attributes.
1424	(notice_listptr): Take attr as argument and add it to listptr.
1425	(skip_listptr_hole): New attr argument.
1426	(next_listptr_offset): New function.
1427	(print_debug_ranges_section): Pass NULL attr to skip_listptr_hole.
1428	(attr_callback): Handle DW_AT_GNU_locviews. Call notice_listptr with
1429	attr.
1430	(print_debug_loc_section): Keep track of which attr is associated with
1431	a listptr. If the attr is DW_AT_GNU_locview print view pairs till the
1432	next listptr offset.
1433
14342018-02-09  Mark Wielaard  <[email protected]>
1435
1436	* elflint.c (check_group): Make sure we can read a complete
1437	element when iterating over the group.
1438
14392018-02-09  Mark Wielaard  <[email protected]>
1440
1441	* readelf.c (attr_callback): Handle DW_FORM_data16 as Dwarf_Block.
1442
14432018-02-09  Mark Wielaard  <[email protected]>
1444
1445	* readelf.c (print_debug_abbrev_section): Print the value of a
1446	DW_FORM_implicit_const using dwarf_getabbrevattr_data.
1447	(attr_callback): Handle DW_FORM_implicit_const.
1448
14492018-01-30  Mark Wielaard  <[email protected]>
1450
1451	* readelf.c (dwarf_unit_string): New function.
1452	(dwarf_unit_name): Likewise.
1453	(print_debug_units): Use dwarf_get_units and dwarf_cu_die instead
1454	of dwarf_next_unit. Print unit type, id and subdie if available.
1455
14562018-02-09  Joshua Watt  <[email protected]>
1457
1458	* addr2line.c (handle_address): Use FALLTHROUGH macro instead of
1459	comment.
1460	* elfcompress.c (parse_opt): Likewise.
1461	* elflint.c (check_dynamic): Likewise.
1462	(check_sections): Likewise.
1463	(check_note_data): Likewise.
1464	* objdump.c (parse_opt): Likewise.
1465	* readelf.c (parse_opt): Likewise.
1466	(attr_callback): Likewise.
1467	(handle_auxv_note): Likewise.
1468	* strings.c (parse_opt): Likewise.
1469	* backtrace.c (callback_verify): Likewise.
1470
14712018-01-25  Mark Wielaard  <[email protected]>
1472
1473	* readelf.c (print_debug_ranges_section): Initialize cu to last_cu.
1474	(print_debug_loc_section): Likewise.
1475
14762018-01-01  Mark Wielaard  <[email protected]>
1477
1478	* readelf.c (attr_callback): Use dwarf_form_name for unknown forms.
1479	(print_debug_macro_section): Print form using dwarf_form_name.
1480
14812017-12-28  Mark Wielaard  <[email protected]>
1482
1483	* readelf.c (print_debug_units): Print DIE offset in error message
1484	as hex.
1485
14862017-12-18  Mark Wielaard  <[email protected]>
1487
1488	* readelf.c (handle_notes_data): Don't use EXIT_FAILURE in error.
1489	Adjust error message depending on whether or not we got data.
1490
14912017-12-07  Mark Wielaard  <[email protected]>
1492
1493	* readelf.c (print_ops): Update data pointer and print arguments
1494	to DW_OP_call2 and DW_OP_call4 as DIE offsets.
1495
14962017-11-29  Mark Wielaard  <[email protected]>
1497
1498	* readelf.c (argp_options): Add "section-groups", 'g'.
1499
15002017-11-29  Mark Wielaard  <[email protected]>
1501
1502	* readelf.c (print_debug_loc_section): Print CU base and unresolved
1503	addresses. Adjust formatting.
1504
15052017-11-29  Mark Wielaard  <[email protected]>
1506
1507	* readelf.c (print_debug_ranges_section): Print CU base and unresolved
1508	addresses. Adjust formatting.
1509
15102017-11-29  Mark Wielaard  <[email protected]>
1511
1512	* readelf.c (attr_callback): Set valuestr to resolved file name
1513	for DW_AT_decl_file and DW_AT_call_file.
1514
15152017-11-29  Mark Wielaard  <[email protected]>
1516
1517	* readelf.c (print_debug_units): Print abbrev code after DIE tag.
1518
15192017-11-29  Mark Wielaard  <[email protected]>
1520
1521	* readelf.c (print_ops): Use only2 space for index. re-indent +5
1522	for DW_OP_GNU_entry_value.
1523
15242017-11-21  Mark Wielaard  <[email protected]>
1525
1526	* readelf.c (attr_callback): Print attribute name and form in error
1527	message. If only the value cannot be retrieved/resolved don't abort.
1528
15292017-10-03  Mark Wielaard  <[email protected]>
1530
1531	* readelf.c (attr_callback): Print DIE offset in error messages.
1532
15332017-11-03  Mark Wielaard  <[email protected]>
1534
1535	* readelf.c (print_ops): Handle DW_OP_GNU_variable_value. Print
1536	referenced DIE as offset.
1537
15382017-09-10  Mark Wielaard  <[email protected]>
1539
1540	* ar.c (do_oper_delete): Remove DEBUG conditional check.
1541	(no0print): Return bool. Check snprintf return value.
1542	(do_oper_insert): Initialize elf. Remove DEBUG conditional check.
1543	Check no0print calls succeed. Explicitly elf_end found elfs.
1544	(do_oper_extract): Make sure we don't create an empty variable
1545	length array.
1546
15472017-09-01  Mark Wielaard  <[email protected]>
1548
1549	* stack.c (main): Replace \v in doc string with \n\n.
1550	* unstrip.c (main): Likewise.
1551
15522017-05-04  Ulf Hermann  <[email protected]>
1553
1554	* stack.c: Print pid_t using %lld.
1555
15562017-08-18  Ulf Hermann  <[email protected]>
1557
1558	* readelf.c: Hardcode the signal numbers for non-linux systems.
1559
15602017-07-26  Mark Wielaard  <[email protected]>
1561
1562	* readelf.c (print_debug_macro_section): Accept either version 4 or
1563	version 5. Use DW_MACRO names instead of DW_MACRO_GNU names. Add
1564	minimal support for DW_MACRO_define_sup, DW_MACRO_undef_sup,
1565	DW_MACRO_import_sup, DW_MACRO_define_strx and DW_MACRO_undef_strx.
1566
15672017-07-26  Mark Wielaard  <[email protected]>
1568
1569	* readelf.c (dwarf_defaulted_string): New function.
1570	(dwarf_defaulted_name): Likewise.
1571	(attr_callback): Use dwarf_defaulted_name to get value of
1572	DW_AT_defaulted.
1573
15742017-07-20  Mark Wielaard  <[email protected]>
1575
1576	* strip.c (handle_elf): Deal with data marker symbols pointing to
1577	debug sections (they can be removed).
1578
15792017-07-14  Mark Wielaard  <[email protected]>
1580
1581	* strip (OPT_KEEP_SECTION): New define.
1582	(options): Add documentation for remove-section. Add keep-section.
1583	(struct section_pattern): New data type.
1584	(keep_secs, remove_secs): New globals.
1585	(add_pattern, free_sec_patterns, free_patterns, section_name_matches):
1586	New functions.
1587	(main): Call free_patterns.
1588	(parse_opt): Handle 'R' and OPT_KEEP_SECTION. Check remove_comment
1589	on ARGP_KEY_SUCCESS.
1590	(handle_elf): Handle and sanity check keep_secs and remove_secs.
1591
15922017-06-07  Mark Wielaard  <[email protected]>
1593
1594	* strip.c (handle_elf): Introduce new handle_elf boolean. Use it to
1595	determine whether to create an output and/or debug file. Remove new
1596	output file on error.
1597
15982017-06-06  Mark Wielaard  <[email protected]>
1599
1600	* strip.c (handle_elf): Assume e_shstrndx section can be removed.
1601
16022017-04-20  Ulf Hermann  <[email protected]>
1603
1604	* readelf.c: Include strings.h.
1605
16062017-04-20  Ulf Hermann  <[email protected]>
1607
1608	* unstrip.c: Check shnum for 0 before subtracting from it.
1609
16102017-04-20  Ulf Hermann <[email protected]>
1611
1612	* readelf.c: Replace YESSTR and NOSTR with gettext ("yes") and
1613	gettext ("no"), respectively.
1614
16152017-04-05  Mark Wielaard  <[email protected]>
1616
1617	* elflint.c (check_elf_header): Decompress all sections.
1618
16192017-03-28  Mark Wielaard  <[email protected]>
1620
1621	* elflint (check_group): Don't check if there is no flag word.
1622
16232017-03-27  Mark Wielaard  <[email protected]>
1624
1625	* elflint.c (check_elf_header): Sanity check phnum and shnum.
1626
16272017-03-27  Mark Wielaard  <[email protected]>
1628
1629	* elflint.c (check_sysv_hash): Return early if section size is
1630	too small.
1631	(check_sysv_hash64): Likewise.
1632	(check_hash): Calculate expect_entsize to check section size.
1633
16342017-03-27  Mark Wielaard  <[email protected]>
1635
1636	* elflint.c (check_symtab_shndx): Check data->d_size.
1637
16382017-03-24  Mark Wielaard  <[email protected]>
1639
1640	* elfcmp.c (main): If n_namesz == 0 then the note name data is the
1641	empty string.
1642	* readelf.c (handle_notes_data): Likewise.
1643
16442017-03-24  Mark Wielaard  <[email protected]>
1645
1646	* readelf.c (handle_gnu_hash): Check inner < max_nsyms before
1647	indexing into chain array.
1648
16492017-02-16  Ulf Hermann  <[email protected]>
1650
1651	* addr2line.c: Include printversion.h
1652	* ar.c: Likewise.
1653	* elflint.c: Likewise.
1654	* nm.c: Likewise.
1655	* objdump.c: Likewise.
1656	* ranlib.c: Likewise.
1657	* readelf.c: Likewise.
1658	* size.c: Likewise.
1659	* stack.c: Likewise.
1660	* strings.c: Likewise.
1661	* strip.c: Likewise.
1662	* elfcmp.c: Include printversion.h, remove system.h include.
1663	* elfcompress.c: Likewise.
1664	* findtextrel.c: Likewise.
1665	* unstrip.c: Likewise.
1666
16672017-02-14  Ulf Hermann  <[email protected]>
1668
1669	* nm.c: Include color.h.
1670	* objdump.c: Likewise.
1671
16722016-12-24  Mark Wielaard  <[email protected]>
1673
1674	* Makefile.am (findtextrel_LDADD): Add $(libeu).
1675	(addr2line_LDADD): Likewise.
1676	(elfcmp_LDADD): Likewise.
1677	* addr2line.c (print_version): Removed.
1678	* ar.c (print_version): Likewise.
1679	* elfcmp.c (print_version): Likewise.
1680	* elfcompress.c (print_version): Likewise.
1681	* elflint.c (print_version): Likewise.
1682	* findtextrel.c (print_version): Likewise.
1683	* nm.c (print_version): Likewise.
1684	* objdump.c: Likewise.
1685	* ranlib.c: Likewise.
1686	* readelf.c: Likewise.
1687	* size.c: Likewise.
1688	* stack.c: Likewise.
1689	* strings.c: Likewise.
1690	* strip.c: Likewise.
1691	* unstrip.c: Likewise.
1692
16932016-11-17  Mark Wielaard  <[email protected]>
1694
1695	* readelf.c (options): Add optional arg SECTION for symbols.
1696	(symbol_table_section): New static variable.
1697	(parse_opt): Set symbol_table_section on 's'.
1698	(print_symtab): Filter on symbol_table_section name is set.
1699
17002016-11-10  Mark Wielaard  <[email protected]>
1701
1702	* ar.c (write_member): Make sure tmpbuf is large enough to contain
1703	a starting '/' and ending '\0' char.
1704	(do_oper_insert): Likewise.
1705	* arlib.c (arlib_finalize): Format tmpbuf as PRId32 decimal.
1706
17072016-11-02  Mark Wielaard  <[email protected]>
1708
1709	* addr2line.c (handle_address): Add fallthrough comment.
1710	* elfcompress.c (parse_opt): Adjust fallthrough comment.
1711	* elflint.c (parse_opt): Add missing break after 'd' case.
1712	(check_sections): Add fallthrough comments.
1713	* objdump.c (parse_opt): Add explantion for fallthrough comment.
1714
17152016-10-22  Kevin Cernekee  <[email protected]>
1716
1717	* unstrip.c: Fix "invalid string offset" error caused by using the
1718	  unstripped .symtab with the stripped .strtab.
1719
17202016-10-11  Akihiko Odaki  <[email protected]>
1721
1722	* arlib.c: Remove system.h include, add libeu.h include.
1723	* arlib2.c: Remove sys/param.h include.
1724	* elfcompress.c: Add libeu.h include.
1725	* elflint.c: Remove sys/param.h include, add libeu.h include.
1726	* nm.c: Likewise.
1727	* objdump.c: Likewise.
1728	* ranlib.c: Likewise.
1729	* readelf.c: Likewise.
1730	* size.c: Remove sys/param.h include.
1731	* strings.c: Likewise, add libeu.h include.
1732	* strip.c: Likewise.
1733	* unstrip.c: Likewise.
1734
17352016-10-06  Mark Wielaard  <[email protected]>
1736
1737	* strip.c (handle_elf): Don't remove real symbols from allocated
1738	symbol tables.
1739
17402016-08-25  Mark Wielaard  <[email protected]>
1741
1742	* strip.c (handle_elf): Recompress with ELF_CHF_FORCE.
1743
17442016-08-06  Mark Wielaard  <[email protected]>
1745
1746	* strip.c (handle_elf): Uncompress and recompress relocation target
1747	section if necessary.
1748
17492016-07-08  Mark Wielaard  <[email protected]>
1750
1751	* Makefile.am (strip_LDADD): Add libdw.
1752	* elfcompress.c (process_file): Use dwelf_strtab functions instead of
1753	ebl_strtab.
1754	* strip.c (handle_elf): Likewise.
1755	* unstrip.c (new_shstrtab): Likewise.
1756
17572016-07-06  Mark Wielaard  <[email protected]>
1758
1759	* elf32-i386.script, i386_ld.c, ld.c, ld.h, ldgeneric.c, ldlex.l,
1760	ldscript.y, libld_elf_i386.map, none_ld.c, sectionhash.c,
1761	sectionhash.h, symbolhash.c, symbolhash.h, unaligned.h,
1762	versionhash.c, versionhash.h, xelf.h: Removed.
1763	* Makefile.am (YACC): Removed.
1764	(AM_YFLAGS): Removed.
1765	(AM_LFLAGS): Removed.
1766	(native_ld): Removed.
1767	(base_cpu): Removed.
1768	(bin_PROGRAMS): Removed ld.
1769	(ld_dsos): Removed.
1770	(ld_SOURCES): Removed.
1771	(noinst_LIBRARIES): Only libar.a.
1772	(EXTRA_DIST): Just arlib.h and debugpred.h.
1773	(ld_LDADD): Removed.
1774	(ld_LDFLAGS): Removed.
1775	(ldlex.o): Removed.
1776	(ldscript.h): Removed.
1777	(libld*): Removed.
1778	(CLEANFILES): Just *.gconv.
1779	(MAINTAINERCLEANFILES): Removed.
1780
17812016-07-06  Mark Wielaard  <[email protected]>
1782
1783	* unstrip.c (copy_elided_sections): Use unstripped_strent[] from
1784	index zero, instead of one.
1785
17862016-06-28  Richard Henderson <[email protected]>
1787
1788	* elflint.c (valid_e_machine): Add EM_BPF.
1789
17902016-04-11  David Abdurachmanov  <[email protected]>
1791
1792	* elfcmp.c (main): Fix self-comparison error with GCC 6.
1793
17942016-03-21  Mark Wielaard  <[email protected]>
1795
1796	* nm.c (show_symbols): Check for malloc size argument overflow.
1797
17982016-02-13  Mark Wielaard  <[email protected]>
1799
1800	* readelf.c (print_scngrp): Call error when gelf_getshdr fails.
1801	(print_symtab): Likewise.
1802	(handle_hash): Likewise.
1803	(dump_data_section): Print a warning if decompressing fails.
1804	(print_string_section): Likewise.
1805
18062016-02-13  Mark Wielaard  <[email protected]>
1807
1808	* elfcompress.c (parse_opt): Don't fallthrough after processing -q.
1809
18102016-02-12  Mark Wielaard  <[email protected]>
1811
1812	* strip.c (handle_elf): Correct elf_assert shndxdata check.
1813
18142016-02-09  Mark Wielaard  <[email protected]>
1815
1816	* readelf.c (read_encoded): Move up.
1817	(print_cfa_program): Add encoding argument. Use it for read_encoded
1818	when reading DW_CFA_set_loc op.
1819	(print_debug_frame_section): Pass fde_encoding to print_cfa_program.
1820
18212016-02-09  Mark Wielaard  <[email protected]>
1822
1823	* elflint.c (compare_hash_gnu_hash): Check hash sh_entsize against
1824	sizeof (Elf64_Xword). Correct invalid sh_entsize error message
1825	section idx and name.
1826
18272016-01-13  Mark Wielaard  <[email protected]>
1828
1829	* elflint.c (check_elf_header): Recognize ELFOSABI_FREEBSD.
1830
18312016-01-08  Mark Wielaard  <[email protected]>
1832
1833	* elfcompress.c (compress_section): Use %zu to print size_t.
1834	* readelf.c (print_shdr): Use %zx to print size_t.
1835
18362015-12-16  Mark Wielaard  <[email protected]>
1837
1838	* elfcompress.c: New file.
1839	* Makefile.am (bin_PROGRAMS): Add elfcompress.
1840	(elfcompress_LDADD): New variable.
1841
18422015-12-18  Mark Wielaard  <[email protected]>
1843
1844	* elflint.c (section_flags_string): Add NEWFLAG COMPRESSED.
1845	(check_sections): SHF_COMPRESSED can be on any special section.
1846	SHF_COMPRESSED is a valid section flag. SHF_COMPRESSED cannot
1847	be used together with SHF_ALLOC or with SHT_NOBITS. Should have
1848	a valid Chdr.
1849
18502015-10-20  Mark Wielaard  <[email protected]>
1851
1852	* readelf.c (options): Expand -z help text.
1853	(dump_data_section): Check whether we need and can decompress section
1854	data and call elf_rawzdata if so,
1855	(print_string_section): Likewise.
1856	(elf_contains_chdrs): New function.
1857	(process_elf_file): Rename print_unrelocated to print_unchanged,
1858	use elf_contains_chdrs.
1859	(print_scngrp): Check whether section is compressed before use.
1860	(print_symtab): Likewise.
1861	(handle_hash): Likewise.
1862
18632015-10-16  Mark Wielaard  <[email protected]>
1864
1865	* readelf.c (argp_option): Describe --decompress,-z.
1866	(print_decompress): New bool.
1867	(parse_opt): Handle -z.
1868	(elf_ch_type_name): New function.
1869	(print_shdr): Print section compress information.
1870
18712015-12-31  Mark Wielaard  <[email protected]>
1872
1873	* elflint.c (check_symtab): Add _edata and _end (plus extra underscore
1874	variants) to to the list of possibly dangling symbols.
1875
18762015-12-02  Mark Wielaard  <[email protected]>
1877
1878	* nm.c (process_file): Accept fd and pass it on.
1879	(handle_elf): Likewise.
1880	(find_no_debuginfo): New.
1881	(struct getdbg): Likewise.
1882	(getdbg_dwflmod): Likewise.
1883	(show_symbols): Take fd. If the file is ET_REL use libdwfl to get
1884	the relocated Dwarf.
1885
18862015-12-02  Mark Wielaard  <[email protected]>
1887
1888	* nm.c (get_local_names): Check for duplicates in local_root tree.
1889
18902015-12-02  Mark Wielaard  <[email protected]>
1891
1892	* unstrip.c (struct data_list): New.
1893	(new_data_list): Likewise.
1894	(record_new_data): Likewise.
1895	(free_new_data): Likewise.
1896	(adjust_relocs): Call record_new_data.
1897	(add_new_section_symbols): Likewise.
1898	(copy_elided_sections): Call free_new_data.
1899
19002015-12-01  Mark Wielaard  <[email protected]>
1901
1902	* elfcmp.c (main): Close ebl1 and ebl2 backends.
1903
19042015-10-16  Mark Wielaard  <[email protected]>
1905
1906	* Makefile.am [BUILD_STATIC](libdw): Add -lz.
1907	[BUILD_STATIC](libelf): Likewise.
1908
19092015-10-16  Mark Wielaard  <[email protected]>
1910
1911	* elflint.c (check_symtab): Don't check TLS symbol value against TLS
1912	phdr offset in debuginfo files.
1913	(check_sections): Don't try to match section offsets to phdrs offsets
1914	in debuginfo files.
1915
19162015-10-16  Mark Wielaard  <[email protected]>
1917
1918	* elflint.c (check_reloc_shdr): Reject only desthdrs if they have both
1919	SHF_MERGE and SHF_STRINGS set.
1920
19212015-10-13  Jose E. Marchesi  <[email protected]>
1922
1923	* elflint.c (check_sections): Do not rely on
1924	ebl_check_special_section when checking debuginfo files.  Also
1925	check that the type of WE sections in debuginfo files is NOBITS.
1926
19272015-10-13  Mark Wielaard  <[email protected]>
1928
1929	* elflint.c (check_program_header): Check relro flags are a subset
1930	of the load segment if they don't fully overlap.
1931
19322015-10-07  Mark Wielaard  <[email protected]>
1933
1934	* Makefile.am (ldlex_no_Wstack_usage): New.
1935	* ldlex.l ([RWX]): Make cnt unsigned.
1936
19372015-10-09  Josh Stone  <[email protected]>
1938
1939	* elflint.c (main): Replace stat64 and fstat64 with stat and fstat.
1940	* readelf.c (process_file): Likewise.
1941	(process_elf_file): Replace off64_t with off_t.
1942	* findtextrel.c (process_file): Replace open64 with open.
1943	* ld.c (main): Replace sizeof (off64_t) with 8.
1944	* strings.c: Replace off64_t with off_t throughout.
1945	(main): Replace stat64 and fstat64 with stat and fstat.
1946	(map_file): Replace mmap64 with mmap.
1947	(read_block): Likewise, and replace lseek64 with lseek.
1948	* strip.c (handle_elf): Replace ftruncate64 with ftruncate.
1949	(process_file): Replace stat64 and fstat64 with stat and fstat.
1950	* unstrip.c (parse_opt): Replace stat64 with stat.
1951	(handle_file): Replace open64 with open.
1952	(open_file): Likewise.
1953
19542015-10-08  Chih-Hung Hsieh  <[email protected]>
1955
1956	* ld.c (determine_output_format): Move recursive nested
1957	function "try" to file scope.
1958
19592015-10-04  Mark Wielaard  <[email protected]>
1960
1961	* strip.c (handle_elf): Only sanity check section symbols to not
1962	kept discarded sections if we are creating a debug file.
1963
19642015-10-07  Mark Wielaard  <[email protected]>
1965
1966	* unstrip.c (MAX): Removed.
1967	(find_alloc_sections_prelink): Allocate exact amount of bytes for
1968	shdrs.
1969
19702015-10-05  Chih-Hung Hsieh <[email protected]>
1971
1972	* unstrip.c (find_alloc_sections_prelink): Do not allocate
1973	on stack union types with variable length arrays; use xmalloc
1974	for such dynamic sized objects.
1975	* readelf.c (handle_core_item): Likewise, but use alloca
1976	for small variable size data object and add assert(count < 128).
1977
19782015-10-05  Josh Stone  <[email protected]>
1979
1980	* Makefile.am (libld_elf_i386.so): Add AM_V_CCLD silencer.
1981	(.deps/none_ld.Po): Always silence the dummy command.
1982	(make-debug-archive): Add AM_V_GEN and AM_V_at silencers.
1983
19842015-10-02  Mark Wielaard  <[email protected]>
1985
1986	* unstrip.c (copy_elided_sections): Use SH_INFO_LINK_P, not just
1987	SHF_INFO_LINK.
1988
19892015-10-02  Mark Wielaard  <[email protected]>
1990
1991	* strip.c (handle_elf): Don't move around allocated NOBITS sections.
1992	Don't just mark the section header string table as unused.
1993	* unstrip.c (copy_elided_sections): Add header names to strtab if
1994	shstrndx equals the symtab strtabndx.
1995
19962015-09-22  Mark Wielaard  <[email protected]>
1997
1998	* strip.c (cleanup_debug): Remove old-style function definitions.
1999
20002015-09-09  Chih-Hung Hsieh  <[email protected]>
2001
2002	* readelf.c (print_debug_exception_table): Initialize variable before
2003	it is used, because compiler does not know that error never returns.
2004	(dump_arhive_index): Likewise.
2005
20062015-09-04  Chih-Hung Hsieh  <[email protected]>
2007
2008	* elflint.c (check_group): Replace %Z length modifier with %z.
2009	(check_note_data): Likewise.
2010	* findtextrel.c (process_file): Likewise.
2011	* readelf.c (handle_dynamic): Likewise.
2012	(handle_symtab): Likewise.
2013	(handle_verneed): Likewise.
2014	(handle_verdef): Likewise.
2015	(handle_versym): Likewise.
2016	(print_hash_info): Likewise.
2017	(print_decoded_aranges_section): Likewise.
2018	(print_debug_aranges_section): Likewise.
2019	(print_debug_line_section): Likewise.
2020	(hex_dump): Likewise.
2021	(dump_data_section): Likewise.
2022	(print_string_section): Likewise.
2023	(dump_archive_index): Likewise.
2024	* unstrip.c (adjust_relocs): Likewise.
2025	(collect_symbols): likewise.
2026	(get_section_name): Likewise.
2027	(find_alloc_sections_prelink): Likewise.
2028	(copy_elided_sections): Likewise.
2029	* ldscript.y (add_id_list): Add missing '%s'.
2030
20312015-09-03  Mark Wielaard  <[email protected]>
2032
2033	* readelf.c (handle_core_item): Handle right shift >= 32 bits.
2034
20352015-08-11  Mark Wielaard  <[email protected]>
2036
2037	* elflint.c (check_sections): When gnuld and a NOBITS section falls
2038	inside a segment make sure any ELF file contents is zero.
2039
20402015-07-29  Mark Wielaard  <[email protected]>
2041
2042	* unstrip.c (sections_flags_match): New function.
2043	(sections_match): Use sections_flags_match.
2044	(find_alloc_sections_prelink): Only clear matched sections if there
2045	is an undo section.
2046	(copy_elided_sections): Add SHF_INFO_LINK to shdr_mem.sh_flags if
2047	necessary.
2048
20492015-06-27  Pino Toscano  <[email protected]>
2050
2051	* src/strings.c: Define MAP_POPULATE if not defined already.
2052
20532015-06-27  Mark Wielaard  <[email protected]>
2054
2055	* nm.c (show_symbols): First call elf_getdata, then allocate memory.
2056
20572015-06-18  Mark Wielaard  <[email protected]>
2058
2059	* findtextrel.c (process_file): Free segments after use.
2060
20612015-06-18  Mark Wielaard  <[email protected]>
2062
2063	* readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals
2064	phdr2 pointer.
2065
20662015-06-18  Mark Wielaard  <[email protected]>
2067
2068	* readelf.c (handle_gnu_hash): Free lengths on invalid_data.
2069
20702015-06-18  Mark Wielaard  <[email protected]>
2071
2072	* elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
2073	exists. Warn otherwise.
2074
20752015-06-18  Mark Wielaard  <[email protected]>
2076
2077	* nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
2078	known whether or not we stack allocated memory.
2079
20802015-06-18  Mark Wielaard  <[email protected]>
2081
2082	* strings.c (readelf): Use "<unknown>" if we cannot retrieve section
2083	name.
2084
20852015-06-09  Mark Wielaard  <[email protected]>
2086
2087	* addr2line.c (print_dwarf_function): Always free scopes before
2088	returning.
2089
20902015-06-09  Mark Wielaard  <[email protected]>
2091
2092	* strip.c (handle_ar): Mark as unused.
2093	(process_file): Produce an error when trying to handle an ar.
2094
20952015-05-30  Mark Wielaard  <[email protected]>
2096
2097	* elfcmp.c (main): Only call memcmp when d_size != 0.
2098
20992015-05-23  Mark Wielaard  <[email protected]>
2100
2101	* Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint,
2102	findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage.
2103
21042015-05-21  Mark Wielaard  <[email protected]>
2105
2106	* addr2line.c (handle_address): Set scopes to NULL after free.
2107
21082015-05-20  Mark Wielaard  <[email protected]>
2109
2110	* addr2line.c (OPT_PRETTY): New constant define.
2111	(argp_option): Add "pretty-print".
2112	(pretty): New static bool.
2113	(parse_opt): Set pretty.
2114	(print_dwarf_function): Adjust output when pretty is set.
2115	(print_addrsym): Likewise.
2116	(handle_address): Likewise.
2117
21182015-05-20  Mark Wielaard  <[email protected]>
2119
2120	* Makefile.am (addr2line_LDADD): Add demanglelib.
2121	* addr2line.c (argp_option): Move demangle under output format.
2122	(demangle): New static bool.
2123	(demangle_buffer_len): New static size_t.
2124	(demangle_buffer): New static char *.
2125	(main): free demangle_buffer.
2126	(parse_opt): Set demangle.
2127	(symname): New static function.
2128	(get_diename): Use symname.
2129	(print_dwarf_function): Likewise.
2130	(print_addrsym): Likewise.
2131	(handle_address): Likewise.
2132
21332015-05-20  Mark Wielaard  <[email protected]>
2134
2135	* addr2line.c (argp_option): Add "addresses", 'a'.
2136	(print_addresses): New static bool.
2137	(parse_opt): Set print_addresses.
2138	(get_addr_width): New static function.
2139	(handle_address): Print address if print_addresses is true.
2140
21412015-05-20  Mark Wielaard  <[email protected]>
2142
2143	* addr2line.c (handle_address): Call strtoumax with base 16. Make
2144	sure all input has been processed.
2145
21462015-05-20  Mark Wielaard  <[email protected]>
2147
2148	* addr2line (argp_option): Group 'section' under "Input format
2149	options".
2150
21512015-05-12  Mark Wielaard  <[email protected]>
2152
2153	* strip.c (debug_fd): New static variable.
2154	(tmp_debug_fname): Likewise.
2155	(cleanup_debug): New function using the above to clean up temporary
2156	debug file.
2157	(INTERNAL_ERROR): Call cleanup_debug.
2158	(handle_elf): Use debug_fd and tmp_debug_fname statics and call
2159	cleanup_debug before any error. Use output_fname instead of fname in
2160	error messages when it exists (-o was given). SHT_NOBITS sections
2161	can also be moved freely even if SHF_ALLOC is set. Add various
2162	sanity checks. Use elf_assert instead of plain assert.
2163
21642015-05-08  Mark Wielaard  <[email protected]>
2165
2166	* nm.c (show_symbols): Call gelf_fsize with EV_CURRENT.
2167	* strip.c (handle_elf): Likewise.
2168
21692015-05-06  Mark Wielaard  <[email protected]>
2170
2171	* elflint.c (check_gnu_hash): Return early when 2nd hash function
2172	shift too big. Check there is enough data available. Make sure
2173	bitmask_words is not zero.
2174	(check_verdef): Use Elf64_Word for shdr->sh_info cnt.
2175	(check_verneed): Likewise.
2176	(check_attributes): Break when vendor name isn't terminated.
2177	Add overflow check for subsection_len.
2178
21792015-05-05  Mark Wielaard  <[email protected]>
2180
2181	* nm.c (show_symbols): Handle dwarf_linesrc returning NULL.
2182
21832015-05-04  Max Filippov  <[email protected]>
2184
2185	* ar.c (do_oper_extract): Replace struct timeval with struct timespec
2186	and futimes with futimens.
2187	* strip.c (process_file): Replace struct timeval with struct timespec.
2188	(handle_elf, handle_ar): Replace struct timeval with struct timespec
2189	in prototype. Replace futimes with futimens.
2190
21912015-05-04  Max Filippov  <[email protected]>
2192
2193	* addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
2194	* ar.c: Likewise.
2195	* ld.c: Likewise.
2196	* nm.c: Likewise.
2197	* objdump.c: Likewise.
2198	* ranlib.c: Likewise.
2199	* size.c: Likewise.
2200	* strip.c: Likewise.
2201	* unstrip.c: Likewise.
2202
22032015-05-04  Anthony G. Basile  <[email protected]>
2204
2205	* Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
2206	(ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
2207	(elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
2208	(ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
2209
22102015-03-22  Mark Wielaard  <[email protected]>
2211
2212	* readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
2213	before subtracting cie_id. And cast cie_offset to Dwarf_Off before
2214	comparison.
2215
22162015-03-22  Mark Wielaard  <[email protected]>
2217
2218	* readelf.c (print_gdb_index_section): Check all offsets used
2219	against section d_size.
2220
22212015-03-17  Mark Wielaard  <[email protected]>
2222
2223	* readelf.c (print_debug): Don't return, but always use dummy_dbg.
2224
22252015-03-17  Mark Wielaard  <[email protected]>
2226
2227	* readelf.c (print_gdb_index_section): Add overflow checking for
2228	dataend checks.
2229
22302015-03-14  Mark Wielaard  <[email protected]>
2231
2232	* nm.c (INTERNAL_ERROR): Remove __DATE__.
2233	* objdump.c (INTERNAL_ERROR): Likewise.
2234	* size.c (INTERNAL_ERROR): Likewise.
2235	* strip.c (INTERNAL_ERROR): Likewise.
2236
22372015-03-18  Petr Machata  <[email protected]>
2238
2239	* readelf.c (dwarf_tag_string, dwarf_attr_string)
2240	(dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
2241	(dwarf_encoding_string, dwarf_access_string)
2242	(dwarf_visibility_string, dwarf_virtuality_string)
2243	(dwarf_identifier_case_string, dwarf_calling_convention_string)
2244	(dwarf_ordering_string, dwarf_discr_list_string)
2245	(dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
2246	to match the API changes.
2247
22482015-03-09  Mark Wielaard  <[email protected]>
2249
2250	* elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
2251
22522015-01-03  Mark Wielaard  <[email protected]>
2253
2254	* elfcmp (main): Check section name is not NULL. Check sh_entsize
2255	is not zero for symbol tables. Check phdrs are not NULL.
2256	(search_for_copy_reloc): Check sh_entsize is not zero.
2257
22582014-12-30  Mark Wielaard  <[email protected]>
2259
2260	* elflint.c (check_scn_group): Check d_buf and name are not NULL.
2261	(is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
2262	zero.
2263	(check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
2264	(check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
2265	Check shdr and symshdr sh_entsize are not zero.
2266	(check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
2267	Check symshdr->sh_entsize is not zero. Check data->d_buf is not
2268	NULL.
2269	(compare_hash_gnu_hash): Check sections d_buf are not NULL.
2270	Check section data is large enough. Use gnu_symbias.
2271	(check_group): Check section val is valid.
2272	(has_copy_reloc): Check sh_entsize is not zero.
2273	(check_versym): Likewise.
2274	(unknown_dependency_p): Likewise.
2275	(check_verneed): Break on invalid ref or offset. Don't assert.
2276	Report error when next offset is zero, but more vers expected.
2277	(check_verdef): Likewise.
2278	(check_attributes): Make sure d_buf is not NULL.
2279	(check_note): Likewise.
2280	(check_note_section): Likewise.
2281	(check_program_header): Make sure section name is not NULL.
2282
22832014-12-26  Mark Wielaard  <[email protected]>
2284
2285	* strings.c (read_elf): Produce error when section data falls outside
2286	file.
2287
22882014-12-26  Mark Wielaard  <[email protected]>
2289
2290	* nm.c (show_symbols): Guard against divide by zero in error check.
2291	Add section index number in error message.
2292
22932014-12-26  Mark Wielaard  <[email protected]>
2294
2295	* nm.c (handle_ar): Skip over /SYM64/ entries.
2296
22972014-12-26  Mark Wielaard  <[email protected]>
2298
2299	* nm.c (handle_ar): Break on arsym with invalid offset.
2300
23012014-12-20  Mark Wielaard  <[email protected]>
2302
2303	* readelf.c (print_debug_macinfo_section): Mark cus sentinel files
2304	as -1 non-existent. Check macoff against sentinel cus.
2305
23062014-12-20  Mark Wielaard  <[email protected]>
2307
2308	* readelf.c (print_debug_exception_table): Add max_action overflow
2309	check. Check action_table_end before reading slib128. Check
2310	max_ar_filter underflow.
2311
23122014-12-18  Ulrich Drepper  <[email protected]>
2313
2314	* Makefile.am: Suppress output of textrel_check command.
2315
23162014-12-17  Mark Wielaard  <[email protected]>
2317
2318	* readelf.c (print_cfa_program): Add bounds check before each op that
2319	takes at least one argument.
2320
23212014-12-16  Mark Wielaard  <[email protected]>
2322
2323	* readelf.c (print_decoded_line_section): Print dwarf_errmsg if
2324	dwarf_onesrcline or dwarf_linesrc fails.
2325
23262014-12-16  Mark Wielaard  <[email protected]>
2327
2328	* readelf.c (print_debug_line_section): Correct overflow check for
2329	unit_length.
2330	(print_debug_aranges_section): Correct overflow check for length.
2331
23322014-12-15  Mark Wielaard  <[email protected]>
2333
2334	* readelf.c (notice_listptr): Return false if offset doesn't fit
2335	in 61-bits.
2336	(attr_callback): Warn if loclist or rangelist offset doesn't fit.
2337
23382014-12-15  Mark Wielaard  <[email protected]>
2339
2340	* readelf.c (print_ops): Don't assert when addr_size or ref_size
2341	is not 4 or 8, just report invalid data.
2342
23432014-12-15  Mark Wielaard  <[email protected]>
2344
2345	* readelf.c (print_gdb_index_section): Add more bounds checks.
2346
23472014-12-15  Mark Wielaard  <[email protected]>
2348
2349	* readelf.c (print_debug_line_section): Check there is enough room
2350	for DW_LNE_set_address argument. Make sure there is enough room
2351	for the the initial unit_length.
2352
23532014-12-14  Mark Wielaard  <[email protected]>
2354
2355	* elflint.c (check_attributes): Call get_uleb128 with end pointer.
2356	* readelf.c (print_attributes): Likewise.
2357	(print_ops): Likewise and also for get_sleb128.
2358	(print_cfa_program): Likewise and add more readp bounds checks.
2359	(read_encoded): Likewise.
2360	(print_debug_frame_section): Likewise.
2361	(print_debug_line_section): Likewise.
2362	(print_debug_macinfo_section): Likewise.
2363	(print_debug_macro_section): Likewise.
2364	(print_debug_exception_table): Likewise.
2365
23662014-12-16  Mark Wielaard  <[email protected]>
2367
2368	* elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
2369	difference doesn't wrap around before returning as int.
2370
23712014-12-11  Mark Wielaard  <[email protected]>
2372
2373	* readelf.c (print_debug_exception_table): Check TType base offset
2374	and Action table are sane.
2375
23762014-12-11  Mark Wielaard  <[email protected]>
2377
2378	* readelf.c (print_debug_frame_section): Check number of augmentation
2379	chars to print.
2380
23812014-12-09  Mark Wielaard  <[email protected]>
2382
2383	* readelf.c (handle_file_note): Check count fits data section and
2384	doesn't overflow fptr.
2385
23862014-12-08  Mark Wielaard  <[email protected]>
2387
2388	* readelf.c (print_debug_exception_table): Report invalid data if
2389	action table doesn't immediately follow call site table.
2390
23912014-12-10  Josh Stone  <[email protected]>
2392
2393	* addr2line.c (get_diename): New, get linkage_name or name.
2394	* addr2line.c (print_dwarf_function): Use get_diename.
2395	* addr2line.c (handle_address): Likewise.
2396	* addr2line.c (print_diesym): Removed.
2397
23982014-12-10  Josh Stone  <[email protected]>
2399
2400	* addr2line.c (handle_address): Find the proper inline parents.
2401
24022014-12-07  Mark Wielaard  <[email protected]>
2403
2404	* readelf.c (print_debug_line_section): max_ops_per_instr cannot
2405	be zero.
2406
24072014-12-07  Mark Wielaard  <[email protected]>
2408
2409	* readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
2410	and DW_OP_GNU_implicit_pointer.
2411
24122014-12-04  Mark Wielaard  <[email protected]>
2413
2414	* objdump.c (show_relocs_x): Make sure destshdr exists.
2415	(show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
2416	(show_relocs_rela): Likewise.
2417	(show_relocs): Make sure destshdr, symshdr and symdata exists.
2418
24192014-11-30  Mark Wielaard  <[email protected]>
2420
2421	* readelf.c (handle_sysv_hash64): Fix overflow check.
2422
24232014-11-28  Mark Wielaard  <[email protected]>
2424
2425	* readelf.c (handle_relocs_rel): Don't reuse destshdr to store
2426	section header of a relocation against a STT_SECTION symbol. Use
2427	a new local variable secshdr.
2428	(handle_relocs_rela): Likewise.
2429
24302014-11-26  Mark Wielaard  <[email protected]>
2431
2432	* readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
2433	to ptrdiff_t for comparison.
2434
24352014-11-24  Mark Wielaard  <[email protected]>
2436
2437	* readelf.c (print_debug_line_section): Check line_range is not zero
2438	before usage.
2439
24402014-11-23  Mark Wielaard  <[email protected]>
2441
2442	* readelf.c (print_debug_aranges_section): Check length to catch
2443	nexthdr overflow.
2444
24452014-11-21  Mark Wielaard  <[email protected]>
2446
2447	* readelf.c (print_attributes): Guard against empty section.
2448	Document attribute format. Break when vendor name isn't terminated.
2449	Add overflow check for subsection_len. Handle both gnu and non-gnu
2450	attribute tags.
2451
24522014-11-22  Mark Wielaard  <[email protected]>
2453
2454	* elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
2455	* findtextrel.c (process_file): Use elf_getphdrnum.
2456	* readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
2457	(print_phdr): Check phnum.
2458	* size.c (show_segments): Use elf_getphdrnum.
2459	* strip.c (handle_elf): Likewise.
2460	* unstrip.c (copy_elf): Likewise.
2461	(copy_elided_sections): Likewise.
2462	(handle_file): Likewise.
2463
24642014-11-18  Mark Wielaard  <[email protected]>
2465
2466	* readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
2467	length.
2468
24692014-11-17  Mark Wielaard  <[email protected]>
2470
2471	* readelf.c (handle_verneed): Check vna_next and vn_next exist.
2472	(handle_verdef): Check vda_next and vd_next exist.
2473	(handle_versym): Check vd_next, vna_next and vn_next exist.
2474	Check vername and filename are not NULL before use.
2475
24762014-11-17  Mark Wielaard  <[email protected]>
2477
2478	* elfcmp.c (main): Check section names are NULL before use.
2479	* objdump.c (section_match): Likewise.
2480	* size.c (show_sysv): Likewise.
2481
24822014-11-17  Mark Wielaard  <[email protected]>
2483
2484	* readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
2485	or 8 instead of just calling print_cfa_program.
2486
24872014-11-16  Mark Wielaard  <[email protected]>
2488
2489	* readelf (process_elf_file): Set phnum to zero if there aren't
2490	actually any pheaders.
2491	(print_phdr): Check there actually is a phdr.
2492
24932014-11-16  Mark Wielaard  <[email protected]>
2494
2495	* readelf.c (print_cfa_program): Check block len before calling
2496	print_ops.
2497
24982014-11-14  Mark Wielaard  <[email protected]>
2499
2500	* readelf.c (print_debug_frame_section): Sanity Check CIE
2501	unit_length and augmentationlen.
2502
25032014-11-14  Mark Wielaard  <[email protected]>
2504
2505	* readelf.c (handle_versym): Check def == NULL before use.
2506
25072014-11-08  Mark Wielaard  <[email protected]>
2508
2509	* readelf.c (handle_versym): Initialize vername and filename array
2510	elements.
2511
25122014-11-07  Mark Wielaard  <[email protected]>
2513
2514	* readelf.c (handle_sysv_hash): Sanity check section contents.
2515	(handle_sysv_hash64): Likewise.
2516	(handle_gnu_hash): Likewise.
2517
25182014-09-14  Petr Machata  <[email protected]>
2519
2520	* readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
2521
25222014-09-12  Petr Machata  <[email protected]>
2523
2524	* readelf.c (encoded_ptr_size): In the switch statement, change
2525	magic constants 3 and 4 to DW_EH_PE_* counterparts.  Still accept
2526	0.  Print diagnostic for anything else.
2527
25282014-08-25  Josh Stone  <[email protected]>
2529
2530	* Makefile.am: Prevent premature @AR@ replacement in a sed expression.
2531
25322014-07-04  Menanteau Guy  <[email protected]>
2533	    Mark Wielaard  <[email protected]>
2534
2535	* elflint (check_symtab): Add ".TOC." to the list of possibly
2536	dangling symbols because of sourceware PR13621.
2537
25382014-06-14  Mark Wielaard  <[email protected]>
2539
2540	* elflint (check_symtab): Use ebl_func_addr_mask on st_value.
2541
25422014-05-27  Mark Wielaard  <[email protected]>
2543
2544	* readelf.c (print_debug): Skip section if name is NULL.
2545
25462014-05-26  Mark Wielaard  <[email protected]>
2547
2548	* readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
2549	does, when sh_info == 0.
2550
25512014-05-26  Mark Wielaard  <[email protected]>
2552
2553	* unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
2554	section when sh_size of the original and undo .bss section are equal.
2555
25562014-05-26  Mark Wielaard  <[email protected]>
2557
2558	* unstrip.c (options): Add --force, -F.
2559	(struct arg_info): Add bool force.
2560	(parse_opt): Handle 'F', set force.
2561	(handle_explicit_files): Add force argument, add warn function,
2562	separate check ehdr field checks, use warn.
2563	(handle_dwfl_module): Add force argument, pass on to
2564	handle_explicit_files.
2565	(handle_output_dir_module): Add force argument, pass on to
2566	handle_dwfl_module.
2567	(handle_implicit_modules): Pass info->force to handle_dwfl_module and
2568	handle_output_dir_module.
2569	(main): Pass info.force to handle_explicit_files.
2570
25712014-05-19  Mark Wielaard  <[email protected]>
2572
2573	* elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
2574
25752014-05-01  Mark Wielaard  <[email protected]>
2576
2577	* readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
2578	if looking for alternate debug file.
2579
25802014-04-11  Mark Wielaard  <[email protected]>
2581
2582	* Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
2583
25842014-04-22  Mark Wielaard  <[email protected]>
2585
2586	* readelf.c (handle_core_item): Make sure variable length array
2587	contains at least enough space for terminating zero char.
2588
25892014-04-22  Mark Wielaard  <[email protected]>
2590
2591	* readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
2592	left shift.
2593
25942014-03-13  Mark Wielaard  <[email protected]>
2595
2596	* Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
2597	LDADD lines.
2598	* strings.c (process_chunk): Remove _MUDFLAP condition.
2599
26002014-04-09  Mark Wielaard  <[email protected]>
2601
2602	* readelf.c (print_debug_aranges_section): Don't get the raw section
2603	data, use the possibly decompressed .[z]debug sectiondata.
2604	(print_debug_ranges_section): Likewise.
2605	(print_debug_frame_section): Likewise.
2606	(print_debug_line_section): Likewise.
2607	(print_debug_loc_section): Likewise.
2608	(print_debug_macinfo_section): Likewise.
2609	(print_debug_macro_section): Likewise.
2610
26112014-04-10  Mark Wielaard  <[email protected]>
2612
2613	* readelf.c (buf_read_ulong): Pass actual long size to convert.
2614
26152014-03-05  Mark Wielaard  <[email protected]>
2616
2617	* readelf.c (attr_callback): Print DW_FORM_sdata values as signed
2618	numbers.
2619
26202014-02-24  Mark Wielaard  <[email protected]>
2621
2622	* readelf (print_phdr): Check there is a SHT_PROGBITS section at the
2623	offset given by p_offsets for a PT_INTERP segment before trying to
2624	display the interpreter string.
2625
26262014-02-07  Mark Wielaard  <[email protected]>
2627
2628	* readelf.c (print_phdr): Check phdr->p_filesz and make sure
2629	interpreter string is zero terminated before calling printf.
2630
26312014-01-22  Mark Wielaard  <[email protected]>
2632
2633	* Makefile.am (nm_no_Wformat): Removed.
2634	(size_no_Wformat): Likewise.
2635	(strings_no_Wformat): Likewise.
2636	(addr2line_no_Wformat): Likewise.
2637	* size.c (show_sysv): Use fmtstr directly as literal in printf.
2638	(show_sysv_one_line): Likewise.
2639	* strings.c (locfmt): Removed.
2640	(radix): New static enum.
2641	(parse_opt): Set radix, not locfmt.
2642	(process_chunk_mb): Use fmtstr directly as literal in printf based
2643	on radix.
2644	(process_chunk): Likewise.
2645	* nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
2646	(show_symbols_bsd): Likewise.
2647	(show_symbols_posix): Likewise.
2648
26492014-01-21  Mark Wielaard  <[email protected]>
2650
2651	* stack.c (show_inlines): New static boolean.
2652	(print_frame): New function split out from...
2653	(print_frames): ..here. If show_inlines is true and we found a
2654	DIE for the frame address, call print_inline_frames otherwise
2655	call print_frame. Keep track of and track frame_nr.
2656	(print_inline_frames): New function.
2657	(parse_opt): Handle '-i'.
2658	(main): Add 'i' to options.
2659
26602014-01-27  Mark Wielaard  <[email protected]>
2661
2662	* stack.c (maxframes): Initialize to 256.
2663	(main): Document new default in options. Document magic number
2664	used in frames.allocated initialization.
2665
26662014-01-20  Mark Wielaard  <[email protected]>
2667
2668	* stack.c (show_debugname): New static boolean.
2669	(die_name): New function.
2670	(print_frames): If show_debugname is true set symname to the
2671	first function-like DIE with a name in scope for the address in
2672	the debuginfo.
2673	(parse_opt): Handle '-d'.
2674	(main): Add 'd' to options.
2675
26762014-01-20  Mark Wielaard  <[email protected]>
2677
2678	* addr2line.c (handle_address): Initialize scopes to NULL.
2679
26802014-01-17  Roland McGrath  <[email protected]>
2681
2682	* strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
2683	st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
2684	Don't use assert on input values, instead bail with "illformed" error.
2685
26862014-01-17  Roland McGrath  <[email protected]>
2687
2688	* readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
2689	(handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
2690	(handle_scngrp): Check for bogus sh_info.
2691
26922014-01-17  Jakub Jelinek  <[email protected]>
2693
2694	* elflint.c (section_name): Return "<invalid>" instead of
2695	crashing on invalid section name.
2696	(check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
2697	check_symtab_shndx, check_hash, check_versym): Robustify.
2698	(check_hash): Don't check entries beyond end of section.
2699	(check_note): Don't crash if gelf_rawchunk fails.
2700
27012014-01-17  Petr Machata  <[email protected]>
2702
2703	* readelf.c (handle_dynamic, handle_relocs_rel)
2704	(handle_relocs_rela, handle_versym, print_liblist):
2705	Use gelf_fsize instead of relying on shdr->sh_entsize.
2706
27072014-01-14  Mark Wielaard  <[email protected]>
2708
2709	* readelf.c (print_debug_macro_section): Clear vendor array before
2710	use.
2711
27122014-01-15  Jan Kratochvil  <[email protected]>
2713
2714	Fix corruption of non-C++ symbols by the demangler.
2715	* nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
2716	(show_symbols): Check for _Z.
2717	* stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
2718
27192014-01-02  Mark Wielaard  <[email protected]>
2720
2721	* stack.c (show_raw): Declare unconditionally.
2722	(parse_opt): Handle '-r' unconditionally.
2723	(main): Show "raw" option even without USE_DEMANGLE.
2724
27252014-01-02  Mark Wielaard  <[email protected]>
2726
2727	* stack.c (print_frames): Print 0x before build-id hex-offset.
2728
27292014-01-02  Mark Wielaard  <[email protected]>
2730
2731	* stack.c (maxframes): Increase to 2048.
2732	(struct frames): Add allocated field.
2733	(frame_callback): If frames used is frames allocated, realloc.
2734	(print_frames): Show an error if maxframes has been reached.
2735	(parse_opt): Allow -n 0 for unlimited frames.
2736	(main): Document -n 0 and new default 2048 frames. Allocate initial
2737	number of frames with malloc.
2738
27392013-12-30  Mark Wielaard  <[email protected]>
2740
2741	* stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
2742	or dwfl_core_file_attach and check for errors.
2743
27442013-12-28  Mark Wielaard  <[email protected]>
2745
2746	* stack.c (print_frames): Remove address width code and use...
2747	(get_addr_width): ...this new function.
2748	(show_modules): New static boolean.
2749	(module_callback): New static function.
2750	(parse_opt): Handle '-l'.
2751	(main): Add 'l' to options. If show_modules then use dwfl_getmodules
2752	with module_callback to show all detected modules and possible
2753	build_id, elf and dwarf files.
2754
27552013-12-27  Mark Wielaard  <[email protected]>
2756
2757	* stack.c (frames_shown): New static boolean.
2758	(EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
2759	(frame_callback): Return -1 on error. Don't print error.
2760	(print_frames): Add arguments, tid, dwflerr and what. Print tid.
2761	If there was an error report it with address and module if possible.
2762	Record whether any frames were actually printed.
2763	(thread_callback): Collect tid and err, pass it to print_frames.
2764	(parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
2765	if dwfl_linux_proc_report returned it. Check whether we are properly
2766	attached with dwfl_pid.
2767	(main): Document exit status. Don't report DWARF_CB_ABORT from
2768	callbacks as error. Pass real errors to print_frames. Return
2769	EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
2770	were any non-fatal errors.
2771
27722013-12-23  Mark Wielaard  <[email protected]>
2773
2774	* Makefile.am (stack_LDADD): Add demanglelib.
2775	* stack.c (show_quiet): New static boolean, default false.
2776	(show_raw): Likewise.
2777	(demangle_buffer_len): New static size_t.
2778	(demangle_buffer): New static char *.
2779	(print_frames): Don't resolve pc name if show_quiet. Demangle name
2780	unless show_raw.
2781	(parse_opt): Handle '-q' and '-r'.
2782	(main): Add 'q' and 'r' to options. Free demangle_buffer.
2783
27842013-12-23  Mark Wielaard  <[email protected]>
2785
2786	* stack.c (OPT_DEBUGINFO): New define.
2787	(OPT_COREFILE): Likewise.
2788	(pid): New static.
2789	(core_fd): Likewise.
2790	(core): Likewise.
2791	(exec): Likewise.
2792	(debuginfo_path): Likewise.
2793	(parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
2794	Do argument sanity checking. Setup Dwfl.
2795	(main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
2796	Remove argp_child children, simplify argp doc, remove custom
2797	usage message and construction of dwfl with dwfl_standard_argp.
2798	Use pid directly as tid. close core and core_fd if opened. Print
2799	pid of process or core.
2800
28012013-12-23  Mark Wielaard  <[email protected]>
2802
2803	* stack.c (show_build_id): New static boolean.
2804	(print_frames): Print module build-id, load address and pc offset
2805	if show_build_id is true.
2806	(parse_opt): Handle '-b'.
2807	(main): Add -b to options.
2808
28092013-12-22  Mark Wielaard  <[email protected]>
2810
2811	* stack.c (maxframes): New static unsigned. Initialize to 64.
2812	(struct frame): New struct.
2813	(struct frames): Likewise.
2814	(dwfl): New static Dwfl pointer.
2815	(frame_callback): Use arg as struct frames and fill it next frame.
2816	Return DWARF_CB_ABORT when maxframes has been reached. Move
2817	printing of frame to...
2818	(print_frames): ...here. New function.
2819	(thread_callback): Use arg as struct frames and set frames to zero.
2820	Call print_frames.
2821	(parse_opt): Handle '-n'.
2822	(main): Add -n to options. Allocate frames using maxframes. Pass
2823	frames to frame_callback and thread_callback.
2824
28252013-12-20  Mark Wielaard  <[email protected]>
2826
2827	* stack.c (show_one_tid): New static boolean.
2828	(parse_opt): Handle '-1'.
2829	(main): Add -1 to options. Call dwfl_getthread_frames when
2830	show_one_tid is true.
2831
28322013-12-18  Mark Wielaard  <[email protected]>
2833
2834	* addr2line.c (options): Add symbol-sections, 'x'.
2835	(show_symbol_sections): New static bool.
2836	(parse_opt): Handle 'x'.
2837	(print_addrsym): Use dwfl_module_addrinfo value.r
2838	Also show section of address with show_symbol_sections.
2839	(find_symbol): Use dwfl_module_getsym_info and set value.
2840	(handle_address): Request value and use it instead of sym.st_value.
2841	* readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
2842	name and offset.
2843
28442013-12-17  Masatake YAMATO  <[email protected]>
2845	    Mark Wielaard  <[email protected]>
2846
2847	* stack.c (show_activation, show_module, show_source): New variables.
2848	(parse_opt): Set show_activation if -a option is given.
2849	Set show_module if -m option is given. Set show_source if -s option
2850	is given. Set all show booleans when -v option is given.
2851	(main): Added `-a', `-m', `-s', and `-v' to the help message.
2852	(frame_callback): Print module and source file information.
2853
28542013-11-25  Petr Machata  <[email protected]>
2855
2856	* elflint.c (valid_e_machine): Add EM_AARCH64.
2857
28582013-11-14  Petr Machata  <[email protected]>
2859
2860	* readelf.c (handle_core_item) <'h'>: New branch for handling
2861	fields that shouldn't be displayed.
2862
28632013-11-10  Mark Wielaard  <[email protected]>
2864
2865	* stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
2866	ARGP_PROGRAM_BUG_ADDRESS_DEF.
2867	(print_version): New function.
2868
28692013-11-09  Mark Wielaard  <[email protected]>
2870
2871	* arlib.c (arlib_init): Call snprintf before using the result
2872	with memcpy.
2873	(arlib_finalize): Likewise.
2874	* nm.c (show_symbols_sysv): Don't modify cnt inside assert.
2875
28762013-11-07  Jan Kratochvil  <[email protected]>
2877
2878	* Makefile.am (bin_PROGRAMS): Add stack.
2879	(stack_LDADD): New.
2880	* stack.c: New file.
2881
28822013-11-05  Mark Wielaard  <[email protected]>
2883
2884	* readelf.c (print_debug_ranges_section): Cast address to size_t
2885	before comparison.
2886	(print_debug_loc_section): Likewise.
2887
28882013-10-18  Mark Wielaard  <[email protected]>
2889
2890	* ar.c (main): Correct operation check when instance_specifed is set.
2891
28922013-09-26  Petr Machata  <[email protected]>
2893
2894	* readelf.c (handle_file_note): New function.
2895	(handle_notes_data): Call it to handle NT_FILE notes.
2896
28972013-09-26  Petr Machata  <[email protected]>
2898
2899	* readelf.c (handle_siginfo_note): New function.
2900	(handle_notes_data): Call it to handle NT_SIGINFO notes.
2901	(buf_read_int, buf_read_ulong, buf_has_data): New functions.
2902
29032013-08-13  Mark Wielaard  <[email protected]>
2904
2905	* addr2line.c (options): Add "inlines", 'i'.
2906	(show_inlines): New bool.
2907	(parse_opt): Handle 'i'.
2908	(print_diesym): New static function.
2909	(print_src): New function taking code from...
2910	(handle_address): here. Call print_src. Print inlines.
2911
29122013-08-12  Mark Wielaard  <[email protected]>
2913
2914	* addr2line.c (main): If there is a newline char at end of buf,
2915	then remove it.
2916
29172013-07-05  Mark Wielaard  <[email protected]>
2918
2919	* readelf.c (print_ops): Take CU as argument, use it to print
2920	parameter_ref DIE offset.
2921	(struct listptr): Replace base field with cu.
2922	(listptr_base): New function.
2923	(compare_listptr): Use listptr_base.
2924	(notice_listptr): Take CU as argument.
2925	(skip_listptr_hole): Likewise.
2926	(print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
2927	(print_cfa_program): Pass NULL as CU to print_ops.
2928	(struct attrcb_args): Replace cu_base field with cu.
2929	(attr_callback): Pass cu not cu_base to notice_listptr.
2930	(print_debug_units): Don't calculate base, just set cu.
2931	(print_debug_loc_section): Pass cu to skip_listptr_hole and
2932	print_ops.
2933
29342013-05-06  Mark Wielaard  <[email protected]>
2935
2936	* readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
2937	argument as DIE offset.
2938
29392013-04-24  Mark Wielaard  <[email protected]>
2940
2941	* Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
2942
29432013-03-25  Mark Wielaard  <[email protected]>
2944
2945	* readelf.c (argp_options): Add decodedline.
2946	(decodedline): New boolean initialized to false.
2947	(parse_opt): Set decodedline when arg is decodedline.
2948	(print_decoded_line_section): New function.
2949	(print_debug_line_section): Call print_decoded_line_section when
2950	decodedline is true.
2951
29522013-03-25  Mark Wielaard  <[email protected]>
2953
2954	* readelf.c (argp_option): Add decodedaranges.
2955	(decodedaranges): New boolean initialized to false.
2956	(parse_opt): Set decodedaranges when arg is decodedaranges.
2957	(print_debug_aranges_section): Reimplemented and original
2958	implementation renamed to...
2959	(print_decoded_aranges_section): this.
2960
29612013-03-25  Mark Wielaard  <[email protected]>
2962
2963	* readelf.c (attrcb_args): Add Dwarf_Die.
2964	(attr_callback): When highpc is in constant form also print as
2965	address.
2966	(print_debug_units): Set args.die.
2967
29682013-03-19  Mark Wielaard  <[email protected]>
2969
2970	* readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
2971
29722013-03-18  Mark Wielaard  <[email protected]>
2973
2974	* readelf.c (print_gdb_index_section): Accept version 8.
2975
29762013-03-01  Mark Wielaard  <[email protected]>
2977
2978	* findtextrel.c (process_file): Release ELF and close file when not
2979	text relocations are found.
2980	* strip.c (handle_elf): Track memory used for .debuglink section data
2981	and free when done.
2982
29832013-02-24  Mark Wielaard  <[email protected]>
2984
2985	* elflint.c (check_symtab): Add __bss_start__ to the list of symbols
2986	allowed to have out of section values because of GNU ld bugs.
2987
29882013-02-06  Mark Wielaard  <[email protected]>
2989
2990	* elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
2991	list of symbols allowed to have out of section values because of
2992	GNU ld bugs in either .symtab or .dynsym, but only when they are
2993	zero sized.
2994
29952013-01-24  Mark Wielaard  <[email protected]>
2996
2997	* readelf.c (argp_option): Add unresolved-address-offsets, U.
2998	(print_unresolved_addresses): New static.
2999	(parse_opt): Handle 'U', set print_unprocessed_values.
3000	(format_dwarf_addr): Take and handle new raw argument.
3001	(print_ops): Call format_dwarf_addr with raw offset values.
3002	(print_debug_ranges_section): Likewise.
3003	(print_debug_frame_section): Likewise.
3004	(attr_callback): Likewise.
3005	(print_debug_line_section): Likewise.
3006	(print_debug_loc_section): Likewise.
3007	(print_gdb_index_section): Likewise.
3008
30092013-01-18  Mark Wielaard  <[email protected]>
3010
3011	* readelf.c (struct listptr): Add base Dwarf_Addr field.
3012	(compare_listptr): Warn for same offset with different base.
3013	(notice_listptr): Take base argument and set it.
3014	(skip_listptr_hole): Likewise.
3015	(struct attrcb_args): Removed unused cu_offset field.
3016	Add cu_base Dwarf_Addr field.
3017	(attr_callback): Call notice_listptr with cbargs->cu_base.
3018	(print_debug_units): Set args.cu_base.
3019	(print_debug_ranges_section): Get base and use for format_dwarf_addr.
3020	(print_debug_loc_section): Likewise.
3021
30222013-01-29  Jan Kratochvil  <[email protected]>
3023
3024	* readelf.c (handle_core_items): Limit special repeated items handling
3025	to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
3026
30272012-12-18  Mark Wielaard  <[email protected]>
3028
3029	* readelf.c (ELF_INPUT_SECTION): New argp key value.
3030	(argp_option): Add elf-section.
3031	(elf_input_section): New static.
3032	(parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
3033	(open_input_section): New function.
3034	(process_file): Call open_input_section if elf_input_section set.
3035
30362013-01-13  David Abdurachmanov  <[email protected]>
3037
3038	ar.c (do_oper_delete): Fix num passed to memset.
3039
30402012-12-21  Mark Wielaard  <[email protected]>
3041
3042	* readelf.c (print_debug_frame_section): Adjust FDE start address
3043	if pcrel before feeding it to format_dwarf_addr.
3044
30452012-12-21  Mark Wielaard  <[email protected]>
3046
3047	* addr2line.c (main): Call dwfl_end.
3048
30492012-12-11  Roland McGrath  <[email protected]>
3050
3051	* nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
3052	sh_name case.
3053	Reported by David Abdurachmanov <[email protected]>.
3054
30552012-10-16  Mark Wielaard  <[email protected]>
3056
3057	* readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
3058	calculated beginning after the operand and 2-byte constant.
3059
30602012-10-12  Jan Kratochvil  <[email protected]>
3061
3062	* readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
3063	(WRAP_COLUMN): ... here.
3064	(print_core_item): Remove parameter format_max.  Update function
3065	comment.  Replace FORMAT_MAX by the real output width.
3066	(handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
3067	calls of print_core_item, remove variable maxfmt, change
3068	ITEM_WRAP_COLUMN to WRAP_COLUMN.
3069	(handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
3070	calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
3071
30722012-10-11  Jan Kratochvil  <[email protected]>
3073
3074	* readelf.c (handle_core_item) <b>: Make run an outer block variable.
3075	Increase run only if LASTBIT != 0.  Print last element only if RUN > 0.
3076
30772012-08-27  Mark Wielaard  <[email protected]>
3078
3079	* readelf.c (print_debug_macro_section): Print offset as PRIx64.
3080
30812012-08-27  Mark Wielaard  <[email protected]>
3082
3083	* readelf.c (register_info): Handle loc == NULL.
3084
30852012-08-22  Jeff Kenton  <[email protected]>
3086
3087	* elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
3088
30892012-08-16  Mark Wielaard  <[email protected]>
3090
3091	* readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
3092	Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
3093	appropriate.
3094	(dwarf_attr_name): Likewise.
3095	(dwarf_form_name): Likewise.
3096	(dwarf_lang_name): Likewise.
3097	(dwarf_inline_name): Likewise.
3098	(dwarf_encoding_name): Likewise.
3099	(dwarf_access_name): Likewise.
3100	(dwarf_visibility_name): Likewise.
3101	(dwarf_virtuality_name): Likewise.
3102	(dwarf_identifier_case_name): Likewise.
3103	(dwarf_calling_convention_name): Likewise.
3104	(dwarf_ordering_name): Likewise.
3105	(dwarf_discr_list_name): Likewise.
3106	(print_ops): Remove KNOWN.  Use dwarf_locexpr_opcode_string.
3107	(attr_callback): Call new dwarf_foobar_name instead of old
3108	dwarf_foobar_string functions.
3109	(dwarf_tag_string): New function using known-dwarf.h macros.
3110	(dwarf_attr_string): Likewise.
3111	(dwarf_form_string): Likewise.
3112	(dwarf_lang_string): Likewise.
3113	(dwarf_inline_string): Likewise.
3114	(dwarf_encoding_string): Likewise.
3115	(dwarf_access_string): Likewise.
3116	(dwarf_visibility_string): Likewise.
3117	(dwarf_virtuality_string): Likewise.
3118	(dwarf_identifier_case_string): Likewise.
3119	(dwarf_calling_convention_string): Likewise.
3120	(dwarf_ordering_string): Likewise.
3121	(dwarf_discr_list_string): Likewise.
3122	(dwarf_locexpr_opcode_string): Likewise.
3123
31242012-06-27  Mark Wielaard  <[email protected]>
3125
3126	* readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
3127	DW_FORM_GNU_strp_alt.
3128	(attr_callback): Likewise.
3129
31302012-07-30  Petr Machata  <[email protected]>
3131
3132	* nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
3133	corresponding printf) so that those that are referenced by only
3134	one of the formatting strings are at the end.
3135
31362012-07-29  Mark Wielaard  <[email protected]>
3137
3138	* readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
3139	(print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
3140
31412012-07-19  Mark Wielaard  <[email protected]>
3142
3143	* readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
3144
31452012-07-11  Mark Wielaard  <[email protected]>
3146
3147	* readelf.c (options): Add macro to help of debug-dump.
3148	(section_e): Add section_macro.
3149	(section_all): Add section_macro.
3150	(parse_opt): Handle macro.
3151	(print_debug_macro_section): New function.
3152	(print_debug): Add NEW_SECTION (macro).
3153
31542012-07-10  Mark Wielaard  <[email protected]>
3155
3156	* readelf.c (print_gdb_index_section): Add version 7 support.
3157	Keep track of cu_nr. Print kind and static/global flag for each
3158	symbol. When a symbol is in the TU list add 'T'.
3159
31602012-06-26  Mark Wielaard  <[email protected]>
3161
3162	* readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
3163
31642012-06-22  Mark Wielaard  <[email protected]>
3165
3166	* readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
3167	for gcc 4.7 -Wformat.
3168
31692012-05-09  Roland McGrath  <[email protected]>
3170
3171	* elflint (check_sections): Allow zero sized sections at (filesz) end
3172	of segment. And make check overflow-proofed.
3173
31742012-04-24  Mark Wielaard  <[email protected]>
3175
3176	* readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
3177	DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
3178
31792012-03-28  Roland McGrath  <[email protected]>
3180
3181	* elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
3182
31832012-03-28  Mark Wielaard  <[email protected]>
3184
3185	* readelf.c (print_debug_abbrev_section): Check there is Dwarf
3186	section data.
3187	(print_debug_str_section): Likewise.
3188
31892012-03-21  Mark Wielaard  <[email protected]>
3190
3191	* readelf.c (print_gdb_index_section): Accept version 6.
3192
31932012-01-31  Mark Wielaard  <[email protected]>
3194
3195	* readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
3196
31972012-01-21  Ulrich Drepper  <[email protected]>
3198
3199	* addr2line.c: Update copyright year.
3200	* ar.c: Likewise.
3201	* elfcmp.c: Likewise.
3202	* elflint.c: Likewise.
3203	* findtextrel.c: Likewise.
3204	* ld.c: Likewise.
3205	* nm.c: Likewise.
3206	* objdump.c: Likewise.
3207	* ranlib.c: Likewise.
3208	* readelf.c: Likewise.
3209	* size.c: Likewise.
3210	* strings.c: Likewise.
3211	* strip.c: Likewise.
3212	* unstrip.c: Likewise.
3213
3214	* nm.c (argp_children): Define.
3215	(argp): Hook up argp_children.
3216	(handle_ar): Optimize puts call.
3217	(show_symbols_bsd): Use positional parameters to also print color
3218	codes.  Don't print STT_FILE symbols.
3219	* objdump.c (options): Improve help text.
3220	(argp_children): Define.
3221	(argp): Hook up argp_children.
3222	(disasm_info): Add elements for color codes.
3223	(disasm_output): Print color codes as well.
3224	(show_disasm): Set up disasm_info data for callback.
3225
32262012-01-20  Roland McGrath  <[email protected]>
3227
3228	* arlib-argp.c (arlib_deterministic_output): Initialize from
3229	configured value.
3230	(help_filter): New function.
3231	(argp): Use it.
3232
3233	* ar.c (main): Handle oper_none as usage error.
3234
3235	* arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
3236
3237	* ranlib.c (argp): Use arlib_argp_children.
3238
3239	* arlib.c (arlib_init): Obey arlib_deterministic_output.
3240
3241	* arlib-argp.c: New file.
3242	* Makefile.am (libar_a_SOURCES): Add it.
3243	* arlib.h (arlib_deterministic_output, arlib_argp_children):
3244	Declare new variables.
3245	* ar.c (deterministic_output): Variable removed.
3246	(do_oper_insert): Use arlib_deterministic_output instead.
3247	(options, parse_opt): Don't handle -D here.  Add group numbers.
3248	(argp): Use arlib_argp_children.
3249
32502011-12-20  Roland McGrath  <[email protected]>
3251
3252	* readelf.c (print_debug): Initialize DUMMY_DBG.elf.
3253	Reported by Karel Klic <[email protected]>.
3254
32552011-11-05  Roland McGrath  <[email protected]>
3256
3257	* ar.c (deterministic_output): New flag variable.
3258	(options, parse_opt): Grok -D to set it.
3259	(do_oper_insert): When set, use zero from mtime, uid, and gid.
3260
3261	* ar.c (do_oper_insert): Fix check on elf_rawfile return value.
3262
32632011-10-04  Marek Polacek  <[email protected]>
3264
3265	* readelf.c (register_info): Assume the right size of an array.
3266
32672011-10-03  Ulrich Drepper  <[email protected]>
3268
3269	* nm.c: Recognize option --mark-special.  Still recognize --mark-weak
3270	but don't show it in help anymore.
3271	(mark_special): Renamed from mark_weak.
3272	(parse_opt): Adjust.
3273	(class_type_char): Take additional parameters for ELF file and ELF
3274	header.  Treat TLS symbols like objects.
3275	In case of D symbols, show u for unique symbols, R for symbols in
3276	read-only sections, B for symbols in BSS sections.
3277	(show_symbols_bsd): Take additional parameters for ELF file and ELF
3278	header.  Adjust for class_type_char change.  Show TLS symbols with
3279	@ after them in case --mark-special is selected.
3280	(show_symbols_posix): Likewise.
3281	(show_symbols): Adjust calls to show_symbols_bsd and
3282	show_symbols_posix.
3283	(show_symbols_sysv): Avoid printing address and size for undefined
3284	symbols.  Don't print initial special entry and section entries.
3285
32862011-10-02  Ulrich Drepper  <[email protected]>
3287
3288	* Makefile.am (demanglelib): Define.
3289	(nm_LDADD): Add demanglelib.
3290	* nm.c (options): Add -C option.
3291	(demangle): Define as global variable.
3292	(parse_opt): Recognize -C.
3293	(show_symbols_sysv): Handle demangling.
3294	(show_symbols_bad): Likewise.
3295	(show_symbols_posix): Likewise.
3296	(show_symbols): Likewise.
3297
32982011-07-09  Roland McGrath  <[email protected]>
3299
3300	* readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
3301
3302	* ar.c (parse_opt): Grok -u.
3303
33042011-05-30  Mark Wielaard  <[email protected]>
3305
3306	* strip.c (relocate): Make offset check overflow-proof.
3307
33082011-05-23  Mark Wielaard  <[email protected]>
3309
3310	* strip.c (relocate): Take new arguments is_rela to indicate
3311	whether the relocation is from a SHT_REL or SHT_RELA section.
3312	Relocate against any debug section symbol, not just STT_SECTION
3313	symbols. For SHT_REL relocations, fetch addend from offset and
3314	add it to symbol value if not zero.
3315
33162011-05-23  Mark Wielaard  <[email protected]>
3317
3318	* strip.c (OPT_RELOC_DEBUG): New option.
3319	(argp_option): Add new --reloc-debug-sections option.
3320	(main): Check new option.
3321	(parse_opt): Likewise.
3322	(handle_elf): Remove any relocations between debug sections
3323	in ET_REL for the debug file when requested.
3324
33252011-05-18  Mark Wielaard  <[email protected]>
3326
3327	* strip.c (handle_elf): Make sure all sections of a removed group
3328	section are removed too. Don't discard SHT_GROUP sections, copy
3329	section table before it gets modified. Section group signature
3330	symbols don't have to be retained.
3331
33322011-05-16  Jakub Jelinek  <[email protected]>
3333
3334	* readelf.c (print_ops): Handle DW_OP_GNU_const_type,
3335	DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
3336	and DW_OP_GNU_reinterpret.
3337
33382011-05-17  Mark Wielaard  <[email protected]>
3339
3340	* readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
3341	DW_TAG_GNU_call_site_parameter return strings.
3342
33432011-05-11  Marek Polacek  <[email protected]>
3344
3345	* nm.c (show_symbols_sysv): Remove unused if/else, remove
3346	unused `prefix' and `fname' parameters.
3347
33482011-05-07  Marek Polacek  <[email protected]>
3349
3350	* unstrip.c (compare_sections_nonrel): Mark this function as static.
3351
33522011-04-26  Mark Wielaard  <[email protected]>
3353
3354	* readelf.c (handle_notes_data): Call ebl_object_note_type_name
3355	with note name.
3356
33572011-04-14  Mark Wielaard  <[email protected]>
3358
3359	* readelf.c (options): Add gdb_index.
3360	(section_e): Define section_gdb_index.
3361	(parse_opt): Recognize gdb_index debug-dump argument.
3362	(print_gdb_index_section): New function.
3363	(print_debug): Add gdb_index to debug_sections.
3364
33652011-03-24  Petr Machata  <[email protected]>
3366
3367	* readelf.c (print_debug_line_section): Emit initial space for all
3368	opcode lines.  Print offset in front of each opcode.
3369
33702011-03-22  Marek Polacek  <[email protected]>
3371
3372	* readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
3373
33742011-03-22  Mark Wielaard  <[email protected]>
3375
3376	* readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
3377	and DW_TAG_GNU_call_site_parameter.
3378	(dwarf_attr_string): Support DW_AT_GNU_call_site_value,
3379	DW_AT_GNU_call_site_data_value,
3380	DW_AT_GNU_call_site_target,
3381	DW_AT_GNU_call_site_target_clobbered,
3382	DW_AT_GNU_tail_call,
3383	DW_AT_GNU_all_tail_call_sites,
3384	DW_AT_GNU_all_call_sites,
3385	and DW_AT_GNU_all_source_call_sites.
3386	(print_ops): Handle DW_OP_GNU_entry_value.
3387	(attr_callback): Handle DW_AT_GNU_call_site_value,
3388	DW_AT_GNU_call_site_data_value,
3389	DW_AT_GNU_call_site_target,
3390	and DW_AT_GNU_call_site_target_clobbered.
3391
33922011-03-10  Mark Wielaard  <[email protected]>
3393
3394	* elflint.c (check_symtab): Use ebl_check_st_other_bits.
3395
33962011-02-27  Jan Kratochvil  <[email protected]>
3397
3398	* readelf.c (reset_listptr): Clear TABLE->TABLE.
3399
34002011-02-25  Mark Wielaard  <[email protected]>
3401
3402	* readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
3403	(dwarf_form_string): Properly format and return unknown form.
3404
34052011-02-23  Roland McGrath  <[email protected]>
3406
3407	* readelf.c (section_name): New function.
3408	(print_debug_abbrev_section): Use it instead of constant.
3409	(print_debug_aranges_section): Likewise.
3410	(print_debug_ranges_section): Likewise.
3411	(print_debug_units): Likewise.
3412	(print_debug_line_section): Likewise.
3413	(print_debug_loc_section): Likewise.
3414	(print_debug_macinfo_section): Likewise.
3415	(print_debug_pubnames_section): Likewise.
3416	(print_debug_str_section): Likewise.
3417	(print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
3418	(print_debug_abbrev_section): Use decoded d_size, not sh_size.
3419	(print_debug_str_section): Likewise.
3420
3421	* readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
3422
34232011-02-11  Roland McGrath  <[email protected]>
3424
3425	* elfcmp.c (verbose): New variable.
3426	(options, parse_opt): Grok -l/--verbose to set it.
3427	(main): Under -l, keep going after first difference.
3428
3429	* elfcmp.c (ignore_build_id): New variable.
3430	(options, parse_opt): Grok --ignore-build-id to set it.
3431	(main): For SHT_NOTE sections, compare note details rather than raw
3432	bytes.  Under --ignore-build-id, don't complain about differing build
3433	ID contents if lengths match.
3434
34352011-02-08  Roland McGrath  <[email protected]>
3436
3437	* ldscript.y (filename_id_star): Remove unused variable.
3438
3439	* unstrip.c (copy_elided_sections): Remove unused variable.
3440
3441	* elflint.c (check_dynamic): Remove unused variables.
3442
3443	* elflint.c (check_symtab): Warn about missing xndx section only once.
3444
3445	* ldgeneric.c (check_for_duplicate2): Remove unused variable.
3446
34472011-01-06  Roland McGrath  <[email protected]>
3448
3449	* strip.c (handle_elf): Under --strip-sections, remove all
3450	non-allocated sections and never generate .gnu_debuglink.
3451
34522011-01-04  Roland McGrath  <[email protected]>
3453
3454	* strip.c (remove_shdrs): New variable.
3455	(options, parse_opt): Grok --strip-sections to set it.
3456	(handle_elf): When that's set, truncate off .shstrtab and shdrs.
3457
34582010-11-10  Roland McGrath  <[email protected]>
3459
3460	* findtextrel.c (process_file): Don't assume order of sections.
3461	Reported by Mike Hommey <[email protected]>.
3462
34632010-07-26  Roland McGrath  <[email protected]>
3464
3465	* readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
3466
34672010-08-30  Roland McGrath  <[email protected]>
3468
3469	Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
3470	* readelf.c (parse_opt): Add section_info to implicit_debug_sections
3471	for ranges, loc.
3472	(struct listptr, struct listptr_table): New types.
3473	(compare_listptr, reset_listptr, sort_listptr): New functions.
3474	(notice_listptr, skip_listptr_hole): New functions.
3475	(struct attrcb_args): Add silent member.
3476	(attr_callback): Call notice_listptr for loclistptr and rangelistptr.
3477	Suppress output if silent, but still call notice_listptr.
3478	(print_debug_units): Suppress output if section_info not requested.
3479	(print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
3480	(print_debug_ranges_section): Likewise.
3481	(print_debug): Call reset_listptr on both tables.
3482
3483	* readelf.c (print_debug_ranges_section): Print empty list.
3484	(print_debug_loc_section): Likewise.
3485
3486	* readelf.c (print_debug_loc_section): Check for bogus length
3487	before calling print_ops.
3488	(print_ops): Check harder for bogus data that would read off end.
3489
34902010-08-11  Roland McGrath  <[email protected]>
3491
3492	* readelf.c (for_each_section_argument): Process all sections with
3493	matching name, not just the first.
3494
34952010-07-26  Roland McGrath  <[email protected]>
3496
3497	* readelf.c (print_ops): Take new argument for CU version.
3498	Fix DW_OP_call_ref decoding to depend on it.
3499	(print_debug_loc_section): Update caller.
3500	(print_cfa_program): Take new argument, pass it down.
3501	(print_debug_frame_section): Update caller.
3502	(struct attrcb_args): New member version.
3503	(print_debug_units): Initialize it.
3504
35052010-07-02  Roland McGrath  <[email protected]>
3506
3507	* readelf.c (print_debug_frame_section): Use format_dwarf_addr for
3508	initial_location.
3509
35102010-06-30  Roland McGrath  <[email protected]>
3511
3512	* strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
3513	Ignore st_size for a non-S_ISREG file descriptor.
3514	(read_block): Move assert after no-mmap bail-out.
3515	(read_block_no_mmap): Fix size calculations for moving buffer remnant.
3516
35172010-06-22  Roland McGrath  <[email protected]>
3518
3519	* readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
3520
35212010-06-21  Roland McGrath  <[email protected]>
3522
3523	* readelf.c (dwarf_tag_string): Handle new v4 tags.
3524	(dwarf_attr_string): Add new attributes.
3525	(dwarf_tag_string): Handle DW_TAG_GNU_*.
3526
3527	* readelf.c (print_ops): Use 64-bit types for LEB128 operands.
3528	(print_cfa_program): Likewise.
3529
35302010-06-20  Roland McGrath  <[email protected]>
3531
3532	* readelf.c (print_debug_units): New function, broken out of ...
3533	(print_debug_info_section): ... here.  Call it.
3534	(print_debug_types_section): New function.
3535	(enum section_e): Add section_types alias for section_info.
3536	(print_debug): Add types to the sections table.
3537
3538	* readelf.c (print_debug_frame_section): Handle version 4 format.
3539
3540	* readelf.c (print_debug_line_section): Handle version 4 format.
3541
35422010-06-14  Roland McGrath  <[email protected]>
3543
3544	* unstrip.c (copy_elided_sections): Make sure all sections' data have
3545	been read in before we write anything out.
3546
35472010-06-04  Roland McGrath  <[email protected]>
3548
3549	* unstrip.c (update_shdr): New function.
3550	(update_sh_size): Call it instead of gelf_update_shdr.
3551	(adjust_relocs, add_new_section_symbols): Likewise.
3552	(new_shstrtab, copy_elided_sections): Likewise.
3553
3554	* unstrip.c (copy_elided_sections): Bail if stripped file has more
3555	sections than unstripped file, rather than getting confused later.
3556
35572010-06-01  Roland McGrath  <[email protected]>
3558
3559	* readelf.c (dwarf_form_string): Handle DWARF 4 forms.
3560	(attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
3561	DW_FORM_sec_offset, DW_FORM_ref_sig8.
3562
3563	* readelf.c (print_debug): Don't bail if libdw setup fails.
3564	Suppress complaint if we only want .eh_frame anyway.
3565
35662010-05-28  Ulrich Drepper  <[email protected]>
3567
3568	* readelf.c (attr_callback): Also print form information.
3569
35702010-05-19  Roland McGrath  <[email protected]>
3571
3572	* addr2line.c (find_symbol): Short-circuit on empty name.
3573	(handle_address): Handle SYMBOL with no +OFFSET.
3574
35752010-05-08  Roland McGrath  <[email protected]>
3576
3577	* readelf.c (print_ops): Take new arg OFFSET_SIZE.
3578	Use that for DW_OP_call_ref, not ADDRSIZE.
3579	(print_cfa_program): Update caller.
3580	(struct attrcb_args): Add offset_size field.
3581	(attr_callback): Use it for print_ops call.
3582	(print_debug_info_section): Initialize it.
3583	(print_ops): Likewise.
3584
35852010-04-14  Roland McGrath  <[email protected]>
3586
3587	* readelf.c (handle_core_item): Fix bitmask printing.
3588
35892010-04-06  Roland McGrath  <[email protected]>
3590
3591	* ld.c (options): Fix some typos in messages.
3592	* elflint.c (check_scn_group, check_group): Likewise.
3593	* ldscript.y (add_id_list): Likewise.
3594	* readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
3595	before translated string containing a literal %.
3596
35972010-02-26  Roland McGrath  <[email protected]>
3598
3599	* readelf.c (process_file): Don't leak an fd in failure case.
3600
36012010-02-15  Roland McGrath  <[email protected]>
3602
3603	* Makefile.am: Use config/eu.am for common stuff.
3604
3605	* readelf.c (print_debug_frame_section): Add a cast to avoid sign
3606	mismatch in comparison.
3607
36082010-02-02  Roland McGrath  <[email protected]>
3609
3610	* readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
3611	(read_encoded): Likewise.
3612	(print_debug_frame_section): Check for bogus augmentation length.
3613	For P augmentation, use read_encoded, print the encoding description,
3614	and use hex for unsigned values.
3615
36162010-01-15  Roland McGrath  <[email protected]>
3617
3618	* ar.c: Include <sys/stat.h>.
3619	* elflint.c: Likewise.
3620	* readelf.c: Likewise.
3621	* strip.c: Likewise.
3622	* unstrip.c: Likewise
3623
36242010-01-07  Roland McGrath  <[email protected]>
3625
3626	* readelf.c (print_ehdr): Handle PN_XNUM.
3627	(phnum): New static variable.
3628	(process_elf_file): Set it with elf_getphdrnum.
3629	(print_phdr): Use phnum instead of EHDR->e_phnum.
3630	(print_dynamic, handle_notes): Likewise.
3631	(handle_relocs_rel, handle_relocs_rela): Likewise.
3632
3633	* elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
3634
3635	* elflint.c (phnum): New static variable.
3636	(check_elf_header): Set it, handling PN_XNUM.
3637	Use that in place of EHDR->e_phnum throughout.
3638	(check_symtab, check_reloc_shdr, check_dynamic): Likewise.
3639	(unknown_dependency_p, check_sections, check_program_header): Likewise.
3640
36412010-01-05  Roland McGrath  <[email protected]>
3642
3643	* readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
3644	DW_AT_GNU_template_name.
3645
36462010-01-04  Roland McGrath  <[email protected]>
3647
3648	* readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
3649	(handle_core_note): Pass NHDR and NAME to ebl_core_note.
3650	(handle_core_item): Handle .format of '\n' as \n-separated strings.
3651
3652	* readelf.c (implicit_debug_sections): New variable.
3653	(parse_opt): Set it instead of print_debug_sections for -a.
3654	OR them together for print_debug check.
3655	(print_debug): OR them together for section check.
3656
3657	* readelf.c (options): Repartition into set implied by -a and others.
3658	Correct -a text to match reality.
3659
3660	* readelf.c (struct section_argument): Add bool member 'implicit'.
3661	(parse_opt): Set it for -a cases, clear it for -x args.
3662	(for_each_section_argument): Don't complain about a missing section by
3663	name if it's implicit.
3664
36652009-11-16  Roland McGrath  <[email protected]>
3666
3667	* readelf.c (print_string_section): Punt SHT_NOBITS like empty
3668	sections, just as dump_data_section already does.
3669
36702009-09-21  Ulrich Drepper  <[email protected]>
3671
3672	* elflint.c (special_sections): Allow MERGE and STRINGS flags to be
3673	set for .comment section.
3674	Patch by Mark Wielaard <[email protected]>.
3675
36762009-09-08  Roland McGrath  <[email protected]>
3677
3678	* ar.c (main): Fix typo in message format.
3679
36802009-08-21  Roland McGrath  <[email protected]>
3681
3682	* readelf.c (attr_callback): Use print_block only when we don't use
3683	print_ops.
3684
36852009-08-14  Roland McGrath  <[email protected]>
3686
3687	* ar.c (do_oper_extract): Use pathconf instead of statfs.
3688
36892009-08-01  Ulrich Drepper  <[email protected]>
3690
3691	* debugpred.h: Add two most const.
3692
36932009-07-26  Mark Wielaard  <[email protected]>
3694
3695	* elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
3696
36972009-07-25  Mark Wielaard  <[email protected]>
3698
3699	* Makefile.am (addr2line_LDADD): Add $(libelf).
3700
37012009-07-24  Roland McGrath  <[email protected]>
3702
3703	* readelf.c (print_block): New function.
3704	(print_ops): Use it.
3705	(attr_callback): Use it for DW_FORM_block* forms.
3706
37072009-07-20  Mark Wielaard  <[email protected]>
3708
3709	* readelf.c (print_ops): Add handling of DW_OP_implicit_value
3710	and DW_OP_stack_value.
3711
37122009-07-14  Ulrich Drepper  <[email protected]>
3713
3714	* elflint.c (check_elf_header): Allow Linux ABI.
3715	(check_symtab): Handle STB_GNU_UNIQUE.
3716
37172009-07-08  Mark Wielaard  <[email protected]>
3718
3719	* readelf.c (attr_callback): Handle DW_Form constants for
3720	DW_AT_data_member_location.
3721
37222009-07-06  Roland McGrath  <[email protected]>
3723
3724	* readelf.c (register_info): New function.  Handle unknown register #s.
3725	(print_cfa_program): Use it.
3726	(handle_core_register, handle_core_registers): Likewise.
3727
37282009-06-28  Roland McGrath  <[email protected]>
3729
3730	* readelf.c (print_address_names): New static variable.
3731	(options, parse_opt): Grok -N/--numeric-addresses to clear it.
3732	(format_dwarf_addr): Don't look up name if !print_address_names.
3733
37342009-06-13  Ulrich Drepper  <[email protected]>
3735
3736	* ldgeneric.c: Don't use deprecated libelf functions.
3737	* nm.c: Likewise.
3738	* objdump.c: Likewise.
3739	* readelf.c: Likewise.
3740	* size.c: Likewise.
3741	* strip.c: Likewise.
3742	* unstrip.c: Likewise.
3743	* ld.h: Fix up comment.
3744
37452009-06-01  Ulrich Drepper  <[email protected]>
3746
3747	* readelf.c (print_relocs): Expect ELF header argument and pass on
3748	to handle_relocs_rel* functions. Adjust caller.
3749	(handle_relocs_rel): Add ELF header argument.  Add special case for
3750	the IRELATIVE relocations in statically linked executables.
3751	(handle_relocs_rela): Likewise.
3752
37532009-04-29  Ulrich Drepper  <[email protected]>
3754
3755	* elflint.c (check_symtab): Add tests of st_other field.
3756
37572009-04-23  Ulrich Drepper  <[email protected]>
3758
3759	* Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
3760
37612009-04-20  Roland McGrath  <[email protected]>
3762
3763	* addr2line.c (print_dwarf_function): Honor -s and -A for file names
3764	of inline call sites.
3765
3766	* addr2line.c (just_section): New variable.
3767	(adjust_to_section): New function, broken out of ...
3768	(handle_address): ... here.
3769	(options, parse_opt): Add -j/--section=NAME to set it.
3770
37712009-04-15  Roland McGrath  <[email protected]>
3772
3773	* readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
3774	64-bit format header, DW_CIE_ID_32 in 32-bit format header.
3775
37762009-04-14  Roland McGrath  <[email protected]>
3777
3778	* readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
3779	like SHT_GNU_ATTRIBUTES.
3780
3781	* readelf.c (handle_core_registers): Fix error message.
3782
3783	* strip.c (handle_elf: check_preserved): Don't note any change when
3784	.debug_data is already filled from a previous pass.
3785
37862009-02-05  Ulrich Drepper  <[email protected]>
3787
3788	* objdump.c (show_relocs_x): Minor cleanups.
3789
3790	* readelf.c (print_cfa_program): Correct a few labels.
3791	Print first DW_CFA_expression and DW_CFA_val_expression parameter
3792	as register.
3793
37942009-02-01  Ulrich Drepper  <[email protected]>
3795
3796	* objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
3797	into ...
3798	(show_relocs_x): ...here.  New function.
3799	(show_relocs): Better spacing in output.
3800
3801	* objdump.c (show_relocs_rela): Show offsets as signed values.
3802
3803	* ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
3804	Improve some error messages.
3805	Use program_invocation_short_name instead of AR macro.
3806	* Makefile.am (CFLAGS_ar): Remove.
3807	* elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
3808	* objdump.c (parse_opt): Likewise.
3809	* readelf.c (parse_opt): Likewise.
3810
38112009-01-27  Roland McGrath  <[email protected]>
3812
3813	* readelf.c (print_ops): Notice short length, don't overrun buffer
3814	(still need to fix LEB128).
3815
3816	* readelf.c (print_ops): Fix DW_OP_call[24] decoding.
3817
3818	* readelf.c (print_ops): Print (empty)\n when LEN == 0.
3819
38202009-01-24  Ulrich Drepper  <[email protected]>
3821
3822	* readelf.c (print_debug_frame_section): Fix computation of vma_base
3823	for PC-relative mode.
3824
38252009-01-23  Ulrich Drepper  <[email protected]>
3826
3827	* size.c (process_file): When handling archive, close file descriptor
3828	here.  For unknown file format also close file descriptor.
3829	(handle_ar): Don't close file descriptor here.
3830
3831	* readelf.c (parse_opt): Move code to add to dump_data_sections and
3832	string_sections list in local function add_dump_section.  Adjust 'x'
3833	key handling.  For 'a' key add .strtab, .dynstr, and .comment section
3834	to string_sections list.
3835
38362009-01-22  Roland McGrath  <[email protected]>
3837
3838	* readelf.c (print_phdr): Don't print section mapping when no sections.
3839
3840	* Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
3841
3842	* readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
3843	and reset it only for the 'true' cases.
3844
3845	* Makefile.am (addr2line_no_Wformat): New variable.
3846
3847	* readelf.c (print_debug_frame_section): Use t instead of j formats
3848	for ptrdiff_t OFFSET.
3849
38502009-01-21  Ulrich Drepper  <[email protected]>
3851
3852	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
3853	test.  Handle debuginfo files.
3854	(check_exception_data): First sanity test.
3855
38562009-01-17  Ulrich Drepper  <[email protected]>
3857
3858	* readelf.c (print_debug_exception_table): Show target of ar_disp
3859	field.
3860
3861	* elflint.c (check_program_header): Add most consistency checks for
3862	PT_GNU_EH_FRAME entry.
3863
3864	* addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
3865	ARGP_PROGRAM_BUG_ADDRESS_DEF.
3866	* ar.c: Likewise.
3867	* elfcmp.c: Likewise.
3868	* elflint.c: Likewise.
3869	* findtextrel.c: Likewise.
3870	* ld.c: Likewise.
3871	* nm.c: Likewise.
3872	* objdump.c: Likewise.
3873	* ranlib.c: Likewise.
3874	* readelf.c: Likewise.
3875
3876	* size.c: Likewise.
3877	* strings.c: Likewise.
3878	* strip.c: Likewise.
3879	* unstrip.c: Likewise.
3880
38812009-01-16  Ulrich Drepper  <[email protected]>
3882
3883	* elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
3884	matches .eh_frame_hdr section, if it is available.  Also check that
3885	the segment is allocated, not writable, not executable.
3886
3887	* readelf.c: Add -e option.  Dump exception and unwind related
3888	sections.  Add -e to -a.
3889	(print_encoding_base): Handle DW_EH_PE_omit.
3890	(print_debug_exception_table): Beginning of support.
3891	(print_debug): Hook up print_debug_exception_table for
3892	.gcc_except_table sections.
3893
3894	* readelf.c (print_debug_frame_section): Some fixes for last change.
3895
38962009-01-15  Ulrich Drepper  <[email protected]>
3897
3898	* readelf.c (print_encoding): Now a toplevel function.
3899	(print_relinfo): Likewise.
3900	(print_encoding_base): Broken out of print_debug_frame_section.
3901	(print_debug_frame_section): Print different header for .eh_frame
3902	sections.  Fix recognition of matching CIEs in .debug_frame sections.
3903	Print absolute offset for PC-relative FDE locations.  Don't print
3904	table header for FDEs if the table is empty.
3905	(read_encoded): New function.
3906	(print_debug_frame_hdr_section): New function.
3907	(print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
3908	sections.
3909
3910	* readelf.c (handle_relocs_rel): Print section number.
3911	(print_debug_abbrev_section): Likewise.
3912	(print_debug_aranges_section): Likewise.
3913	(print_debug_ranges_section): Likewise.
3914	(print_debug_info_section): Likewise.
3915	(print_debug_line_section): Likewise.
3916	(print_debug_loc_section): Likewise.
3917	(print_debug_macinfo_section): Likewise.
3918	(print_debug_pubnames_section): Likewise.
3919	(print_debug_str_section): Likewise.
3920
39212009-01-10  Ulrich Drepper  <[email protected]>
3922
3923	* strings.c (read_block): Fix typo in error message string.
3924
39252009-01-07  Ulrich Drepper  <[email protected]>
3926
3927	* ld.c (ld_new_searchdir): Fix adding to search path list.
3928
39292009-01-06  Ulrich Drepper  <[email protected]>
3930
3931	* readelf.c: Implement call frame debug section dumping.
3932
39332009-01-05  Roland McGrath  <[email protected]>
3934
3935	* elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
3936	Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
3937
39382009-01-01  Ulrich Drepper  <[email protected]>
3939
3940	* addr2line.c: Update copyright year.
3941	* ar.c: Likewise.
3942	* elfcmp.c: Likewise.
3943	* elflint.c: Likewise.
3944	* findtextrel.c: Likewise.
3945	* ld.c: Likewise.
3946	* nm.c: Likewise.
3947	* objdump.c: Likewise.
3948	* ranlib.c: Likewise.
3949	* readelf.c: Likewise.
3950	* size.c: Likewise.
3951	* strings.c: Likewise.
3952	* strip.c: Likewise.
3953	* unstrip.c: Likewise.
3954
39552008-12-11  Roland McGrath  <[email protected]>
3956
3957	* nm.c (sym_name): New function.
3958	(show_symbols_sysv): Use it in place of elf_strptr.
3959	(show_symbols_bsd, show_symbols_posix): Likewise.
3960	Fixes RHBZ#476136.
3961
3962	* nm.c (show_symbols_sysv): Use an alloca'd backup section name when
3963	elf_strptr fails.
3964
39652008-12-02  Roland McGrath  <[email protected]>
3966
3967	* readelf.c (count_dwflmod, process_file): Don't presume encoding of
3968	nonzero OFFSET argument to dwfl_getmodules.
3969
39702008-08-07  Roland McGrath  <[email protected]>
3971
3972	* addr2line.c (main): Pass string to handle_address.
3973	(see_one_module): New function, subroutine of handle_address.
3974	(find_symbol): Likewise.
3975	(handle_address): Take string argument rather than address.
3976	Convert plain number, or handle strings like "(section)+offset"
3977	or "symbol+offset".
3978
39792008-08-01  Roland McGrath  <[email protected]>
3980
3981	* readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
3982	For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
3983
3984	* readelf.c (convert): Take new argument SIZE.
3985	(handle_core_register, handle_core_item): Update callers.
3986	(handle_core_item): Take new arg REPEATED_SIZE.
3987	(handle_core_items): Special case for a singleton item,
3988	let handle_core_item handle repeats if it wants to.
3989
3990	* readelf.c (handle_core_items): Give abridged output
3991	for identical groups repeated more than twice.
3992
39932008-07-04  Roland McGrath  <[email protected]>
3994
3995	* readelf.c (handle_core_items): Handle ELF_T_ADDR.
3996
39972008-04-10  Roland McGrath  <[email protected]>
3998
3999	* strip.c (handle_elf): Don't keep sections that kept symbol tables
4000	refer to.  Instead, just be sure to preserve the original symbol
4001	table in the debug file so those symbols go with their sections and
4002	can be elided from the stripped version of the symbol table.
4003
4004	* strip.c (handle_elf): When a discarded section kept in the debug
4005	file refers to a nondiscard section via sh_link/sh_info, preserve
4006	that nondiscarded section unmodified in the debug file as well.
4007	Skip adjustment of discarded sections symbol table references when
4008	that symbol table is copied in this way.
4009
4010	* elflint.c (check_symtab): Don't crash from missing symbol names
4011	after diagnosing bogus strtab.
4012
4013	* strip.c (handle_elf): Cosmetic cleanup in special section contents
4014	adjustment for symtab changes.
4015
40162008-03-31  Roland McGrath  <[email protected]>
4017
4018	* elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
4019	must be SHT_PROGBITS, must not be SHF_WRITE.  Let backend hook
4020	excuse a special section.
4021
40222008-03-27  Roland McGrath  <[email protected]>
4023
4024	* elflint.c (check_sections): Check that executability and writability
4025	of sections is reflected in segment p_flags.
4026
40272008-03-26  Roland McGrath  <[email protected]>
4028
4029	* elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
4030	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
4031	is valid in RELRO.
4032
40332008-02-29  Roland McGrath  <[email protected]>
4034
4035	* readelf.c (print_attributes): Add a cast.
4036	* elflint.c (check_attributes): Likewise.
4037
4038	* unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
4039	with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
4040	(add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
4041
40422008-02-03  Ulrich Drepper  <[email protected]>
4043
4044	* i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
4045	when linked into executable.
4046	(elf_i386_create_relocations): Likewise.
4047
40482008-02-20  Roland McGrath  <[email protected]>
4049
4050	* readelf.c (print_attributes): New function.
4051	(process_elf_file): Call it under -A.
4052
4053	* elflint.c (check_attributes): Implement it for real.
4054
40552008-02-19  Roland McGrath  <[email protected]>
4056
4057	* elflint.c (special_sections): Handle .gnu.attributes section.
4058	(check_sections): Likewise.
4059	(check_attributes): New function.
4060
40612008-02-10  Roland McGrath  <[email protected]>
4062
4063	* elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
4064	sections and ET_REL files.
4065
40662008-02-02  Ulrich Drepper  <[email protected]>
4067
4068	* elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
4069	* i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
4070	and R_386_TLS_LE.
4071	(elf_i386_create_relocations): Likewise.
4072	* ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
4073	elements.
4074	* ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
4075	(ld_generic_create_outfile): Add PT_TLS entry to program  header.
4076	Fix generation of PT_GNU_STACK entry.
4077
40782008-02-01  Ulrich Drepper  <[email protected]>
4079
4080	* ld.c (replace_args): Prevent loop over replacements if the parameter
4081	is only two characters long.
4082
4083	* ld.c: Recognize sha1 argument for --build-id parameter.
4084	* ldgeneric.c (create_build_id_section): Handle sha1.
4085	(compute_hash_sum): New function.  Broken out of compute_build_id.
4086	Take hash function and context as parameters.
4087	(compute_build_id): Use compute_hash_sum for md5 and the new sha1
4088	implementation.
4089
40902008-01-31  Ulrich Drepper  <[email protected]>
4091
4092	* elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
4093	* ld.c: Recognize --build-id command line parameter.
4094	* ld.h: Define scn_dot_note_gnu_build_id.
4095	(struct ld_state): Add build_id and buildidscnidx elements.
4096	* ldgeneric.c: Implement --build-id command line parameter.
4097	* ldlex.l (ID): Recognize - as valid character after the first one.
4098
40992008-01-29  Ulrich Drepper  <[email protected]>
4100
4101	* ld.c (replace_args): New function.
4102	(main): Use it to rewrite old-style parameters.
4103
4104	* elf32-i386.script: Add .gnu.hash section.
4105	* ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
4106	(fillin_special_symbol): Initialize st_size.
4107	(sortfct_hashval): New function.
4108	(create_gnu_hash): New function.
4109	(create_hash): New function.
4110	(ld_generic_create_outfile): Use the new functions to create the
4111	hash tables.
4112
4113	* elflint.c (check_gnu_hash): Fix index value printed in error message.
4114
41152008-01-24  Ulrich Drepper  <[email protected]>
4116
4117	* elflint.c (check_group): Check that signature symbol for section
4118	group is not an empty string.
4119	* ldgeneric.c: Remove magic assignment of indices in the dynsym
4120	section.  Start implementation of --hash-style.
4121	* i386_ld.c: Likewise.
4122	* ld.c: Recognize --hash-style.
4123	* ld.h (struct scninfo): Add comdat_group.
4124	Add additional parameter to finalize_plt callback.
4125
41262008-01-22  Ulrich Drepper  <[email protected]>
4127
4128	* ld.h (struct callbacks): Add initialize_gotplt.
4129	(struct scnhead): Add scn_dot_gotplt.
4130	(struct ld_state): Add gotpltscnidx.
4131	* i386_ld.c (elf_i386_initialize_plt): Minor optimization.
4132	(elf_i386_initialize_pltrel): Likewise.
4133	(elf_i386_initialize_got): There is now a separate .got.plt, so
4134	don't do the PLT-related work here.  Initialize d_type.
4135	(elf_i386_initialize_gotplt): New function.
4136	(elf_i386_plt0): Use ud2a after indirect jump.
4137	(elf_i386_pic_plt0_entry): Likewise.
4138	(elf_i386_finalize_plt): Reference now .got.plt.
4139	(elf_i386_count_relocations): For GOT entries which need no relocation
4140	don't bump nrel_got.
4141	(elf_i386_create_relocations): Also get .got.plt.  Rewrite R-386_GOT32
4142	handling for split .got/.got.plt.
4143	(elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
4144	* elf32-i386.script: Sort sections for security.  There are no .got
4145	input sections.  Add .got.plt.
4146	* ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
4147	(ld_generic_create_outfile): Initialize .got.plt section.
4148	Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
4149
41502008-01-19  Ulrich Drepper  <[email protected]>
4151
4152	* i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
4153	symbols are not carried over into statically linked output files.
4154	Add dummy entries for more TLS relocations.
4155
4156	* ld.c (options): Add long names for -( and -).
4157
4158	* ldgeneric.c (check_definition): For newly found definitions don't
4159	mark section as used if symbol is absolute.
4160	(extract_from_archive): Only assign archive sequence number the first
4161	time the archive is handled.  Update ld_state.last_archive_used
4162	if any symbol was used.  Remove nround variable.
4163	(file_process2): When using symbol from an archive, update
4164	ld_state.group_start_archive, ld_state.archives, and
4165	ld_state.tailarchives.
4166	(ld_generic_file_process): If group is not handled anymore, after
4167	freeing ELF handles for the archives, clear ld_state.archives and
4168	*nextp.  Fix wrong logic in recognizing first iteration of group
4169	loop.  When clearing flags, also clear ld_state.group_start_archive.
4170
41712008-01-11  Ulrich Drepper  <[email protected]>
4172
4173	* objdump.c (show_disasm): Adjust disassembler format string for
4174	removal of %e.
4175
41762008-01-04  Roland McGrath  <[email protected]>
4177
4178	* readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
4179	a size greater than the items cover means multiple sets of items.
4180	(handle_core_note): Update caller.
4181
41822008-01-04  Roland McGrath  <[email protected]>
4183
4184	* strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
4185
41862008-01-03  Roland McGrath  <[email protected]>
4187
4188	* ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
4189
4190	* elflint.c (check_dynamic): Remove duplicate initializer.
4191
41922008-01-02  Ulrich Drepper  <[email protected]>
4193
4194	* addr2line.c: Update copyright year.
4195	* ar.c: Likewise.
4196	* elfcmp.c: Likewise.
4197	* elflint.c: Likewise.
4198	* findtextrel.c: Likewise.
4199	* ld.c: Likewise.
4200	* nm.c: Likewise.
4201	* objdump.c: Likewise.
4202	* ranlib.c: Likewise.
4203	* readelf.c: Likewise.
4204	* size.c: Likewise.
4205	* strings.c: Likewise.
4206	* strip.c: Likewise.
4207	* unstrip.c: Likewise.
4208
42092007-12-30  Ulrich Drepper  <[email protected]>
4210
4211	* objdump (show_disasm): Use %e after third parameter.
4212
42132007-12-21  Ulrich Drepper  <[email protected]>
4214
4215	* strip.c: Fix wrong parenthesis in a few branch predictions.
4216	* strings.c: Likewise.
4217
42182007-12-20  Ulrich Drepper  <[email protected]>
4219
4220	* Makefile.am (DEFS): Add DEBUGPRED.
4221	* addr2line.c: Include debugpred.h.
4222	* ar.c: Likewise.
4223	* elfcmp.c: Likewise.
4224	* elflint.c: Likewise.
4225	* findtextrel.c: Likewise.
4226	* nm.c: Likewise.
4227	* objdump.c: Likewise.
4228	* ranlib.c: Likewise.
4229	* readelf.c: Likewise.
4230	* size.c: Likewise.
4231	* strings.c: Likewise.
4232	* strip.c: Likewise.
4233	* unstrip.c: Likewise.
4234	* debugpred.h: New file.
4235
4236	* readelf.c (handle_relocs_rel): Use elf_scnshndx.
4237	(handle_relocs_rela): Likewise.
4238
4239	* readelf.c: Add lots of likely/unlikely.
4240
4241	* elflint.c: Minor cleanups.
4242
42432007-11-19  Roland McGrath  <[email protected]>
4244
4245	* readelf.c (print_ops): Handle all bad op codes gracefully.
4246	Print their numbers instead of just ???.
4247
42482007-11-09  Roland McGrath  <[email protected]>
4249
4250	* readelf.c (attr_callback): Handle DW_AT_data_location.
4251	Handle block forms to mean a DWARF expression for DW_AT_allocated,
4252	DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
4253	DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
4254	DW_AT_upper_bound.
4255
42562007-10-20  Roland McGrath  <[email protected]>
4257
4258	* unstrip.c (options): Update -R description.
4259	(struct symbol): Put symbol details a union with a size_t pointer
4260	`duplicate'.
4261	(compare_symbols_output): Use null ->name as marker for discard
4262	symbols, not zero *->map.
4263	(copy_elided_sections): Record forwarding pointers for discarded
4264	duplicates and fill SYMNDX_MAP elements through them.
4265
4266	* readelf.c (process_file): Set offline_next_address to 0 at start.
4267	(struct process_dwflmod_args): New type.
4268	(process_dwflmod): Take args in it, pass fd to process_elf_file.
4269	(process_file): Update caller; dup FD for passing to libdwfl.
4270	(process_elf_file): Take new arg FD.  For ET_REL file when
4271	displaying data affected by libdwfl relocation, open a new Elf handle.
4272
42732007-10-17  Roland McGrath  <[email protected]>
4274
4275	* readelf.c (print_debug_line_section): For invalid data inside a
4276	unit with plausible length, keep printing at the next unit boundary.
4277
4278	* readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
4279
42802007-10-16  Roland McGrath  <[email protected]>
4281
4282	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
4283
42842007-10-15  Roland McGrath  <[email protected]>
4285
4286	* make-debug-archive.in: New file.
4287	* Makefile.am (EXTRA_DIST): Add it.
4288	(make-debug-archive): New target.
4289	(bin_SCRIPTS, CLEANFILES): Add it.
4290
42912007-10-10  Roland McGrath  <[email protected]>
4292
4293	* elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
4294	Use it to check MERGE|STRINGS for .debug_str.
4295	(check_sections): Handle exact_or_gnuld.
4296
42972007-10-08  Roland McGrath  <[email protected]>
4298
4299	* readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
4300	64-bit struct timeval with 32-bit tv_usec.
4301
43022007-10-07  Roland McGrath  <[email protected]>
4303
4304	* readelf.c (check_archive_index): New function.
4305	(process_file): Call it.  Change signature to take only fd and name.
4306	Use libdwfl to open the file, then iterate on its modules (multiple
4307	for an archive) to print file name and call process_elf_file.
4308	(main): Update caller.  Let process_file do elf_begin.
4309	(count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
4310	(process_elf_file): Take only Dwfl_Module * argument.
4311	Don't print the file name here.
4312	(print_debug_*_section): Take Dwfl_Module * argument.
4313	(print_debug): Likewise.  Update caller.
4314	(format_dwarf_addr): New function.
4315	(print_debug_ranges_section): Use it.
4316	(attr_callback): Likewise.
4317	(print_debug_line_section, print_debug_loc_section): Likewise.
4318
4319	* readelf.c (print_debug_ranges_section): Translate all strings.
4320	(print_debug_loc_section): Likewise.
4321
4322	* unstrip.c (copy_elided_sections): Initialize SEC.
4323
4324	* ar.c (do_oper_insert): Put trailing / on short names.
4325
4326	* arlib.h (MAX_AR_NAME_LEN): Decrease by one.
4327
4328	* arlib2.c (arlib_add_long_name): Adjust for header size.
4329
4330	* arlib.c (arlib_finalize): Pad long name table to keep size even.
4331
4332	* ar.c (do_oper_insert): Use write_retry for padding write.
4333
4334	* ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
4335	Unconditionally set FOUND[CNT]->elf when setting ->mem.
4336	(remember_long_name): New function.
4337	(do_oper_insert): Call it.  Correctly use length of basename,
4338	not original name.  Don't store long name twice for new member.
4339
43402007-10-06  Roland McGrath  <[email protected]>
4341
4342	* elflint.c (check_note): Skip empty segment.
4343	(check_note_section): Skip empty section.
4344
4345	* unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
4346	(handle_output_dir_module, handle_implicit_modules): Pass it down.
4347	(handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
4348	(compare_alloc_sections): Take new arg REL, ignore address if true.
4349	(compare_sections): Likewise, pass it down.
4350	(compare_sections_rel, compare_sections_nonrel): New functions.
4351	(find_alloc_sections_prelink, copy_elided_sections): Use them
4352	instead of compare_sections.
4353	(sections_match): New function, broken out of ...
4354	(find_alloc_section): ... here.
4355	(copy_elided_sections): Reorganize section match-up logic.
4356	Use sections_match for SHF_ALLOC in ET_REL.
4357	For ET_REL, let the nonzero sh_addr from the debug file dominate.
4358
4359	* unstrip.c (add_new_section_symbols): Take new arg REL.
4360	When true, do not update section symbol values.
4361	(collect_symbols): Likewise.  Update section symbols with address
4362	of chosen output section, not original section.
4363	(check_symtab_section_symbols, copy_elided_sections): Update callers.
4364
4365	* unstrip.c (compare_alloc_sections): At the same address, preserve
4366	original section order.
4367
4368	* elflint.c (special_sections): Don't require MERGE|STRINGS for
4369	.debug_str, it didn't always have them with older tools.
4370
4371	* elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
4372
43732007-10-05  Roland McGrath  <[email protected]>
4374
4375	* elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
4376	ET_REL file.
4377
4378	* elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
4379	SHN_UNDEF as "bad section".  Use shndx value in messages.
4380
4381	* elflint.c (special_sections): Add ".debug_str".  Decrement namelen
4382	for ".debug" so it matches as a prefix.
4383	(IS_KNOWN_SPECIAL): New macro.
4384	(check_sections): Use it for ".plt" match.  Cite wrong SHT_NOBITS
4385	type even under -d, for a .debug* or .shstrtab section.
4386
4387	* readelf.c (print_ops): Use hex for address operand.
4388
43892007-10-04  Roland McGrath  <[email protected]>
4390
4391	* unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
4392	.gnu_debuglink section to SHN_UNDEF.  Drop STT_SECTION symbols for
4393	sections mapped to SHN_UNDEF.
4394
43952007-10-04  Ulrich Drepper  <[email protected]>
4396
4397	* readelf.c (dump_archive_index): Avoid warning about uninitialized
4398	variable with older glibc versions.
4399	Add some branch prediction.
4400
44012007-10-04  Roland McGrath  <[email protected]>
4402
4403	* readelf.c (print_archive_index): New variable.
4404	(options, parse_opt): Accept -c/--archive-index to set it.
4405	(dump_archive_index): New function.
4406	(process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
4407	Call dump_archive_index on archives if set.
4408	(main): Update caller.
4409	(any_control_option): Give it file scope, moved out of ...
4410	(parse_opt): ... here.
4411
44122007-10-03  Roland McGrath  <[email protected]>
4413
4414	* unstrip.c (struct arg_info): Add `list' flag.
4415	(options, parse_opt): Grok -n/--list to set it.
4416	(list_module): New function.
4417	(handle_implicit_modules): Call it under -n.
4418
4419	* elflint.c (check_note_section): New function.
4420	(check_sections): Call it for SHT_NOTE.
4421
4422	* readelf.c (handle_notes): Use sections when available.
4423
4424	* elflint.c (check_note_data): New function, broken out of ...
4425	(check_note): ... here.  Call it and elf_getdata_rawchunk.
4426
4427	* readelf.c (handle_auxv_note): Take offset as argument, not buffer.
4428	Use elf_getdata_rawchunk and gelf_getauxv.
4429	(handle_notes_data): New function, broken out of ...
4430	(handle_notes): ... here.  Call it and elf_getdata_rawchunk.
4431
44322007-10-01  Roland McGrath  <[email protected]>
4433
4434	* readelf.c (hex_dump): Fix transposed subtraction generating spaces.
4435
4436	* readelf.c (hex_dump): Fix line header to be hex instead of decimal.
4437
44382007-09-10  Roland McGrath  <[email protected]>
4439
4440	* readelf.c (options): Give -p optional argument, alias --string-dump.
4441	(string_sections, string_sections_tail): New static variables.
4442	(parse_opt): Set them when -p has an argument.
4443	(print_string_section): New function, broken out of ...
4444	(print_strings): ... here.  Call it.
4445	(dump_data_section): New function, broken out of ...
4446	(dump_data): ... here.  Call it.
4447	(for_each_section_argument): New function, broken out of ...
4448	(dump_data): ... here.  Call it.
4449	(dump_strings): New function.
4450
44512007-08-31  Roland McGrath  <[email protected]>
4452
4453	* readelf.c (print_strings): Typo fix.
4454
44552007-08-23  Roland McGrath  <[email protected]>
4456
4457	* readelf.c (printf_with_wrap): Function removed.
4458	(REGISTER_WRAP_COLUMN): New macro.
4459	(handle_core_register): Use print_core_item instead.
4460	(struct register_info): New type.
4461	(compare_registers, compare_register_sets): New functions.
4462	(register_bitpos, compare_sets_by_info): New functions.
4463	(handle_core_registers): Use those to segregate and sort registers
4464	for display.
4465
4466	* readelf.c (ITEM_WRAP_COLUMN): New macro.
4467	(print_core_item): New function.
4468	(handle_core_item): Use it instead of printf_with_wrap.
4469	(compare_core_items, compare_core_item_groups): New functions.
4470	(handle_core_items): Use them.  Sort by group and force line breaks
4471	between groups.
4472
4473	* readelf.c (handle_core_registers, handle_core_items): New functions,
4474	broken out of ...
4475	(handle_core_note): ... here.   Call them.
4476
44772007-08-22  Roland McGrath  <[email protected]>
4478
4479	* unstrip.c (new_shstrtab): New function, broken out of ...
4480	(copy_elided_sections): ... here.
4481
44822007-08-20  Roland McGrath  <[email protected]>
4483
4484	Avoid local function trampolines in nm binary.
4485	* nm.c (sort_by_address): Move to a static function instead of local
4486	inside show_symbols.
4487	(sort_by_name_strtab): New static variable.
4488	(sort_by_name): Use it.  Move to a static function instead of local
4489	inside show_symbols.
4490	(show_symbols): Set sort_by_name_strtab.
4491
44922007-08-19  Roland McGrath  <[email protected]>
4493
4494	* readelf.c (handle_auxv_note): New function.
4495	(handle_notes): Call it.
4496
4497	* readelf.c (printf_with_wrap, convert): New functions.
4498	(handle_core_item, (handle_core_register): New functions.
4499	(handle_notes): Call those with details from ebl_core_note.
4500
45012007-08-12  Roland McGrath  <[email protected]>
4502
4503	* elflint.c (check_note): Accept type 0 with name "Linux".
4504
4505	* elflint.c (special_sections): Accept SHF_ALLOC for ".note".
4506
4507	* elflint.c (section_flags_string): Return "none" for 0, not "".
4508
45092007-08-11  Roland McGrath  <[email protected]>
4510
4511	* elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
4512
45132007-08-04  Ulrich Drepper  <[email protected]>
4514
4515	* readelf.c (hex_dump): Use isprint to determine whether to print
4516	character itself or full stop character.
4517	(dump_data): No need to check endp for NULL after strtol call.
4518
45192007-08-03  Roland McGrath  <[email protected]>
4520
4521	* readelf.c (print_string_sections): New variable.
4522	(options, parse_opt): Handle --strings/-p to set it.
4523	(print_strings): New function.
4524	(process_elf_file): Call it under -p.
4525
4526	* readelf.c (options): Add hidden aliases --segments, --sections,
4527	as taken by binutils readelf.
4528
45292007-08-01  Roland McGrath  <[email protected]>
4530
4531	* readelf.c (dump_data_sections, dump_data_sections_tail):
4532	New variables.
4533	(options, parse_opt): Handle --hex-dump/-x, set them.
4534	(hex_dump): New function.
4535	(dump_data): New function, call it.
4536	(process_elf_file): Call it.
4537
45382007-07-25  Roland McGrath  <[email protected]>
4539
4540	* addr2line.c (show_symbols): New variable.
4541	(print_addrsym): New function.
4542	(handle_address): Call it.
4543	(options, parse_opt): Handle -S/--symbols.
4544
45452007-06-05  Ulrich Drepper  <[email protected]>
4546
4547	* addr2line.c: Update for latest autoconf header.
4548	* ar.c: Likewise.
4549	* elfcmp.c: Likewise.
4550	* elflint.c: Likewise.
4551	* findtextrel.c: Likewise.
4552	* ld.c: Likewise.
4553	* ldgeneric.c: Likewise.
4554	* nm.c: Likewise.
4555	* objdump.c: Likewise.
4556	* ranlib.c: Likewise.
4557	* readelf.c: Likewise.
4558	* size.c: Likewise.
4559	* strings.c: Likewise.
4560	* strip.c: Likewise.
4561	* unstrip.c: Likewise.
4562
45632007-05-18  Roland McGrath  <[email protected]>
4564
4565	* unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
4566	stripped file, so as not to duplicate a section copied in both.
4567
4568	* strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
4569
45702007-05-17  Roland McGrath  <[email protected]>
4571
4572	* unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
4573
4574	* unstrip.c (handle_file): Tweak BIAS != 0 warning.
4575
4576	* unstrip.c (handle_file): Take new arg CREATE_DIRS.  If set,
4577	call make_directories here.
4578	(handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
4579	(handle_dwfl_module): Likewise.
4580	(handle_implicit_modules): Update callers.
4581	(handle_output_dir_module): Likewise.  Don't do make_directories here.
4582
4583	* unstrip.c (get_section_name): New function, broken out of ...
4584	(copy_elided_sections): here.  Update callers.
4585	(find_alloc_section): Broken out of ...
4586	(copy_elided_sections): ... here.  Update caller.
4587	(symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
4588	update STT_SECTION symbols' st_value fields as a side effect.
4589	(check_symtab_section_symbols): Update caller.
4590	(add_new_section_symbols): Set st_value in symbols added.
4591	(collect_symbols): Reset S->value for STT_SECTION symbols recorded.
4592	Take new arg SPLIT_BSS.  Adjust S->shndx recorded for symbols moved
4593	from .bss to .dynbss.
4594	(find_alloc_sections_prelink): New function.  Associate debug file
4595	allocated SHT_NOBITS shdrs with stripped moved by prelink via
4596	.gnu.prelink_undo information.
4597	(copy_elided_sections): Call it when we couldn't find every allocated
4598	section.  Don't use a debug file non-NOBITS section if SHF_ALLOC.
4599	Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
4600	(handle_file): Update callers.
4601
4602	* unstrip.c (copy_elided_sections): Ignore unfound unallocated section
4603	named ".comment".
4604
4605	* elflint.c (check_sections): Fix association of segments with
4606	sections when p_memsz > p_filesz.
4607
46082007-04-29  Roland McGrath  <[email protected]>
4609
4610	* addr2line.c (options, main): Tweak argp group settings to fix
4611	usage output.
4612
46132007-04-28  Roland McGrath  <[email protected]>
4614
4615	* strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
4616	sizes to match sections adjusted in the stripped file.
4617
46182007-04-24  Roland McGrath  <[email protected]>
4619
4620	* elfcmp.c (OPT_HASH_INEXACT): New macro.
4621	(hash_inexact): New variable.
4622	(options, parse_opt): Add --hash-inexact option to set it.
4623	(hash_content_equivalent): New function.
4624	(main): Call it for differing SHT_HASH sections under --hash-inexact.
4625
46262007-04-23  Roland McGrath  <[email protected]>
4627
4628	* unstrip.c: New file.
4629	* Makefile.am (bin_PROGRAMS): Add it.
4630	(unstrip_LDADD): New variable.
4631
4632	* strip.c (options): Allow --output for -o.
4633
46342007-02-15  Ulrich Drepper  <[email protected]>
4635
4636	* readelf.c: Remove unused code.  Add a few consts.
4637
46382007-02-15  Roland McGrath  <[email protected]>
4639
4640	* readelf.c (print_debug): Fix brainos in SHDR test.
4641
46422007-02-05  Roland McGrath  <[email protected]>
4643
4644	* ar.c: Include <limits.h>, since we use LONG_MAX.
4645
46462007-02-05  Ulrich Drepper  <[email protected]>
4647
4648	* ar.c: Add ugly hack to work around gcc complaining that we
4649	ignore fchown's return value.
4650	(do_oper_insert): Handle error when writing padding.
4651	* ranlib.c: Add fchown complain work around.
4652
4653	* arlib.c: Make symtab a global variable.  Change all users.
4654	* arlib2.c: Likewise.
4655	* ranlib.c: Likewise.
4656	* ar.c: Likewise.
4657	* arlib.h: Declare it.
4658
46592007-01-11  Roland McGrath  <[email protected]>
4660
4661	* elflint.c (check_sections): Use ebl_machine_section_flag_check on
4662	SHF_MASKPROC bits separately from generic sh_flags validation.
4663
46642007-02-04  Ulrich Drepper  <[email protected]>
4665
4666	* ar.c: New file.
4667	* arlib.c: New file.
4668	* arlib2.c: New file.
4669	* arlib.h: New file.
4670	* Makefile (noinst_LIBRARIES): Add libar.
4671	(libar_a_SOURCES): Define.
4672	(ar_LDADD): Define.
4673	(CFLAGS_ar): Define.
4674	* ranlib.c: Change to use arlib.
4675
4676	* elflint.c (check_symtab): Work around GNU ld bug which omits
4677	sections but not symbols in those sections.
4678
46792007-01-10  Ulrich Drepper  <[email protected]>
4680
4681	* addr2line.c: Update copyright year.
4682	* elfcmp.c: Likewise.
4683	* elflint.c: Likewise.
4684	* findtextrel.c: Likewise.
4685	* ld.c: Likewise.
4686	* nm.c: Likewise.
4687	* objdump.c: Likewise.
4688	* ranlib.c:  Likewise.
4689	* readelf.c: Likewise.
4690	* size.c: Likewise.
4691	* strings.c: Likewise.
4692	* strip.c: Likewise.
4693
46942006-12-09  Ulrich Drepper  <[email protected]>
4695
4696	* elflint.c (compare_hash_gnu_hash): New function.  Report if the
4697	two hash tables have different content (module expected omission
4698	of undefined symbols).
4699
47002006-10-31  Roland McGrath  <[email protected]>
4701
4702	* elflint.c (check_program_header): Don't complain about
4703	p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
4704
47052006-09-19  Jakub Jelinek  <[email protected]>
4706
4707	* strip.c (process_file): Disallow -f on archives.
4708
47092006-10-09  Roland McGrath  <[email protected]>
4710
4711	* Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
4712
47132006-08-29  Roland McGrath  <[email protected]>
4714
4715	* Makefile.am (MAINTAINERCLEANFILES): New variable.
4716
4717	* readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
4718	Reported by Christian Aichinger <[email protected]>.
4719
4720	* elflint.c (valid_e_machine): Add EM_ALPHA.
4721	Reported by Christian Aichinger <[email protected]>.
4722
47232006-08-08  Ulrich Drepper  <[email protected]>
4724
4725	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
4726	Keep track of which "high DT" entries are present.
4727	Check that either old or GNU-style hash table is present.
4728	If GNU-style hash table is used a symbol table is mandatory.
4729	Check that if any prelink entry is present all of them are.
4730	(check_gnu_hash): Only fail for undefined symbols in GNU-style hash
4731	table if they don't refer to functions.
4732
47332006-07-17  Roland McGrath  <[email protected]>
4734
4735	* elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
4736	(add_version): Likewise for argument.
4737	(check_versym): Cast constant to GElf_Versym for comparison.
4738
47392006-07-12  Roland McGrath  <[email protected]>
4740
4741	* readelf.c (handle_gnu_hash): Add casts for machines where
4742	Elf32_Word != unsigned int.
4743
47442006-07-12  Ulrich Drepper  <[email protected]>
4745
4746	* elflint.c (check_sysv_hash64): Fix printf format.
4747
47482006-07-11  Roland McGrath  <[email protected]>
4749
4750	* addr2line.c (options): English fix in -f doc string.
4751
4752	* addr2line.c (use_comp_dir): New variable.
4753	(options, parse_opt): Grok -A/--absolute to set it.
4754	(handle_address): If set, prepend dwfl_line_comp_dir results to
4755	relative file names.
4756
47572006-07-06  Ulrich Drepper  <[email protected]>
4758
4759	* elflint.c: Adjust for latest new hash table format.
4760	* readelf.c: Likewise.
4761
4762	* elflint.c (check_versym): Ignore hidden bit when comparing version
4763	numbers.
4764
47652006-07-05  Ulrich Drepper  <[email protected]>
4766
4767	* ldgeneric.c (ld_generic_create_outfile): Correctly recognize
4768	discarded COMDAT symbols.
4769
4770	* i386_ld.c (elf_i386_count_relocations): Lot of corrections.
4771	(elf_i386_create_relocations): Likewise.
4772	* ld.h (struct symbol): Add local and hidden bits.
4773	* ld.c (create_special_section_symbol): These synthsized symbols
4774	are local and hidden.
4775	* ldgeneric.c (file_process2): Check whether input file matches
4776	the emulation.
4777	(fillin_special_symbol): Create symbols as local and/or hidden
4778	if requested.
4779	(ld_generic_create_outfile): Make local copy of symbol.
4780	Don't hide global, defined symbols in dynamic symbol table unless
4781	requested.  Synthetic symbols have no version information.
4782
4783	* elflint.c: Add support for checking 64-bit SysV-style hash tables.
4784	* readelf.c: Add support for printing 64-bit SysV-style hash tables.
4785
47862006-07-04  Ulrich Drepper  <[email protected]>
4787
4788	* elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
4789	testing.
4790
47912006-07-03  Ulrich Drepper  <[email protected]>
4792
4793	* elflint.c: Add testing of DT_GNU_HASH.
4794	* readelf.c: Implement showing histogram for DT_GNU_HASH section.
4795
4796	* Makefile.am: Add hacks to create dependency files for non-generic
4797	linker.
4798
47992006-06-12  Ulrich Drepper  <[email protected]>
4800
4801	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
4802	section if creating a DSO and no interpreter is given.
4803	(ld_generic_create_outfile): Don't store reference to symbols in
4804	discarded COMDAT groups.  Don't create PHDR and INTERP program header
4805	for DSO if no interpreter is specified.
4806	(create_verneed_data): Pretty printing.
4807
4808	* ldscript.y (content): If a DSO is created don't set default
4809	interpreter from linker script.
4810
4811	* i386_ld.c (elf_i386_count_relocations): Do not add relocations
4812	for symbols in discarded COMDAT groups.
4813	(elf_i386_create_relocations): Likewise.
4814	* ld.h (struct scninfo): Add unused_comdat.
4815	* ldgeneric.c (add_section): Also check group signature when
4816	matching COMDAT sections.
4817	(add_relocatable_file): Ignore symbols in COMDAT group which are
4818	discarded.
4819
4820	* elflint.c (check_one_reloc): For *_NONE relocs only check type
4821	and symbol reference.
4822
48232006-06-11  Ulrich Drepper  <[email protected]>
4824
4825	* elflint.c (check_dynamic): Fix checking value of tags which are
4826	offsets in the string section.  Make sure DT_STRTAB points to the
4827	section referenced in sh_link.
4828
4829	* ld.c (options): Add headers.  Add short option 'R' for '--rpath'.
4830
4831	* ld.c: Recognize --eh-frame-hdr option.
4832	* ld.h (struct ld_state): Add eh_frame_hdr field.
4833	* ldgeneric.c (struct unw_eh_frame_hdr): Define.
4834
4835	* ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
4836	SH_FLAGS_COMBINE.
4837	(add_relocatable_file): Minor optimization of last change.
4838	(match_section): Don't preserve SHF_GROUP flag any longer.
4839
48402006-06-10  Ulrich Drepper  <[email protected]>
4841
4842	* ld.c (parse_z_option): Recognize execstack and noexecstack.
4843	Handle record and ignore as position dependent options.
4844	(parse_z_option_2): Handle ignore and record here.
4845	* ld.h (struct ld_state): Add execstack field.
4846	* ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
4847	sections.
4848	(ld_generic_create_outfile): Fix program header creation in native
4849	linker.  Add PT_GNU_STACK program header.
4850
48512006-06-09  Ulrich Drepper  <[email protected]>
4852
4853	* i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
4854	for PLT entries if there is no local definition.
4855
4856	* ld.c (parse_option): Handle -z ignore like --as-needed and
4857	-z record like --no-as-needed.
4858	* ld.h (struct ld_state): Remove ignore_unused_dsos field.
4859	* ldgeneric.c (new_generated_scn): Always compute ndt_needed by
4860	looping over DSOs.  When deciding about adding DT_NEEDED entries
4861	use ->as_needed instead of ignore_unused_dsos.
4862
48632006-05-31  Ulrich Drepper  <[email protected]>
4864
4865	* ld.c: Recognize --as-needed and --no-as-needed options.
4866	* ld.h (struct usedfile): Add as_needed field.
4867	(struct ld_state): Likewise.
4868	* ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
4869	the list.
4870	* ldscript.y (filename_id_list): Split to correctly parse all
4871	combinations.
4872	(mark_as_needed): Fix loop.
4873
48742006-05-28  Ulrich Drepper  <[email protected]>
4875
4876	* addr2line.c (print_dwarf_function): Use unsigned type for lineno
4877	and colno.
4878
48792006-05-27  Ulrich Drepper  <[email protected]>
4880
4881	* readelf.c (handle_relocs_rela): Better notations for addon value.
4882	(print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
4883
48842006-04-04  Ulrich Drepper  <[email protected]>
4885
4886	* addr2line.c: Update copyright year.
4887	* elfcmp.c: Likewise.
4888	* elflint.c: Likewise.
4889	* findtextrel.c: Likewise.
4890	* ld.c: Likewise.
4891	* nm.c: Likewise.
4892	* objdump.c: Likewise.
4893	* ranlib.c: Likewise.
4894	* readelf.c: Likewise.
4895	* size.c: Likewise.
4896	* strings.c: Likewise.
4897	* strip.c: Likewise.
4898
48992006-03-09  Roland McGrath  <[email protected]>
4900
4901	* Makefile.am (AM_LDFLAGS): New variable.
4902
49032006-03-01  Roland McGrath  <[email protected]>
4904
4905	* readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
4906	for dwarf.h changes matching 3.0 spec.
4907	(dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
4908
49092005-12-04  Ulrich Drepper  <[email protected]>
4910
4911	* elflint.c (check_one_reloc): If relocation section is not loaded,
4912	don't check whether the relocations modify read-only sections or
4913	loaded and unloaded sections.
4914
49152005-11-28  Ulrich Drepper  <[email protected]>
4916
4917	* elflint.c (check_one_reloc): Take additional parameters.  Use
4918	them to determine whether relocation is valid in this type of
4919	file.  DSOs and executables can contain relocation sections in
4920	unloaded sections which just show the relocations the linker
4921	applied.  Adjust all callers.
4922	(check_program_header): Check that PT_PHDR is loaded and that offset
4923	matches the one in the ELF header.
4924
49252005-10-26  Roland McGrath  <[email protected]>
4926
4927	* nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
4928
49292005-09-03  Ulrich Drepper  <[email protected]>
4930
4931	* strip.c (handle_elf): Unify some error messages.
4932	* ld.c (main): Likewise.
4933	* ldgeneric.c (open_elf): Likewise.
4934	* elfcmp.c (main): Likewise.
4935	* elflint.c (check_elf_header): Likewise.
4936
4937	* size.c (process_file): Fix typo in error message.
4938
4939	* readelf.c: Lots of little cleanups.  Use _unlocked functions.
4940
49412005-09-02  Ulrich Drepper  <[email protected]>
4942
4943	* strings.c (main): Reset elfmap variable after munmap call.
4944	[_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
4945
49462005-08-28  Ulrich Drepper  <[email protected]>
4947
4948	* ranlib.c: Don't define pread_retry and write_retry here.
4949
4950	* Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
4951	(CLEANFILES): Add *.gcno *.gcda *.gconv.
4952
4953	* strings.c (process_chunk): Reorder expressions in conditional
4954	(process_chunk_mb): Likewise.
4955
4956	* strings.c: New file.
4957	* Makefile.am (bin_PROGRAMS): Add strings.
4958	(strings_no_Wstring): Define.
4959	(strings_LDADD): Define.
4960
49612005-08-27  Roland McGrath  <[email protected]>
4962
4963	* addr2line.c (dwarf_diename_integrate): Function removed.
4964	(print_dwarf_function): Use plain dwarf_diename.
4965
49662005-08-24  Ulrich Drepper  <[email protected]>
4967
4968	* elflint.c (check_versym): Versioned symbols should not have
4969	local binding.
4970
49712005-08-15  Ulrich Drepper  <[email protected]>
4972
4973	* elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
4974	undefined.
4975
4976	* Makefile.am: Add rules to build ranlib.
4977	* ranlib.c: New file.
4978
49792005-08-14  Roland McGrath  <[email protected]>
4980
4981	* elflint.c (check_sections): Use ebl_section_type_name and allow any
4982	sh_type it recognizes.
4983
4984	* elflint.c (check_sections): Print unknown flags in hex, don't
4985	truncate high bits.  Print section number and name for unknown type.
4986
49872005-08-13  Roland McGrath  <[email protected]>
4988
4989	* elflint.c (check_program_header): Use ebl_segment_type_name and
4990	allow any p_type it recognizes.  Include p_type value in error
4991	message for unknown type.
4992
49932005-08-13  Ulrich Drepper  <[email protected]>
4994
4995	* elflint.c (check_symtab): Simplify last change a bit.  Pass ehdr
4996	to ebl_check_special_symbol.
4997	(check_sections): Pass ehdr to ebl_bss_plt_p.
4998
49992005-08-12  Roland McGrath  <[email protected]>
5000
5001	* elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
5002	refers to the right section if it's not SHN_ABS.
5003	Let ebl_check_special_symbol override _G_O_T_ value and size checks.
5004
5005	* elflint.c (check_sections): Don't complain about a non-NOBITS
5006	section taking no segment space, if it's sh_size is 0.
5007
5008	* elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
5009	be PROGBITS or NOBITS.
5010
5011	* elflint.c (check_symtab): Use ebl_check_special_symbol to override
5012	standard st_value and st_size checks.
5013
50142005-07-28  Roland McGrath  <[email protected]>
5015
5016	* addr2line.c (options, parse_opt): Don't handle -e here.
5017	(executable): Variable removed.
5018	(argp_children): New static variable.
5019	(argp): Use it.  Make const.
5020	(main): Fill in argp_children from dwfl_standard_argp ().
5021	Let libdwfl handle file selection, pass Dwfl handle to handle_address.
5022	(print_dwarf_function): New function.  Try to figure out inline chain.
5023	(elf_getname): Function removed, libdwfl does it for us.
5024	(handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
5025	Use dwfl_module_addrname instead of elf_getname.
5026	Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
5027	* Makefile.am (INCLUDES): Add libdwfl directory to path.
5028
50292005-08-10  Ulrich Drepper  <[email protected]>
5030
5031	* strip.c (parse_opt): STATE parameter is now used.
5032	Various little cleanups.
5033
5034	* readelf.c (print_debug_line_section): Correct fallout of renaming
5035	of DW_LNS_set_epilog_begin.
5036
50372005-08-08  Roland McGrath  <[email protected]>
5038
5039	* strip.c (options, parse_opt): Grok -R .comment for compatibility
5040	with binutils strip.  Likewise -d, -S, as aliases for -g.
5041	Likewise ignore -s/--strip-all.
5042
50432005-08-07  Roland McGrath  <[email protected]>
5044
5045	* strip.c (process_file): Open read-only when using a different output
5046	file.
5047
50482005-08-06  Ulrich Drepper  <[email protected]>
5049
5050	* elflint.c (in_nobits_scn): New function.
5051	(check_versym): Allow references for defined symbols against versions
5052	of other DSOs also for symbols in nobits sections.
5053	Move a few variables around.
5054
5055	* Makefile.am (AM_CFLAGS): Avoid duplication.
5056	Link with statis libs if BUILD_STATIC.
5057
50582005-08-05  Ulrich Drepper  <[email protected]>
5059
5060	* elflint.c: Many, many more tests.  Mostly related to symbol
5061	versioning.  Those sections should now be completely checked.
5062
5063	* readelf.c (print_dynamic): Use gelf_offscn.
5064
50652005-08-04  Ulrich Drepper  <[email protected]>
5066
5067	* elflint.c: Add lots more tests: more extension symbol table sanity,
5068	versioning section tests, hash table tests.  General cleanup.
5069
50702005-08-02  Ulrich Drepper  <[email protected]>
5071
5072	* objdump.c: New file.
5073	* Makefile.am (bin_PROGRAMS): Add objdump.
5074	(objdump_LDADD): Define.
5075
5076	* elflint.c (check_reloc_shdr): New function split out from check_rela
5077	and check_rel.
5078	(check_one_reloc): New function.  Likewise.
5079	(check_rela): Use check_reloc_shdr and check_one_reloc.
5080	(check_rel): Likewise.
5081	(check_program_header): Check that PT_DYNAMIC entry matches .dynamic
5082	section.
5083	Add checks that relocations against read-only segments are flagged,
5084	that the text relocation flag is not set unnecessarily, and that
5085	relocations in one section are either against loaded or not-loaded
5086	segments.
5087
50882005-08-01  Ulrich Drepper  <[email protected]>
5089
5090	* elfcmp.c (main): Ignore section count and section name string table
5091	section index.
5092
50932005-07-27  Roland McGrath  <[email protected]>
5094
5095	* elfcmp.c: Include <locale.h>.
5096
50972005-07-27  Ulrich Drepper  <[email protected]>
5098
5099	* elfcmp.c: Print name and index of differing section.
5100
51012005-07-24  Ulrich Drepper  <[email protected]>
5102
5103	* elfcmp.c: Implement comparing gaps between sections.
5104
51052005-07-23  Ulrich Drepper  <[email protected]>
5106
5107	* elflint.c: Include libeblP.h instead of libebl.h.
5108	* nm.c: Likewise.
5109	* readelf.c: Likewise.
5110	* elfcmp.c: Likewise.
5111
5112	* elfcmp.c (main): Compare individual ELF header fields, excluding
5113	e_shoff instead of the whole struct at once.
5114	Use ebl_section_strip_p instead of SECTION_STRIP_P.
5115	* strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
5116
51172005-07-22  Ulrich Drepper  <[email protected]>
5118
5119	* elfcmp.c (main): Take empty section into account when comparing
5120	section content.
5121
5122	* elflint.c (check_dynamic): Check that d_tag value is >= 0 before
5123	using it.
5124
51252005-07-21  Ulrich Drepper  <[email protected]>
5126
5127	* elfcmp.c: New file.
5128	* Makefile.am (bin_PROGRAMS): Add elfcmp.
5129	(elfcmp_LDADD): Define.
5130
5131	* elflint.c (check_rela): Check that copy relocations only reference
5132	object symbols or symbols with unknown type.
5133	(check_rel): Likewise.
5134
51352005-06-08  Roland McGrath  <[email protected]>
5136
5137	* readelf.c (print_ops): Add consts.
5138
51392005-05-31  Roland McGrath  <[email protected]>
5140
5141	* readelf.c (print_debug_abbrev_section): Don't bail after first CU's
5142	abbreviations.  Print a header line before each CU section.
5143
5144	* readelf.c (print_debug_loc_section): Fix indentation for larger
5145	address size.
5146
51472005-05-30  Roland McGrath  <[email protected]>
5148
5149	* readelf.c (print_debug_line_section): Print section offset of each
5150	CU's table, so they are easy to find from seeing the stmt_list value.
5151
5152	* readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
5153	(attr_callback): Grok DW_AT_ranges and print offset in hex.
5154
5155	* readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
5156	(print_debug_ranges_section, print_debug_loc_section): Likewise.
5157
5158	* readelf.c (print_ops): Take different args for indentation control.
5159	(attr_callback): Caller updated.
5160	Grok several more block-form attributes as being location expressions.
5161	For those same attributes with udata forms, format output differently
5162	for location list offset.
5163	(print_debug_loc_section): Implement it for real.
5164
5165	* readelf.c (options): Mention ranges for --debug-dump.
5166	(enum section_e): Add section_ranges.
5167	(parse_opt): Grok "ranges" for -w/--debug-dump.
5168	(print_debug_ranges_section): New function.
5169	(print_debug): Handle .debug_ranges section.
5170
51712005-05-30  Ulrich Drepper  <[email protected]>
5172
5173	* readelf.c (handle_notes): At least x86-64 need not have the note
5174	section values aligned to 8 bytes.
5175
51762005-05-18  Ulrich Drepper  <[email protected]>
5177
5178	* readelf.c (dwarf_tag_string): Add new tags.
5179
51802005-05-08  Roland McGrath  <[email protected]>
5181
5182	* strip.c (handle_elf): Don't translate hash and versym data formats,
5183	elf_getdata already did it for us.
5184
51852005-05-07  Ulrich Drepper  <[email protected]>
5186
5187	* Makefile.am (findtextrel_LDADD): Add $(libmudflap).
5188	(addr2line_LDADD): Likewise.
5189
51902005-05-03  Roland McGrath  <[email protected]>
5191
5192	* strip.c (handle_elf): Apply symbol table fixups to discarded
5193	relocation sections when they are being saved in the debug file.
5194
5195	* strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
5196	and gelf_xlatetof, not the native byte order.
5197
5198	* strip.c (parse_opt): Give error if -f or -o is repeated.
5199	(main): Exit if argp_parse returns nonzero.
5200
5201	* strip.c (debug_fname_embed): New variable.
5202	(options, parse_opt): New option -F to set it.
5203
52042005-05-07  Ulrich Drepper  <[email protected]>
5205
5206	* readelf.c (parse_opt): Make any_control_option variable
5207	local.  Simplify some tests.
5208
52092005-05-03  Roland McGrath  <[email protected]>
5210
5211	* strip.c (crc32_file): Function removed (now in ../lib).
5212
52132005-05-03  Roland McGrath  <[email protected]>
5214
5215	* elflint.c (is_debuginfo): New variable.
5216	(options, parse_opt): New option --debuginfo/-d to set it.
5217	(check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
5218	(check_note): If is_debuginfo, don't try to get note contents.
5219
52202005-04-24  Ulrich Drepper  <[email protected]>
5221
5222	* readelf.c (print_debug_abbrev_section): Don't print error when end of
5223	section reached.
5224
52252005-04-14  Ulrich Drepper  <[email protected]>
5226
5227	* readelf.c (dwarf_encoding_string): New function.
5228	(dwarf_inline_string): New function.
5229	(dwarf_access_string): New function.
5230	(dwarf_visibility_string): New function.
5231	(dwarf_virtuality_string): New function.
5232	(dwarf_identifier_case_string): New function.
5233	(dwarf_calling_convention_string): New function.
5234	(dwarf_ordering_string): New function.
5235	(dwarf_discr_list_string): New function.
5236	(attr_callback): Decode man more attribute values.
5237
52382005-04-01  Ulrich Drepper  <[email protected]>
5239
5240	* addr2line.c: Finish implementation of -f option.
5241
52422005-03-29  Ulrich Drepper  <[email protected]>
5243
5244	* addr2line.c: New file.
5245	* Makefile.am (bin_PROGRAMS): Add addr2line.
5246	Define addr2line_LDADD.
5247
5248	* findtextrel.c: Use new dwarf_addrdie function.
5249
5250	* findtextrel.c: Fix usage message and re-add accidentally removed
5251	line.
5252
52532005-03-28  Ulrich Drepper  <[email protected]>
5254
5255	* findtextrel.c: New file.
5256	* Makefile: Add rules to build findtextrel.
5257
52582005-02-15  Ulrich Drepper  <[email protected]>
5259
5260	* ldlex.l: Provide ECHO definition to avoid warning.
5261
5262	* elflint.c (check_program_header): Fix typo in RELRO test.
5263
5264	* Makefile.am (AM_CFLAGS): Add more warning options.
5265	* elflint.c: Fix warnings introduced by the new warning options.
5266	* i386_ld.c: Likewise.
5267	* ld.c: Likewise.
5268	* ld.h: Likewise.
5269	* ldgeneric.c: Likewise.
5270	* nm.c: Likewise.
5271	* readelf.c: Likewise.
5272	* sectionhash.c: Likewise.
5273	* size.c: Likewise.
5274	* string.c: Likewise.
5275
52762005-02-05  Ulrich Drepper  <[email protected]>
5277
5278	* Makefile.am: Check for text relocations in constructed DSOs.
5279
5280	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.  Link all apps
5281	with -lmudflap.
5282
5283	* ldscript.y: Add as_needed handling.
5284	* ldlex.l: Recognize AS_NEEDED token.
5285	* ld.h (struct filename_list): Add as_needed flag.
5286
52872005-02-04  Ulrich Drepper  <[email protected]>
5288
5289	* elflint.c (check_symtab): Correctly determine size of GOT section.
5290
52912005-01-19  Ulrich Drepper  <[email protected]>
5292
5293	* ld.c: Remove unnecessary more_help function.  Print bug report
5294	address using argp.
5295	* strip.c: Likewise.
5296	* size.c: Likewise.
5297	* nm.c: Likewise.
5298	* readelf.c: Likewise.
5299	* elflint.c: Likewise.
5300
5301	* elflint.c (main): Don't check for parameter problems here.
5302	(parse_opt): Do it here, where we get informed about some of them
5303	anyway.
5304
5305	* readelf.c (main): Don't check for parameter problems here.
5306	(parse_opt): Do it here, where we get informed about some of them
5307	anyway.
5308
53092005-01-11  Ulrich Drepper  <[email protected]>
5310
5311	* strip.c: Update copyright year.
5312	* readelf.c: Likewise.
5313	* size.c: Likewise.
5314	* nm.c: Likewise.
5315	* ld.c: Likewise.
5316	* elflint.c: Likewise.
5317
5318	* elflint.c (check_symtab): Don't warn about wrong size for
5319	_DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
5320
53212004-10-05  Ulrich Drepper  <[email protected]>
5322
5323	* readelf.c (print_phdr): In section mapping, also indicate
5324	sections in read-only segments.
5325
53262004-09-25  Ulrich Drepper  <[email protected]>
5327
5328	* readelf.c: Make compile with gcc 4.0.
5329	* strip.c: Likewise.
5330
53312004-08-16  Ulrich Drepper  <[email protected]>
5332
5333	* strip.c (handle_elf): Rewrite dynamic memory handling to use of
5334	allocate to work around gcc 3.4 bug.
5335
53362004-01-25  Ulrich Drepper  <[email protected]>
5337
5338	* ldlex.l (invalid_char): Better error message.
5339
53402004-01-23  Ulrich Drepper  <[email protected]>
5341
5342	* readelf.c: Print SHT_GNU_LIBLIST sections.
5343
5344	* none_ld.c: New file.
5345
53462004-01-21  Ulrich Drepper  <[email protected]>
5347
5348	* Makefile.am: Enable building of machine specific linker.
5349
53502004-01-20  Ulrich Drepper  <[email protected]>
5351
5352	* Makefile.am: Support building with mudflap.
5353
5354	* i386_ld.c: Fix warnings gcc 3.4 spits out.
5355	* ldgeneric.c: Likewise.
5356	* ldscript.y: Likewise.
5357	* readelf.c: Likewise.
5358	* strip.c: Likewise.
5359
5360	* readelf.c (print_debug_line_section): Determine address size
5361	correctly.
5362
53632004-01-19  Ulrich Drepper  <[email protected]>
5364
5365	* readelf.c (print_phdr): Show which sections are covered by the
5366	PT_GNU_RELRO entry.
5367
5368	* elflint.c (check_program_header): Check PT_GNU_RELRO entry.
5369
5370	* readelf.c (print_debug_macinfo_section): Implement.
5371
53722004-01-18  Ulrich Drepper  <[email protected]>
5373
5374	* readelf.c (print_debug_line_section): Implement.
5375
53762004-01-17  Ulrich Drepper  <[email protected]>
5377
5378	* src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
5379	* src/ld.c: Likewise.
5380	* src/nm.c: Likewise.
5381	* src/readelf.c: Likewise.
5382	* src/size.c: Likewise.
5383	* src/strip.c: Likewise.
5384
5385	* strip.c: Add a few more unlikely.  Reduce scope of some variables.
5386
5387	* Makefile.am: Support building with mudflap.
5388
53892004-01-16  Ulrich Drepper  <[email protected]>
5390
5391	* readelf.c (print_debug_info_section): Free dies memory.
5392
5393	* readelf.c: Print .debug_info section content.
5394
53952004-01-13  Ulrich Drepper  <[email protected]>
5396
5397	* readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
5398
53992004-01-12  Ulrich Drepper  <[email protected]>
5400
5401	* readelf.c (print_debug_aranges): Implement using libdw.
5402
54032004-01-11  Ulrich Drepper  <[email protected]>
5404
5405	* nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
5406
5407	* readelf.c: Use libdw instead of libdwarf.  Not all of the old
5408	behavior is available yet.
5409	* Makefile.am: Link readelf with libdw.  Remove libdwarf include path.
5410
54112004-01-09  Ulrich Drepper  <[email protected]>
5412
5413	* nm.c (get_local_names): Adjust call to dwarf_nextcu.
5414
5415	* nm.c: Implement getting information about local variables.
5416
54172004-01-07  Ulrich Drepper  <[email protected]>
5418
5419	* nm.c: Read also debug information for local symbols.
5420
54212004-01-05  Ulrich Drepper  <[email protected]>
5422
5423	* nm.c: Shuffle dwarf handling code around so the maximum column
5424	width can be computed ahead of printing.  Avoid collection symbols
5425	which are not printed anyway.
5426
5427	* nm.c: Rewrite dwarf handling to use libdw.
5428	* Makefile.am (AM_CFLAGS): Add -std parameter.
5429	(INCLUDES): Find header in libdw subdir.
5430	(nm_LDADD): Replace libdwarf with libdw.
5431
5432	* elflint.c: Update copyright year.
5433	* readelf.c: Likewise.
5434	* size.c: Likewise.
5435	* strip.c: Likewise.
5436	* nm.c: Likewise.
5437
54382003-12-31  Ulrich Drepper  <[email protected]>
5439
5440	* strip.c (process_file): Close file before returning.
5441
54422003-11-19  Ulrich Drepper  <[email protected]>
5443
5444	* readelf.c (handle_dynamic): Make column for tag name wider.
5445
54462003-09-29  Ulrich Drepper  <[email protected]>
5447
5448	* readelf.c (handle_dynamic): Always terminate tag name with a space.
5449
54502003-09-25  Ulrich Drepper  <[email protected]>
5451
5452	* strip.c (process_file): Don't mmap the input file, we modify the
5453	data structures and don't want the change end up on disk.
5454
54552003-09-23  Jakub Jelinek  <[email protected]>
5456
5457	* unaligned.h (union u_2ubyte_unaligned,
5458	union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
5459	packed attribute.
5460	(add_2ubyte_unaligned, add_4ubyte_unaligned,
5461	add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
5462	Read/store value through _ptr->u instead of *_ptr.
5463
54642003-09-22  Ulrich Drepper  <[email protected]>
5465
5466	* size.c (show_sysv): Change type of maxlen to int.
5467
5468	* strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
5469	buckets.
5470
5471	* i386_ld.c: Many many fixes and extensions.
5472	* ld.c: Likewise.
5473	* ldgeneric.c: Likewise.
5474
54752003-08-16  Ulrich Drepper  <[email protected]>
5476
5477	* ldgeneric.c (check_definition): Don't add symbol on dso_list if
5478	the reference is from another DSO.
5479
54802003-08-15  Ulrich Drepper  <[email protected]>
5481
5482	* ldgeneric.c (find_entry_point): It is no fatal error if no entry
5483	point is found when creating a DSO.
5484
54852003-08-14  Ulrich Drepper  <[email protected]>
5486
5487	* ld.c (main): Always call FLAG_UNRESOLVED.
5488	* ldgeneric.c (ld_generic_flag_unresolved): Only complain about
5489	undefined symbols if not creating DSO or ld_state.nodefs is not set.
5490
54912003-08-13  Ulrich Drepper  <[email protected]>
5492
5493	* Makefile.in: Depend on libebl.a, not libebl.so.
5494
5495	* ld.c (main): Mark stream for linker script as locked by caller.
5496	(read_version_script): Likewise.
5497	* ldlex.c: Define fread and fwrite to _unlocked variant.
5498
5499	* i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
5500	target_bswap_32.
5501	* unaligned.h: Define target_bswap_16, target_bswap_32, and
5502	target_bswap_64.
5503	(store_2ubyte_unaligned, store_4ubyte_unaligned,
5504	store_8ubyte_unaligned): Define using new macros.
5505
55062003-08-12  Ulrich Drepper  <[email protected]>
5507
5508	* i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
5509	possibly unaligned memory.  Support use of big endian machines.
5510
55112003-08-11  Ulrich Drepper  <[email protected]>
5512
5513	* Moved to CVS archive.
5514