1 2013-04-24 Mark Wielaard <mjw@redhat.com>
3 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
5 2013-03-25 Mark Wielaard <mjw@redhat.com>
7 * readelf.c (argp_options): Add decodedline.
8 (decodedline): New boolean initialized to false.
9 (parse_opt): Set decodedline when arg is decodedline.
10 (print_decoded_line_section): New function.
11 (print_debug_line_section): Call print_decoded_line_section when
14 2013-03-25 Mark Wielaard <mjw@redhat.com>
16 * readelf.c (argp_option): Add decodedaranges.
17 (decodedaranges): New boolean initialized to false.
18 (parse_opt): Set decodedaranges when arg is decodedaranges.
19 (print_debug_aranges_section): Reimplemented and original
20 implementation renamed to...
21 (print_decoded_aranges_section): this.
23 2013-03-25 Mark Wielaard <mjw@redhat.com>
25 * readelf.c (attrcb_args): Add Dwarf_Die.
26 (attr_callback): When highpc is in constant form also print as
28 (print_debug_units): Set args.die.
30 2013-03-19 Mark Wielaard <mjw@redhat.com>
32 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
34 2013-03-18 Mark Wielaard <mjw@redhat.com>
36 * readelf.c (print_gdb_index_section): Accept version 8.
38 2013-03-01 Mark Wielaard <mjw@redhat.com>
40 * findtextrel.c (process_file): Release ELF and close file when not
41 text relocations are found.
42 * strip.c (handle_elf): Track memory used for .debuglink section data
45 2013-02-24 Mark Wielaard <mjw@redhat.com>
47 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
48 allowed to have out of section values because of GNU ld bugs.
50 2013-02-06 Mark Wielaard <mjw@redhat.com>
52 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
53 list of symbols allowed to have out of section values because of
54 GNU ld bugs in either .symtab or .dynsym, but only when they are
57 2013-01-24 Mark Wielaard <mjw@redhat.com>
59 * readelf.c (argp_option): Add unresolved-address-offsets, U.
60 (print_unresolved_addresses): New static.
61 (parse_opt): Handle 'U', set print_unprocessed_values.
62 (format_dwarf_addr): Take and handle new raw argument.
63 (print_ops): Call format_dwarf_addr with raw offset values.
64 (print_debug_ranges_section): Likewise.
65 (print_debug_frame_section): Likewise.
66 (attr_callback): Likewise.
67 (print_debug_line_section): Likewise.
68 (print_debug_loc_section): Likewise.
69 (print_gdb_index_section): Likewise.
71 2013-01-18 Mark Wielaard <mjw@redhat.com>
73 * readelf.c (struct listptr): Add base Dwarf_Addr field.
74 (compare_listptr): Warn for same offset with different base.
75 (notice_listptr): Take base argument and set it.
76 (skip_listptr_hole): Likewise.
77 (struct attrcb_args): Removed unused cu_offset field.
78 Add cu_base Dwarf_Addr field.
79 (attr_callback): Call notice_listptr with cbargs->cu_base.
80 (print_debug_units): Set args.cu_base.
81 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
82 (print_debug_loc_section): Likewise.
84 2013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
86 * readelf.c (handle_core_items): Limit special repeated items handling
87 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
89 2012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
91 * readelf.c (ELF_INPUT_SECTION): New argp key value.
92 (argp_option): Add elf-section.
93 (elf_input_section): New static.
94 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
95 (open_input_section): New function.
96 (process_file): Call open_input_section if elf_input_section set.
98 2013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
100 ar.c (do_oper_delete): Fix num passed to memset.
102 2012-12-21 Mark Wielaard <mjw@redhat.com>
104 * readelf.c (print_debug_frame_section): Adjust FDE start address
105 if pcrel before feeding it to format_dwarf_addr.
107 2012-12-21 Mark Wielaard <mjw@redhat.com>
109 * addr2line.c (main): Call dwfl_end.
111 2012-12-11 Roland McGrath <roland@hack.frob.com>
113 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
115 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
117 2012-10-16 Mark Wielaard <mjw@redhat.com>
119 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
120 calculated beginning after the operand and 2-byte constant.
122 2012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
124 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
125 (WRAP_COLUMN): ... here.
126 (print_core_item): Remove parameter format_max. Update function
127 comment. Replace FORMAT_MAX by the real output width.
128 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
129 calls of print_core_item, remove variable maxfmt, change
130 ITEM_WRAP_COLUMN to WRAP_COLUMN.
131 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
132 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
134 2012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
136 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
137 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
139 2012-08-27 Mark Wielaard <mjw@redhat.com>
141 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
143 2012-08-27 Mark Wielaard <mjw@redhat.com>
145 * readelf.c (register_info): Handle loc == NULL.
147 2012-08-22 Jeff Kenton <jkenton@tilera.com>
149 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
151 2012-08-16 Mark Wielaard <mjw@redhat.com>
153 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
154 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
156 (dwarf_attr_name): Likewise.
157 (dwarf_form_name): Likewise.
158 (dwarf_lang_name): Likewise.
159 (dwarf_inline_name): Likewise.
160 (dwarf_encoding_name): Likewise.
161 (dwarf_access_name): Likewise.
162 (dwarf_visibility_name): Likewise.
163 (dwarf_virtuality_name): Likewise.
164 (dwarf_identifier_case_name): Likewise.
165 (dwarf_calling_convention_name): Likewise.
166 (dwarf_ordering_name): Likewise.
167 (dwarf_discr_list_name): Likewise.
168 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
169 (attr_callback): Call new dwarf_foobar_name instead of old
170 dwarf_foobar_string functions.
171 (dwarf_tag_string): New function using known-dwarf.h macros.
172 (dwarf_attr_string): Likewise.
173 (dwarf_form_string): Likewise.
174 (dwarf_lang_string): Likewise.
175 (dwarf_inline_string): Likewise.
176 (dwarf_encoding_string): Likewise.
177 (dwarf_access_string): Likewise.
178 (dwarf_visibility_string): Likewise.
179 (dwarf_virtuality_string): Likewise.
180 (dwarf_identifier_case_string): Likewise.
181 (dwarf_calling_convention_string): Likewise.
182 (dwarf_ordering_string): Likewise.
183 (dwarf_discr_list_string): Likewise.
184 (dwarf_locexpr_opcode_string): Likewise.
186 2012-06-27 Mark Wielaard <mjw@redhat.com>
188 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
189 DW_FORM_GNU_strp_alt.
190 (attr_callback): Likewise.
192 2012-07-30 Petr Machata <pmachata@redhat.com>
194 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
195 corresponding printf) so that those that are referenced by only
196 one of the formatting strings are at the end.
198 2012-07-29 Mark Wielaard <mjw@redhat.com>
200 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
201 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
203 2012-07-19 Mark Wielaard <mjw@redhat.com>
205 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
207 2012-07-11 Mark Wielaard <mjw@redhat.com>
209 * readelf.c (options): Add macro to help of debug-dump.
210 (section_e): Add section_macro.
211 (section_all): Add section_macro.
212 (parse_opt): Handle macro.
213 (print_debug_macro_section): New function.
214 (print_debug): Add NEW_SECTION (macro).
216 2012-07-10 Mark Wielaard <mjw@redhat.com>
218 * readelf.c (print_gdb_index_section): Add version 7 support.
219 Keep track of cu_nr. Print kind and static/global flag for each
220 symbol. When a symbol is in the TU list add 'T'.
222 2012-06-26 Mark Wielaard <mjw@redhat.com>
224 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
226 2012-06-22 Mark Wielaard <mjw@redhat.com>
228 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
229 for gcc 4.7 -Wformat.
231 2012-05-09 Roland McGrath <roland@hack.frob.com>
233 * elflint (check_sections): Allow zero sized sections at (filesz) end
234 of segment. And make check overflow-proofed.
236 2012-04-24 Mark Wielaard <mjw@redhat.com>
238 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
239 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
241 2012-03-28 Roland McGrath <roland@hack.frob.com>
243 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
245 2012-03-28 Mark Wielaard <mjw@redhat.com>
247 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
249 (print_debug_str_section): Likewise.
251 2012-03-21 Mark Wielaard <mjw@redhat.com>
253 * readelf.c (print_gdb_index_section): Accept version 6.
255 2012-01-31 Mark Wielaard <mjw@redhat.com>
257 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
259 2012-01-21 Ulrich Drepper <drepper@gmail.com>
261 * addr2line.c: Update copyright year.
263 * elfcmp.c: Likewise.
264 * elflint.c: Likewise.
265 * findtextrel.c: Likewise.
268 * objdump.c: Likewise.
269 * ranlib.c: Likewise.
270 * readelf.c: Likewise.
272 * strings.c: Likewise.
274 * unstrip.c: Likewise.
276 * nm.c (argp_children): Define.
277 (argp): Hook up argp_children.
278 (handle_ar): Optimize puts call.
279 (show_symbols_bsd): Use positional parameters to also print color
280 codes. Don't print STT_FILE symbols.
281 * objdump.c (options): Improve help text.
282 (argp_children): Define.
283 (argp): Hook up argp_children.
284 (disasm_info): Add elements for color codes.
285 (disasm_output): Print color codes as well.
286 (show_disasm): Set up disasm_info data for callback.
288 2012-01-20 Roland McGrath <roland@hack.frob.com>
290 * arlib-argp.c (arlib_deterministic_output): Initialize from
292 (help_filter): New function.
295 * ar.c (main): Handle oper_none as usage error.
297 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
299 * ranlib.c (argp): Use arlib_argp_children.
301 * arlib.c (arlib_init): Obey arlib_deterministic_output.
303 * arlib-argp.c: New file.
304 * Makefile.am (libar_a_SOURCES): Add it.
305 * arlib.h (arlib_deterministic_output, arlib_argp_children):
306 Declare new variables.
307 * ar.c (deterministic_output): Variable removed.
308 (do_oper_insert): Use arlib_deterministic_output instead.
309 (options, parse_opt): Don't handle -D here. Add group numbers.
310 (argp): Use arlib_argp_children.
312 2011-12-20 Roland McGrath <roland@hack.frob.com>
314 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
315 Reported by Karel Klic <kklic@redhat.com>.
317 2011-11-05 Roland McGrath <roland@hack.frob.com>
319 * ar.c (deterministic_output): New flag variable.
320 (options, parse_opt): Grok -D to set it.
321 (do_oper_insert): When set, use zero from mtime, uid, and gid.
323 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
325 2011-10-04 Marek Polacek <mpolacek@redhat.com>
327 * readelf.c (register_info): Assume the right size of an array.
329 2011-10-03 Ulrich Drepper <drepper@gmail.com>
331 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
332 but don't show it in help anymore.
333 (mark_special): Renamed from mark_weak.
335 (class_type_char): Take additional parameters for ELF file and ELF
336 header. Treat TLS symbols like objects.
337 In case of D symbols, show u for unique symbols, R for symbols in
338 read-only sections, B for symbols in BSS sections.
339 (show_symbols_bsd): Take additional parameters for ELF file and ELF
340 header. Adjust for class_type_char change. Show TLS symbols with
341 @ after them in case --mark-special is selected.
342 (show_symbols_posix): Likewise.
343 (show_symbols): Adjust calls to show_symbols_bsd and
345 (show_symbols_sysv): Avoid printing adress and size for undefined
346 symbols. Don't print initial special entry and section entries.
348 2011-10-02 Ulrich Drepper <drepper@gmail.com>
350 * Makefile.am (demanglelib): Define.
351 (nm_LDADD): Add demanglelib.
352 * nm.c (options): Add -C option.
353 (demangle): Define as global variable.
354 (parse_opt): Recognize -C.
355 (show_symbols_sysv): Handle demangling.
356 (show_symbols_bad): Likewise.
357 (show_symbols_posix): Likewise.
358 (show_symbols): Likewise.
360 2011-07-09 Roland McGrath <roland@hack.frob.com>
362 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
364 * ar.c (parse_opt): Grok -u.
366 2011-05-30 Mark Wielaard <mjw@redhat.com>
368 * strip.c (relocate): Make offset check overflow-proof.
370 2011-05-23 Mark Wielaard <mjw@redhat.com>
372 * strip.c (relocate): Take new arguments is_rela to indicate
373 whether the relocation is from a SHT_REL or SHT_RELA section.
374 Relocate against any debug section symbol, not just STT_SECTION
375 symbols. For SHT_REL relocations, fetch addend from offset and
376 add it to symbol value if not zero.
378 2011-05-23 Mark Wielaard <mjw@redhat.com>
380 * strip.c (OPT_RELOC_DEBUG): New option.
381 (argp_option): Add new --reloc-debug-sections option.
382 (main): Check new option.
383 (parse_opt): Likewise.
384 (handle_elf): Remove any relocations between debug sections
385 in ET_REL for the debug file when requested.
387 2011-05-18 Mark Wielaard <mjw@redhat.com>
389 * strip.c (handle_elf): Make sure all sections of a removed group
390 section are removed too. Don't discard SHT_GROUP sections, copy
391 section table before it gets modified. Section group signature
392 symbols don't have to be retained.
394 2011-05-16 Jakub Jelinek <jakub@redhat.com>
396 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
397 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
398 and DW_OP_GNU_reinterpret.
400 2011-05-17 Mark Wielaard <mjw@redhat.com>
402 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
403 DW_TAG_GNU_call_site_parameter return strings.
405 2011-05-11 Marek Polacek <mpolacek@redhat.com>
407 * nm.c (show_symbols_sysv): Remove unused if/else, remove
408 unused `prefix' and `fname' parameters.
410 2011-05-07 Marek Polacek <mpolacek@redhat.com>
412 * unstrip.c (compare_sections_nonrel): Mark this function as static.
414 2011-04-26 Mark Wielaard <mjw@redhat.com>
416 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
419 2011-04-14 Mark Wielaard <mjw@redhat.com>
421 * readelf.c (options): Add gdb_index.
422 (section_e): Define section_gdb_index.
423 (parse_opt): Recognize gdb_index debug-dump argument.
424 (print_gdb_index_section): New function.
425 (print_debug): Add gdb_index to debug_sections.
427 2011-03-24 Petr Machata <pmachata@redhat.com>
429 * readelf.c (print_debug_line_section): Emit initial space for all
430 opcode lines. Print offset in front of each opcode.
432 2011-03-22 Marek Polacek <mpolacek@redhat.com>
434 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
436 2011-03-22 Mark Wielaard <mjw@redhat.com>
438 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
439 and DW_TAG_GNU_call_site_parameter.
440 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
441 DW_AT_GNU_call_site_data_value,
442 DW_AT_GNU_call_site_target,
443 DW_AT_GNU_call_site_target_clobbered,
445 DW_AT_GNU_all_tail_call_sites,
446 DW_AT_GNU_all_call_sites,
447 and DW_AT_GNU_all_source_call_sites.
448 (print_ops): Handle DW_OP_GNU_entry_value.
449 (attr_callback): Handle DW_AT_GNU_call_site_value,
450 DW_AT_GNU_call_site_data_value,
451 DW_AT_GNU_call_site_target,
452 and DW_AT_GNU_call_site_target_clobbered.
454 2011-03-10 Mark Wielaard <mjw@redhat.com>
456 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
458 2011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
460 * readelf.c (reset_listptr): Clear TABLE->TABLE.
462 2011-02-25 Mark Wielaard <mjw@redhat.com>
464 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
465 (dwarf_form_string): Properly format and return unknown form.
467 2011-02-23 Roland McGrath <roland@redhat.com>
469 * readelf.c (section_name): New function.
470 (print_debug_abbrev_section): Use it instead of constant.
471 (print_debug_aranges_section): Likewise.
472 (print_debug_ranges_section): Likewise.
473 (print_debug_units): Likewise.
474 (print_debug_line_section): Likewise.
475 (print_debug_loc_section): Likewise.
476 (print_debug_macinfo_section): Likewise.
477 (print_debug_pubnames_section): Likewise.
478 (print_debug_str_section): Likewise.
479 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
480 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
481 (print_debug_str_section): Likewise.
483 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
485 2011-02-11 Roland McGrath <roland@redhat.com>
487 * elfcmp.c (verbose): New variable.
488 (options, parse_opt): Grok -l/--verbose to set it.
489 (main): Under -l, keep going after first difference.
491 * elfcmp.c (ignore_build_id): New variable.
492 (options, parse_opt): Grok --ignore-build-id to set it.
493 (main): For SHT_NOTE sections, compare note details rather than raw
494 bytes. Under --ignore-build-id, don't complain about differing build
495 ID contents if lengths match.
497 2011-02-08 Roland McGrath <roland@redhat.com>
499 * ldscript.y (filename_id_star): Remove unused variable.
501 * unstrip.c (copy_elided_sections): Remove unused variable.
503 * elflint.c (check_dynamic): Remove unused variables.
505 * elflint.c (check_symtab): Warn about missing xndx section only once.
507 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
509 2011-01-06 Roland McGrath <roland@redhat.com>
511 * strip.c (handle_elf): Under --strip-sections, remove all
512 non-allocated sections and never generate .gnu_debuglink.
514 2011-01-04 Roland McGrath <roland@redhat.com>
516 * strip.c (remove_shdrs): New variable.
517 (options, parse_opt): Grok --strip-sections to set it.
518 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
520 2010-11-10 Roland McGrath <roland@redhat.com>
522 * findtextrel.c (process_file): Don't assume order of sections.
523 Reported by Mike Hommey <mh@glandium.org>.
525 2010-07-26 Roland McGrath <roland@redhat.com>
527 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
529 2010-08-30 Roland McGrath <roland@redhat.com>
531 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
532 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
534 (struct listptr, struct listptr_table): New types.
535 (compare_listptr, reset_listptr, sort_listptr): New functions.
536 (notice_listptr, skip_listptr_hole): New functions.
537 (struct attrcb_args): Add silent member.
538 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
539 Suppress output if silent, but still call notice_listptr.
540 (print_debug_units): Suppress output if section_info not requested.
541 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
542 (print_debug_ranges_section): Likewise.
543 (print_debug): Call reset_listptr on both tables.
545 * readelf.c (print_debug_ranges_section): Print empty list.
546 (print_debug_loc_section): Likewise.
548 * readelf.c (print_debug_loc_section): Check for bogus length
549 before calling print_ops.
550 (print_ops): Check harder for bogus data that would read off end.
552 2010-08-11 Roland McGrath <roland@redhat.com>
554 * readelf.c (for_each_section_argument): Process all sections with
555 matching name, not just the first.
557 2010-07-26 Roland McGrath <roland@redhat.com>
559 * readelf.c (print_ops): Take new argument for CU version.
560 Fix DW_OP_call_ref decoding to depend on it.
561 (print_debug_loc_section): Update caller.
562 (print_cfa_program): Take new argument, pass it down.
563 (print_debug_frame_section): Update caller.
564 (struct attrcb_args): New member version.
565 (print_debug_units): Initialize it.
567 2010-07-02 Roland McGrath <roland@redhat.com>
569 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
572 2010-06-30 Roland McGrath <roland@redhat.com>
574 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
575 Ignore st_size for a non-S_ISREG file descriptor.
576 (read_block): Move assert after no-mmap bail-out.
577 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
579 2010-06-22 Roland McGrath <roland@redhat.com>
581 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
583 2010-06-21 Roland McGrath <roland@redhat.com>
585 * readelf.c (dwarf_tag_string): Handle new v4 tags.
586 (dwarf_attr_string): Add new attributes.
587 (dwarf_tag_string): Handle DW_TAG_GNU_*.
589 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
590 (print_cfa_program): Likewise.
592 2010-06-20 Roland McGrath <roland@redhat.com>
594 * readelf.c (print_debug_units): New function, broken out of ...
595 (print_debug_info_section): ... here. Call it.
596 (print_debug_types_section): New function.
597 (enum section_e): Add section_types alias for section_info.
598 (print_debug): Add types to the sections table.
600 * readelf.c (print_debug_frame_section): Handle version 4 format.
602 * readelf.c (print_debug_line_section): Handle version 4 format.
604 2010-06-14 Roland McGrath <roland@redhat.com>
606 * unstrip.c (copy_elided_sections): Make sure all sections' data have
607 been read in before we write anything out.
609 2010-06-04 Roland McGrath <roland@redhat.com>
611 * unstrip.c (update_shdr): New function.
612 (update_sh_size): Call it instead of gelf_update_shdr.
613 (adjust_relocs, add_new_section_symbols): Likewise.
614 (new_shstrtab, copy_elided_sections): Likewise.
616 * unstrip.c (copy_elided_sections): Bail if stripped file has more
617 sections than unstripped file, rather than getting confused later.
619 2010-06-01 Roland McGrath <roland@redhat.com>
621 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
622 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
623 DW_FORM_sec_offset, DW_FORM_ref_sig8.
625 * readelf.c (print_debug): Don't bail if libdw setup fails.
626 Suppress complaint if we only want .eh_frame anyway.
628 2010-05-28 Ulrich Drepper <drepper@redhat.com>
630 * readelf.c (attr_callback): Also print form information.
632 2010-05-19 Roland McGrath <roland@redhat.com>
634 * addr2line.c (find_symbol): Short-circuit on empty name.
635 (handle_address): Handle SYMBOL with no +OFFSET.
637 2010-05-08 Roland McGrath <roland@redhat.com>
639 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
640 Use that for DW_OP_call_ref, not ADDRSIZE.
641 (print_cfa_program): Update caller.
642 (struct attrcb_args): Add offset_size field.
643 (attr_callback): Use it for print_ops call.
644 (print_debug_info_section): Initialize it.
645 (print_ops): Likewise.
647 2010-04-14 Roland McGrath <roland@redhat.com>
649 * readelf.c (handle_core_item): Fix bitmask printing.
651 2010-04-06 Roland McGrath <roland@redhat.com>
653 * ld.c (options): Fix some typos in messages.
654 * elflint.c (check_scn_group, check_group): Likewise.
655 * ldscript.y (add_id_list): Likewise.
656 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
657 before translated string containing a literal %.
659 2010-02-26 Roland McGrath <roland@redhat.com>
661 * readelf.c (process_file): Don't leak an fd in failure case.
663 2010-02-15 Roland McGrath <roland@redhat.com>
665 * Makefile.am: Use config/eu.am for common stuff.
667 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
668 mismatch in comparison.
670 2010-02-02 Roland McGrath <roland@redhat.com>
672 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
673 (read_encoded): Likewise.
674 (print_debug_frame_section): Check for bogus augmentation length.
675 For P augmentation, use read_encoded, print the encoding description,
676 and use hex for unsigned values.
678 2010-01-15 Roland McGrath <roland@redhat.com>
680 * ar.c: Include <sys/stat.h>.
681 * elflint.c: Likewise.
682 * readelf.c: Likewise.
684 * unstrip.c: Likewise
686 2010-01-07 Roland McGrath <roland@redhat.com>
688 * readelf.c (print_ehdr): Handle PN_XNUM.
689 (phnum): New static variable.
690 (process_elf_file): Set it with elf_getphdrnum.
691 (print_phdr): Use phnum instead of EHDR->e_phnum.
692 (print_dynamic, handle_notes): Likewise.
693 (handle_relocs_rel, handle_relocs_rela): Likewise.
695 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
697 * elflint.c (phnum): New static variable.
698 (check_elf_header): Set it, handling PN_XNUM.
699 Use that in place of EHDR->e_phnum throughout.
700 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
701 (unknown_dependency_p, check_sections, check_program_header): Likewise.
703 2010-01-05 Roland McGrath <roland@redhat.com>
705 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
706 DW_AT_GNU_template_name.
708 2010-01-04 Roland McGrath <roland@redhat.com>
710 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
711 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
712 (handle_core_item): Handle .format of '\n' as \n-separated strings.
714 * readelf.c (implicit_debug_sections): New variable.
715 (parse_opt): Set it instead of print_debug_sections for -a.
716 OR them together for print_debug check.
717 (print_debug): OR them together for section check.
719 * readelf.c (options): Repartition into set implied by -a and others.
720 Correct -a text to match reality.
722 * readelf.c (struct section_argument): Add bool member 'implicit'.
723 (parse_opt): Set it for -a cases, clear it for -x args.
724 (for_each_section_argument): Don't complain about a missing section by
725 name if it's implicit.
727 2009-11-16 Roland McGrath <roland@redhat.com>
729 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
730 sections, just as dump_data_section already does.
732 2009-09-21 Ulrich Drepper <drepper@redhat.com>
734 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
735 set for .comment section.
736 Patch by Mark Wielaard <mjw@redhat.com>.
738 2009-09-08 Roland McGrath <roland@redhat.com>
740 * ar.c (main): Fix typo in message format.
742 2009-08-21 Roland McGrath <roland@redhat.com>
744 * readelf.c (attr_callback): Use print_block only when we don't use
747 2009-08-14 Roland McGrath <roland@redhat.com>
749 * ar.c (do_oper_extract): Use pathconf instead of statfs.
751 2009-08-01 Ulrich Drepper <drepper@redhat.com>
753 * debugpred.h: Add two most const.
755 2009-07-26 Mark Wielaard <mjw@redhat.com>
757 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
759 2009-07-25 Mark Wielaard <mjw@redhat.com>
761 * Makefile.am (addr2line_LDADD): Add $(libelf).
763 2009-07-24 Roland McGrath <roland@redhat.com>
765 * readelf.c (print_block): New function.
767 (attr_callback): Use it for DW_FORM_block* forms.
769 2009-07-20 Mark Wielaard <mjw@redhat.com>
771 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
772 and DW_OP_stack_value.
774 2009-07-14 Ulrich Drepper <drepper@redhat.com>
776 * elflint.c (check_elf_header): Allow Linux ABI.
777 (check_symtab): Handle STB_GNU_UNIQUE.
779 2009-07-08 Mark Wielaard <mjw@redhat.com>
781 * readelf.c (attr_callback): Handle DW_Form constants for
782 DW_AT_data_member_location.
784 2009-07-06 Roland McGrath <roland@redhat.com>
786 * readelf.c (register_info): New function. Handle unknown register #s.
787 (print_cfa_program): Use it.
788 (handle_core_register, handle_core_registers): Likewise.
790 2009-06-28 Roland McGrath <roland@redhat.com>
792 * readelf.c (print_address_names): New static variable.
793 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
794 (format_dwarf_addr): Don't look up name if !print_address_names.
796 2009-06-13 Ulrich Drepper <drepper@redhat.com>
798 * ldgeneric.c: Don't use deprecated libelf functions.
800 * objdump.c: Likewise.
801 * readelf.c: Likewise.
804 * unstrip.c: Likewise.
805 * ld.h: Fix up comment.
807 2009-06-01 Ulrich Drepper <drepper@redhat.com>
809 * readelf.c (print_relocs): Expect ELF header argument and pass on
810 to handle_relocs_rel* functions. Adjust caller.
811 (handle_relocs_rel): Add ELF header argument. Add special case for
812 the IRELATIVE relocations in statically linked executables.
813 (handle_relocs_rela): Likewise.
815 2009-04-29 Ulrich Drepper <drepper@redhat.com>
817 * elflint.c (check_symtab): Add tests of st_other field.
819 2009-04-23 Ulrich Drepper <drepper@redhat.com>
821 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
823 2009-04-20 Roland McGrath <roland@redhat.com>
825 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
826 of inline call sites.
828 * addr2line.c (just_section): New variable.
829 (adjust_to_section): New function, broken out of ...
830 (handle_address): ... here.
831 (options, parse_opt): Add -j/--section=NAME to set it.
833 2009-04-15 Roland McGrath <roland@redhat.com>
835 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
836 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
838 2009-04-14 Roland McGrath <roland@redhat.com>
840 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
841 like SHT_GNU_ATTRIBUTES.
843 * readelf.c (handle_core_registers): Fix error message.
845 * strip.c (handle_elf: check_preserved): Don't note any change when
846 .debug_data is already filled from a previous pass.
848 2009-02-05 Ulrich Drepper <drepper@redhat.com>
850 * objdump.c (show_relocs_x): Minor cleanups.
852 * readelf.c (print_cfa_program): Correct a few labels.
853 Print first DW_CFA_expression and DW_CFA_val_expression parameter
856 2009-02-01 Ulrich Drepper <drepper@redhat.com>
858 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
860 (show_relocs_x): ...here. New function.
861 (show_relocs): Better spacing in output.
863 * objdump.c (show_relocs_rela): Show offsets as signed values.
865 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
866 Improve some error messages.
867 Use program_invocation_short_name instead of AR macro.
868 * Makefile.am (CFLAGS_ar): Remove.
869 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
870 * objdump.c (parse_opt): Likewise.
871 * readelf.c (parse_opt): Likewise.
873 2009-01-27 Roland McGrath <roland@redhat.com>
875 * readelf.c (print_ops): Notice short length, don't overrun buffer
876 (still need to fix LEB128).
878 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
880 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
882 2009-01-24 Ulrich Drepper <drepper@redhat.com>
884 * readelf.c (print_debug_frame_section): Fix computation of vma_base
885 for PC-relative mode.
887 2009-01-23 Ulrich Drepper <drepper@redhat.com>
889 * size.c (process_file): When handling archive, close file descriptor
890 here. For unknown file format also close file descriptor.
891 (handle_ar): Don't close file descriptor here.
893 * readelf.c (parse_opt): Move code to add to dump_data_sections and
894 string_sections list in local function add_dump_section. Adjust 'x'
895 key handling. For 'a' key add .strtab, .dynstr, and .comment section
896 to string_sections list.
898 2009-01-22 Roland McGrath <roland@redhat.com>
900 * readelf.c (print_phdr): Don't print section mapping when no sections.
902 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
904 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
905 and reset it only for the 'true' cases.
907 * Makefile.am (addr2line_no_Wformat): New variable.
909 * readelf.c (print_debug_frame_section): Use t instead of j formats
910 for ptrdiff_t OFFSET.
912 2009-01-21 Ulrich Drepper <drepper@redhat.com>
914 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
915 test. Handle debuginfo files.
916 (check_exception_data): First sanity test.
918 2009-01-17 Ulrich Drepper <drepper@redhat.com>
920 * readelf.c (print_debug_exception_table): Show target of ar_disp
923 * elflint.c (check_program_header): Add most consistency checks for
924 PT_GNU_EH_FRAME entry.
926 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
927 ARGP_PROGRAM_BUG_ADDRESS_DEF.
929 * elfcmp.c: Likewise.
930 * elflint.c: Likewise.
931 * findtextrel.c: Likewise.
934 * objdump.c: Likewise.
935 * ranlib.c: Likewise.
936 * readelf.c: Likewise.
939 * strings.c: Likewise.
941 * unstrip.c: Likewise.
943 2009-01-16 Ulrich Drepper <drepper@redhat.com>
945 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
946 matches .eh_frame_hdr section, if it is available. Also check that
947 the segment is allocated, not writable, not executable.
949 * readelf.c: Add -e option. Dump exception and unwind related
950 sections. Add -e to -a.
951 (print_encoding_base): Handle DW_EH_PE_omit.
952 (print_debug_exception_table): Beginning of support.
953 (print_debug): Hook up print_debug_exception_table for
954 .gcc_except_table sections.
956 * readelf.c (print_debug_frame_section): Some fixes for last change.
958 2009-01-15 Ulrich Drepper <drepper@redhat.com>
960 * readelf.c (print_encoding): Now a toplevel function.
961 (print_relinfo): Likewise.
962 (print_encoding_base): Broken out of print_debug_frame_section.
963 (print_debug_frame_section): Print different header for .eh_frame
964 sections. Fix recognition of matching CIEs in .debug_frame sections.
965 Print absolute offset for PC-relative FDE locations. Don't print
966 table header for FDEs if the table is empty.
967 (read_encoded): New function.
968 (print_debug_frame_hdr_section): New function.
969 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
972 * readelf.c (handle_relocs_rel): Print section number.
973 (print_debug_abbrev_section): Likewise.
974 (print_debug_aranges_section): Likewise.
975 (print_debug_ranges_section): Likewise.
976 (print_debug_info_section): Likewise.
977 (print_debug_line_section): Likewise.
978 (print_debug_loc_section): Likewise.
979 (print_debug_macinfo_section): Likewise.
980 (print_debug_pubnames_section): Likewise.
981 (print_debug_str_section): Likewise.
983 2009-01-10 Ulrich Drepper <drepper@redhat.com>
985 * strings.c (read_block): Fix typo in error message string.
987 2009-01-07 Ulrich Drepper <drepper@redhat.com>
989 * ld.c (ld_new_searchdir): Fix adding to search path list.
991 2009-01-06 Ulrich Drepper <drepper@redhat.com>
993 * readelf.c: Implement call frame debug section dumping.
995 2009-01-05 Roland McGrath <roland@redhat.com>
997 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
998 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
1000 2009-01-01 Ulrich Drepper <drepper@redhat.com>
1002 * addr2line.c: Update copyright year.
1004 * elfcmp.c: Likewise.
1005 * elflint.c: Likewise.
1006 * findtextrel.c: Likewise.
1009 * objdump.c: Likewise.
1010 * ranlib.c: Likewise.
1011 * readelf.c: Likewise.
1013 * strings.c: Likewise.
1014 * strip.c: Likewise.
1015 * unstrip.c: Likewise.
1017 2008-12-11 Roland McGrath <roland@redhat.com>
1019 * nm.c (sym_name): New function.
1020 (show_symbols_sysv): Use it in place of elf_strptr.
1021 (show_symbols_bsd, show_symbols_posix): Likewise.
1024 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1027 2008-12-02 Roland McGrath <roland@redhat.com>
1029 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1030 nonzero OFFSET argument to dwfl_getmodules.
1032 2008-08-07 Roland McGrath <roland@redhat.com>
1034 * addr2line.c (main): Pass string to handle_address.
1035 (see_one_module): New function, subroutine of handle_address.
1036 (find_symbol): Likewise.
1037 (handle_address): Take string argument rather than address.
1038 Convert plain number, or handle strings like "(section)+offset"
1041 2008-08-01 Roland McGrath <roland@redhat.com>
1043 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1044 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1046 * readelf.c (convert): Take new argument SIZE.
1047 (handle_core_register, handle_core_item): Update callers.
1048 (handle_core_item): Take new arg REPEATED_SIZE.
1049 (handle_core_items): Special case for a singleton item,
1050 let handle_core_item handle repeats if it wants to.
1052 * readelf.c (handle_core_items): Give abridged output
1053 for identical groups repeated more than twice.
1055 2008-07-04 Roland McGrath <roland@redhat.com>
1057 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1059 2008-04-10 Roland McGrath <roland@redhat.com>
1061 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1062 refer to. Instead, just be sure to preserve the original symbol
1063 table in the debug file so those symbols go with their sections and
1064 can be elided from the stripped version of the symbol table.
1066 * strip.c (handle_elf): When a discarded section kept in the debug
1067 file refers to a nondiscard section via sh_link/sh_info, preserve
1068 that nondiscarded section unmodified in the debug file as well.
1069 Skip adjustment of discarded sections symbol table references when
1070 that symbol table is copied in this way.
1072 * elflint.c (check_symtab): Don't crash from missing symbol names
1073 after diagnosing bogus strtab.
1075 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1076 adjustment for symtab changes.
1078 2008-03-31 Roland McGrath <roland@redhat.com>
1080 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1081 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1082 excuse a special section.
1084 2008-03-27 Roland McGrath <roland@redhat.com>
1086 * elflint.c (check_sections): Check that executability and writability
1087 of sections is reflected in segment p_flags.
1089 2008-03-26 Roland McGrath <roland@redhat.com>
1091 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1092 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1095 2008-02-29 Roland McGrath <roland@redhat.com>
1097 * readelf.c (print_attributes): Add a cast.
1098 * elflint.c (check_attributes): Likewise.
1100 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1101 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1102 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1104 2008-02-03 Ulrich Drepper <drepper@redhat.com>
1106 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1107 when linked into executable.
1108 (elf_i386_create_relocations): Likewise.
1110 2008-02-20 Roland McGrath <roland@redhat.com>
1112 * readelf.c (print_attributes): New function.
1113 (process_elf_file): Call it under -A.
1115 * elflint.c (check_attributes): Implement it for real.
1117 2008-02-19 Roland McGrath <roland@redhat.com>
1119 * elflint.c (special_sections): Handle .gnu.attributes section.
1120 (check_sections): Likewise.
1121 (check_attributes): New function.
1123 2008-02-10 Roland McGrath <roland@redhat.com>
1125 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1126 sections and ET_REL files.
1128 2008-02-02 Ulrich Drepper <drepper@redhat.com>
1130 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1131 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1133 (elf_i386_create_relocations): Likewise.
1134 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1136 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1137 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1138 Fix generation of PT_GNU_STACK entry.
1140 2008-02-01 Ulrich Drepper <drepper@redhat.com>
1142 * ld.c (replace_args): Prevent loop over replacements if the parameter
1143 is only two characters long.
1145 * ld.c: Recognize sha1 argument for --build-id parameter.
1146 * ldgeneric.c (create_build_id_section): Handle sha1.
1147 (compute_hash_sum): New function. Broken out of compute_build_id.
1148 Take hash function and context as parameters.
1149 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1152 2008-01-31 Ulrich Drepper <drepper@redhat.com>
1154 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1155 * ld.c: Recognize --build-id command line parameter.
1156 * ld.h: Define scn_dot_note_gnu_build_id.
1157 (struct ld_state): Add build_id and buildidscnidx elements.
1158 * ldgeneric.c: Implement --build-id command line parameter.
1159 * ldlex.l (ID): Recognize - as valid character after the first one.
1161 2008-01-29 Ulrich Drepper <drepper@redhat.com>
1163 * ld.c (replace_args): New function.
1164 (main): Use it to rewrite old-style parameters.
1166 * elf32-i386.script: Add .gnu.hash section.
1167 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1168 (fillin_special_symbol): Initialize st_size.
1169 (sortfct_hashval): New function.
1170 (create_gnu_hash): New function.
1171 (create_hash): New function.
1172 (ld_generic_create_outfile): Use the new functions to create the
1175 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1177 2008-01-24 Ulrich Drepper <drepper@redhat.com>
1179 * elflint.c (check_group): Check that signature symbol for section
1180 group is not an empty string.
1181 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1182 section. Start implementation of --hash-style.
1183 * i386_ld.c: Likewise.
1184 * ld.c: Recognize --hash-style.
1185 * ld.h (struct scninfo): Add comdat_group.
1186 Add additional parameter to finalize_plt callback.
1188 2008-01-22 Ulrich Drepper <drepper@redhat.com>
1190 * ld.h (struct callbacks): Add initialize_gotplt.
1191 (struct scnhead): Add scn_dot_gotplt.
1192 (struct ld_state): Add gotpltscnidx.
1193 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1194 (elf_i386_initialize_pltrel): Likewise.
1195 (elf_i386_initialize_got): There is now a separate .got.plt, so
1196 don't do the PLT-related work here. Initialize d_type.
1197 (elf_i386_initialize_gotplt): New function.
1198 (elf_i386_plt0): Use ud2a after indirect jump.
1199 (elf_i386_pic_plt0_entry): Likewise.
1200 (elf_i386_finalize_plt): Reference now .got.plt.
1201 (elf_i386_count_relocations): For GOT entries which need no relocation
1202 don't bump nrel_got.
1203 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1204 handling for split .got/.got.plt.
1205 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1206 * elf32-i386.script: Sort sections for security. There are no .got
1207 input sections. Add .got.plt.
1208 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1209 (ld_generic_create_outfile): Initialize .got.plt section.
1210 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1212 2008-01-19 Ulrich Drepper <drepper@redhat.com>
1214 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1215 symbols are not carried over into statically linked output files.
1216 Add dummy entries for more TLS relocations.
1218 * ld.c (options): Add long names for -( and -).
1220 * ldgeneric.c (check_definition): For newly found definitions don't
1221 mark section as used if symbol is absolute.
1222 (extract_from_archive): Only assign archive sequence number the first
1223 time the archive is handled. Update ld_state.last_archive_used
1224 if any symbol was used. Remove nround variable.
1225 (file_process2): When using symbol from an archive, update
1226 ld_state.group_start_archive, ld_state.archives, and
1227 ld_state.tailarchives.
1228 (ld_generic_file_process): If group is not handled anymore, after
1229 freeing ELF handles for the archives, clear ld_state.archives and
1230 *nextp. Fix wrong logic in recognizing first iteration of group
1231 loop. When clearing flags, also clear ld_state.group_start_archive.
1233 2008-01-11 Ulrich Drepper <drepper@redhat.com>
1235 * objdump.c (show_disasm): Adjust disassembler format string for
1238 2008-01-04 Roland McGrath <roland@redhat.com>
1240 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1241 a size greater than the items cover means multiple sets of items.
1242 (handle_core_note): Update caller.
1244 2008-01-04 Roland McGrath <roland@redhat.com>
1246 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1248 2008-01-03 Roland McGrath <roland@redhat.com>
1250 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1252 * elflint.c (check_dynamic): Remove duplicate initializer.
1254 2008-01-02 Ulrich Drepper <drepper@redhat.com>
1256 * addr2line.c: Update copyright year.
1258 * elfcmp.c: Likewise.
1259 * elflint.c: Likewise.
1260 * findtextrel.c: Likewise.
1263 * objdump.c: Likewise.
1264 * ranlib.c: Likewise.
1265 * readelf.c: Likewise.
1267 * strings.c: Likewise.
1268 * strip.c: Likewise.
1269 * unstrip.c: Likewise.
1271 2007-12-30 Ulrich Drepper <drepper@redhat.com>
1273 * objdump (show_disasm): Use %e after third parameter.
1275 2007-12-21 Ulrich Drepper <drepper@redhat.com>
1277 * strip.c: Fix wrong parenthesis in a few branch predictions.
1278 * strings.c: Likewise.
1280 2007-12-20 Ulrich Drepper <drepper@redhat.com>
1282 * Makefile.am (DEFS): Add DEBUGPRED.
1283 * addr2line.c: Include debugpred.h.
1285 * elfcmp.c: Likewise.
1286 * elflint.c: Likewise.
1287 * findtextrel.c: Likewise.
1289 * objdump.c: Likewise.
1290 * ranlib.c: Likewise.
1291 * readelf.c: Likewise.
1293 * strings.c: Likewise.
1294 * strip.c: Likewise.
1295 * unstrip.c: Likewise.
1296 * debugpred.h: New file.
1298 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1299 (handle_relocs_rela): Likewise.
1301 * readelf.c: Add lots of likely/unlikely.
1303 * elflint.c: Minor cleanups.
1305 2007-11-19 Roland McGrath <roland@redhat.com>
1307 * readelf.c (print_ops): Handle all bad op codes gracefully.
1308 Print their numbers instead of just ???.
1310 2007-11-09 Roland McGrath <roland@redhat.com>
1312 * readelf.c (attr_callback): Handle DW_AT_data_location.
1313 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1314 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1315 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1318 2007-10-20 Roland McGrath <roland@redhat.com>
1320 * unstrip.c (options): Update -R description.
1321 (struct symbol): Put symbol details a union with a size_t pointer
1323 (compare_symbols_output): Use null ->name as marker for discard
1324 symbols, not zero *->map.
1325 (copy_elided_sections): Record forwarding pointers for discarded
1326 duplicates and fill SYMNDX_MAP elements through them.
1328 * readelf.c (process_file): Set offline_next_address to 0 at start.
1329 (struct process_dwflmod_args): New type.
1330 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1331 (process_file): Update caller; dup FD for passing to libdwfl.
1332 (process_elf_file): Take new arg FD. For ET_REL file when
1333 displaying data affected by libdwfl relocation, open a new Elf handle.
1335 2007-10-17 Roland McGrath <roland@redhat.com>
1337 * readelf.c (print_debug_line_section): For invalid data inside a
1338 unit with plausible length, keep printing at the next unit boundary.
1340 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1342 2007-10-16 Roland McGrath <roland@redhat.com>
1344 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1346 2007-10-15 Roland McGrath <roland@redhat.com>
1348 * make-debug-archive.in: New file.
1349 * Makefile.am (EXTRA_DIST): Add it.
1350 (make-debug-archive): New target.
1351 (bin_SCRIPTS, CLEANFILES): Add it.
1353 2007-10-10 Roland McGrath <roland@redhat.com>
1355 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1356 Use it to check MERGE|STRINGS for .debug_str.
1357 (check_sections): Handle exact_or_gnuld.
1359 2007-10-08 Roland McGrath <roland@redhat.com>
1361 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1362 64-bit struct timeval with 32-bit tv_usec.
1364 2007-10-07 Roland McGrath <roland@redhat.com>
1366 * readelf.c (check_archive_index): New function.
1367 (process_file): Call it. Change signature to take only fd and name.
1368 Use libdwfl to open the file, then iterate on its modules (multiple
1369 for an archive) to print file name and call process_elf_file.
1370 (main): Update caller. Let process_file do elf_begin.
1371 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1372 (process_elf_file): Take only Dwfl_Module * argument.
1373 Don't print the file name here.
1374 (print_debug_*_section): Take Dwfl_Module * argument.
1375 (print_debug): Likewise. Update caller.
1376 (format_dwarf_addr): New function.
1377 (print_debug_ranges_section): Use it.
1378 (attr_callback): Likewise.
1379 (print_debug_line_section, print_debug_loc_section): Likewise.
1381 * readelf.c (print_debug_ranges_section): Translate all strings.
1382 (print_debug_loc_section): Likewise.
1384 * unstrip.c (copy_elided_sections): Initialize SEC.
1386 * ar.c (do_oper_insert): Put trailing / on short names.
1388 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1390 * arlib2.c (arlib_add_long_name): Adjust for header size.
1392 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1394 * ar.c (do_oper_insert): Use write_retry for padding write.
1396 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1397 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1398 (remember_long_name): New function.
1399 (do_oper_insert): Call it. Correctly use length of basename,
1400 not original name. Don't store long name twice for new member.
1402 2007-10-06 Roland McGrath <roland@redhat.com>
1404 * elflint.c (check_note): Skip empty segment.
1405 (check_note_section): Skip empty section.
1407 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1408 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1409 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1410 (compare_alloc_sections): Take new arg REL, ignore address if true.
1411 (compare_sections): Likewise, pass it down.
1412 (compare_sections_rel, compare_sections_nonrel): New functions.
1413 (find_alloc_sections_prelink, copy_elided_sections): Use them
1414 instead of compare_sections.
1415 (sections_match): New function, broken out of ...
1416 (find_alloc_section): ... here.
1417 (copy_elided_sections): Reorganize section match-up logic.
1418 Use sections_match for SHF_ALLOC in ET_REL.
1419 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1421 * unstrip.c (add_new_section_symbols): Take new arg REL.
1422 When true, do not update section symbol values.
1423 (collect_symbols): Likewise. Update section symbols with address
1424 of chosen output section, not original section.
1425 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1427 * unstrip.c (compare_alloc_sections): At the same address, preserve
1428 original section order.
1430 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1431 .debug_str, it didn't always have them with older tools.
1433 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1435 2007-10-05 Roland McGrath <roland@redhat.com>
1437 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1440 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1441 SHN_UNDEF as "bad section". Use shndx value in messages.
1443 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1444 for ".debug" so it matches as a prefix.
1445 (IS_KNOWN_SPECIAL): New macro.
1446 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1447 type even under -d, for a .debug* or .shstrtab section.
1449 * readelf.c (print_ops): Use hex for address operand.
1451 2007-10-04 Roland McGrath <roland@redhat.com>
1453 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1454 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1455 sections mapped to SHN_UNDEF.
1457 2007-10-04 Ulrich Drepper <drepper@redhat.com>
1459 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1460 variable with older glibc versions.
1461 Add some branch prediction.
1463 2007-10-04 Roland McGrath <roland@redhat.com>
1465 * readelf.c (print_archive_index): New variable.
1466 (options, parse_opt): Accept -c/--archive-index to set it.
1467 (dump_archive_index): New function.
1468 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1469 Call dump_archive_index on archives if set.
1470 (main): Update caller.
1471 (any_control_option): Give it file scope, moved out of ...
1472 (parse_opt): ... here.
1474 2007-10-03 Roland McGrath <roland@redhat.com>
1476 * unstrip.c (struct arg_info): Add `list' flag.
1477 (options, parse_opt): Grok -n/--list to set it.
1478 (list_module): New function.
1479 (handle_implicit_modules): Call it under -n.
1481 * elflint.c (check_note_section): New function.
1482 (check_sections): Call it for SHT_NOTE.
1484 * readelf.c (handle_notes): Use sections when available.
1486 * elflint.c (check_note_data): New function, broken out of ...
1487 (check_note): ... here. Call it and elf_getdata_rawchunk.
1489 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1490 Use elf_getdata_rawchunk and gelf_getauxv.
1491 (handle_notes_data): New function, broken out of ...
1492 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1494 2007-10-01 Roland McGrath <roland@redhat.com>
1496 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1498 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1500 2007-09-10 Roland McGrath <roland@redhat.com>
1502 * readelf.c (options): Give -p optional argument, alias --string-dump.
1503 (string_sections, string_sections_tail): New static variables.
1504 (parse_opt): Set them when -p has an argument.
1505 (print_string_section): New function, broken out of ...
1506 (print_strings): ... here. Call it.
1507 (dump_data_section): New function, broken out of ...
1508 (dump_data): ... here. Call it.
1509 (for_each_section_argument): New function, broken out of ...
1510 (dump_data): ... here. Call it.
1511 (dump_strings): New function.
1513 2007-08-31 Roland McGrath <roland@redhat.com>
1515 * readelf.c (print_strings): Typo fix.
1517 2007-08-23 Roland McGrath <roland@redhat.com>
1519 * readelf.c (printf_with_wrap): Function removed.
1520 (REGISTER_WRAP_COLUMN): New macro.
1521 (handle_core_register): Use print_core_item instead.
1522 (struct register_info): New type.
1523 (compare_registers, compare_register_sets): New functions.
1524 (register_bitpos, compare_sets_by_info): New functions.
1525 (handle_core_registers): Use those to segregate and sort registers
1528 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1529 (print_core_item): New function.
1530 (handle_core_item): Use it instead of printf_with_wrap.
1531 (compare_core_items, compare_core_item_groups): New functions.
1532 (handle_core_items): Use them. Sort by group and force line breaks
1535 * readelf.c (handle_core_registers, handle_core_items): New functions,
1537 (handle_core_note): ... here. Call them.
1539 2007-08-22 Roland McGrath <roland@redhat.com>
1541 * unstrip.c (new_shstrtab): New function, broken out of ...
1542 (copy_elided_sections): ... here.
1544 2007-08-20 Roland McGrath <roland@redhat.com>
1546 Avoid local function trampolines in nm binary.
1547 * nm.c (sort_by_address): Move to a static function instead of local
1548 inside show_symbols.
1549 (sort_by_name_strtab): New static variable.
1550 (sort_by_name): Use it. Move to a static function instead of local
1551 inside show_symbols.
1552 (show_symbols): Set sort_by_name_strtab.
1554 2007-08-19 Roland McGrath <roland@redhat.com>
1556 * readelf.c (handle_auxv_note): New function.
1557 (handle_notes): Call it.
1559 * readelf.c (printf_with_wrap, convert): New functions.
1560 (handle_core_item, (handle_core_register): New functions.
1561 (handle_notes): Call those with details from ebl_core_note.
1563 2007-08-12 Roland McGrath <roland@redhat.com>
1565 * elflint.c (check_note): Accept type 0 with name "Linux".
1567 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1569 * elflint.c (section_flags_string): Return "none" for 0, not "".
1571 2007-08-11 Roland McGrath <roland@redhat.com>
1573 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1575 2007-08-04 Ulrich Drepper <drepper@redhat.com>
1577 * readelf.c (hex_dump): Use isprint to determine whether to print
1578 character itself or full stop character.
1579 (dump_data): No need to check endp for NULL after strtol call.
1581 2007-08-03 Roland McGrath <roland@redhat.com>
1583 * readelf.c (print_string_sections): New variable.
1584 (options, parse_opt): Handle --strings/-p to set it.
1585 (print_strings): New function.
1586 (process_elf_file): Call it under -p.
1588 * readelf.c (options): Add hidden aliases --segments, --sections,
1589 as taken by binutils readelf.
1591 2007-08-01 Roland McGrath <roland@redhat.com>
1593 * readelf.c (dump_data_sections, dump_data_sections_tail):
1595 (options, parse_opt): Handle --hex-dump/-x, set them.
1596 (hex_dump): New function.
1597 (dump_data): New function, call it.
1598 (process_elf_file): Call it.
1600 2007-07-25 Roland McGrath <roland@redhat.com>
1602 * addr2line.c (show_symbols): New variable.
1603 (print_addrsym): New function.
1604 (handle_address): Call it.
1605 (options, parse_opt): Handle -S/--symbols.
1607 2007-06-05 Ulrich Drepper <drepper@redhat.com>
1609 * addr2line.c: Update for latest autoconf header.
1611 * elfcmp.c: Likewise.
1612 * elflint.c: Likewise.
1613 * findtextrel.c: Likewise.
1615 * ldgeneric.c: Likewise.
1617 * objdump.c: Likewise.
1618 * ranlib.c: Likewise.
1619 * readelf.c: Likewise.
1621 * strings.c: Likewise.
1622 * strip.c: Likewise.
1623 * unstrip.c: Likewise.
1625 2007-05-18 Roland McGrath <roland@redhat.com>
1627 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1628 stripped file, so as not to duplicate a section copied in both.
1630 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1632 2007-05-17 Roland McGrath <roland@redhat.com>
1634 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1636 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1638 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1639 call make_directories here.
1640 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1641 (handle_dwfl_module): Likewise.
1642 (handle_implicit_modules): Update callers.
1643 (handle_output_dir_module): Likewise. Don't do make_directories here.
1645 * unstrip.c (get_section_name): New function, broken out of ...
1646 (copy_elided_sections): here. Update callers.
1647 (find_alloc_section): Broken out of ...
1648 (copy_elided_sections): ... here. Update caller.
1649 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1650 update STT_SECTION symbols' st_value fields as a side effect.
1651 (check_symtab_section_symbols): Update caller.
1652 (add_new_section_symbols): Set st_value in symbols added.
1653 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1654 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1655 from .bss to .dynbss.
1656 (find_alloc_sections_prelink): New function. Associate debug file
1657 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1658 .gnu.prelink_undo information.
1659 (copy_elided_sections): Call it when we couldn't find every allocated
1660 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1661 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1662 (handle_file): Update callers.
1664 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1667 * elflint.c (check_sections): Fix association of segments with
1668 sections when p_memsz > p_filesz.
1670 2007-04-29 Roland McGrath <roland@redhat.com>
1672 * addr2line.c (options, main): Tweak argp group settings to fix
1675 2007-04-28 Roland McGrath <roland@redhat.com>
1677 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1678 sizes to match sections adjusted in the stripped file.
1680 2007-04-24 Roland McGrath <roland@redhat.com>
1682 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1683 (hash_inexact): New variable.
1684 (options, parse_opt): Add --hash-inexact option to set it.
1685 (hash_content_equivalent): New function.
1686 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1688 2007-04-23 Roland McGrath <roland@redhat.com>
1690 * unstrip.c: New file.
1691 * Makefile.am (bin_PROGRAMS): Add it.
1692 (unstrip_LDADD): New variable.
1694 * strip.c (options): Allow --output for -o.
1696 2007-02-15 Ulrich Drepper <drepper@redhat.com>
1698 * readelf.c: Remove unused code. Add a few consts.
1700 2007-02-15 Roland McGrath <roland@redhat.com>
1702 * readelf.c (print_debug): Fix brainos in SHDR test.
1704 2007-02-05 Roland McGrath <roland@redhat.com>
1706 * ar.c: Include <limits.h>, since we use LONG_MAX.
1708 2007-02-05 Ulrich Drepper <drepper@redhat.com>
1710 * ar.c: Add ugly hack to work around gcc complaining that we
1711 ignore fchown's return value.
1712 (do_oper_insert): Handle error when writing padding.
1713 * ranlib.c: Add fchown complain work around.
1715 * arlib.c: Make symtab a global variable. Change all users.
1716 * arlib2.c: Likewise.
1717 * ranlib.c: Likewise.
1719 * arlib.h: Declare it.
1721 2007-01-11 Roland McGrath <roland@redhat.com>
1723 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1724 SHF_MASKPROC bits separately from generic sh_flags validation.
1726 2007-02-04 Ulrich Drepper <drepper@redhat.com>
1729 * arlib.c: New file.
1730 * arlib2.c: New file.
1731 * arlib.h: New file.
1732 * Makefile (noinst_LIBRARIES): Add libar.
1733 (libar_a_SOURCES): Define.
1735 (CFLAGS_ar): Define.
1736 * ranlib.c: Change to use arlib.
1738 * elflint.c (check_symtab): Work around GNU ld bug which omits
1739 sections but not symbols in those sections.
1741 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1743 * addr2line.c: Update copyright year.
1744 * elfcmp.c: Likewise.
1745 * elflint.c: Likewise.
1746 * findtextrel.c: Likewise.
1749 * objdump.c: Likewise.
1750 * ranlib.c: Likewise.
1751 * readelf.c: Likewise.
1753 * strings.c: Likewise.
1754 * strip.c: Likewise.
1756 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1758 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1759 two hash tables have different content (module expected omission
1760 of undefined symbols).
1762 2006-10-31 Roland McGrath <roland@redhat.com>
1764 * elflint.c (check_program_header): Don't complain about
1765 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
1767 2006-09-19 Jakub Jelinek <jakub@redhat.com>
1769 * strip.c (process_file): Disallow -f on archives.
1771 2006-10-09 Roland McGrath <roland@redhat.com>
1773 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1775 2006-08-29 Roland McGrath <roland@redhat.com>
1777 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1779 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1780 Reported by Christian Aichinger <Greek0@gmx.net>.
1782 * elflint.c (valid_e_machine): Add EM_ALPHA.
1783 Reported by Christian Aichinger <Greek0@gmx.net>.
1785 2006-08-08 Ulrich Drepper <drepper@redhat.com>
1787 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1788 Keep track of which "high DT" entries are present.
1789 Check that either old or GNU-style hash table is present.
1790 If GNU-style hash table is used a symbol table is mandatory.
1791 Check that if any prelink entry is present all of them are.
1792 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1793 table if they don't refer to functions.
1795 2006-07-17 Roland McGrath <roland@redhat.com>
1797 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1798 (add_version): Likewise for argument.
1799 (check_versym): Cast constant to GElf_Versym for comparison.
1801 2006-07-12 Roland McGrath <roland@redhat.com>
1803 * readelf.c (handle_gnu_hash): Add casts for machines where
1804 Elf32_Word != unsigned int.
1806 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1808 * elflint.c (check_sysv_hash64): Fix printf format.
1810 2006-07-11 Roland McGrath <roland@redhat.com>
1812 * addr2line.c (options): English fix in -f doc string.
1814 * addr2line.c (use_comp_dir): New variable.
1815 (options, parse_opt): Grok -A/--absolute to set it.
1816 (handle_address): If set, prepend dwfl_line_comp_dir results to
1817 relative file names.
1819 2006-07-06 Ulrich Drepper <drepper@redhat.com>
1821 * elflint.c: Adjust for latest new hash table format.
1822 * readelf.c: Likewise.
1824 * elflint.c (check_versym): Ignore hidden bit when comparing version
1827 2006-07-05 Ulrich Drepper <drepper@redhat.com>
1829 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1830 discarded COMDAT symbols.
1832 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1833 (elf_i386_create_relocations): Likewise.
1834 * ld.h (struct symbol): Add local and hidden bits.
1835 * ld.c (create_special_section_symbol): These synthsized symbols
1836 are local and hidden.
1837 * ldgeneric.c (file_process2): Check whether input file matches
1839 (fillin_special_symbol): Create symbols as local and/or hidden
1841 (ld_generic_create_outfile): Make local copy of symbol.
1842 Don't hide global, defined symbols in dynamic symbol table unless
1843 requested. Synthetic symbols have no version information.
1845 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1846 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1848 2006-07-04 Ulrich Drepper <drepper@redhat.com>
1850 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1853 2006-07-03 Ulrich Drepper <drepper@redhat.com>
1855 * elflint.c: Add testing of DT_GNU_HASH.
1856 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1858 * Makefile.am: Add hacks to create dependency files for non-generic
1861 2006-06-12 Ulrich Drepper <drepper@redhat.com>
1863 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1864 section if creating a DSO and no interpreter is given.
1865 (ld_generic_create_outfile): Don't store reference to symbols in
1866 discarded COMDAT groups. Don't create PHDR and INTERP program header
1867 for DSO if no interpreter is specified.
1868 (create_verneed_data): Pretty printing.
1870 * ldscript.y (content): If a DSO is created don't set default
1871 interpreter from linker script.
1873 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1874 for symbols in discarded COMDAT groups.
1875 (elf_i386_create_relocations): Likewise.
1876 * ld.h (struct scninfo): Add unused_comdat.
1877 * ldgeneric.c (add_section): Also check group signature when
1878 matching COMDAT sections.
1879 (add_relocatable_file): Ignore symbols in COMDAT group which are
1882 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1883 and symbol reference.
1885 2006-06-11 Ulrich Drepper <drepper@redhat.com>
1887 * elflint.c (check_dynamic): Fix checking value of tags which are
1888 offsets in the string section. Make sure DT_STRTAB points to the
1889 section referenced in sh_link.
1891 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1893 * ld.c: Recognize --eh-frame-hdr option.
1894 * ld.h (struct ld_state): Add eh_frame_hdr field.
1895 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1897 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1899 (add_relocatable_file): Minor optimization of last change.
1900 (match_section): Don't preserve SHF_GROUP flag any longer.
1902 2006-06-10 Ulrich Drepper <drepper@redhat.com>
1904 * ld.c (parse_z_option): Recognize execstack and noexecstack.
1905 Handle record and ignore as position dependent options.
1906 (parse_z_option_2): Handle ignore and record here.
1907 * ld.h (struct ld_state): Add execstack field.
1908 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1910 (ld_generic_create_outfile): Fix program header creation in native
1911 linker. Add PT_GNU_STACK program header.
1913 2006-06-09 Ulrich Drepper <drepper@redhat.com>
1915 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1916 for PLT entries if there is no local definition.
1918 * ld.c (parse_option): Handle -z ignore like --as-needed and
1919 -z record like --no-as-needed.
1920 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1921 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1922 looping over DSOs. When deciding about adding DT_NEEDED entries
1923 use ->as_needed instead of ignore_unused_dsos.
1925 2006-05-31 Ulrich Drepper <drepper@redhat.com>
1927 * ld.c: Recognize --as-needed and --no-as-needed options.
1928 * ld.h (struct usedfile): Add as_needed field.
1929 (struct ld_state): Likewise.
1930 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1932 * ldscript.y (filename_id_list): Split to correctly parse all
1934 (mark_as_needed): Fix loop.
1936 2006-05-28 Ulrich Drepper <drepper@redhat.com>
1938 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1941 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1943 * readelf.c (handle_relocs_rela): Better notations for addon value.
1944 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
1946 2006-04-04 Ulrich Drepper <drepper@redhat.com>
1948 * addr2line.c: Update copyright year.
1949 * elfcmp.c: Likewise.
1950 * elflint.c: Likewise.
1951 * findtextrel.c: Likewise.
1954 * objdump.c: Likewise.
1955 * ranlib.c: Likewise.
1956 * readelf.c: Likewise.
1958 * strings.c: Likewise.
1959 * strip.c: Likewise.
1961 2006-03-09 Roland McGrath <roland@redhat.com>
1963 * Makefile.am (AM_LDFLAGS): New variable.
1965 2006-03-01 Roland McGrath <roland@redhat.com>
1967 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1968 for dwarf.h changes matching 3.0 spec.
1969 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1971 2005-12-04 Ulrich Drepper <drepper@redhat.com>
1973 * elflint.c (check_one_reloc): If relocation section is not loaded,
1974 don't check whether the relocations modify read-only sections or
1975 loaded and unloaded sections.
1977 2005-11-28 Ulrich Drepper <drepper@redhat.com>
1979 * elflint.c (check_one_reloc): Take additional parameters. Use
1980 them to determine whether relocation is valid in this type of
1981 file. DSOs and executables can contain relocation sections in
1982 unloaded sections which just show the relocations the linker
1983 applied. Adjust all callers.
1984 (check_program_header): Check that PT_PHDR is loaded and that offset
1985 matches the one in the ELF header.
1987 2005-10-26 Roland McGrath <roland@redhat.com>
1989 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1991 2005-09-03 Ulrich Drepper <drepper@redhat.com>
1993 * strip.c (handle_elf): Unify some error messages.
1994 * ld.c (main): Likewise.
1995 * ldgeneric.c (open_elf): Likewise.
1996 * elfcmp.c (main): Likewise.
1997 * elflint.c (check_elf_header): Likewise.
1999 * size.c (process_file): Fix typo in error message.
2001 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2003 2005-09-02 Ulrich Drepper <drepper@redhat.com>
2005 * strings.c (main): Reset elfmap variable after munmap call.
2006 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
2008 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2010 * ranlib.c: Don't define pread_retry and write_retry here.
2012 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2013 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2015 * strings.c (process_chunk): Reorder expressions in conditional
2016 (process_chunk_mb): Likewise.
2018 * strings.c: New file.
2019 * Makefile.am (bin_PROGRAMS): Add strings.
2020 (strings_no_Wstring): Define.
2021 (strings_LDADD): Define.
2023 2005-08-27 Roland McGrath <roland@redhat.com>
2025 * addr2line.c (dwarf_diename_integrate): Function removed.
2026 (print_dwarf_function): Use plain dwarf_diename.
2028 2005-08-24 Ulrich Drepper <drepper@redhat.com>
2030 * elflint.c (check_versym): Versioned symbols should not have
2033 2005-08-15 Ulrich Drepper <drepper@redhat.com>
2035 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2038 * Makefile.am: Add rules to build ranlib.
2039 * ranlib.c: New file.
2041 2005-08-14 Roland McGrath <roland@redhat.com>
2043 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2044 sh_type it recognizes.
2046 * elflint.c (check_sections): Print unknown flags in hex, don't
2047 truncate high bits. Print section number and name for unknown type.
2049 2005-08-13 Roland McGrath <roland@redhat.com>
2051 * elflint.c (check_program_header): Use ebl_segment_type_name and
2052 allow any p_type it recognizes. Include p_type value in error
2053 message for unknown type.
2055 2005-08-13 Ulrich Drepper <drepper@redhat.com>
2057 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2058 to ebl_check_special_symbol.
2059 (check_sections): Pass ehdr to ebl_bss_plt_p.
2061 2005-08-12 Roland McGrath <roland@redhat.com>
2063 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2064 refers to the right section if it's not SHN_ABS.
2065 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2067 * elflint.c (check_sections): Don't complain about a non-NOBITS
2068 section taking no segment space, if it's sh_size is 0.
2070 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2071 be PROGBITS or NOBITS.
2073 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2074 standard st_value and st_size checks.
2076 2005-07-28 Roland McGrath <roland@redhat.com>
2078 * addr2line.c (options, parse_opt): Don't handle -e here.
2079 (executable): Variable removed.
2080 (argp_children): New static variable.
2081 (argp): Use it. Make const.
2082 (main): Fill in argp_children from dwfl_standard_argp ().
2083 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2084 (print_dwarf_function): New function. Try to figure out inline chain.
2085 (elf_getname): Function removed, libdwfl does it for us.
2086 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2087 Use dwfl_module_addrname instead of elf_getname.
2088 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2089 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2091 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2093 * strip.c (parse_opt): STATE parameter is now used.
2094 Various little cleanups.
2096 * readelf.c (print_debug_line_section): Correct fallout of renaming
2097 of DW_LNS_set_epilog_begin.
2099 2005-08-08 Roland McGrath <roland@redhat.com>
2101 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2102 with binutils strip. Likewise -d, -S, as aliases for -g.
2103 Likewise ignore -s/--strip-all.
2105 2005-08-07 Roland McGrath <roland@redhat.com>
2107 * strip.c (process_file): Open read-only when using a different output
2110 2005-08-06 Ulrich Drepper <drepper@redhat.com>
2112 * elflint.c (in_nobits_scn): New function.
2113 (check_versym): Allow references for defined symbols against versions
2114 of other DSOs also for symbols in nobits sections.
2115 Move a few variables around.
2117 * Makefile.am (AM_CFLAGS): Avoid duplication.
2118 Link with statis libs if BUILD_STATIC.
2120 2005-08-05 Ulrich Drepper <drepper@redhat.com>
2122 * elflint.c: Many, many more tests. Mostly related to symbol
2123 versioning. Those sections should now be completely checked.
2125 * readelf.c (print_dynamic): Use gelf_offscn.
2127 2005-08-04 Ulrich Drepper <drepper@redhat.com>
2129 * elflint.c: Add lots more tests: more extension symbol table sanity,
2130 versioning section tests, hash table tests. General cleanup.
2132 2005-08-02 Ulrich Drepper <drepper@redhat.com>
2134 * objdump.c: New file.
2135 * Makefile.am (bin_PROGRAMS): Add objdump.
2136 (objdump_LDADD): Define.
2138 * elflint.c (check_reloc_shdr): New function split out from check_rela
2140 (check_one_reloc): New function. Likewise.
2141 (check_rela): Use check_reloc_shdr and check_one_reloc.
2142 (check_rel): Likewise.
2143 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2145 Add checks that relocations against read-only segments are flagged,
2146 that the text relocation flag is not set unnecessarily, and that
2147 relocations in one section are either against loaded or not-loaded
2150 2005-08-01 Ulrich Drepper <drepper@redhat.com>
2152 * elfcmp.c (main): Ignore section count and section name string table
2155 2005-07-27 Roland McGrath <roland@redhat.com>
2157 * elfcmp.c: Include <locale.h>.
2159 2005-07-27 Ulrich Drepper <drepper@redhat.com>
2161 * elfcmp.c: Print name and index of differing section.
2163 2005-07-24 Ulrich Drepper <drepper@redhat.com>
2165 * elfcmp.c: Implement comparing gaps between sections.
2167 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2169 * elflint.c: Include libeblP.h instead of libebl.h.
2171 * readelf.c: Likewise.
2172 * elfcmp.c: Likewise.
2174 * elfcmp.c (main): Compare individual ELF header fields, excluding
2175 e_shoff instead of the whole struct at once.
2176 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2177 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2179 2005-07-22 Ulrich Drepper <drepper@redhat.com>
2181 * elfcmp.c (main): Take empty section into account when comparing
2184 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2187 2005-07-21 Ulrich Drepper <drepper@redhat.com>
2189 * elfcmp.c: New file.
2190 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2191 (elfcmp_LDADD): Define.
2193 * elflint.c (check_rela): Check that copy relocations only reference
2194 object symbols or symbols with unknown type.
2195 (check_rel): Likewise.
2197 2005-06-08 Roland McGrath <roland@redhat.com>
2199 * readelf.c (print_ops): Add consts.
2201 2005-05-31 Roland McGrath <roland@redhat.com>
2203 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2204 abbreviations. Print a header line before each CU section.
2206 * readelf.c (print_debug_loc_section): Fix indentation for larger
2209 2005-05-30 Roland McGrath <roland@redhat.com>
2211 * readelf.c (print_debug_line_section): Print section offset of each
2212 CU's table, so they are easy to find from seeing the stmt_list value.
2214 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2215 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2217 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2218 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2220 * readelf.c (print_ops): Take different args for indentation control.
2221 (attr_callback): Caller updated.
2222 Grok several more block-form attributes as being location expressions.
2223 For those same attributes with udata forms, format output differently
2224 for location list offset.
2225 (print_debug_loc_section): Implement it for real.
2227 * readelf.c (options): Mention ranges for --debug-dump.
2228 (enum section_e): Add section_ranges.
2229 (parse_opt): Grok "ranges" for -w/--debug-dump.
2230 (print_debug_ranges_section): New function.
2231 (print_debug): Handle .debug_ranges section.
2233 2005-05-30 Ulrich Drepper <drepper@redhat.com>
2235 * readelf.c (handle_notes): At least x86-64 need not have the note
2236 section values aligned to 8 bytes.
2238 2005-05-18 Ulrich Drepper <drepper@redhat.com>
2240 * readelf.c (dwarf_tag_string): Add new tags.
2242 2005-05-08 Roland McGrath <roland@redhat.com>
2244 * strip.c (handle_elf): Don't translate hash and versym data formats,
2245 elf_getdata already did it for us.
2247 2005-05-07 Ulrich Drepper <drepper@redhat.com>
2249 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2250 (addr2line_LDADD): Likewise.
2252 2005-05-03 Roland McGrath <roland@redhat.com>
2254 * strip.c (handle_elf): Apply symbol table fixups to discarded
2255 relocation sections when they are being saved in the debug file.
2257 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2258 and gelf_xlatetof, not the native byte order.
2260 * strip.c (parse_opt): Give error if -f or -o is repeated.
2261 (main): Exit if argp_parse returns nonzero.
2263 * strip.c (debug_fname_embed): New variable.
2264 (options, parse_opt): New option -F to set it.
2266 2005-05-07 Ulrich Drepper <drepper@redhat.com>
2268 * readelf.c (parse_opt): Make any_control_option variable
2269 local. Simplify some tests.
2271 2005-05-03 Roland McGrath <roland@redhat.com>
2273 * strip.c (crc32_file): Function removed (now in ../lib).
2275 2005-05-03 Roland McGrath <roland@redhat.com>
2277 * elflint.c (is_debuginfo): New variable.
2278 (options, parse_opt): New option --debuginfo/-d to set it.
2279 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2280 (check_note): If is_debuginfo, don't try to get note contents.
2282 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2284 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2287 2005-04-14 Ulrich Drepper <drepper@redhat.com>
2289 * readelf.c (dwarf_encoding_string): New function.
2290 (dwarf_inline_string): New function.
2291 (dwarf_access_string): New function.
2292 (dwarf_visibility_string): New function.
2293 (dwarf_virtuality_string): New function.
2294 (dwarf_identifier_case_string): New function.
2295 (dwarf_calling_convention_string): New function.
2296 (dwarf_ordering_string): New function.
2297 (dwarf_discr_list_string): New function.
2298 (attr_callback): Decode man more attribute values.
2300 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2302 * addr2line.c: Finish implementation of -f option.
2304 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2306 * addr2line.c: New file.
2307 * Makefile.am (bin_PROGRAMS): Add addr2line.
2308 Define addr2line_LDADD.
2310 * findtextrel.c: Use new dwarf_addrdie function.
2312 * findtextrel.c: Fix usage message and re-add accidentally removed
2315 2005-03-28 Ulrich Drepper <drepper@redhat.com>
2317 * findtextrel.c: New file.
2318 * Makefile: Add rules to build findtextrel.
2320 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2322 * ldlex.l: Provide ECHO definition to avoid warning.
2324 * elflint.c (check_program_header): Fix typo in RELRO test.
2326 * Makefile.am (AM_CFLAGS): Add more warning options.
2327 * elflint.c: Fix warnings introduced by the new warning options.
2328 * i386_ld.c: Likewise.
2331 * ldgeneric.c: Likewise.
2333 * readelf.c: Likewise.
2334 * sectionhash.c: Likewise.
2336 * string.c: Likewise.
2338 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2340 * Makefile.am: Check for text relocations in constructed DSOs.
2342 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2345 * ldscript.y: Add as_needed handling.
2346 * ldlex.l: Recognize AS_NEEDED token.
2347 * ld.h (struct filename_list): Add as_needed flag.
2349 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2351 * elflint.c (check_symtab): Correctly determine size of GOT section.
2353 2005-01-19 Ulrich Drepper <drepper@redhat.com>
2355 * ld.c: Remove unnecessary more_help function. Print bug report
2357 * strip.c: Likewise.
2360 * readelf.c: Likewise.
2361 * elflint.c: Likewise.
2363 * elflint.c (main): Don't check for parameter problems here.
2364 (parse_opt): Do it here, where we get informed about some of them
2367 * readelf.c (main): Don't check for parameter problems here.
2368 (parse_opt): Do it here, where we get informed about some of them
2371 2005-01-11 Ulrich Drepper <drepper@redhat.com>
2373 * strip.c: Update copyright year.
2374 * readelf.c: Likewise.
2378 * elflint.c: Likewise.
2380 * elflint.c (check_symtab): Don't warn about wrong size for
2381 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2383 2004-10-05 Ulrich Drepper <drepper@redhat.com>
2385 * readelf.c (print_phdr): In section mapping, also indicate
2386 sections in read-only segments.
2388 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2390 * readelf.c: Make compile with gcc 4.0.
2391 * strip.c: Likewise.
2393 2004-08-16 Ulrich Drepper <drepper@redhat.com>
2395 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2396 allocate to work around gcc 3.4 bug.
2398 2004-01-25 Ulrich Drepper <drepper@redhat.com>
2400 * ldlex.l (invalid_char): Better error message.
2402 2004-01-23 Ulrich Drepper <drepper@redhat.com>
2404 * readelf.c: Print SHT_GNU_LIBLIST sections.
2406 * none_ld.c: New file.
2408 2004-01-21 Ulrich Drepper <drepper@redhat.com>
2410 * Makefile.am: Enable building of machine specific linker.
2412 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2414 * Makefile.am: Support building with mudflap.
2416 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2417 * ldgeneric.c: Likewise.
2418 * ldscript.y: Likewise.
2419 * readelf.c: Likewise.
2420 * strip.c: Likewise.
2422 * readelf.c (print_debug_line_section): Determine address size
2425 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2427 * readelf.c (print_phdr): Show which sections are covered by the
2430 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2432 * readelf.c (print_debug_macinfo_section): Implement.
2434 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2436 * readelf.c (print_debug_line_section): Implement.
2438 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2440 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2441 * src/ld.c: Likewise.
2442 * src/nm.c: Likewise.
2443 * src/readelf.c: Likewise.
2444 * src/size.c: Likewise.
2445 * src/strip.c: Likewise.
2447 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2449 * Makefile.am: Support building with mudflap.
2451 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2453 * readelf.c (print_debug_info_section): Free dies memory.
2455 * readelf.c: Print .debug_info section content.
2457 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2459 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2461 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2463 * readelf.c (print_debug_aranges): Implement using libdw.
2465 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2467 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2469 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2470 behavior is available yet.
2471 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2473 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2475 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2477 * nm.c: Implement getting information about local variables.
2479 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2481 * nm.c: Read also debug information for local symbols.
2483 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2485 * nm.c: Shuffle dwarf handling code around so the maximum column
2486 width can be computed ahead of printing. Avoid collection symbols
2487 which are not printed anyway.
2489 * nm.c: Rewrite dwarf handling to use libdw.
2490 * Makefile.am (AM_CFLAGS): Add -std parameter.
2491 (INCLUDES): Find header in libdw subdir.
2492 (nm_LDADD): Replace libdwarf with libdw.
2494 * elflint.c: Update copyright year.
2495 * readelf.c: Likewise.
2497 * strip.c: Likewise.
2500 2003-12-31 Ulrich Drepper <drepper@redhat.com>
2502 * strip.c (process_file): Close file before returning.
2504 2003-11-19 Ulrich Drepper <drepper@redhat.com>
2506 * readelf.c (handle_dynamic): Make column for tag name wider.
2508 2003-09-29 Ulrich Drepper <drepper@redhat.com>
2510 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2512 2003-09-25 Ulrich Drepper <drepper@redhat.com>
2514 * strip.c (process_file): Don't mmap the input file, we modify the
2515 data structures and don't want the change end up on disk.
2517 2003-09-23 Jakub Jelinek <jakub@redhat.com>
2519 * unaligned.h (union u_2ubyte_unaligned,
2520 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2522 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2523 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2524 Read/store value through _ptr->u instead of *_ptr.
2526 2003-09-22 Ulrich Drepper <drepper@redhat.com>
2528 * size.c (show_sysv): Change type of maxlen to int.
2530 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2533 * i386_ld.c: Many many fixes and extensions.
2535 * ldgeneric.c: Likewise.
2537 2003-08-16 Ulrich Drepper <drepper@redhat.com>
2539 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2540 the reference is from another DSO.
2542 2003-08-15 Ulrich Drepper <drepper@redhat.com>
2544 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2545 point is found when creating a DSO.
2547 2003-08-14 Ulrich Drepper <drepper@redhat.com>
2549 * ld.c (main): Always call FLAG_UNRESOLVED.
2550 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2551 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2553 2003-08-13 Ulrich Drepper <drepper@redhat.com>
2555 * Makefile.in: Depend on libebl.a, not libebl.so.
2557 * ld.c (main): Mark stream for linker script as locked by caller.
2558 (read_version_script): Likewise.
2559 * ldlex.c: Define fread and fwrite to _unlocked variant.
2561 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2563 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2565 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2566 store_8ubyte_unaligned): Define using new macros.
2568 2003-08-12 Ulrich Drepper <drepper@redhat.com>
2570 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2571 possibly unaligned memory. Support use of big endian machines.
2573 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2575 * Moved to CVS archive.