blob: 24bc6bfad2b2026cc036bc0b1a3b17300b9a1cbc [file] [log] [blame]
Mark Wielaarda8c7f052013-03-25 21:11:53 +010012013-03-25 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (attrcb_args): Add Dwarf_Die.
4 (attr_callback): When highpc is in constant form also print as
5 address.
6 (print_debug_units): Set args.die.
7
Mark Wielaard10cd97e2013-03-19 11:43:49 +010082013-03-19 Mark Wielaard <mjw@redhat.com>
9
10 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
11
Mark Wielaarda73fecc2013-03-18 13:54:50 +0100122013-03-18 Mark Wielaard <mjw@redhat.com>
13
14 * readelf.c (print_gdb_index_section): Accept version 8.
15
Mark Wielaarda58951b2013-03-01 11:51:58 +0100162013-03-01 Mark Wielaard <mjw@redhat.com>
17
18 * findtextrel.c (process_file): Release ELF and close file when not
19 text relocations are found.
20 * strip.c (handle_elf): Track memory used for .debuglink section data
21 and free when done.
22
Mark Wielaardb94ccea2013-02-24 22:58:49 +0100232013-02-24 Mark Wielaard <mjw@redhat.com>
24
25 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
26 allowed to have out of section values because of GNU ld bugs.
27
Mark Wielaard3bdc16c2013-02-06 16:20:17 +0100282013-02-06 Mark Wielaard <mjw@redhat.com>
29
30 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
31 list of symbols allowed to have out of section values because of
32 GNU ld bugs in either .symtab or .dynsym, but only when they are
33 zero sized.
34
Mark Wielaard10186a12013-01-24 11:29:21 +0100352013-01-24 Mark Wielaard <mjw@redhat.com>
36
37 * readelf.c (argp_option): Add unresolved-address-offsets, U.
38 (print_unresolved_addresses): New static.
39 (parse_opt): Handle 'U', set print_unprocessed_values.
40 (format_dwarf_addr): Take and handle new raw argument.
41 (print_ops): Call format_dwarf_addr with raw offset values.
42 (print_debug_ranges_section): Likewise.
43 (print_debug_frame_section): Likewise.
44 (attr_callback): Likewise.
45 (print_debug_line_section): Likewise.
46 (print_debug_loc_section): Likewise.
47 (print_gdb_index_section): Likewise.
48
Mark Wielaard24257102013-01-18 22:19:08 +0100492013-01-18 Mark Wielaard <mjw@redhat.com>
50
51 * readelf.c (struct listptr): Add base Dwarf_Addr field.
52 (compare_listptr): Warn for same offset with different base.
53 (notice_listptr): Take base argument and set it.
54 (skip_listptr_hole): Likewise.
55 (struct attrcb_args): Removed unused cu_offset field.
56 Add cu_base Dwarf_Addr field.
57 (attr_callback): Call notice_listptr with cbargs->cu_base.
58 (print_debug_units): Set args.cu_base.
59 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
60 (print_debug_loc_section): Likewise.
61
Jan Kratochvilc44cce02012-10-10 19:32:05 +0200622013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
63
64 * readelf.c (handle_core_items): Limit special repeated items handling
65 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
66
Mark Wielaard6d258ce2013-01-16 15:19:20 +0100672012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
68
69 * readelf.c (ELF_INPUT_SECTION): New argp key value.
70 (argp_option): Add elf-section.
71 (elf_input_section): New static.
72 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
73 (open_input_section): New function.
74 (process_file): Call open_input_section if elf_input_section set.
75
David Abdurachmanov1a4d0662013-01-13 16:44:21 +0100762013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
77
78 ar.c (do_oper_delete): Fix num passed to memset.
79
Mark Wielaard55324042012-12-21 10:02:11 +0100802012-12-21 Mark Wielaard <mjw@redhat.com>
81
Mark Wielaard00f758c2012-12-21 22:11:44 +010082 * readelf.c (print_debug_frame_section): Adjust FDE start address
83 if pcrel before feeding it to format_dwarf_addr.
84
852012-12-21 Mark Wielaard <mjw@redhat.com>
86
87 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +010088
Roland McGrath57bd66c2012-12-11 09:42:07 -0800892012-12-11 Roland McGrath <roland@hack.frob.com>
90
91 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
92 sh_name case.
93 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
94
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +0100952012-10-16 Mark Wielaard <mjw@redhat.com>
96
97 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
98 calculated beginning after the operand and 2-byte constant.
99
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02001002012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
101
102 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
103 (WRAP_COLUMN): ... here.
104 (print_core_item): Remove parameter format_max. Update function
105 comment. Replace FORMAT_MAX by the real output width.
106 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
107 calls of print_core_item, remove variable maxfmt, change
108 ITEM_WRAP_COLUMN to WRAP_COLUMN.
109 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
110 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
111
Roland McGrath82ed98a2012-10-11 14:53:18 -07001122012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
113
114 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
115 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
116
Mark Wielaarde89c5002012-08-27 14:30:05 +02001172012-08-27 Mark Wielaard <mjw@redhat.com>
118
Mark Wielaard3e440062012-08-27 15:21:58 +0200119 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
120
1212012-08-27 Mark Wielaard <mjw@redhat.com>
122
Mark Wielaarde89c5002012-08-27 14:30:05 +0200123 * readelf.c (register_info): Handle loc == NULL.
124
Jeff Kenton257dcf42012-08-22 09:00:03 -04001252012-08-22 Jeff Kenton <jkenton@tilera.com>
126
127 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
128
Mark Wielaardf31c4412012-08-17 00:35:03 +02001292012-08-16 Mark Wielaard <mjw@redhat.com>
130
131 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
132 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
133 appropriate.
134 (dwarf_attr_name): Likewise.
135 (dwarf_form_name): Likewise.
136 (dwarf_lang_name): Likewise.
137 (dwarf_inline_name): Likewise.
138 (dwarf_encoding_name): Likewise.
139 (dwarf_access_name): Likewise.
140 (dwarf_visibility_name): Likewise.
141 (dwarf_virtuality_name): Likewise.
142 (dwarf_identifier_case_name): Likewise.
143 (dwarf_calling_convention_name): Likewise.
144 (dwarf_ordering_name): Likewise.
145 (dwarf_discr_list_name): Likewise.
146 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
147 (attr_callback): Call new dwarf_foobar_name instead of old
148 dwarf_foobar_string functions.
149 (dwarf_tag_string): New function using known-dwarf.h macros.
150 (dwarf_attr_string): Likewise.
151 (dwarf_form_string): Likewise.
152 (dwarf_lang_string): Likewise.
153 (dwarf_inline_string): Likewise.
154 (dwarf_encoding_string): Likewise.
155 (dwarf_access_string): Likewise.
156 (dwarf_visibility_string): Likewise.
157 (dwarf_virtuality_string): Likewise.
158 (dwarf_identifier_case_string): Likewise.
159 (dwarf_calling_convention_string): Likewise.
160 (dwarf_ordering_string): Likewise.
161 (dwarf_discr_list_string): Likewise.
162 (dwarf_locexpr_opcode_string): Likewise.
163
Mark Wielaard775375e2012-06-22 12:02:45 +02001642012-06-27 Mark Wielaard <mjw@redhat.com>
165
166 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
167 DW_FORM_GNU_strp_alt.
168 (attr_callback): Likewise.
169
Petr Machatafe198bc2012-07-30 19:48:28 +02001702012-07-30 Petr Machata <pmachata@redhat.com>
171
172 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
173 corresponding printf) so that those that are referenced by only
174 one of the formatting strings are at the end.
175
Mark Wielaard629b2562012-07-29 14:05:20 +02001762012-07-29 Mark Wielaard <mjw@redhat.com>
177
178 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
179 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
180
Mark Wielaard515fba92012-07-20 00:09:56 +02001812012-07-19 Mark Wielaard <mjw@redhat.com>
182
183 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
184
Mark Wielaarde9b23882012-06-29 22:30:15 +02001852012-07-11 Mark Wielaard <mjw@redhat.com>
186
187 * readelf.c (options): Add macro to help of debug-dump.
188 (section_e): Add section_macro.
189 (section_all): Add section_macro.
190 (parse_opt): Handle macro.
191 (print_debug_macro_section): New function.
192 (print_debug): Add NEW_SECTION (macro).
193
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02001942012-07-10 Mark Wielaard <mjw@redhat.com>
195
196 * readelf.c (print_gdb_index_section): Add version 7 support.
197 Keep track of cu_nr. Print kind and static/global flag for each
198 symbol. When a symbol is in the TU list add 'T'.
199
Mark Wielaarda0172d72012-06-25 17:18:53 +02002002012-06-26 Mark Wielaard <mjw@redhat.com>
201
202 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
203
Mark Wielaard50e2d392012-06-22 16:44:54 +02002042012-06-22 Mark Wielaard <mjw@redhat.com>
205
206 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
207 for gcc 4.7 -Wformat.
208
Mark Wielaard36aa5982012-05-09 11:27:44 +02002092012-05-09 Roland McGrath <roland@hack.frob.com>
210
211 * elflint (check_sections): Allow zero sized sections at (filesz) end
212 of segment. And make check overflow-proofed.
213
Mark Wielaard716486d2012-04-24 11:56:42 +02002142012-04-24 Mark Wielaard <mjw@redhat.com>
215
216 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
217 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
218
Roland McGrath738c1832012-03-28 15:01:49 -07002192012-03-28 Roland McGrath <roland@hack.frob.com>
220
221 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
222
Mark Wielaard61651c12012-03-28 11:20:36 +02002232012-03-28 Mark Wielaard <mjw@redhat.com>
224
225 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
226 section data.
227 (print_debug_str_section): Likewise.
228
Mark Wielaard30bb7142012-03-21 16:05:31 +01002292012-03-21 Mark Wielaard <mjw@redhat.com>
230
231 * readelf.c (print_gdb_index_section): Accept version 6.
232
Mark Wielaardcb643d62012-01-31 19:22:03 +01002332012-01-31 Mark Wielaard <mjw@redhat.com>
234
235 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
236
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05002372012-01-21 Ulrich Drepper <drepper@gmail.com>
238
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500239 * addr2line.c: Update copyright year.
240 * ar.c: Likewise.
241 * elfcmp.c: Likewise.
242 * elflint.c: Likewise.
243 * findtextrel.c: Likewise.
244 * ld.c: Likewise.
245 * nm.c: Likewise.
246 * objdump.c: Likewise.
247 * ranlib.c: Likewise.
248 * readelf.c: Likewise.
249 * size.c: Likewise.
250 * strings.c: Likewise.
251 * strip.c: Likewise.
252 * unstrip.c: Likewise.
253
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -0500254 * nm.c (argp_children): Define.
255 (argp): Hook up argp_children.
256 (handle_ar): Optimize puts call.
257 (show_symbols_bsd): Use positional parameters to also print color
258 codes. Don't print STT_FILE symbols.
259 * objdump.c (options): Improve help text.
260 (argp_children): Define.
261 (argp): Hook up argp_children.
262 (disasm_info): Add elements for color codes.
263 (disasm_output): Print color codes as well.
264 (show_disasm): Set up disasm_info data for callback.
265
Roland McGrath85924782012-01-20 11:40:59 -08002662012-01-20 Roland McGrath <roland@hack.frob.com>
267
Roland McGrath3284b792012-01-20 12:51:46 -0800268 * arlib-argp.c (arlib_deterministic_output): Initialize from
269 configured value.
270 (help_filter): New function.
271 (argp): Use it.
272
Roland McGrath9bffd362012-01-20 12:04:19 -0800273 * ar.c (main): Handle oper_none as usage error.
274
Roland McGrath6e063d92012-01-20 11:43:36 -0800275 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
276
Roland McGrath85924782012-01-20 11:40:59 -0800277 * ranlib.c (argp): Use arlib_argp_children.
278
279 * arlib.c (arlib_init): Obey arlib_deterministic_output.
280
281 * arlib-argp.c: New file.
282 * Makefile.am (libar_a_SOURCES): Add it.
283 * arlib.h (arlib_deterministic_output, arlib_argp_children):
284 Declare new variables.
285 * ar.c (deterministic_output): Variable removed.
286 (do_oper_insert): Use arlib_deterministic_output instead.
287 (options, parse_opt): Don't handle -D here. Add group numbers.
288 (argp): Use arlib_argp_children.
289
Roland McGratha065c4b2011-12-20 10:55:01 -08002902011-12-20 Roland McGrath <roland@hack.frob.com>
291
292 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
293 Reported by Karel Klic <kklic@redhat.com>.
294
Roland McGrath4fa988e2011-11-05 20:58:14 -07002952011-11-05 Roland McGrath <roland@hack.frob.com>
296
Roland McGrathe5ba2a12011-11-05 21:08:07 -0700297 * ar.c (deterministic_output): New flag variable.
298 (options, parse_opt): Grok -D to set it.
299 (do_oper_insert): When set, use zero from mtime, uid, and gid.
300
Roland McGrath4fa988e2011-11-05 20:58:14 -0700301 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
302
Marek Polacek8d1e2972011-10-04 05:11:42 -04003032011-10-04 Marek Polacek <mpolacek@redhat.com>
304
305 * readelf.c (register_info): Assume the right size of an array.
306
Ulrich Drepper2356ba02011-10-03 07:23:07 -04003072011-10-03 Ulrich Drepper <drepper@gmail.com>
308
309 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
310 but don't show it in help anymore.
311 (mark_special): Renamed from mark_weak.
312 (parse_opt): Adjust.
313 (class_type_char): Take additional parameters for ELF file and ELF
314 header. Treat TLS symbols like objects.
315 In case of D symbols, show u for unique symbols, R for symbols in
316 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400317 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400318 header. Adjust for class_type_char change. Show TLS symbols with
319 @ after them in case --mark-special is selected.
320 (show_symbols_posix): Likewise.
321 (show_symbols): Adjust calls to show_symbols_bsd and
322 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -0400323 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400324 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400325
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -04003262011-10-02 Ulrich Drepper <drepper@gmail.com>
327
328 * Makefile.am (demanglelib): Define.
329 (nm_LDADD): Add demanglelib.
330 * nm.c (options): Add -C option.
331 (demangle): Define as global variable.
332 (parse_opt): Recognize -C.
333 (show_symbols_sysv): Handle demangling.
334 (show_symbols_bad): Likewise.
335 (show_symbols_posix): Likewise.
336 (show_symbols): Likewise.
337
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07003382011-07-09 Roland McGrath <roland@hack.frob.com>
339
Roland McGrathbd754192011-07-09 05:33:37 -0700340 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
341
342 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700343
Mark Wielaard02a958b2011-05-30 17:23:57 +02003442011-05-30 Mark Wielaard <mjw@redhat.com>
345
346 * strip.c (relocate): Make offset check overflow-proof.
347
Mark Wielaard1662bc32011-05-16 11:33:11 +02003482011-05-23 Mark Wielaard <mjw@redhat.com>
349
Mark Wielaard63868c22011-05-24 16:09:31 +0200350 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700351 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +0200352 Relocate against any debug section symbol, not just STT_SECTION
353 symbols. For SHT_REL relocations, fetch addend from offset and
354 add it to symbol value if not zero.
355
3562011-05-23 Mark Wielaard <mjw@redhat.com>
357
Mark Wielaard1662bc32011-05-16 11:33:11 +0200358 * strip.c (OPT_RELOC_DEBUG): New option.
359 (argp_option): Add new --reloc-debug-sections option.
360 (main): Check new option.
361 (parse_opt): Likewise.
362 (handle_elf): Remove any relocations between debug sections
363 in ET_REL for the debug file when requested.
364
Mark Wielaard7a125b92011-05-17 12:20:01 +02003652011-05-18 Mark Wielaard <mjw@redhat.com>
366
367 * strip.c (handle_elf): Make sure all sections of a removed group
368 section are removed too. Don't discard SHT_GROUP sections, copy
369 section table before it gets modified. Section group signature
370 symbols don't have to be retained.
371
Jakub Jelinek03124242011-05-17 17:00:14 +02003722011-05-16 Jakub Jelinek <jakub@redhat.com>
373
374 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
375 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
376 and DW_OP_GNU_reinterpret.
377
Mark Wielaard69a9b112011-05-17 15:34:02 +02003782011-05-17 Mark Wielaard <mjw@redhat.com>
379
380 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
381 DW_TAG_GNU_call_site_parameter return strings.
382
Marek Polacekc8920de2011-05-12 12:08:21 +02003832011-05-11 Marek Polacek <mpolacek@redhat.com>
384
385 * nm.c (show_symbols_sysv): Remove unused if/else, remove
386 unused `prefix' and `fname' parameters.
387
Marek Polacek82f77d72011-05-07 19:26:20 +02003882011-05-07 Marek Polacek <mpolacek@redhat.com>
389
390 * unstrip.c (compare_sections_nonrel): Mark this function as static.
391
Mark Wielaardbb9d1b42011-04-24 17:53:38 +02003922011-04-26 Mark Wielaard <mjw@redhat.com>
393
394 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
395 with note name.
396
Mark Wielaard093a1d32011-04-14 23:47:26 +02003972011-04-14 Mark Wielaard <mjw@redhat.com>
398
399 * readelf.c (options): Add gdb_index.
400 (section_e): Define section_gdb_index.
401 (parse_opt): Recognize gdb_index debug-dump argument.
402 (print_gdb_index_section): New function.
403 (print_debug): Add gdb_index to debug_sections.
404
Petr Machata1879e5b2011-03-25 15:17:04 +01004052011-03-24 Petr Machata <pmachata@redhat.com>
406
407 * readelf.c (print_debug_line_section): Emit initial space for all
408 opcode lines. Print offset in front of each opcode.
409
Marek Polacek44de92a2011-03-22 01:07:20 +01004102011-03-22 Marek Polacek <mpolacek@redhat.com>
411
412 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
413
Mark Wielaarde3368c52011-03-22 23:03:31 +01004142011-03-22 Mark Wielaard <mjw@redhat.com>
415
416 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
417 and DW_TAG_GNU_call_site_parameter.
418 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
419 DW_AT_GNU_call_site_data_value,
420 DW_AT_GNU_call_site_target,
421 DW_AT_GNU_call_site_target_clobbered,
422 DW_AT_GNU_tail_call,
423 DW_AT_GNU_all_tail_call_sites,
424 DW_AT_GNU_all_call_sites,
425 and DW_AT_GNU_all_source_call_sites.
426 (print_ops): Handle DW_OP_GNU_entry_value.
427 (attr_callback): Handle DW_AT_GNU_call_site_value,
428 DW_AT_GNU_call_site_data_value,
429 DW_AT_GNU_call_site_target,
430 and DW_AT_GNU_call_site_target_clobbered.
431
Mark Wielaarda062b6b2011-03-10 13:02:32 +01004322011-03-10 Mark Wielaard <mjw@redhat.com>
433
434 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
435
Jan Kratochvilfec39992011-02-27 12:01:25 -08004362011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
437
438 * readelf.c (reset_listptr): Clear TABLE->TABLE.
439
Mark Wielaardcf454ab2011-02-25 12:58:54 +01004402011-02-25 Mark Wielaard <mjw@redhat.com>
441
442 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
443 (dwarf_form_string): Properly format and return unknown form.
444
Roland McGrath47c53232011-02-23 09:23:08 -08004452011-02-23 Roland McGrath <roland@redhat.com>
446
Roland McGrath725aad52011-02-23 19:52:46 -0800447 * readelf.c (section_name): New function.
448 (print_debug_abbrev_section): Use it instead of constant.
449 (print_debug_aranges_section): Likewise.
450 (print_debug_ranges_section): Likewise.
451 (print_debug_units): Likewise.
452 (print_debug_line_section): Likewise.
453 (print_debug_loc_section): Likewise.
454 (print_debug_macinfo_section): Likewise.
455 (print_debug_pubnames_section): Likewise.
456 (print_debug_str_section): Likewise.
457 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
458 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
459 (print_debug_str_section): Likewise.
460
Roland McGrath47c53232011-02-23 09:23:08 -0800461 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
462
Roland McGrath1fb9c912011-02-11 10:32:30 -08004632011-02-11 Roland McGrath <roland@redhat.com>
464
Roland McGrath4a14ef72011-02-11 10:42:45 -0800465 * elfcmp.c (verbose): New variable.
466 (options, parse_opt): Grok -l/--verbose to set it.
467 (main): Under -l, keep going after first difference.
468
Roland McGrath1fb9c912011-02-11 10:32:30 -0800469 * elfcmp.c (ignore_build_id): New variable.
470 (options, parse_opt): Grok --ignore-build-id to set it.
471 (main): For SHT_NOTE sections, compare note details rather than raw
472 bytes. Under --ignore-build-id, don't complain about differing build
473 ID contents if lengths match.
474
Roland McGrathfd992542011-02-08 19:45:12 -08004752011-02-08 Roland McGrath <roland@redhat.com>
476
Roland McGrath240784b2011-02-08 19:48:42 -0800477 * ldscript.y (filename_id_star): Remove unused variable.
478
Roland McGrath8f6c1792011-02-08 19:48:02 -0800479 * unstrip.c (copy_elided_sections): Remove unused variable.
480
Roland McGrath4db89f02011-02-08 19:46:50 -0800481 * elflint.c (check_dynamic): Remove unused variables.
482
Roland McGrath33231312011-02-08 19:45:26 -0800483 * elflint.c (check_symtab): Warn about missing xndx section only once.
484
Roland McGrathfd992542011-02-08 19:45:12 -0800485 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
486
Roland McGrathf151b7d2011-01-06 12:14:43 -08004872011-01-06 Roland McGrath <roland@redhat.com>
488
489 * strip.c (handle_elf): Under --strip-sections, remove all
490 non-allocated sections and never generate .gnu_debuglink.
491
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08004922011-01-04 Roland McGrath <roland@redhat.com>
493
494 * strip.c (remove_shdrs): New variable.
495 (options, parse_opt): Grok --strip-sections to set it.
496 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
497
Roland McGrath77221de2010-11-10 19:47:31 -08004982010-11-10 Roland McGrath <roland@redhat.com>
499
500 * findtextrel.c (process_file): Don't assume order of sections.
501 Reported by Mike Hommey <mh@glandium.org>.
502
Roland McGrath932585d2010-05-08 04:01:14 -07005032010-07-26 Roland McGrath <roland@redhat.com>
504
505 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
506
Roland McGratha1599152010-08-30 04:04:37 -07005072010-08-30 Roland McGrath <roland@redhat.com>
508
Roland McGrathfa144952010-08-30 19:22:41 -0700509 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
510 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
511 for ranges, loc.
512 (struct listptr, struct listptr_table): New types.
513 (compare_listptr, reset_listptr, sort_listptr): New functions.
514 (notice_listptr, skip_listptr_hole): New functions.
515 (struct attrcb_args): Add silent member.
516 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
517 Suppress output if silent, but still call notice_listptr.
518 (print_debug_units): Suppress output if section_info not requested.
519 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
520 (print_debug_ranges_section): Likewise.
521 (print_debug): Call reset_listptr on both tables.
522
523 * readelf.c (print_debug_ranges_section): Print empty list.
524 (print_debug_loc_section): Likewise.
525
Roland McGratha1599152010-08-30 04:04:37 -0700526 * readelf.c (print_debug_loc_section): Check for bogus length
527 before calling print_ops.
528 (print_ops): Check harder for bogus data that would read off end.
529
Roland McGrathf4763cf2010-08-11 13:04:12 -07005302010-08-11 Roland McGrath <roland@redhat.com>
531
532 * readelf.c (for_each_section_argument): Process all sections with
533 matching name, not just the first.
534
Roland McGrath52604ba2010-07-26 21:29:44 -07005352010-07-26 Roland McGrath <roland@redhat.com>
536
537 * readelf.c (print_ops): Take new argument for CU version.
538 Fix DW_OP_call_ref decoding to depend on it.
539 (print_debug_loc_section): Update caller.
540 (print_cfa_program): Take new argument, pass it down.
541 (print_debug_frame_section): Update caller.
542 (struct attrcb_args): New member version.
543 (print_debug_units): Initialize it.
544
Roland McGrath2f14a312010-07-02 11:16:25 -07005452010-07-02 Roland McGrath <roland@redhat.com>
546
547 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
548 initial_location.
549
Roland McGrathb6458032010-06-30 11:57:19 -07005502010-06-30 Roland McGrath <roland@redhat.com>
551
552 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
553 Ignore st_size for a non-S_ISREG file descriptor.
554 (read_block): Move assert after no-mmap bail-out.
555 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
556
Roland McGrathfa799902010-06-22 13:05:23 -07005572010-06-22 Roland McGrath <roland@redhat.com>
558
559 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
560
Roland McGrath0c5638c2010-06-21 23:00:35 -07005612010-06-21 Roland McGrath <roland@redhat.com>
562
563 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700564 (dwarf_attr_string): Add new attributes.
565 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700566
567 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
568 (print_cfa_program): Likewise.
569
Roland McGrathe5251a12010-06-20 16:59:39 -07005702010-06-20 Roland McGrath <roland@redhat.com>
571
Roland McGrath2b1f0952010-06-20 17:55:50 -0700572 * readelf.c (print_debug_units): New function, broken out of ...
573 (print_debug_info_section): ... here. Call it.
574 (print_debug_types_section): New function.
575 (enum section_e): Add section_types alias for section_info.
576 (print_debug): Add types to the sections table.
577
Roland McGrath599f7f52010-06-20 17:12:43 -0700578 * readelf.c (print_debug_frame_section): Handle version 4 format.
579
Roland McGrathe5251a12010-06-20 16:59:39 -0700580 * readelf.c (print_debug_line_section): Handle version 4 format.
581
Roland McGrathec86e5f2010-06-14 17:44:38 -07005822010-06-14 Roland McGrath <roland@redhat.com>
583
584 * unstrip.c (copy_elided_sections): Make sure all sections' data have
585 been read in before we write anything out.
586
Roland McGrath3b1b6512010-06-04 02:26:30 -07005872010-06-04 Roland McGrath <roland@redhat.com>
588
Roland McGrathaa32f922010-06-04 02:29:08 -0700589 * unstrip.c (update_shdr): New function.
590 (update_sh_size): Call it instead of gelf_update_shdr.
591 (adjust_relocs, add_new_section_symbols): Likewise.
592 (new_shstrtab, copy_elided_sections): Likewise.
593
Roland McGrath3b1b6512010-06-04 02:26:30 -0700594 * unstrip.c (copy_elided_sections): Bail if stripped file has more
595 sections than unstripped file, rather than getting confused later.
596
Roland McGrath7a5bed82010-06-01 13:44:00 -07005972010-06-01 Roland McGrath <roland@redhat.com>
598
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700599 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
600 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700601 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700602
Roland McGrath7a5bed82010-06-01 13:44:00 -0700603 * readelf.c (print_debug): Don't bail if libdw setup fails.
604 Suppress complaint if we only want .eh_frame anyway.
605
Ulrich Drepper173ade82010-05-28 07:39:49 -07006062010-05-28 Ulrich Drepper <drepper@redhat.com>
607
608 * readelf.c (attr_callback): Also print form information.
609
Roland McGrath12e3d1f2010-05-19 18:03:31 -07006102010-05-19 Roland McGrath <roland@redhat.com>
611
612 * addr2line.c (find_symbol): Short-circuit on empty name.
613 (handle_address): Handle SYMBOL with no +OFFSET.
614
Roland McGrath688f7fc2010-05-08 03:22:59 -07006152010-05-08 Roland McGrath <roland@redhat.com>
616
617 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
618 Use that for DW_OP_call_ref, not ADDRSIZE.
619 (print_cfa_program): Update caller.
620 (struct attrcb_args): Add offset_size field.
621 (attr_callback): Use it for print_ops call.
622 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700623 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700624
Roland McGrath62b28b62010-04-14 11:54:06 -07006252010-04-14 Roland McGrath <roland@redhat.com>
626
627 * readelf.c (handle_core_item): Fix bitmask printing.
628
Roland McGrath3b495d82010-04-06 12:58:32 -07006292010-04-06 Roland McGrath <roland@redhat.com>
630
631 * ld.c (options): Fix some typos in messages.
632 * elflint.c (check_scn_group, check_group): Likewise.
633 * ldscript.y (add_id_list): Likewise.
634 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
635 before translated string containing a literal %.
636
Roland McGrath890081b2010-02-26 17:57:50 -08006372010-02-26 Roland McGrath <roland@redhat.com>
638
639 * readelf.c (process_file): Don't leak an fd in failure case.
640
Roland McGrathc2b26f12010-02-15 15:16:15 -08006412010-02-15 Roland McGrath <roland@redhat.com>
642
Roland McGrath22359e22010-02-15 15:57:03 -0800643 * Makefile.am: Use config/eu.am for common stuff.
644
Roland McGrathc2b26f12010-02-15 15:16:15 -0800645 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
646 mismatch in comparison.
647
Roland McGrathf920fd52010-02-02 15:50:15 -08006482010-02-02 Roland McGrath <roland@redhat.com>
649
650 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
651 (read_encoded): Likewise.
652 (print_debug_frame_section): Check for bogus augmentation length.
653 For P augmentation, use read_encoded, print the encoding description,
654 and use hex for unsigned values.
655
Roland McGrathb337b1f2010-01-15 01:02:27 -08006562010-01-15 Roland McGrath <roland@redhat.com>
657
658 * ar.c: Include <sys/stat.h>.
659 * elflint.c: Likewise.
660 * readelf.c: Likewise.
661 * strip.c: Likewise.
662 * unstrip.c: Likewise
663
Roland McGrathbd733ca2010-01-07 20:11:42 -08006642010-01-07 Roland McGrath <roland@redhat.com>
665
Roland McGrath8111da02010-01-07 20:31:59 -0800666 * readelf.c (print_ehdr): Handle PN_XNUM.
667 (phnum): New static variable.
668 (process_elf_file): Set it with elf_getphdrnum.
669 (print_phdr): Use phnum instead of EHDR->e_phnum.
670 (print_dynamic, handle_notes): Likewise.
671 (handle_relocs_rel, handle_relocs_rela): Likewise.
672
Roland McGrathbd733ca2010-01-07 20:11:42 -0800673 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
674
675 * elflint.c (phnum): New static variable.
676 (check_elf_header): Set it, handling PN_XNUM.
677 Use that in place of EHDR->e_phnum throughout.
678 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
679 (unknown_dependency_p, check_sections, check_program_header): Likewise.
680
Roland McGrath019d9fb2010-01-05 13:36:07 -08006812010-01-05 Roland McGrath <roland@redhat.com>
682
683 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
684 DW_AT_GNU_template_name.
685
Roland McGrathe4061d02010-01-04 20:25:09 -08006862010-01-04 Roland McGrath <roland@redhat.com>
687
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800688 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
689 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
690 (handle_core_item): Handle .format of '\n' as \n-separated strings.
691
Roland McGrath2e79deb2010-01-04 20:36:10 -0800692 * readelf.c (implicit_debug_sections): New variable.
693 (parse_opt): Set it instead of print_debug_sections for -a.
694 OR them together for print_debug check.
695 (print_debug): OR them together for section check.
696
Roland McGratha7422be2010-01-04 20:29:33 -0800697 * readelf.c (options): Repartition into set implied by -a and others.
698 Correct -a text to match reality.
699
Roland McGrathe4061d02010-01-04 20:25:09 -0800700 * readelf.c (struct section_argument): Add bool member 'implicit'.
701 (parse_opt): Set it for -a cases, clear it for -x args.
702 (for_each_section_argument): Don't complain about a missing section by
703 name if it's implicit.
704
Roland McGrathefa64962009-11-16 01:50:58 -08007052009-11-16 Roland McGrath <roland@redhat.com>
706
707 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
708 sections, just as dump_data_section already does.
709
Mark Wielaardc49d00a2009-09-21 16:47:07 -07007102009-09-21 Ulrich Drepper <drepper@redhat.com>
711
712 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
713 set for .comment section.
714 Patch by Mark Wielaard <mjw@redhat.com>.
715
Roland McGrathfb33c672009-09-08 00:21:18 -07007162009-09-08 Roland McGrath <roland@redhat.com>
717
718 * ar.c (main): Fix typo in message format.
719
Roland McGrath2d13ea22009-08-21 03:16:32 -07007202009-08-21 Roland McGrath <roland@redhat.com>
721
722 * readelf.c (attr_callback): Use print_block only when we don't use
723 print_ops.
724
Roland McGrath536127f2009-08-14 13:10:09 -07007252009-08-14 Roland McGrath <roland@redhat.com>
726
727 * ar.c (do_oper_extract): Use pathconf instead of statfs.
728
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07007292009-08-01 Ulrich Drepper <drepper@redhat.com>
730
731 * debugpred.h: Add two most const.
732
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07007332009-07-26 Mark Wielaard <mjw@redhat.com>
734
735 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
736
Mark Wielaard79178202009-07-25 12:44:46 -07007372009-07-25 Mark Wielaard <mjw@redhat.com>
738
739 * Makefile.am (addr2line_LDADD): Add $(libelf).
740
Roland McGrathbe4589d2009-07-24 16:23:12 -07007412009-07-24 Roland McGrath <roland@redhat.com>
742
743 * readelf.c (print_block): New function.
744 (print_ops): Use it.
745 (attr_callback): Use it for DW_FORM_block* forms.
746
Mark Wielaarddaf85b22009-07-24 15:49:51 -07007472009-07-20 Mark Wielaard <mjw@redhat.com>
748
749 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
750 and DW_OP_stack_value.
751
Ulrich Drepper96d950e2009-07-14 10:42:01 -07007522009-07-14 Ulrich Drepper <drepper@redhat.com>
753
754 * elflint.c (check_elf_header): Allow Linux ABI.
755 (check_symtab): Handle STB_GNU_UNIQUE.
756
Mark Wielaardf735db12009-07-08 19:18:53 +02007572009-07-08 Mark Wielaard <mjw@redhat.com>
758
759 * readelf.c (attr_callback): Handle DW_Form constants for
760 DW_AT_data_member_location.
761
Roland McGrathdffc33d2009-07-06 16:06:41 -07007622009-07-06 Roland McGrath <roland@redhat.com>
763
764 * readelf.c (register_info): New function. Handle unknown register #s.
765 (print_cfa_program): Use it.
766 (handle_core_register, handle_core_registers): Likewise.
767
Roland McGrath5dbccdb2009-06-28 14:48:02 -07007682009-06-28 Roland McGrath <roland@redhat.com>
769
770 * readelf.c (print_address_names): New static variable.
771 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
772 (format_dwarf_addr): Don't look up name if !print_address_names.
773
Ulrich Drepperf1894932009-06-13 15:55:42 -07007742009-06-13 Ulrich Drepper <drepper@redhat.com>
775
776 * ldgeneric.c: Don't use deprecated libelf functions.
777 * nm.c: Likewise.
778 * objdump.c: Likewise.
779 * readelf.c: Likewise.
780 * size.c: Likewise.
781 * strip.c: Likewise.
782 * unstrip.c: Likewise.
783 * ld.h: Fix up comment.
784
Ulrich Drepperb47d2902009-06-01 07:38:32 -07007852009-06-01 Ulrich Drepper <drepper@redhat.com>
786
787 * readelf.c (print_relocs): Expect ELF header argument and pass on
788 to handle_relocs_rel* functions. Adjust caller.
789 (handle_relocs_rel): Add ELF header argument. Add special case for
790 the IRELATIVE relocations in statically linked executables.
791 (handle_relocs_rela): Likewise.
792
Roland McGrathdb19f0b2009-05-07 18:44:27 -07007932009-04-29 Ulrich Drepper <drepper@redhat.com>
794
795 * elflint.c (check_symtab): Add tests of st_other field.
796
Ulrich Drepperaab90f92009-04-23 07:44:36 -07007972009-04-23 Ulrich Drepper <drepper@redhat.com>
798
799 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
800
Roland McGrathd86e1832009-04-20 00:49:33 -07008012009-04-20 Roland McGrath <roland@redhat.com>
802
Roland McGrath8a592412009-04-20 01:20:44 -0700803 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
804 of inline call sites.
805
Roland McGrathd86e1832009-04-20 00:49:33 -0700806 * addr2line.c (just_section): New variable.
807 (adjust_to_section): New function, broken out of ...
808 (handle_address): ... here.
809 (options, parse_opt): Add -j/--section=NAME to set it.
810
Roland McGrath2fb90512009-04-15 14:47:13 -07008112009-04-15 Roland McGrath <roland@redhat.com>
812
813 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
814 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
815
Roland McGrath04a14162009-04-14 01:02:17 -07008162009-04-14 Roland McGrath <roland@redhat.com>
817
Roland McGratheb9ba472009-04-14 18:44:45 -0700818 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
819 like SHT_GNU_ATTRIBUTES.
820
Roland McGrath94f43832009-04-14 04:39:32 -0700821 * readelf.c (handle_core_registers): Fix error message.
822
Roland McGrath04a14162009-04-14 01:02:17 -0700823 * strip.c (handle_elf: check_preserved): Don't note any change when
824 .debug_data is already filled from a previous pass.
825
Ulrich Drepper411cdb22009-02-05 22:04:26 -08008262009-02-05 Ulrich Drepper <drepper@redhat.com>
827
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800828 * objdump.c (show_relocs_x): Minor cleanups.
829
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800830 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800831 Print first DW_CFA_expression and DW_CFA_val_expression parameter
832 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800833
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08008342009-02-01 Ulrich Drepper <drepper@redhat.com>
835
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800836 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
837 into ...
838 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800839 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800840
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800841 * objdump.c (show_relocs_rela): Show offsets as signed values.
842
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800843 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
844 Improve some error messages.
845 Use program_invocation_short_name instead of AR macro.
846 * Makefile.am (CFLAGS_ar): Remove.
847 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
848 * objdump.c (parse_opt): Likewise.
849 * readelf.c (parse_opt): Likewise.
850
Roland McGrath51f01282009-01-27 17:08:03 -08008512009-01-27 Roland McGrath <roland@redhat.com>
852
853 * readelf.c (print_ops): Notice short length, don't overrun buffer
854 (still need to fix LEB128).
855
856 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
857
858 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
859
Ulrich Drepper62c46532009-01-24 17:01:08 -08008602009-01-24 Ulrich Drepper <drepper@redhat.com>
861
862 * readelf.c (print_debug_frame_section): Fix computation of vma_base
863 for PC-relative mode.
864
Ulrich Drepperd7285e12009-01-23 16:10:44 -08008652009-01-23 Ulrich Drepper <drepper@redhat.com>
866
Ulrich Drepperccccab02009-01-23 16:32:21 -0800867 * size.c (process_file): When handling archive, close file descriptor
868 here. For unknown file format also close file descriptor.
869 (handle_ar): Don't close file descriptor here.
870
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800871 * readelf.c (parse_opt): Move code to add to dump_data_sections and
872 string_sections list in local function add_dump_section. Adjust 'x'
873 key handling. For 'a' key add .strtab, .dynstr, and .comment section
874 to string_sections list.
875
Roland McGrathe9de9b42009-01-22 13:05:40 -08008762009-01-22 Roland McGrath <roland@redhat.com>
877
Roland McGrath9a847e12009-01-22 19:55:00 -0800878 * readelf.c (print_phdr): Don't print section mapping when no sections.
879
Roland McGrathd759aa62009-01-22 19:17:07 -0800880 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
881
Roland McGrathcabeeee2009-01-22 13:17:45 -0800882 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
883 and reset it only for the 'true' cases.
884
885 * Makefile.am (addr2line_no_Wformat): New variable.
886
Roland McGrathe9de9b42009-01-22 13:05:40 -0800887 * readelf.c (print_debug_frame_section): Use t instead of j formats
888 for ptrdiff_t OFFSET.
889
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08008902009-01-21 Ulrich Drepper <drepper@redhat.com>
891
892 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800893 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800894 (check_exception_data): First sanity test.
895
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08008962009-01-17 Ulrich Drepper <drepper@redhat.com>
897
Ulrich Drepper935edde2009-01-17 16:06:42 -0800898 * readelf.c (print_debug_exception_table): Show target of ar_disp
899 field.
900
901 * elflint.c (check_program_header): Add most consistency checks for
902 PT_GNU_EH_FRAME entry.
903
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800904 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
905 ARGP_PROGRAM_BUG_ADDRESS_DEF.
906 * ar.c: Likewise.
907 * elfcmp.c: Likewise.
908 * elflint.c: Likewise.
909 * findtextrel.c: Likewise.
910 * ld.c: Likewise.
911 * nm.c: Likewise.
912 * objdump.c: Likewise.
913 * ranlib.c: Likewise.
914 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800915
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800916 * size.c: Likewise.
917 * strings.c: Likewise.
918 * strip.c: Likewise.
919 * unstrip.c: Likewise.
920
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08009212009-01-16 Ulrich Drepper <drepper@redhat.com>
922
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800923 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
924 matches .eh_frame_hdr section, if it is available. Also check that
925 the segment is allocated, not writable, not executable.
926
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800927 * readelf.c: Add -e option. Dump exception and unwind related
928 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800929 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800930 (print_debug_exception_table): Beginning of support.
931 (print_debug): Hook up print_debug_exception_table for
932 .gcc_except_table sections.
933
934 * readelf.c (print_debug_frame_section): Some fixes for last change.
935
Ulrich Drepper351bf202009-01-15 20:18:40 -08009362009-01-15 Ulrich Drepper <drepper@redhat.com>
937
938 * readelf.c (print_encoding): Now a toplevel function.
939 (print_relinfo): Likewise.
940 (print_encoding_base): Broken out of print_debug_frame_section.
941 (print_debug_frame_section): Print different header for .eh_frame
942 sections. Fix recognition of matching CIEs in .debug_frame sections.
943 Print absolute offset for PC-relative FDE locations. Don't print
944 table header for FDEs if the table is empty.
945 (read_encoded): New function.
946 (print_debug_frame_hdr_section): New function.
947 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
948 sections.
949
950 * readelf.c (handle_relocs_rel): Print section number.
951 (print_debug_abbrev_section): Likewise.
952 (print_debug_aranges_section): Likewise.
953 (print_debug_ranges_section): Likewise.
954 (print_debug_info_section): Likewise.
955 (print_debug_line_section): Likewise.
956 (print_debug_loc_section): Likewise.
957 (print_debug_macinfo_section): Likewise.
958 (print_debug_pubnames_section): Likewise.
959 (print_debug_str_section): Likewise.
960
Ulrich Drepper8b394632009-01-10 18:29:56 -08009612009-01-10 Ulrich Drepper <drepper@redhat.com>
962
963 * strings.c (read_block): Fix typo in error message string.
964
Ulrich Drepper87cf5832009-01-07 20:39:21 -08009652009-01-07 Ulrich Drepper <drepper@redhat.com>
966
967 * ld.c (ld_new_searchdir): Fix adding to search path list.
968
Ulrich Drepperac194d02009-01-06 00:30:01 -08009692009-01-06 Ulrich Drepper <drepper@redhat.com>
970
971 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800972
Roland McGrath3614d992009-01-05 18:05:32 -08009732009-01-05 Roland McGrath <roland@redhat.com>
974
975 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
976 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800977
Ulrich Drepper44173ed2009-01-01 19:00:41 -08009782009-01-01 Ulrich Drepper <drepper@redhat.com>
979
980 * addr2line.c: Update copyright year.
981 * ar.c: Likewise.
982 * elfcmp.c: Likewise.
983 * elflint.c: Likewise.
984 * findtextrel.c: Likewise.
985 * ld.c: Likewise.
986 * nm.c: Likewise.
987 * objdump.c: Likewise.
988 * ranlib.c: Likewise.
989 * readelf.c: Likewise.
990 * size.c: Likewise.
991 * strings.c: Likewise.
992 * strip.c: Likewise.
993 * unstrip.c: Likewise.
994
Roland McGrath468fe4d2008-12-11 21:00:12 -08009952008-12-11 Roland McGrath <roland@redhat.com>
996
997 * nm.c (sym_name): New function.
998 (show_symbols_sysv): Use it in place of elf_strptr.
999 (show_symbols_bsd, show_symbols_posix): Likewise.
1000 Fixes RHBZ#476136.
1001
1002 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1003 elf_strptr fails.
1004
Roland McGratha845f682008-12-03 03:41:58 +000010052008-12-02 Roland McGrath <roland@redhat.com>
1006
1007 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1008 nonzero OFFSET argument to dwfl_getmodules.
1009
Roland McGrath1d8bb252008-08-07 08:39:41 +000010102008-08-07 Roland McGrath <roland@redhat.com>
1011
1012 * addr2line.c (main): Pass string to handle_address.
1013 (see_one_module): New function, subroutine of handle_address.
1014 (find_symbol): Likewise.
1015 (handle_address): Take string argument rather than address.
1016 Convert plain number, or handle strings like "(section)+offset"
1017 or "symbol+offset".
1018
10192008-08-01 Roland McGrath <roland@redhat.com>
1020
1021 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1022 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1023
1024 * readelf.c (convert): Take new argument SIZE.
1025 (handle_core_register, handle_core_item): Update callers.
1026 (handle_core_item): Take new arg REPEATED_SIZE.
1027 (handle_core_items): Special case for a singleton item,
1028 let handle_core_item handle repeats if it wants to.
1029
1030 * readelf.c (handle_core_items): Give abridged output
1031 for identical groups repeated more than twice.
1032
10332008-07-04 Roland McGrath <roland@redhat.com>
1034
1035 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1036
Roland McGrath521c47d2008-04-11 07:01:58 +000010372008-04-10 Roland McGrath <roland@redhat.com>
1038
1039 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1040 refer to. Instead, just be sure to preserve the original symbol
1041 table in the debug file so those symbols go with their sections and
1042 can be elided from the stripped version of the symbol table.
1043
1044 * strip.c (handle_elf): When a discarded section kept in the debug
1045 file refers to a nondiscard section via sh_link/sh_info, preserve
1046 that nondiscarded section unmodified in the debug file as well.
1047 Skip adjustment of discarded sections symbol table references when
1048 that symbol table is copied in this way.
1049
1050 * elflint.c (check_symtab): Don't crash from missing symbol names
1051 after diagnosing bogus strtab.
1052
1053 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1054 adjustment for symtab changes.
1055
Roland McGrath13b69602008-04-01 02:30:05 +000010562008-03-31 Roland McGrath <roland@redhat.com>
1057
1058 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1059 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1060 excuse a special section.
1061
10622008-03-27 Roland McGrath <roland@redhat.com>
1063
1064 * elflint.c (check_sections): Check that executability and writability
1065 of sections is reflected in segment p_flags.
1066
Roland McGrathd11f9cb2008-03-26 20:51:59 +000010672008-03-26 Roland McGrath <roland@redhat.com>
1068
1069 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1070 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1071 is valid in RELRO.
1072
Roland McGrath47c5c352008-02-29 10:17:16 +000010732008-02-29 Roland McGrath <roland@redhat.com>
1074
1075 * readelf.c (print_attributes): Add a cast.
1076 * elflint.c (check_attributes): Likewise.
1077
1078 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1079 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1080 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1081
Ulrich Drepper834de6f2008-02-23 06:50:01 +000010822008-02-03 Ulrich Drepper <drepper@redhat.com>
1083
1084 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1085 when linked into executable.
1086 (elf_i386_create_relocations): Likewise.
1087
Roland McGrath059c83e2008-02-21 06:19:39 +000010882008-02-20 Roland McGrath <roland@redhat.com>
1089
1090 * readelf.c (print_attributes): New function.
1091 (process_elf_file): Call it under -A.
1092
1093 * elflint.c (check_attributes): Implement it for real.
1094
10952008-02-19 Roland McGrath <roland@redhat.com>
1096
1097 * elflint.c (special_sections): Handle .gnu.attributes section.
1098 (check_sections): Likewise.
1099 (check_attributes): New function.
1100
11012008-02-10 Roland McGrath <roland@redhat.com>
1102
1103 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1104 sections and ET_REL files.
1105
Ulrich Drepper712d78e2008-02-02 10:01:53 +000011062008-02-02 Ulrich Drepper <drepper@redhat.com>
1107
1108 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1109 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1110 and R_386_TLS_LE.
1111 (elf_i386_create_relocations): Likewise.
1112 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1113 elements.
1114 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1115 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1116 Fix generation of PT_GNU_STACK entry.
1117
Ulrich Drepperc54785a2008-02-01 18:05:21 +000011182008-02-01 Ulrich Drepper <drepper@redhat.com>
1119
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001120 * ld.c (replace_args): Prevent loop over replacements if the parameter
1121 is only two characters long.
1122
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001123 * ld.c: Recognize sha1 argument for --build-id parameter.
1124 * ldgeneric.c (create_build_id_section): Handle sha1.
1125 (compute_hash_sum): New function. Broken out of compute_build_id.
1126 Take hash function and context as parameters.
1127 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1128 implementation.
1129
Ulrich Drepper89759c72008-01-31 19:44:12 +000011302008-01-31 Ulrich Drepper <drepper@redhat.com>
1131
1132 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1133 * ld.c: Recognize --build-id command line parameter.
1134 * ld.h: Define scn_dot_note_gnu_build_id.
1135 (struct ld_state): Add build_id and buildidscnidx elements.
1136 * ldgeneric.c: Implement --build-id command line parameter.
1137 * ldlex.l (ID): Recognize - as valid character after the first one.
1138
Ulrich Drepper5530ec52008-01-29 10:42:07 +000011392008-01-29 Ulrich Drepper <drepper@redhat.com>
1140
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001141 * ld.c (replace_args): New function.
1142 (main): Use it to rewrite old-style parameters.
1143
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001144 * elf32-i386.script: Add .gnu.hash section.
1145 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1146 (fillin_special_symbol): Initialize st_size.
1147 (sortfct_hashval): New function.
1148 (create_gnu_hash): New function.
1149 (create_hash): New function.
1150 (ld_generic_create_outfile): Use the new functions to create the
1151 hash tables.
1152
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001153 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1154
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000011552008-01-24 Ulrich Drepper <drepper@redhat.com>
1156
1157 * elflint.c (check_group): Check that signature symbol for section
1158 group is not an empty string.
1159 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1160 section. Start implementation of --hash-style.
1161 * i386_ld.c: Likewise.
1162 * ld.c: Recognize --hash-style.
1163 * ld.h (struct scninfo): Add comdat_group.
1164 Add additional parameter to finalize_plt callback.
1165
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000011662008-01-22 Ulrich Drepper <drepper@redhat.com>
1167
1168 * ld.h (struct callbacks): Add initialize_gotplt.
1169 (struct scnhead): Add scn_dot_gotplt.
1170 (struct ld_state): Add gotpltscnidx.
1171 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1172 (elf_i386_initialize_pltrel): Likewise.
1173 (elf_i386_initialize_got): There is now a separate .got.plt, so
1174 don't do the PLT-related work here. Initialize d_type.
1175 (elf_i386_initialize_gotplt): New function.
1176 (elf_i386_plt0): Use ud2a after indirect jump.
1177 (elf_i386_pic_plt0_entry): Likewise.
1178 (elf_i386_finalize_plt): Reference now .got.plt.
1179 (elf_i386_count_relocations): For GOT entries which need no relocation
1180 don't bump nrel_got.
1181 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1182 handling for split .got/.got.plt.
1183 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1184 * elf32-i386.script: Sort sections for security. There are no .got
1185 input sections. Add .got.plt.
1186 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1187 (ld_generic_create_outfile): Initialize .got.plt section.
1188 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1189
Ulrich Drepperd9488292008-01-20 16:43:15 +000011902008-01-19 Ulrich Drepper <drepper@redhat.com>
1191
1192 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1193 symbols are not carried over into statically linked output files.
1194 Add dummy entries for more TLS relocations.
1195
1196 * ld.c (options): Add long names for -( and -).
1197
1198 * ldgeneric.c (check_definition): For newly found definitions don't
1199 mark section as used if symbol is absolute.
1200 (extract_from_archive): Only assign archive sequence number the first
1201 time the archive is handled. Update ld_state.last_archive_used
1202 if any symbol was used. Remove nround variable.
1203 (file_process2): When using symbol from an archive, update
1204 ld_state.group_start_archive, ld_state.archives, and
1205 ld_state.tailarchives.
1206 (ld_generic_file_process): If group is not handled anymore, after
1207 freeing ELF handles for the archives, clear ld_state.archives and
1208 *nextp. Fix wrong logic in recognizing first iteration of group
1209 loop. When clearing flags, also clear ld_state.group_start_archive.
1210
Ulrich Drepper5eee1222008-01-11 10:12:18 +000012112008-01-11 Ulrich Drepper <drepper@redhat.com>
1212
1213 * objdump.c (show_disasm): Adjust disassembler format string for
1214 removal of %e.
1215
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000012162008-01-04 Roland McGrath <roland@redhat.com>
1217
Roland McGrath059c83e2008-02-21 06:19:39 +00001218 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1219 a size greater than the items cover means multiple sets of items.
1220 (handle_core_note): Update caller.
1221
12222008-01-04 Roland McGrath <roland@redhat.com>
1223
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001224 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1225
12262008-01-03 Roland McGrath <roland@redhat.com>
1227
1228 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1229
1230 * elflint.c (check_dynamic): Remove duplicate initializer.
1231
Ulrich Drepperad024af2008-01-02 17:42:52 +000012322008-01-02 Ulrich Drepper <drepper@redhat.com>
1233
1234 * addr2line.c: Update copyright year.
1235 * ar.c: Likewise.
1236 * elfcmp.c: Likewise.
1237 * elflint.c: Likewise.
1238 * findtextrel.c: Likewise.
1239 * ld.c: Likewise.
1240 * nm.c: Likewise.
1241 * objdump.c: Likewise.
1242 * ranlib.c: Likewise.
1243 * readelf.c: Likewise.
1244 * size.c: Likewise.
1245 * strings.c: Likewise.
1246 * strip.c: Likewise.
1247 * unstrip.c: Likewise.
1248
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000012492007-12-30 Ulrich Drepper <drepper@redhat.com>
1250
1251 * objdump (show_disasm): Use %e after third parameter.
1252
12532007-12-21 Ulrich Drepper <drepper@redhat.com>
1254
1255 * strip.c: Fix wrong parenthesis in a few branch predictions.
1256 * strings.c: Likewise.
1257
12582007-12-20 Ulrich Drepper <drepper@redhat.com>
1259
1260 * Makefile.am (DEFS): Add DEBUGPRED.
1261 * addr2line.c: Include debugpred.h.
1262 * ar.c: Likewise.
1263 * elfcmp.c: Likewise.
1264 * elflint.c: Likewise.
1265 * findtextrel.c: Likewise.
1266 * nm.c: Likewise.
1267 * objdump.c: Likewise.
1268 * ranlib.c: Likewise.
1269 * readelf.c: Likewise.
1270 * size.c: Likewise.
1271 * strings.c: Likewise.
1272 * strip.c: Likewise.
1273 * unstrip.c: Likewise.
1274 * debugpred.h: New file.
1275
1276 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1277 (handle_relocs_rela): Likewise.
1278
1279 * readelf.c: Add lots of likely/unlikely.
1280
1281 * elflint.c: Minor cleanups.
1282
Roland McGrath1a2e8f42007-12-15 23:39:34 +000012832007-11-19 Roland McGrath <roland@redhat.com>
1284
1285 * readelf.c (print_ops): Handle all bad op codes gracefully.
1286 Print their numbers instead of just ???.
1287
Roland McGrath07a696e2007-11-09 22:44:26 +000012882007-11-09 Roland McGrath <roland@redhat.com>
1289
1290 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00001291 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1292 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1293 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1294 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00001295
Roland McGrathe4c22ea2007-10-23 13:07:39 +000012962007-10-20 Roland McGrath <roland@redhat.com>
1297
1298 * unstrip.c (options): Update -R description.
1299 (struct symbol): Put symbol details a union with a size_t pointer
1300 `duplicate'.
1301 (compare_symbols_output): Use null ->name as marker for discard
1302 symbols, not zero *->map.
1303 (copy_elided_sections): Record forwarding pointers for discarded
1304 duplicates and fill SYMNDX_MAP elements through them.
1305
1306 * readelf.c (process_file): Set offline_next_address to 0 at start.
1307 (struct process_dwflmod_args): New type.
1308 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1309 (process_file): Update caller; dup FD for passing to libdwfl.
1310 (process_elf_file): Take new arg FD. For ET_REL file when
1311 displaying data affected by libdwfl relocation, open a new Elf handle.
1312
13132007-10-17 Roland McGrath <roland@redhat.com>
1314
1315 * readelf.c (print_debug_line_section): For invalid data inside a
1316 unit with plausible length, keep printing at the next unit boundary.
1317
1318 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1319
13202007-10-16 Roland McGrath <roland@redhat.com>
1321
1322 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1323
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000013242007-10-15 Roland McGrath <roland@redhat.com>
1325
1326 * make-debug-archive.in: New file.
1327 * Makefile.am (EXTRA_DIST): Add it.
1328 (make-debug-archive): New target.
1329 (bin_SCRIPTS, CLEANFILES): Add it.
1330
13312007-10-10 Roland McGrath <roland@redhat.com>
1332
1333 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1334 Use it to check MERGE|STRINGS for .debug_str.
1335 (check_sections): Handle exact_or_gnuld.
1336
13372007-10-08 Roland McGrath <roland@redhat.com>
1338
1339 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1340 64-bit struct timeval with 32-bit tv_usec.
1341
13422007-10-07 Roland McGrath <roland@redhat.com>
1343
1344 * readelf.c (check_archive_index): New function.
1345 (process_file): Call it. Change signature to take only fd and name.
1346 Use libdwfl to open the file, then iterate on its modules (multiple
1347 for an archive) to print file name and call process_elf_file.
1348 (main): Update caller. Let process_file do elf_begin.
1349 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1350 (process_elf_file): Take only Dwfl_Module * argument.
1351 Don't print the file name here.
1352 (print_debug_*_section): Take Dwfl_Module * argument.
1353 (print_debug): Likewise. Update caller.
1354 (format_dwarf_addr): New function.
1355 (print_debug_ranges_section): Use it.
1356 (attr_callback): Likewise.
1357 (print_debug_line_section, print_debug_loc_section): Likewise.
1358
1359 * readelf.c (print_debug_ranges_section): Translate all strings.
1360 (print_debug_loc_section): Likewise.
1361
1362 * unstrip.c (copy_elided_sections): Initialize SEC.
1363
1364 * ar.c (do_oper_insert): Put trailing / on short names.
1365
1366 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1367
1368 * arlib2.c (arlib_add_long_name): Adjust for header size.
1369
1370 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1371
1372 * ar.c (do_oper_insert): Use write_retry for padding write.
1373
1374 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1375 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1376 (remember_long_name): New function.
1377 (do_oper_insert): Call it. Correctly use length of basename,
1378 not original name. Don't store long name twice for new member.
1379
13802007-10-06 Roland McGrath <roland@redhat.com>
1381
1382 * elflint.c (check_note): Skip empty segment.
1383 (check_note_section): Skip empty section.
1384
1385 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1386 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1387 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1388 (compare_alloc_sections): Take new arg REL, ignore address if true.
1389 (compare_sections): Likewise, pass it down.
1390 (compare_sections_rel, compare_sections_nonrel): New functions.
1391 (find_alloc_sections_prelink, copy_elided_sections): Use them
1392 instead of compare_sections.
1393 (sections_match): New function, broken out of ...
1394 (find_alloc_section): ... here.
1395 (copy_elided_sections): Reorganize section match-up logic.
1396 Use sections_match for SHF_ALLOC in ET_REL.
1397 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1398
1399 * unstrip.c (add_new_section_symbols): Take new arg REL.
1400 When true, do not update section symbol values.
1401 (collect_symbols): Likewise. Update section symbols with address
1402 of chosen output section, not original section.
1403 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1404
1405 * unstrip.c (compare_alloc_sections): At the same address, preserve
1406 original section order.
1407
1408 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1409 .debug_str, it didn't always have them with older tools.
1410
1411 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1412
14132007-10-05 Roland McGrath <roland@redhat.com>
1414
1415 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1416 ET_REL file.
1417
1418 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1419 SHN_UNDEF as "bad section". Use shndx value in messages.
1420
1421 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1422 for ".debug" so it matches as a prefix.
1423 (IS_KNOWN_SPECIAL): New macro.
1424 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1425 type even under -d, for a .debug* or .shstrtab section.
1426
1427 * readelf.c (print_ops): Use hex for address operand.
1428
14292007-10-04 Roland McGrath <roland@redhat.com>
1430
1431 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1432 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1433 sections mapped to SHN_UNDEF.
1434
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000014352007-10-04 Ulrich Drepper <drepper@redhat.com>
1436
1437 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1438 variable with older glibc versions.
1439 Add some branch prediction.
1440
Roland McGrath59ea7f32007-10-04 08:50:09 +000014412007-10-04 Roland McGrath <roland@redhat.com>
1442
1443 * readelf.c (print_archive_index): New variable.
1444 (options, parse_opt): Accept -c/--archive-index to set it.
1445 (dump_archive_index): New function.
1446 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1447 Call dump_archive_index on archives if set.
1448 (main): Update caller.
1449 (any_control_option): Give it file scope, moved out of ...
1450 (parse_opt): ... here.
1451
14522007-10-03 Roland McGrath <roland@redhat.com>
1453
1454 * unstrip.c (struct arg_info): Add `list' flag.
1455 (options, parse_opt): Grok -n/--list to set it.
1456 (list_module): New function.
1457 (handle_implicit_modules): Call it under -n.
1458
1459 * elflint.c (check_note_section): New function.
1460 (check_sections): Call it for SHT_NOTE.
1461
1462 * readelf.c (handle_notes): Use sections when available.
1463
1464 * elflint.c (check_note_data): New function, broken out of ...
1465 (check_note): ... here. Call it and elf_getdata_rawchunk.
1466
1467 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1468 Use elf_getdata_rawchunk and gelf_getauxv.
1469 (handle_notes_data): New function, broken out of ...
1470 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1471
Roland McGrath241ac022007-10-01 18:21:46 +000014722007-10-01 Roland McGrath <roland@redhat.com>
1473
Roland McGrathac0a16c2007-10-01 18:50:35 +00001474 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1475
Roland McGrath241ac022007-10-01 18:21:46 +00001476 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1477
Roland McGrathc76f0b02007-09-27 07:31:33 +000014782007-09-10 Roland McGrath <roland@redhat.com>
1479
1480 * readelf.c (options): Give -p optional argument, alias --string-dump.
1481 (string_sections, string_sections_tail): New static variables.
1482 (parse_opt): Set them when -p has an argument.
1483 (print_string_section): New function, broken out of ...
1484 (print_strings): ... here. Call it.
1485 (dump_data_section): New function, broken out of ...
1486 (dump_data): ... here. Call it.
1487 (for_each_section_argument): New function, broken out of ...
1488 (dump_data): ... here. Call it.
1489 (dump_strings): New function.
1490
14912007-08-31 Roland McGrath <roland@redhat.com>
1492
1493 * readelf.c (print_strings): Typo fix.
1494
Roland McGrathcb6d8652007-08-23 08:10:54 +000014952007-08-23 Roland McGrath <roland@redhat.com>
1496
1497 * readelf.c (printf_with_wrap): Function removed.
1498 (REGISTER_WRAP_COLUMN): New macro.
1499 (handle_core_register): Use print_core_item instead.
1500 (struct register_info): New type.
1501 (compare_registers, compare_register_sets): New functions.
1502 (register_bitpos, compare_sets_by_info): New functions.
1503 (handle_core_registers): Use those to segregate and sort registers
1504 for display.
1505
1506 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1507 (print_core_item): New function.
1508 (handle_core_item): Use it instead of printf_with_wrap.
1509 (compare_core_items, compare_core_item_groups): New functions.
1510 (handle_core_items): Use them. Sort by group and force line breaks
1511 between groups.
1512
1513 * readelf.c (handle_core_registers, handle_core_items): New functions,
1514 broken out of ...
1515 (handle_core_note): ... here. Call them.
1516
15172007-08-22 Roland McGrath <roland@redhat.com>
1518
1519 * unstrip.c (new_shstrtab): New function, broken out of ...
1520 (copy_elided_sections): ... here.
1521
15222007-08-20 Roland McGrath <roland@redhat.com>
1523
1524 Avoid local function trampolines in nm binary.
1525 * nm.c (sort_by_address): Move to a static function instead of local
1526 inside show_symbols.
1527 (sort_by_name_strtab): New static variable.
1528 (sort_by_name): Use it. Move to a static function instead of local
1529 inside show_symbols.
1530 (show_symbols): Set sort_by_name_strtab.
1531
15322007-08-19 Roland McGrath <roland@redhat.com>
1533
1534 * readelf.c (handle_auxv_note): New function.
1535 (handle_notes): Call it.
1536
1537 * readelf.c (printf_with_wrap, convert): New functions.
1538 (handle_core_item, (handle_core_register): New functions.
1539 (handle_notes): Call those with details from ebl_core_note.
1540
Roland McGrath099dd522007-08-13 22:58:36 +000015412007-08-12 Roland McGrath <roland@redhat.com>
1542
1543 * elflint.c (check_note): Accept type 0 with name "Linux".
1544
1545 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1546
1547 * elflint.c (section_flags_string): Return "none" for 0, not "".
1548
Roland McGrathd8221722007-08-11 21:18:09 +000015492007-08-11 Roland McGrath <roland@redhat.com>
1550
1551 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1552
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000015532007-08-04 Ulrich Drepper <drepper@redhat.com>
1554
1555 * readelf.c (hex_dump): Use isprint to determine whether to print
1556 character itself or full stop character.
1557 (dump_data): No need to check endp for NULL after strtol call.
1558
Roland McGrath60fc84c2007-08-03 21:59:15 +000015592007-08-03 Roland McGrath <roland@redhat.com>
1560
1561 * readelf.c (print_string_sections): New variable.
1562 (options, parse_opt): Handle --strings/-p to set it.
1563 (print_strings): New function.
1564 (process_elf_file): Call it under -p.
1565
1566 * readelf.c (options): Add hidden aliases --segments, --sections,
1567 as taken by binutils readelf.
1568
15692007-08-01 Roland McGrath <roland@redhat.com>
1570
1571 * readelf.c (dump_data_sections, dump_data_sections_tail):
1572 New variables.
1573 (options, parse_opt): Handle --hex-dump/-x, set them.
1574 (hex_dump): New function.
1575 (dump_data): New function, call it.
1576 (process_elf_file): Call it.
1577
15782007-07-25 Roland McGrath <roland@redhat.com>
1579
1580 * addr2line.c (show_symbols): New variable.
1581 (print_addrsym): New function.
1582 (handle_address): Call it.
1583 (options, parse_opt): Handle -S/--symbols.
1584
Ulrich Drepperb0243862007-06-06 00:09:36 +000015852007-06-05 Ulrich Drepper <drepper@redhat.com>
1586
1587 * addr2line.c: Update for latest autoconf header.
1588 * ar.c: Likewise.
1589 * elfcmp.c: Likewise.
1590 * elflint.c: Likewise.
1591 * findtextrel.c: Likewise.
1592 * ld.c: Likewise.
1593 * ldgeneric.c: Likewise.
1594 * nm.c: Likewise.
1595 * objdump.c: Likewise.
1596 * ranlib.c: Likewise.
1597 * readelf.c: Likewise.
1598 * size.c: Likewise.
1599 * strings.c: Likewise.
1600 * strip.c: Likewise.
1601 * unstrip.c: Likewise.
1602
Roland McGrath9aa8ef72007-05-18 08:59:43 +000016032007-05-18 Roland McGrath <roland@redhat.com>
1604
1605 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1606 stripped file, so as not to duplicate a section copied in both.
1607
1608 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1609
16102007-05-17 Roland McGrath <roland@redhat.com>
1611
1612 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1613
1614 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1615
1616 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1617 call make_directories here.
1618 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1619 (handle_dwfl_module): Likewise.
1620 (handle_implicit_modules): Update callers.
1621 (handle_output_dir_module): Likewise. Don't do make_directories here.
1622
1623 * unstrip.c (get_section_name): New function, broken out of ...
1624 (copy_elided_sections): here. Update callers.
1625 (find_alloc_section): Broken out of ...
1626 (copy_elided_sections): ... here. Update caller.
1627 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1628 update STT_SECTION symbols' st_value fields as a side effect.
1629 (check_symtab_section_symbols): Update caller.
1630 (add_new_section_symbols): Set st_value in symbols added.
1631 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1632 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1633 from .bss to .dynbss.
1634 (find_alloc_sections_prelink): New function. Associate debug file
1635 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1636 .gnu.prelink_undo information.
1637 (copy_elided_sections): Call it when we couldn't find every allocated
1638 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1639 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1640 (handle_file): Update callers.
1641
1642 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1643 named ".comment".
1644
1645 * elflint.c (check_sections): Fix association of segments with
1646 sections when p_memsz > p_filesz.
1647
16482007-04-29 Roland McGrath <roland@redhat.com>
1649
1650 * addr2line.c (options, main): Tweak argp group settings to fix
1651 usage output.
1652
16532007-04-28 Roland McGrath <roland@redhat.com>
1654
1655 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1656 sizes to match sections adjusted in the stripped file.
1657
Roland McGrath4be15242007-04-25 03:09:33 +000016582007-04-24 Roland McGrath <roland@redhat.com>
1659
1660 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1661 (hash_inexact): New variable.
1662 (options, parse_opt): Add --hash-inexact option to set it.
1663 (hash_content_equivalent): New function.
1664 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1665
16662007-04-23 Roland McGrath <roland@redhat.com>
1667
1668 * unstrip.c: New file.
1669 * Makefile.am (bin_PROGRAMS): Add it.
1670 (unstrip_LDADD): New variable.
1671
1672 * strip.c (options): Allow --output for -o.
1673
Ulrich Drepper8b383102007-02-16 00:31:57 +000016742007-02-15 Ulrich Drepper <drepper@redhat.com>
1675
1676 * readelf.c: Remove unused code. Add a few consts.
1677
Ulrich Drepper903c1162007-02-15 19:40:37 +000016782007-02-15 Roland McGrath <roland@redhat.com>
1679
1680 * readelf.c (print_debug): Fix brainos in SHDR test.
1681
Roland McGrathf82a1ec2007-02-06 04:47:44 +000016822007-02-05 Roland McGrath <roland@redhat.com>
1683
1684 * ar.c: Include <limits.h>, since we use LONG_MAX.
1685
Ulrich Drepper0fe63532007-02-05 21:05:51 +000016862007-02-05 Ulrich Drepper <drepper@redhat.com>
1687
Ulrich Drepper8b383102007-02-16 00:31:57 +00001688 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001689 ignore fchown's return value.
1690 (do_oper_insert): Handle error when writing padding.
1691 * ranlib.c: Add fchown complain work around.
1692
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001693 * arlib.c: Make symtab a global variable. Change all users.
1694 * arlib2.c: Likewise.
1695 * ranlib.c: Likewise.
1696 * ar.c: Likewise.
1697 * arlib.h: Declare it.
1698
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000016992007-01-11 Roland McGrath <roland@redhat.com>
1700
1701 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1702 SHF_MASKPROC bits separately from generic sh_flags validation.
1703
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000017042007-02-04 Ulrich Drepper <drepper@redhat.com>
1705
1706 * ar.c: New file.
1707 * arlib.c: New file.
1708 * arlib2.c: New file.
1709 * arlib.h: New file.
1710 * Makefile (noinst_LIBRARIES): Add libar.
1711 (libar_a_SOURCES): Define.
1712 (ar_LDADD): Define.
1713 (CFLAGS_ar): Define.
1714 * ranlib.c: Change to use arlib.
1715
1716 * elflint.c (check_symtab): Work around GNU ld bug which omits
1717 sections but not symbols in those sections.
1718
Ulrich Drepperb770cf92007-01-10 21:02:34 +000017192007-01-10 Ulrich Drepper <drepper@redhat.com>
1720
1721 * addr2line.c: Update copyright year.
1722 * elfcmp.c: Likewise.
1723 * elflint.c: Likewise.
1724 * findtextrel.c: Likewise.
1725 * ld.c: Likewise.
1726 * nm.c: Likewise.
1727 * objdump.c: Likewise.
1728 * ranlib.c: Likewise.
1729 * readelf.c: Likewise.
1730 * size.c: Likewise.
1731 * strings.c: Likewise.
1732 * strip.c: Likewise.
1733
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000017342006-12-09 Ulrich Drepper <drepper@redhat.com>
1735
1736 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1737 two hash tables have different content (module expected omission
1738 of undefined symbols).
1739
Roland McGrath8190db62006-12-17 23:56:51 +000017402006-10-31 Roland McGrath <roland@redhat.com>
1741
1742 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001743 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001744
17452006-09-19 Jakub Jelinek <jakub@redhat.com>
1746
1747 * strip.c (process_file): Disallow -f on archives.
1748
17492006-10-09 Roland McGrath <roland@redhat.com>
1750
1751 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1752
Roland McGrathc373d852006-10-10 00:25:21 +000017532006-08-29 Roland McGrath <roland@redhat.com>
1754
1755 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1756
1757 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1758 Reported by Christian Aichinger <Greek0@gmx.net>.
1759
1760 * elflint.c (valid_e_machine): Add EM_ALPHA.
1761 Reported by Christian Aichinger <Greek0@gmx.net>.
1762
Ulrich Drepper231c5902006-08-08 22:00:11 +000017632006-08-08 Ulrich Drepper <drepper@redhat.com>
1764
1765 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1766 Keep track of which "high DT" entries are present.
1767 Check that either old or GNU-style hash table is present.
1768 If GNU-style hash table is used a symbol table is mandatory.
1769 Check that if any prelink entry is present all of them are.
1770 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1771 table if they don't refer to functions.
1772
Roland McGrath858b1892006-07-17 08:41:15 +000017732006-07-17 Roland McGrath <roland@redhat.com>
1774
1775 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1776 (add_version): Likewise for argument.
1777 (check_versym): Cast constant to GElf_Versym for comparison.
1778
Roland McGrath4ec807e2006-07-13 03:59:46 +000017792006-07-12 Roland McGrath <roland@redhat.com>
1780
1781 * readelf.c (handle_gnu_hash): Add casts for machines where
1782 Elf32_Word != unsigned int.
1783
Ulrich Drepperdcf61602006-07-12 19:59:02 +000017842006-07-12 Ulrich Drepper <drepper@redhat.com>
1785
1786 * elflint.c (check_sysv_hash64): Fix printf format.
1787
Ulrich Dreppercc415622006-07-12 19:42:23 +000017882006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001789
Ulrich Dreppercc415622006-07-12 19:42:23 +00001790 * addr2line.c (options): English fix in -f doc string.
1791
1792 * addr2line.c (use_comp_dir): New variable.
1793 (options, parse_opt): Grok -A/--absolute to set it.
1794 (handle_address): If set, prepend dwfl_line_comp_dir results to
1795 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001796
Ulrich Drepper28ed8952006-07-07 03:43:47 +000017972006-07-06 Ulrich Drepper <drepper@redhat.com>
1798
1799 * elflint.c: Adjust for latest new hash table format.
1800 * readelf.c: Likewise.
1801
1802 * elflint.c (check_versym): Ignore hidden bit when comparing version
1803 numbers.
1804
18052006-07-05 Ulrich Drepper <drepper@redhat.com>
1806
1807 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1808 discarded COMDAT symbols.
1809
1810 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1811 (elf_i386_create_relocations): Likewise.
1812 * ld.h (struct symbol): Add local and hidden bits.
1813 * ld.c (create_special_section_symbol): These synthsized symbols
1814 are local and hidden.
1815 * ldgeneric.c (file_process2): Check whether input file matches
1816 the emulation.
1817 (fillin_special_symbol): Create symbols as local and/or hidden
1818 if requested.
1819 (ld_generic_create_outfile): Make local copy of symbol.
1820 Don't hide global, defined symbols in dynamic symbol table unless
1821 requested. Synthetic symbols have no version information.
1822
1823 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1824 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1825
18262006-07-04 Ulrich Drepper <drepper@redhat.com>
1827
1828 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1829 testing.
1830
18312006-07-03 Ulrich Drepper <drepper@redhat.com>
1832
1833 * elflint.c: Add testing of DT_GNU_HASH.
1834 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1835
1836 * Makefile.am: Add hacks to create dependency files for non-generic
1837 linker.
1838
Ulrich Drepper6ca46002006-06-12 22:40:23 +000018392006-06-12 Ulrich Drepper <drepper@redhat.com>
1840
1841 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1842 section if creating a DSO and no interpreter is given.
1843 (ld_generic_create_outfile): Don't store reference to symbols in
1844 discarded COMDAT groups. Don't create PHDR and INTERP program header
1845 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001846 (create_verneed_data): Pretty printing.
1847
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001848 * ldscript.y (content): If a DSO is created don't set default
1849 interpreter from linker script.
1850
1851 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1852 for symbols in discarded COMDAT groups.
1853 (elf_i386_create_relocations): Likewise.
1854 * ld.h (struct scninfo): Add unused_comdat.
1855 * ldgeneric.c (add_section): Also check group signature when
1856 matching COMDAT sections.
1857 (add_relocatable_file): Ignore symbols in COMDAT group which are
1858 discarded.
1859
1860 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1861 and symbol reference.
1862
Ulrich Drepper54f33a72006-06-11 09:07:37 +000018632006-06-11 Ulrich Drepper <drepper@redhat.com>
1864
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001865 * elflint.c (check_dynamic): Fix checking value of tags which are
1866 offsets in the string section. Make sure DT_STRTAB points to the
1867 section referenced in sh_link.
1868
1869 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1870
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001871 * ld.c: Recognize --eh-frame-hdr option.
1872 * ld.h (struct ld_state): Add eh_frame_hdr field.
1873 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1874
1875 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1876 SH_FLAGS_COMBINE.
1877 (add_relocatable_file): Minor optimization of last change.
1878 (match_section): Don't preserve SHF_GROUP flag any longer.
1879
Ulrich Drepper2d880282006-06-11 00:20:43 +000018802006-06-10 Ulrich Drepper <drepper@redhat.com>
1881
1882 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001883 Handle record and ignore as position dependent options.
1884 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001885 * ld.h (struct ld_state): Add execstack field.
1886 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1887 sections.
1888 (ld_generic_create_outfile): Fix program header creation in native
1889 linker. Add PT_GNU_STACK program header.
1890
Ulrich Dreppera688a732006-06-10 06:33:00 +000018912006-06-09 Ulrich Drepper <drepper@redhat.com>
1892
1893 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1894 for PLT entries if there is no local definition.
1895
1896 * ld.c (parse_option): Handle -z ignore like --as-needed and
1897 -z record like --no-as-needed.
1898 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1899 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1900 looping over DSOs. When deciding about adding DT_NEEDED entries
1901 use ->as_needed instead of ignore_unused_dsos.
1902
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000019032006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001904
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001905 * ld.c: Recognize --as-needed and --no-as-needed options.
1906 * ld.h (struct usedfile): Add as_needed field.
1907 (struct ld_state): Likewise.
1908 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1909 the list.
1910 * ldscript.y (filename_id_list): Split to correctly parse all
1911 combinations.
1912 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001913
Ulrich Drepper697f4db2006-06-10 06:50:47 +000019142006-05-28 Ulrich Drepper <drepper@redhat.com>
1915
1916 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1917 and colno.
1918
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000019192006-05-27 Ulrich Drepper <drepper@redhat.com>
1920
1921 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001922 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001923
Ulrich Drepper82c345d2006-04-04 22:07:54 +000019242006-04-04 Ulrich Drepper <drepper@redhat.com>
1925
1926 * addr2line.c: Update copyright year.
1927 * elfcmp.c: Likewise.
1928 * elflint.c: Likewise.
1929 * findtextrel.c: Likewise.
1930 * ld.c: Likewise.
1931 * nm.c: Likewise.
1932 * objdump.c: Likewise.
1933 * ranlib.c: Likewise.
1934 * readelf.c: Likewise.
1935 * size.c: Likewise.
1936 * strings.c: Likewise.
1937 * strip.c: Likewise.
1938
Roland McGrathdd7e22b2006-03-09 23:05:47 +000019392006-03-09 Roland McGrath <roland@redhat.com>
1940
1941 * Makefile.am (AM_LDFLAGS): New variable.
1942
Roland McGrath060fa052006-03-02 07:51:50 +000019432006-03-01 Roland McGrath <roland@redhat.com>
1944
1945 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1946 for dwarf.h changes matching 3.0 spec.
1947 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1948
Ulrich Drepper038129b2005-12-04 16:47:24 +000019492005-12-04 Ulrich Drepper <drepper@redhat.com>
1950
1951 * elflint.c (check_one_reloc): If relocation section is not loaded,
1952 don't check whether the relocations modify read-only sections or
1953 loaded and unloaded sections.
1954
Ulrich Drepper607e0542005-12-04 15:51:06 +000019552005-11-28 Ulrich Drepper <drepper@redhat.com>
1956
1957 * elflint.c (check_one_reloc): Take additional parameters. Use
1958 them to determine whether relocation is valid in this type of
1959 file. DSOs and executables can contain relocation sections in
1960 unloaded sections which just show the relocations the linker
1961 applied. Adjust all callers.
1962 (check_program_header): Check that PT_PHDR is loaded and that offset
1963 matches the one in the ELF header.
1964
Roland McGrath6724c902005-10-28 07:07:19 +000019652005-10-26 Roland McGrath <roland@redhat.com>
1966
1967 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1968
Ulrich Drepperd0449522005-09-03 07:23:52 +000019692005-09-03 Ulrich Drepper <drepper@redhat.com>
1970
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001971 * strip.c (handle_elf): Unify some error messages.
1972 * ld.c (main): Likewise.
1973 * ldgeneric.c (open_elf): Likewise.
1974 * elfcmp.c (main): Likewise.
1975 * elflint.c (check_elf_header): Likewise.
1976
1977 * size.c (process_file): Fix typo in error message.
1978
Ulrich Drepperd0449522005-09-03 07:23:52 +00001979 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1980
Ulrich Dreppera60501e2005-09-02 19:50:17 +000019812005-09-02 Ulrich Drepper <drepper@redhat.com>
1982
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001983 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001984 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001985
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000019862005-08-28 Ulrich Drepper <drepper@redhat.com>
1987
1988 * ranlib.c: Don't define pread_retry and write_retry here.
1989
1990 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1991 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1992
1993 * strings.c (process_chunk): Reorder expressions in conditional
1994 (process_chunk_mb): Likewise.
1995
1996 * strings.c: New file.
1997 * Makefile.am (bin_PROGRAMS): Add strings.
1998 (strings_no_Wstring): Define.
1999 (strings_LDADD): Define.
2000
Roland McGrath71e15a02005-08-27 10:33:26 +000020012005-08-27 Roland McGrath <roland@redhat.com>
2002
2003 * addr2line.c (dwarf_diename_integrate): Function removed.
2004 (print_dwarf_function): Use plain dwarf_diename.
2005
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000020062005-08-24 Ulrich Drepper <drepper@redhat.com>
2007
2008 * elflint.c (check_versym): Versioned symbols should not have
2009 local binding.
2010
Ulrich Drepper5d832292005-08-15 21:36:27 +000020112005-08-15 Ulrich Drepper <drepper@redhat.com>
2012
Ulrich Drepper61655e02005-08-16 04:23:02 +00002013 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2014 undefined.
2015
Ulrich Drepper5d832292005-08-15 21:36:27 +00002016 * Makefile.am: Add rules to build ranlib.
2017 * ranlib.c: New file.
2018
Roland McGrath18e13422005-08-15 08:01:25 +000020192005-08-14 Roland McGrath <roland@redhat.com>
2020
2021 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2022 sh_type it recognizes.
2023
2024 * elflint.c (check_sections): Print unknown flags in hex, don't
2025 truncate high bits. Print section number and name for unknown type.
2026
Roland McGrathf6895042005-08-13 20:56:52 +000020272005-08-13 Roland McGrath <roland@redhat.com>
2028
2029 * elflint.c (check_program_header): Use ebl_segment_type_name and
2030 allow any p_type it recognizes. Include p_type value in error
2031 message for unknown type.
2032
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000020332005-08-13 Ulrich Drepper <drepper@redhat.com>
2034
2035 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2036 to ebl_check_special_symbol.
2037 (check_sections): Pass ehdr to ebl_bss_plt_p.
2038
Roland McGrath653d3762005-08-13 01:59:10 +000020392005-08-12 Roland McGrath <roland@redhat.com>
2040
2041 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2042 refers to the right section if it's not SHN_ABS.
2043 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2044
2045 * elflint.c (check_sections): Don't complain about a non-NOBITS
2046 section taking no segment space, if it's sh_size is 0.
2047
2048 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2049 be PROGBITS or NOBITS.
2050
2051 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2052 standard st_value and st_size checks.
2053
Roland McGrath1c83bf12005-08-11 07:03:55 +000020542005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002055
Roland McGrath1c83bf12005-08-11 07:03:55 +00002056 * addr2line.c (options, parse_opt): Don't handle -e here.
2057 (executable): Variable removed.
2058 (argp_children): New static variable.
2059 (argp): Use it. Make const.
2060 (main): Fill in argp_children from dwfl_standard_argp ().
2061 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2062 (print_dwarf_function): New function. Try to figure out inline chain.
2063 (elf_getname): Function removed, libdwfl does it for us.
2064 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2065 Use dwfl_module_addrname instead of elf_getname.
2066 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2067 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2068
20692005-08-10 Ulrich Drepper <drepper@redhat.com>
2070
2071 * strip.c (parse_opt): STATE parameter is now used.
2072 Various little cleanups.
2073
2074 * readelf.c (print_debug_line_section): Correct fallout of renaming
2075 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002076
Roland McGrath8f31c2c2005-08-09 04:58:05 +000020772005-08-08 Roland McGrath <roland@redhat.com>
2078
2079 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2080 with binutils strip. Likewise -d, -S, as aliases for -g.
2081 Likewise ignore -s/--strip-all.
2082
Roland McGrath095a01b2005-08-08 03:49:35 +000020832005-08-07 Roland McGrath <roland@redhat.com>
2084
2085 * strip.c (process_file): Open read-only when using a different output
2086 file.
2087
Ulrich Drepper47be7952005-08-07 04:41:39 +000020882005-08-06 Ulrich Drepper <drepper@redhat.com>
2089
Ulrich Drepper637963b2005-08-07 05:33:07 +00002090 * elflint.c (in_nobits_scn): New function.
2091 (check_versym): Allow references for defined symbols against versions
2092 of other DSOs also for symbols in nobits sections.
2093 Move a few variables around.
2094
Ulrich Drepper47be7952005-08-07 04:41:39 +00002095 * Makefile.am (AM_CFLAGS): Avoid duplication.
2096 Link with statis libs if BUILD_STATIC.
2097
Ulrich Drepperdbace232005-08-06 01:37:23 +000020982005-08-05 Ulrich Drepper <drepper@redhat.com>
2099
2100 * elflint.c: Many, many more tests. Mostly related to symbol
2101 versioning. Those sections should now be completely checked.
2102
2103 * readelf.c (print_dynamic): Use gelf_offscn.
2104
Ulrich Drepperacb89832005-08-04 07:01:49 +000021052005-08-04 Ulrich Drepper <drepper@redhat.com>
2106
2107 * elflint.c: Add lots more tests: more extension symbol table sanity,
2108 versioning section tests, hash table tests. General cleanup.
2109
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000021102005-08-02 Ulrich Drepper <drepper@redhat.com>
2111
Ulrich Drepper8a687742005-08-03 02:24:12 +00002112 * objdump.c: New file.
2113 * Makefile.am (bin_PROGRAMS): Add objdump.
2114 (objdump_LDADD): Define.
2115
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002116 * elflint.c (check_reloc_shdr): New function split out from check_rela
2117 and check_rel.
2118 (check_one_reloc): New function. Likewise.
2119 (check_rela): Use check_reloc_shdr and check_one_reloc.
2120 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002121 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2122 section.
2123 Add checks that relocations against read-only segments are flagged,
2124 that the text relocation flag is not set unnecessarily, and that
2125 relocations in one section are either against loaded or not-loaded
2126 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002127
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000021282005-08-01 Ulrich Drepper <drepper@redhat.com>
2129
2130 * elfcmp.c (main): Ignore section count and section name string table
2131 section index.
2132
Roland McGrathf9ece8a2005-07-28 07:03:04 +000021332005-07-27 Roland McGrath <roland@redhat.com>
2134
2135 * elfcmp.c: Include <locale.h>.
2136
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000021372005-07-27 Ulrich Drepper <drepper@redhat.com>
2138
2139 * elfcmp.c: Print name and index of differing section.
2140
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000021412005-07-24 Ulrich Drepper <drepper@redhat.com>
2142
2143 * elfcmp.c: Implement comparing gaps between sections.
2144
21452005-07-23 Ulrich Drepper <drepper@redhat.com>
2146
2147 * elflint.c: Include libeblP.h instead of libebl.h.
2148 * nm.c: Likewise.
2149 * readelf.c: Likewise.
2150 * elfcmp.c: Likewise.
2151
2152 * elfcmp.c (main): Compare individual ELF header fields, excluding
2153 e_shoff instead of the whole struct at once.
2154 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2155 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2156
21572005-07-22 Ulrich Drepper <drepper@redhat.com>
2158
2159 * elfcmp.c (main): Take empty section into account when comparing
2160 section content.
2161
2162 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2163 using it.
2164
21652005-07-21 Ulrich Drepper <drepper@redhat.com>
2166
2167 * elfcmp.c: New file.
2168 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2169 (elfcmp_LDADD): Define.
2170
2171 * elflint.c (check_rela): Check that copy relocations only reference
2172 object symbols or symbols with unknown type.
2173 (check_rel): Likewise.
2174
21752005-06-08 Roland McGrath <roland@redhat.com>
2176
2177 * readelf.c (print_ops): Add consts.
2178
21792005-05-31 Roland McGrath <roland@redhat.com>
2180
2181 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2182 abbreviations. Print a header line before each CU section.
2183
2184 * readelf.c (print_debug_loc_section): Fix indentation for larger
2185 address size.
2186
21872005-05-30 Roland McGrath <roland@redhat.com>
2188
2189 * readelf.c (print_debug_line_section): Print section offset of each
2190 CU's table, so they are easy to find from seeing the stmt_list value.
2191
2192 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2193 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2194
2195 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2196 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2197
2198 * readelf.c (print_ops): Take different args for indentation control.
2199 (attr_callback): Caller updated.
2200 Grok several more block-form attributes as being location expressions.
2201 For those same attributes with udata forms, format output differently
2202 for location list offset.
2203 (print_debug_loc_section): Implement it for real.
2204
2205 * readelf.c (options): Mention ranges for --debug-dump.
2206 (enum section_e): Add section_ranges.
2207 (parse_opt): Grok "ranges" for -w/--debug-dump.
2208 (print_debug_ranges_section): New function.
2209 (print_debug): Handle .debug_ranges section.
2210
22112005-05-30 Ulrich Drepper <drepper@redhat.com>
2212
2213 * readelf.c (handle_notes): At least x86-64 need not have the note
2214 section values aligned to 8 bytes.
2215
22162005-05-18 Ulrich Drepper <drepper@redhat.com>
2217
2218 * readelf.c (dwarf_tag_string): Add new tags.
2219
22202005-05-08 Roland McGrath <roland@redhat.com>
2221
2222 * strip.c (handle_elf): Don't translate hash and versym data formats,
2223 elf_getdata already did it for us.
2224
22252005-05-07 Ulrich Drepper <drepper@redhat.com>
2226
2227 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2228 (addr2line_LDADD): Likewise.
2229
22302005-05-03 Roland McGrath <roland@redhat.com>
2231
2232 * strip.c (handle_elf): Apply symbol table fixups to discarded
2233 relocation sections when they are being saved in the debug file.
2234
2235 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2236 and gelf_xlatetof, not the native byte order.
2237
2238 * strip.c (parse_opt): Give error if -f or -o is repeated.
2239 (main): Exit if argp_parse returns nonzero.
2240
2241 * strip.c (debug_fname_embed): New variable.
2242 (options, parse_opt): New option -F to set it.
2243
22442005-05-07 Ulrich Drepper <drepper@redhat.com>
2245
2246 * readelf.c (parse_opt): Make any_control_option variable
2247 local. Simplify some tests.
2248
22492005-05-03 Roland McGrath <roland@redhat.com>
2250
2251 * strip.c (crc32_file): Function removed (now in ../lib).
2252
22532005-05-03 Roland McGrath <roland@redhat.com>
2254
2255 * elflint.c (is_debuginfo): New variable.
2256 (options, parse_opt): New option --debuginfo/-d to set it.
2257 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2258 (check_note): If is_debuginfo, don't try to get note contents.
2259
22602005-04-24 Ulrich Drepper <drepper@redhat.com>
2261
2262 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2263 section reached.
2264
22652005-04-14 Ulrich Drepper <drepper@redhat.com>
2266
2267 * readelf.c (dwarf_encoding_string): New function.
2268 (dwarf_inline_string): New function.
2269 (dwarf_access_string): New function.
2270 (dwarf_visibility_string): New function.
2271 (dwarf_virtuality_string): New function.
2272 (dwarf_identifier_case_string): New function.
2273 (dwarf_calling_convention_string): New function.
2274 (dwarf_ordering_string): New function.
2275 (dwarf_discr_list_string): New function.
2276 (attr_callback): Decode man more attribute values.
2277
22782005-04-01 Ulrich Drepper <drepper@redhat.com>
2279
2280 * addr2line.c: Finish implementation of -f option.
2281
22822005-03-29 Ulrich Drepper <drepper@redhat.com>
2283
2284 * addr2line.c: New file.
2285 * Makefile.am (bin_PROGRAMS): Add addr2line.
2286 Define addr2line_LDADD.
2287
2288 * findtextrel.c: Use new dwarf_addrdie function.
2289
2290 * findtextrel.c: Fix usage message and re-add accidentally removed
2291 line.
2292
22932005-03-28 Ulrich Drepper <drepper@redhat.com>
2294
2295 * findtextrel.c: New file.
2296 * Makefile: Add rules to build findtextrel.
2297
22982005-02-15 Ulrich Drepper <drepper@redhat.com>
2299
2300 * ldlex.l: Provide ECHO definition to avoid warning.
2301
2302 * elflint.c (check_program_header): Fix typo in RELRO test.
2303
2304 * Makefile.am (AM_CFLAGS): Add more warning options.
2305 * elflint.c: Fix warnings introduced by the new warning options.
2306 * i386_ld.c: Likewise.
2307 * ld.c: Likewise.
2308 * ld.h: Likewise.
2309 * ldgeneric.c: Likewise.
2310 * nm.c: Likewise.
2311 * readelf.c: Likewise.
2312 * sectionhash.c: Likewise.
2313 * size.c: Likewise.
2314 * string.c: Likewise.
2315
23162005-02-05 Ulrich Drepper <drepper@redhat.com>
2317
2318 * Makefile.am: Check for text relocations in constructed DSOs.
2319
2320 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2321 with -lmudflap.
2322
2323 * ldscript.y: Add as_needed handling.
2324 * ldlex.l: Recognize AS_NEEDED token.
2325 * ld.h (struct filename_list): Add as_needed flag.
2326
23272005-02-04 Ulrich Drepper <drepper@redhat.com>
2328
2329 * elflint.c (check_symtab): Correctly determine size of GOT section.
2330
23312005-01-19 Ulrich Drepper <drepper@redhat.com>
2332
2333 * ld.c: Remove unnecessary more_help function. Print bug report
2334 address using argp.
2335 * strip.c: Likewise.
2336 * size.c: Likewise.
2337 * nm.c: Likewise.
2338 * readelf.c: Likewise.
2339 * elflint.c: Likewise.
2340
2341 * elflint.c (main): Don't check for parameter problems here.
2342 (parse_opt): Do it here, where we get informed about some of them
2343 anyway.
2344
2345 * readelf.c (main): Don't check for parameter problems here.
2346 (parse_opt): Do it here, where we get informed about some of them
2347 anyway.
2348
23492005-01-11 Ulrich Drepper <drepper@redhat.com>
2350
2351 * strip.c: Update copyright year.
2352 * readelf.c: Likewise.
2353 * size.c: Likewise.
2354 * nm.c: Likewise.
2355 * ld.c: Likewise.
2356 * elflint.c: Likewise.
2357
2358 * elflint.c (check_symtab): Don't warn about wrong size for
2359 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2360
23612004-10-05 Ulrich Drepper <drepper@redhat.com>
2362
2363 * readelf.c (print_phdr): In section mapping, also indicate
2364 sections in read-only segments.
2365
23662004-09-25 Ulrich Drepper <drepper@redhat.com>
2367
2368 * readelf.c: Make compile with gcc 4.0.
2369 * strip.c: Likewise.
2370
23712004-08-16 Ulrich Drepper <drepper@redhat.com>
2372
2373 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2374 allocate to work around gcc 3.4 bug.
2375
23762004-01-25 Ulrich Drepper <drepper@redhat.com>
2377
2378 * ldlex.l (invalid_char): Better error message.
2379
23802004-01-23 Ulrich Drepper <drepper@redhat.com>
2381
2382 * readelf.c: Print SHT_GNU_LIBLIST sections.
2383
2384 * none_ld.c: New file.
2385
23862004-01-21 Ulrich Drepper <drepper@redhat.com>
2387
2388 * Makefile.am: Enable building of machine specific linker.
2389
23902004-01-20 Ulrich Drepper <drepper@redhat.com>
2391
2392 * Makefile.am: Support building with mudflap.
2393
2394 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2395 * ldgeneric.c: Likewise.
2396 * ldscript.y: Likewise.
2397 * readelf.c: Likewise.
2398 * strip.c: Likewise.
2399
2400 * readelf.c (print_debug_line_section): Determine address size
2401 correctly.
2402
24032004-01-19 Ulrich Drepper <drepper@redhat.com>
2404
2405 * readelf.c (print_phdr): Show which sections are covered by the
2406 PT_GNU_RELRO entry.
2407
2408 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2409
2410 * readelf.c (print_debug_macinfo_section): Implement.
2411
24122004-01-18 Ulrich Drepper <drepper@redhat.com>
2413
2414 * readelf.c (print_debug_line_section): Implement.
2415
24162004-01-17 Ulrich Drepper <drepper@redhat.com>
2417
2418 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2419 * src/ld.c: Likewise.
2420 * src/nm.c: Likewise.
2421 * src/readelf.c: Likewise.
2422 * src/size.c: Likewise.
2423 * src/strip.c: Likewise.
2424
2425 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2426
2427 * Makefile.am: Support building with mudflap.
2428
24292004-01-16 Ulrich Drepper <drepper@redhat.com>
2430
2431 * readelf.c (print_debug_info_section): Free dies memory.
2432
2433 * readelf.c: Print .debug_info section content.
2434
24352004-01-13 Ulrich Drepper <drepper@redhat.com>
2436
2437 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2438
24392004-01-12 Ulrich Drepper <drepper@redhat.com>
2440
2441 * readelf.c (print_debug_aranges): Implement using libdw.
2442
24432004-01-11 Ulrich Drepper <drepper@redhat.com>
2444
2445 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2446
2447 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2448 behavior is available yet.
2449 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2450
24512004-01-09 Ulrich Drepper <drepper@redhat.com>
2452
2453 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2454
2455 * nm.c: Implement getting information about local variables.
2456
24572004-01-07 Ulrich Drepper <drepper@redhat.com>
2458
2459 * nm.c: Read also debug information for local symbols.
2460
24612004-01-05 Ulrich Drepper <drepper@redhat.com>
2462
2463 * nm.c: Shuffle dwarf handling code around so the maximum column
2464 width can be computed ahead of printing. Avoid collection symbols
2465 which are not printed anyway.
2466
2467 * nm.c: Rewrite dwarf handling to use libdw.
2468 * Makefile.am (AM_CFLAGS): Add -std parameter.
2469 (INCLUDES): Find header in libdw subdir.
2470 (nm_LDADD): Replace libdwarf with libdw.
2471
2472 * elflint.c: Update copyright year.
2473 * readelf.c: Likewise.
2474 * size.c: Likewise.
2475 * strip.c: Likewise.
2476 * nm.c: Likewise.
2477
24782003-12-31 Ulrich Drepper <drepper@redhat.com>
2479
2480 * strip.c (process_file): Close file before returning.
2481
24822003-11-19 Ulrich Drepper <drepper@redhat.com>
2483
2484 * readelf.c (handle_dynamic): Make column for tag name wider.
2485
24862003-09-29 Ulrich Drepper <drepper@redhat.com>
2487
2488 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2489
24902003-09-25 Ulrich Drepper <drepper@redhat.com>
2491
2492 * strip.c (process_file): Don't mmap the input file, we modify the
2493 data structures and don't want the change end up on disk.
2494
24952003-09-23 Jakub Jelinek <jakub@redhat.com>
2496
2497 * unaligned.h (union u_2ubyte_unaligned,
2498 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2499 packed attribute.
2500 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2501 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2502 Read/store value through _ptr->u instead of *_ptr.
2503
25042003-09-22 Ulrich Drepper <drepper@redhat.com>
2505
2506 * size.c (show_sysv): Change type of maxlen to int.
2507
2508 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2509 buckets.
2510
2511 * i386_ld.c: Many many fixes and extensions.
2512 * ld.c: Likewise.
2513 * ldgeneric.c: Likewise.
2514
25152003-08-16 Ulrich Drepper <drepper@redhat.com>
2516
2517 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2518 the reference is from another DSO.
2519
25202003-08-15 Ulrich Drepper <drepper@redhat.com>
2521
2522 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2523 point is found when creating a DSO.
2524
25252003-08-14 Ulrich Drepper <drepper@redhat.com>
2526
2527 * ld.c (main): Always call FLAG_UNRESOLVED.
2528 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2529 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2530
25312003-08-13 Ulrich Drepper <drepper@redhat.com>
2532
2533 * Makefile.in: Depend on libebl.a, not libebl.so.
2534
2535 * ld.c (main): Mark stream for linker script as locked by caller.
2536 (read_version_script): Likewise.
2537 * ldlex.c: Define fread and fwrite to _unlocked variant.
2538
2539 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2540 target_bswap_32.
2541 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2542 target_bswap_64.
2543 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2544 store_8ubyte_unaligned): Define using new macros.
2545
25462003-08-12 Ulrich Drepper <drepper@redhat.com>
2547
2548 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2549 possibly unaligned memory. Support use of big endian machines.
2550
25512003-08-11 Ulrich Drepper <drepper@redhat.com>
2552
2553 * Moved to CVS archive.