1 2016-01-08 Mark Wielaard <mjw@redhat.com>
3 * elfcompress.c (compress_section): Use %zu to print size_t.
4 * readelf.c (print_shdr): Use %zx to print size_t.
6 2015-12-16 Mark Wielaard <mjw@redhat.com>
8 * elfcompress.c: New file.
9 * Makefile.am (bin_PROGRAMS): Add elfcompress.
10 (elfcompress_LDADD): New variable.
12 2015-12-18 Mark Wielaard <mjw@redhat.com>
14 * elflint.c (section_flags_string): Add NEWFLAG COMPRESSED.
15 (check_sections): SHF_COMPRESSED can be on any special section.
16 SHF_COMPRESSED is a valid section flag. SHF_COMPRESSED cannot
17 be used together with SHF_ALLOC or with SHT_NOBITS. Should have
20 2015-10-20 Mark Wielaard <mjw@redhat.com>
22 * readelf.c (options): Expand -z help text.
23 (dump_data_section): Check whether we need and can decompress section
24 data and call elf_rawzdata if so,
25 (print_string_section): Likewise.
26 (elf_contains_chdrs): New function.
27 (process_elf_file): Rename print_unrelocated to print_unchanged,
28 use elf_contains_chdrs.
29 (print_scngrp): Check whether section is compressed before use.
30 (print_symtab): Likewise.
31 (handle_hash): Likewise.
33 2015-10-16 Mark Wielaard <mjw@redhat.com>
35 * readelf.c (argp_option): Describe --decompress,-z.
36 (print_decompress): New bool.
37 (parse_opt): Handle -z.
38 (elf_ch_type_name): New function.
39 (print_shdr): Print section compress information.
41 2015-12-31 Mark Wielaard <mjw@redhat.com>
43 * elflint.c (check_symtab): Add _edata and _end (plus extra underscore
44 variants) to to the list of possibly dangling symbols.
46 2015-12-02 Mark Wielaard <mjw@redhat.com>
48 * nm.c (process_file): Accept fd and pass it on.
49 (handle_elf): Likewise.
50 (find_no_debuginfo): New.
51 (struct getdbg): Likewise.
52 (getdbg_dwflmod): Likewise.
53 (show_symbols): Take fd. If the file is ET_REL use libdwfl to get
56 2015-12-02 Mark Wielaard <mjw@redhat.com>
58 * nm.c (get_local_names): Check for duplicates in local_root tree.
60 2015-12-02 Mark Wielaard <mjw@redhat.com>
62 * unstrip.c (struct data_list): New.
63 (new_data_list): Likewise.
64 (record_new_data): Likewise.
65 (free_new_data): Likewise.
66 (adjust_relocs): Call record_new_data.
67 (add_new_section_symbols): Likewise.
68 (copy_elided_sections): Call free_new_data.
70 2015-12-01 Mark Wielaard <mjw@redhat.com>
72 * elfcmp.c (main): Close ebl1 and ebl2 backends.
74 2015-10-16 Mark Wielaard <mjw@redhat.com>
76 * Makefile.am [BUILD_STATIC](libdw): Add -lz.
77 [BUILD_STATIC](libelf): Likewise.
79 2015-10-16 Mark Wielaard <mjw@redhat.com>
81 * elflint.c (check_symtab): Don't check TLS symbol value against TLS
82 phdr offset in debuginfo files.
83 (check_sections): Don't try to match section offsets to phdrs offsets
86 2015-10-16 Mark Wielaard <mjw@redhat.com>
88 * elflint.c (check_reloc_shdr): Reject only desthdrs if they have both
89 SHF_MERGE and SHF_STRINGS set.
91 2015-10-13 Jose E. Marchesi <jose.marchesi@oracle.com>
93 * elflint.c (check_sections): Do not rely on
94 ebl_check_special_section when checking debuginfo files. Also
95 check that the type of WE sections in debuginfo files is NOBITS.
97 2015-10-13 Mark Wielaard <mjw@redhat.com>
99 * elflint.c (check_program_header): Check relro flags are a subset
100 of the load segment if they don't fully overlap.
102 2015-10-07 Mark Wielaard <mjw@redhat.com>
104 * Makefile.am (ldlex_no_Wstack_usage): New.
105 * ldlex.l ([RWX]): Make cnt unsigned.
107 2015-10-09 Josh Stone <jistone@redhat.com>
109 * elflint.c (main): Replace stat64 and fstat64 with stat and fstat.
110 * readelf.c (process_file): Likewise.
111 (process_elf_file): Replace off64_t with off_t.
112 * findtextrel.c (process_file): Replace open64 with open.
113 * ld.c (main): Replace sizeof (off64_t) with 8.
114 * strings.c: Replace off64_t with off_t throughout.
115 (main): Replace stat64 and fstat64 with stat and fstat.
116 (map_file): Replace mmap64 with mmap.
117 (read_block): Likewise, and replace lseek64 with lseek.
118 * strip.c (handle_elf): Replace ftruncate64 with ftruncate.
119 (process_file): Replace stat64 and fstat64 with stat and fstat.
120 * unstrip.c (parse_opt): Replace stat64 with stat.
121 (handle_file): Replace open64 with open.
122 (open_file): Likewise.
124 2015-10-08 Chih-Hung Hsieh <chh@google.com>
126 * ld.c (determine_output_format): Move recursive nested
127 function "try" to file scope.
129 2015-10-04 Mark Wielaard <mjw@redhat.com>
131 * strip.c (handle_elf): Only sanity check section symbols to not
132 kept discarded sections if we are creating a debug file.
134 2015-10-07 Mark Wielaard <mjw@redhat.com>
136 * unstrip.c (MAX): Removed.
137 (find_alloc_sections_prelink): Allocate exact amount of bytes for
140 2015-10-05 Chih-Hung Hsieh <chh@google.com>
142 * unstrip.c (find_alloc_sections_prelink): Do not allocate
143 on stack union types with variable length arrays; use xmalloc
144 for such dynamic sized objects.
145 * readelf.c (handle_core_item): Likewise, but use alloca
146 for small variable size data object and add assert(count < 128).
148 2015-10-05 Josh Stone <jistone@redhat.com>
150 * Makefile.am (libld_elf_i386.so): Add AM_V_CCLD silencer.
151 (.deps/none_ld.Po): Always silence the dummy command.
152 (make-debug-archive): Add AM_V_GEN and AM_V_at silencers.
154 2015-10-02 Mark Wielaard <mjw@redhat.com>
156 * unstrip.c (copy_elided_sections): Use SH_INFO_LINK_P, not just
159 2015-10-02 Mark Wielaard <mjw@redhat.com>
161 * strip.c (handle_elf): Don't move around allocated NOBITS sections.
162 Don't just mark the section header string table as unused.
163 * unstrip.c (copy_elided_sections): Add header names to strtab if
164 shstrndx equals the symtab strtabndx.
166 2015-09-22 Mark Wielaard <mjw@redhat.com>
168 * strip.c (cleanup_debug): Remove old-style function definitions.
170 2015-09-09 Chih-Hung Hsieh <chh@google.com>
172 * readelf.c (print_debug_exception_table): Initialize variable before
173 it is used, because compiler does not know that error never returns.
174 (dump_arhive_index): Likewise.
176 2015-09-04 Chih-Hung Hsieh <chh@google.com>
178 * elflint.c (check_group): Replace %Z length modifier with %z.
179 (check_note_data): Likewise.
180 * findtextrel.c (process_file): Likewise.
181 * readelf.c (handle_dynamic): Likewise.
182 (handle_symtab): Likewise.
183 (handle_verneed): Likewise.
184 (handle_verdef): Likewise.
185 (handle_versym): Likewise.
186 (print_hash_info): Likewise.
187 (print_decoded_aranges_section): Likewise.
188 (print_debug_aranges_section): Likewise.
189 (print_debug_line_section): Likewise.
190 (hex_dump): Likewise.
191 (dump_data_section): Likewise.
192 (print_string_section): Likewise.
193 (dump_archive_index): Likewise.
194 * unstrip.c (adjust_relocs): Likewise.
195 (collect_symbols): likewise.
196 (get_section_name): Likewise.
197 (find_alloc_sections_prelink): Likewise.
198 (copy_elided_sections): Likewise.
199 * ldscript.y (add_id_list): Add missing '%s'.
201 2015-09-03 Mark Wielaard <mjw@redhat.com>
203 * readelf.c (handle_core_item): Handle right shift >= 32 bits.
205 2015-08-11 Mark Wielaard <mjw@redhat.com>
207 * elflint.c (check_sections): When gnuld and a NOBITS section falls
208 inside a segment make sure any ELF file contents is zero.
210 2015-07-29 Mark Wielaard <mjw@redhat.com>
212 * unstrip.c (sections_flags_match): New function.
213 (sections_match): Use sections_flags_match.
214 (find_alloc_sections_prelink): Only clear matched sections if there
216 (copy_elided_sections): Add SHF_INFO_LINK to shdr_mem.sh_flags if
219 2015-06-27 Pino Toscano <toscano.pino@tiscali.it>
221 * src/strings.c: Define MAP_POPULATE if not defined already.
223 2015-06-27 Mark Wielaard <mjw@redhat.com>
225 * nm.c (show_symbols): First call elf_getdata, then allocate memory.
227 2015-06-18 Mark Wielaard <mjw@redhat.com>
229 * findtextrel.c (process_file): Free segments after use.
231 2015-06-18 Mark Wielaard <mjw@redhat.com>
233 * readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals
236 2015-06-18 Mark Wielaard <mjw@redhat.com>
238 * readelf.c (handle_gnu_hash): Free lengths on invalid_data.
240 2015-06-18 Mark Wielaard <mjw@redhat.com>
242 * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
243 exists. Warn otherwise.
245 2015-06-18 Mark Wielaard <mjw@redhat.com>
247 * nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
248 known whether or not we stack allocated memory.
250 2015-06-18 Mark Wielaard <mjw@redhat.com>
252 * strings.c (readelf): Use "<unknown>" if we cannot retrieve section
255 2015-06-09 Mark Wielaard <mjw@redhat.com>
257 * addr2line.c (print_dwarf_function): Always free scopes before
260 2015-06-09 Mark Wielaard <mjw@redhat.com>
262 * strip.c (handle_ar): Mark as unused.
263 (process_file): Produce an error when trying to handle an ar.
265 2015-05-30 Mark Wielaard <mjw@redhat.com>
267 * elfcmp.c (main): Only call memcmp when d_size != 0.
269 2015-05-23 Mark Wielaard <mjw@redhat.com>
271 * Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint,
272 findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage.
274 2015-05-21 Mark Wielaard <mjw@redhat.com>
276 * addr2line.c (handle_address): Set scopes to NULL after free.
278 2015-05-20 Mark Wielaard <mjw@redhat.com>
280 * addr2line.c (OPT_PRETTY): New constant define.
281 (argp_option): Add "pretty-print".
282 (pretty): New static bool.
283 (parse_opt): Set pretty.
284 (print_dwarf_function): Adjust output when pretty is set.
285 (print_addrsym): Likewise.
286 (handle_address): Likewise.
288 2015-05-20 Mark Wielaard <mjw@redhat.com>
290 * Makefile.am (addr2line_LDADD): Add demanglelib.
291 * addr2line.c (argp_option): Move demangle under output format.
292 (demangle): New static bool.
293 (demangle_buffer_len): New static size_t.
294 (demangle_buffer): New static char *.
295 (main): free demangle_buffer.
296 (parse_opt): Set demangle.
297 (symname): New static function.
298 (get_diename): Use symname.
299 (print_dwarf_function): Likewise.
300 (print_addrsym): Likewise.
301 (handle_address): Likewise.
303 2015-05-20 Mark Wielaard <mjw@redhat.com>
305 * addr2line.c (argp_option): Add "addresses", 'a'.
306 (print_addresses): New static bool.
307 (parse_opt): Set print_addresses.
308 (get_addr_width): New static function.
309 (handle_address): Print address if print_addresses is true.
311 2015-05-20 Mark Wielaard <mjw@redhat.com>
313 * addr2line.c (handle_address): Call strtoumax with base 16. Make
314 sure all input has been processed.
316 2015-05-20 Mark Wielaard <mjw@redhat.com>
318 * addr2line (argp_option): Group 'section' under "Input format
321 2015-05-12 Mark Wielaard <mjw@redhat.com>
323 * strip.c (debug_fd): New static variable.
324 (tmp_debug_fname): Likewise.
325 (cleanup_debug): New function using the above to clean up temporary
327 (INTERNAL_ERROR): Call cleanup_debug.
328 (handle_elf): Use debug_fd and tmp_debug_fname statics and call
329 cleanup_debug before any error. Use output_fname instead of fname in
330 error messages when it exists (-o was given). SHT_NOBITS sections
331 can also be moved freely even if SHF_ALLOC is set. Add various
332 sanity checks. Use elf_assert instead of plain assert.
334 2015-05-08 Mark Wielaard <mjw@redhat.com>
336 * nm.c (show_symbols): Call gelf_fsize with EV_CURRENT.
337 * strip.c (handle_elf): Likewise.
339 2015-05-06 Mark Wielaard <mjw@redhat.com>
341 * elflint.c (check_gnu_hash): Return early when 2nd hash function
342 shift too big. Check there is enough data available. Make sure
343 bitmask_words is not zero.
344 (check_verdef): Use Elf64_Word for shdr->sh_info cnt.
345 (check_verneed): Likewise.
346 (check_attributes): Break when vendor name isn't terminated.
347 Add overflow check for subsection_len.
349 2015-05-05 Mark Wielaard <mjw@redhat.com>
351 * nm.c (show_symbols): Handle dwarf_linesrc returning NULL.
353 2015-05-04 Max Filippov <jcmvbkbc@gmail.com>
355 * ar.c (do_oper_extract): Replace struct timeval with struct timespec
356 and futimes with futimens.
357 * strip.c (process_file): Replace struct timeval with struct timespec.
358 (handle_elf, handle_ar): Replace struct timeval with struct timespec
359 in prototype. Replace futimes with futimens.
361 2015-05-04 Max Filippov <jcmvbkbc@gmail.com>
363 * addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
367 * objdump.c: Likewise.
368 * ranlib.c: Likewise.
371 * unstrip.c: Likewise.
373 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
375 * Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
376 (ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
377 (elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
378 (ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
380 2015-03-22 Mark Wielaard <mjw@redhat.com>
382 * readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
383 before subtracting cie_id. And cast cie_offset to Dwarf_Off before
386 2015-03-22 Mark Wielaard <mjw@redhat.com>
388 * readelf.c (print_gdb_index_section): Check all offsets used
389 against section d_size.
391 2015-03-17 Mark Wielaard <mjw@redhat.com>
393 * readelf.c (print_debug): Don't return, but always use dummy_dbg.
395 2015-03-17 Mark Wielaard <mjw@redhat.com>
397 * readelf.c (print_gdb_index_section): Add overflow checking for
400 2015-03-14 Mark Wielaard <mjw@redhat.com>
402 * nm.c (INTERNAL_ERROR): Remove __DATE__.
403 * objdump.c (INTERNAL_ERROR): Likewise.
404 * size.c (INTERNAL_ERROR): Likewise.
405 * strip.c (INTERNAL_ERROR): Likewise.
407 2015-03-18 Petr Machata <pmachata@redhat.com>
409 * readelf.c (dwarf_tag_string, dwarf_attr_string)
410 (dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
411 (dwarf_encoding_string, dwarf_access_string)
412 (dwarf_visibility_string, dwarf_virtuality_string)
413 (dwarf_identifier_case_string, dwarf_calling_convention_string)
414 (dwarf_ordering_string, dwarf_discr_list_string)
415 (dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
416 to match the API changes.
418 2015-03-09 Mark Wielaard <mjw@redhat.com>
420 * elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
422 2015-01-03 Mark Wielaard <mjw@redhat.com>
424 * elfcmp (main): Check section name is not NULL. Check sh_entsize
425 is not zero for symbol tables. Check phdrs are not NULL.
426 (search_for_copy_reloc): Check sh_entsize is not zero.
428 2014-12-30 Mark Wielaard <mjw@redhat.com>
430 * elflint.c (check_scn_group): Check d_buf and name are not NULL.
431 (is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
433 (check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
434 (check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
435 Check shdr and symshdr sh_entsize are not zero.
436 (check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
437 Check symshdr->sh_entsize is not zero. Check data->d_buf is not
439 (compare_hash_gnu_hash): Check sections d_buf are not NULL.
440 Check section data is large enough. Use gnu_symbias.
441 (check_group): Check section val is valid.
442 (has_copy_reloc): Check sh_entsize is not zero.
443 (check_versym): Likewise.
444 (unknown_dependency_p): Likewise.
445 (check_verneed): Break on invalid ref or offset. Don't assert.
446 Report error when next offset is zero, but more vers expected.
447 (check_verdef): Likewise.
448 (check_attributes): Make sure d_buf is not NULL.
449 (check_note): Likewise.
450 (check_note_section): Likewise.
451 (check_program_header): Make sure section name is not NULL.
453 2014-12-26 Mark Wielaard <mjw@redhat.com>
455 * strings.c (read_elf): Produce error when section data falls outside
458 2014-12-26 Mark Wielaard <mjw@redhat.com>
460 * nm.c (show_symbols): Guard against divide by zero in error check.
461 Add section index number in error message.
463 2014-12-26 Mark Wielaard <mjw@redhat.com>
465 * nm.c (handle_ar): Skip over /SYM64/ entries.
467 2014-12-26 Mark Wielaard <mjw@redhat.com>
469 * nm.c (handle_ar): Break on arsym with invalid offset.
471 2014-12-20 Mark Wielaard <mjw@redhat.com>
473 * readelf.c (print_debug_macinfo_section): Mark cus sentinel files
474 as -1 non-existent. Check macoff against sentinel cus.
476 2014-12-20 Mark Wielaard <mjw@redhat.com>
478 * readelf.c (print_debug_exception_table): Add max_action overflow
479 check. Check action_table_end before reading slib128. Check
480 max_ar_filter underflow.
482 2014-12-18 Ulrich Drepper <drepper@gmail.com>
484 * Makefile.am: Suppress output of textrel_check command.
486 2014-12-17 Mark Wielaard <mjw@redhat.com>
488 * readelf.c (print_cfa_program): Add bounds check before each op that
489 takes at least one argument.
491 2014-12-16 Mark Wielaard <mjw@redhat.com>
493 * readelf.c (print_decoded_line_section): Print dwarf_errmsg if
494 dwarf_onesrcline or dwarf_linesrc fails.
496 2014-12-16 Mark Wielaard <mjw@redhat.com>
498 * readelf.c (print_debug_line_section): Correct overflow check for
500 (print_debug_aranges_section): Correct overflow check for length.
502 2014-12-15 Mark Wielaard <mjw@redhat.com>
504 * readelf.c (notice_listptr): Return false if offset doesn't fit
506 (attr_callback): Warn if loclist or rangelist offset doesn't fit.
508 2014-12-15 Mark Wielaard <mjw@redhat.com>
510 * readelf.c (print_ops): Don't assert when addr_size or ref_size
511 is not 4 or 8, just report invalid data.
513 2014-12-15 Mark Wielaard <mjw@redhat.com>
515 * readelf.c (print_gdb_index_section): Add more bounds checks.
517 2014-12-15 Mark Wielaard <mjw@redhat.com>
519 * readelf.c (print_debug_line_section): Check there is enough room
520 for DW_LNE_set_address argument. Make sure there is enough room
521 for the the initial unit_length.
523 2014-12-14 Mark Wielaard <mjw@redhat.com>
525 * elflint.c (check_attributes): Call get_uleb128 with end pointer.
526 * readelf.c (print_attributes): Likewise.
527 (print_ops): Likewise and also for get_sleb128.
528 (print_cfa_program): Likewise and add more readp bounds checks.
529 (read_encoded): Likewise.
530 (print_debug_frame_section): Likewise.
531 (print_debug_line_section): Likewise.
532 (print_debug_macinfo_section): Likewise.
533 (print_debug_macro_section): Likewise.
534 (print_debug_exception_table): Likewise.
536 2014-12-16 Mark Wielaard <mjw@redhat.com>
538 * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
539 difference doesn't wrap around before returning as int.
541 2014-12-11 Mark Wielaard <mjw@redhat.com>
543 * readelf.c (print_debug_exception_table): Check TType base offset
544 and Action table are sane.
546 2014-12-11 Mark Wielaard <mjw@redhat.com>
548 * readelf.c (print_debug_frame_section): Check number of augmentation
551 2014-12-09 Mark Wielaard <mjw@redhat.com>
553 * readelf.c (handle_file_note): Check count fits data section and
554 doesn't overflow fptr.
556 2014-12-08 Mark Wielaard <mjw@redhat.com>
558 * readelf.c (print_debug_exception_table): Report invalid data if
559 action table doesn't immediately follow call site table.
561 2014-12-10 Josh Stone <jistone@redhat.com>
563 * addr2line.c (get_diename): New, get linkage_name or name.
564 * addr2line.c (print_dwarf_function): Use get_diename.
565 * addr2line.c (handle_address): Likewise.
566 * addr2line.c (print_diesym): Removed.
568 2014-12-10 Josh Stone <jistone@redhat.com>
570 * addr2line.c (handle_address): Find the proper inline parents.
572 2014-12-07 Mark Wielaard <mjw@redhat.com>
574 * readelf.c (print_debug_line_section): max_ops_per_instr cannot
577 2014-12-07 Mark Wielaard <mjw@redhat.com>
579 * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
580 and DW_OP_GNU_implicit_pointer.
582 2014-12-04 Mark Wielaard <mjw@redhat.com>
584 * objdump.c (show_relocs_x): Make sure destshdr exists.
585 (show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
586 (show_relocs_rela): Likewise.
587 (show_relocs): Make sure destshdr, symshdr and symdata exists.
589 2014-11-30 Mark Wielaard <mjw@redhat.com>
591 * readelf.c (handle_sysv_hash64): Fix overflow check.
593 2014-11-28 Mark Wielaard <mjw@redhat.com>
595 * readelf.c (handle_relocs_rel): Don't reuse destshdr to store
596 section header of a relocation against a STT_SECTION symbol. Use
597 a new local variable secshdr.
598 (handle_relocs_rela): Likewise.
600 2014-11-26 Mark Wielaard <mjw@redhat.com>
602 * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
603 to ptrdiff_t for comparison.
605 2014-11-24 Mark Wielaard <mjw@redhat.com>
607 * readelf.c (print_debug_line_section): Check line_range is not zero
610 2014-11-23 Mark Wielaard <mjw@redhat.com>
612 * readelf.c (print_debug_aranges_section): Check length to catch
615 2014-11-21 Mark Wielaard <mjw@redhat.com>
617 * readelf.c (print_attributes): Guard against empty section.
618 Document attribute format. Break when vendor name isn't terminated.
619 Add overflow check for subsection_len. Handle both gnu and non-gnu
622 2014-11-22 Mark Wielaard <mjw@redhat.com>
624 * elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
625 * findtextrel.c (process_file): Use elf_getphdrnum.
626 * readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
627 (print_phdr): Check phnum.
628 * size.c (show_segments): Use elf_getphdrnum.
629 * strip.c (handle_elf): Likewise.
630 * unstrip.c (copy_elf): Likewise.
631 (copy_elided_sections): Likewise.
632 (handle_file): Likewise.
634 2014-11-18 Mark Wielaard <mjw@redhat.com>
636 * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
639 2014-11-17 Mark Wielaard <mjw@redhat.com>
641 * readelf.c (handle_verneed): Check vna_next and vn_next exist.
642 (handle_verdef): Check vda_next and vd_next exist.
643 (handle_versym): Check vd_next, vna_next and vn_next exist.
644 Check vername and filename are not NULL before use.
646 2014-11-17 Mark Wielaard <mjw@redhat.com>
648 * elfcmp.c (main): Check section names are NULL before use.
649 * objdump.c (section_match): Likewise.
650 * size.c (show_sysv): Likewise.
652 2014-11-17 Mark Wielaard <mjw@redhat.com>
654 * readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
655 or 8 instead of just calling print_cfa_program.
657 2014-11-16 Mark Wielaard <mjw@redhat.com>
659 * readelf (process_elf_file): Set phnum to zero if there aren't
660 actually any pheaders.
661 (print_phdr): Check there actually is a phdr.
663 2014-11-16 Mark Wielaard <mjw@redhat.com>
665 * readelf.c (print_cfa_program): Check block len before calling
668 2014-11-14 Mark Wielaard <mjw@redhat.com>
670 * readelf.c (print_debug_frame_section): Sanity Check CIE
671 unit_length and augmentationlen.
673 2014-11-14 Mark Wielaard <mjw@redhat.com>
675 * readelf.c (handle_versym): Check def == NULL before use.
677 2014-11-08 Mark Wielaard <mjw@redhat.com>
679 * readelf.c (handle_versym): Initialize vername and filename array
682 2014-11-07 Mark Wielaard <mjw@redhat.com>
684 * readelf.c (handle_sysv_hash): Sanity check section contents.
685 (handle_sysv_hash64): Likewise.
686 (handle_gnu_hash): Likewise.
688 2014-09-14 Petr Machata <pmachata@redhat.com>
690 * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
692 2014-09-12 Petr Machata <pmachata@redhat.com>
694 * readelf.c (encoded_ptr_size): In the switch statement, change
695 magic constants 3 and 4 to DW_EH_PE_* counterparts. Still accept
696 0. Print diagnostic for anything else.
698 2014-08-25 Josh Stone <jistone@redhat.com>
700 * Makefile.am: Prevent premature @AR@ replacement in a sed expression.
702 2014-07-04 Menanteau Guy <menantea@linux.vnet.ibm.com>
703 Mark Wielaard <mjw@redhat.com>
705 * elflint (check_symtab): Add ".TOC." to the list of possibly
706 dangling symbols because of sourceware PR13621.
708 2014-06-14 Mark Wielaard <mjw@redhat.com>
710 * elflint (check_symtab): Use ebl_func_addr_mask on st_value.
712 2014-05-27 Mark Wielaard <mjw@redhat.com>
714 * readelf.c (print_debug): Skip section if name is NULL.
716 2014-05-26 Mark Wielaard <mjw@redhat.com>
718 * readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
719 does, when sh_info == 0.
721 2014-05-26 Mark Wielaard <mjw@redhat.com>
723 * unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
724 section when sh_size of the original and undo .bss section are equal.
726 2014-05-26 Mark Wielaard <mjw@redhat.com>
728 * unstrip.c (options): Add --force, -F.
729 (struct arg_info): Add bool force.
730 (parse_opt): Handle 'F', set force.
731 (handle_explicit_files): Add force argument, add warn function,
732 separate check ehdr field checks, use warn.
733 (handle_dwfl_module): Add force argument, pass on to
734 handle_explicit_files.
735 (handle_output_dir_module): Add force argument, pass on to
737 (handle_implicit_modules): Pass info->force to handle_dwfl_module and
738 handle_output_dir_module.
739 (main): Pass info.force to handle_explicit_files.
741 2014-05-19 Mark Wielaard <mjw@redhat.com>
743 * elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
745 2014-05-01 Mark Wielaard <mjw@redhat.com>
747 * readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
748 if looking for alternate debug file.
750 2014-04-11 Mark Wielaard <mjw@redhat.com>
752 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
754 2014-04-22 Mark Wielaard <mjw@redhat.com>
756 * readelf.c (handle_core_item): Make sure variable length array
757 contains at least enough space for terminating zero char.
759 2014-04-22 Mark Wielaard <mjw@redhat.com>
761 * readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
764 2014-03-13 Mark Wielaard <mjw@redhat.com>
766 * Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
768 * strings.c (process_chunk): Remove _MUDFLAP condition.
770 2014-04-09 Mark Wielaard <mjw@redhat.com>
772 * readelf.c (print_debug_aranges_section): Don't get the raw section
773 data, use the possibly decompressed .[z]debug sectiondata.
774 (print_debug_ranges_section): Likewise.
775 (print_debug_frame_section): Likewise.
776 (print_debug_line_section): Likewise.
777 (print_debug_loc_section): Likewise.
778 (print_debug_macinfo_section): Likewise.
779 (print_debug_macro_section): Likewise.
781 2014-04-10 Mark Wielaard <mjw@redhat.com>
783 * readelf.c (buf_read_ulong): Pass actual long size to convert.
785 2014-03-05 Mark Wielaard <mjw@redhat.com>
787 * readelf.c (attr_callback): Print DW_FORM_sdata values as signed
790 2014-02-24 Mark Wielaard <mjw@redhat.com>
792 * readelf (print_phdr): Check there is a SHT_PROGBITS section at the
793 offset given by p_offsets for a PT_INTERP segment before trying to
794 display the interpreter string.
796 2014-02-07 Mark Wielaard <mjw@redhat.com>
798 * readelf.c (print_phdr): Check phdr->p_filesz and make sure
799 interpreter string is zero terminated before calling printf.
801 2014-01-22 Mark Wielaard <mjw@redhat.com>
803 * Makefile.am (nm_no_Wformat): Removed.
804 (size_no_Wformat): Likewise.
805 (strings_no_Wformat): Likewise.
806 (addr2line_no_Wformat): Likewise.
807 * size.c (show_sysv): Use fmtstr directly as literal in printf.
808 (show_sysv_one_line): Likewise.
809 * strings.c (locfmt): Removed.
810 (radix): New static enum.
811 (parse_opt): Set radix, not locfmt.
812 (process_chunk_mb): Use fmtstr directly as literal in printf based
814 (process_chunk): Likewise.
815 * nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
816 (show_symbols_bsd): Likewise.
817 (show_symbols_posix): Likewise.
819 2014-01-21 Mark Wielaard <mjw@redhat.com>
821 * stack.c (show_inlines): New static boolean.
822 (print_frame): New function split out from...
823 (print_frames): ..here. If show_inlines is true and we found a
824 DIE for the frame address, call print_inline_frames otherwise
825 call print_frame. Keep track of and track frame_nr.
826 (print_inline_frames): New function.
827 (parse_opt): Handle '-i'.
828 (main): Add 'i' to options.
830 2014-01-27 Mark Wielaard <mjw@redhat.com>
832 * stack.c (maxframes): Initialize to 256.
833 (main): Document new default in options. Document magic number
834 used in frames.allocated initialization.
836 2014-01-20 Mark Wielaard <mjw@redhat.com>
838 * stack.c (show_debugname): New static boolean.
839 (die_name): New function.
840 (print_frames): If show_debugname is true set symname to the
841 first function-like DIE with a name in scope for the address in
843 (parse_opt): Handle '-d'.
844 (main): Add 'd' to options.
846 2014-01-20 Mark Wielaard <mjw@redhat.com>
848 * addr2line.c (handle_address): Initialize scopes to NULL.
850 2014-01-17 Roland McGrath <roland@redhat.com>
852 * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
853 st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
854 Don't use assert on input values, instead bail with "illformed" error.
856 2014-01-17 Roland McGrath <roland@redhat.com>
858 * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
859 (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
860 (handle_scngrp): Check for bogus sh_info.
862 2014-01-17 Jakub Jelinek <jakub@redhat.com>
864 * elflint.c (section_name): Return "<invalid>" instead of
865 crashing on invalid section name.
866 (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
867 check_symtab_shndx, check_hash, check_versym): Robustify.
868 (check_hash): Don't check entries beyond end of section.
869 (check_note): Don't crash if gelf_rawchunk fails.
871 2014-01-17 Petr Machata <pmachata@redhat.com>
873 * readelf.c (handle_dynamic, handle_relocs_rel)
874 (handle_relocs_rela, handle_versym, print_liblist):
875 Use gelf_fsize instead of relying on shdr->sh_entsize.
877 2014-01-14 Mark Wielaard <mjw@redhat.com>
879 * readelf.c (print_debug_macro_section): Clear vendor array before
882 2014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
884 Fix corruption of non-C++ symbols by the demangler.
885 * nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
886 (show_symbols): Check for _Z.
887 * stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
889 2014-01-02 Mark Wielaard <mjw@redhat.com>
891 * stack.c (show_raw): Declare unconditionally.
892 (parse_opt): Handle '-r' unconditionally.
893 (main): Show "raw" option even without USE_DEMANGLE.
895 2014-01-02 Mark Wielaard <mjw@redhat.com>
897 * stack.c (print_frames): Print 0x before build-id hex-offset.
899 2014-01-02 Mark Wielaard <mjw@redhat.com>
901 * stack.c (maxframes): Increase to 2048.
902 (struct frames): Add allocated field.
903 (frame_callback): If frames used is frames allocated, realloc.
904 (print_frames): Show an error if maxframes has been reached.
905 (parse_opt): Allow -n 0 for unlimited frames.
906 (main): Document -n 0 and new default 2048 frames. Allocate initial
907 number of frames with malloc.
909 2013-12-30 Mark Wielaard <mjw@redhat.com>
911 * stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
912 or dwfl_core_file_attach and check for errors.
914 2013-12-28 Mark Wielaard <mjw@redhat.com>
916 * stack.c (print_frames): Remove address width code and use...
917 (get_addr_width): ...this new function.
918 (show_modules): New static boolean.
919 (module_callback): New static function.
920 (parse_opt): Handle '-l'.
921 (main): Add 'l' to options. If show_modules then use dwfl_getmodules
922 with module_callback to show all detected modules and possible
923 build_id, elf and dwarf files.
925 2013-12-27 Mark Wielaard <mjw@redhat.com>
927 * stack.c (frames_shown): New static boolean.
928 (EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
929 (frame_callback): Return -1 on error. Don't print error.
930 (print_frames): Add arguments, tid, dwflerr and what. Print tid.
931 If there was an error report it with address and module if possible.
932 Record whether any frames were actually printed.
933 (thread_callback): Collect tid and err, pass it to print_frames.
934 (parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
935 if dwfl_linux_proc_report returned it. Check whether we are properly
936 attached with dwfl_pid.
937 (main): Document exit status. Don't report DWARF_CB_ABORT from
938 callbacks as error. Pass real errors to print_frames. Return
939 EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
940 were any non-fatal errors.
942 2013-12-23 Mark Wielaard <mjw@redhat.com>
944 * Makefile.am (stack_LDADD): Add demanglelib.
945 * stack.c (show_quiet): New static boolean, default false.
946 (show_raw): Likewise.
947 (demangle_buffer_len): New static size_t.
948 (demangle_buffer): New static char *.
949 (print_frames): Don't resolve pc name if show_quiet. Demangle name
951 (parse_opt): Handle '-q' and '-r'.
952 (main): Add 'q' and 'r' to options. Free demangle_buffer.
954 2013-12-23 Mark Wielaard <mjw@redhat.com>
956 * stack.c (OPT_DEBUGINFO): New define.
957 (OPT_COREFILE): Likewise.
962 (debuginfo_path): Likewise.
963 (parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
964 Do argument sanity checking. Setup Dwfl.
965 (main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
966 Remove argp_child children, simplify argp doc, remove custom
967 usage message and construction of dwfl with dwfl_standard_argp.
968 Use pid directly as tid. close core and core_fd if opened. Print
969 pid of process or core.
971 2013-12-23 Mark Wielaard <mjw@redhat.com>
973 * stack.c (show_build_id): New static boolean.
974 (print_frames): Print module build-id, load address and pc offset
975 if show_build_id is true.
976 (parse_opt): Handle '-b'.
977 (main): Add -b to options.
979 2013-12-22 Mark Wielaard <mjw@redhat.com>
981 * stack.c (maxframes): New static unsigned. Initialize to 64.
982 (struct frame): New struct.
983 (struct frames): Likewise.
984 (dwfl): New static Dwfl pointer.
985 (frame_callback): Use arg as struct frames and fill it next frame.
986 Return DWARF_CB_ABORT when maxframes has been reached. Move
987 printing of frame to...
988 (print_frames): ...here. New function.
989 (thread_callback): Use arg as struct frames and set frames to zero.
991 (parse_opt): Handle '-n'.
992 (main): Add -n to options. Allocate frames using maxframes. Pass
993 frames to frame_callback and thread_callback.
995 2013-12-20 Mark Wielaard <mjw@redhat.com>
997 * stack.c (show_one_tid): New static boolean.
998 (parse_opt): Handle '-1'.
999 (main): Add -1 to options. Call dwfl_getthread_frames when
1000 show_one_tid is true.
1002 2013-12-18 Mark Wielaard <mjw@redhat.com>
1004 * addr2line.c (options): Add symbol-sections, 'x'.
1005 (show_symbol_sections): New static bool.
1006 (parse_opt): Handle 'x'.
1007 (print_addrsym): Use dwfl_module_addrinfo value.r
1008 Also show section of address with show_symbol_sections.
1009 (find_symbol): Use dwfl_module_getsym_info and set value.
1010 (handle_address): Request value and use it instead of sym.st_value.
1011 * readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
1014 2013-12-17 Masatake YAMATO <yamato@redhat.com>
1015 Mark Wielaard <mjw@redhat.com>
1017 * stack.c (show_activation, show_module, show_source): New variables.
1018 (parse_opt): Set show_activation if -a option is given.
1019 Set show_module if -m option is given. Set show_source if -s option
1020 is given. Set all show booleans when -v option is given.
1021 (main): Added `-a', `-m', `-s', and `-v' to the help message.
1022 (frame_callback): Print module and source file information.
1024 2013-11-25 Petr Machata <pmachata@redhat.com>
1026 * elflint.c (valid_e_machine): Add EM_AARCH64.
1028 2013-11-14 Petr Machata <pmachata@redhat.com>
1030 * readelf.c (handle_core_item) <'h'>: New branch for handling
1031 fields that shouldn't be displayed.
1033 2013-11-10 Mark Wielaard <mjw@redhat.com>
1035 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1036 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1037 (print_version): New function.
1039 2013-11-09 Mark Wielaard <mjw@redhat.com>
1041 * arlib.c (arlib_init): Call snprintf before using the result
1043 (arlib_finalize): Likewise.
1044 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
1046 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1048 * Makefile.am (bin_PROGRAMS): Add stack.
1050 * stack.c: New file.
1052 2013-11-05 Mark Wielaard <mjw@redhat.com>
1054 * readelf.c (print_debug_ranges_section): Cast address to size_t
1056 (print_debug_loc_section): Likewise.
1058 2013-10-18 Mark Wielaard <mjw@redhat.com>
1060 * ar.c (main): Correct operation check when instance_specifed is set.
1062 2013-09-26 Petr Machata <pmachata@redhat.com>
1064 * readelf.c (handle_file_note): New function.
1065 (handle_notes_data): Call it to handle NT_FILE notes.
1067 2013-09-26 Petr Machata <pmachata@redhat.com>
1069 * readelf.c (handle_siginfo_note): New function.
1070 (handle_notes_data): Call it to handle NT_SIGINFO notes.
1071 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
1073 2013-08-13 Mark Wielaard <mjw@redhat.com>
1075 * addr2line.c (options): Add "inlines", 'i'.
1076 (show_inlines): New bool.
1077 (parse_opt): Handle 'i'.
1078 (print_diesym): New static function.
1079 (print_src): New function taking code from...
1080 (handle_address): here. Call print_src. Print inlines.
1082 2013-08-12 Mark Wielaard <mjw@redhat.com>
1084 * addr2line.c (main): If there is a newline char at end of buf,
1087 2013-07-05 Mark Wielaard <mjw@redhat.com>
1089 * readelf.c (print_ops): Take CU as argument, use it to print
1090 parameter_ref DIE offset.
1091 (struct listptr): Replace base field with cu.
1092 (listptr_base): New function.
1093 (compare_listptr): Use listptr_base.
1094 (notice_listptr): Take CU as argument.
1095 (skip_listptr_hole): Likewise.
1096 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
1097 (print_cfa_program): Pass NULL as CU to print_ops.
1098 (struct attrcb_args): Replace cu_base field with cu.
1099 (attr_callback): Pass cu not cu_base to notice_listptr.
1100 (print_debug_units): Don't calculate base, just set cu.
1101 (print_debug_loc_section): Pass cu to skip_listptr_hole and
1104 2013-05-06 Mark Wielaard <mjw@redhat.com>
1106 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
1107 argument as DIE offset.
1109 2013-04-24 Mark Wielaard <mjw@redhat.com>
1111 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1113 2013-03-25 Mark Wielaard <mjw@redhat.com>
1115 * readelf.c (argp_options): Add decodedline.
1116 (decodedline): New boolean initialized to false.
1117 (parse_opt): Set decodedline when arg is decodedline.
1118 (print_decoded_line_section): New function.
1119 (print_debug_line_section): Call print_decoded_line_section when
1120 decodedline is true.
1122 2013-03-25 Mark Wielaard <mjw@redhat.com>
1124 * readelf.c (argp_option): Add decodedaranges.
1125 (decodedaranges): New boolean initialized to false.
1126 (parse_opt): Set decodedaranges when arg is decodedaranges.
1127 (print_debug_aranges_section): Reimplemented and original
1128 implementation renamed to...
1129 (print_decoded_aranges_section): this.
1131 2013-03-25 Mark Wielaard <mjw@redhat.com>
1133 * readelf.c (attrcb_args): Add Dwarf_Die.
1134 (attr_callback): When highpc is in constant form also print as
1136 (print_debug_units): Set args.die.
1138 2013-03-19 Mark Wielaard <mjw@redhat.com>
1140 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
1142 2013-03-18 Mark Wielaard <mjw@redhat.com>
1144 * readelf.c (print_gdb_index_section): Accept version 8.
1146 2013-03-01 Mark Wielaard <mjw@redhat.com>
1148 * findtextrel.c (process_file): Release ELF and close file when not
1149 text relocations are found.
1150 * strip.c (handle_elf): Track memory used for .debuglink section data
1153 2013-02-24 Mark Wielaard <mjw@redhat.com>
1155 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
1156 allowed to have out of section values because of GNU ld bugs.
1158 2013-02-06 Mark Wielaard <mjw@redhat.com>
1160 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
1161 list of symbols allowed to have out of section values because of
1162 GNU ld bugs in either .symtab or .dynsym, but only when they are
1165 2013-01-24 Mark Wielaard <mjw@redhat.com>
1167 * readelf.c (argp_option): Add unresolved-address-offsets, U.
1168 (print_unresolved_addresses): New static.
1169 (parse_opt): Handle 'U', set print_unprocessed_values.
1170 (format_dwarf_addr): Take and handle new raw argument.
1171 (print_ops): Call format_dwarf_addr with raw offset values.
1172 (print_debug_ranges_section): Likewise.
1173 (print_debug_frame_section): Likewise.
1174 (attr_callback): Likewise.
1175 (print_debug_line_section): Likewise.
1176 (print_debug_loc_section): Likewise.
1177 (print_gdb_index_section): Likewise.
1179 2013-01-18 Mark Wielaard <mjw@redhat.com>
1181 * readelf.c (struct listptr): Add base Dwarf_Addr field.
1182 (compare_listptr): Warn for same offset with different base.
1183 (notice_listptr): Take base argument and set it.
1184 (skip_listptr_hole): Likewise.
1185 (struct attrcb_args): Removed unused cu_offset field.
1186 Add cu_base Dwarf_Addr field.
1187 (attr_callback): Call notice_listptr with cbargs->cu_base.
1188 (print_debug_units): Set args.cu_base.
1189 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
1190 (print_debug_loc_section): Likewise.
1192 2013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
1194 * readelf.c (handle_core_items): Limit special repeated items handling
1195 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
1197 2012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
1199 * readelf.c (ELF_INPUT_SECTION): New argp key value.
1200 (argp_option): Add elf-section.
1201 (elf_input_section): New static.
1202 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
1203 (open_input_section): New function.
1204 (process_file): Call open_input_section if elf_input_section set.
1206 2013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
1208 ar.c (do_oper_delete): Fix num passed to memset.
1210 2012-12-21 Mark Wielaard <mjw@redhat.com>
1212 * readelf.c (print_debug_frame_section): Adjust FDE start address
1213 if pcrel before feeding it to format_dwarf_addr.
1215 2012-12-21 Mark Wielaard <mjw@redhat.com>
1217 * addr2line.c (main): Call dwfl_end.
1219 2012-12-11 Roland McGrath <roland@hack.frob.com>
1221 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
1223 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
1225 2012-10-16 Mark Wielaard <mjw@redhat.com>
1227 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
1228 calculated beginning after the operand and 2-byte constant.
1230 2012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1232 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
1233 (WRAP_COLUMN): ... here.
1234 (print_core_item): Remove parameter format_max. Update function
1235 comment. Replace FORMAT_MAX by the real output width.
1236 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
1237 calls of print_core_item, remove variable maxfmt, change
1238 ITEM_WRAP_COLUMN to WRAP_COLUMN.
1239 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
1240 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
1242 2012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1244 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
1245 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
1247 2012-08-27 Mark Wielaard <mjw@redhat.com>
1249 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
1251 2012-08-27 Mark Wielaard <mjw@redhat.com>
1253 * readelf.c (register_info): Handle loc == NULL.
1255 2012-08-22 Jeff Kenton <jkenton@tilera.com>
1257 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
1259 2012-08-16 Mark Wielaard <mjw@redhat.com>
1261 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
1262 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
1264 (dwarf_attr_name): Likewise.
1265 (dwarf_form_name): Likewise.
1266 (dwarf_lang_name): Likewise.
1267 (dwarf_inline_name): Likewise.
1268 (dwarf_encoding_name): Likewise.
1269 (dwarf_access_name): Likewise.
1270 (dwarf_visibility_name): Likewise.
1271 (dwarf_virtuality_name): Likewise.
1272 (dwarf_identifier_case_name): Likewise.
1273 (dwarf_calling_convention_name): Likewise.
1274 (dwarf_ordering_name): Likewise.
1275 (dwarf_discr_list_name): Likewise.
1276 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
1277 (attr_callback): Call new dwarf_foobar_name instead of old
1278 dwarf_foobar_string functions.
1279 (dwarf_tag_string): New function using known-dwarf.h macros.
1280 (dwarf_attr_string): Likewise.
1281 (dwarf_form_string): Likewise.
1282 (dwarf_lang_string): Likewise.
1283 (dwarf_inline_string): Likewise.
1284 (dwarf_encoding_string): Likewise.
1285 (dwarf_access_string): Likewise.
1286 (dwarf_visibility_string): Likewise.
1287 (dwarf_virtuality_string): Likewise.
1288 (dwarf_identifier_case_string): Likewise.
1289 (dwarf_calling_convention_string): Likewise.
1290 (dwarf_ordering_string): Likewise.
1291 (dwarf_discr_list_string): Likewise.
1292 (dwarf_locexpr_opcode_string): Likewise.
1294 2012-06-27 Mark Wielaard <mjw@redhat.com>
1296 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
1297 DW_FORM_GNU_strp_alt.
1298 (attr_callback): Likewise.
1300 2012-07-30 Petr Machata <pmachata@redhat.com>
1302 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
1303 corresponding printf) so that those that are referenced by only
1304 one of the formatting strings are at the end.
1306 2012-07-29 Mark Wielaard <mjw@redhat.com>
1308 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
1309 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
1311 2012-07-19 Mark Wielaard <mjw@redhat.com>
1313 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
1315 2012-07-11 Mark Wielaard <mjw@redhat.com>
1317 * readelf.c (options): Add macro to help of debug-dump.
1318 (section_e): Add section_macro.
1319 (section_all): Add section_macro.
1320 (parse_opt): Handle macro.
1321 (print_debug_macro_section): New function.
1322 (print_debug): Add NEW_SECTION (macro).
1324 2012-07-10 Mark Wielaard <mjw@redhat.com>
1326 * readelf.c (print_gdb_index_section): Add version 7 support.
1327 Keep track of cu_nr. Print kind and static/global flag for each
1328 symbol. When a symbol is in the TU list add 'T'.
1330 2012-06-26 Mark Wielaard <mjw@redhat.com>
1332 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
1334 2012-06-22 Mark Wielaard <mjw@redhat.com>
1336 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
1337 for gcc 4.7 -Wformat.
1339 2012-05-09 Roland McGrath <roland@hack.frob.com>
1341 * elflint (check_sections): Allow zero sized sections at (filesz) end
1342 of segment. And make check overflow-proofed.
1344 2012-04-24 Mark Wielaard <mjw@redhat.com>
1346 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
1347 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
1349 2012-03-28 Roland McGrath <roland@hack.frob.com>
1351 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
1353 2012-03-28 Mark Wielaard <mjw@redhat.com>
1355 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
1357 (print_debug_str_section): Likewise.
1359 2012-03-21 Mark Wielaard <mjw@redhat.com>
1361 * readelf.c (print_gdb_index_section): Accept version 6.
1363 2012-01-31 Mark Wielaard <mjw@redhat.com>
1365 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
1367 2012-01-21 Ulrich Drepper <drepper@gmail.com>
1369 * addr2line.c: Update copyright year.
1371 * elfcmp.c: Likewise.
1372 * elflint.c: Likewise.
1373 * findtextrel.c: Likewise.
1376 * objdump.c: Likewise.
1377 * ranlib.c: Likewise.
1378 * readelf.c: Likewise.
1380 * strings.c: Likewise.
1381 * strip.c: Likewise.
1382 * unstrip.c: Likewise.
1384 * nm.c (argp_children): Define.
1385 (argp): Hook up argp_children.
1386 (handle_ar): Optimize puts call.
1387 (show_symbols_bsd): Use positional parameters to also print color
1388 codes. Don't print STT_FILE symbols.
1389 * objdump.c (options): Improve help text.
1390 (argp_children): Define.
1391 (argp): Hook up argp_children.
1392 (disasm_info): Add elements for color codes.
1393 (disasm_output): Print color codes as well.
1394 (show_disasm): Set up disasm_info data for callback.
1396 2012-01-20 Roland McGrath <roland@hack.frob.com>
1398 * arlib-argp.c (arlib_deterministic_output): Initialize from
1400 (help_filter): New function.
1403 * ar.c (main): Handle oper_none as usage error.
1405 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
1407 * ranlib.c (argp): Use arlib_argp_children.
1409 * arlib.c (arlib_init): Obey arlib_deterministic_output.
1411 * arlib-argp.c: New file.
1412 * Makefile.am (libar_a_SOURCES): Add it.
1413 * arlib.h (arlib_deterministic_output, arlib_argp_children):
1414 Declare new variables.
1415 * ar.c (deterministic_output): Variable removed.
1416 (do_oper_insert): Use arlib_deterministic_output instead.
1417 (options, parse_opt): Don't handle -D here. Add group numbers.
1418 (argp): Use arlib_argp_children.
1420 2011-12-20 Roland McGrath <roland@hack.frob.com>
1422 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
1423 Reported by Karel Klic <kklic@redhat.com>.
1425 2011-11-05 Roland McGrath <roland@hack.frob.com>
1427 * ar.c (deterministic_output): New flag variable.
1428 (options, parse_opt): Grok -D to set it.
1429 (do_oper_insert): When set, use zero from mtime, uid, and gid.
1431 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
1433 2011-10-04 Marek Polacek <mpolacek@redhat.com>
1435 * readelf.c (register_info): Assume the right size of an array.
1437 2011-10-03 Ulrich Drepper <drepper@gmail.com>
1439 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
1440 but don't show it in help anymore.
1441 (mark_special): Renamed from mark_weak.
1442 (parse_opt): Adjust.
1443 (class_type_char): Take additional parameters for ELF file and ELF
1444 header. Treat TLS symbols like objects.
1445 In case of D symbols, show u for unique symbols, R for symbols in
1446 read-only sections, B for symbols in BSS sections.
1447 (show_symbols_bsd): Take additional parameters for ELF file and ELF
1448 header. Adjust for class_type_char change. Show TLS symbols with
1449 @ after them in case --mark-special is selected.
1450 (show_symbols_posix): Likewise.
1451 (show_symbols): Adjust calls to show_symbols_bsd and
1453 (show_symbols_sysv): Avoid printing adress and size for undefined
1454 symbols. Don't print initial special entry and section entries.
1456 2011-10-02 Ulrich Drepper <drepper@gmail.com>
1458 * Makefile.am (demanglelib): Define.
1459 (nm_LDADD): Add demanglelib.
1460 * nm.c (options): Add -C option.
1461 (demangle): Define as global variable.
1462 (parse_opt): Recognize -C.
1463 (show_symbols_sysv): Handle demangling.
1464 (show_symbols_bad): Likewise.
1465 (show_symbols_posix): Likewise.
1466 (show_symbols): Likewise.
1468 2011-07-09 Roland McGrath <roland@hack.frob.com>
1470 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
1472 * ar.c (parse_opt): Grok -u.
1474 2011-05-30 Mark Wielaard <mjw@redhat.com>
1476 * strip.c (relocate): Make offset check overflow-proof.
1478 2011-05-23 Mark Wielaard <mjw@redhat.com>
1480 * strip.c (relocate): Take new arguments is_rela to indicate
1481 whether the relocation is from a SHT_REL or SHT_RELA section.
1482 Relocate against any debug section symbol, not just STT_SECTION
1483 symbols. For SHT_REL relocations, fetch addend from offset and
1484 add it to symbol value if not zero.
1486 2011-05-23 Mark Wielaard <mjw@redhat.com>
1488 * strip.c (OPT_RELOC_DEBUG): New option.
1489 (argp_option): Add new --reloc-debug-sections option.
1490 (main): Check new option.
1491 (parse_opt): Likewise.
1492 (handle_elf): Remove any relocations between debug sections
1493 in ET_REL for the debug file when requested.
1495 2011-05-18 Mark Wielaard <mjw@redhat.com>
1497 * strip.c (handle_elf): Make sure all sections of a removed group
1498 section are removed too. Don't discard SHT_GROUP sections, copy
1499 section table before it gets modified. Section group signature
1500 symbols don't have to be retained.
1502 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1504 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
1505 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
1506 and DW_OP_GNU_reinterpret.
1508 2011-05-17 Mark Wielaard <mjw@redhat.com>
1510 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
1511 DW_TAG_GNU_call_site_parameter return strings.
1513 2011-05-11 Marek Polacek <mpolacek@redhat.com>
1515 * nm.c (show_symbols_sysv): Remove unused if/else, remove
1516 unused `prefix' and `fname' parameters.
1518 2011-05-07 Marek Polacek <mpolacek@redhat.com>
1520 * unstrip.c (compare_sections_nonrel): Mark this function as static.
1522 2011-04-26 Mark Wielaard <mjw@redhat.com>
1524 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
1527 2011-04-14 Mark Wielaard <mjw@redhat.com>
1529 * readelf.c (options): Add gdb_index.
1530 (section_e): Define section_gdb_index.
1531 (parse_opt): Recognize gdb_index debug-dump argument.
1532 (print_gdb_index_section): New function.
1533 (print_debug): Add gdb_index to debug_sections.
1535 2011-03-24 Petr Machata <pmachata@redhat.com>
1537 * readelf.c (print_debug_line_section): Emit initial space for all
1538 opcode lines. Print offset in front of each opcode.
1540 2011-03-22 Marek Polacek <mpolacek@redhat.com>
1542 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
1544 2011-03-22 Mark Wielaard <mjw@redhat.com>
1546 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
1547 and DW_TAG_GNU_call_site_parameter.
1548 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
1549 DW_AT_GNU_call_site_data_value,
1550 DW_AT_GNU_call_site_target,
1551 DW_AT_GNU_call_site_target_clobbered,
1552 DW_AT_GNU_tail_call,
1553 DW_AT_GNU_all_tail_call_sites,
1554 DW_AT_GNU_all_call_sites,
1555 and DW_AT_GNU_all_source_call_sites.
1556 (print_ops): Handle DW_OP_GNU_entry_value.
1557 (attr_callback): Handle DW_AT_GNU_call_site_value,
1558 DW_AT_GNU_call_site_data_value,
1559 DW_AT_GNU_call_site_target,
1560 and DW_AT_GNU_call_site_target_clobbered.
1562 2011-03-10 Mark Wielaard <mjw@redhat.com>
1564 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
1566 2011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
1568 * readelf.c (reset_listptr): Clear TABLE->TABLE.
1570 2011-02-25 Mark Wielaard <mjw@redhat.com>
1572 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
1573 (dwarf_form_string): Properly format and return unknown form.
1575 2011-02-23 Roland McGrath <roland@redhat.com>
1577 * readelf.c (section_name): New function.
1578 (print_debug_abbrev_section): Use it instead of constant.
1579 (print_debug_aranges_section): Likewise.
1580 (print_debug_ranges_section): Likewise.
1581 (print_debug_units): Likewise.
1582 (print_debug_line_section): Likewise.
1583 (print_debug_loc_section): Likewise.
1584 (print_debug_macinfo_section): Likewise.
1585 (print_debug_pubnames_section): Likewise.
1586 (print_debug_str_section): Likewise.
1587 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
1588 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
1589 (print_debug_str_section): Likewise.
1591 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
1593 2011-02-11 Roland McGrath <roland@redhat.com>
1595 * elfcmp.c (verbose): New variable.
1596 (options, parse_opt): Grok -l/--verbose to set it.
1597 (main): Under -l, keep going after first difference.
1599 * elfcmp.c (ignore_build_id): New variable.
1600 (options, parse_opt): Grok --ignore-build-id to set it.
1601 (main): For SHT_NOTE sections, compare note details rather than raw
1602 bytes. Under --ignore-build-id, don't complain about differing build
1603 ID contents if lengths match.
1605 2011-02-08 Roland McGrath <roland@redhat.com>
1607 * ldscript.y (filename_id_star): Remove unused variable.
1609 * unstrip.c (copy_elided_sections): Remove unused variable.
1611 * elflint.c (check_dynamic): Remove unused variables.
1613 * elflint.c (check_symtab): Warn about missing xndx section only once.
1615 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
1617 2011-01-06 Roland McGrath <roland@redhat.com>
1619 * strip.c (handle_elf): Under --strip-sections, remove all
1620 non-allocated sections and never generate .gnu_debuglink.
1622 2011-01-04 Roland McGrath <roland@redhat.com>
1624 * strip.c (remove_shdrs): New variable.
1625 (options, parse_opt): Grok --strip-sections to set it.
1626 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
1628 2010-11-10 Roland McGrath <roland@redhat.com>
1630 * findtextrel.c (process_file): Don't assume order of sections.
1631 Reported by Mike Hommey <mh@glandium.org>.
1633 2010-07-26 Roland McGrath <roland@redhat.com>
1635 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
1637 2010-08-30 Roland McGrath <roland@redhat.com>
1639 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
1640 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
1642 (struct listptr, struct listptr_table): New types.
1643 (compare_listptr, reset_listptr, sort_listptr): New functions.
1644 (notice_listptr, skip_listptr_hole): New functions.
1645 (struct attrcb_args): Add silent member.
1646 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
1647 Suppress output if silent, but still call notice_listptr.
1648 (print_debug_units): Suppress output if section_info not requested.
1649 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
1650 (print_debug_ranges_section): Likewise.
1651 (print_debug): Call reset_listptr on both tables.
1653 * readelf.c (print_debug_ranges_section): Print empty list.
1654 (print_debug_loc_section): Likewise.
1656 * readelf.c (print_debug_loc_section): Check for bogus length
1657 before calling print_ops.
1658 (print_ops): Check harder for bogus data that would read off end.
1660 2010-08-11 Roland McGrath <roland@redhat.com>
1662 * readelf.c (for_each_section_argument): Process all sections with
1663 matching name, not just the first.
1665 2010-07-26 Roland McGrath <roland@redhat.com>
1667 * readelf.c (print_ops): Take new argument for CU version.
1668 Fix DW_OP_call_ref decoding to depend on it.
1669 (print_debug_loc_section): Update caller.
1670 (print_cfa_program): Take new argument, pass it down.
1671 (print_debug_frame_section): Update caller.
1672 (struct attrcb_args): New member version.
1673 (print_debug_units): Initialize it.
1675 2010-07-02 Roland McGrath <roland@redhat.com>
1677 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
1680 2010-06-30 Roland McGrath <roland@redhat.com>
1682 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
1683 Ignore st_size for a non-S_ISREG file descriptor.
1684 (read_block): Move assert after no-mmap bail-out.
1685 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
1687 2010-06-22 Roland McGrath <roland@redhat.com>
1689 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
1691 2010-06-21 Roland McGrath <roland@redhat.com>
1693 * readelf.c (dwarf_tag_string): Handle new v4 tags.
1694 (dwarf_attr_string): Add new attributes.
1695 (dwarf_tag_string): Handle DW_TAG_GNU_*.
1697 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
1698 (print_cfa_program): Likewise.
1700 2010-06-20 Roland McGrath <roland@redhat.com>
1702 * readelf.c (print_debug_units): New function, broken out of ...
1703 (print_debug_info_section): ... here. Call it.
1704 (print_debug_types_section): New function.
1705 (enum section_e): Add section_types alias for section_info.
1706 (print_debug): Add types to the sections table.
1708 * readelf.c (print_debug_frame_section): Handle version 4 format.
1710 * readelf.c (print_debug_line_section): Handle version 4 format.
1712 2010-06-14 Roland McGrath <roland@redhat.com>
1714 * unstrip.c (copy_elided_sections): Make sure all sections' data have
1715 been read in before we write anything out.
1717 2010-06-04 Roland McGrath <roland@redhat.com>
1719 * unstrip.c (update_shdr): New function.
1720 (update_sh_size): Call it instead of gelf_update_shdr.
1721 (adjust_relocs, add_new_section_symbols): Likewise.
1722 (new_shstrtab, copy_elided_sections): Likewise.
1724 * unstrip.c (copy_elided_sections): Bail if stripped file has more
1725 sections than unstripped file, rather than getting confused later.
1727 2010-06-01 Roland McGrath <roland@redhat.com>
1729 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
1730 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
1731 DW_FORM_sec_offset, DW_FORM_ref_sig8.
1733 * readelf.c (print_debug): Don't bail if libdw setup fails.
1734 Suppress complaint if we only want .eh_frame anyway.
1736 2010-05-28 Ulrich Drepper <drepper@redhat.com>
1738 * readelf.c (attr_callback): Also print form information.
1740 2010-05-19 Roland McGrath <roland@redhat.com>
1742 * addr2line.c (find_symbol): Short-circuit on empty name.
1743 (handle_address): Handle SYMBOL with no +OFFSET.
1745 2010-05-08 Roland McGrath <roland@redhat.com>
1747 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
1748 Use that for DW_OP_call_ref, not ADDRSIZE.
1749 (print_cfa_program): Update caller.
1750 (struct attrcb_args): Add offset_size field.
1751 (attr_callback): Use it for print_ops call.
1752 (print_debug_info_section): Initialize it.
1753 (print_ops): Likewise.
1755 2010-04-14 Roland McGrath <roland@redhat.com>
1757 * readelf.c (handle_core_item): Fix bitmask printing.
1759 2010-04-06 Roland McGrath <roland@redhat.com>
1761 * ld.c (options): Fix some typos in messages.
1762 * elflint.c (check_scn_group, check_group): Likewise.
1763 * ldscript.y (add_id_list): Likewise.
1764 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
1765 before translated string containing a literal %.
1767 2010-02-26 Roland McGrath <roland@redhat.com>
1769 * readelf.c (process_file): Don't leak an fd in failure case.
1771 2010-02-15 Roland McGrath <roland@redhat.com>
1773 * Makefile.am: Use config/eu.am for common stuff.
1775 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
1776 mismatch in comparison.
1778 2010-02-02 Roland McGrath <roland@redhat.com>
1780 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
1781 (read_encoded): Likewise.
1782 (print_debug_frame_section): Check for bogus augmentation length.
1783 For P augmentation, use read_encoded, print the encoding description,
1784 and use hex for unsigned values.
1786 2010-01-15 Roland McGrath <roland@redhat.com>
1788 * ar.c: Include <sys/stat.h>.
1789 * elflint.c: Likewise.
1790 * readelf.c: Likewise.
1791 * strip.c: Likewise.
1792 * unstrip.c: Likewise
1794 2010-01-07 Roland McGrath <roland@redhat.com>
1796 * readelf.c (print_ehdr): Handle PN_XNUM.
1797 (phnum): New static variable.
1798 (process_elf_file): Set it with elf_getphdrnum.
1799 (print_phdr): Use phnum instead of EHDR->e_phnum.
1800 (print_dynamic, handle_notes): Likewise.
1801 (handle_relocs_rel, handle_relocs_rela): Likewise.
1803 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
1805 * elflint.c (phnum): New static variable.
1806 (check_elf_header): Set it, handling PN_XNUM.
1807 Use that in place of EHDR->e_phnum throughout.
1808 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
1809 (unknown_dependency_p, check_sections, check_program_header): Likewise.
1811 2010-01-05 Roland McGrath <roland@redhat.com>
1813 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
1814 DW_AT_GNU_template_name.
1816 2010-01-04 Roland McGrath <roland@redhat.com>
1818 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
1819 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
1820 (handle_core_item): Handle .format of '\n' as \n-separated strings.
1822 * readelf.c (implicit_debug_sections): New variable.
1823 (parse_opt): Set it instead of print_debug_sections for -a.
1824 OR them together for print_debug check.
1825 (print_debug): OR them together for section check.
1827 * readelf.c (options): Repartition into set implied by -a and others.
1828 Correct -a text to match reality.
1830 * readelf.c (struct section_argument): Add bool member 'implicit'.
1831 (parse_opt): Set it for -a cases, clear it for -x args.
1832 (for_each_section_argument): Don't complain about a missing section by
1833 name if it's implicit.
1835 2009-11-16 Roland McGrath <roland@redhat.com>
1837 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
1838 sections, just as dump_data_section already does.
1840 2009-09-21 Ulrich Drepper <drepper@redhat.com>
1842 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
1843 set for .comment section.
1844 Patch by Mark Wielaard <mjw@redhat.com>.
1846 2009-09-08 Roland McGrath <roland@redhat.com>
1848 * ar.c (main): Fix typo in message format.
1850 2009-08-21 Roland McGrath <roland@redhat.com>
1852 * readelf.c (attr_callback): Use print_block only when we don't use
1855 2009-08-14 Roland McGrath <roland@redhat.com>
1857 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1859 2009-08-01 Ulrich Drepper <drepper@redhat.com>
1861 * debugpred.h: Add two most const.
1863 2009-07-26 Mark Wielaard <mjw@redhat.com>
1865 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
1867 2009-07-25 Mark Wielaard <mjw@redhat.com>
1869 * Makefile.am (addr2line_LDADD): Add $(libelf).
1871 2009-07-24 Roland McGrath <roland@redhat.com>
1873 * readelf.c (print_block): New function.
1874 (print_ops): Use it.
1875 (attr_callback): Use it for DW_FORM_block* forms.
1877 2009-07-20 Mark Wielaard <mjw@redhat.com>
1879 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
1880 and DW_OP_stack_value.
1882 2009-07-14 Ulrich Drepper <drepper@redhat.com>
1884 * elflint.c (check_elf_header): Allow Linux ABI.
1885 (check_symtab): Handle STB_GNU_UNIQUE.
1887 2009-07-08 Mark Wielaard <mjw@redhat.com>
1889 * readelf.c (attr_callback): Handle DW_Form constants for
1890 DW_AT_data_member_location.
1892 2009-07-06 Roland McGrath <roland@redhat.com>
1894 * readelf.c (register_info): New function. Handle unknown register #s.
1895 (print_cfa_program): Use it.
1896 (handle_core_register, handle_core_registers): Likewise.
1898 2009-06-28 Roland McGrath <roland@redhat.com>
1900 * readelf.c (print_address_names): New static variable.
1901 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
1902 (format_dwarf_addr): Don't look up name if !print_address_names.
1904 2009-06-13 Ulrich Drepper <drepper@redhat.com>
1906 * ldgeneric.c: Don't use deprecated libelf functions.
1908 * objdump.c: Likewise.
1909 * readelf.c: Likewise.
1911 * strip.c: Likewise.
1912 * unstrip.c: Likewise.
1913 * ld.h: Fix up comment.
1915 2009-06-01 Ulrich Drepper <drepper@redhat.com>
1917 * readelf.c (print_relocs): Expect ELF header argument and pass on
1918 to handle_relocs_rel* functions. Adjust caller.
1919 (handle_relocs_rel): Add ELF header argument. Add special case for
1920 the IRELATIVE relocations in statically linked executables.
1921 (handle_relocs_rela): Likewise.
1923 2009-04-29 Ulrich Drepper <drepper@redhat.com>
1925 * elflint.c (check_symtab): Add tests of st_other field.
1927 2009-04-23 Ulrich Drepper <drepper@redhat.com>
1929 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
1931 2009-04-20 Roland McGrath <roland@redhat.com>
1933 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
1934 of inline call sites.
1936 * addr2line.c (just_section): New variable.
1937 (adjust_to_section): New function, broken out of ...
1938 (handle_address): ... here.
1939 (options, parse_opt): Add -j/--section=NAME to set it.
1941 2009-04-15 Roland McGrath <roland@redhat.com>
1943 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
1944 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
1946 2009-04-14 Roland McGrath <roland@redhat.com>
1948 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
1949 like SHT_GNU_ATTRIBUTES.
1951 * readelf.c (handle_core_registers): Fix error message.
1953 * strip.c (handle_elf: check_preserved): Don't note any change when
1954 .debug_data is already filled from a previous pass.
1956 2009-02-05 Ulrich Drepper <drepper@redhat.com>
1958 * objdump.c (show_relocs_x): Minor cleanups.
1960 * readelf.c (print_cfa_program): Correct a few labels.
1961 Print first DW_CFA_expression and DW_CFA_val_expression parameter
1964 2009-02-01 Ulrich Drepper <drepper@redhat.com>
1966 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
1968 (show_relocs_x): ...here. New function.
1969 (show_relocs): Better spacing in output.
1971 * objdump.c (show_relocs_rela): Show offsets as signed values.
1973 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
1974 Improve some error messages.
1975 Use program_invocation_short_name instead of AR macro.
1976 * Makefile.am (CFLAGS_ar): Remove.
1977 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
1978 * objdump.c (parse_opt): Likewise.
1979 * readelf.c (parse_opt): Likewise.
1981 2009-01-27 Roland McGrath <roland@redhat.com>
1983 * readelf.c (print_ops): Notice short length, don't overrun buffer
1984 (still need to fix LEB128).
1986 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
1988 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
1990 2009-01-24 Ulrich Drepper <drepper@redhat.com>
1992 * readelf.c (print_debug_frame_section): Fix computation of vma_base
1993 for PC-relative mode.
1995 2009-01-23 Ulrich Drepper <drepper@redhat.com>
1997 * size.c (process_file): When handling archive, close file descriptor
1998 here. For unknown file format also close file descriptor.
1999 (handle_ar): Don't close file descriptor here.
2001 * readelf.c (parse_opt): Move code to add to dump_data_sections and
2002 string_sections list in local function add_dump_section. Adjust 'x'
2003 key handling. For 'a' key add .strtab, .dynstr, and .comment section
2004 to string_sections list.
2006 2009-01-22 Roland McGrath <roland@redhat.com>
2008 * readelf.c (print_phdr): Don't print section mapping when no sections.
2010 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
2012 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
2013 and reset it only for the 'true' cases.
2015 * Makefile.am (addr2line_no_Wformat): New variable.
2017 * readelf.c (print_debug_frame_section): Use t instead of j formats
2018 for ptrdiff_t OFFSET.
2020 2009-01-21 Ulrich Drepper <drepper@redhat.com>
2022 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
2023 test. Handle debuginfo files.
2024 (check_exception_data): First sanity test.
2026 2009-01-17 Ulrich Drepper <drepper@redhat.com>
2028 * readelf.c (print_debug_exception_table): Show target of ar_disp
2031 * elflint.c (check_program_header): Add most consistency checks for
2032 PT_GNU_EH_FRAME entry.
2034 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
2035 ARGP_PROGRAM_BUG_ADDRESS_DEF.
2037 * elfcmp.c: Likewise.
2038 * elflint.c: Likewise.
2039 * findtextrel.c: Likewise.
2042 * objdump.c: Likewise.
2043 * ranlib.c: Likewise.
2044 * readelf.c: Likewise.
2047 * strings.c: Likewise.
2048 * strip.c: Likewise.
2049 * unstrip.c: Likewise.
2051 2009-01-16 Ulrich Drepper <drepper@redhat.com>
2053 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
2054 matches .eh_frame_hdr section, if it is available. Also check that
2055 the segment is allocated, not writable, not executable.
2057 * readelf.c: Add -e option. Dump exception and unwind related
2058 sections. Add -e to -a.
2059 (print_encoding_base): Handle DW_EH_PE_omit.
2060 (print_debug_exception_table): Beginning of support.
2061 (print_debug): Hook up print_debug_exception_table for
2062 .gcc_except_table sections.
2064 * readelf.c (print_debug_frame_section): Some fixes for last change.
2066 2009-01-15 Ulrich Drepper <drepper@redhat.com>
2068 * readelf.c (print_encoding): Now a toplevel function.
2069 (print_relinfo): Likewise.
2070 (print_encoding_base): Broken out of print_debug_frame_section.
2071 (print_debug_frame_section): Print different header for .eh_frame
2072 sections. Fix recognition of matching CIEs in .debug_frame sections.
2073 Print absolute offset for PC-relative FDE locations. Don't print
2074 table header for FDEs if the table is empty.
2075 (read_encoded): New function.
2076 (print_debug_frame_hdr_section): New function.
2077 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
2080 * readelf.c (handle_relocs_rel): Print section number.
2081 (print_debug_abbrev_section): Likewise.
2082 (print_debug_aranges_section): Likewise.
2083 (print_debug_ranges_section): Likewise.
2084 (print_debug_info_section): Likewise.
2085 (print_debug_line_section): Likewise.
2086 (print_debug_loc_section): Likewise.
2087 (print_debug_macinfo_section): Likewise.
2088 (print_debug_pubnames_section): Likewise.
2089 (print_debug_str_section): Likewise.
2091 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2093 * strings.c (read_block): Fix typo in error message string.
2095 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2097 * ld.c (ld_new_searchdir): Fix adding to search path list.
2099 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2101 * readelf.c: Implement call frame debug section dumping.
2103 2009-01-05 Roland McGrath <roland@redhat.com>
2105 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
2106 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
2108 2009-01-01 Ulrich Drepper <drepper@redhat.com>
2110 * addr2line.c: Update copyright year.
2112 * elfcmp.c: Likewise.
2113 * elflint.c: Likewise.
2114 * findtextrel.c: Likewise.
2117 * objdump.c: Likewise.
2118 * ranlib.c: Likewise.
2119 * readelf.c: Likewise.
2121 * strings.c: Likewise.
2122 * strip.c: Likewise.
2123 * unstrip.c: Likewise.
2125 2008-12-11 Roland McGrath <roland@redhat.com>
2127 * nm.c (sym_name): New function.
2128 (show_symbols_sysv): Use it in place of elf_strptr.
2129 (show_symbols_bsd, show_symbols_posix): Likewise.
2132 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
2135 2008-12-02 Roland McGrath <roland@redhat.com>
2137 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
2138 nonzero OFFSET argument to dwfl_getmodules.
2140 2008-08-07 Roland McGrath <roland@redhat.com>
2142 * addr2line.c (main): Pass string to handle_address.
2143 (see_one_module): New function, subroutine of handle_address.
2144 (find_symbol): Likewise.
2145 (handle_address): Take string argument rather than address.
2146 Convert plain number, or handle strings like "(section)+offset"
2149 2008-08-01 Roland McGrath <roland@redhat.com>
2151 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
2152 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
2154 * readelf.c (convert): Take new argument SIZE.
2155 (handle_core_register, handle_core_item): Update callers.
2156 (handle_core_item): Take new arg REPEATED_SIZE.
2157 (handle_core_items): Special case for a singleton item,
2158 let handle_core_item handle repeats if it wants to.
2160 * readelf.c (handle_core_items): Give abridged output
2161 for identical groups repeated more than twice.
2163 2008-07-04 Roland McGrath <roland@redhat.com>
2165 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
2167 2008-04-10 Roland McGrath <roland@redhat.com>
2169 * strip.c (handle_elf): Don't keep sections that kept symbol tables
2170 refer to. Instead, just be sure to preserve the original symbol
2171 table in the debug file so those symbols go with their sections and
2172 can be elided from the stripped version of the symbol table.
2174 * strip.c (handle_elf): When a discarded section kept in the debug
2175 file refers to a nondiscard section via sh_link/sh_info, preserve
2176 that nondiscarded section unmodified in the debug file as well.
2177 Skip adjustment of discarded sections symbol table references when
2178 that symbol table is copied in this way.
2180 * elflint.c (check_symtab): Don't crash from missing symbol names
2181 after diagnosing bogus strtab.
2183 * strip.c (handle_elf): Cosmetic cleanup in special section contents
2184 adjustment for symtab changes.
2186 2008-03-31 Roland McGrath <roland@redhat.com>
2188 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
2189 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
2190 excuse a special section.
2192 2008-03-27 Roland McGrath <roland@redhat.com>
2194 * elflint.c (check_sections): Check that executability and writability
2195 of sections is reflected in segment p_flags.
2197 2008-03-26 Roland McGrath <roland@redhat.com>
2199 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
2200 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
2203 2008-02-29 Roland McGrath <roland@redhat.com>
2205 * readelf.c (print_attributes): Add a cast.
2206 * elflint.c (check_attributes): Likewise.
2208 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
2209 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
2210 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
2212 2008-02-03 Ulrich Drepper <drepper@redhat.com>
2214 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
2215 when linked into executable.
2216 (elf_i386_create_relocations): Likewise.
2218 2008-02-20 Roland McGrath <roland@redhat.com>
2220 * readelf.c (print_attributes): New function.
2221 (process_elf_file): Call it under -A.
2223 * elflint.c (check_attributes): Implement it for real.
2225 2008-02-19 Roland McGrath <roland@redhat.com>
2227 * elflint.c (special_sections): Handle .gnu.attributes section.
2228 (check_sections): Likewise.
2229 (check_attributes): New function.
2231 2008-02-10 Roland McGrath <roland@redhat.com>
2233 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
2234 sections and ET_REL files.
2236 2008-02-02 Ulrich Drepper <drepper@redhat.com>
2238 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
2239 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
2241 (elf_i386_create_relocations): Likewise.
2242 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
2244 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
2245 (ld_generic_create_outfile): Add PT_TLS entry to program header.
2246 Fix generation of PT_GNU_STACK entry.
2248 2008-02-01 Ulrich Drepper <drepper@redhat.com>
2250 * ld.c (replace_args): Prevent loop over replacements if the parameter
2251 is only two characters long.
2253 * ld.c: Recognize sha1 argument for --build-id parameter.
2254 * ldgeneric.c (create_build_id_section): Handle sha1.
2255 (compute_hash_sum): New function. Broken out of compute_build_id.
2256 Take hash function and context as parameters.
2257 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
2260 2008-01-31 Ulrich Drepper <drepper@redhat.com>
2262 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
2263 * ld.c: Recognize --build-id command line parameter.
2264 * ld.h: Define scn_dot_note_gnu_build_id.
2265 (struct ld_state): Add build_id and buildidscnidx elements.
2266 * ldgeneric.c: Implement --build-id command line parameter.
2267 * ldlex.l (ID): Recognize - as valid character after the first one.
2269 2008-01-29 Ulrich Drepper <drepper@redhat.com>
2271 * ld.c (replace_args): New function.
2272 (main): Use it to rewrite old-style parameters.
2274 * elf32-i386.script: Add .gnu.hash section.
2275 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
2276 (fillin_special_symbol): Initialize st_size.
2277 (sortfct_hashval): New function.
2278 (create_gnu_hash): New function.
2279 (create_hash): New function.
2280 (ld_generic_create_outfile): Use the new functions to create the
2283 * elflint.c (check_gnu_hash): Fix index value printed in error message.
2285 2008-01-24 Ulrich Drepper <drepper@redhat.com>
2287 * elflint.c (check_group): Check that signature symbol for section
2288 group is not an empty string.
2289 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
2290 section. Start implementation of --hash-style.
2291 * i386_ld.c: Likewise.
2292 * ld.c: Recognize --hash-style.
2293 * ld.h (struct scninfo): Add comdat_group.
2294 Add additional parameter to finalize_plt callback.
2296 2008-01-22 Ulrich Drepper <drepper@redhat.com>
2298 * ld.h (struct callbacks): Add initialize_gotplt.
2299 (struct scnhead): Add scn_dot_gotplt.
2300 (struct ld_state): Add gotpltscnidx.
2301 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
2302 (elf_i386_initialize_pltrel): Likewise.
2303 (elf_i386_initialize_got): There is now a separate .got.plt, so
2304 don't do the PLT-related work here. Initialize d_type.
2305 (elf_i386_initialize_gotplt): New function.
2306 (elf_i386_plt0): Use ud2a after indirect jump.
2307 (elf_i386_pic_plt0_entry): Likewise.
2308 (elf_i386_finalize_plt): Reference now .got.plt.
2309 (elf_i386_count_relocations): For GOT entries which need no relocation
2310 don't bump nrel_got.
2311 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
2312 handling for split .got/.got.plt.
2313 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
2314 * elf32-i386.script: Sort sections for security. There are no .got
2315 input sections. Add .got.plt.
2316 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
2317 (ld_generic_create_outfile): Initialize .got.plt section.
2318 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
2320 2008-01-19 Ulrich Drepper <drepper@redhat.com>
2322 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
2323 symbols are not carried over into statically linked output files.
2324 Add dummy entries for more TLS relocations.
2326 * ld.c (options): Add long names for -( and -).
2328 * ldgeneric.c (check_definition): For newly found definitions don't
2329 mark section as used if symbol is absolute.
2330 (extract_from_archive): Only assign archive sequence number the first
2331 time the archive is handled. Update ld_state.last_archive_used
2332 if any symbol was used. Remove nround variable.
2333 (file_process2): When using symbol from an archive, update
2334 ld_state.group_start_archive, ld_state.archives, and
2335 ld_state.tailarchives.
2336 (ld_generic_file_process): If group is not handled anymore, after
2337 freeing ELF handles for the archives, clear ld_state.archives and
2338 *nextp. Fix wrong logic in recognizing first iteration of group
2339 loop. When clearing flags, also clear ld_state.group_start_archive.
2341 2008-01-11 Ulrich Drepper <drepper@redhat.com>
2343 * objdump.c (show_disasm): Adjust disassembler format string for
2346 2008-01-04 Roland McGrath <roland@redhat.com>
2348 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
2349 a size greater than the items cover means multiple sets of items.
2350 (handle_core_note): Update caller.
2352 2008-01-04 Roland McGrath <roland@redhat.com>
2354 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
2356 2008-01-03 Roland McGrath <roland@redhat.com>
2358 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
2360 * elflint.c (check_dynamic): Remove duplicate initializer.
2362 2008-01-02 Ulrich Drepper <drepper@redhat.com>
2364 * addr2line.c: Update copyright year.
2366 * elfcmp.c: Likewise.
2367 * elflint.c: Likewise.
2368 * findtextrel.c: Likewise.
2371 * objdump.c: Likewise.
2372 * ranlib.c: Likewise.
2373 * readelf.c: Likewise.
2375 * strings.c: Likewise.
2376 * strip.c: Likewise.
2377 * unstrip.c: Likewise.
2379 2007-12-30 Ulrich Drepper <drepper@redhat.com>
2381 * objdump (show_disasm): Use %e after third parameter.
2383 2007-12-21 Ulrich Drepper <drepper@redhat.com>
2385 * strip.c: Fix wrong parenthesis in a few branch predictions.
2386 * strings.c: Likewise.
2388 2007-12-20 Ulrich Drepper <drepper@redhat.com>
2390 * Makefile.am (DEFS): Add DEBUGPRED.
2391 * addr2line.c: Include debugpred.h.
2393 * elfcmp.c: Likewise.
2394 * elflint.c: Likewise.
2395 * findtextrel.c: Likewise.
2397 * objdump.c: Likewise.
2398 * ranlib.c: Likewise.
2399 * readelf.c: Likewise.
2401 * strings.c: Likewise.
2402 * strip.c: Likewise.
2403 * unstrip.c: Likewise.
2404 * debugpred.h: New file.
2406 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
2407 (handle_relocs_rela): Likewise.
2409 * readelf.c: Add lots of likely/unlikely.
2411 * elflint.c: Minor cleanups.
2413 2007-11-19 Roland McGrath <roland@redhat.com>
2415 * readelf.c (print_ops): Handle all bad op codes gracefully.
2416 Print their numbers instead of just ???.
2418 2007-11-09 Roland McGrath <roland@redhat.com>
2420 * readelf.c (attr_callback): Handle DW_AT_data_location.
2421 Handle block forms to mean a DWARF expression for DW_AT_allocated,
2422 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
2423 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
2426 2007-10-20 Roland McGrath <roland@redhat.com>
2428 * unstrip.c (options): Update -R description.
2429 (struct symbol): Put symbol details a union with a size_t pointer
2431 (compare_symbols_output): Use null ->name as marker for discard
2432 symbols, not zero *->map.
2433 (copy_elided_sections): Record forwarding pointers for discarded
2434 duplicates and fill SYMNDX_MAP elements through them.
2436 * readelf.c (process_file): Set offline_next_address to 0 at start.
2437 (struct process_dwflmod_args): New type.
2438 (process_dwflmod): Take args in it, pass fd to process_elf_file.
2439 (process_file): Update caller; dup FD for passing to libdwfl.
2440 (process_elf_file): Take new arg FD. For ET_REL file when
2441 displaying data affected by libdwfl relocation, open a new Elf handle.
2443 2007-10-17 Roland McGrath <roland@redhat.com>
2445 * readelf.c (print_debug_line_section): For invalid data inside a
2446 unit with plausible length, keep printing at the next unit boundary.
2448 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
2450 2007-10-16 Roland McGrath <roland@redhat.com>
2452 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
2454 2007-10-15 Roland McGrath <roland@redhat.com>
2456 * make-debug-archive.in: New file.
2457 * Makefile.am (EXTRA_DIST): Add it.
2458 (make-debug-archive): New target.
2459 (bin_SCRIPTS, CLEANFILES): Add it.
2461 2007-10-10 Roland McGrath <roland@redhat.com>
2463 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
2464 Use it to check MERGE|STRINGS for .debug_str.
2465 (check_sections): Handle exact_or_gnuld.
2467 2007-10-08 Roland McGrath <roland@redhat.com>
2469 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
2470 64-bit struct timeval with 32-bit tv_usec.
2472 2007-10-07 Roland McGrath <roland@redhat.com>
2474 * readelf.c (check_archive_index): New function.
2475 (process_file): Call it. Change signature to take only fd and name.
2476 Use libdwfl to open the file, then iterate on its modules (multiple
2477 for an archive) to print file name and call process_elf_file.
2478 (main): Update caller. Let process_file do elf_begin.
2479 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
2480 (process_elf_file): Take only Dwfl_Module * argument.
2481 Don't print the file name here.
2482 (print_debug_*_section): Take Dwfl_Module * argument.
2483 (print_debug): Likewise. Update caller.
2484 (format_dwarf_addr): New function.
2485 (print_debug_ranges_section): Use it.
2486 (attr_callback): Likewise.
2487 (print_debug_line_section, print_debug_loc_section): Likewise.
2489 * readelf.c (print_debug_ranges_section): Translate all strings.
2490 (print_debug_loc_section): Likewise.
2492 * unstrip.c (copy_elided_sections): Initialize SEC.
2494 * ar.c (do_oper_insert): Put trailing / on short names.
2496 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
2498 * arlib2.c (arlib_add_long_name): Adjust for header size.
2500 * arlib.c (arlib_finalize): Pad long name table to keep size even.
2502 * ar.c (do_oper_insert): Use write_retry for padding write.
2504 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
2505 Unconditionally set FOUND[CNT]->elf when setting ->mem.
2506 (remember_long_name): New function.
2507 (do_oper_insert): Call it. Correctly use length of basename,
2508 not original name. Don't store long name twice for new member.
2510 2007-10-06 Roland McGrath <roland@redhat.com>
2512 * elflint.c (check_note): Skip empty segment.
2513 (check_note_section): Skip empty section.
2515 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
2516 (handle_output_dir_module, handle_implicit_modules): Pass it down.
2517 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
2518 (compare_alloc_sections): Take new arg REL, ignore address if true.
2519 (compare_sections): Likewise, pass it down.
2520 (compare_sections_rel, compare_sections_nonrel): New functions.
2521 (find_alloc_sections_prelink, copy_elided_sections): Use them
2522 instead of compare_sections.
2523 (sections_match): New function, broken out of ...
2524 (find_alloc_section): ... here.
2525 (copy_elided_sections): Reorganize section match-up logic.
2526 Use sections_match for SHF_ALLOC in ET_REL.
2527 For ET_REL, let the nonzero sh_addr from the debug file dominate.
2529 * unstrip.c (add_new_section_symbols): Take new arg REL.
2530 When true, do not update section symbol values.
2531 (collect_symbols): Likewise. Update section symbols with address
2532 of chosen output section, not original section.
2533 (check_symtab_section_symbols, copy_elided_sections): Update callers.
2535 * unstrip.c (compare_alloc_sections): At the same address, preserve
2536 original section order.
2538 * elflint.c (special_sections): Don't require MERGE|STRINGS for
2539 .debug_str, it didn't always have them with older tools.
2541 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
2543 2007-10-05 Roland McGrath <roland@redhat.com>
2545 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
2548 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
2549 SHN_UNDEF as "bad section". Use shndx value in messages.
2551 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
2552 for ".debug" so it matches as a prefix.
2553 (IS_KNOWN_SPECIAL): New macro.
2554 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
2555 type even under -d, for a .debug* or .shstrtab section.
2557 * readelf.c (print_ops): Use hex for address operand.
2559 2007-10-04 Roland McGrath <roland@redhat.com>
2561 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
2562 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
2563 sections mapped to SHN_UNDEF.
2565 2007-10-04 Ulrich Drepper <drepper@redhat.com>
2567 * readelf.c (dump_archive_index): Avoid warning about uninitialized
2568 variable with older glibc versions.
2569 Add some branch prediction.
2571 2007-10-04 Roland McGrath <roland@redhat.com>
2573 * readelf.c (print_archive_index): New variable.
2574 (options, parse_opt): Accept -c/--archive-index to set it.
2575 (dump_archive_index): New function.
2576 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
2577 Call dump_archive_index on archives if set.
2578 (main): Update caller.
2579 (any_control_option): Give it file scope, moved out of ...
2580 (parse_opt): ... here.
2582 2007-10-03 Roland McGrath <roland@redhat.com>
2584 * unstrip.c (struct arg_info): Add `list' flag.
2585 (options, parse_opt): Grok -n/--list to set it.
2586 (list_module): New function.
2587 (handle_implicit_modules): Call it under -n.
2589 * elflint.c (check_note_section): New function.
2590 (check_sections): Call it for SHT_NOTE.
2592 * readelf.c (handle_notes): Use sections when available.
2594 * elflint.c (check_note_data): New function, broken out of ...
2595 (check_note): ... here. Call it and elf_getdata_rawchunk.
2597 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
2598 Use elf_getdata_rawchunk and gelf_getauxv.
2599 (handle_notes_data): New function, broken out of ...
2600 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
2602 2007-10-01 Roland McGrath <roland@redhat.com>
2604 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
2606 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
2608 2007-09-10 Roland McGrath <roland@redhat.com>
2610 * readelf.c (options): Give -p optional argument, alias --string-dump.
2611 (string_sections, string_sections_tail): New static variables.
2612 (parse_opt): Set them when -p has an argument.
2613 (print_string_section): New function, broken out of ...
2614 (print_strings): ... here. Call it.
2615 (dump_data_section): New function, broken out of ...
2616 (dump_data): ... here. Call it.
2617 (for_each_section_argument): New function, broken out of ...
2618 (dump_data): ... here. Call it.
2619 (dump_strings): New function.
2621 2007-08-31 Roland McGrath <roland@redhat.com>
2623 * readelf.c (print_strings): Typo fix.
2625 2007-08-23 Roland McGrath <roland@redhat.com>
2627 * readelf.c (printf_with_wrap): Function removed.
2628 (REGISTER_WRAP_COLUMN): New macro.
2629 (handle_core_register): Use print_core_item instead.
2630 (struct register_info): New type.
2631 (compare_registers, compare_register_sets): New functions.
2632 (register_bitpos, compare_sets_by_info): New functions.
2633 (handle_core_registers): Use those to segregate and sort registers
2636 * readelf.c (ITEM_WRAP_COLUMN): New macro.
2637 (print_core_item): New function.
2638 (handle_core_item): Use it instead of printf_with_wrap.
2639 (compare_core_items, compare_core_item_groups): New functions.
2640 (handle_core_items): Use them. Sort by group and force line breaks
2643 * readelf.c (handle_core_registers, handle_core_items): New functions,
2645 (handle_core_note): ... here. Call them.
2647 2007-08-22 Roland McGrath <roland@redhat.com>
2649 * unstrip.c (new_shstrtab): New function, broken out of ...
2650 (copy_elided_sections): ... here.
2652 2007-08-20 Roland McGrath <roland@redhat.com>
2654 Avoid local function trampolines in nm binary.
2655 * nm.c (sort_by_address): Move to a static function instead of local
2656 inside show_symbols.
2657 (sort_by_name_strtab): New static variable.
2658 (sort_by_name): Use it. Move to a static function instead of local
2659 inside show_symbols.
2660 (show_symbols): Set sort_by_name_strtab.
2662 2007-08-19 Roland McGrath <roland@redhat.com>
2664 * readelf.c (handle_auxv_note): New function.
2665 (handle_notes): Call it.
2667 * readelf.c (printf_with_wrap, convert): New functions.
2668 (handle_core_item, (handle_core_register): New functions.
2669 (handle_notes): Call those with details from ebl_core_note.
2671 2007-08-12 Roland McGrath <roland@redhat.com>
2673 * elflint.c (check_note): Accept type 0 with name "Linux".
2675 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
2677 * elflint.c (section_flags_string): Return "none" for 0, not "".
2679 2007-08-11 Roland McGrath <roland@redhat.com>
2681 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
2683 2007-08-04 Ulrich Drepper <drepper@redhat.com>
2685 * readelf.c (hex_dump): Use isprint to determine whether to print
2686 character itself or full stop character.
2687 (dump_data): No need to check endp for NULL after strtol call.
2689 2007-08-03 Roland McGrath <roland@redhat.com>
2691 * readelf.c (print_string_sections): New variable.
2692 (options, parse_opt): Handle --strings/-p to set it.
2693 (print_strings): New function.
2694 (process_elf_file): Call it under -p.
2696 * readelf.c (options): Add hidden aliases --segments, --sections,
2697 as taken by binutils readelf.
2699 2007-08-01 Roland McGrath <roland@redhat.com>
2701 * readelf.c (dump_data_sections, dump_data_sections_tail):
2703 (options, parse_opt): Handle --hex-dump/-x, set them.
2704 (hex_dump): New function.
2705 (dump_data): New function, call it.
2706 (process_elf_file): Call it.
2708 2007-07-25 Roland McGrath <roland@redhat.com>
2710 * addr2line.c (show_symbols): New variable.
2711 (print_addrsym): New function.
2712 (handle_address): Call it.
2713 (options, parse_opt): Handle -S/--symbols.
2715 2007-06-05 Ulrich Drepper <drepper@redhat.com>
2717 * addr2line.c: Update for latest autoconf header.
2719 * elfcmp.c: Likewise.
2720 * elflint.c: Likewise.
2721 * findtextrel.c: Likewise.
2723 * ldgeneric.c: Likewise.
2725 * objdump.c: Likewise.
2726 * ranlib.c: Likewise.
2727 * readelf.c: Likewise.
2729 * strings.c: Likewise.
2730 * strip.c: Likewise.
2731 * unstrip.c: Likewise.
2733 2007-05-18 Roland McGrath <roland@redhat.com>
2735 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
2736 stripped file, so as not to duplicate a section copied in both.
2738 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
2740 2007-05-17 Roland McGrath <roland@redhat.com>
2742 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
2744 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
2746 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
2747 call make_directories here.
2748 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
2749 (handle_dwfl_module): Likewise.
2750 (handle_implicit_modules): Update callers.
2751 (handle_output_dir_module): Likewise. Don't do make_directories here.
2753 * unstrip.c (get_section_name): New function, broken out of ...
2754 (copy_elided_sections): here. Update callers.
2755 (find_alloc_section): Broken out of ...
2756 (copy_elided_sections): ... here. Update caller.
2757 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
2758 update STT_SECTION symbols' st_value fields as a side effect.
2759 (check_symtab_section_symbols): Update caller.
2760 (add_new_section_symbols): Set st_value in symbols added.
2761 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
2762 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
2763 from .bss to .dynbss.
2764 (find_alloc_sections_prelink): New function. Associate debug file
2765 allocated SHT_NOBITS shdrs with stripped moved by prelink via
2766 .gnu.prelink_undo information.
2767 (copy_elided_sections): Call it when we couldn't find every allocated
2768 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
2769 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
2770 (handle_file): Update callers.
2772 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
2775 * elflint.c (check_sections): Fix association of segments with
2776 sections when p_memsz > p_filesz.
2778 2007-04-29 Roland McGrath <roland@redhat.com>
2780 * addr2line.c (options, main): Tweak argp group settings to fix
2783 2007-04-28 Roland McGrath <roland@redhat.com>
2785 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
2786 sizes to match sections adjusted in the stripped file.
2788 2007-04-24 Roland McGrath <roland@redhat.com>
2790 * elfcmp.c (OPT_HASH_INEXACT): New macro.
2791 (hash_inexact): New variable.
2792 (options, parse_opt): Add --hash-inexact option to set it.
2793 (hash_content_equivalent): New function.
2794 (main): Call it for differing SHT_HASH sections under --hash-inexact.
2796 2007-04-23 Roland McGrath <roland@redhat.com>
2798 * unstrip.c: New file.
2799 * Makefile.am (bin_PROGRAMS): Add it.
2800 (unstrip_LDADD): New variable.
2802 * strip.c (options): Allow --output for -o.
2804 2007-02-15 Ulrich Drepper <drepper@redhat.com>
2806 * readelf.c: Remove unused code. Add a few consts.
2808 2007-02-15 Roland McGrath <roland@redhat.com>
2810 * readelf.c (print_debug): Fix brainos in SHDR test.
2812 2007-02-05 Roland McGrath <roland@redhat.com>
2814 * ar.c: Include <limits.h>, since we use LONG_MAX.
2816 2007-02-05 Ulrich Drepper <drepper@redhat.com>
2818 * ar.c: Add ugly hack to work around gcc complaining that we
2819 ignore fchown's return value.
2820 (do_oper_insert): Handle error when writing padding.
2821 * ranlib.c: Add fchown complain work around.
2823 * arlib.c: Make symtab a global variable. Change all users.
2824 * arlib2.c: Likewise.
2825 * ranlib.c: Likewise.
2827 * arlib.h: Declare it.
2829 2007-01-11 Roland McGrath <roland@redhat.com>
2831 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
2832 SHF_MASKPROC bits separately from generic sh_flags validation.
2834 2007-02-04 Ulrich Drepper <drepper@redhat.com>
2837 * arlib.c: New file.
2838 * arlib2.c: New file.
2839 * arlib.h: New file.
2840 * Makefile (noinst_LIBRARIES): Add libar.
2841 (libar_a_SOURCES): Define.
2843 (CFLAGS_ar): Define.
2844 * ranlib.c: Change to use arlib.
2846 * elflint.c (check_symtab): Work around GNU ld bug which omits
2847 sections but not symbols in those sections.
2849 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2851 * addr2line.c: Update copyright year.
2852 * elfcmp.c: Likewise.
2853 * elflint.c: Likewise.
2854 * findtextrel.c: Likewise.
2857 * objdump.c: Likewise.
2858 * ranlib.c: Likewise.
2859 * readelf.c: Likewise.
2861 * strings.c: Likewise.
2862 * strip.c: Likewise.
2864 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2866 * elflint.c (compare_hash_gnu_hash): New function. Report if the
2867 two hash tables have different content (module expected omission
2868 of undefined symbols).
2870 2006-10-31 Roland McGrath <roland@redhat.com>
2872 * elflint.c (check_program_header): Don't complain about
2873 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
2875 2006-09-19 Jakub Jelinek <jakub@redhat.com>
2877 * strip.c (process_file): Disallow -f on archives.
2879 2006-10-09 Roland McGrath <roland@redhat.com>
2881 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
2883 2006-08-29 Roland McGrath <roland@redhat.com>
2885 * Makefile.am (MAINTAINERCLEANFILES): New variable.
2887 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
2888 Reported by Christian Aichinger <Greek0@gmx.net>.
2890 * elflint.c (valid_e_machine): Add EM_ALPHA.
2891 Reported by Christian Aichinger <Greek0@gmx.net>.
2893 2006-08-08 Ulrich Drepper <drepper@redhat.com>
2895 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
2896 Keep track of which "high DT" entries are present.
2897 Check that either old or GNU-style hash table is present.
2898 If GNU-style hash table is used a symbol table is mandatory.
2899 Check that if any prelink entry is present all of them are.
2900 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
2901 table if they don't refer to functions.
2903 2006-07-17 Roland McGrath <roland@redhat.com>
2905 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
2906 (add_version): Likewise for argument.
2907 (check_versym): Cast constant to GElf_Versym for comparison.
2909 2006-07-12 Roland McGrath <roland@redhat.com>
2911 * readelf.c (handle_gnu_hash): Add casts for machines where
2912 Elf32_Word != unsigned int.
2914 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2916 * elflint.c (check_sysv_hash64): Fix printf format.
2918 2006-07-11 Roland McGrath <roland@redhat.com>
2920 * addr2line.c (options): English fix in -f doc string.
2922 * addr2line.c (use_comp_dir): New variable.
2923 (options, parse_opt): Grok -A/--absolute to set it.
2924 (handle_address): If set, prepend dwfl_line_comp_dir results to
2925 relative file names.
2927 2006-07-06 Ulrich Drepper <drepper@redhat.com>
2929 * elflint.c: Adjust for latest new hash table format.
2930 * readelf.c: Likewise.
2932 * elflint.c (check_versym): Ignore hidden bit when comparing version
2935 2006-07-05 Ulrich Drepper <drepper@redhat.com>
2937 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
2938 discarded COMDAT symbols.
2940 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
2941 (elf_i386_create_relocations): Likewise.
2942 * ld.h (struct symbol): Add local and hidden bits.
2943 * ld.c (create_special_section_symbol): These synthsized symbols
2944 are local and hidden.
2945 * ldgeneric.c (file_process2): Check whether input file matches
2947 (fillin_special_symbol): Create symbols as local and/or hidden
2949 (ld_generic_create_outfile): Make local copy of symbol.
2950 Don't hide global, defined symbols in dynamic symbol table unless
2951 requested. Synthetic symbols have no version information.
2953 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
2954 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2956 2006-07-04 Ulrich Drepper <drepper@redhat.com>
2958 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
2961 2006-07-03 Ulrich Drepper <drepper@redhat.com>
2963 * elflint.c: Add testing of DT_GNU_HASH.
2964 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
2966 * Makefile.am: Add hacks to create dependency files for non-generic
2969 2006-06-12 Ulrich Drepper <drepper@redhat.com>
2971 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
2972 section if creating a DSO and no interpreter is given.
2973 (ld_generic_create_outfile): Don't store reference to symbols in
2974 discarded COMDAT groups. Don't create PHDR and INTERP program header
2975 for DSO if no interpreter is specified.
2976 (create_verneed_data): Pretty printing.
2978 * ldscript.y (content): If a DSO is created don't set default
2979 interpreter from linker script.
2981 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
2982 for symbols in discarded COMDAT groups.
2983 (elf_i386_create_relocations): Likewise.
2984 * ld.h (struct scninfo): Add unused_comdat.
2985 * ldgeneric.c (add_section): Also check group signature when
2986 matching COMDAT sections.
2987 (add_relocatable_file): Ignore symbols in COMDAT group which are
2990 * elflint.c (check_one_reloc): For *_NONE relocs only check type
2991 and symbol reference.
2993 2006-06-11 Ulrich Drepper <drepper@redhat.com>
2995 * elflint.c (check_dynamic): Fix checking value of tags which are
2996 offsets in the string section. Make sure DT_STRTAB points to the
2997 section referenced in sh_link.
2999 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
3001 * ld.c: Recognize --eh-frame-hdr option.
3002 * ld.h (struct ld_state): Add eh_frame_hdr field.
3003 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
3005 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
3007 (add_relocatable_file): Minor optimization of last change.
3008 (match_section): Don't preserve SHF_GROUP flag any longer.
3010 2006-06-10 Ulrich Drepper <drepper@redhat.com>
3012 * ld.c (parse_z_option): Recognize execstack and noexecstack.
3013 Handle record and ignore as position dependent options.
3014 (parse_z_option_2): Handle ignore and record here.
3015 * ld.h (struct ld_state): Add execstack field.
3016 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
3018 (ld_generic_create_outfile): Fix program header creation in native
3019 linker. Add PT_GNU_STACK program header.
3021 2006-06-09 Ulrich Drepper <drepper@redhat.com>
3023 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
3024 for PLT entries if there is no local definition.
3026 * ld.c (parse_option): Handle -z ignore like --as-needed and
3027 -z record like --no-as-needed.
3028 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
3029 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
3030 looping over DSOs. When deciding about adding DT_NEEDED entries
3031 use ->as_needed instead of ignore_unused_dsos.
3033 2006-05-31 Ulrich Drepper <drepper@redhat.com>
3035 * ld.c: Recognize --as-needed and --no-as-needed options.
3036 * ld.h (struct usedfile): Add as_needed field.
3037 (struct ld_state): Likewise.
3038 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
3040 * ldscript.y (filename_id_list): Split to correctly parse all
3042 (mark_as_needed): Fix loop.
3044 2006-05-28 Ulrich Drepper <drepper@redhat.com>
3046 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
3049 2006-05-27 Ulrich Drepper <drepper@redhat.com>
3051 * readelf.c (handle_relocs_rela): Better notations for addon value.
3052 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
3054 2006-04-04 Ulrich Drepper <drepper@redhat.com>
3056 * addr2line.c: Update copyright year.
3057 * elfcmp.c: Likewise.
3058 * elflint.c: Likewise.
3059 * findtextrel.c: Likewise.
3062 * objdump.c: Likewise.
3063 * ranlib.c: Likewise.
3064 * readelf.c: Likewise.
3066 * strings.c: Likewise.
3067 * strip.c: Likewise.
3069 2006-03-09 Roland McGrath <roland@redhat.com>
3071 * Makefile.am (AM_LDFLAGS): New variable.
3073 2006-03-01 Roland McGrath <roland@redhat.com>
3075 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
3076 for dwarf.h changes matching 3.0 spec.
3077 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
3079 2005-12-04 Ulrich Drepper <drepper@redhat.com>
3081 * elflint.c (check_one_reloc): If relocation section is not loaded,
3082 don't check whether the relocations modify read-only sections or
3083 loaded and unloaded sections.
3085 2005-11-28 Ulrich Drepper <drepper@redhat.com>
3087 * elflint.c (check_one_reloc): Take additional parameters. Use
3088 them to determine whether relocation is valid in this type of
3089 file. DSOs and executables can contain relocation sections in
3090 unloaded sections which just show the relocations the linker
3091 applied. Adjust all callers.
3092 (check_program_header): Check that PT_PHDR is loaded and that offset
3093 matches the one in the ELF header.
3095 2005-10-26 Roland McGrath <roland@redhat.com>
3097 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
3099 2005-09-03 Ulrich Drepper <drepper@redhat.com>
3101 * strip.c (handle_elf): Unify some error messages.
3102 * ld.c (main): Likewise.
3103 * ldgeneric.c (open_elf): Likewise.
3104 * elfcmp.c (main): Likewise.
3105 * elflint.c (check_elf_header): Likewise.
3107 * size.c (process_file): Fix typo in error message.
3109 * readelf.c: Lots of little cleanups. Use _unlocked functions.
3111 2005-09-02 Ulrich Drepper <drepper@redhat.com>
3113 * strings.c (main): Reset elfmap variable after munmap call.
3114 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
3116 2005-08-28 Ulrich Drepper <drepper@redhat.com>
3118 * ranlib.c: Don't define pread_retry and write_retry here.
3120 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
3121 (CLEANFILES): Add *.gcno *.gcda *.gconv.
3123 * strings.c (process_chunk): Reorder expressions in conditional
3124 (process_chunk_mb): Likewise.
3126 * strings.c: New file.
3127 * Makefile.am (bin_PROGRAMS): Add strings.
3128 (strings_no_Wstring): Define.
3129 (strings_LDADD): Define.
3131 2005-08-27 Roland McGrath <roland@redhat.com>
3133 * addr2line.c (dwarf_diename_integrate): Function removed.
3134 (print_dwarf_function): Use plain dwarf_diename.
3136 2005-08-24 Ulrich Drepper <drepper@redhat.com>
3138 * elflint.c (check_versym): Versioned symbols should not have
3141 2005-08-15 Ulrich Drepper <drepper@redhat.com>
3143 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
3146 * Makefile.am: Add rules to build ranlib.
3147 * ranlib.c: New file.
3149 2005-08-14 Roland McGrath <roland@redhat.com>
3151 * elflint.c (check_sections): Use ebl_section_type_name and allow any
3152 sh_type it recognizes.
3154 * elflint.c (check_sections): Print unknown flags in hex, don't
3155 truncate high bits. Print section number and name for unknown type.
3157 2005-08-13 Roland McGrath <roland@redhat.com>
3159 * elflint.c (check_program_header): Use ebl_segment_type_name and
3160 allow any p_type it recognizes. Include p_type value in error
3161 message for unknown type.
3163 2005-08-13 Ulrich Drepper <drepper@redhat.com>
3165 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
3166 to ebl_check_special_symbol.
3167 (check_sections): Pass ehdr to ebl_bss_plt_p.
3169 2005-08-12 Roland McGrath <roland@redhat.com>
3171 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
3172 refers to the right section if it's not SHN_ABS.
3173 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
3175 * elflint.c (check_sections): Don't complain about a non-NOBITS
3176 section taking no segment space, if it's sh_size is 0.
3178 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
3179 be PROGBITS or NOBITS.
3181 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
3182 standard st_value and st_size checks.
3184 2005-07-28 Roland McGrath <roland@redhat.com>
3186 * addr2line.c (options, parse_opt): Don't handle -e here.
3187 (executable): Variable removed.
3188 (argp_children): New static variable.
3189 (argp): Use it. Make const.
3190 (main): Fill in argp_children from dwfl_standard_argp ().
3191 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
3192 (print_dwarf_function): New function. Try to figure out inline chain.
3193 (elf_getname): Function removed, libdwfl does it for us.
3194 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
3195 Use dwfl_module_addrname instead of elf_getname.
3196 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
3197 * Makefile.am (INCLUDES): Add libdwfl directory to path.
3199 2005-08-10 Ulrich Drepper <drepper@redhat.com>
3201 * strip.c (parse_opt): STATE parameter is now used.
3202 Various little cleanups.
3204 * readelf.c (print_debug_line_section): Correct fallout of renaming
3205 of DW_LNS_set_epilog_begin.
3207 2005-08-08 Roland McGrath <roland@redhat.com>
3209 * strip.c (options, parse_opt): Grok -R .comment for compatibility
3210 with binutils strip. Likewise -d, -S, as aliases for -g.
3211 Likewise ignore -s/--strip-all.
3213 2005-08-07 Roland McGrath <roland@redhat.com>
3215 * strip.c (process_file): Open read-only when using a different output
3218 2005-08-06 Ulrich Drepper <drepper@redhat.com>
3220 * elflint.c (in_nobits_scn): New function.
3221 (check_versym): Allow references for defined symbols against versions
3222 of other DSOs also for symbols in nobits sections.
3223 Move a few variables around.
3225 * Makefile.am (AM_CFLAGS): Avoid duplication.
3226 Link with statis libs if BUILD_STATIC.
3228 2005-08-05 Ulrich Drepper <drepper@redhat.com>
3230 * elflint.c: Many, many more tests. Mostly related to symbol
3231 versioning. Those sections should now be completely checked.
3233 * readelf.c (print_dynamic): Use gelf_offscn.
3235 2005-08-04 Ulrich Drepper <drepper@redhat.com>
3237 * elflint.c: Add lots more tests: more extension symbol table sanity,
3238 versioning section tests, hash table tests. General cleanup.
3240 2005-08-02 Ulrich Drepper <drepper@redhat.com>
3242 * objdump.c: New file.
3243 * Makefile.am (bin_PROGRAMS): Add objdump.
3244 (objdump_LDADD): Define.
3246 * elflint.c (check_reloc_shdr): New function split out from check_rela
3248 (check_one_reloc): New function. Likewise.
3249 (check_rela): Use check_reloc_shdr and check_one_reloc.
3250 (check_rel): Likewise.
3251 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
3253 Add checks that relocations against read-only segments are flagged,
3254 that the text relocation flag is not set unnecessarily, and that
3255 relocations in one section are either against loaded or not-loaded
3258 2005-08-01 Ulrich Drepper <drepper@redhat.com>
3260 * elfcmp.c (main): Ignore section count and section name string table
3263 2005-07-27 Roland McGrath <roland@redhat.com>
3265 * elfcmp.c: Include <locale.h>.
3267 2005-07-27 Ulrich Drepper <drepper@redhat.com>
3269 * elfcmp.c: Print name and index of differing section.
3271 2005-07-24 Ulrich Drepper <drepper@redhat.com>
3273 * elfcmp.c: Implement comparing gaps between sections.
3275 2005-07-23 Ulrich Drepper <drepper@redhat.com>
3277 * elflint.c: Include libeblP.h instead of libebl.h.
3279 * readelf.c: Likewise.
3280 * elfcmp.c: Likewise.
3282 * elfcmp.c (main): Compare individual ELF header fields, excluding
3283 e_shoff instead of the whole struct at once.
3284 Use ebl_section_strip_p instead of SECTION_STRIP_P.
3285 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
3287 2005-07-22 Ulrich Drepper <drepper@redhat.com>
3289 * elfcmp.c (main): Take empty section into account when comparing
3292 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
3295 2005-07-21 Ulrich Drepper <drepper@redhat.com>
3297 * elfcmp.c: New file.
3298 * Makefile.am (bin_PROGRAMS): Add elfcmp.
3299 (elfcmp_LDADD): Define.
3301 * elflint.c (check_rela): Check that copy relocations only reference
3302 object symbols or symbols with unknown type.
3303 (check_rel): Likewise.
3305 2005-06-08 Roland McGrath <roland@redhat.com>
3307 * readelf.c (print_ops): Add consts.
3309 2005-05-31 Roland McGrath <roland@redhat.com>
3311 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
3312 abbreviations. Print a header line before each CU section.
3314 * readelf.c (print_debug_loc_section): Fix indentation for larger
3317 2005-05-30 Roland McGrath <roland@redhat.com>
3319 * readelf.c (print_debug_line_section): Print section offset of each
3320 CU's table, so they are easy to find from seeing the stmt_list value.
3322 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
3323 (attr_callback): Grok DW_AT_ranges and print offset in hex.
3325 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
3326 (print_debug_ranges_section, print_debug_loc_section): Likewise.
3328 * readelf.c (print_ops): Take different args for indentation control.
3329 (attr_callback): Caller updated.
3330 Grok several more block-form attributes as being location expressions.
3331 For those same attributes with udata forms, format output differently
3332 for location list offset.
3333 (print_debug_loc_section): Implement it for real.
3335 * readelf.c (options): Mention ranges for --debug-dump.
3336 (enum section_e): Add section_ranges.
3337 (parse_opt): Grok "ranges" for -w/--debug-dump.
3338 (print_debug_ranges_section): New function.
3339 (print_debug): Handle .debug_ranges section.
3341 2005-05-30 Ulrich Drepper <drepper@redhat.com>
3343 * readelf.c (handle_notes): At least x86-64 need not have the note
3344 section values aligned to 8 bytes.
3346 2005-05-18 Ulrich Drepper <drepper@redhat.com>
3348 * readelf.c (dwarf_tag_string): Add new tags.
3350 2005-05-08 Roland McGrath <roland@redhat.com>
3352 * strip.c (handle_elf): Don't translate hash and versym data formats,
3353 elf_getdata already did it for us.
3355 2005-05-07 Ulrich Drepper <drepper@redhat.com>
3357 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
3358 (addr2line_LDADD): Likewise.
3360 2005-05-03 Roland McGrath <roland@redhat.com>
3362 * strip.c (handle_elf): Apply symbol table fixups to discarded
3363 relocation sections when they are being saved in the debug file.
3365 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
3366 and gelf_xlatetof, not the native byte order.
3368 * strip.c (parse_opt): Give error if -f or -o is repeated.
3369 (main): Exit if argp_parse returns nonzero.
3371 * strip.c (debug_fname_embed): New variable.
3372 (options, parse_opt): New option -F to set it.
3374 2005-05-07 Ulrich Drepper <drepper@redhat.com>
3376 * readelf.c (parse_opt): Make any_control_option variable
3377 local. Simplify some tests.
3379 2005-05-03 Roland McGrath <roland@redhat.com>
3381 * strip.c (crc32_file): Function removed (now in ../lib).
3383 2005-05-03 Roland McGrath <roland@redhat.com>
3385 * elflint.c (is_debuginfo): New variable.
3386 (options, parse_opt): New option --debuginfo/-d to set it.
3387 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
3388 (check_note): If is_debuginfo, don't try to get note contents.
3390 2005-04-24 Ulrich Drepper <drepper@redhat.com>
3392 * readelf.c (print_debug_abbrev_section): Don't print error when end of
3395 2005-04-14 Ulrich Drepper <drepper@redhat.com>
3397 * readelf.c (dwarf_encoding_string): New function.
3398 (dwarf_inline_string): New function.
3399 (dwarf_access_string): New function.
3400 (dwarf_visibility_string): New function.
3401 (dwarf_virtuality_string): New function.
3402 (dwarf_identifier_case_string): New function.
3403 (dwarf_calling_convention_string): New function.
3404 (dwarf_ordering_string): New function.
3405 (dwarf_discr_list_string): New function.
3406 (attr_callback): Decode man more attribute values.
3408 2005-04-01 Ulrich Drepper <drepper@redhat.com>
3410 * addr2line.c: Finish implementation of -f option.
3412 2005-03-29 Ulrich Drepper <drepper@redhat.com>
3414 * addr2line.c: New file.
3415 * Makefile.am (bin_PROGRAMS): Add addr2line.
3416 Define addr2line_LDADD.
3418 * findtextrel.c: Use new dwarf_addrdie function.
3420 * findtextrel.c: Fix usage message and re-add accidentally removed
3423 2005-03-28 Ulrich Drepper <drepper@redhat.com>
3425 * findtextrel.c: New file.
3426 * Makefile: Add rules to build findtextrel.
3428 2005-02-15 Ulrich Drepper <drepper@redhat.com>
3430 * ldlex.l: Provide ECHO definition to avoid warning.
3432 * elflint.c (check_program_header): Fix typo in RELRO test.
3434 * Makefile.am (AM_CFLAGS): Add more warning options.
3435 * elflint.c: Fix warnings introduced by the new warning options.
3436 * i386_ld.c: Likewise.
3439 * ldgeneric.c: Likewise.
3441 * readelf.c: Likewise.
3442 * sectionhash.c: Likewise.
3444 * string.c: Likewise.
3446 2005-02-05 Ulrich Drepper <drepper@redhat.com>
3448 * Makefile.am: Check for text relocations in constructed DSOs.
3450 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
3453 * ldscript.y: Add as_needed handling.
3454 * ldlex.l: Recognize AS_NEEDED token.
3455 * ld.h (struct filename_list): Add as_needed flag.
3457 2005-02-04 Ulrich Drepper <drepper@redhat.com>
3459 * elflint.c (check_symtab): Correctly determine size of GOT section.
3461 2005-01-19 Ulrich Drepper <drepper@redhat.com>
3463 * ld.c: Remove unnecessary more_help function. Print bug report
3465 * strip.c: Likewise.
3468 * readelf.c: Likewise.
3469 * elflint.c: Likewise.
3471 * elflint.c (main): Don't check for parameter problems here.
3472 (parse_opt): Do it here, where we get informed about some of them
3475 * readelf.c (main): Don't check for parameter problems here.
3476 (parse_opt): Do it here, where we get informed about some of them
3479 2005-01-11 Ulrich Drepper <drepper@redhat.com>
3481 * strip.c: Update copyright year.
3482 * readelf.c: Likewise.
3486 * elflint.c: Likewise.
3488 * elflint.c (check_symtab): Don't warn about wrong size for
3489 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
3491 2004-10-05 Ulrich Drepper <drepper@redhat.com>
3493 * readelf.c (print_phdr): In section mapping, also indicate
3494 sections in read-only segments.
3496 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3498 * readelf.c: Make compile with gcc 4.0.
3499 * strip.c: Likewise.
3501 2004-08-16 Ulrich Drepper <drepper@redhat.com>
3503 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
3504 allocate to work around gcc 3.4 bug.
3506 2004-01-25 Ulrich Drepper <drepper@redhat.com>
3508 * ldlex.l (invalid_char): Better error message.
3510 2004-01-23 Ulrich Drepper <drepper@redhat.com>
3512 * readelf.c: Print SHT_GNU_LIBLIST sections.
3514 * none_ld.c: New file.
3516 2004-01-21 Ulrich Drepper <drepper@redhat.com>
3518 * Makefile.am: Enable building of machine specific linker.
3520 2004-01-20 Ulrich Drepper <drepper@redhat.com>
3522 * Makefile.am: Support building with mudflap.
3524 * i386_ld.c: Fix warnings gcc 3.4 spits out.
3525 * ldgeneric.c: Likewise.
3526 * ldscript.y: Likewise.
3527 * readelf.c: Likewise.
3528 * strip.c: Likewise.
3530 * readelf.c (print_debug_line_section): Determine address size
3533 2004-01-19 Ulrich Drepper <drepper@redhat.com>
3535 * readelf.c (print_phdr): Show which sections are covered by the
3538 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
3540 * readelf.c (print_debug_macinfo_section): Implement.
3542 2004-01-18 Ulrich Drepper <drepper@redhat.com>
3544 * readelf.c (print_debug_line_section): Implement.
3546 2004-01-17 Ulrich Drepper <drepper@redhat.com>
3548 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
3549 * src/ld.c: Likewise.
3550 * src/nm.c: Likewise.
3551 * src/readelf.c: Likewise.
3552 * src/size.c: Likewise.
3553 * src/strip.c: Likewise.
3555 * strip.c: Add a few more unlikely. Reduce scope of some variables.
3557 * Makefile.am: Support building with mudflap.
3559 2004-01-16 Ulrich Drepper <drepper@redhat.com>
3561 * readelf.c (print_debug_info_section): Free dies memory.
3563 * readelf.c: Print .debug_info section content.
3565 2004-01-13 Ulrich Drepper <drepper@redhat.com>
3567 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
3569 2004-01-12 Ulrich Drepper <drepper@redhat.com>
3571 * readelf.c (print_debug_aranges): Implement using libdw.
3573 2004-01-11 Ulrich Drepper <drepper@redhat.com>
3575 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
3577 * readelf.c: Use libdw instead of libdwarf. Not all of the old
3578 behavior is available yet.
3579 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
3581 2004-01-09 Ulrich Drepper <drepper@redhat.com>
3583 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
3585 * nm.c: Implement getting information about local variables.
3587 2004-01-07 Ulrich Drepper <drepper@redhat.com>
3589 * nm.c: Read also debug information for local symbols.
3591 2004-01-05 Ulrich Drepper <drepper@redhat.com>
3593 * nm.c: Shuffle dwarf handling code around so the maximum column
3594 width can be computed ahead of printing. Avoid collection symbols
3595 which are not printed anyway.
3597 * nm.c: Rewrite dwarf handling to use libdw.
3598 * Makefile.am (AM_CFLAGS): Add -std parameter.
3599 (INCLUDES): Find header in libdw subdir.
3600 (nm_LDADD): Replace libdwarf with libdw.
3602 * elflint.c: Update copyright year.
3603 * readelf.c: Likewise.
3605 * strip.c: Likewise.
3608 2003-12-31 Ulrich Drepper <drepper@redhat.com>
3610 * strip.c (process_file): Close file before returning.
3612 2003-11-19 Ulrich Drepper <drepper@redhat.com>
3614 * readelf.c (handle_dynamic): Make column for tag name wider.
3616 2003-09-29 Ulrich Drepper <drepper@redhat.com>
3618 * readelf.c (handle_dynamic): Always terminate tag name with a space.
3620 2003-09-25 Ulrich Drepper <drepper@redhat.com>
3622 * strip.c (process_file): Don't mmap the input file, we modify the
3623 data structures and don't want the change end up on disk.
3625 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3627 * unaligned.h (union u_2ubyte_unaligned,
3628 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
3630 (add_2ubyte_unaligned, add_4ubyte_unaligned,
3631 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
3632 Read/store value through _ptr->u instead of *_ptr.
3634 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3636 * size.c (show_sysv): Change type of maxlen to int.
3638 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
3641 * i386_ld.c: Many many fixes and extensions.
3643 * ldgeneric.c: Likewise.
3645 2003-08-16 Ulrich Drepper <drepper@redhat.com>
3647 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
3648 the reference is from another DSO.
3650 2003-08-15 Ulrich Drepper <drepper@redhat.com>
3652 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
3653 point is found when creating a DSO.
3655 2003-08-14 Ulrich Drepper <drepper@redhat.com>
3657 * ld.c (main): Always call FLAG_UNRESOLVED.
3658 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
3659 undefined symbols if not creating DSO or ld_state.nodefs is not set.
3661 2003-08-13 Ulrich Drepper <drepper@redhat.com>
3663 * Makefile.in: Depend on libebl.a, not libebl.so.
3665 * ld.c (main): Mark stream for linker script as locked by caller.
3666 (read_version_script): Likewise.
3667 * ldlex.c: Define fread and fwrite to _unlocked variant.
3669 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
3671 * unaligned.h: Define target_bswap_16, target_bswap_32, and
3673 (store_2ubyte_unaligned, store_4ubyte_unaligned,
3674 store_8ubyte_unaligned): Define using new macros.
3676 2003-08-12 Ulrich Drepper <drepper@redhat.com>
3678 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
3679 possibly unaligned memory. Support use of big endian machines.
3681 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3683 * Moved to CVS archive.