• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12008-12-11  Roland McGrath  <roland@redhat.com>
2
3	* nm.c (sym_name): New function.
4	(show_symbols_sysv): Use it in place of elf_strptr.
5	(show_symbols_bsd, show_symbols_posix): Likewise.
6	Fixes RHBZ#476136.
7
8	* nm.c (show_symbols_sysv): Use an alloca'd backup section name when
9	elf_strptr fails.
10
112008-12-02  Roland McGrath  <roland@redhat.com>
12
13	* readelf.c (count_dwflmod, process_file): Don't presume encoding of
14	nonzero OFFSET argument to dwfl_getmodules.
15
162008-08-07  Roland McGrath  <roland@redhat.com>
17
18	* addr2line.c (main): Pass string to handle_address.
19	(see_one_module): New function, subroutine of handle_address.
20	(find_symbol): Likewise.
21	(handle_address): Take string argument rather than address.
22	Convert plain number, or handle strings like "(section)+offset"
23	or "symbol+offset".
24
252008-08-01  Roland McGrath  <roland@redhat.com>
26
27	* readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
28	For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
29
30	* readelf.c (convert): Take new argument SIZE.
31	(handle_core_register, handle_core_item): Update callers.
32	(handle_core_item): Take new arg REPEATED_SIZE.
33	(handle_core_items): Special case for a singleton item,
34	let handle_core_item handle repeats if it wants to.
35
36	* readelf.c (handle_core_items): Give abridged output
37	for identical groups repeated more than twice.
38
392008-07-04  Roland McGrath  <roland@redhat.com>
40
41	* readelf.c (handle_core_items): Handle ELF_T_ADDR.
42
432008-04-10  Roland McGrath  <roland@redhat.com>
44
45	* strip.c (handle_elf): Don't keep sections that kept symbol tables
46	refer to.  Instead, just be sure to preserve the original symbol
47	table in the debug file so those symbols go with their sections and
48	can be elided from the stripped version of the symbol table.
49
50	* strip.c (handle_elf): When a discarded section kept in the debug
51	file refers to a nondiscard section via sh_link/sh_info, preserve
52	that nondiscarded section unmodified in the debug file as well.
53	Skip adjustment of discarded sections symbol table references when
54	that symbol table is copied in this way.
55
56	* elflint.c (check_symtab): Don't crash from missing symbol names
57	after diagnosing bogus strtab.
58
59	* strip.c (handle_elf): Cosmetic cleanup in special section contents
60	adjustment for symtab changes.
61
622008-03-31  Roland McGrath  <roland@redhat.com>
63
64	* elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
65	must be SHT_PROGBITS, must not be SHF_WRITE.  Let backend hook
66	excuse a special section.
67
682008-03-27  Roland McGrath  <roland@redhat.com>
69
70	* elflint.c (check_sections): Check that executability and writability
71	of sections is reflected in segment p_flags.
72
732008-03-26  Roland McGrath  <roland@redhat.com>
74
75	* elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
76	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
77	is valid in RELRO.
78
792008-02-29  Roland McGrath  <roland@redhat.com>
80
81	* readelf.c (print_attributes): Add a cast.
82	* elflint.c (check_attributes): Likewise.
83
84	* unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
85	with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
86	(add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
87
882008-02-03  Ulrich Drepper  <drepper@redhat.com>
89
90	* i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
91	when linked into executable.
92	(elf_i386_create_relocations): Likewise.
93
942008-02-20  Roland McGrath  <roland@redhat.com>
95
96	* readelf.c (print_attributes): New function.
97	(process_elf_file): Call it under -A.
98
99	* elflint.c (check_attributes): Implement it for real.
100
1012008-02-19  Roland McGrath  <roland@redhat.com>
102
103	* elflint.c (special_sections): Handle .gnu.attributes section.
104	(check_sections): Likewise.
105	(check_attributes): New function.
106
1072008-02-10  Roland McGrath  <roland@redhat.com>
108
109	* elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
110	sections and ET_REL files.
111
1122008-02-02  Ulrich Drepper  <drepper@redhat.com>
113
114	* elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
115	* i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
116	and R_386_TLS_LE.
117	(elf_i386_create_relocations): Likewise.
118	* ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
119	elements.
120	* ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
121	(ld_generic_create_outfile): Add PT_TLS entry to program  header.
122	Fix generation of PT_GNU_STACK entry.
123
1242008-02-01  Ulrich Drepper  <drepper@redhat.com>
125
126	* ld.c (replace_args): Prevent loop over replacements if the parameter
127	is only two characters long.
128
129	* ld.c: Recognize sha1 argument for --build-id parameter.
130	* ldgeneric.c (create_build_id_section): Handle sha1.
131	(compute_hash_sum): New function.  Broken out of compute_build_id.
132	Take hash function and context as parameters.
133	(compute_build_id): Use compute_hash_sum for md5 and the new sha1
134	implementation.
135
1362008-01-31  Ulrich Drepper  <drepper@redhat.com>
137
138	* elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
139	* ld.c: Recognize --build-id command line parameter.
140	* ld.h: Define scn_dot_note_gnu_build_id.
141	(struct ld_state): Add build_id and buildidscnidx elements.
142	* ldgeneric.c: Implement --build-id command line parameter.
143	* ldlex.l (ID): Recognize - as valid character after the first one.
144
1452008-01-29  Ulrich Drepper  <drepper@redhat.com>
146
147	* ld.c (replace_args): New function.
148	(main): Use it to rewrite old-style parameters.
149
150	* elf32-i386.script: Add .gnu.hash section.
151	* ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
152	(fillin_special_symbol): Initialize st_size.
153	(sortfct_hashval): New function.
154	(create_gnu_hash): New function.
155	(create_hash): New function.
156	(ld_generic_create_outfile): Use the new functions to create the
157	hash tables.
158
159	* elflint.c (check_gnu_hash): Fix index value printed in error message.
160
1612008-01-24  Ulrich Drepper  <drepper@redhat.com>
162
163	* elflint.c (check_group): Check that signature symbol for section
164	group is not an empty string.
165	* ldgeneric.c: Remove magic assignment of indeces in the dynsym
166	section.  Start implementation of --hash-style.
167	* i386_ld.c: Likewise.
168	* ld.c: Recognize --hash-style.
169	* ld.h (struct scninfo): Add comdat_group.
170	Add additional parameter to finalize_plt callback.
171
1722008-01-22  Ulrich Drepper  <drepper@redhat.com>
173
174	* ld.h (struct callbacks): Add initialize_gotplt.
175	(struct scnhead): Add scn_dot_gotplt.
176	(struct ld_state): Add gotpltscnidx.
177	* i386_ld.c (elf_i386_initialize_plt): Minor optimization.
178	(elf_i386_initialize_pltrel): Likewise.
179	(elf_i386_initialize_got): There is now a separate .got.plt, so
180	don't do the PLT-related work here.  Initialize d_type.
181	(elf_i386_initialize_gotplt): New function.
182	(elf_i386_plt0): Use ud2a after indirect jump.
183	(elf_i386_pic_plt0_entry): Likewise.
184	(elf_i386_finalize_plt): Reference now .got.plt.
185	(elf_i386_count_relocations): For GOT entries which need no relocation
186	don't bump nrel_got.
187	(elf_i386_create_relocations): Also get .got.plt.  Rewrite R-386_GOT32
188	handling for split .got/.got.plt.
189	(elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
190	* elf32-i386.script: Sort sections for security.  There are no .got
191	input sections.  Add .got.plt.
192	* ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
193	(ld_generic_create_outfile): Initialize .got.plt section.
194	Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
195
1962008-01-19  Ulrich Drepper  <drepper@redhat.com>
197
198	* i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
199	symbols are not carried over into statically linked output files.
200	Add dummy entries for more TLS relocations.
201
202	* ld.c (options): Add long names for -( and -).
203
204	* ldgeneric.c (check_definition): For newly found definitions don't
205	mark section as used if symbol is absolute.
206	(extract_from_archive): Only assign archive sequence number the first
207	time the archive is handled.  Update ld_state.last_archive_used
208	if any symbol was used.  Remove nround variable.
209	(file_process2): When using symbol from an archive, update
210	ld_state.group_start_archive, ld_state.archives, and
211	ld_state.tailarchives.
212	(ld_generic_file_process): If group is not handled anymore, after
213	freeing ELF handles for the archives, clear ld_state.archives and
214	*nextp.  Fix wrong logic in recognizing first iteration of group
215	loop.  When clearing flags, also clear ld_state.group_start_archive.
216
2172008-01-11  Ulrich Drepper  <drepper@redhat.com>
218
219	* objdump.c (show_disasm): Adjust disassembler format string for
220	removal of %e.
221
2222008-01-04  Roland McGrath  <roland@redhat.com>
223
224	* readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
225	a size greater than the items cover means multiple sets of items.
226	(handle_core_note): Update caller.
227
2282008-01-04  Roland McGrath  <roland@redhat.com>
229
230	* strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
231
2322008-01-03  Roland McGrath  <roland@redhat.com>
233
234	* ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
235
236	* elflint.c (check_dynamic): Remove duplicate initializer.
237
2382008-01-02  Ulrich Drepper  <drepper@redhat.com>
239
240	* addr2line.c: Update copyright year.
241	* ar.c: Likewise.
242	* elfcmp.c: Likewise.
243	* elflint.c: Likewise.
244	* findtextrel.c: Likewise.
245	* ld.c: Likewise.
246	* nm.c: Likewise.
247	* objdump.c: Likewise.
248	* ranlib.c: Likewise.
249	* readelf.c: Likewise.
250	* size.c: Likewise.
251	* strings.c: Likewise.
252	* strip.c: Likewise.
253	* unstrip.c: Likewise.
254
2552007-12-30  Ulrich Drepper  <drepper@redhat.com>
256
257	* objdump (show_disasm): Use %e after third parameter.
258
2592007-12-21  Ulrich Drepper  <drepper@redhat.com>
260
261	* strip.c: Fix wrong parenthesis in a few branch predictions.
262	* strings.c: Likewise.
263
2642007-12-20  Ulrich Drepper  <drepper@redhat.com>
265
266	* Makefile.am (DEFS): Add DEBUGPRED.
267	* addr2line.c: Include debugpred.h.
268	* ar.c: Likewise.
269	* elfcmp.c: Likewise.
270	* elflint.c: Likewise.
271	* findtextrel.c: Likewise.
272	* nm.c: Likewise.
273	* objdump.c: Likewise.
274	* ranlib.c: Likewise.
275	* readelf.c: Likewise.
276	* size.c: Likewise.
277	* strings.c: Likewise.
278	* strip.c: Likewise.
279	* unstrip.c: Likewise.
280	* debugpred.h: New file.
281
282	* readelf.c (handle_relocs_rel): Use elf_scnshndx.
283	(handle_relocs_rela): Likewise.
284
285	* readelf.c: Add lots of likely/unlikely.
286
287	* elflint.c: Minor cleanups.
288
2892007-11-19  Roland McGrath  <roland@redhat.com>
290
291	* readelf.c (print_ops): Handle all bad op codes gracefully.
292	Print their numbers instead of just ???.
293
2942007-11-09  Roland McGrath  <roland@redhat.com>
295
296	* readelf.c (attr_callback): Handle DW_AT_data_location.
297	Handle block forms to mean a DWARF expression for DW_AT_allocated,
298	DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
299	DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
300	DW_AT_upper_bound.
301
3022007-10-20  Roland McGrath  <roland@redhat.com>
303
304	* unstrip.c (options): Update -R description.
305	(struct symbol): Put symbol details a union with a size_t pointer
306	`duplicate'.
307	(compare_symbols_output): Use null ->name as marker for discard
308	symbols, not zero *->map.
309	(copy_elided_sections): Record forwarding pointers for discarded
310	duplicates and fill SYMNDX_MAP elements through them.
311
312	* readelf.c (process_file): Set offline_next_address to 0 at start.
313	(struct process_dwflmod_args): New type.
314	(process_dwflmod): Take args in it, pass fd to process_elf_file.
315	(process_file): Update caller; dup FD for passing to libdwfl.
316	(process_elf_file): Take new arg FD.  For ET_REL file when
317	displaying data affected by libdwfl relocation, open a new Elf handle.
318
3192007-10-17  Roland McGrath  <roland@redhat.com>
320
321	* readelf.c (print_debug_line_section): For invalid data inside a
322	unit with plausible length, keep printing at the next unit boundary.
323
324	* readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
325
3262007-10-16  Roland McGrath  <roland@redhat.com>
327
328	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
329
3302007-10-15  Roland McGrath  <roland@redhat.com>
331
332	* make-debug-archive.in: New file.
333	* Makefile.am (EXTRA_DIST): Add it.
334	(make-debug-archive): New target.
335	(bin_SCRIPTS, CLEANFILES): Add it.
336
3372007-10-10  Roland McGrath  <roland@redhat.com>
338
339	* elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
340	Use it to check MERGE|STRINGS for .debug_str.
341	(check_sections): Handle exact_or_gnuld.
342
3432007-10-08  Roland McGrath  <roland@redhat.com>
344
345	* readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
346	64-bit struct timeval with 32-bit tv_usec.
347
3482007-10-07  Roland McGrath  <roland@redhat.com>
349
350	* readelf.c (check_archive_index): New function.
351	(process_file): Call it.  Change signature to take only fd and name.
352	Use libdwfl to open the file, then iterate on its modules (multiple
353	for an archive) to print file name and call process_elf_file.
354	(main): Update caller.  Let process_file do elf_begin.
355	(count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
356	(process_elf_file): Take only Dwfl_Module * argument.
357	Don't print the file name here.
358	(print_debug_*_section): Take Dwfl_Module * argument.
359	(print_debug): Likewise.  Update caller.
360	(format_dwarf_addr): New function.
361	(print_debug_ranges_section): Use it.
362	(attr_callback): Likewise.
363	(print_debug_line_section, print_debug_loc_section): Likewise.
364
365	* readelf.c (print_debug_ranges_section): Translate all strings.
366	(print_debug_loc_section): Likewise.
367
368	* unstrip.c (copy_elided_sections): Initialize SEC.
369
370	* ar.c (do_oper_insert): Put trailing / on short names.
371
372	* arlib.h (MAX_AR_NAME_LEN): Decrease by one.
373
374	* arlib2.c (arlib_add_long_name): Adjust for header size.
375
376	* arlib.c (arlib_finalize): Pad long name table to keep size even.
377
378	* ar.c (do_oper_insert): Use write_retry for padding write.
379
380	* ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
381	Unconditionally set FOUND[CNT]->elf when setting ->mem.
382	(remember_long_name): New function.
383	(do_oper_insert): Call it.  Correctly use length of basename,
384	not original name.  Don't store long name twice for new member.
385
3862007-10-06  Roland McGrath  <roland@redhat.com>
387
388	* elflint.c (check_note): Skip empty segment.
389	(check_note_section): Skip empty section.
390
391	* unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
392	(handle_output_dir_module, handle_implicit_modules): Pass it down.
393	(handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
394	(compare_alloc_sections): Take new arg REL, ignore address if true.
395	(compare_sections): Likewise, pass it down.
396	(compare_sections_rel, compare_sections_nonrel): New functions.
397	(find_alloc_sections_prelink, copy_elided_sections): Use them
398	instead of compare_sections.
399	(sections_match): New function, broken out of ...
400	(find_alloc_section): ... here.
401	(copy_elided_sections): Reorganize section match-up logic.
402	Use sections_match for SHF_ALLOC in ET_REL.
403	For ET_REL, let the nonzero sh_addr from the debug file dominate.
404
405	* unstrip.c (add_new_section_symbols): Take new arg REL.
406	When true, do not update section symbol values.
407	(collect_symbols): Likewise.  Update section symbols with address
408	of chosen output section, not original section.
409	(check_symtab_section_symbols, copy_elided_sections): Update callers.
410
411	* unstrip.c (compare_alloc_sections): At the same address, preserve
412	original section order.
413
414	* elflint.c (special_sections): Don't require MERGE|STRINGS for
415	.debug_str, it didn't always have them with older tools.
416
417	* elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
418
4192007-10-05  Roland McGrath  <roland@redhat.com>
420
421	* elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
422	ET_REL file.
423
424	* elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
425	SHN_UNDEF as "bad section".  Use shndx value in messages.
426
427	* elflint.c (special_sections): Add ".debug_str".  Decrement namelen
428	for ".debug" so it matches as a prefix.
429	(IS_KNOWN_SPECIAL): New macro.
430	(check_sections): Use it for ".plt" match.  Cite wrong SHT_NOBITS
431	type even under -d, for a .debug* or .shstrtab section.
432
433	* readelf.c (print_ops): Use hex for address operand.
434
4352007-10-04  Roland McGrath  <roland@redhat.com>
436
437	* unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
438	.gnu_debuglink section to SHN_UNDEF.  Drop STT_SECTION symbols for
439	sections mapped to SHN_UNDEF.
440
4412007-10-04  Ulrich Drepper  <drepper@redhat.com>
442
443	* readelf.c (dump_archive_index): Avoid warning about uninitialized
444	variable with older glibc versions.
445	Add some branch prediction.
446
4472007-10-04  Roland McGrath  <roland@redhat.com>
448
449	* readelf.c (print_archive_index): New variable.
450	(options, parse_opt): Accept -c/--archive-index to set it.
451	(dump_archive_index): New function.
452	(process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
453	Call dump_archive_index on archives if set.
454	(main): Update caller.
455	(any_control_option): Give it file scope, moved out of ...
456	(parse_opt): ... here.
457
4582007-10-03  Roland McGrath  <roland@redhat.com>
459
460	* unstrip.c (struct arg_info): Add `list' flag.
461	(options, parse_opt): Grok -n/--list to set it.
462	(list_module): New function.
463	(handle_implicit_modules): Call it under -n.
464
465	* elflint.c (check_note_section): New function.
466	(check_sections): Call it for SHT_NOTE.
467
468	* readelf.c (handle_notes): Use sections when available.
469
470	* elflint.c (check_note_data): New function, broken out of ...
471	(check_note): ... here.  Call it and elf_getdata_rawchunk.
472
473	* readelf.c (handle_auxv_note): Take offset as argument, not buffer.
474	Use elf_getdata_rawchunk and gelf_getauxv.
475	(handle_notes_data): New function, broken out of ...
476	(handle_notes): ... here.  Call it and elf_getdata_rawchunk.
477
4782007-10-01  Roland McGrath  <roland@redhat.com>
479
480	* readelf.c (hex_dump): Fix transposed subtraction generating spaces.
481
482	* readelf.c (hex_dump): Fix line header to be hex instead of decimal.
483
4842007-09-10  Roland McGrath  <roland@redhat.com>
485
486	* readelf.c (options): Give -p optional argument, alias --string-dump.
487	(string_sections, string_sections_tail): New static variables.
488	(parse_opt): Set them when -p has an argument.
489	(print_string_section): New function, broken out of ...
490	(print_strings): ... here.  Call it.
491	(dump_data_section): New function, broken out of ...
492	(dump_data): ... here.  Call it.
493	(for_each_section_argument): New function, broken out of ...
494	(dump_data): ... here.  Call it.
495	(dump_strings): New function.
496
4972007-08-31  Roland McGrath  <roland@redhat.com>
498
499	* readelf.c (print_strings): Typo fix.
500
5012007-08-23  Roland McGrath  <roland@redhat.com>
502
503	* readelf.c (printf_with_wrap): Function removed.
504	(REGISTER_WRAP_COLUMN): New macro.
505	(handle_core_register): Use print_core_item instead.
506	(struct register_info): New type.
507	(compare_registers, compare_register_sets): New functions.
508	(register_bitpos, compare_sets_by_info): New functions.
509	(handle_core_registers): Use those to segregate and sort registers
510	for display.
511
512	* readelf.c (ITEM_WRAP_COLUMN): New macro.
513	(print_core_item): New function.
514	(handle_core_item): Use it instead of printf_with_wrap.
515	(compare_core_items, compare_core_item_groups): New functions.
516	(handle_core_items): Use them.  Sort by group and force line breaks
517	between groups.
518
519	* readelf.c (handle_core_registers, handle_core_items): New functions,
520	broken out of ...
521	(handle_core_note): ... here.   Call them.
522
5232007-08-22  Roland McGrath  <roland@redhat.com>
524
525	* unstrip.c (new_shstrtab): New function, broken out of ...
526	(copy_elided_sections): ... here.
527
5282007-08-20  Roland McGrath  <roland@redhat.com>
529
530	Avoid local function trampolines in nm binary.
531	* nm.c (sort_by_address): Move to a static function instead of local
532	inside show_symbols.
533	(sort_by_name_strtab): New static variable.
534	(sort_by_name): Use it.  Move to a static function instead of local
535	inside show_symbols.
536	(show_symbols): Set sort_by_name_strtab.
537
5382007-08-19  Roland McGrath  <roland@redhat.com>
539
540	* readelf.c (handle_auxv_note): New function.
541	(handle_notes): Call it.
542
543	* readelf.c (printf_with_wrap, convert): New functions.
544	(handle_core_item, (handle_core_register): New functions.
545	(handle_notes): Call those with details from ebl_core_note.
546
5472007-08-12  Roland McGrath  <roland@redhat.com>
548
549	* elflint.c (check_note): Accept type 0 with name "Linux".
550
551	* elflint.c (special_sections): Accept SHF_ALLOC for ".note".
552
553	* elflint.c (section_flags_string): Return "none" for 0, not "".
554
5552007-08-11  Roland McGrath  <roland@redhat.com>
556
557	* elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
558
5592007-08-04  Ulrich Drepper  <drepper@redhat.com>
560
561	* readelf.c (hex_dump): Use isprint to determine whether to print
562	character itself or full stop character.
563	(dump_data): No need to check endp for NULL after strtol call.
564
5652007-08-03  Roland McGrath  <roland@redhat.com>
566
567	* readelf.c (print_string_sections): New variable.
568	(options, parse_opt): Handle --strings/-p to set it.
569	(print_strings): New function.
570	(process_elf_file): Call it under -p.
571
572	* readelf.c (options): Add hidden aliases --segments, --sections,
573	as taken by binutils readelf.
574
5752007-08-01  Roland McGrath  <roland@redhat.com>
576
577	* readelf.c (dump_data_sections, dump_data_sections_tail):
578	New variables.
579	(options, parse_opt): Handle --hex-dump/-x, set them.
580	(hex_dump): New function.
581	(dump_data): New function, call it.
582	(process_elf_file): Call it.
583
5842007-07-25  Roland McGrath  <roland@redhat.com>
585
586	* addr2line.c (show_symbols): New variable.
587	(print_addrsym): New function.
588	(handle_address): Call it.
589	(options, parse_opt): Handle -S/--symbols.
590
5912007-06-05  Ulrich Drepper  <drepper@redhat.com>
592
593	* addr2line.c: Update for latest autoconf header.
594	* ar.c: Likewise.
595	* elfcmp.c: Likewise.
596	* elflint.c: Likewise.
597	* findtextrel.c: Likewise.
598	* ld.c: Likewise.
599	* ldgeneric.c: Likewise.
600	* nm.c: Likewise.
601	* objdump.c: Likewise.
602	* ranlib.c: Likewise.
603	* readelf.c: Likewise.
604	* size.c: Likewise.
605	* strings.c: Likewise.
606	* strip.c: Likewise.
607	* unstrip.c: Likewise.
608
6092007-05-18  Roland McGrath  <roland@redhat.com>
610
611	* unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
612	stripped file, so as not to duplicate a section copied in both.
613
614	* strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
615
6162007-05-17  Roland McGrath  <roland@redhat.com>
617
618	* unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
619
620	* unstrip.c (handle_file): Tweak BIAS != 0 warning.
621
622	* unstrip.c (handle_file): Take new arg CREATE_DIRS.  If set,
623	call make_directories here.
624	(handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
625	(handle_dwfl_module): Likewise.
626	(handle_implicit_modules): Update callers.
627	(handle_output_dir_module): Likewise.  Don't do make_directories here.
628
629	* unstrip.c (get_section_name): New function, broken out of ...
630	(copy_elided_sections): here.  Update callers.
631	(find_alloc_section): Broken out of ...
632	(copy_elided_sections): ... here.  Update caller.
633	(symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
634	update STT_SECTION symbols' st_value fields as a side effect.
635	(check_symtab_section_symbols): Update caller.
636	(add_new_section_symbols): Set st_value in symbols added.
637	(collect_symbols): Reset S->value for STT_SECTION symbols recorded.
638	Take new arg SPLIT_BSS.  Adjust S->shndx recorded for symbols moved
639	from .bss to .dynbss.
640	(find_alloc_sections_prelink): New function.  Associate debug file
641	allocated SHT_NOBITS shdrs with stripped moved by prelink via
642	.gnu.prelink_undo information.
643	(copy_elided_sections): Call it when we couldn't find every allocated
644	section.  Don't use a debug file non-NOBITS section if SHF_ALLOC.
645	Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
646	(handle_file): Update callers.
647
648	* unstrip.c (copy_elided_sections): Ignore unfound unallocated section
649	named ".comment".
650
651	* elflint.c (check_sections): Fix association of segments with
652	sections when p_memsz > p_filesz.
653
6542007-04-29  Roland McGrath  <roland@redhat.com>
655
656	* addr2line.c (options, main): Tweak argp group settings to fix
657	usage output.
658
6592007-04-28  Roland McGrath  <roland@redhat.com>
660
661	* strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
662	sizes to match sections adjusted in the stripped file.
663
6642007-04-24  Roland McGrath  <roland@redhat.com>
665
666	* elfcmp.c (OPT_HASH_INEXACT): New macro.
667	(hash_inexact): New variable.
668	(options, parse_opt): Add --hash-inexact option to set it.
669	(hash_content_equivalent): New function.
670	(main): Call it for differing SHT_HASH sections under --hash-inexact.
671
6722007-04-23  Roland McGrath  <roland@redhat.com>
673
674	* unstrip.c: New file.
675	* Makefile.am (bin_PROGRAMS): Add it.
676	(unstrip_LDADD): New variable.
677
678	* strip.c (options): Allow --output for -o.
679
6802007-02-15  Ulrich Drepper  <drepper@redhat.com>
681
682	* readelf.c: Remove unused code.  Add a few consts.
683
6842007-02-15  Roland McGrath  <roland@redhat.com>
685
686	* readelf.c (print_debug): Fix brainos in SHDR test.
687
6882007-02-05  Roland McGrath  <roland@redhat.com>
689
690	* ar.c: Include <limits.h>, since we use LONG_MAX.
691
6922007-02-05  Ulrich Drepper  <drepper@redhat.com>
693
694	* ar.c: Add ugly hack to work around gcc complaining that we
695	ignore fchown's return value.
696	(do_oper_insert): Handle error when writing padding.
697	* ranlib.c: Add fchown complain work around.
698
699	* arlib.c: Make symtab a global variable.  Change all users.
700	* arlib2.c: Likewise.
701	* ranlib.c: Likewise.
702	* ar.c: Likewise.
703	* arlib.h: Declare it.
704
7052007-01-11  Roland McGrath  <roland@redhat.com>
706
707	* elflint.c (check_sections): Use ebl_machine_section_flag_check on
708	SHF_MASKPROC bits separately from generic sh_flags validation.
709
7102007-02-04  Ulrich Drepper  <drepper@redhat.com>
711
712	* ar.c: New file.
713	* arlib.c: New file.
714	* arlib2.c: New file.
715	* arlib.h: New file.
716	* Makefile (noinst_LIBRARIES): Add libar.
717	(libar_a_SOURCES): Define.
718	(ar_LDADD): Define.
719	(CFLAGS_ar): Define.
720	* ranlib.c: Change to use arlib.
721
722	* elflint.c (check_symtab): Work around GNU ld bug which omits
723	sections but not symbols in those sections.
724
7252007-01-10  Ulrich Drepper  <drepper@redhat.com>
726
727	* addr2line.c: Update copyright year.
728	* elfcmp.c: Likewise.
729	* elflint.c: Likewise.
730	* findtextrel.c: Likewise.
731	* ld.c: Likewise.
732	* nm.c: Likewise.
733	* objdump.c: Likewise.
734	* ranlib.c:  Likewise.
735	* readelf.c: Likewise.
736	* size.c: Likewise.
737	* strings.c: Likewise.
738	* strip.c: Likewise.
739
7402006-12-09  Ulrich Drepper  <drepper@redhat.com>
741
742	* elflint.c (compare_hash_gnu_hash): New function.  Report if the
743	two hash tables have different content (module expected omission
744	of undefined symbols).
745
7462006-10-31  Roland McGrath  <roland@redhat.com>
747
748	* elflint.c (check_program_header): Don't complain about
749	p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
750
7512006-09-19  Jakub Jelinek  <jakub@redhat.com>
752
753	* strip.c (process_file): Disallow -f on archives.
754
7552006-10-09  Roland McGrath  <roland@redhat.com>
756
757	* Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
758
7592006-08-29  Roland McGrath  <roland@redhat.com>
760
761	* Makefile.am (MAINTAINERCLEANFILES): New variable.
762
763	* readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
764	Reported by Christian Aichinger <Greek0@gmx.net>.
765
766	* elflint.c (valid_e_machine): Add EM_ALPHA.
767	Reported by Christian Aichinger <Greek0@gmx.net>.
768
7692006-08-08  Ulrich Drepper  <drepper@redhat.com>
770
771	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
772	Keep track of which "high DT" entries are present.
773	Check that either old or GNU-style hash table is present.
774	If GNU-style hash table is used a symbol table is mandatory.
775	Check that if any prelink entry is present all of them are.
776	(check_gnu_hash): Only fail for undefined symbols in GNU-style hash
777	table if they don't refer to functions.
778
7792006-07-17  Roland McGrath  <roland@redhat.com>
780
781	* elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
782	(add_version): Likewise for argument.
783	(check_versym): Cast constant to GElf_Versym for comparison.
784
7852006-07-12  Roland McGrath  <roland@redhat.com>
786
787	* readelf.c (handle_gnu_hash): Add casts for machines where
788	Elf32_Word != unsigned int.
789
7902006-07-12  Ulrich Drepper  <drepper@redhat.com>
791
792	* elflint.c (check_sysv_hash64): Fix printf format.
793
7942006-07-11  Roland McGrath  <roland@redhat.com>
795
796	* addr2line.c (options): English fix in -f doc string.
797
798	* addr2line.c (use_comp_dir): New variable.
799	(options, parse_opt): Grok -A/--absolute to set it.
800	(handle_address): If set, prepend dwfl_line_comp_dir results to
801	relative file names.
802
8032006-07-06  Ulrich Drepper  <drepper@redhat.com>
804
805	* elflint.c: Adjust for latest new hash table format.
806	* readelf.c: Likewise.
807
808	* elflint.c (check_versym): Ignore hidden bit when comparing version
809	numbers.
810
8112006-07-05  Ulrich Drepper  <drepper@redhat.com>
812
813	* ldgeneric.c (ld_generic_create_outfile): Correctly recognize
814	discarded COMDAT symbols.
815
816	* i386_ld.c (elf_i386_count_relocations): Lot of corrections.
817	(elf_i386_create_relocations): Likewise.
818	* ld.h (struct symbol): Add local and hidden bits.
819	* ld.c (create_special_section_symbol): These synthsized symbols
820	are local and hidden.
821	* ldgeneric.c (file_process2): Check whether input file matches
822	the emulation.
823	(fillin_special_symbol): Create symbols as local and/or hidden
824	if requested.
825	(ld_generic_create_outfile): Make local copy of symbol.
826	Don't hide global, defined symbols in dynamic symbol table unless
827	requested.  Synthetic symbols have no version information.
828
829	* elflint.c: Add support for checking 64-bit SysV-style hash tables.
830	* readelf.c: Add support for printing 64-bit SysV-style hash tables.
831
8322006-07-04  Ulrich Drepper  <drepper@redhat.com>
833
834	* elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
835	testing.
836
8372006-07-03  Ulrich Drepper  <drepper@redhat.com>
838
839	* elflint.c: Add testing of DT_GNU_HASH.
840	* readelf.c: Implement showing histogram for DT_GNU_HASH section.
841
842	* Makefile.am: Add hacks to create dependency files for non-generic
843	linker.
844
8452006-06-12  Ulrich Drepper  <drepper@redhat.com>
846
847	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
848	section if creating a DSO and no interpreter is given.
849	(ld_generic_create_outfile): Don't store reference to symbols in
850	discarded COMDAT groups.  Don't create PHDR and INTERP program header
851	for DSO if no interpreter is specified.
852	(create_verneed_data): Pretty printing.
853
854	* ldscript.y (content): If a DSO is created don't set default
855	interpreter from linker script.
856
857	* i386_ld.c (elf_i386_count_relocations): Do not add relocations
858	for symbols in discarded COMDAT groups.
859	(elf_i386_create_relocations): Likewise.
860	* ld.h (struct scninfo): Add unused_comdat.
861	* ldgeneric.c (add_section): Also check group signature when
862	matching COMDAT sections.
863	(add_relocatable_file): Ignore symbols in COMDAT group which are
864	discarded.
865
866	* elflint.c (check_one_reloc): For *_NONE relocs only check type
867	and symbol reference.
868
8692006-06-11  Ulrich Drepper  <drepper@redhat.com>
870
871	* elflint.c (check_dynamic): Fix checking value of tags which are
872	offsets in the string section.  Make sure DT_STRTAB points to the
873	section referenced in sh_link.
874
875	* ld.c (options): Add headers.  Add short option 'R' for '--rpath'.
876
877	* ld.c: Recognize --eh-frame-hdr option.
878	* ld.h (struct ld_state): Add eh_frame_hdr field.
879	* ldgeneric.c (struct unw_eh_frame_hdr): Define.
880
881	* ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
882	SH_FLAGS_COMBINE.
883	(add_relocatable_file): Minor optimization of last change.
884	(match_section): Don't preserve SHF_GROUP flag any longer.
885
8862006-06-10  Ulrich Drepper  <drepper@redhat.com>
887
888	* ld.c (parse_z_option): Recognize execstack and noexecstack.
889	Handle record and ignore as position dependent options.
890	(parse_z_option_2): Handle ignore and record here.
891	* ld.h (struct ld_state): Add execstack field.
892	* ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
893	sections.
894	(ld_generic_create_outfile): Fix program header creation in native
895	linker.  Add PT_GNU_STACK program header.
896
8972006-06-09  Ulrich Drepper  <drepper@redhat.com>
898
899	* i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
900	for PLT entries if there is no local definition.
901
902	* ld.c (parse_option): Handle -z ignore like --as-needed and
903	-z record like --no-as-needed.
904	* ld.h (struct ld_state): Remove ignore_unused_dsos field.
905	* ldgeneric.c (new_generated_scn): Always compute ndt_needed by
906	looping over DSOs.  When deciding about adding DT_NEEDED entries
907	use ->as_needed instead of ignore_unused_dsos.
908
9092006-05-31  Ulrich Drepper  <drepper@redhat.com>
910
911	* ld.c: Recognize --as-needed and --no-as-needed options.
912	* ld.h (struct usedfile): Add as_needed field.
913	(struct ld_state): Likewise.
914	* ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
915	the list.
916	* ldscript.y (filename_id_list): Split to correctly parse all
917	combinations.
918	(mark_as_needed): Fix loop.
919
9202006-05-28  Ulrich Drepper  <drepper@redhat.com>
921
922	* addr2line.c (print_dwarf_function): Use unsigned type for lineno
923	and colno.
924
9252006-05-27  Ulrich Drepper  <drepper@redhat.com>
926
927	* readelf.c (handle_relocs_rela): Better notations for addon value.
928	(print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
929
9302006-04-04  Ulrich Drepper  <drepper@redhat.com>
931
932	* addr2line.c: Update copyright year.
933	* elfcmp.c: Likewise.
934	* elflint.c: Likewise.
935	* findtextrel.c: Likewise.
936	* ld.c: Likewise.
937	* nm.c: Likewise.
938	* objdump.c: Likewise.
939	* ranlib.c: Likewise.
940	* readelf.c: Likewise.
941	* size.c: Likewise.
942	* strings.c: Likewise.
943	* strip.c: Likewise.
944
9452006-03-09  Roland McGrath  <roland@redhat.com>
946
947	* Makefile.am (AM_LDFLAGS): New variable.
948
9492006-03-01  Roland McGrath  <roland@redhat.com>
950
951	* readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
952	for dwarf.h changes matching 3.0 spec.
953	(dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
954
9552005-12-04  Ulrich Drepper  <drepper@redhat.com>
956
957	* elflint.c (check_one_reloc): If relocation section is not loaded,
958	don't check whether the relocations modify read-only sections or
959	loaded and unloaded sections.
960
9612005-11-28  Ulrich Drepper  <drepper@redhat.com>
962
963	* elflint.c (check_one_reloc): Take additional parameters.  Use
964	them to determine whether relocation is valid in this type of
965	file.  DSOs and executables can contain relocation sections in
966	unloaded sections which just show the relocations the linker
967	applied.  Adjust all callers.
968	(check_program_header): Check that PT_PHDR is loaded and that offset
969	matches the one in the ELF header.
970
9712005-10-26  Roland McGrath  <roland@redhat.com>
972
973	* nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
974
9752005-09-03  Ulrich Drepper  <drepper@redhat.com>
976
977	* strip.c (handle_elf): Unify some error messages.
978	* ld.c (main): Likewise.
979	* ldgeneric.c (open_elf): Likewise.
980	* elfcmp.c (main): Likewise.
981	* elflint.c (check_elf_header): Likewise.
982
983	* size.c (process_file): Fix typo in error message.
984
985	* readelf.c: Lots of little cleanups.  Use _unlocked functions.
986
9872005-09-02  Ulrich Drepper  <drepper@redhat.com>
988
989	* strings.c (main): Reset elfmap variable after munmap call.
990	[_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
991
9922005-08-28  Ulrich Drepper  <drepper@redhat.com>
993
994	* ranlib.c: Don't define pread_retry and write_retry here.
995
996	* Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
997	(CLEANFILES): Add *.gcno *.gcda *.gconv.
998
999	* strings.c (process_chunk): Reorder expressions in conditional
1000	(process_chunk_mb): Likewise.
1001
1002	* strings.c: New file.
1003	* Makefile.am (bin_PROGRAMS): Add strings.
1004	(strings_no_Wstring): Define.
1005	(strings_LDADD): Define.
1006
10072005-08-27  Roland McGrath  <roland@redhat.com>
1008
1009	* addr2line.c (dwarf_diename_integrate): Function removed.
1010	(print_dwarf_function): Use plain dwarf_diename.
1011
10122005-08-24  Ulrich Drepper  <drepper@redhat.com>
1013
1014	* elflint.c (check_versym): Versioned symbols should not have
1015	local binding.
1016
10172005-08-15  Ulrich Drepper  <drepper@redhat.com>
1018
1019	* elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1020	undefined.
1021
1022	* Makefile.am: Add rules to build ranlib.
1023	* ranlib.c: New file.
1024
10252005-08-14  Roland McGrath  <roland@redhat.com>
1026
1027	* elflint.c (check_sections): Use ebl_section_type_name and allow any
1028	sh_type it recognizes.
1029
1030	* elflint.c (check_sections): Print unknown flags in hex, don't
1031	truncate high bits.  Print section number and name for unknown type.
1032
10332005-08-13  Roland McGrath  <roland@redhat.com>
1034
1035	* elflint.c (check_program_header): Use ebl_segment_type_name and
1036	allow any p_type it recognizes.  Include p_type value in error
1037	message for unknown type.
1038
10392005-08-13  Ulrich Drepper  <drepper@redhat.com>
1040
1041	* elflint.c (check_symtab): Simplify last change a bit.  Pass ehdr
1042	to ebl_check_special_symbol.
1043	(check_sections): Pass ehdr to ebl_bss_plt_p.
1044
10452005-08-12  Roland McGrath  <roland@redhat.com>
1046
1047	* elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1048	refers to the right section if it's not SHN_ABS.
1049	Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1050
1051	* elflint.c (check_sections): Don't complain about a non-NOBITS
1052	section taking no segment space, if it's sh_size is 0.
1053
1054	* elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1055	be PROGBITS or NOBITS.
1056
1057	* elflint.c (check_symtab): Use ebl_check_special_symbol to override
1058	standard st_value and st_size checks.
1059
10602005-07-28  Roland McGrath  <roland@redhat.com>
1061
1062	* addr2line.c (options, parse_opt): Don't handle -e here.
1063	(executable): Variable removed.
1064	(argp_children): New static variable.
1065	(argp): Use it.  Make const.
1066	(main): Fill in argp_children from dwfl_standard_argp ().
1067	Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1068	(print_dwarf_function): New function.  Try to figure out inline chain.
1069	(elf_getname): Function removed, libdwfl does it for us.
1070	(handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1071	Use dwfl_module_addrname instead of elf_getname.
1072	Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1073	* Makefile.am (INCLUDES): Add libdwfl directory to path.
1074
10752005-08-10  Ulrich Drepper  <drepper@redhat.com>
1076
1077	* strip.c (parse_opt): STATE parameter is now used.
1078	Various little cleanups.
1079
1080	* readelf.c (print_debug_line_section): Correct fallout of renaming
1081	of DW_LNS_set_epilog_begin.
1082
10832005-08-08  Roland McGrath  <roland@redhat.com>
1084
1085	* strip.c (options, parse_opt): Grok -R .comment for compatibility
1086	with binutils strip.  Likewise -d, -S, as aliases for -g.
1087	Likewise ignore -s/--strip-all.
1088
10892005-08-07  Roland McGrath  <roland@redhat.com>
1090
1091	* strip.c (process_file): Open read-only when using a different output
1092	file.
1093
10942005-08-06  Ulrich Drepper  <drepper@redhat.com>
1095
1096	* elflint.c (in_nobits_scn): New function.
1097	(check_versym): Allow references for defined symbols against versions
1098	of other DSOs also for symbols in nobits sections.
1099	Move a few variables around.
1100
1101	* Makefile.am (AM_CFLAGS): Avoid duplication.
1102	Link with statis libs if BUILD_STATIC.
1103
11042005-08-05  Ulrich Drepper  <drepper@redhat.com>
1105
1106	* elflint.c: Many, many more tests.  Mostly related to symbol
1107	versioning.  Those sections should now be completely checked.
1108
1109	* readelf.c (print_dynamic): Use gelf_offscn.
1110
11112005-08-04  Ulrich Drepper  <drepper@redhat.com>
1112
1113	* elflint.c: Add lots more tests: more extension symbol table sanity,
1114	versioning section tests, hash table tests.  General cleanup.
1115
11162005-08-02  Ulrich Drepper  <drepper@redhat.com>
1117
1118	* objdump.c: New file.
1119	* Makefile.am (bin_PROGRAMS): Add objdump.
1120	(objdump_LDADD): Define.
1121
1122	* elflint.c (check_reloc_shdr): New function split out from check_rela
1123	and check_rel.
1124	(check_one_reloc): New function.  Likewise.
1125	(check_rela): Use check_reloc_shdr and check_one_reloc.
1126	(check_rel): Likewise.
1127	(check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1128	section.
1129	Add checks that relocations against read-only segments are flagged,
1130	that the text relocation flag is not set unnecessarily, and that
1131	relocations in one section are either against loaded or not-loaded
1132	segments.
1133
11342005-08-01  Ulrich Drepper  <drepper@redhat.com>
1135
1136	* elfcmp.c (main): Ignore section count and section name string table
1137	section index.
1138
11392005-07-27  Roland McGrath  <roland@redhat.com>
1140
1141	* elfcmp.c: Include <locale.h>.
1142
11432005-07-27  Ulrich Drepper  <drepper@redhat.com>
1144
1145	* elfcmp.c: Print name and index of differing section.
1146
11472005-07-24  Ulrich Drepper  <drepper@redhat.com>
1148
1149	* elfcmp.c: Implement comparing gaps between sections.
1150
11512005-07-23  Ulrich Drepper  <drepper@redhat.com>
1152
1153	* elflint.c: Include libeblP.h instead of libebl.h.
1154	* nm.c: Likewise.
1155	* readelf.c: Likewise.
1156	* elfcmp.c: Likewise.
1157
1158	* elfcmp.c (main): Compare individual ELF header fields, excluding
1159	e_shoff instead of the whole struct at once.
1160	Use ebl_section_strip_p instead of SECTION_STRIP_P.
1161	* strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1162
11632005-07-22  Ulrich Drepper  <drepper@redhat.com>
1164
1165	* elfcmp.c (main): Take empty section into account when comparing
1166	section content.
1167
1168	* elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1169	using it.
1170
11712005-07-21  Ulrich Drepper  <drepper@redhat.com>
1172
1173	* elfcmp.c: New file.
1174	* Makefile.am (bin_PROGRAMS): Add elfcmp.
1175	(elfcmp_LDADD): Define.
1176
1177	* elflint.c (check_rela): Check that copy relocations only reference
1178	object symbols or symbols with unknown type.
1179	(check_rel): Likewise.
1180
11812005-06-08  Roland McGrath  <roland@redhat.com>
1182
1183	* readelf.c (print_ops): Add consts.
1184
11852005-05-31  Roland McGrath  <roland@redhat.com>
1186
1187	* readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1188	abbreviations.  Print a header line before each CU section.
1189
1190	* readelf.c (print_debug_loc_section): Fix indentation for larger
1191	address size.
1192
11932005-05-30  Roland McGrath  <roland@redhat.com>
1194
1195	* readelf.c (print_debug_line_section): Print section offset of each
1196	CU's table, so they are easy to find from seeing the stmt_list value.
1197
1198	* readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1199	(attr_callback): Grok DW_AT_ranges and print offset in hex.
1200
1201	* readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1202	(print_debug_ranges_section, print_debug_loc_section): Likewise.
1203
1204	* readelf.c (print_ops): Take different args for indentation control.
1205	(attr_callback): Caller updated.
1206	Grok several more block-form attributes as being location expressions.
1207	For those same attributes with udata forms, format output differently
1208	for location list offset.
1209	(print_debug_loc_section): Implement it for real.
1210
1211	* readelf.c (options): Mention ranges for --debug-dump.
1212	(enum section_e): Add section_ranges.
1213	(parse_opt): Grok "ranges" for -w/--debug-dump.
1214	(print_debug_ranges_section): New function.
1215	(print_debug): Handle .debug_ranges section.
1216
12172005-05-30  Ulrich Drepper  <drepper@redhat.com>
1218
1219	* readelf.c (handle_notes): At least x86-64 need not have the note
1220	section values aligned to 8 bytes.
1221
12222005-05-18  Ulrich Drepper  <drepper@redhat.com>
1223
1224	* readelf.c (dwarf_tag_string): Add new tags.
1225
12262005-05-08  Roland McGrath  <roland@redhat.com>
1227
1228	* strip.c (handle_elf): Don't translate hash and versym data formats,
1229	elf_getdata already did it for us.
1230
12312005-05-07  Ulrich Drepper  <drepper@redhat.com>
1232
1233	* Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1234	(addr2line_LDADD): Likewise.
1235
12362005-05-03  Roland McGrath  <roland@redhat.com>
1237
1238	* strip.c (handle_elf): Apply symbol table fixups to discarded
1239	relocation sections when they are being saved in the debug file.
1240
1241	* strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1242	and gelf_xlatetof, not the native byte order.
1243
1244	* strip.c (parse_opt): Give error if -f or -o is repeated.
1245	(main): Exit if argp_parse returns nonzero.
1246
1247	* strip.c (debug_fname_embed): New variable.
1248	(options, parse_opt): New option -F to set it.
1249
12502005-05-07  Ulrich Drepper  <drepper@redhat.com>
1251
1252	* readelf.c (parse_opt): Make any_control_option variable
1253	local.  Simplify some tests.
1254
12552005-05-03  Roland McGrath  <roland@redhat.com>
1256
1257	* strip.c (crc32_file): Function removed (now in ../lib).
1258
12592005-05-03  Roland McGrath  <roland@redhat.com>
1260
1261	* elflint.c (is_debuginfo): New variable.
1262	(options, parse_opt): New option --debuginfo/-d to set it.
1263	(check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1264	(check_note): If is_debuginfo, don't try to get note contents.
1265
12662005-04-24  Ulrich Drepper  <drepper@redhat.com>
1267
1268	* readelf.c (print_debug_abbrev_section): Don't print error when end of
1269	section reached.
1270
12712005-04-14  Ulrich Drepper  <drepper@redhat.com>
1272
1273	* readelf.c (dwarf_encoding_string): New function.
1274	(dwarf_inline_string): New function.
1275	(dwarf_access_string): New function.
1276	(dwarf_visibility_string): New function.
1277	(dwarf_virtuality_string): New function.
1278	(dwarf_identifier_case_string): New function.
1279	(dwarf_calling_convention_string): New function.
1280	(dwarf_ordering_string): New function.
1281	(dwarf_discr_list_string): New function.
1282	(attr_callback): Decode man more attribute values.
1283
12842005-04-01  Ulrich Drepper  <drepper@redhat.com>
1285
1286	* addr2line.c: Finish implementation of -f option.
1287
12882005-03-29  Ulrich Drepper  <drepper@redhat.com>
1289
1290	* addr2line.c: New file.
1291	* Makefile.am (bin_PROGRAMS): Add addr2line.
1292	Define addr2line_LDADD.
1293
1294	* findtextrel.c: Use new dwarf_addrdie function.
1295
1296	* findtextrel.c: Fix usage message and re-add accidentally removed
1297	line.
1298
12992005-03-28  Ulrich Drepper  <drepper@redhat.com>
1300
1301	* findtextrel.c: New file.
1302	* Makefile: Add rules to build findtextrel.
1303
13042005-02-15  Ulrich Drepper  <drepper@redhat.com>
1305
1306	* ldlex.l: Provide ECHO definition to avoid warning.
1307
1308	* elflint.c (check_program_header): Fix typo in RELRO test.
1309
1310	* Makefile.am (AM_CFLAGS): Add more warning options.
1311	* elflint.c: Fix warnings introduced by the new warning options.
1312	* i386_ld.c: Likewise.
1313	* ld.c: Likewise.
1314	* ld.h: Likewise.
1315	* ldgeneric.c: Likewise.
1316	* nm.c: Likewise.
1317	* readelf.c: Likewise.
1318	* sectionhash.c: Likewise.
1319	* size.c: Likewise.
1320	* string.c: Likewise.
1321
13222005-02-05  Ulrich Drepper  <drepper@redhat.com>
1323
1324	* Makefile.am: Check for text relocations in constructed DSOs.
1325
1326	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.  Link all apps
1327	with -lmudflap.
1328
1329	* ldscript.y: Add as_needed handling.
1330	* ldlex.l: Recognize AS_NEEDED token.
1331	* ld.h (struct filename_list): Add as_needed flag.
1332
13332005-02-04  Ulrich Drepper  <drepper@redhat.com>
1334
1335	* elflint.c (check_symtab): Correctly determine size of GOT section.
1336
13372005-01-19  Ulrich Drepper  <drepper@redhat.com>
1338
1339	* ld.c: Remove unnecessary more_help function.  Print bug report
1340	address using argp.
1341	* strip.c: Likewise.
1342	* size.c: Likewise.
1343	* nm.c: Likewise.
1344	* readelf.c: Likewise.
1345	* elflint.c: Likewise.
1346
1347	* elflint.c (main): Don't check for parameter problems here.
1348	(parse_opt): Do it here, where we get informed about some of them
1349	anyway.
1350
1351	* readelf.c (main): Don't check for parameter problems here.
1352	(parse_opt): Do it here, where we get informed about some of them
1353	anyway.
1354
13552005-01-11  Ulrich Drepper  <drepper@redhat.com>
1356
1357	* strip.c: Update copyright year.
1358	* readelf.c: Likewise.
1359	* size.c: Likewise.
1360	* nm.c: Likewise.
1361	* ld.c: Likewise.
1362	* elflint.c: Likewise.
1363
1364	* elflint.c (check_symtab): Don't warn about wrong size for
1365	_DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1366
13672004-10-05  Ulrich Drepper  <drepper@redhat.com>
1368
1369	* readelf.c (print_phdr): In section mapping, also indicate
1370	sections in read-only segments.
1371
13722004-09-25  Ulrich Drepper  <drepper@redhat.com>
1373
1374	* readelf.c: Make compile with gcc 4.0.
1375	* strip.c: Likewise.
1376
13772004-08-16  Ulrich Drepper  <drepper@redhat.com>
1378
1379	* strip.c (handle_elf): Rewrite dynamic memory handling to use of
1380	allocate to work around gcc 3.4 bug.
1381
13822004-01-25  Ulrich Drepper  <drepper@redhat.com>
1383
1384	* ldlex.l (invalid_char): Better error message.
1385
13862004-01-23  Ulrich Drepper  <drepper@redhat.com>
1387
1388	* readelf.c: Print SHT_GNU_LIBLIST sections.
1389
1390	* none_ld.c: New file.
1391
13922004-01-21  Ulrich Drepper  <drepper@redhat.com>
1393
1394	* Makefile.am: Enable building of machine specific linker.
1395
13962004-01-20  Ulrich Drepper  <drepper@redhat.com>
1397
1398	* Makefile.am: Support building with mudflap.
1399
1400	* i386_ld.c: Fix warnings gcc 3.4 spits out.
1401	* ldgeneric.c: Likewise.
1402	* ldscript.y: Likewise.
1403	* readelf.c: Likewise.
1404	* strip.c: Likewise.
1405
1406	* readelf.c (print_debug_line_section): Determine address size
1407	correctly.
1408
14092004-01-19  Ulrich Drepper  <drepper@redhat.com>
1410
1411	* readelf.c (print_phdr): Show which sections are covered by the
1412	PT_GNU_RELRO entry.
1413
1414	* elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1415
1416	* readelf.c (print_debug_macinfo_section): Implement.
1417
14182004-01-18  Ulrich Drepper  <drepper@redhat.com>
1419
1420	* readelf.c (print_debug_line_section): Implement.
1421
14222004-01-17  Ulrich Drepper  <drepper@redhat.com>
1423
1424	* src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1425	* src/ld.c: Likewise.
1426	* src/nm.c: Likewise.
1427	* src/readelf.c: Likewise.
1428	* src/size.c: Likewise.
1429	* src/strip.c: Likewise.
1430
1431	* strip.c: Add a few more unlikely.  Reduce scope of some variables.
1432
1433	* Makefile.am: Support building with mudflap.
1434
14352004-01-16  Ulrich Drepper  <drepper@redhat.com>
1436
1437	* readelf.c (print_debug_info_section): Free dies memory.
1438
1439	* readelf.c: Print .debug_info section content.
1440
14412004-01-13  Ulrich Drepper  <drepper@redhat.com>
1442
1443	* readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1444
14452004-01-12  Ulrich Drepper  <drepper@redhat.com>
1446
1447	* readelf.c (print_debug_aranges): Implement using libdw.
1448
14492004-01-11  Ulrich Drepper  <drepper@redhat.com>
1450
1451	* nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1452
1453	* readelf.c: Use libdw instead of libdwarf.  Not all of the old
1454	behavior is available yet.
1455	* Makefile.am: Link readelf with libdw.  Remove libdwarf include path.
1456
14572004-01-09  Ulrich Drepper  <drepper@redhat.com>
1458
1459	* nm.c (get_local_names): Adjust call to dwarf_nextcu.
1460
1461	* nm.c: Implement getting information about local variables.
1462
14632004-01-07  Ulrich Drepper  <drepper@redhat.com>
1464
1465	* nm.c: Read also debug information for local symbols.
1466
14672004-01-05  Ulrich Drepper  <drepper@redhat.com>
1468
1469	* nm.c: Shuffle dwarf handling code around so the maximum column
1470	width can be computed ahead of printing.  Avoid collection symbols
1471	which are not printed anyway.
1472
1473	* nm.c: Rewrite dwarf handling to use libdw.
1474	* Makefile.am (AM_CFLAGS): Add -std parameter.
1475	(INCLUDES): Find header in libdw subdir.
1476	(nm_LDADD): Replace libdwarf with libdw.
1477
1478	* elflint.c: Update copyright year.
1479	* readelf.c: Likewise.
1480	* size.c: Likewise.
1481	* strip.c: Likewise.
1482	* nm.c: Likewise.
1483
14842003-12-31  Ulrich Drepper  <drepper@redhat.com>
1485
1486	* strip.c (process_file): Close file before returning.
1487
14882003-11-19  Ulrich Drepper  <drepper@redhat.com>
1489
1490	* readelf.c (handle_dynamic): Make column for tag name wider.
1491
14922003-09-29  Ulrich Drepper  <drepper@redhat.com>
1493
1494	* readelf.c (handle_dynamic): Always terminate tag name with a space.
1495
14962003-09-25  Ulrich Drepper  <drepper@redhat.com>
1497
1498	* strip.c (process_file): Don't mmap the input file, we modify the
1499	data structures and don't want the change end up on disk.
1500
15012003-09-23  Jakub Jelinek  <jakub@redhat.com>
1502
1503	* unaligned.h (union u_2ubyte_unaligned,
1504	union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1505	packed attribute.
1506	(add_2ubyte_unaligned, add_4ubyte_unaligned,
1507	add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1508	Read/store value through _ptr->u instead of *_ptr.
1509
15102003-09-22  Ulrich Drepper  <drepper@redhat.com>
1511
1512	* size.c (show_sysv): Change type of maxlen to int.
1513
1514	* strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1515	buckets.
1516
1517	* i386_ld.c: Many many fixes and extensions.
1518	* ld.c: Likewise.
1519	* ldgeneric.c: Likewise.
1520
15212003-08-16  Ulrich Drepper  <drepper@redhat.com>
1522
1523	* ldgeneric.c (check_definition): Don't add symbol on dso_list if
1524	the reference is from another DSO.
1525
15262003-08-15  Ulrich Drepper  <drepper@redhat.com>
1527
1528	* ldgeneric.c (find_entry_point): It is no fatal error if no entry
1529	point is found when creating a DSO.
1530
15312003-08-14  Ulrich Drepper  <drepper@redhat.com>
1532
1533	* ld.c (main): Always call FLAG_UNRESOLVED.
1534	* ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1535	undefined symbols if not creating DSO or ld_state.nodefs is not set.
1536
15372003-08-13  Ulrich Drepper  <drepper@redhat.com>
1538
1539	* Makefile.in: Depend on libebl.a, not libebl.so.
1540
1541	* ld.c (main): Mark stream for linker script as locked by caller.
1542	(read_version_script): Likewise.
1543	* ldlex.c: Define fread and fwrite to _unlocked variant.
1544
1545	* i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1546	target_bswap_32.
1547	* unaligned.h: Define target_bswap_16, target_bswap_32, and
1548	target_bswap_64.
1549	(store_2ubyte_unaligned, store_4ubyte_unaligned,
1550	store_8ubyte_unaligned): Define using new macros.
1551
15522003-08-12  Ulrich Drepper  <drepper@redhat.com>
1553
1554	* i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1555	possibly unaligned memory.  Support use of big endian machines.
1556
15572003-08-11  Ulrich Drepper  <drepper@redhat.com>
1558
1559	* Moved to CVS archive.
1560