Imported Upstream version 0.155
[platform/upstream/elfutils.git] / src / ChangeLog
1 2012-08-27  Mark Wielaard  <mjw@redhat.com>
2
3         * readelf.c (print_debug_macro_section): Print offset as PRIx64.
4
5 2012-08-27  Mark Wielaard  <mjw@redhat.com>
6
7         * readelf.c (register_info): Handle loc == NULL.
8
9 2012-08-22  Jeff Kenton  <jkenton@tilera.com>
10
11         * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
12
13 2012-08-16  Mark Wielaard  <mjw@redhat.com>
14
15         * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
16         Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
17         appropriate.
18         (dwarf_attr_name): Likewise.
19         (dwarf_form_name): Likewise.
20         (dwarf_lang_name): Likewise.
21         (dwarf_inline_name): Likewise.
22         (dwarf_encoding_name): Likewise.
23         (dwarf_access_name): Likewise.
24         (dwarf_visibility_name): Likewise.
25         (dwarf_virtuality_name): Likewise.
26         (dwarf_identifier_case_name): Likewise.
27         (dwarf_calling_convention_name): Likewise.
28         (dwarf_ordering_name): Likewise.
29         (dwarf_discr_list_name): Likewise.
30         (print_ops): Remove KNOWN.  Use dwarf_locexpr_opcode_string.
31         (attr_callback): Call new dwarf_foobar_name instead of old
32         dwarf_foobar_string functions.
33         (dwarf_tag_string): New function using known-dwarf.h macros.
34         (dwarf_attr_string): Likewise.
35         (dwarf_form_string): Likewise.
36         (dwarf_lang_string): Likewise.
37         (dwarf_inline_string): Likewise.
38         (dwarf_encoding_string): Likewise.
39         (dwarf_access_string): Likewise.
40         (dwarf_visibility_string): Likewise.
41         (dwarf_virtuality_string): Likewise.
42         (dwarf_identifier_case_string): Likewise.
43         (dwarf_calling_convention_string): Likewise.
44         (dwarf_ordering_string): Likewise.
45         (dwarf_discr_list_string): Likewise.
46         (dwarf_locexpr_opcode_string): Likewise.
47
48 2012-06-27  Mark Wielaard  <mjw@redhat.com>
49
50         * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
51         DW_FORM_GNU_strp_alt.
52         (attr_callback): Likewise.
53
54 2012-07-30  Petr Machata  <pmachata@redhat.com>
55
56         * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
57         corresponding printf) so that those that are referenced by only
58         one of the formatting strings are at the end.
59
60 2012-07-29  Mark Wielaard  <mjw@redhat.com>
61
62         * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
63         (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
64
65 2012-07-19  Mark Wielaard  <mjw@redhat.com>
66
67         * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
68
69 2012-07-11  Mark Wielaard  <mjw@redhat.com>
70
71         * readelf.c (options): Add macro to help of debug-dump.
72         (section_e): Add section_macro.
73         (section_all): Add section_macro.
74         (parse_opt): Handle macro.
75         (print_debug_macro_section): New function.
76         (print_debug): Add NEW_SECTION (macro).
77
78 2012-07-10  Mark Wielaard  <mjw@redhat.com>
79
80         * readelf.c (print_gdb_index_section): Add version 7 support.
81         Keep track of cu_nr. Print kind and static/global flag for each
82         symbol. When a symbol is in the TU list add 'T'.
83
84 2012-06-26  Mark Wielaard  <mjw@redhat.com>
85
86         * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
87
88 2012-06-22  Mark Wielaard  <mjw@redhat.com>
89
90         * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
91         for gcc 4.7 -Wformat.
92
93 2012-05-09  Roland McGrath  <roland@hack.frob.com>
94
95         * elflint (check_sections): Allow zero sized sections at (filesz) end
96         of segment. And make check overflow-proofed.
97
98 2012-04-24  Mark Wielaard  <mjw@redhat.com>
99
100         * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
101         DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
102
103 2012-03-28  Roland McGrath  <roland@hack.frob.com>
104
105         * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
106
107 2012-03-28  Mark Wielaard  <mjw@redhat.com>
108
109         * readelf.c (print_debug_abbrev_section): Check there is Dwarf
110         section data.
111         (print_debug_str_section): Likewise.
112
113 2012-03-21  Mark Wielaard  <mjw@redhat.com>
114
115         * readelf.c (print_gdb_index_section): Accept version 6.
116
117 2012-01-31  Mark Wielaard  <mjw@redhat.com>
118
119         * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
120
121 2012-01-21  Ulrich Drepper  <drepper@gmail.com>
122
123         * addr2line.c: Update copyright year.
124         * ar.c: Likewise.
125         * elfcmp.c: Likewise.
126         * elflint.c: Likewise.
127         * findtextrel.c: Likewise.
128         * ld.c: Likewise.
129         * nm.c: Likewise.
130         * objdump.c: Likewise.
131         * ranlib.c: Likewise.
132         * readelf.c: Likewise.
133         * size.c: Likewise.
134         * strings.c: Likewise.
135         * strip.c: Likewise.
136         * unstrip.c: Likewise.
137
138         * nm.c (argp_children): Define.
139         (argp): Hook up argp_children.
140         (handle_ar): Optimize puts call.
141         (show_symbols_bsd): Use positional parameters to also print color
142         codes.  Don't print STT_FILE symbols.
143         * objdump.c (options): Improve help text.
144         (argp_children): Define.
145         (argp): Hook up argp_children.
146         (disasm_info): Add elements for color codes.
147         (disasm_output): Print color codes as well.
148         (show_disasm): Set up disasm_info data for callback.
149
150 2012-01-20  Roland McGrath  <roland@hack.frob.com>
151
152         * arlib-argp.c (arlib_deterministic_output): Initialize from
153         configured value.
154         (help_filter): New function.
155         (argp): Use it.
156
157         * ar.c (main): Handle oper_none as usage error.
158
159         * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
160
161         * ranlib.c (argp): Use arlib_argp_children.
162
163         * arlib.c (arlib_init): Obey arlib_deterministic_output.
164
165         * arlib-argp.c: New file.
166         * Makefile.am (libar_a_SOURCES): Add it.
167         * arlib.h (arlib_deterministic_output, arlib_argp_children):
168         Declare new variables.
169         * ar.c (deterministic_output): Variable removed.
170         (do_oper_insert): Use arlib_deterministic_output instead.
171         (options, parse_opt): Don't handle -D here.  Add group numbers.
172         (argp): Use arlib_argp_children.
173
174 2011-12-20  Roland McGrath  <roland@hack.frob.com>
175
176         * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
177         Reported by Karel Klic <kklic@redhat.com>.
178
179 2011-11-05  Roland McGrath  <roland@hack.frob.com>
180
181         * ar.c (deterministic_output): New flag variable.
182         (options, parse_opt): Grok -D to set it.
183         (do_oper_insert): When set, use zero from mtime, uid, and gid.
184
185         * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
186
187 2011-10-04  Marek Polacek  <mpolacek@redhat.com>
188
189         * readelf.c (register_info): Assume the right size of an array.
190
191 2011-10-03  Ulrich Drepper  <drepper@gmail.com>
192
193         * nm.c: Recognize option --mark-special.  Still recognize --mark-weak
194         but don't show it in help anymore.
195         (mark_special): Renamed from mark_weak.
196         (parse_opt): Adjust.
197         (class_type_char): Take additional parameters for ELF file and ELF
198         header.  Treat TLS symbols like objects.
199         In case of D symbols, show u for unique symbols, R for symbols in
200         read-only sections, B for symbols in BSS sections.
201         (show_symbols_bsd): Take additional parameters for ELF file and ELF
202         header.  Adjust for class_type_char change.  Show TLS symbols with
203         @ after them in case --mark-special is selected.
204         (show_symbols_posix): Likewise.
205         (show_symbols): Adjust calls to show_symbols_bsd and
206         show_symbols_posix.
207         (show_symbols_sysv): Avoid printing adress and size for undefined
208         symbols.  Don't print initial special entry and section entries.
209
210 2011-10-02  Ulrich Drepper  <drepper@gmail.com>
211
212         * Makefile.am (demanglelib): Define.
213         (nm_LDADD): Add demanglelib.
214         * nm.c (options): Add -C option.
215         (demangle): Define as global variable.
216         (parse_opt): Recognize -C.
217         (show_symbols_sysv): Handle demangling.
218         (show_symbols_bad): Likewise.
219         (show_symbols_posix): Likewise.
220         (show_symbols): Likewise.
221
222 2011-07-09  Roland McGrath  <roland@hack.frob.com>
223
224         * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
225
226         * ar.c (parse_opt): Grok -u.
227
228 2011-05-30  Mark Wielaard  <mjw@redhat.com>
229
230         * strip.c (relocate): Make offset check overflow-proof.
231
232 2011-05-23  Mark Wielaard  <mjw@redhat.com>
233
234         * strip.c (relocate): Take new arguments is_rela to indicate
235         whether the relocation is from a SHT_REL or SHT_RELA section.
236         Relocate against any debug section symbol, not just STT_SECTION
237         symbols. For SHT_REL relocations, fetch addend from offset and
238         add it to symbol value if not zero.
239
240 2011-05-23  Mark Wielaard  <mjw@redhat.com>
241
242         * strip.c (OPT_RELOC_DEBUG): New option.
243         (argp_option): Add new --reloc-debug-sections option.
244         (main): Check new option.
245         (parse_opt): Likewise.
246         (handle_elf): Remove any relocations between debug sections
247         in ET_REL for the debug file when requested.
248
249 2011-05-18  Mark Wielaard  <mjw@redhat.com>
250
251         * strip.c (handle_elf): Make sure all sections of a removed group
252         section are removed too. Don't discard SHT_GROUP sections, copy
253         section table before it gets modified. Section group signature
254         symbols don't have to be retained.
255
256 2011-05-16  Jakub Jelinek  <jakub@redhat.com>
257
258         * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
259         DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
260         and DW_OP_GNU_reinterpret.
261
262 2011-05-17  Mark Wielaard  <mjw@redhat.com>
263
264         * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
265         DW_TAG_GNU_call_site_parameter return strings.
266
267 2011-05-11  Marek Polacek  <mpolacek@redhat.com>
268
269         * nm.c (show_symbols_sysv): Remove unused if/else, remove
270         unused `prefix' and `fname' parameters.
271
272 2011-05-07  Marek Polacek  <mpolacek@redhat.com>
273
274         * unstrip.c (compare_sections_nonrel): Mark this function as static.
275
276 2011-04-26  Mark Wielaard  <mjw@redhat.com>
277
278         * readelf.c (handle_notes_data): Call ebl_object_note_type_name
279         with note name.
280
281 2011-04-14  Mark Wielaard  <mjw@redhat.com>
282
283         * readelf.c (options): Add gdb_index.
284         (section_e): Define section_gdb_index.
285         (parse_opt): Recognize gdb_index debug-dump argument.
286         (print_gdb_index_section): New function.
287         (print_debug): Add gdb_index to debug_sections.
288
289 2011-03-24  Petr Machata  <pmachata@redhat.com>
290
291         * readelf.c (print_debug_line_section): Emit initial space for all
292         opcode lines.  Print offset in front of each opcode.
293
294 2011-03-22  Marek Polacek  <mpolacek@redhat.com>
295
296         * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
297
298 2011-03-22  Mark Wielaard  <mjw@redhat.com>
299
300         * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
301         and DW_TAG_GNU_call_site_parameter.
302         (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
303         DW_AT_GNU_call_site_data_value,
304         DW_AT_GNU_call_site_target,
305         DW_AT_GNU_call_site_target_clobbered,
306         DW_AT_GNU_tail_call,
307         DW_AT_GNU_all_tail_call_sites,
308         DW_AT_GNU_all_call_sites,
309         and DW_AT_GNU_all_source_call_sites.
310         (print_ops): Handle DW_OP_GNU_entry_value.
311         (attr_callback): Handle DW_AT_GNU_call_site_value,
312         DW_AT_GNU_call_site_data_value,
313         DW_AT_GNU_call_site_target,
314         and DW_AT_GNU_call_site_target_clobbered.
315
316 2011-03-10  Mark Wielaard  <mjw@redhat.com>
317
318         * elflint.c (check_symtab): Use ebl_check_st_other_bits.
319
320 2011-02-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
321
322         * readelf.c (reset_listptr): Clear TABLE->TABLE.
323
324 2011-02-25  Mark Wielaard  <mjw@redhat.com>
325
326         * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
327         (dwarf_form_string): Properly format and return unknown form.
328
329 2011-02-23  Roland McGrath  <roland@redhat.com>
330
331         * readelf.c (section_name): New function.
332         (print_debug_abbrev_section): Use it instead of constant.
333         (print_debug_aranges_section): Likewise.
334         (print_debug_ranges_section): Likewise.
335         (print_debug_units): Likewise.
336         (print_debug_line_section): Likewise.
337         (print_debug_loc_section): Likewise.
338         (print_debug_macinfo_section): Likewise.
339         (print_debug_pubnames_section): Likewise.
340         (print_debug_str_section): Likewise.
341         (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
342         (print_debug_abbrev_section): Use decoded d_size, not sh_size.
343         (print_debug_str_section): Likewise.
344
345         * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
346
347 2011-02-11  Roland McGrath  <roland@redhat.com>
348
349         * elfcmp.c (verbose): New variable.
350         (options, parse_opt): Grok -l/--verbose to set it.
351         (main): Under -l, keep going after first difference.
352
353         * elfcmp.c (ignore_build_id): New variable.
354         (options, parse_opt): Grok --ignore-build-id to set it.
355         (main): For SHT_NOTE sections, compare note details rather than raw
356         bytes.  Under --ignore-build-id, don't complain about differing build
357         ID contents if lengths match.
358
359 2011-02-08  Roland McGrath  <roland@redhat.com>
360
361         * ldscript.y (filename_id_star): Remove unused variable.
362
363         * unstrip.c (copy_elided_sections): Remove unused variable.
364
365         * elflint.c (check_dynamic): Remove unused variables.
366
367         * elflint.c (check_symtab): Warn about missing xndx section only once.
368
369         * ldgeneric.c (check_for_duplicate2): Remove unused variable.
370
371 2011-01-06  Roland McGrath  <roland@redhat.com>
372
373         * strip.c (handle_elf): Under --strip-sections, remove all
374         non-allocated sections and never generate .gnu_debuglink.
375
376 2011-01-04  Roland McGrath  <roland@redhat.com>
377
378         * strip.c (remove_shdrs): New variable.
379         (options, parse_opt): Grok --strip-sections to set it.
380         (handle_elf): When that's set, truncate off .shstrtab and shdrs.
381
382 2010-11-10  Roland McGrath  <roland@redhat.com>
383
384         * findtextrel.c (process_file): Don't assume order of sections.
385         Reported by Mike Hommey <mh@glandium.org>.
386
387 2010-07-26  Roland McGrath  <roland@redhat.com>
388
389         * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
390
391 2010-08-30  Roland McGrath  <roland@redhat.com>
392
393         Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
394         * readelf.c (parse_opt): Add section_info to implicit_debug_sections
395         for ranges, loc.
396         (struct listptr, struct listptr_table): New types.
397         (compare_listptr, reset_listptr, sort_listptr): New functions.
398         (notice_listptr, skip_listptr_hole): New functions.
399         (struct attrcb_args): Add silent member.
400         (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
401         Suppress output if silent, but still call notice_listptr.
402         (print_debug_units): Suppress output if section_info not requested.
403         (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
404         (print_debug_ranges_section): Likewise.
405         (print_debug): Call reset_listptr on both tables.
406
407         * readelf.c (print_debug_ranges_section): Print empty list.
408         (print_debug_loc_section): Likewise.
409
410         * readelf.c (print_debug_loc_section): Check for bogus length
411         before calling print_ops.
412         (print_ops): Check harder for bogus data that would read off end.
413
414 2010-08-11  Roland McGrath  <roland@redhat.com>
415
416         * readelf.c (for_each_section_argument): Process all sections with
417         matching name, not just the first.
418
419 2010-07-26  Roland McGrath  <roland@redhat.com>
420
421         * readelf.c (print_ops): Take new argument for CU version.
422         Fix DW_OP_call_ref decoding to depend on it.
423         (print_debug_loc_section): Update caller.
424         (print_cfa_program): Take new argument, pass it down.
425         (print_debug_frame_section): Update caller.
426         (struct attrcb_args): New member version.
427         (print_debug_units): Initialize it.
428
429 2010-07-02  Roland McGrath  <roland@redhat.com>
430
431         * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
432         initial_location.
433
434 2010-06-30  Roland McGrath  <roland@redhat.com>
435
436         * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
437         Ignore st_size for a non-S_ISREG file descriptor.
438         (read_block): Move assert after no-mmap bail-out.
439         (read_block_no_mmap): Fix size calculations for moving buffer remnant.
440
441 2010-06-22  Roland McGrath  <roland@redhat.com>
442
443         * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
444
445 2010-06-21  Roland McGrath  <roland@redhat.com>
446
447         * readelf.c (dwarf_tag_string): Handle new v4 tags.
448         (dwarf_attr_string): Add new attributes.
449         (dwarf_tag_string): Handle DW_TAG_GNU_*.
450
451         * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
452         (print_cfa_program): Likewise.
453
454 2010-06-20  Roland McGrath  <roland@redhat.com>
455
456         * readelf.c (print_debug_units): New function, broken out of ...
457         (print_debug_info_section): ... here.  Call it.
458         (print_debug_types_section): New function.
459         (enum section_e): Add section_types alias for section_info.
460         (print_debug): Add types to the sections table.
461
462         * readelf.c (print_debug_frame_section): Handle version 4 format.
463
464         * readelf.c (print_debug_line_section): Handle version 4 format.
465
466 2010-06-14  Roland McGrath  <roland@redhat.com>
467
468         * unstrip.c (copy_elided_sections): Make sure all sections' data have
469         been read in before we write anything out.
470
471 2010-06-04  Roland McGrath  <roland@redhat.com>
472
473         * unstrip.c (update_shdr): New function.
474         (update_sh_size): Call it instead of gelf_update_shdr.
475         (adjust_relocs, add_new_section_symbols): Likewise.
476         (new_shstrtab, copy_elided_sections): Likewise.
477
478         * unstrip.c (copy_elided_sections): Bail if stripped file has more
479         sections than unstripped file, rather than getting confused later.
480
481 2010-06-01  Roland McGrath  <roland@redhat.com>
482
483         * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
484         (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
485         DW_FORM_sec_offset, DW_FORM_ref_sig8.
486
487         * readelf.c (print_debug): Don't bail if libdw setup fails.
488         Suppress complaint if we only want .eh_frame anyway.
489
490 2010-05-28  Ulrich Drepper  <drepper@redhat.com>
491
492         * readelf.c (attr_callback): Also print form information.
493
494 2010-05-19  Roland McGrath  <roland@redhat.com>
495
496         * addr2line.c (find_symbol): Short-circuit on empty name.
497         (handle_address): Handle SYMBOL with no +OFFSET.
498
499 2010-05-08  Roland McGrath  <roland@redhat.com>
500
501         * readelf.c (print_ops): Take new arg OFFSET_SIZE.
502         Use that for DW_OP_call_ref, not ADDRSIZE.
503         (print_cfa_program): Update caller.
504         (struct attrcb_args): Add offset_size field.
505         (attr_callback): Use it for print_ops call.
506         (print_debug_info_section): Initialize it.
507         (print_ops): Likewise.
508
509 2010-04-14  Roland McGrath  <roland@redhat.com>
510
511         * readelf.c (handle_core_item): Fix bitmask printing.
512
513 2010-04-06  Roland McGrath  <roland@redhat.com>
514
515         * ld.c (options): Fix some typos in messages.
516         * elflint.c (check_scn_group, check_group): Likewise.
517         * ldscript.y (add_id_list): Likewise.
518         * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
519         before translated string containing a literal %.
520
521 2010-02-26  Roland McGrath  <roland@redhat.com>
522
523         * readelf.c (process_file): Don't leak an fd in failure case.
524
525 2010-02-15  Roland McGrath  <roland@redhat.com>
526
527         * Makefile.am: Use config/eu.am for common stuff.
528
529         * readelf.c (print_debug_frame_section): Add a cast to avoid sign
530         mismatch in comparison.
531
532 2010-02-02  Roland McGrath  <roland@redhat.com>
533
534         * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
535         (read_encoded): Likewise.
536         (print_debug_frame_section): Check for bogus augmentation length.
537         For P augmentation, use read_encoded, print the encoding description,
538         and use hex for unsigned values.
539
540 2010-01-15  Roland McGrath  <roland@redhat.com>
541
542         * ar.c: Include <sys/stat.h>.
543         * elflint.c: Likewise.
544         * readelf.c: Likewise.
545         * strip.c: Likewise.
546         * unstrip.c: Likewise
547
548 2010-01-07  Roland McGrath  <roland@redhat.com>
549
550         * readelf.c (print_ehdr): Handle PN_XNUM.
551         (phnum): New static variable.
552         (process_elf_file): Set it with elf_getphdrnum.
553         (print_phdr): Use phnum instead of EHDR->e_phnum.
554         (print_dynamic, handle_notes): Likewise.
555         (handle_relocs_rel, handle_relocs_rela): Likewise.
556
557         * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
558
559         * elflint.c (phnum): New static variable.
560         (check_elf_header): Set it, handling PN_XNUM.
561         Use that in place of EHDR->e_phnum throughout.
562         (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
563         (unknown_dependency_p, check_sections, check_program_header): Likewise.
564
565 2010-01-05  Roland McGrath  <roland@redhat.com>
566
567         * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
568         DW_AT_GNU_template_name.
569
570 2010-01-04  Roland McGrath  <roland@redhat.com>
571
572         * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
573         (handle_core_note): Pass NHDR and NAME to ebl_core_note.
574         (handle_core_item): Handle .format of '\n' as \n-separated strings.
575
576         * readelf.c (implicit_debug_sections): New variable.
577         (parse_opt): Set it instead of print_debug_sections for -a.
578         OR them together for print_debug check.
579         (print_debug): OR them together for section check.
580
581         * readelf.c (options): Repartition into set implied by -a and others.
582         Correct -a text to match reality.
583
584         * readelf.c (struct section_argument): Add bool member 'implicit'.
585         (parse_opt): Set it for -a cases, clear it for -x args.
586         (for_each_section_argument): Don't complain about a missing section by
587         name if it's implicit.
588
589 2009-11-16  Roland McGrath  <roland@redhat.com>
590
591         * readelf.c (print_string_section): Punt SHT_NOBITS like empty
592         sections, just as dump_data_section already does.
593
594 2009-09-21  Ulrich Drepper  <drepper@redhat.com>
595
596         * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
597         set for .comment section.
598         Patch by Mark Wielaard <mjw@redhat.com>.
599
600 2009-09-08  Roland McGrath  <roland@redhat.com>
601
602         * ar.c (main): Fix typo in message format.
603
604 2009-08-21  Roland McGrath  <roland@redhat.com>
605
606         * readelf.c (attr_callback): Use print_block only when we don't use
607         print_ops.
608
609 2009-08-14  Roland McGrath  <roland@redhat.com>
610
611         * ar.c (do_oper_extract): Use pathconf instead of statfs.
612
613 2009-08-01  Ulrich Drepper  <drepper@redhat.com>
614
615         * debugpred.h: Add two most const.
616
617 2009-07-26  Mark Wielaard  <mjw@redhat.com>
618
619         * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
620
621 2009-07-25  Mark Wielaard  <mjw@redhat.com>
622
623         * Makefile.am (addr2line_LDADD): Add $(libelf).
624
625 2009-07-24  Roland McGrath  <roland@redhat.com>
626
627         * readelf.c (print_block): New function.
628         (print_ops): Use it.
629         (attr_callback): Use it for DW_FORM_block* forms.
630
631 2009-07-20  Mark Wielaard  <mjw@redhat.com>
632
633         * readelf.c (print_ops): Add handling of DW_OP_implicit_value
634         and DW_OP_stack_value.
635
636 2009-07-14  Ulrich Drepper  <drepper@redhat.com>
637
638         * elflint.c (check_elf_header): Allow Linux ABI.
639         (check_symtab): Handle STB_GNU_UNIQUE.
640
641 2009-07-08  Mark Wielaard  <mjw@redhat.com>
642
643         * readelf.c (attr_callback): Handle DW_Form constants for
644         DW_AT_data_member_location.
645
646 2009-07-06  Roland McGrath  <roland@redhat.com>
647
648         * readelf.c (register_info): New function.  Handle unknown register #s.
649         (print_cfa_program): Use it.
650         (handle_core_register, handle_core_registers): Likewise.
651
652 2009-06-28  Roland McGrath  <roland@redhat.com>
653
654         * readelf.c (print_address_names): New static variable.
655         (options, parse_opt): Grok -N/--numeric-addresses to clear it.
656         (format_dwarf_addr): Don't look up name if !print_address_names.
657
658 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
659
660         * ldgeneric.c: Don't use deprecated libelf functions.
661         * nm.c: Likewise.
662         * objdump.c: Likewise.
663         * readelf.c: Likewise.
664         * size.c: Likewise.
665         * strip.c: Likewise.
666         * unstrip.c: Likewise.
667         * ld.h: Fix up comment.
668
669 2009-06-01  Ulrich Drepper  <drepper@redhat.com>
670
671         * readelf.c (print_relocs): Expect ELF header argument and pass on
672         to handle_relocs_rel* functions. Adjust caller.
673         (handle_relocs_rel): Add ELF header argument.  Add special case for
674         the IRELATIVE relocations in statically linked executables.
675         (handle_relocs_rela): Likewise.
676
677 2009-04-29  Ulrich Drepper  <drepper@redhat.com>
678
679         * elflint.c (check_symtab): Add tests of st_other field.
680
681 2009-04-23  Ulrich Drepper  <drepper@redhat.com>
682
683         * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
684
685 2009-04-20  Roland McGrath  <roland@redhat.com>
686
687         * addr2line.c (print_dwarf_function): Honor -s and -A for file names
688         of inline call sites.
689
690         * addr2line.c (just_section): New variable.
691         (adjust_to_section): New function, broken out of ...
692         (handle_address): ... here.
693         (options, parse_opt): Add -j/--section=NAME to set it.
694
695 2009-04-15  Roland McGrath  <roland@redhat.com>
696
697         * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
698         64-bit format header, DW_CIE_ID_32 in 32-bit format header.
699
700 2009-04-14  Roland McGrath  <roland@redhat.com>
701
702         * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
703         like SHT_GNU_ATTRIBUTES.
704
705         * readelf.c (handle_core_registers): Fix error message.
706
707         * strip.c (handle_elf: check_preserved): Don't note any change when
708         .debug_data is already filled from a previous pass.
709
710 2009-02-05  Ulrich Drepper  <drepper@redhat.com>
711
712         * objdump.c (show_relocs_x): Minor cleanups.
713
714         * readelf.c (print_cfa_program): Correct a few labels.
715         Print first DW_CFA_expression and DW_CFA_val_expression parameter
716         as register.
717
718 2009-02-01  Ulrich Drepper  <drepper@redhat.com>
719
720         * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
721         into ...
722         (show_relocs_x): ...here.  New function.
723         (show_relocs): Better spacing in output.
724
725         * objdump.c (show_relocs_rela): Show offsets as signed values.
726
727         * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
728         Improve some error messages.
729         Use program_invocation_short_name instead of AR macro.
730         * Makefile.am (CFLAGS_ar): Remove.
731         * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
732         * objdump.c (parse_opt): Likewise.
733         * readelf.c (parse_opt): Likewise.
734
735 2009-01-27  Roland McGrath  <roland@redhat.com>
736
737         * readelf.c (print_ops): Notice short length, don't overrun buffer
738         (still need to fix LEB128).
739
740         * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
741
742         * readelf.c (print_ops): Print (empty)\n when LEN == 0.
743
744 2009-01-24  Ulrich Drepper  <drepper@redhat.com>
745
746         * readelf.c (print_debug_frame_section): Fix computation of vma_base
747         for PC-relative mode.
748
749 2009-01-23  Ulrich Drepper  <drepper@redhat.com>
750
751         * size.c (process_file): When handling archive, close file descriptor
752         here.  For unknown file format also close file descriptor.
753         (handle_ar): Don't close file descriptor here.
754
755         * readelf.c (parse_opt): Move code to add to dump_data_sections and
756         string_sections list in local function add_dump_section.  Adjust 'x'
757         key handling.  For 'a' key add .strtab, .dynstr, and .comment section
758         to string_sections list.
759
760 2009-01-22  Roland McGrath  <roland@redhat.com>
761
762         * readelf.c (print_phdr): Don't print section mapping when no sections.
763
764         * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
765
766         * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
767         and reset it only for the 'true' cases.
768
769         * Makefile.am (addr2line_no_Wformat): New variable.
770
771         * readelf.c (print_debug_frame_section): Use t instead of j formats
772         for ptrdiff_t OFFSET.
773
774 2009-01-21  Ulrich Drepper  <drepper@redhat.com>
775
776         * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
777         test.  Handle debuginfo files.
778         (check_exception_data): First sanity test.
779
780 2009-01-17  Ulrich Drepper  <drepper@redhat.com>
781
782         * readelf.c (print_debug_exception_table): Show target of ar_disp
783         field.
784
785         * elflint.c (check_program_header): Add most consistency checks for
786         PT_GNU_EH_FRAME entry.
787
788         * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
789         ARGP_PROGRAM_BUG_ADDRESS_DEF.
790         * ar.c: Likewise.
791         * elfcmp.c: Likewise.
792         * elflint.c: Likewise.
793         * findtextrel.c: Likewise.
794         * ld.c: Likewise.
795         * nm.c: Likewise.
796         * objdump.c: Likewise.
797         * ranlib.c: Likewise.
798         * readelf.c: Likewise.
799
800         * size.c: Likewise.
801         * strings.c: Likewise.
802         * strip.c: Likewise.
803         * unstrip.c: Likewise.
804
805 2009-01-16  Ulrich Drepper  <drepper@redhat.com>
806
807         * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
808         matches .eh_frame_hdr section, if it is available.  Also check that
809         the segment is allocated, not writable, not executable.
810
811         * readelf.c: Add -e option.  Dump exception and unwind related
812         sections.  Add -e to -a.
813         (print_encoding_base): Handle DW_EH_PE_omit.
814         (print_debug_exception_table): Beginning of support.
815         (print_debug): Hook up print_debug_exception_table for
816         .gcc_except_table sections.
817
818         * readelf.c (print_debug_frame_section): Some fixes for last change.
819
820 2009-01-15  Ulrich Drepper  <drepper@redhat.com>
821
822         * readelf.c (print_encoding): Now a toplevel function.
823         (print_relinfo): Likewise.
824         (print_encoding_base): Broken out of print_debug_frame_section.
825         (print_debug_frame_section): Print different header for .eh_frame
826         sections.  Fix recognition of matching CIEs in .debug_frame sections.
827         Print absolute offset for PC-relative FDE locations.  Don't print
828         table header for FDEs if the table is empty.
829         (read_encoded): New function.
830         (print_debug_frame_hdr_section): New function.
831         (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
832         sections.
833
834         * readelf.c (handle_relocs_rel): Print section number.
835         (print_debug_abbrev_section): Likewise.
836         (print_debug_aranges_section): Likewise.
837         (print_debug_ranges_section): Likewise.
838         (print_debug_info_section): Likewise.
839         (print_debug_line_section): Likewise.
840         (print_debug_loc_section): Likewise.
841         (print_debug_macinfo_section): Likewise.
842         (print_debug_pubnames_section): Likewise.
843         (print_debug_str_section): Likewise.
844
845 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
846
847         * strings.c (read_block): Fix typo in error message string.
848
849 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
850
851         * ld.c (ld_new_searchdir): Fix adding to search path list.
852
853 2009-01-06  Ulrich Drepper  <drepper@redhat.com>
854
855         * readelf.c: Implement call frame debug section dumping.
856
857 2009-01-05  Roland McGrath  <roland@redhat.com>
858
859         * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
860         Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
861
862 2009-01-01  Ulrich Drepper  <drepper@redhat.com>
863
864         * addr2line.c: Update copyright year.
865         * ar.c: Likewise.
866         * elfcmp.c: Likewise.
867         * elflint.c: Likewise.
868         * findtextrel.c: Likewise.
869         * ld.c: Likewise.
870         * nm.c: Likewise.
871         * objdump.c: Likewise.
872         * ranlib.c: Likewise.
873         * readelf.c: Likewise.
874         * size.c: Likewise.
875         * strings.c: Likewise.
876         * strip.c: Likewise.
877         * unstrip.c: Likewise.
878
879 2008-12-11  Roland McGrath  <roland@redhat.com>
880
881         * nm.c (sym_name): New function.
882         (show_symbols_sysv): Use it in place of elf_strptr.
883         (show_symbols_bsd, show_symbols_posix): Likewise.
884         Fixes RHBZ#476136.
885
886         * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
887         elf_strptr fails.
888
889 2008-12-02  Roland McGrath  <roland@redhat.com>
890
891         * readelf.c (count_dwflmod, process_file): Don't presume encoding of
892         nonzero OFFSET argument to dwfl_getmodules.
893
894 2008-08-07  Roland McGrath  <roland@redhat.com>
895
896         * addr2line.c (main): Pass string to handle_address.
897         (see_one_module): New function, subroutine of handle_address.
898         (find_symbol): Likewise.
899         (handle_address): Take string argument rather than address.
900         Convert plain number, or handle strings like "(section)+offset"
901         or "symbol+offset".
902
903 2008-08-01  Roland McGrath  <roland@redhat.com>
904
905         * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
906         For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
907
908         * readelf.c (convert): Take new argument SIZE.
909         (handle_core_register, handle_core_item): Update callers.
910         (handle_core_item): Take new arg REPEATED_SIZE.
911         (handle_core_items): Special case for a singleton item,
912         let handle_core_item handle repeats if it wants to.
913
914         * readelf.c (handle_core_items): Give abridged output
915         for identical groups repeated more than twice.
916
917 2008-07-04  Roland McGrath  <roland@redhat.com>
918
919         * readelf.c (handle_core_items): Handle ELF_T_ADDR.
920
921 2008-04-10  Roland McGrath  <roland@redhat.com>
922
923         * strip.c (handle_elf): Don't keep sections that kept symbol tables
924         refer to.  Instead, just be sure to preserve the original symbol
925         table in the debug file so those symbols go with their sections and
926         can be elided from the stripped version of the symbol table.
927
928         * strip.c (handle_elf): When a discarded section kept in the debug
929         file refers to a nondiscard section via sh_link/sh_info, preserve
930         that nondiscarded section unmodified in the debug file as well.
931         Skip adjustment of discarded sections symbol table references when
932         that symbol table is copied in this way.
933
934         * elflint.c (check_symtab): Don't crash from missing symbol names
935         after diagnosing bogus strtab.
936
937         * strip.c (handle_elf): Cosmetic cleanup in special section contents
938         adjustment for symtab changes.
939
940 2008-03-31  Roland McGrath  <roland@redhat.com>
941
942         * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
943         must be SHT_PROGBITS, must not be SHF_WRITE.  Let backend hook
944         excuse a special section.
945
946 2008-03-27  Roland McGrath  <roland@redhat.com>
947
948         * elflint.c (check_sections): Check that executability and writability
949         of sections is reflected in segment p_flags.
950
951 2008-03-26  Roland McGrath  <roland@redhat.com>
952
953         * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
954         that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
955         is valid in RELRO.
956
957 2008-02-29  Roland McGrath  <roland@redhat.com>
958
959         * readelf.c (print_attributes): Add a cast.
960         * elflint.c (check_attributes): Likewise.
961
962         * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
963         with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
964         (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
965
966 2008-02-03  Ulrich Drepper  <drepper@redhat.com>
967
968         * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
969         when linked into executable.
970         (elf_i386_create_relocations): Likewise.
971
972 2008-02-20  Roland McGrath  <roland@redhat.com>
973
974         * readelf.c (print_attributes): New function.
975         (process_elf_file): Call it under -A.
976
977         * elflint.c (check_attributes): Implement it for real.
978
979 2008-02-19  Roland McGrath  <roland@redhat.com>
980
981         * elflint.c (special_sections): Handle .gnu.attributes section.
982         (check_sections): Likewise.
983         (check_attributes): New function.
984
985 2008-02-10  Roland McGrath  <roland@redhat.com>
986
987         * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
988         sections and ET_REL files.
989
990 2008-02-02  Ulrich Drepper  <drepper@redhat.com>
991
992         * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
993         * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
994         and R_386_TLS_LE.
995         (elf_i386_create_relocations): Likewise.
996         * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
997         elements.
998         * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
999         (ld_generic_create_outfile): Add PT_TLS entry to program  header.
1000         Fix generation of PT_GNU_STACK entry.
1001
1002 2008-02-01  Ulrich Drepper  <drepper@redhat.com>
1003
1004         * ld.c (replace_args): Prevent loop over replacements if the parameter
1005         is only two characters long.
1006
1007         * ld.c: Recognize sha1 argument for --build-id parameter.
1008         * ldgeneric.c (create_build_id_section): Handle sha1.
1009         (compute_hash_sum): New function.  Broken out of compute_build_id.
1010         Take hash function and context as parameters.
1011         (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1012         implementation.
1013
1014 2008-01-31  Ulrich Drepper  <drepper@redhat.com>
1015
1016         * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1017         * ld.c: Recognize --build-id command line parameter.
1018         * ld.h: Define scn_dot_note_gnu_build_id.
1019         (struct ld_state): Add build_id and buildidscnidx elements.
1020         * ldgeneric.c: Implement --build-id command line parameter.
1021         * ldlex.l (ID): Recognize - as valid character after the first one.
1022
1023 2008-01-29  Ulrich Drepper  <drepper@redhat.com>
1024
1025         * ld.c (replace_args): New function.
1026         (main): Use it to rewrite old-style parameters.
1027
1028         * elf32-i386.script: Add .gnu.hash section.
1029         * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1030         (fillin_special_symbol): Initialize st_size.
1031         (sortfct_hashval): New function.
1032         (create_gnu_hash): New function.
1033         (create_hash): New function.
1034         (ld_generic_create_outfile): Use the new functions to create the
1035         hash tables.
1036
1037         * elflint.c (check_gnu_hash): Fix index value printed in error message.
1038
1039 2008-01-24  Ulrich Drepper  <drepper@redhat.com>
1040
1041         * elflint.c (check_group): Check that signature symbol for section
1042         group is not an empty string.
1043         * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1044         section.  Start implementation of --hash-style.
1045         * i386_ld.c: Likewise.
1046         * ld.c: Recognize --hash-style.
1047         * ld.h (struct scninfo): Add comdat_group.
1048         Add additional parameter to finalize_plt callback.
1049
1050 2008-01-22  Ulrich Drepper  <drepper@redhat.com>
1051
1052         * ld.h (struct callbacks): Add initialize_gotplt.
1053         (struct scnhead): Add scn_dot_gotplt.
1054         (struct ld_state): Add gotpltscnidx.
1055         * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1056         (elf_i386_initialize_pltrel): Likewise.
1057         (elf_i386_initialize_got): There is now a separate .got.plt, so
1058         don't do the PLT-related work here.  Initialize d_type.
1059         (elf_i386_initialize_gotplt): New function.
1060         (elf_i386_plt0): Use ud2a after indirect jump.
1061         (elf_i386_pic_plt0_entry): Likewise.
1062         (elf_i386_finalize_plt): Reference now .got.plt.
1063         (elf_i386_count_relocations): For GOT entries which need no relocation
1064         don't bump nrel_got.
1065         (elf_i386_create_relocations): Also get .got.plt.  Rewrite R-386_GOT32
1066         handling for split .got/.got.plt.
1067         (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1068         * elf32-i386.script: Sort sections for security.  There are no .got
1069         input sections.  Add .got.plt.
1070         * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1071         (ld_generic_create_outfile): Initialize .got.plt section.
1072         Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1073
1074 2008-01-19  Ulrich Drepper  <drepper@redhat.com>
1075
1076         * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1077         symbols are not carried over into statically linked output files.
1078         Add dummy entries for more TLS relocations.
1079
1080         * ld.c (options): Add long names for -( and -).
1081
1082         * ldgeneric.c (check_definition): For newly found definitions don't
1083         mark section as used if symbol is absolute.
1084         (extract_from_archive): Only assign archive sequence number the first
1085         time the archive is handled.  Update ld_state.last_archive_used
1086         if any symbol was used.  Remove nround variable.
1087         (file_process2): When using symbol from an archive, update
1088         ld_state.group_start_archive, ld_state.archives, and
1089         ld_state.tailarchives.
1090         (ld_generic_file_process): If group is not handled anymore, after
1091         freeing ELF handles for the archives, clear ld_state.archives and
1092         *nextp.  Fix wrong logic in recognizing first iteration of group
1093         loop.  When clearing flags, also clear ld_state.group_start_archive.
1094
1095 2008-01-11  Ulrich Drepper  <drepper@redhat.com>
1096
1097         * objdump.c (show_disasm): Adjust disassembler format string for
1098         removal of %e.
1099
1100 2008-01-04  Roland McGrath  <roland@redhat.com>
1101
1102         * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1103         a size greater than the items cover means multiple sets of items.
1104         (handle_core_note): Update caller.
1105
1106 2008-01-04  Roland McGrath  <roland@redhat.com>
1107
1108         * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1109
1110 2008-01-03  Roland McGrath  <roland@redhat.com>
1111
1112         * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1113
1114         * elflint.c (check_dynamic): Remove duplicate initializer.
1115
1116 2008-01-02  Ulrich Drepper  <drepper@redhat.com>
1117
1118         * addr2line.c: Update copyright year.
1119         * ar.c: Likewise.
1120         * elfcmp.c: Likewise.
1121         * elflint.c: Likewise.
1122         * findtextrel.c: Likewise.
1123         * ld.c: Likewise.
1124         * nm.c: Likewise.
1125         * objdump.c: Likewise.
1126         * ranlib.c: Likewise.
1127         * readelf.c: Likewise.
1128         * size.c: Likewise.
1129         * strings.c: Likewise.
1130         * strip.c: Likewise.
1131         * unstrip.c: Likewise.
1132
1133 2007-12-30  Ulrich Drepper  <drepper@redhat.com>
1134
1135         * objdump (show_disasm): Use %e after third parameter.
1136
1137 2007-12-21  Ulrich Drepper  <drepper@redhat.com>
1138
1139         * strip.c: Fix wrong parenthesis in a few branch predictions.
1140         * strings.c: Likewise.
1141
1142 2007-12-20  Ulrich Drepper  <drepper@redhat.com>
1143
1144         * Makefile.am (DEFS): Add DEBUGPRED.
1145         * addr2line.c: Include debugpred.h.
1146         * ar.c: Likewise.
1147         * elfcmp.c: Likewise.
1148         * elflint.c: Likewise.
1149         * findtextrel.c: Likewise.
1150         * nm.c: Likewise.
1151         * objdump.c: Likewise.
1152         * ranlib.c: Likewise.
1153         * readelf.c: Likewise.
1154         * size.c: Likewise.
1155         * strings.c: Likewise.
1156         * strip.c: Likewise.
1157         * unstrip.c: Likewise.
1158         * debugpred.h: New file.
1159
1160         * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1161         (handle_relocs_rela): Likewise.
1162
1163         * readelf.c: Add lots of likely/unlikely.
1164
1165         * elflint.c: Minor cleanups.
1166
1167 2007-11-19  Roland McGrath  <roland@redhat.com>
1168
1169         * readelf.c (print_ops): Handle all bad op codes gracefully.
1170         Print their numbers instead of just ???.
1171
1172 2007-11-09  Roland McGrath  <roland@redhat.com>
1173
1174         * readelf.c (attr_callback): Handle DW_AT_data_location.
1175         Handle block forms to mean a DWARF expression for DW_AT_allocated,
1176         DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1177         DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1178         DW_AT_upper_bound.
1179
1180 2007-10-20  Roland McGrath  <roland@redhat.com>
1181
1182         * unstrip.c (options): Update -R description.
1183         (struct symbol): Put symbol details a union with a size_t pointer
1184         `duplicate'.
1185         (compare_symbols_output): Use null ->name as marker for discard
1186         symbols, not zero *->map.
1187         (copy_elided_sections): Record forwarding pointers for discarded
1188         duplicates and fill SYMNDX_MAP elements through them.
1189
1190         * readelf.c (process_file): Set offline_next_address to 0 at start.
1191         (struct process_dwflmod_args): New type.
1192         (process_dwflmod): Take args in it, pass fd to process_elf_file.
1193         (process_file): Update caller; dup FD for passing to libdwfl.
1194         (process_elf_file): Take new arg FD.  For ET_REL file when
1195         displaying data affected by libdwfl relocation, open a new Elf handle.
1196
1197 2007-10-17  Roland McGrath  <roland@redhat.com>
1198
1199         * readelf.c (print_debug_line_section): For invalid data inside a
1200         unit with plausible length, keep printing at the next unit boundary.
1201
1202         * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1203
1204 2007-10-16  Roland McGrath  <roland@redhat.com>
1205
1206         * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1207
1208 2007-10-15  Roland McGrath  <roland@redhat.com>
1209
1210         * make-debug-archive.in: New file.
1211         * Makefile.am (EXTRA_DIST): Add it.
1212         (make-debug-archive): New target.
1213         (bin_SCRIPTS, CLEANFILES): Add it.
1214
1215 2007-10-10  Roland McGrath  <roland@redhat.com>
1216
1217         * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1218         Use it to check MERGE|STRINGS for .debug_str.
1219         (check_sections): Handle exact_or_gnuld.
1220
1221 2007-10-08  Roland McGrath  <roland@redhat.com>
1222
1223         * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1224         64-bit struct timeval with 32-bit tv_usec.
1225
1226 2007-10-07  Roland McGrath  <roland@redhat.com>
1227
1228         * readelf.c (check_archive_index): New function.
1229         (process_file): Call it.  Change signature to take only fd and name.
1230         Use libdwfl to open the file, then iterate on its modules (multiple
1231         for an archive) to print file name and call process_elf_file.
1232         (main): Update caller.  Let process_file do elf_begin.
1233         (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1234         (process_elf_file): Take only Dwfl_Module * argument.
1235         Don't print the file name here.
1236         (print_debug_*_section): Take Dwfl_Module * argument.
1237         (print_debug): Likewise.  Update caller.
1238         (format_dwarf_addr): New function.
1239         (print_debug_ranges_section): Use it.
1240         (attr_callback): Likewise.
1241         (print_debug_line_section, print_debug_loc_section): Likewise.
1242
1243         * readelf.c (print_debug_ranges_section): Translate all strings.
1244         (print_debug_loc_section): Likewise.
1245
1246         * unstrip.c (copy_elided_sections): Initialize SEC.
1247
1248         * ar.c (do_oper_insert): Put trailing / on short names.
1249
1250         * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1251
1252         * arlib2.c (arlib_add_long_name): Adjust for header size.
1253
1254         * arlib.c (arlib_finalize): Pad long name table to keep size even.
1255
1256         * ar.c (do_oper_insert): Use write_retry for padding write.
1257
1258         * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1259         Unconditionally set FOUND[CNT]->elf when setting ->mem.
1260         (remember_long_name): New function.
1261         (do_oper_insert): Call it.  Correctly use length of basename,
1262         not original name.  Don't store long name twice for new member.
1263
1264 2007-10-06  Roland McGrath  <roland@redhat.com>
1265
1266         * elflint.c (check_note): Skip empty segment.
1267         (check_note_section): Skip empty section.
1268
1269         * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1270         (handle_output_dir_module, handle_implicit_modules): Pass it down.
1271         (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1272         (compare_alloc_sections): Take new arg REL, ignore address if true.
1273         (compare_sections): Likewise, pass it down.
1274         (compare_sections_rel, compare_sections_nonrel): New functions.
1275         (find_alloc_sections_prelink, copy_elided_sections): Use them
1276         instead of compare_sections.
1277         (sections_match): New function, broken out of ...
1278         (find_alloc_section): ... here.
1279         (copy_elided_sections): Reorganize section match-up logic.
1280         Use sections_match for SHF_ALLOC in ET_REL.
1281         For ET_REL, let the nonzero sh_addr from the debug file dominate.
1282
1283         * unstrip.c (add_new_section_symbols): Take new arg REL.
1284         When true, do not update section symbol values.
1285         (collect_symbols): Likewise.  Update section symbols with address
1286         of chosen output section, not original section.
1287         (check_symtab_section_symbols, copy_elided_sections): Update callers.
1288
1289         * unstrip.c (compare_alloc_sections): At the same address, preserve
1290         original section order.
1291
1292         * elflint.c (special_sections): Don't require MERGE|STRINGS for
1293         .debug_str, it didn't always have them with older tools.
1294
1295         * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1296
1297 2007-10-05  Roland McGrath  <roland@redhat.com>
1298
1299         * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1300         ET_REL file.
1301
1302         * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1303         SHN_UNDEF as "bad section".  Use shndx value in messages.
1304
1305         * elflint.c (special_sections): Add ".debug_str".  Decrement namelen
1306         for ".debug" so it matches as a prefix.
1307         (IS_KNOWN_SPECIAL): New macro.
1308         (check_sections): Use it for ".plt" match.  Cite wrong SHT_NOBITS
1309         type even under -d, for a .debug* or .shstrtab section.
1310
1311         * readelf.c (print_ops): Use hex for address operand.
1312
1313 2007-10-04  Roland McGrath  <roland@redhat.com>
1314
1315         * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1316         .gnu_debuglink section to SHN_UNDEF.  Drop STT_SECTION symbols for
1317         sections mapped to SHN_UNDEF.
1318
1319 2007-10-04  Ulrich Drepper  <drepper@redhat.com>
1320
1321         * readelf.c (dump_archive_index): Avoid warning about uninitialized
1322         variable with older glibc versions.
1323         Add some branch prediction.
1324
1325 2007-10-04  Roland McGrath  <roland@redhat.com>
1326
1327         * readelf.c (print_archive_index): New variable.
1328         (options, parse_opt): Accept -c/--archive-index to set it.
1329         (dump_archive_index): New function.
1330         (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1331         Call dump_archive_index on archives if set.
1332         (main): Update caller.
1333         (any_control_option): Give it file scope, moved out of ...
1334         (parse_opt): ... here.
1335
1336 2007-10-03  Roland McGrath  <roland@redhat.com>
1337
1338         * unstrip.c (struct arg_info): Add `list' flag.
1339         (options, parse_opt): Grok -n/--list to set it.
1340         (list_module): New function.
1341         (handle_implicit_modules): Call it under -n.
1342
1343         * elflint.c (check_note_section): New function.
1344         (check_sections): Call it for SHT_NOTE.
1345
1346         * readelf.c (handle_notes): Use sections when available.
1347
1348         * elflint.c (check_note_data): New function, broken out of ...
1349         (check_note): ... here.  Call it and elf_getdata_rawchunk.
1350
1351         * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1352         Use elf_getdata_rawchunk and gelf_getauxv.
1353         (handle_notes_data): New function, broken out of ...
1354         (handle_notes): ... here.  Call it and elf_getdata_rawchunk.
1355
1356 2007-10-01  Roland McGrath  <roland@redhat.com>
1357
1358         * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1359
1360         * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1361
1362 2007-09-10  Roland McGrath  <roland@redhat.com>
1363
1364         * readelf.c (options): Give -p optional argument, alias --string-dump.
1365         (string_sections, string_sections_tail): New static variables.
1366         (parse_opt): Set them when -p has an argument.
1367         (print_string_section): New function, broken out of ...
1368         (print_strings): ... here.  Call it.
1369         (dump_data_section): New function, broken out of ...
1370         (dump_data): ... here.  Call it.
1371         (for_each_section_argument): New function, broken out of ...
1372         (dump_data): ... here.  Call it.
1373         (dump_strings): New function.
1374
1375 2007-08-31  Roland McGrath  <roland@redhat.com>
1376
1377         * readelf.c (print_strings): Typo fix.
1378
1379 2007-08-23  Roland McGrath  <roland@redhat.com>
1380
1381         * readelf.c (printf_with_wrap): Function removed.
1382         (REGISTER_WRAP_COLUMN): New macro.
1383         (handle_core_register): Use print_core_item instead.
1384         (struct register_info): New type.
1385         (compare_registers, compare_register_sets): New functions.
1386         (register_bitpos, compare_sets_by_info): New functions.
1387         (handle_core_registers): Use those to segregate and sort registers
1388         for display.
1389
1390         * readelf.c (ITEM_WRAP_COLUMN): New macro.
1391         (print_core_item): New function.
1392         (handle_core_item): Use it instead of printf_with_wrap.
1393         (compare_core_items, compare_core_item_groups): New functions.
1394         (handle_core_items): Use them.  Sort by group and force line breaks
1395         between groups.
1396
1397         * readelf.c (handle_core_registers, handle_core_items): New functions,
1398         broken out of ...
1399         (handle_core_note): ... here.   Call them.
1400
1401 2007-08-22  Roland McGrath  <roland@redhat.com>
1402
1403         * unstrip.c (new_shstrtab): New function, broken out of ...
1404         (copy_elided_sections): ... here.
1405
1406 2007-08-20  Roland McGrath  <roland@redhat.com>
1407
1408         Avoid local function trampolines in nm binary.
1409         * nm.c (sort_by_address): Move to a static function instead of local
1410         inside show_symbols.
1411         (sort_by_name_strtab): New static variable.
1412         (sort_by_name): Use it.  Move to a static function instead of local
1413         inside show_symbols.
1414         (show_symbols): Set sort_by_name_strtab.
1415
1416 2007-08-19  Roland McGrath  <roland@redhat.com>
1417
1418         * readelf.c (handle_auxv_note): New function.
1419         (handle_notes): Call it.
1420
1421         * readelf.c (printf_with_wrap, convert): New functions.
1422         (handle_core_item, (handle_core_register): New functions.
1423         (handle_notes): Call those with details from ebl_core_note.
1424
1425 2007-08-12  Roland McGrath  <roland@redhat.com>
1426
1427         * elflint.c (check_note): Accept type 0 with name "Linux".
1428
1429         * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1430
1431         * elflint.c (section_flags_string): Return "none" for 0, not "".
1432
1433 2007-08-11  Roland McGrath  <roland@redhat.com>
1434
1435         * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1436
1437 2007-08-04  Ulrich Drepper  <drepper@redhat.com>
1438
1439         * readelf.c (hex_dump): Use isprint to determine whether to print
1440         character itself or full stop character.
1441         (dump_data): No need to check endp for NULL after strtol call.
1442
1443 2007-08-03  Roland McGrath  <roland@redhat.com>
1444
1445         * readelf.c (print_string_sections): New variable.
1446         (options, parse_opt): Handle --strings/-p to set it.
1447         (print_strings): New function.
1448         (process_elf_file): Call it under -p.
1449
1450         * readelf.c (options): Add hidden aliases --segments, --sections,
1451         as taken by binutils readelf.
1452
1453 2007-08-01  Roland McGrath  <roland@redhat.com>
1454
1455         * readelf.c (dump_data_sections, dump_data_sections_tail):
1456         New variables.
1457         (options, parse_opt): Handle --hex-dump/-x, set them.
1458         (hex_dump): New function.
1459         (dump_data): New function, call it.
1460         (process_elf_file): Call it.
1461
1462 2007-07-25  Roland McGrath  <roland@redhat.com>
1463
1464         * addr2line.c (show_symbols): New variable.
1465         (print_addrsym): New function.
1466         (handle_address): Call it.
1467         (options, parse_opt): Handle -S/--symbols.
1468
1469 2007-06-05  Ulrich Drepper  <drepper@redhat.com>
1470
1471         * addr2line.c: Update for latest autoconf header.
1472         * ar.c: Likewise.
1473         * elfcmp.c: Likewise.
1474         * elflint.c: Likewise.
1475         * findtextrel.c: Likewise.
1476         * ld.c: Likewise.
1477         * ldgeneric.c: Likewise.
1478         * nm.c: Likewise.
1479         * objdump.c: Likewise.
1480         * ranlib.c: Likewise.
1481         * readelf.c: Likewise.
1482         * size.c: Likewise.
1483         * strings.c: Likewise.
1484         * strip.c: Likewise.
1485         * unstrip.c: Likewise.
1486
1487 2007-05-18  Roland McGrath  <roland@redhat.com>
1488
1489         * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1490         stripped file, so as not to duplicate a section copied in both.
1491
1492         * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1493
1494 2007-05-17  Roland McGrath  <roland@redhat.com>
1495
1496         * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1497
1498         * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1499
1500         * unstrip.c (handle_file): Take new arg CREATE_DIRS.  If set,
1501         call make_directories here.
1502         (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1503         (handle_dwfl_module): Likewise.
1504         (handle_implicit_modules): Update callers.
1505         (handle_output_dir_module): Likewise.  Don't do make_directories here.
1506
1507         * unstrip.c (get_section_name): New function, broken out of ...
1508         (copy_elided_sections): here.  Update callers.
1509         (find_alloc_section): Broken out of ...
1510         (copy_elided_sections): ... here.  Update caller.
1511         (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1512         update STT_SECTION symbols' st_value fields as a side effect.
1513         (check_symtab_section_symbols): Update caller.
1514         (add_new_section_symbols): Set st_value in symbols added.
1515         (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1516         Take new arg SPLIT_BSS.  Adjust S->shndx recorded for symbols moved
1517         from .bss to .dynbss.
1518         (find_alloc_sections_prelink): New function.  Associate debug file
1519         allocated SHT_NOBITS shdrs with stripped moved by prelink via
1520         .gnu.prelink_undo information.
1521         (copy_elided_sections): Call it when we couldn't find every allocated
1522         section.  Don't use a debug file non-NOBITS section if SHF_ALLOC.
1523         Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1524         (handle_file): Update callers.
1525
1526         * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1527         named ".comment".
1528
1529         * elflint.c (check_sections): Fix association of segments with
1530         sections when p_memsz > p_filesz.
1531
1532 2007-04-29  Roland McGrath  <roland@redhat.com>
1533
1534         * addr2line.c (options, main): Tweak argp group settings to fix
1535         usage output.
1536
1537 2007-04-28  Roland McGrath  <roland@redhat.com>
1538
1539         * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1540         sizes to match sections adjusted in the stripped file.
1541
1542 2007-04-24  Roland McGrath  <roland@redhat.com>
1543
1544         * elfcmp.c (OPT_HASH_INEXACT): New macro.
1545         (hash_inexact): New variable.
1546         (options, parse_opt): Add --hash-inexact option to set it.
1547         (hash_content_equivalent): New function.
1548         (main): Call it for differing SHT_HASH sections under --hash-inexact.
1549
1550 2007-04-23  Roland McGrath  <roland@redhat.com>
1551
1552         * unstrip.c: New file.
1553         * Makefile.am (bin_PROGRAMS): Add it.
1554         (unstrip_LDADD): New variable.
1555
1556         * strip.c (options): Allow --output for -o.
1557
1558 2007-02-15  Ulrich Drepper  <drepper@redhat.com>
1559
1560         * readelf.c: Remove unused code.  Add a few consts.
1561
1562 2007-02-15  Roland McGrath  <roland@redhat.com>
1563
1564         * readelf.c (print_debug): Fix brainos in SHDR test.
1565
1566 2007-02-05  Roland McGrath  <roland@redhat.com>
1567
1568         * ar.c: Include <limits.h>, since we use LONG_MAX.
1569
1570 2007-02-05  Ulrich Drepper  <drepper@redhat.com>
1571
1572         * ar.c: Add ugly hack to work around gcc complaining that we
1573         ignore fchown's return value.
1574         (do_oper_insert): Handle error when writing padding.
1575         * ranlib.c: Add fchown complain work around.
1576
1577         * arlib.c: Make symtab a global variable.  Change all users.
1578         * arlib2.c: Likewise.
1579         * ranlib.c: Likewise.
1580         * ar.c: Likewise.
1581         * arlib.h: Declare it.
1582
1583 2007-01-11  Roland McGrath  <roland@redhat.com>
1584
1585         * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1586         SHF_MASKPROC bits separately from generic sh_flags validation.
1587
1588 2007-02-04  Ulrich Drepper  <drepper@redhat.com>
1589
1590         * ar.c: New file.
1591         * arlib.c: New file.
1592         * arlib2.c: New file.
1593         * arlib.h: New file.
1594         * Makefile (noinst_LIBRARIES): Add libar.
1595         (libar_a_SOURCES): Define.
1596         (ar_LDADD): Define.
1597         (CFLAGS_ar): Define.
1598         * ranlib.c: Change to use arlib.
1599
1600         * elflint.c (check_symtab): Work around GNU ld bug which omits
1601         sections but not symbols in those sections.
1602
1603 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1604
1605         * addr2line.c: Update copyright year.
1606         * elfcmp.c: Likewise.
1607         * elflint.c: Likewise.
1608         * findtextrel.c: Likewise.
1609         * ld.c: Likewise.
1610         * nm.c: Likewise.
1611         * objdump.c: Likewise.
1612         * ranlib.c:  Likewise.
1613         * readelf.c: Likewise.
1614         * size.c: Likewise.
1615         * strings.c: Likewise.
1616         * strip.c: Likewise.
1617
1618 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1619
1620         * elflint.c (compare_hash_gnu_hash): New function.  Report if the
1621         two hash tables have different content (module expected omission
1622         of undefined symbols).
1623
1624 2006-10-31  Roland McGrath  <roland@redhat.com>
1625
1626         * elflint.c (check_program_header): Don't complain about
1627         p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
1628
1629 2006-09-19  Jakub Jelinek  <jakub@redhat.com>
1630
1631         * strip.c (process_file): Disallow -f on archives.
1632
1633 2006-10-09  Roland McGrath  <roland@redhat.com>
1634
1635         * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1636
1637 2006-08-29  Roland McGrath  <roland@redhat.com>
1638
1639         * Makefile.am (MAINTAINERCLEANFILES): New variable.
1640
1641         * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1642         Reported by Christian Aichinger <Greek0@gmx.net>.
1643
1644         * elflint.c (valid_e_machine): Add EM_ALPHA.
1645         Reported by Christian Aichinger <Greek0@gmx.net>.
1646
1647 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
1648
1649         * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1650         Keep track of which "high DT" entries are present.
1651         Check that either old or GNU-style hash table is present.
1652         If GNU-style hash table is used a symbol table is mandatory.
1653         Check that if any prelink entry is present all of them are.
1654         (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1655         table if they don't refer to functions.
1656
1657 2006-07-17  Roland McGrath  <roland@redhat.com>
1658
1659         * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1660         (add_version): Likewise for argument.
1661         (check_versym): Cast constant to GElf_Versym for comparison.
1662
1663 2006-07-12  Roland McGrath  <roland@redhat.com>
1664
1665         * readelf.c (handle_gnu_hash): Add casts for machines where
1666         Elf32_Word != unsigned int.
1667
1668 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
1669
1670         * elflint.c (check_sysv_hash64): Fix printf format.
1671
1672 2006-07-11  Roland McGrath  <roland@redhat.com>
1673
1674         * addr2line.c (options): English fix in -f doc string.
1675
1676         * addr2line.c (use_comp_dir): New variable.
1677         (options, parse_opt): Grok -A/--absolute to set it.
1678         (handle_address): If set, prepend dwfl_line_comp_dir results to
1679         relative file names.
1680
1681 2006-07-06  Ulrich Drepper  <drepper@redhat.com>
1682
1683         * elflint.c: Adjust for latest new hash table format.
1684         * readelf.c: Likewise.
1685
1686         * elflint.c (check_versym): Ignore hidden bit when comparing version
1687         numbers.
1688
1689 2006-07-05  Ulrich Drepper  <drepper@redhat.com>
1690
1691         * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1692         discarded COMDAT symbols.
1693
1694         * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1695         (elf_i386_create_relocations): Likewise.
1696         * ld.h (struct symbol): Add local and hidden bits.
1697         * ld.c (create_special_section_symbol): These synthsized symbols
1698         are local and hidden.
1699         * ldgeneric.c (file_process2): Check whether input file matches
1700         the emulation.
1701         (fillin_special_symbol): Create symbols as local and/or hidden
1702         if requested.
1703         (ld_generic_create_outfile): Make local copy of symbol.
1704         Don't hide global, defined symbols in dynamic symbol table unless
1705         requested.  Synthetic symbols have no version information.
1706
1707         * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1708         * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1709
1710 2006-07-04  Ulrich Drepper  <drepper@redhat.com>
1711
1712         * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1713         testing.
1714
1715 2006-07-03  Ulrich Drepper  <drepper@redhat.com>
1716
1717         * elflint.c: Add testing of DT_GNU_HASH.
1718         * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1719
1720         * Makefile.am: Add hacks to create dependency files for non-generic
1721         linker.
1722
1723 2006-06-12  Ulrich Drepper  <drepper@redhat.com>
1724
1725         * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1726         section if creating a DSO and no interpreter is given.
1727         (ld_generic_create_outfile): Don't store reference to symbols in
1728         discarded COMDAT groups.  Don't create PHDR and INTERP program header
1729         for DSO if no interpreter is specified.
1730         (create_verneed_data): Pretty printing.
1731
1732         * ldscript.y (content): If a DSO is created don't set default
1733         interpreter from linker script.
1734
1735         * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1736         for symbols in discarded COMDAT groups.
1737         (elf_i386_create_relocations): Likewise.
1738         * ld.h (struct scninfo): Add unused_comdat.
1739         * ldgeneric.c (add_section): Also check group signature when
1740         matching COMDAT sections.
1741         (add_relocatable_file): Ignore symbols in COMDAT group which are
1742         discarded.
1743
1744         * elflint.c (check_one_reloc): For *_NONE relocs only check type
1745         and symbol reference.
1746
1747 2006-06-11  Ulrich Drepper  <drepper@redhat.com>
1748
1749         * elflint.c (check_dynamic): Fix checking value of tags which are
1750         offsets in the string section.  Make sure DT_STRTAB points to the
1751         section referenced in sh_link.
1752
1753         * ld.c (options): Add headers.  Add short option 'R' for '--rpath'.
1754
1755         * ld.c: Recognize --eh-frame-hdr option.
1756         * ld.h (struct ld_state): Add eh_frame_hdr field.
1757         * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1758
1759         * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1760         SH_FLAGS_COMBINE.
1761         (add_relocatable_file): Minor optimization of last change.
1762         (match_section): Don't preserve SHF_GROUP flag any longer.
1763
1764 2006-06-10  Ulrich Drepper  <drepper@redhat.com>
1765
1766         * ld.c (parse_z_option): Recognize execstack and noexecstack.
1767         Handle record and ignore as position dependent options.
1768         (parse_z_option_2): Handle ignore and record here.
1769         * ld.h (struct ld_state): Add execstack field.
1770         * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1771         sections.
1772         (ld_generic_create_outfile): Fix program header creation in native
1773         linker.  Add PT_GNU_STACK program header.
1774
1775 2006-06-09  Ulrich Drepper  <drepper@redhat.com>
1776
1777         * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1778         for PLT entries if there is no local definition.
1779
1780         * ld.c (parse_option): Handle -z ignore like --as-needed and
1781         -z record like --no-as-needed.
1782         * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1783         * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1784         looping over DSOs.  When deciding about adding DT_NEEDED entries
1785         use ->as_needed instead of ignore_unused_dsos.
1786
1787 2006-05-31  Ulrich Drepper  <drepper@redhat.com>
1788
1789         * ld.c: Recognize --as-needed and --no-as-needed options.
1790         * ld.h (struct usedfile): Add as_needed field.
1791         (struct ld_state): Likewise.
1792         * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1793         the list.
1794         * ldscript.y (filename_id_list): Split to correctly parse all
1795         combinations.
1796         (mark_as_needed): Fix loop.
1797
1798 2006-05-28  Ulrich Drepper  <drepper@redhat.com>
1799
1800         * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1801         and colno.
1802
1803 2006-05-27  Ulrich Drepper  <drepper@redhat.com>
1804
1805         * readelf.c (handle_relocs_rela): Better notations for addon value.
1806         (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
1807
1808 2006-04-04  Ulrich Drepper  <drepper@redhat.com>
1809
1810         * addr2line.c: Update copyright year.
1811         * elfcmp.c: Likewise.
1812         * elflint.c: Likewise.
1813         * findtextrel.c: Likewise.
1814         * ld.c: Likewise.
1815         * nm.c: Likewise.
1816         * objdump.c: Likewise.
1817         * ranlib.c: Likewise.
1818         * readelf.c: Likewise.
1819         * size.c: Likewise.
1820         * strings.c: Likewise.
1821         * strip.c: Likewise.
1822
1823 2006-03-09  Roland McGrath  <roland@redhat.com>
1824
1825         * Makefile.am (AM_LDFLAGS): New variable.
1826
1827 2006-03-01  Roland McGrath  <roland@redhat.com>
1828
1829         * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1830         for dwarf.h changes matching 3.0 spec.
1831         (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1832
1833 2005-12-04  Ulrich Drepper  <drepper@redhat.com>
1834
1835         * elflint.c (check_one_reloc): If relocation section is not loaded,
1836         don't check whether the relocations modify read-only sections or
1837         loaded and unloaded sections.
1838
1839 2005-11-28  Ulrich Drepper  <drepper@redhat.com>
1840
1841         * elflint.c (check_one_reloc): Take additional parameters.  Use
1842         them to determine whether relocation is valid in this type of
1843         file.  DSOs and executables can contain relocation sections in
1844         unloaded sections which just show the relocations the linker
1845         applied.  Adjust all callers.
1846         (check_program_header): Check that PT_PHDR is loaded and that offset
1847         matches the one in the ELF header.
1848
1849 2005-10-26  Roland McGrath  <roland@redhat.com>
1850
1851         * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1852
1853 2005-09-03  Ulrich Drepper  <drepper@redhat.com>
1854
1855         * strip.c (handle_elf): Unify some error messages.
1856         * ld.c (main): Likewise.
1857         * ldgeneric.c (open_elf): Likewise.
1858         * elfcmp.c (main): Likewise.
1859         * elflint.c (check_elf_header): Likewise.
1860
1861         * size.c (process_file): Fix typo in error message.
1862
1863         * readelf.c: Lots of little cleanups.  Use _unlocked functions.
1864
1865 2005-09-02  Ulrich Drepper  <drepper@redhat.com>
1866
1867         * strings.c (main): Reset elfmap variable after munmap call.
1868         [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
1869
1870 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
1871
1872         * ranlib.c: Don't define pread_retry and write_retry here.
1873
1874         * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1875         (CLEANFILES): Add *.gcno *.gcda *.gconv.
1876
1877         * strings.c (process_chunk): Reorder expressions in conditional
1878         (process_chunk_mb): Likewise.
1879
1880         * strings.c: New file.
1881         * Makefile.am (bin_PROGRAMS): Add strings.
1882         (strings_no_Wstring): Define.
1883         (strings_LDADD): Define.
1884
1885 2005-08-27  Roland McGrath  <roland@redhat.com>
1886
1887         * addr2line.c (dwarf_diename_integrate): Function removed.
1888         (print_dwarf_function): Use plain dwarf_diename.
1889
1890 2005-08-24  Ulrich Drepper  <drepper@redhat.com>
1891
1892         * elflint.c (check_versym): Versioned symbols should not have
1893         local binding.
1894
1895 2005-08-15  Ulrich Drepper  <drepper@redhat.com>
1896
1897         * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1898         undefined.
1899
1900         * Makefile.am: Add rules to build ranlib.
1901         * ranlib.c: New file.
1902
1903 2005-08-14  Roland McGrath  <roland@redhat.com>
1904
1905         * elflint.c (check_sections): Use ebl_section_type_name and allow any
1906         sh_type it recognizes.
1907
1908         * elflint.c (check_sections): Print unknown flags in hex, don't
1909         truncate high bits.  Print section number and name for unknown type.
1910
1911 2005-08-13  Roland McGrath  <roland@redhat.com>
1912
1913         * elflint.c (check_program_header): Use ebl_segment_type_name and
1914         allow any p_type it recognizes.  Include p_type value in error
1915         message for unknown type.
1916
1917 2005-08-13  Ulrich Drepper  <drepper@redhat.com>
1918
1919         * elflint.c (check_symtab): Simplify last change a bit.  Pass ehdr
1920         to ebl_check_special_symbol.
1921         (check_sections): Pass ehdr to ebl_bss_plt_p.
1922
1923 2005-08-12  Roland McGrath  <roland@redhat.com>
1924
1925         * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1926         refers to the right section if it's not SHN_ABS.
1927         Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1928
1929         * elflint.c (check_sections): Don't complain about a non-NOBITS
1930         section taking no segment space, if it's sh_size is 0.
1931
1932         * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1933         be PROGBITS or NOBITS.
1934
1935         * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1936         standard st_value and st_size checks.
1937
1938 2005-07-28  Roland McGrath  <roland@redhat.com>
1939
1940         * addr2line.c (options, parse_opt): Don't handle -e here.
1941         (executable): Variable removed.
1942         (argp_children): New static variable.
1943         (argp): Use it.  Make const.
1944         (main): Fill in argp_children from dwfl_standard_argp ().
1945         Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1946         (print_dwarf_function): New function.  Try to figure out inline chain.
1947         (elf_getname): Function removed, libdwfl does it for us.
1948         (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1949         Use dwfl_module_addrname instead of elf_getname.
1950         Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1951         * Makefile.am (INCLUDES): Add libdwfl directory to path.
1952
1953 2005-08-10  Ulrich Drepper  <drepper@redhat.com>
1954
1955         * strip.c (parse_opt): STATE parameter is now used.
1956         Various little cleanups.
1957
1958         * readelf.c (print_debug_line_section): Correct fallout of renaming
1959         of DW_LNS_set_epilog_begin.
1960
1961 2005-08-08  Roland McGrath  <roland@redhat.com>
1962
1963         * strip.c (options, parse_opt): Grok -R .comment for compatibility
1964         with binutils strip.  Likewise -d, -S, as aliases for -g.
1965         Likewise ignore -s/--strip-all.
1966
1967 2005-08-07  Roland McGrath  <roland@redhat.com>
1968
1969         * strip.c (process_file): Open read-only when using a different output
1970         file.
1971
1972 2005-08-06  Ulrich Drepper  <drepper@redhat.com>
1973
1974         * elflint.c (in_nobits_scn): New function.
1975         (check_versym): Allow references for defined symbols against versions
1976         of other DSOs also for symbols in nobits sections.
1977         Move a few variables around.
1978
1979         * Makefile.am (AM_CFLAGS): Avoid duplication.
1980         Link with statis libs if BUILD_STATIC.
1981
1982 2005-08-05  Ulrich Drepper  <drepper@redhat.com>
1983
1984         * elflint.c: Many, many more tests.  Mostly related to symbol
1985         versioning.  Those sections should now be completely checked.
1986
1987         * readelf.c (print_dynamic): Use gelf_offscn.
1988
1989 2005-08-04  Ulrich Drepper  <drepper@redhat.com>
1990
1991         * elflint.c: Add lots more tests: more extension symbol table sanity,
1992         versioning section tests, hash table tests.  General cleanup.
1993
1994 2005-08-02  Ulrich Drepper  <drepper@redhat.com>
1995
1996         * objdump.c: New file.
1997         * Makefile.am (bin_PROGRAMS): Add objdump.
1998         (objdump_LDADD): Define.
1999
2000         * elflint.c (check_reloc_shdr): New function split out from check_rela
2001         and check_rel.
2002         (check_one_reloc): New function.  Likewise.
2003         (check_rela): Use check_reloc_shdr and check_one_reloc.
2004         (check_rel): Likewise.
2005         (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2006         section.
2007         Add checks that relocations against read-only segments are flagged,
2008         that the text relocation flag is not set unnecessarily, and that
2009         relocations in one section are either against loaded or not-loaded
2010         segments.
2011
2012 2005-08-01  Ulrich Drepper  <drepper@redhat.com>
2013
2014         * elfcmp.c (main): Ignore section count and section name string table
2015         section index.
2016
2017 2005-07-27  Roland McGrath  <roland@redhat.com>
2018
2019         * elfcmp.c: Include <locale.h>.
2020
2021 2005-07-27  Ulrich Drepper  <drepper@redhat.com>
2022
2023         * elfcmp.c: Print name and index of differing section.
2024
2025 2005-07-24  Ulrich Drepper  <drepper@redhat.com>
2026
2027         * elfcmp.c: Implement comparing gaps between sections.
2028
2029 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
2030
2031         * elflint.c: Include libeblP.h instead of libebl.h.
2032         * nm.c: Likewise.
2033         * readelf.c: Likewise.
2034         * elfcmp.c: Likewise.
2035
2036         * elfcmp.c (main): Compare individual ELF header fields, excluding
2037         e_shoff instead of the whole struct at once.
2038         Use ebl_section_strip_p instead of SECTION_STRIP_P.
2039         * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2040
2041 2005-07-22  Ulrich Drepper  <drepper@redhat.com>
2042
2043         * elfcmp.c (main): Take empty section into account when comparing
2044         section content.
2045
2046         * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2047         using it.
2048
2049 2005-07-21  Ulrich Drepper  <drepper@redhat.com>
2050
2051         * elfcmp.c: New file.
2052         * Makefile.am (bin_PROGRAMS): Add elfcmp.
2053         (elfcmp_LDADD): Define.
2054
2055         * elflint.c (check_rela): Check that copy relocations only reference
2056         object symbols or symbols with unknown type.
2057         (check_rel): Likewise.
2058
2059 2005-06-08  Roland McGrath  <roland@redhat.com>
2060
2061         * readelf.c (print_ops): Add consts.
2062
2063 2005-05-31  Roland McGrath  <roland@redhat.com>
2064
2065         * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2066         abbreviations.  Print a header line before each CU section.
2067
2068         * readelf.c (print_debug_loc_section): Fix indentation for larger
2069         address size.
2070
2071 2005-05-30  Roland McGrath  <roland@redhat.com>
2072
2073         * readelf.c (print_debug_line_section): Print section offset of each
2074         CU's table, so they are easy to find from seeing the stmt_list value.
2075
2076         * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2077         (attr_callback): Grok DW_AT_ranges and print offset in hex.
2078
2079         * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2080         (print_debug_ranges_section, print_debug_loc_section): Likewise.
2081
2082         * readelf.c (print_ops): Take different args for indentation control.
2083         (attr_callback): Caller updated.
2084         Grok several more block-form attributes as being location expressions.
2085         For those same attributes with udata forms, format output differently
2086         for location list offset.
2087         (print_debug_loc_section): Implement it for real.
2088
2089         * readelf.c (options): Mention ranges for --debug-dump.
2090         (enum section_e): Add section_ranges.
2091         (parse_opt): Grok "ranges" for -w/--debug-dump.
2092         (print_debug_ranges_section): New function.
2093         (print_debug): Handle .debug_ranges section.
2094
2095 2005-05-30  Ulrich Drepper  <drepper@redhat.com>
2096
2097         * readelf.c (handle_notes): At least x86-64 need not have the note
2098         section values aligned to 8 bytes.
2099
2100 2005-05-18  Ulrich Drepper  <drepper@redhat.com>
2101
2102         * readelf.c (dwarf_tag_string): Add new tags.
2103
2104 2005-05-08  Roland McGrath  <roland@redhat.com>
2105
2106         * strip.c (handle_elf): Don't translate hash and versym data formats,
2107         elf_getdata already did it for us.
2108
2109 2005-05-07  Ulrich Drepper  <drepper@redhat.com>
2110
2111         * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2112         (addr2line_LDADD): Likewise.
2113
2114 2005-05-03  Roland McGrath  <roland@redhat.com>
2115
2116         * strip.c (handle_elf): Apply symbol table fixups to discarded
2117         relocation sections when they are being saved in the debug file.
2118
2119         * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2120         and gelf_xlatetof, not the native byte order.
2121
2122         * strip.c (parse_opt): Give error if -f or -o is repeated.
2123         (main): Exit if argp_parse returns nonzero.
2124
2125         * strip.c (debug_fname_embed): New variable.
2126         (options, parse_opt): New option -F to set it.
2127
2128 2005-05-07  Ulrich Drepper  <drepper@redhat.com>
2129
2130         * readelf.c (parse_opt): Make any_control_option variable
2131         local.  Simplify some tests.
2132
2133 2005-05-03  Roland McGrath  <roland@redhat.com>
2134
2135         * strip.c (crc32_file): Function removed (now in ../lib).
2136
2137 2005-05-03  Roland McGrath  <roland@redhat.com>
2138
2139         * elflint.c (is_debuginfo): New variable.
2140         (options, parse_opt): New option --debuginfo/-d to set it.
2141         (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2142         (check_note): If is_debuginfo, don't try to get note contents.
2143
2144 2005-04-24  Ulrich Drepper  <drepper@redhat.com>
2145
2146         * readelf.c (print_debug_abbrev_section): Don't print error when end of
2147         section reached.
2148
2149 2005-04-14  Ulrich Drepper  <drepper@redhat.com>
2150
2151         * readelf.c (dwarf_encoding_string): New function.
2152         (dwarf_inline_string): New function.
2153         (dwarf_access_string): New function.
2154         (dwarf_visibility_string): New function.
2155         (dwarf_virtuality_string): New function.
2156         (dwarf_identifier_case_string): New function.
2157         (dwarf_calling_convention_string): New function.
2158         (dwarf_ordering_string): New function.
2159         (dwarf_discr_list_string): New function.
2160         (attr_callback): Decode man more attribute values.
2161
2162 2005-04-01  Ulrich Drepper  <drepper@redhat.com>
2163
2164         * addr2line.c: Finish implementation of -f option.
2165
2166 2005-03-29  Ulrich Drepper  <drepper@redhat.com>
2167
2168         * addr2line.c: New file.
2169         * Makefile.am (bin_PROGRAMS): Add addr2line.
2170         Define addr2line_LDADD.
2171
2172         * findtextrel.c: Use new dwarf_addrdie function.
2173
2174         * findtextrel.c: Fix usage message and re-add accidentally removed
2175         line.
2176
2177 2005-03-28  Ulrich Drepper  <drepper@redhat.com>
2178
2179         * findtextrel.c: New file.
2180         * Makefile: Add rules to build findtextrel.
2181
2182 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
2183
2184         * ldlex.l: Provide ECHO definition to avoid warning.
2185
2186         * elflint.c (check_program_header): Fix typo in RELRO test.
2187
2188         * Makefile.am (AM_CFLAGS): Add more warning options.
2189         * elflint.c: Fix warnings introduced by the new warning options.
2190         * i386_ld.c: Likewise.
2191         * ld.c: Likewise.
2192         * ld.h: Likewise.
2193         * ldgeneric.c: Likewise.
2194         * nm.c: Likewise.
2195         * readelf.c: Likewise.
2196         * sectionhash.c: Likewise.
2197         * size.c: Likewise.
2198         * string.c: Likewise.
2199
2200 2005-02-05  Ulrich Drepper  <drepper@redhat.com>
2201
2202         * Makefile.am: Check for text relocations in constructed DSOs.
2203
2204         * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.  Link all apps
2205         with -lmudflap.
2206
2207         * ldscript.y: Add as_needed handling.
2208         * ldlex.l: Recognize AS_NEEDED token.
2209         * ld.h (struct filename_list): Add as_needed flag.
2210
2211 2005-02-04  Ulrich Drepper  <drepper@redhat.com>
2212
2213         * elflint.c (check_symtab): Correctly determine size of GOT section.
2214
2215 2005-01-19  Ulrich Drepper  <drepper@redhat.com>
2216
2217         * ld.c: Remove unnecessary more_help function.  Print bug report
2218         address using argp.
2219         * strip.c: Likewise.
2220         * size.c: Likewise.
2221         * nm.c: Likewise.
2222         * readelf.c: Likewise.
2223         * elflint.c: Likewise.
2224
2225         * elflint.c (main): Don't check for parameter problems here.
2226         (parse_opt): Do it here, where we get informed about some of them
2227         anyway.
2228
2229         * readelf.c (main): Don't check for parameter problems here.
2230         (parse_opt): Do it here, where we get informed about some of them
2231         anyway.
2232
2233 2005-01-11  Ulrich Drepper  <drepper@redhat.com>
2234
2235         * strip.c: Update copyright year.
2236         * readelf.c: Likewise.
2237         * size.c: Likewise.
2238         * nm.c: Likewise.
2239         * ld.c: Likewise.
2240         * elflint.c: Likewise.
2241
2242         * elflint.c (check_symtab): Don't warn about wrong size for
2243         _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2244
2245 2004-10-05  Ulrich Drepper  <drepper@redhat.com>
2246
2247         * readelf.c (print_phdr): In section mapping, also indicate
2248         sections in read-only segments.
2249
2250 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
2251
2252         * readelf.c: Make compile with gcc 4.0.
2253         * strip.c: Likewise.
2254
2255 2004-08-16  Ulrich Drepper  <drepper@redhat.com>
2256
2257         * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2258         allocate to work around gcc 3.4 bug.
2259
2260 2004-01-25  Ulrich Drepper  <drepper@redhat.com>
2261
2262         * ldlex.l (invalid_char): Better error message.
2263
2264 2004-01-23  Ulrich Drepper  <drepper@redhat.com>
2265
2266         * readelf.c: Print SHT_GNU_LIBLIST sections.
2267
2268         * none_ld.c: New file.
2269
2270 2004-01-21  Ulrich Drepper  <drepper@redhat.com>
2271
2272         * Makefile.am: Enable building of machine specific linker.
2273
2274 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2275
2276         * Makefile.am: Support building with mudflap.
2277
2278         * i386_ld.c: Fix warnings gcc 3.4 spits out.
2279         * ldgeneric.c: Likewise.
2280         * ldscript.y: Likewise.
2281         * readelf.c: Likewise.
2282         * strip.c: Likewise.
2283
2284         * readelf.c (print_debug_line_section): Determine address size
2285         correctly.
2286
2287 2004-01-19  Ulrich Drepper  <drepper@redhat.com>
2288
2289         * readelf.c (print_phdr): Show which sections are covered by the
2290         PT_GNU_RELRO entry.
2291
2292         * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2293
2294         * readelf.c (print_debug_macinfo_section): Implement.
2295
2296 2004-01-18  Ulrich Drepper  <drepper@redhat.com>
2297
2298         * readelf.c (print_debug_line_section): Implement.
2299
2300 2004-01-17  Ulrich Drepper  <drepper@redhat.com>
2301
2302         * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2303         * src/ld.c: Likewise.
2304         * src/nm.c: Likewise.
2305         * src/readelf.c: Likewise.
2306         * src/size.c: Likewise.
2307         * src/strip.c: Likewise.
2308
2309         * strip.c: Add a few more unlikely.  Reduce scope of some variables.
2310
2311         * Makefile.am: Support building with mudflap.
2312
2313 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2314
2315         * readelf.c (print_debug_info_section): Free dies memory.
2316
2317         * readelf.c: Print .debug_info section content.
2318
2319 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
2320
2321         * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2322
2323 2004-01-12  Ulrich Drepper  <drepper@redhat.com>
2324
2325         * readelf.c (print_debug_aranges): Implement using libdw.
2326
2327 2004-01-11  Ulrich Drepper  <drepper@redhat.com>
2328
2329         * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2330
2331         * readelf.c: Use libdw instead of libdwarf.  Not all of the old
2332         behavior is available yet.
2333         * Makefile.am: Link readelf with libdw.  Remove libdwarf include path.
2334
2335 2004-01-09  Ulrich Drepper  <drepper@redhat.com>
2336
2337         * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2338
2339         * nm.c: Implement getting information about local variables.
2340
2341 2004-01-07  Ulrich Drepper  <drepper@redhat.com>
2342
2343         * nm.c: Read also debug information for local symbols.
2344
2345 2004-01-05  Ulrich Drepper  <drepper@redhat.com>
2346
2347         * nm.c: Shuffle dwarf handling code around so the maximum column
2348         width can be computed ahead of printing.  Avoid collection symbols
2349         which are not printed anyway.
2350
2351         * nm.c: Rewrite dwarf handling to use libdw.
2352         * Makefile.am (AM_CFLAGS): Add -std parameter.
2353         (INCLUDES): Find header in libdw subdir.
2354         (nm_LDADD): Replace libdwarf with libdw.
2355
2356         * elflint.c: Update copyright year.
2357         * readelf.c: Likewise.
2358         * size.c: Likewise.
2359         * strip.c: Likewise.
2360         * nm.c: Likewise.
2361
2362 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
2363
2364         * strip.c (process_file): Close file before returning.
2365
2366 2003-11-19  Ulrich Drepper  <drepper@redhat.com>
2367
2368         * readelf.c (handle_dynamic): Make column for tag name wider.
2369
2370 2003-09-29  Ulrich Drepper  <drepper@redhat.com>
2371
2372         * readelf.c (handle_dynamic): Always terminate tag name with a space.
2373
2374 2003-09-25  Ulrich Drepper  <drepper@redhat.com>
2375
2376         * strip.c (process_file): Don't mmap the input file, we modify the
2377         data structures and don't want the change end up on disk.
2378
2379 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
2380
2381         * unaligned.h (union u_2ubyte_unaligned,
2382         union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2383         packed attribute.
2384         (add_2ubyte_unaligned, add_4ubyte_unaligned,
2385         add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2386         Read/store value through _ptr->u instead of *_ptr.
2387
2388 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
2389
2390         * size.c (show_sysv): Change type of maxlen to int.
2391
2392         * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2393         buckets.
2394
2395         * i386_ld.c: Many many fixes and extensions.
2396         * ld.c: Likewise.
2397         * ldgeneric.c: Likewise.
2398
2399 2003-08-16  Ulrich Drepper  <drepper@redhat.com>
2400
2401         * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2402         the reference is from another DSO.
2403
2404 2003-08-15  Ulrich Drepper  <drepper@redhat.com>
2405
2406         * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2407         point is found when creating a DSO.
2408
2409 2003-08-14  Ulrich Drepper  <drepper@redhat.com>
2410
2411         * ld.c (main): Always call FLAG_UNRESOLVED.
2412         * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2413         undefined symbols if not creating DSO or ld_state.nodefs is not set.
2414
2415 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
2416
2417         * Makefile.in: Depend on libebl.a, not libebl.so.
2418
2419         * ld.c (main): Mark stream for linker script as locked by caller.
2420         (read_version_script): Likewise.
2421         * ldlex.c: Define fread and fwrite to _unlocked variant.
2422
2423         * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2424         target_bswap_32.
2425         * unaligned.h: Define target_bswap_16, target_bswap_32, and
2426         target_bswap_64.
2427         (store_2ubyte_unaligned, store_4ubyte_unaligned,
2428         store_8ubyte_unaligned): Define using new macros.
2429
2430 2003-08-12  Ulrich Drepper  <drepper@redhat.com>
2431
2432         * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2433         possibly unaligned memory.  Support use of big endian machines.
2434
2435 2003-08-11  Ulrich Drepper  <drepper@redhat.com>
2436
2437         * Moved to CVS archive.