blob: aebcb2ff68c70de96c78ced980facaf1e6b0e71f [file] [log] [blame]
Jan Kratochvil0b867462013-05-30 14:37:38 +020012013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * Makefile.am (bin_PROGRAMS): Add stack.
4 (stack_LDADD): New.
5 * stack.c: New file.
6
Mark Wielaardbe860842013-11-05 13:37:33 +010072013-11-05 Mark Wielaard <mjw@redhat.com>
8
9 * readelf.c (print_debug_ranges_section): Cast address to size_t
10 before comparison.
11 (print_debug_loc_section): Likewise.
12
Mark Wielaard4f7673f2013-10-18 10:37:53 +0200132013-10-18 Mark Wielaard <mjw@redhat.com>
14
15 * ar.c (main): Correct operation check when instance_specifed is set.
16
Petr Machataab224102013-09-26 00:39:34 +0200172013-09-26 Petr Machata <pmachata@redhat.com>
18
Petr Machata0c9ae0c2013-09-26 21:02:22 +020019 * readelf.c (handle_file_note): New function.
20 (handle_notes_data): Call it to handle NT_FILE notes.
21
222013-09-26 Petr Machata <pmachata@redhat.com>
23
Petr Machataab224102013-09-26 00:39:34 +020024 * readelf.c (handle_siginfo_note): New function.
25 (handle_notes_data): Call it to handle NT_SIGINFO notes.
26 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
27
Mark Wielaard4b9e6392013-08-13 11:40:21 +0200282013-08-13 Mark Wielaard <mjw@redhat.com>
29
30 * addr2line.c (options): Add "inlines", 'i'.
31 (show_inlines): New bool.
32 (parse_opt): Handle 'i'.
33 (print_diesym): New static function.
34 (print_src): New function taking code from...
35 (handle_address): here. Call print_src. Print inlines.
36
Mark Wielaardd0f85012013-08-12 14:21:31 +0200372013-08-12 Mark Wielaard <mjw@redhat.com>
38
39 * addr2line.c (main): If there is a newline char at end of buf,
40 then remove it.
41
Mark Wielaard35230222013-07-05 16:44:47 +0200422013-07-05 Mark Wielaard <mjw@redhat.com>
43
44 * readelf.c (print_ops): Take CU as argument, use it to print
45 parameter_ref DIE offset.
46 (struct listptr): Replace base field with cu.
47 (listptr_base): New function.
48 (compare_listptr): Use listptr_base.
49 (notice_listptr): Take CU as argument.
50 (skip_listptr_hole): Likewise.
51 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
52 (print_cfa_program): Pass NULL as CU to print_ops.
53 (struct attrcb_args): Replace cu_base field with cu.
54 (attr_callback): Pass cu not cu_base to notice_listptr.
55 (print_debug_units): Don't calculate base, just set cu.
56 (print_debug_loc_section): Pass cu to skip_listptr_hole and
57 print_ops.
58
Mark Wielaard63d8bfd2013-05-06 15:48:56 +0200592013-05-06 Mark Wielaard <mjw@redhat.com>
60
61 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
62 argument as DIE offset.
63
Mark Wielaardcdaaf212013-04-25 16:50:11 -0400642013-04-24 Mark Wielaard <mjw@redhat.com>
65
66 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
67
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100682013-03-25 Mark Wielaard <mjw@redhat.com>
69
Mark Wielaard1a094202013-03-25 14:48:06 +010070 * readelf.c (argp_options): Add decodedline.
71 (decodedline): New boolean initialized to false.
72 (parse_opt): Set decodedline when arg is decodedline.
73 (print_decoded_line_section): New function.
74 (print_debug_line_section): Call print_decoded_line_section when
75 decodedline is true.
76
772013-03-25 Mark Wielaard <mjw@redhat.com>
78
Mark Wielaardb79788c2013-03-25 11:45:22 +010079 * readelf.c (argp_option): Add decodedaranges.
80 (decodedaranges): New boolean initialized to false.
81 (parse_opt): Set decodedaranges when arg is decodedaranges.
82 (print_debug_aranges_section): Reimplemented and original
83 implementation renamed to...
84 (print_decoded_aranges_section): this.
85
862013-03-25 Mark Wielaard <mjw@redhat.com>
87
Mark Wielaarda8c7f052013-03-25 21:11:53 +010088 * readelf.c (attrcb_args): Add Dwarf_Die.
89 (attr_callback): When highpc is in constant form also print as
90 address.
91 (print_debug_units): Set args.die.
92
Mark Wielaard10cd97e2013-03-19 11:43:49 +0100932013-03-19 Mark Wielaard <mjw@redhat.com>
94
95 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
96
Mark Wielaarda73fecc2013-03-18 13:54:50 +0100972013-03-18 Mark Wielaard <mjw@redhat.com>
98
99 * readelf.c (print_gdb_index_section): Accept version 8.
100
Mark Wielaarda58951b2013-03-01 11:51:58 +01001012013-03-01 Mark Wielaard <mjw@redhat.com>
102
103 * findtextrel.c (process_file): Release ELF and close file when not
104 text relocations are found.
105 * strip.c (handle_elf): Track memory used for .debuglink section data
106 and free when done.
107
Mark Wielaardb94ccea2013-02-24 22:58:49 +01001082013-02-24 Mark Wielaard <mjw@redhat.com>
109
110 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
111 allowed to have out of section values because of GNU ld bugs.
112
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01001132013-02-06 Mark Wielaard <mjw@redhat.com>
114
115 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
116 list of symbols allowed to have out of section values because of
117 GNU ld bugs in either .symtab or .dynsym, but only when they are
118 zero sized.
119
Mark Wielaard10186a12013-01-24 11:29:21 +01001202013-01-24 Mark Wielaard <mjw@redhat.com>
121
122 * readelf.c (argp_option): Add unresolved-address-offsets, U.
123 (print_unresolved_addresses): New static.
124 (parse_opt): Handle 'U', set print_unprocessed_values.
125 (format_dwarf_addr): Take and handle new raw argument.
126 (print_ops): Call format_dwarf_addr with raw offset values.
127 (print_debug_ranges_section): Likewise.
128 (print_debug_frame_section): Likewise.
129 (attr_callback): Likewise.
130 (print_debug_line_section): Likewise.
131 (print_debug_loc_section): Likewise.
132 (print_gdb_index_section): Likewise.
133
Mark Wielaard24257102013-01-18 22:19:08 +01001342013-01-18 Mark Wielaard <mjw@redhat.com>
135
136 * readelf.c (struct listptr): Add base Dwarf_Addr field.
137 (compare_listptr): Warn for same offset with different base.
138 (notice_listptr): Take base argument and set it.
139 (skip_listptr_hole): Likewise.
140 (struct attrcb_args): Removed unused cu_offset field.
141 Add cu_base Dwarf_Addr field.
142 (attr_callback): Call notice_listptr with cbargs->cu_base.
143 (print_debug_units): Set args.cu_base.
144 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
145 (print_debug_loc_section): Likewise.
146
Jan Kratochvilc44cce02012-10-10 19:32:05 +02001472013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
148
149 * readelf.c (handle_core_items): Limit special repeated items handling
150 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
151
Mark Wielaard6d258ce2013-01-16 15:19:20 +01001522012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
153
154 * readelf.c (ELF_INPUT_SECTION): New argp key value.
155 (argp_option): Add elf-section.
156 (elf_input_section): New static.
157 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
158 (open_input_section): New function.
159 (process_file): Call open_input_section if elf_input_section set.
160
David Abdurachmanov1a4d0662013-01-13 16:44:21 +01001612013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
162
163 ar.c (do_oper_delete): Fix num passed to memset.
164
Mark Wielaard55324042012-12-21 10:02:11 +01001652012-12-21 Mark Wielaard <mjw@redhat.com>
166
Mark Wielaard00f758c2012-12-21 22:11:44 +0100167 * readelf.c (print_debug_frame_section): Adjust FDE start address
168 if pcrel before feeding it to format_dwarf_addr.
169
1702012-12-21 Mark Wielaard <mjw@redhat.com>
171
172 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +0100173
Roland McGrath57bd66c2012-12-11 09:42:07 -08001742012-12-11 Roland McGrath <roland@hack.frob.com>
175
176 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
177 sh_name case.
178 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
179
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +01001802012-10-16 Mark Wielaard <mjw@redhat.com>
181
182 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
183 calculated beginning after the operand and 2-byte constant.
184
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02001852012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
186
187 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
188 (WRAP_COLUMN): ... here.
189 (print_core_item): Remove parameter format_max. Update function
190 comment. Replace FORMAT_MAX by the real output width.
191 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
192 calls of print_core_item, remove variable maxfmt, change
193 ITEM_WRAP_COLUMN to WRAP_COLUMN.
194 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
195 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
196
Roland McGrath82ed98a2012-10-11 14:53:18 -07001972012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
198
199 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
200 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
201
Mark Wielaarde89c5002012-08-27 14:30:05 +02002022012-08-27 Mark Wielaard <mjw@redhat.com>
203
Mark Wielaard3e440062012-08-27 15:21:58 +0200204 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
205
2062012-08-27 Mark Wielaard <mjw@redhat.com>
207
Mark Wielaarde89c5002012-08-27 14:30:05 +0200208 * readelf.c (register_info): Handle loc == NULL.
209
Jeff Kenton257dcf42012-08-22 09:00:03 -04002102012-08-22 Jeff Kenton <jkenton@tilera.com>
211
212 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
213
Mark Wielaardf31c4412012-08-17 00:35:03 +02002142012-08-16 Mark Wielaard <mjw@redhat.com>
215
216 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
217 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
218 appropriate.
219 (dwarf_attr_name): Likewise.
220 (dwarf_form_name): Likewise.
221 (dwarf_lang_name): Likewise.
222 (dwarf_inline_name): Likewise.
223 (dwarf_encoding_name): Likewise.
224 (dwarf_access_name): Likewise.
225 (dwarf_visibility_name): Likewise.
226 (dwarf_virtuality_name): Likewise.
227 (dwarf_identifier_case_name): Likewise.
228 (dwarf_calling_convention_name): Likewise.
229 (dwarf_ordering_name): Likewise.
230 (dwarf_discr_list_name): Likewise.
231 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
232 (attr_callback): Call new dwarf_foobar_name instead of old
233 dwarf_foobar_string functions.
234 (dwarf_tag_string): New function using known-dwarf.h macros.
235 (dwarf_attr_string): Likewise.
236 (dwarf_form_string): Likewise.
237 (dwarf_lang_string): Likewise.
238 (dwarf_inline_string): Likewise.
239 (dwarf_encoding_string): Likewise.
240 (dwarf_access_string): Likewise.
241 (dwarf_visibility_string): Likewise.
242 (dwarf_virtuality_string): Likewise.
243 (dwarf_identifier_case_string): Likewise.
244 (dwarf_calling_convention_string): Likewise.
245 (dwarf_ordering_string): Likewise.
246 (dwarf_discr_list_string): Likewise.
247 (dwarf_locexpr_opcode_string): Likewise.
248
Mark Wielaard775375e2012-06-22 12:02:45 +02002492012-06-27 Mark Wielaard <mjw@redhat.com>
250
251 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
252 DW_FORM_GNU_strp_alt.
253 (attr_callback): Likewise.
254
Petr Machatafe198bc2012-07-30 19:48:28 +02002552012-07-30 Petr Machata <pmachata@redhat.com>
256
257 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
258 corresponding printf) so that those that are referenced by only
259 one of the formatting strings are at the end.
260
Mark Wielaard629b2562012-07-29 14:05:20 +02002612012-07-29 Mark Wielaard <mjw@redhat.com>
262
263 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
264 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
265
Mark Wielaard515fba92012-07-20 00:09:56 +02002662012-07-19 Mark Wielaard <mjw@redhat.com>
267
268 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
269
Mark Wielaarde9b23882012-06-29 22:30:15 +02002702012-07-11 Mark Wielaard <mjw@redhat.com>
271
272 * readelf.c (options): Add macro to help of debug-dump.
273 (section_e): Add section_macro.
274 (section_all): Add section_macro.
275 (parse_opt): Handle macro.
276 (print_debug_macro_section): New function.
277 (print_debug): Add NEW_SECTION (macro).
278
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02002792012-07-10 Mark Wielaard <mjw@redhat.com>
280
281 * readelf.c (print_gdb_index_section): Add version 7 support.
282 Keep track of cu_nr. Print kind and static/global flag for each
283 symbol. When a symbol is in the TU list add 'T'.
284
Mark Wielaarda0172d72012-06-25 17:18:53 +02002852012-06-26 Mark Wielaard <mjw@redhat.com>
286
287 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
288
Mark Wielaard50e2d392012-06-22 16:44:54 +02002892012-06-22 Mark Wielaard <mjw@redhat.com>
290
291 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
292 for gcc 4.7 -Wformat.
293
Mark Wielaard36aa5982012-05-09 11:27:44 +02002942012-05-09 Roland McGrath <roland@hack.frob.com>
295
296 * elflint (check_sections): Allow zero sized sections at (filesz) end
297 of segment. And make check overflow-proofed.
298
Mark Wielaard716486d2012-04-24 11:56:42 +02002992012-04-24 Mark Wielaard <mjw@redhat.com>
300
301 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
302 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
303
Roland McGrath738c1832012-03-28 15:01:49 -07003042012-03-28 Roland McGrath <roland@hack.frob.com>
305
306 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
307
Mark Wielaard61651c12012-03-28 11:20:36 +02003082012-03-28 Mark Wielaard <mjw@redhat.com>
309
310 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
311 section data.
312 (print_debug_str_section): Likewise.
313
Mark Wielaard30bb7142012-03-21 16:05:31 +01003142012-03-21 Mark Wielaard <mjw@redhat.com>
315
316 * readelf.c (print_gdb_index_section): Accept version 6.
317
Mark Wielaardcb643d62012-01-31 19:22:03 +01003182012-01-31 Mark Wielaard <mjw@redhat.com>
319
320 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
321
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05003222012-01-21 Ulrich Drepper <drepper@gmail.com>
323
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500324 * addr2line.c: Update copyright year.
325 * ar.c: Likewise.
326 * elfcmp.c: Likewise.
327 * elflint.c: Likewise.
328 * findtextrel.c: Likewise.
329 * ld.c: Likewise.
330 * nm.c: Likewise.
331 * objdump.c: Likewise.
332 * ranlib.c: Likewise.
333 * readelf.c: Likewise.
334 * size.c: Likewise.
335 * strings.c: Likewise.
336 * strip.c: Likewise.
337 * unstrip.c: Likewise.
338
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -0500339 * nm.c (argp_children): Define.
340 (argp): Hook up argp_children.
341 (handle_ar): Optimize puts call.
342 (show_symbols_bsd): Use positional parameters to also print color
343 codes. Don't print STT_FILE symbols.
344 * objdump.c (options): Improve help text.
345 (argp_children): Define.
346 (argp): Hook up argp_children.
347 (disasm_info): Add elements for color codes.
348 (disasm_output): Print color codes as well.
349 (show_disasm): Set up disasm_info data for callback.
350
Roland McGrath85924782012-01-20 11:40:59 -08003512012-01-20 Roland McGrath <roland@hack.frob.com>
352
Roland McGrath3284b792012-01-20 12:51:46 -0800353 * arlib-argp.c (arlib_deterministic_output): Initialize from
354 configured value.
355 (help_filter): New function.
356 (argp): Use it.
357
Roland McGrath9bffd362012-01-20 12:04:19 -0800358 * ar.c (main): Handle oper_none as usage error.
359
Roland McGrath6e063d92012-01-20 11:43:36 -0800360 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
361
Roland McGrath85924782012-01-20 11:40:59 -0800362 * ranlib.c (argp): Use arlib_argp_children.
363
364 * arlib.c (arlib_init): Obey arlib_deterministic_output.
365
366 * arlib-argp.c: New file.
367 * Makefile.am (libar_a_SOURCES): Add it.
368 * arlib.h (arlib_deterministic_output, arlib_argp_children):
369 Declare new variables.
370 * ar.c (deterministic_output): Variable removed.
371 (do_oper_insert): Use arlib_deterministic_output instead.
372 (options, parse_opt): Don't handle -D here. Add group numbers.
373 (argp): Use arlib_argp_children.
374
Roland McGratha065c4b2011-12-20 10:55:01 -08003752011-12-20 Roland McGrath <roland@hack.frob.com>
376
377 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
378 Reported by Karel Klic <kklic@redhat.com>.
379
Roland McGrath4fa988e2011-11-05 20:58:14 -07003802011-11-05 Roland McGrath <roland@hack.frob.com>
381
Roland McGrathe5ba2a12011-11-05 21:08:07 -0700382 * ar.c (deterministic_output): New flag variable.
383 (options, parse_opt): Grok -D to set it.
384 (do_oper_insert): When set, use zero from mtime, uid, and gid.
385
Roland McGrath4fa988e2011-11-05 20:58:14 -0700386 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
387
Marek Polacek8d1e2972011-10-04 05:11:42 -04003882011-10-04 Marek Polacek <mpolacek@redhat.com>
389
390 * readelf.c (register_info): Assume the right size of an array.
391
Ulrich Drepper2356ba02011-10-03 07:23:07 -04003922011-10-03 Ulrich Drepper <drepper@gmail.com>
393
394 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
395 but don't show it in help anymore.
396 (mark_special): Renamed from mark_weak.
397 (parse_opt): Adjust.
398 (class_type_char): Take additional parameters for ELF file and ELF
399 header. Treat TLS symbols like objects.
400 In case of D symbols, show u for unique symbols, R for symbols in
401 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400402 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400403 header. Adjust for class_type_char change. Show TLS symbols with
404 @ after them in case --mark-special is selected.
405 (show_symbols_posix): Likewise.
406 (show_symbols): Adjust calls to show_symbols_bsd and
407 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -0400408 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400409 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400410
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -04004112011-10-02 Ulrich Drepper <drepper@gmail.com>
412
413 * Makefile.am (demanglelib): Define.
414 (nm_LDADD): Add demanglelib.
415 * nm.c (options): Add -C option.
416 (demangle): Define as global variable.
417 (parse_opt): Recognize -C.
418 (show_symbols_sysv): Handle demangling.
419 (show_symbols_bad): Likewise.
420 (show_symbols_posix): Likewise.
421 (show_symbols): Likewise.
422
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07004232011-07-09 Roland McGrath <roland@hack.frob.com>
424
Roland McGrathbd754192011-07-09 05:33:37 -0700425 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
426
427 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700428
Mark Wielaard02a958b2011-05-30 17:23:57 +02004292011-05-30 Mark Wielaard <mjw@redhat.com>
430
431 * strip.c (relocate): Make offset check overflow-proof.
432
Mark Wielaard1662bc32011-05-16 11:33:11 +02004332011-05-23 Mark Wielaard <mjw@redhat.com>
434
Mark Wielaard63868c22011-05-24 16:09:31 +0200435 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700436 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +0200437 Relocate against any debug section symbol, not just STT_SECTION
438 symbols. For SHT_REL relocations, fetch addend from offset and
439 add it to symbol value if not zero.
440
4412011-05-23 Mark Wielaard <mjw@redhat.com>
442
Mark Wielaard1662bc32011-05-16 11:33:11 +0200443 * strip.c (OPT_RELOC_DEBUG): New option.
444 (argp_option): Add new --reloc-debug-sections option.
445 (main): Check new option.
446 (parse_opt): Likewise.
447 (handle_elf): Remove any relocations between debug sections
448 in ET_REL for the debug file when requested.
449
Mark Wielaard7a125b92011-05-17 12:20:01 +02004502011-05-18 Mark Wielaard <mjw@redhat.com>
451
452 * strip.c (handle_elf): Make sure all sections of a removed group
453 section are removed too. Don't discard SHT_GROUP sections, copy
454 section table before it gets modified. Section group signature
455 symbols don't have to be retained.
456
Jakub Jelinek03124242011-05-17 17:00:14 +02004572011-05-16 Jakub Jelinek <jakub@redhat.com>
458
459 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
460 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
461 and DW_OP_GNU_reinterpret.
462
Mark Wielaard69a9b112011-05-17 15:34:02 +02004632011-05-17 Mark Wielaard <mjw@redhat.com>
464
465 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
466 DW_TAG_GNU_call_site_parameter return strings.
467
Marek Polacekc8920de2011-05-12 12:08:21 +02004682011-05-11 Marek Polacek <mpolacek@redhat.com>
469
470 * nm.c (show_symbols_sysv): Remove unused if/else, remove
471 unused `prefix' and `fname' parameters.
472
Marek Polacek82f77d72011-05-07 19:26:20 +02004732011-05-07 Marek Polacek <mpolacek@redhat.com>
474
475 * unstrip.c (compare_sections_nonrel): Mark this function as static.
476
Mark Wielaardbb9d1b42011-04-24 17:53:38 +02004772011-04-26 Mark Wielaard <mjw@redhat.com>
478
479 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
480 with note name.
481
Mark Wielaard093a1d32011-04-14 23:47:26 +02004822011-04-14 Mark Wielaard <mjw@redhat.com>
483
484 * readelf.c (options): Add gdb_index.
485 (section_e): Define section_gdb_index.
486 (parse_opt): Recognize gdb_index debug-dump argument.
487 (print_gdb_index_section): New function.
488 (print_debug): Add gdb_index to debug_sections.
489
Petr Machata1879e5b2011-03-25 15:17:04 +01004902011-03-24 Petr Machata <pmachata@redhat.com>
491
492 * readelf.c (print_debug_line_section): Emit initial space for all
493 opcode lines. Print offset in front of each opcode.
494
Marek Polacek44de92a2011-03-22 01:07:20 +01004952011-03-22 Marek Polacek <mpolacek@redhat.com>
496
497 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
498
Mark Wielaarde3368c52011-03-22 23:03:31 +01004992011-03-22 Mark Wielaard <mjw@redhat.com>
500
501 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
502 and DW_TAG_GNU_call_site_parameter.
503 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
504 DW_AT_GNU_call_site_data_value,
505 DW_AT_GNU_call_site_target,
506 DW_AT_GNU_call_site_target_clobbered,
507 DW_AT_GNU_tail_call,
508 DW_AT_GNU_all_tail_call_sites,
509 DW_AT_GNU_all_call_sites,
510 and DW_AT_GNU_all_source_call_sites.
511 (print_ops): Handle DW_OP_GNU_entry_value.
512 (attr_callback): Handle DW_AT_GNU_call_site_value,
513 DW_AT_GNU_call_site_data_value,
514 DW_AT_GNU_call_site_target,
515 and DW_AT_GNU_call_site_target_clobbered.
516
Mark Wielaarda062b6b2011-03-10 13:02:32 +01005172011-03-10 Mark Wielaard <mjw@redhat.com>
518
519 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
520
Jan Kratochvilfec39992011-02-27 12:01:25 -08005212011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
522
523 * readelf.c (reset_listptr): Clear TABLE->TABLE.
524
Mark Wielaardcf454ab2011-02-25 12:58:54 +01005252011-02-25 Mark Wielaard <mjw@redhat.com>
526
527 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
528 (dwarf_form_string): Properly format and return unknown form.
529
Roland McGrath47c53232011-02-23 09:23:08 -08005302011-02-23 Roland McGrath <roland@redhat.com>
531
Roland McGrath725aad52011-02-23 19:52:46 -0800532 * readelf.c (section_name): New function.
533 (print_debug_abbrev_section): Use it instead of constant.
534 (print_debug_aranges_section): Likewise.
535 (print_debug_ranges_section): Likewise.
536 (print_debug_units): Likewise.
537 (print_debug_line_section): Likewise.
538 (print_debug_loc_section): Likewise.
539 (print_debug_macinfo_section): Likewise.
540 (print_debug_pubnames_section): Likewise.
541 (print_debug_str_section): Likewise.
542 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
543 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
544 (print_debug_str_section): Likewise.
545
Roland McGrath47c53232011-02-23 09:23:08 -0800546 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
547
Roland McGrath1fb9c912011-02-11 10:32:30 -08005482011-02-11 Roland McGrath <roland@redhat.com>
549
Roland McGrath4a14ef72011-02-11 10:42:45 -0800550 * elfcmp.c (verbose): New variable.
551 (options, parse_opt): Grok -l/--verbose to set it.
552 (main): Under -l, keep going after first difference.
553
Roland McGrath1fb9c912011-02-11 10:32:30 -0800554 * elfcmp.c (ignore_build_id): New variable.
555 (options, parse_opt): Grok --ignore-build-id to set it.
556 (main): For SHT_NOTE sections, compare note details rather than raw
557 bytes. Under --ignore-build-id, don't complain about differing build
558 ID contents if lengths match.
559
Roland McGrathfd992542011-02-08 19:45:12 -08005602011-02-08 Roland McGrath <roland@redhat.com>
561
Roland McGrath240784b2011-02-08 19:48:42 -0800562 * ldscript.y (filename_id_star): Remove unused variable.
563
Roland McGrath8f6c1792011-02-08 19:48:02 -0800564 * unstrip.c (copy_elided_sections): Remove unused variable.
565
Roland McGrath4db89f02011-02-08 19:46:50 -0800566 * elflint.c (check_dynamic): Remove unused variables.
567
Roland McGrath33231312011-02-08 19:45:26 -0800568 * elflint.c (check_symtab): Warn about missing xndx section only once.
569
Roland McGrathfd992542011-02-08 19:45:12 -0800570 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
571
Roland McGrathf151b7d2011-01-06 12:14:43 -08005722011-01-06 Roland McGrath <roland@redhat.com>
573
574 * strip.c (handle_elf): Under --strip-sections, remove all
575 non-allocated sections and never generate .gnu_debuglink.
576
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08005772011-01-04 Roland McGrath <roland@redhat.com>
578
579 * strip.c (remove_shdrs): New variable.
580 (options, parse_opt): Grok --strip-sections to set it.
581 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
582
Roland McGrath77221de2010-11-10 19:47:31 -08005832010-11-10 Roland McGrath <roland@redhat.com>
584
585 * findtextrel.c (process_file): Don't assume order of sections.
586 Reported by Mike Hommey <mh@glandium.org>.
587
Roland McGrath932585d2010-05-08 04:01:14 -07005882010-07-26 Roland McGrath <roland@redhat.com>
589
590 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
591
Roland McGratha1599152010-08-30 04:04:37 -07005922010-08-30 Roland McGrath <roland@redhat.com>
593
Roland McGrathfa144952010-08-30 19:22:41 -0700594 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
595 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
596 for ranges, loc.
597 (struct listptr, struct listptr_table): New types.
598 (compare_listptr, reset_listptr, sort_listptr): New functions.
599 (notice_listptr, skip_listptr_hole): New functions.
600 (struct attrcb_args): Add silent member.
601 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
602 Suppress output if silent, but still call notice_listptr.
603 (print_debug_units): Suppress output if section_info not requested.
604 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
605 (print_debug_ranges_section): Likewise.
606 (print_debug): Call reset_listptr on both tables.
607
608 * readelf.c (print_debug_ranges_section): Print empty list.
609 (print_debug_loc_section): Likewise.
610
Roland McGratha1599152010-08-30 04:04:37 -0700611 * readelf.c (print_debug_loc_section): Check for bogus length
612 before calling print_ops.
613 (print_ops): Check harder for bogus data that would read off end.
614
Roland McGrathf4763cf2010-08-11 13:04:12 -07006152010-08-11 Roland McGrath <roland@redhat.com>
616
617 * readelf.c (for_each_section_argument): Process all sections with
618 matching name, not just the first.
619
Roland McGrath52604ba2010-07-26 21:29:44 -07006202010-07-26 Roland McGrath <roland@redhat.com>
621
622 * readelf.c (print_ops): Take new argument for CU version.
623 Fix DW_OP_call_ref decoding to depend on it.
624 (print_debug_loc_section): Update caller.
625 (print_cfa_program): Take new argument, pass it down.
626 (print_debug_frame_section): Update caller.
627 (struct attrcb_args): New member version.
628 (print_debug_units): Initialize it.
629
Roland McGrath2f14a312010-07-02 11:16:25 -07006302010-07-02 Roland McGrath <roland@redhat.com>
631
632 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
633 initial_location.
634
Roland McGrathb6458032010-06-30 11:57:19 -07006352010-06-30 Roland McGrath <roland@redhat.com>
636
637 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
638 Ignore st_size for a non-S_ISREG file descriptor.
639 (read_block): Move assert after no-mmap bail-out.
640 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
641
Roland McGrathfa799902010-06-22 13:05:23 -07006422010-06-22 Roland McGrath <roland@redhat.com>
643
644 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
645
Roland McGrath0c5638c2010-06-21 23:00:35 -07006462010-06-21 Roland McGrath <roland@redhat.com>
647
648 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700649 (dwarf_attr_string): Add new attributes.
650 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700651
652 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
653 (print_cfa_program): Likewise.
654
Roland McGrathe5251a12010-06-20 16:59:39 -07006552010-06-20 Roland McGrath <roland@redhat.com>
656
Roland McGrath2b1f0952010-06-20 17:55:50 -0700657 * readelf.c (print_debug_units): New function, broken out of ...
658 (print_debug_info_section): ... here. Call it.
659 (print_debug_types_section): New function.
660 (enum section_e): Add section_types alias for section_info.
661 (print_debug): Add types to the sections table.
662
Roland McGrath599f7f52010-06-20 17:12:43 -0700663 * readelf.c (print_debug_frame_section): Handle version 4 format.
664
Roland McGrathe5251a12010-06-20 16:59:39 -0700665 * readelf.c (print_debug_line_section): Handle version 4 format.
666
Roland McGrathec86e5f2010-06-14 17:44:38 -07006672010-06-14 Roland McGrath <roland@redhat.com>
668
669 * unstrip.c (copy_elided_sections): Make sure all sections' data have
670 been read in before we write anything out.
671
Roland McGrath3b1b6512010-06-04 02:26:30 -07006722010-06-04 Roland McGrath <roland@redhat.com>
673
Roland McGrathaa32f922010-06-04 02:29:08 -0700674 * unstrip.c (update_shdr): New function.
675 (update_sh_size): Call it instead of gelf_update_shdr.
676 (adjust_relocs, add_new_section_symbols): Likewise.
677 (new_shstrtab, copy_elided_sections): Likewise.
678
Roland McGrath3b1b6512010-06-04 02:26:30 -0700679 * unstrip.c (copy_elided_sections): Bail if stripped file has more
680 sections than unstripped file, rather than getting confused later.
681
Roland McGrath7a5bed82010-06-01 13:44:00 -07006822010-06-01 Roland McGrath <roland@redhat.com>
683
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700684 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
685 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700686 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700687
Roland McGrath7a5bed82010-06-01 13:44:00 -0700688 * readelf.c (print_debug): Don't bail if libdw setup fails.
689 Suppress complaint if we only want .eh_frame anyway.
690
Ulrich Drepper173ade82010-05-28 07:39:49 -07006912010-05-28 Ulrich Drepper <drepper@redhat.com>
692
693 * readelf.c (attr_callback): Also print form information.
694
Roland McGrath12e3d1f2010-05-19 18:03:31 -07006952010-05-19 Roland McGrath <roland@redhat.com>
696
697 * addr2line.c (find_symbol): Short-circuit on empty name.
698 (handle_address): Handle SYMBOL with no +OFFSET.
699
Roland McGrath688f7fc2010-05-08 03:22:59 -07007002010-05-08 Roland McGrath <roland@redhat.com>
701
702 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
703 Use that for DW_OP_call_ref, not ADDRSIZE.
704 (print_cfa_program): Update caller.
705 (struct attrcb_args): Add offset_size field.
706 (attr_callback): Use it for print_ops call.
707 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700708 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700709
Roland McGrath62b28b62010-04-14 11:54:06 -07007102010-04-14 Roland McGrath <roland@redhat.com>
711
712 * readelf.c (handle_core_item): Fix bitmask printing.
713
Roland McGrath3b495d82010-04-06 12:58:32 -07007142010-04-06 Roland McGrath <roland@redhat.com>
715
716 * ld.c (options): Fix some typos in messages.
717 * elflint.c (check_scn_group, check_group): Likewise.
718 * ldscript.y (add_id_list): Likewise.
719 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
720 before translated string containing a literal %.
721
Roland McGrath890081b2010-02-26 17:57:50 -08007222010-02-26 Roland McGrath <roland@redhat.com>
723
724 * readelf.c (process_file): Don't leak an fd in failure case.
725
Roland McGrathc2b26f12010-02-15 15:16:15 -08007262010-02-15 Roland McGrath <roland@redhat.com>
727
Roland McGrath22359e22010-02-15 15:57:03 -0800728 * Makefile.am: Use config/eu.am for common stuff.
729
Roland McGrathc2b26f12010-02-15 15:16:15 -0800730 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
731 mismatch in comparison.
732
Roland McGrathf920fd52010-02-02 15:50:15 -08007332010-02-02 Roland McGrath <roland@redhat.com>
734
735 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
736 (read_encoded): Likewise.
737 (print_debug_frame_section): Check for bogus augmentation length.
738 For P augmentation, use read_encoded, print the encoding description,
739 and use hex for unsigned values.
740
Roland McGrathb337b1f2010-01-15 01:02:27 -08007412010-01-15 Roland McGrath <roland@redhat.com>
742
743 * ar.c: Include <sys/stat.h>.
744 * elflint.c: Likewise.
745 * readelf.c: Likewise.
746 * strip.c: Likewise.
747 * unstrip.c: Likewise
748
Roland McGrathbd733ca2010-01-07 20:11:42 -08007492010-01-07 Roland McGrath <roland@redhat.com>
750
Roland McGrath8111da02010-01-07 20:31:59 -0800751 * readelf.c (print_ehdr): Handle PN_XNUM.
752 (phnum): New static variable.
753 (process_elf_file): Set it with elf_getphdrnum.
754 (print_phdr): Use phnum instead of EHDR->e_phnum.
755 (print_dynamic, handle_notes): Likewise.
756 (handle_relocs_rel, handle_relocs_rela): Likewise.
757
Roland McGrathbd733ca2010-01-07 20:11:42 -0800758 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
759
760 * elflint.c (phnum): New static variable.
761 (check_elf_header): Set it, handling PN_XNUM.
762 Use that in place of EHDR->e_phnum throughout.
763 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
764 (unknown_dependency_p, check_sections, check_program_header): Likewise.
765
Roland McGrath019d9fb2010-01-05 13:36:07 -08007662010-01-05 Roland McGrath <roland@redhat.com>
767
768 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
769 DW_AT_GNU_template_name.
770
Roland McGrathe4061d02010-01-04 20:25:09 -08007712010-01-04 Roland McGrath <roland@redhat.com>
772
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800773 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
774 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
775 (handle_core_item): Handle .format of '\n' as \n-separated strings.
776
Roland McGrath2e79deb2010-01-04 20:36:10 -0800777 * readelf.c (implicit_debug_sections): New variable.
778 (parse_opt): Set it instead of print_debug_sections for -a.
779 OR them together for print_debug check.
780 (print_debug): OR them together for section check.
781
Roland McGratha7422be2010-01-04 20:29:33 -0800782 * readelf.c (options): Repartition into set implied by -a and others.
783 Correct -a text to match reality.
784
Roland McGrathe4061d02010-01-04 20:25:09 -0800785 * readelf.c (struct section_argument): Add bool member 'implicit'.
786 (parse_opt): Set it for -a cases, clear it for -x args.
787 (for_each_section_argument): Don't complain about a missing section by
788 name if it's implicit.
789
Roland McGrathefa64962009-11-16 01:50:58 -08007902009-11-16 Roland McGrath <roland@redhat.com>
791
792 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
793 sections, just as dump_data_section already does.
794
Mark Wielaardc49d00a2009-09-21 16:47:07 -07007952009-09-21 Ulrich Drepper <drepper@redhat.com>
796
797 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
798 set for .comment section.
799 Patch by Mark Wielaard <mjw@redhat.com>.
800
Roland McGrathfb33c672009-09-08 00:21:18 -07008012009-09-08 Roland McGrath <roland@redhat.com>
802
803 * ar.c (main): Fix typo in message format.
804
Roland McGrath2d13ea22009-08-21 03:16:32 -07008052009-08-21 Roland McGrath <roland@redhat.com>
806
807 * readelf.c (attr_callback): Use print_block only when we don't use
808 print_ops.
809
Roland McGrath536127f2009-08-14 13:10:09 -07008102009-08-14 Roland McGrath <roland@redhat.com>
811
812 * ar.c (do_oper_extract): Use pathconf instead of statfs.
813
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07008142009-08-01 Ulrich Drepper <drepper@redhat.com>
815
816 * debugpred.h: Add two most const.
817
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07008182009-07-26 Mark Wielaard <mjw@redhat.com>
819
820 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
821
Mark Wielaard79178202009-07-25 12:44:46 -07008222009-07-25 Mark Wielaard <mjw@redhat.com>
823
824 * Makefile.am (addr2line_LDADD): Add $(libelf).
825
Roland McGrathbe4589d2009-07-24 16:23:12 -07008262009-07-24 Roland McGrath <roland@redhat.com>
827
828 * readelf.c (print_block): New function.
829 (print_ops): Use it.
830 (attr_callback): Use it for DW_FORM_block* forms.
831
Mark Wielaarddaf85b22009-07-24 15:49:51 -07008322009-07-20 Mark Wielaard <mjw@redhat.com>
833
834 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
835 and DW_OP_stack_value.
836
Ulrich Drepper96d950e2009-07-14 10:42:01 -07008372009-07-14 Ulrich Drepper <drepper@redhat.com>
838
839 * elflint.c (check_elf_header): Allow Linux ABI.
840 (check_symtab): Handle STB_GNU_UNIQUE.
841
Mark Wielaardf735db12009-07-08 19:18:53 +02008422009-07-08 Mark Wielaard <mjw@redhat.com>
843
844 * readelf.c (attr_callback): Handle DW_Form constants for
845 DW_AT_data_member_location.
846
Roland McGrathdffc33d2009-07-06 16:06:41 -07008472009-07-06 Roland McGrath <roland@redhat.com>
848
849 * readelf.c (register_info): New function. Handle unknown register #s.
850 (print_cfa_program): Use it.
851 (handle_core_register, handle_core_registers): Likewise.
852
Roland McGrath5dbccdb2009-06-28 14:48:02 -07008532009-06-28 Roland McGrath <roland@redhat.com>
854
855 * readelf.c (print_address_names): New static variable.
856 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
857 (format_dwarf_addr): Don't look up name if !print_address_names.
858
Ulrich Drepperf1894932009-06-13 15:55:42 -07008592009-06-13 Ulrich Drepper <drepper@redhat.com>
860
861 * ldgeneric.c: Don't use deprecated libelf functions.
862 * nm.c: Likewise.
863 * objdump.c: Likewise.
864 * readelf.c: Likewise.
865 * size.c: Likewise.
866 * strip.c: Likewise.
867 * unstrip.c: Likewise.
868 * ld.h: Fix up comment.
869
Ulrich Drepperb47d2902009-06-01 07:38:32 -07008702009-06-01 Ulrich Drepper <drepper@redhat.com>
871
872 * readelf.c (print_relocs): Expect ELF header argument and pass on
873 to handle_relocs_rel* functions. Adjust caller.
874 (handle_relocs_rel): Add ELF header argument. Add special case for
875 the IRELATIVE relocations in statically linked executables.
876 (handle_relocs_rela): Likewise.
877
Roland McGrathdb19f0b2009-05-07 18:44:27 -07008782009-04-29 Ulrich Drepper <drepper@redhat.com>
879
880 * elflint.c (check_symtab): Add tests of st_other field.
881
Ulrich Drepperaab90f92009-04-23 07:44:36 -07008822009-04-23 Ulrich Drepper <drepper@redhat.com>
883
884 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
885
Roland McGrathd86e1832009-04-20 00:49:33 -07008862009-04-20 Roland McGrath <roland@redhat.com>
887
Roland McGrath8a592412009-04-20 01:20:44 -0700888 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
889 of inline call sites.
890
Roland McGrathd86e1832009-04-20 00:49:33 -0700891 * addr2line.c (just_section): New variable.
892 (adjust_to_section): New function, broken out of ...
893 (handle_address): ... here.
894 (options, parse_opt): Add -j/--section=NAME to set it.
895
Roland McGrath2fb90512009-04-15 14:47:13 -07008962009-04-15 Roland McGrath <roland@redhat.com>
897
898 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
899 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
900
Roland McGrath04a14162009-04-14 01:02:17 -07009012009-04-14 Roland McGrath <roland@redhat.com>
902
Roland McGratheb9ba472009-04-14 18:44:45 -0700903 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
904 like SHT_GNU_ATTRIBUTES.
905
Roland McGrath94f43832009-04-14 04:39:32 -0700906 * readelf.c (handle_core_registers): Fix error message.
907
Roland McGrath04a14162009-04-14 01:02:17 -0700908 * strip.c (handle_elf: check_preserved): Don't note any change when
909 .debug_data is already filled from a previous pass.
910
Ulrich Drepper411cdb22009-02-05 22:04:26 -08009112009-02-05 Ulrich Drepper <drepper@redhat.com>
912
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800913 * objdump.c (show_relocs_x): Minor cleanups.
914
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800915 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800916 Print first DW_CFA_expression and DW_CFA_val_expression parameter
917 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800918
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08009192009-02-01 Ulrich Drepper <drepper@redhat.com>
920
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800921 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
922 into ...
923 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800924 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800925
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800926 * objdump.c (show_relocs_rela): Show offsets as signed values.
927
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800928 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
929 Improve some error messages.
930 Use program_invocation_short_name instead of AR macro.
931 * Makefile.am (CFLAGS_ar): Remove.
932 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
933 * objdump.c (parse_opt): Likewise.
934 * readelf.c (parse_opt): Likewise.
935
Roland McGrath51f01282009-01-27 17:08:03 -08009362009-01-27 Roland McGrath <roland@redhat.com>
937
938 * readelf.c (print_ops): Notice short length, don't overrun buffer
939 (still need to fix LEB128).
940
941 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
942
943 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
944
Ulrich Drepper62c46532009-01-24 17:01:08 -08009452009-01-24 Ulrich Drepper <drepper@redhat.com>
946
947 * readelf.c (print_debug_frame_section): Fix computation of vma_base
948 for PC-relative mode.
949
Ulrich Drepperd7285e12009-01-23 16:10:44 -08009502009-01-23 Ulrich Drepper <drepper@redhat.com>
951
Ulrich Drepperccccab02009-01-23 16:32:21 -0800952 * size.c (process_file): When handling archive, close file descriptor
953 here. For unknown file format also close file descriptor.
954 (handle_ar): Don't close file descriptor here.
955
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800956 * readelf.c (parse_opt): Move code to add to dump_data_sections and
957 string_sections list in local function add_dump_section. Adjust 'x'
958 key handling. For 'a' key add .strtab, .dynstr, and .comment section
959 to string_sections list.
960
Roland McGrathe9de9b42009-01-22 13:05:40 -08009612009-01-22 Roland McGrath <roland@redhat.com>
962
Roland McGrath9a847e12009-01-22 19:55:00 -0800963 * readelf.c (print_phdr): Don't print section mapping when no sections.
964
Roland McGrathd759aa62009-01-22 19:17:07 -0800965 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
966
Roland McGrathcabeeee2009-01-22 13:17:45 -0800967 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
968 and reset it only for the 'true' cases.
969
970 * Makefile.am (addr2line_no_Wformat): New variable.
971
Roland McGrathe9de9b42009-01-22 13:05:40 -0800972 * readelf.c (print_debug_frame_section): Use t instead of j formats
973 for ptrdiff_t OFFSET.
974
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08009752009-01-21 Ulrich Drepper <drepper@redhat.com>
976
977 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800978 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800979 (check_exception_data): First sanity test.
980
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08009812009-01-17 Ulrich Drepper <drepper@redhat.com>
982
Ulrich Drepper935edde2009-01-17 16:06:42 -0800983 * readelf.c (print_debug_exception_table): Show target of ar_disp
984 field.
985
986 * elflint.c (check_program_header): Add most consistency checks for
987 PT_GNU_EH_FRAME entry.
988
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800989 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
990 ARGP_PROGRAM_BUG_ADDRESS_DEF.
991 * ar.c: Likewise.
992 * elfcmp.c: Likewise.
993 * elflint.c: Likewise.
994 * findtextrel.c: Likewise.
995 * ld.c: Likewise.
996 * nm.c: Likewise.
997 * objdump.c: Likewise.
998 * ranlib.c: Likewise.
999 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001000
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001001 * size.c: Likewise.
1002 * strings.c: Likewise.
1003 * strip.c: Likewise.
1004 * unstrip.c: Likewise.
1005
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080010062009-01-16 Ulrich Drepper <drepper@redhat.com>
1007
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001008 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1009 matches .eh_frame_hdr section, if it is available. Also check that
1010 the segment is allocated, not writable, not executable.
1011
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001012 * readelf.c: Add -e option. Dump exception and unwind related
1013 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001014 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001015 (print_debug_exception_table): Beginning of support.
1016 (print_debug): Hook up print_debug_exception_table for
1017 .gcc_except_table sections.
1018
1019 * readelf.c (print_debug_frame_section): Some fixes for last change.
1020
Ulrich Drepper351bf202009-01-15 20:18:40 -080010212009-01-15 Ulrich Drepper <drepper@redhat.com>
1022
1023 * readelf.c (print_encoding): Now a toplevel function.
1024 (print_relinfo): Likewise.
1025 (print_encoding_base): Broken out of print_debug_frame_section.
1026 (print_debug_frame_section): Print different header for .eh_frame
1027 sections. Fix recognition of matching CIEs in .debug_frame sections.
1028 Print absolute offset for PC-relative FDE locations. Don't print
1029 table header for FDEs if the table is empty.
1030 (read_encoded): New function.
1031 (print_debug_frame_hdr_section): New function.
1032 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1033 sections.
1034
1035 * readelf.c (handle_relocs_rel): Print section number.
1036 (print_debug_abbrev_section): Likewise.
1037 (print_debug_aranges_section): Likewise.
1038 (print_debug_ranges_section): Likewise.
1039 (print_debug_info_section): Likewise.
1040 (print_debug_line_section): Likewise.
1041 (print_debug_loc_section): Likewise.
1042 (print_debug_macinfo_section): Likewise.
1043 (print_debug_pubnames_section): Likewise.
1044 (print_debug_str_section): Likewise.
1045
Ulrich Drepper8b394632009-01-10 18:29:56 -080010462009-01-10 Ulrich Drepper <drepper@redhat.com>
1047
1048 * strings.c (read_block): Fix typo in error message string.
1049
Ulrich Drepper87cf5832009-01-07 20:39:21 -080010502009-01-07 Ulrich Drepper <drepper@redhat.com>
1051
1052 * ld.c (ld_new_searchdir): Fix adding to search path list.
1053
Ulrich Drepperac194d02009-01-06 00:30:01 -080010542009-01-06 Ulrich Drepper <drepper@redhat.com>
1055
1056 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001057
Roland McGrath3614d992009-01-05 18:05:32 -080010582009-01-05 Roland McGrath <roland@redhat.com>
1059
1060 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1061 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001062
Ulrich Drepper44173ed2009-01-01 19:00:41 -080010632009-01-01 Ulrich Drepper <drepper@redhat.com>
1064
1065 * addr2line.c: Update copyright year.
1066 * ar.c: Likewise.
1067 * elfcmp.c: Likewise.
1068 * elflint.c: Likewise.
1069 * findtextrel.c: Likewise.
1070 * ld.c: Likewise.
1071 * nm.c: Likewise.
1072 * objdump.c: Likewise.
1073 * ranlib.c: Likewise.
1074 * readelf.c: Likewise.
1075 * size.c: Likewise.
1076 * strings.c: Likewise.
1077 * strip.c: Likewise.
1078 * unstrip.c: Likewise.
1079
Roland McGrath468fe4d2008-12-11 21:00:12 -080010802008-12-11 Roland McGrath <roland@redhat.com>
1081
1082 * nm.c (sym_name): New function.
1083 (show_symbols_sysv): Use it in place of elf_strptr.
1084 (show_symbols_bsd, show_symbols_posix): Likewise.
1085 Fixes RHBZ#476136.
1086
1087 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1088 elf_strptr fails.
1089
Roland McGratha845f682008-12-03 03:41:58 +000010902008-12-02 Roland McGrath <roland@redhat.com>
1091
1092 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1093 nonzero OFFSET argument to dwfl_getmodules.
1094
Roland McGrath1d8bb252008-08-07 08:39:41 +000010952008-08-07 Roland McGrath <roland@redhat.com>
1096
1097 * addr2line.c (main): Pass string to handle_address.
1098 (see_one_module): New function, subroutine of handle_address.
1099 (find_symbol): Likewise.
1100 (handle_address): Take string argument rather than address.
1101 Convert plain number, or handle strings like "(section)+offset"
1102 or "symbol+offset".
1103
11042008-08-01 Roland McGrath <roland@redhat.com>
1105
1106 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1107 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1108
1109 * readelf.c (convert): Take new argument SIZE.
1110 (handle_core_register, handle_core_item): Update callers.
1111 (handle_core_item): Take new arg REPEATED_SIZE.
1112 (handle_core_items): Special case for a singleton item,
1113 let handle_core_item handle repeats if it wants to.
1114
1115 * readelf.c (handle_core_items): Give abridged output
1116 for identical groups repeated more than twice.
1117
11182008-07-04 Roland McGrath <roland@redhat.com>
1119
1120 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1121
Roland McGrath521c47d2008-04-11 07:01:58 +000011222008-04-10 Roland McGrath <roland@redhat.com>
1123
1124 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1125 refer to. Instead, just be sure to preserve the original symbol
1126 table in the debug file so those symbols go with their sections and
1127 can be elided from the stripped version of the symbol table.
1128
1129 * strip.c (handle_elf): When a discarded section kept in the debug
1130 file refers to a nondiscard section via sh_link/sh_info, preserve
1131 that nondiscarded section unmodified in the debug file as well.
1132 Skip adjustment of discarded sections symbol table references when
1133 that symbol table is copied in this way.
1134
1135 * elflint.c (check_symtab): Don't crash from missing symbol names
1136 after diagnosing bogus strtab.
1137
1138 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1139 adjustment for symtab changes.
1140
Roland McGrath13b69602008-04-01 02:30:05 +000011412008-03-31 Roland McGrath <roland@redhat.com>
1142
1143 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1144 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1145 excuse a special section.
1146
11472008-03-27 Roland McGrath <roland@redhat.com>
1148
1149 * elflint.c (check_sections): Check that executability and writability
1150 of sections is reflected in segment p_flags.
1151
Roland McGrathd11f9cb2008-03-26 20:51:59 +000011522008-03-26 Roland McGrath <roland@redhat.com>
1153
1154 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1155 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1156 is valid in RELRO.
1157
Roland McGrath47c5c352008-02-29 10:17:16 +000011582008-02-29 Roland McGrath <roland@redhat.com>
1159
1160 * readelf.c (print_attributes): Add a cast.
1161 * elflint.c (check_attributes): Likewise.
1162
1163 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1164 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1165 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1166
Ulrich Drepper834de6f2008-02-23 06:50:01 +000011672008-02-03 Ulrich Drepper <drepper@redhat.com>
1168
1169 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1170 when linked into executable.
1171 (elf_i386_create_relocations): Likewise.
1172
Roland McGrath059c83e2008-02-21 06:19:39 +000011732008-02-20 Roland McGrath <roland@redhat.com>
1174
1175 * readelf.c (print_attributes): New function.
1176 (process_elf_file): Call it under -A.
1177
1178 * elflint.c (check_attributes): Implement it for real.
1179
11802008-02-19 Roland McGrath <roland@redhat.com>
1181
1182 * elflint.c (special_sections): Handle .gnu.attributes section.
1183 (check_sections): Likewise.
1184 (check_attributes): New function.
1185
11862008-02-10 Roland McGrath <roland@redhat.com>
1187
1188 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1189 sections and ET_REL files.
1190
Ulrich Drepper712d78e2008-02-02 10:01:53 +000011912008-02-02 Ulrich Drepper <drepper@redhat.com>
1192
1193 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1194 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1195 and R_386_TLS_LE.
1196 (elf_i386_create_relocations): Likewise.
1197 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1198 elements.
1199 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1200 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1201 Fix generation of PT_GNU_STACK entry.
1202
Ulrich Drepperc54785a2008-02-01 18:05:21 +000012032008-02-01 Ulrich Drepper <drepper@redhat.com>
1204
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001205 * ld.c (replace_args): Prevent loop over replacements if the parameter
1206 is only two characters long.
1207
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001208 * ld.c: Recognize sha1 argument for --build-id parameter.
1209 * ldgeneric.c (create_build_id_section): Handle sha1.
1210 (compute_hash_sum): New function. Broken out of compute_build_id.
1211 Take hash function and context as parameters.
1212 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1213 implementation.
1214
Ulrich Drepper89759c72008-01-31 19:44:12 +000012152008-01-31 Ulrich Drepper <drepper@redhat.com>
1216
1217 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1218 * ld.c: Recognize --build-id command line parameter.
1219 * ld.h: Define scn_dot_note_gnu_build_id.
1220 (struct ld_state): Add build_id and buildidscnidx elements.
1221 * ldgeneric.c: Implement --build-id command line parameter.
1222 * ldlex.l (ID): Recognize - as valid character after the first one.
1223
Ulrich Drepper5530ec52008-01-29 10:42:07 +000012242008-01-29 Ulrich Drepper <drepper@redhat.com>
1225
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001226 * ld.c (replace_args): New function.
1227 (main): Use it to rewrite old-style parameters.
1228
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001229 * elf32-i386.script: Add .gnu.hash section.
1230 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1231 (fillin_special_symbol): Initialize st_size.
1232 (sortfct_hashval): New function.
1233 (create_gnu_hash): New function.
1234 (create_hash): New function.
1235 (ld_generic_create_outfile): Use the new functions to create the
1236 hash tables.
1237
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001238 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1239
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000012402008-01-24 Ulrich Drepper <drepper@redhat.com>
1241
1242 * elflint.c (check_group): Check that signature symbol for section
1243 group is not an empty string.
1244 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1245 section. Start implementation of --hash-style.
1246 * i386_ld.c: Likewise.
1247 * ld.c: Recognize --hash-style.
1248 * ld.h (struct scninfo): Add comdat_group.
1249 Add additional parameter to finalize_plt callback.
1250
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000012512008-01-22 Ulrich Drepper <drepper@redhat.com>
1252
1253 * ld.h (struct callbacks): Add initialize_gotplt.
1254 (struct scnhead): Add scn_dot_gotplt.
1255 (struct ld_state): Add gotpltscnidx.
1256 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1257 (elf_i386_initialize_pltrel): Likewise.
1258 (elf_i386_initialize_got): There is now a separate .got.plt, so
1259 don't do the PLT-related work here. Initialize d_type.
1260 (elf_i386_initialize_gotplt): New function.
1261 (elf_i386_plt0): Use ud2a after indirect jump.
1262 (elf_i386_pic_plt0_entry): Likewise.
1263 (elf_i386_finalize_plt): Reference now .got.plt.
1264 (elf_i386_count_relocations): For GOT entries which need no relocation
1265 don't bump nrel_got.
1266 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1267 handling for split .got/.got.plt.
1268 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1269 * elf32-i386.script: Sort sections for security. There are no .got
1270 input sections. Add .got.plt.
1271 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1272 (ld_generic_create_outfile): Initialize .got.plt section.
1273 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1274
Ulrich Drepperd9488292008-01-20 16:43:15 +000012752008-01-19 Ulrich Drepper <drepper@redhat.com>
1276
1277 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1278 symbols are not carried over into statically linked output files.
1279 Add dummy entries for more TLS relocations.
1280
1281 * ld.c (options): Add long names for -( and -).
1282
1283 * ldgeneric.c (check_definition): For newly found definitions don't
1284 mark section as used if symbol is absolute.
1285 (extract_from_archive): Only assign archive sequence number the first
1286 time the archive is handled. Update ld_state.last_archive_used
1287 if any symbol was used. Remove nround variable.
1288 (file_process2): When using symbol from an archive, update
1289 ld_state.group_start_archive, ld_state.archives, and
1290 ld_state.tailarchives.
1291 (ld_generic_file_process): If group is not handled anymore, after
1292 freeing ELF handles for the archives, clear ld_state.archives and
1293 *nextp. Fix wrong logic in recognizing first iteration of group
1294 loop. When clearing flags, also clear ld_state.group_start_archive.
1295
Ulrich Drepper5eee1222008-01-11 10:12:18 +000012962008-01-11 Ulrich Drepper <drepper@redhat.com>
1297
1298 * objdump.c (show_disasm): Adjust disassembler format string for
1299 removal of %e.
1300
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000013012008-01-04 Roland McGrath <roland@redhat.com>
1302
Roland McGrath059c83e2008-02-21 06:19:39 +00001303 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1304 a size greater than the items cover means multiple sets of items.
1305 (handle_core_note): Update caller.
1306
13072008-01-04 Roland McGrath <roland@redhat.com>
1308
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001309 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1310
13112008-01-03 Roland McGrath <roland@redhat.com>
1312
1313 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1314
1315 * elflint.c (check_dynamic): Remove duplicate initializer.
1316
Ulrich Drepperad024af2008-01-02 17:42:52 +000013172008-01-02 Ulrich Drepper <drepper@redhat.com>
1318
1319 * addr2line.c: Update copyright year.
1320 * ar.c: Likewise.
1321 * elfcmp.c: Likewise.
1322 * elflint.c: Likewise.
1323 * findtextrel.c: Likewise.
1324 * ld.c: Likewise.
1325 * nm.c: Likewise.
1326 * objdump.c: Likewise.
1327 * ranlib.c: Likewise.
1328 * readelf.c: Likewise.
1329 * size.c: Likewise.
1330 * strings.c: Likewise.
1331 * strip.c: Likewise.
1332 * unstrip.c: Likewise.
1333
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000013342007-12-30 Ulrich Drepper <drepper@redhat.com>
1335
1336 * objdump (show_disasm): Use %e after third parameter.
1337
13382007-12-21 Ulrich Drepper <drepper@redhat.com>
1339
1340 * strip.c: Fix wrong parenthesis in a few branch predictions.
1341 * strings.c: Likewise.
1342
13432007-12-20 Ulrich Drepper <drepper@redhat.com>
1344
1345 * Makefile.am (DEFS): Add DEBUGPRED.
1346 * addr2line.c: Include debugpred.h.
1347 * ar.c: Likewise.
1348 * elfcmp.c: Likewise.
1349 * elflint.c: Likewise.
1350 * findtextrel.c: Likewise.
1351 * nm.c: Likewise.
1352 * objdump.c: Likewise.
1353 * ranlib.c: Likewise.
1354 * readelf.c: Likewise.
1355 * size.c: Likewise.
1356 * strings.c: Likewise.
1357 * strip.c: Likewise.
1358 * unstrip.c: Likewise.
1359 * debugpred.h: New file.
1360
1361 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1362 (handle_relocs_rela): Likewise.
1363
1364 * readelf.c: Add lots of likely/unlikely.
1365
1366 * elflint.c: Minor cleanups.
1367
Roland McGrath1a2e8f42007-12-15 23:39:34 +000013682007-11-19 Roland McGrath <roland@redhat.com>
1369
1370 * readelf.c (print_ops): Handle all bad op codes gracefully.
1371 Print their numbers instead of just ???.
1372
Roland McGrath07a696e2007-11-09 22:44:26 +000013732007-11-09 Roland McGrath <roland@redhat.com>
1374
1375 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00001376 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1377 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1378 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1379 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00001380
Roland McGrathe4c22ea2007-10-23 13:07:39 +000013812007-10-20 Roland McGrath <roland@redhat.com>
1382
1383 * unstrip.c (options): Update -R description.
1384 (struct symbol): Put symbol details a union with a size_t pointer
1385 `duplicate'.
1386 (compare_symbols_output): Use null ->name as marker for discard
1387 symbols, not zero *->map.
1388 (copy_elided_sections): Record forwarding pointers for discarded
1389 duplicates and fill SYMNDX_MAP elements through them.
1390
1391 * readelf.c (process_file): Set offline_next_address to 0 at start.
1392 (struct process_dwflmod_args): New type.
1393 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1394 (process_file): Update caller; dup FD for passing to libdwfl.
1395 (process_elf_file): Take new arg FD. For ET_REL file when
1396 displaying data affected by libdwfl relocation, open a new Elf handle.
1397
13982007-10-17 Roland McGrath <roland@redhat.com>
1399
1400 * readelf.c (print_debug_line_section): For invalid data inside a
1401 unit with plausible length, keep printing at the next unit boundary.
1402
1403 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1404
14052007-10-16 Roland McGrath <roland@redhat.com>
1406
1407 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1408
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000014092007-10-15 Roland McGrath <roland@redhat.com>
1410
1411 * make-debug-archive.in: New file.
1412 * Makefile.am (EXTRA_DIST): Add it.
1413 (make-debug-archive): New target.
1414 (bin_SCRIPTS, CLEANFILES): Add it.
1415
14162007-10-10 Roland McGrath <roland@redhat.com>
1417
1418 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1419 Use it to check MERGE|STRINGS for .debug_str.
1420 (check_sections): Handle exact_or_gnuld.
1421
14222007-10-08 Roland McGrath <roland@redhat.com>
1423
1424 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1425 64-bit struct timeval with 32-bit tv_usec.
1426
14272007-10-07 Roland McGrath <roland@redhat.com>
1428
1429 * readelf.c (check_archive_index): New function.
1430 (process_file): Call it. Change signature to take only fd and name.
1431 Use libdwfl to open the file, then iterate on its modules (multiple
1432 for an archive) to print file name and call process_elf_file.
1433 (main): Update caller. Let process_file do elf_begin.
1434 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1435 (process_elf_file): Take only Dwfl_Module * argument.
1436 Don't print the file name here.
1437 (print_debug_*_section): Take Dwfl_Module * argument.
1438 (print_debug): Likewise. Update caller.
1439 (format_dwarf_addr): New function.
1440 (print_debug_ranges_section): Use it.
1441 (attr_callback): Likewise.
1442 (print_debug_line_section, print_debug_loc_section): Likewise.
1443
1444 * readelf.c (print_debug_ranges_section): Translate all strings.
1445 (print_debug_loc_section): Likewise.
1446
1447 * unstrip.c (copy_elided_sections): Initialize SEC.
1448
1449 * ar.c (do_oper_insert): Put trailing / on short names.
1450
1451 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1452
1453 * arlib2.c (arlib_add_long_name): Adjust for header size.
1454
1455 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1456
1457 * ar.c (do_oper_insert): Use write_retry for padding write.
1458
1459 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1460 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1461 (remember_long_name): New function.
1462 (do_oper_insert): Call it. Correctly use length of basename,
1463 not original name. Don't store long name twice for new member.
1464
14652007-10-06 Roland McGrath <roland@redhat.com>
1466
1467 * elflint.c (check_note): Skip empty segment.
1468 (check_note_section): Skip empty section.
1469
1470 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1471 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1472 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1473 (compare_alloc_sections): Take new arg REL, ignore address if true.
1474 (compare_sections): Likewise, pass it down.
1475 (compare_sections_rel, compare_sections_nonrel): New functions.
1476 (find_alloc_sections_prelink, copy_elided_sections): Use them
1477 instead of compare_sections.
1478 (sections_match): New function, broken out of ...
1479 (find_alloc_section): ... here.
1480 (copy_elided_sections): Reorganize section match-up logic.
1481 Use sections_match for SHF_ALLOC in ET_REL.
1482 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1483
1484 * unstrip.c (add_new_section_symbols): Take new arg REL.
1485 When true, do not update section symbol values.
1486 (collect_symbols): Likewise. Update section symbols with address
1487 of chosen output section, not original section.
1488 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1489
1490 * unstrip.c (compare_alloc_sections): At the same address, preserve
1491 original section order.
1492
1493 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1494 .debug_str, it didn't always have them with older tools.
1495
1496 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1497
14982007-10-05 Roland McGrath <roland@redhat.com>
1499
1500 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1501 ET_REL file.
1502
1503 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1504 SHN_UNDEF as "bad section". Use shndx value in messages.
1505
1506 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1507 for ".debug" so it matches as a prefix.
1508 (IS_KNOWN_SPECIAL): New macro.
1509 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1510 type even under -d, for a .debug* or .shstrtab section.
1511
1512 * readelf.c (print_ops): Use hex for address operand.
1513
15142007-10-04 Roland McGrath <roland@redhat.com>
1515
1516 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1517 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1518 sections mapped to SHN_UNDEF.
1519
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000015202007-10-04 Ulrich Drepper <drepper@redhat.com>
1521
1522 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1523 variable with older glibc versions.
1524 Add some branch prediction.
1525
Roland McGrath59ea7f32007-10-04 08:50:09 +000015262007-10-04 Roland McGrath <roland@redhat.com>
1527
1528 * readelf.c (print_archive_index): New variable.
1529 (options, parse_opt): Accept -c/--archive-index to set it.
1530 (dump_archive_index): New function.
1531 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1532 Call dump_archive_index on archives if set.
1533 (main): Update caller.
1534 (any_control_option): Give it file scope, moved out of ...
1535 (parse_opt): ... here.
1536
15372007-10-03 Roland McGrath <roland@redhat.com>
1538
1539 * unstrip.c (struct arg_info): Add `list' flag.
1540 (options, parse_opt): Grok -n/--list to set it.
1541 (list_module): New function.
1542 (handle_implicit_modules): Call it under -n.
1543
1544 * elflint.c (check_note_section): New function.
1545 (check_sections): Call it for SHT_NOTE.
1546
1547 * readelf.c (handle_notes): Use sections when available.
1548
1549 * elflint.c (check_note_data): New function, broken out of ...
1550 (check_note): ... here. Call it and elf_getdata_rawchunk.
1551
1552 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1553 Use elf_getdata_rawchunk and gelf_getauxv.
1554 (handle_notes_data): New function, broken out of ...
1555 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1556
Roland McGrath241ac022007-10-01 18:21:46 +000015572007-10-01 Roland McGrath <roland@redhat.com>
1558
Roland McGrathac0a16c2007-10-01 18:50:35 +00001559 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1560
Roland McGrath241ac022007-10-01 18:21:46 +00001561 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1562
Roland McGrathc76f0b02007-09-27 07:31:33 +000015632007-09-10 Roland McGrath <roland@redhat.com>
1564
1565 * readelf.c (options): Give -p optional argument, alias --string-dump.
1566 (string_sections, string_sections_tail): New static variables.
1567 (parse_opt): Set them when -p has an argument.
1568 (print_string_section): New function, broken out of ...
1569 (print_strings): ... here. Call it.
1570 (dump_data_section): New function, broken out of ...
1571 (dump_data): ... here. Call it.
1572 (for_each_section_argument): New function, broken out of ...
1573 (dump_data): ... here. Call it.
1574 (dump_strings): New function.
1575
15762007-08-31 Roland McGrath <roland@redhat.com>
1577
1578 * readelf.c (print_strings): Typo fix.
1579
Roland McGrathcb6d8652007-08-23 08:10:54 +000015802007-08-23 Roland McGrath <roland@redhat.com>
1581
1582 * readelf.c (printf_with_wrap): Function removed.
1583 (REGISTER_WRAP_COLUMN): New macro.
1584 (handle_core_register): Use print_core_item instead.
1585 (struct register_info): New type.
1586 (compare_registers, compare_register_sets): New functions.
1587 (register_bitpos, compare_sets_by_info): New functions.
1588 (handle_core_registers): Use those to segregate and sort registers
1589 for display.
1590
1591 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1592 (print_core_item): New function.
1593 (handle_core_item): Use it instead of printf_with_wrap.
1594 (compare_core_items, compare_core_item_groups): New functions.
1595 (handle_core_items): Use them. Sort by group and force line breaks
1596 between groups.
1597
1598 * readelf.c (handle_core_registers, handle_core_items): New functions,
1599 broken out of ...
1600 (handle_core_note): ... here. Call them.
1601
16022007-08-22 Roland McGrath <roland@redhat.com>
1603
1604 * unstrip.c (new_shstrtab): New function, broken out of ...
1605 (copy_elided_sections): ... here.
1606
16072007-08-20 Roland McGrath <roland@redhat.com>
1608
1609 Avoid local function trampolines in nm binary.
1610 * nm.c (sort_by_address): Move to a static function instead of local
1611 inside show_symbols.
1612 (sort_by_name_strtab): New static variable.
1613 (sort_by_name): Use it. Move to a static function instead of local
1614 inside show_symbols.
1615 (show_symbols): Set sort_by_name_strtab.
1616
16172007-08-19 Roland McGrath <roland@redhat.com>
1618
1619 * readelf.c (handle_auxv_note): New function.
1620 (handle_notes): Call it.
1621
1622 * readelf.c (printf_with_wrap, convert): New functions.
1623 (handle_core_item, (handle_core_register): New functions.
1624 (handle_notes): Call those with details from ebl_core_note.
1625
Roland McGrath099dd522007-08-13 22:58:36 +000016262007-08-12 Roland McGrath <roland@redhat.com>
1627
1628 * elflint.c (check_note): Accept type 0 with name "Linux".
1629
1630 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1631
1632 * elflint.c (section_flags_string): Return "none" for 0, not "".
1633
Roland McGrathd8221722007-08-11 21:18:09 +000016342007-08-11 Roland McGrath <roland@redhat.com>
1635
1636 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1637
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000016382007-08-04 Ulrich Drepper <drepper@redhat.com>
1639
1640 * readelf.c (hex_dump): Use isprint to determine whether to print
1641 character itself or full stop character.
1642 (dump_data): No need to check endp for NULL after strtol call.
1643
Roland McGrath60fc84c2007-08-03 21:59:15 +000016442007-08-03 Roland McGrath <roland@redhat.com>
1645
1646 * readelf.c (print_string_sections): New variable.
1647 (options, parse_opt): Handle --strings/-p to set it.
1648 (print_strings): New function.
1649 (process_elf_file): Call it under -p.
1650
1651 * readelf.c (options): Add hidden aliases --segments, --sections,
1652 as taken by binutils readelf.
1653
16542007-08-01 Roland McGrath <roland@redhat.com>
1655
1656 * readelf.c (dump_data_sections, dump_data_sections_tail):
1657 New variables.
1658 (options, parse_opt): Handle --hex-dump/-x, set them.
1659 (hex_dump): New function.
1660 (dump_data): New function, call it.
1661 (process_elf_file): Call it.
1662
16632007-07-25 Roland McGrath <roland@redhat.com>
1664
1665 * addr2line.c (show_symbols): New variable.
1666 (print_addrsym): New function.
1667 (handle_address): Call it.
1668 (options, parse_opt): Handle -S/--symbols.
1669
Ulrich Drepperb0243862007-06-06 00:09:36 +000016702007-06-05 Ulrich Drepper <drepper@redhat.com>
1671
1672 * addr2line.c: Update for latest autoconf header.
1673 * ar.c: Likewise.
1674 * elfcmp.c: Likewise.
1675 * elflint.c: Likewise.
1676 * findtextrel.c: Likewise.
1677 * ld.c: Likewise.
1678 * ldgeneric.c: Likewise.
1679 * nm.c: Likewise.
1680 * objdump.c: Likewise.
1681 * ranlib.c: Likewise.
1682 * readelf.c: Likewise.
1683 * size.c: Likewise.
1684 * strings.c: Likewise.
1685 * strip.c: Likewise.
1686 * unstrip.c: Likewise.
1687
Roland McGrath9aa8ef72007-05-18 08:59:43 +000016882007-05-18 Roland McGrath <roland@redhat.com>
1689
1690 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1691 stripped file, so as not to duplicate a section copied in both.
1692
1693 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1694
16952007-05-17 Roland McGrath <roland@redhat.com>
1696
1697 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1698
1699 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1700
1701 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1702 call make_directories here.
1703 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1704 (handle_dwfl_module): Likewise.
1705 (handle_implicit_modules): Update callers.
1706 (handle_output_dir_module): Likewise. Don't do make_directories here.
1707
1708 * unstrip.c (get_section_name): New function, broken out of ...
1709 (copy_elided_sections): here. Update callers.
1710 (find_alloc_section): Broken out of ...
1711 (copy_elided_sections): ... here. Update caller.
1712 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1713 update STT_SECTION symbols' st_value fields as a side effect.
1714 (check_symtab_section_symbols): Update caller.
1715 (add_new_section_symbols): Set st_value in symbols added.
1716 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1717 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1718 from .bss to .dynbss.
1719 (find_alloc_sections_prelink): New function. Associate debug file
1720 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1721 .gnu.prelink_undo information.
1722 (copy_elided_sections): Call it when we couldn't find every allocated
1723 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1724 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1725 (handle_file): Update callers.
1726
1727 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1728 named ".comment".
1729
1730 * elflint.c (check_sections): Fix association of segments with
1731 sections when p_memsz > p_filesz.
1732
17332007-04-29 Roland McGrath <roland@redhat.com>
1734
1735 * addr2line.c (options, main): Tweak argp group settings to fix
1736 usage output.
1737
17382007-04-28 Roland McGrath <roland@redhat.com>
1739
1740 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1741 sizes to match sections adjusted in the stripped file.
1742
Roland McGrath4be15242007-04-25 03:09:33 +000017432007-04-24 Roland McGrath <roland@redhat.com>
1744
1745 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1746 (hash_inexact): New variable.
1747 (options, parse_opt): Add --hash-inexact option to set it.
1748 (hash_content_equivalent): New function.
1749 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1750
17512007-04-23 Roland McGrath <roland@redhat.com>
1752
1753 * unstrip.c: New file.
1754 * Makefile.am (bin_PROGRAMS): Add it.
1755 (unstrip_LDADD): New variable.
1756
1757 * strip.c (options): Allow --output for -o.
1758
Ulrich Drepper8b383102007-02-16 00:31:57 +000017592007-02-15 Ulrich Drepper <drepper@redhat.com>
1760
1761 * readelf.c: Remove unused code. Add a few consts.
1762
Ulrich Drepper903c1162007-02-15 19:40:37 +000017632007-02-15 Roland McGrath <roland@redhat.com>
1764
1765 * readelf.c (print_debug): Fix brainos in SHDR test.
1766
Roland McGrathf82a1ec2007-02-06 04:47:44 +000017672007-02-05 Roland McGrath <roland@redhat.com>
1768
1769 * ar.c: Include <limits.h>, since we use LONG_MAX.
1770
Ulrich Drepper0fe63532007-02-05 21:05:51 +000017712007-02-05 Ulrich Drepper <drepper@redhat.com>
1772
Ulrich Drepper8b383102007-02-16 00:31:57 +00001773 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001774 ignore fchown's return value.
1775 (do_oper_insert): Handle error when writing padding.
1776 * ranlib.c: Add fchown complain work around.
1777
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001778 * arlib.c: Make symtab a global variable. Change all users.
1779 * arlib2.c: Likewise.
1780 * ranlib.c: Likewise.
1781 * ar.c: Likewise.
1782 * arlib.h: Declare it.
1783
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000017842007-01-11 Roland McGrath <roland@redhat.com>
1785
1786 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1787 SHF_MASKPROC bits separately from generic sh_flags validation.
1788
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000017892007-02-04 Ulrich Drepper <drepper@redhat.com>
1790
1791 * ar.c: New file.
1792 * arlib.c: New file.
1793 * arlib2.c: New file.
1794 * arlib.h: New file.
1795 * Makefile (noinst_LIBRARIES): Add libar.
1796 (libar_a_SOURCES): Define.
1797 (ar_LDADD): Define.
1798 (CFLAGS_ar): Define.
1799 * ranlib.c: Change to use arlib.
1800
1801 * elflint.c (check_symtab): Work around GNU ld bug which omits
1802 sections but not symbols in those sections.
1803
Ulrich Drepperb770cf92007-01-10 21:02:34 +000018042007-01-10 Ulrich Drepper <drepper@redhat.com>
1805
1806 * addr2line.c: Update copyright year.
1807 * elfcmp.c: Likewise.
1808 * elflint.c: Likewise.
1809 * findtextrel.c: Likewise.
1810 * ld.c: Likewise.
1811 * nm.c: Likewise.
1812 * objdump.c: Likewise.
1813 * ranlib.c: Likewise.
1814 * readelf.c: Likewise.
1815 * size.c: Likewise.
1816 * strings.c: Likewise.
1817 * strip.c: Likewise.
1818
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000018192006-12-09 Ulrich Drepper <drepper@redhat.com>
1820
1821 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1822 two hash tables have different content (module expected omission
1823 of undefined symbols).
1824
Roland McGrath8190db62006-12-17 23:56:51 +000018252006-10-31 Roland McGrath <roland@redhat.com>
1826
1827 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001828 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001829
18302006-09-19 Jakub Jelinek <jakub@redhat.com>
1831
1832 * strip.c (process_file): Disallow -f on archives.
1833
18342006-10-09 Roland McGrath <roland@redhat.com>
1835
1836 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1837
Roland McGrathc373d852006-10-10 00:25:21 +000018382006-08-29 Roland McGrath <roland@redhat.com>
1839
1840 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1841
1842 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1843 Reported by Christian Aichinger <Greek0@gmx.net>.
1844
1845 * elflint.c (valid_e_machine): Add EM_ALPHA.
1846 Reported by Christian Aichinger <Greek0@gmx.net>.
1847
Ulrich Drepper231c5902006-08-08 22:00:11 +000018482006-08-08 Ulrich Drepper <drepper@redhat.com>
1849
1850 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1851 Keep track of which "high DT" entries are present.
1852 Check that either old or GNU-style hash table is present.
1853 If GNU-style hash table is used a symbol table is mandatory.
1854 Check that if any prelink entry is present all of them are.
1855 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1856 table if they don't refer to functions.
1857
Roland McGrath858b1892006-07-17 08:41:15 +000018582006-07-17 Roland McGrath <roland@redhat.com>
1859
1860 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1861 (add_version): Likewise for argument.
1862 (check_versym): Cast constant to GElf_Versym for comparison.
1863
Roland McGrath4ec807e2006-07-13 03:59:46 +000018642006-07-12 Roland McGrath <roland@redhat.com>
1865
1866 * readelf.c (handle_gnu_hash): Add casts for machines where
1867 Elf32_Word != unsigned int.
1868
Ulrich Drepperdcf61602006-07-12 19:59:02 +000018692006-07-12 Ulrich Drepper <drepper@redhat.com>
1870
1871 * elflint.c (check_sysv_hash64): Fix printf format.
1872
Ulrich Dreppercc415622006-07-12 19:42:23 +000018732006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001874
Ulrich Dreppercc415622006-07-12 19:42:23 +00001875 * addr2line.c (options): English fix in -f doc string.
1876
1877 * addr2line.c (use_comp_dir): New variable.
1878 (options, parse_opt): Grok -A/--absolute to set it.
1879 (handle_address): If set, prepend dwfl_line_comp_dir results to
1880 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001881
Ulrich Drepper28ed8952006-07-07 03:43:47 +000018822006-07-06 Ulrich Drepper <drepper@redhat.com>
1883
1884 * elflint.c: Adjust for latest new hash table format.
1885 * readelf.c: Likewise.
1886
1887 * elflint.c (check_versym): Ignore hidden bit when comparing version
1888 numbers.
1889
18902006-07-05 Ulrich Drepper <drepper@redhat.com>
1891
1892 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1893 discarded COMDAT symbols.
1894
1895 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1896 (elf_i386_create_relocations): Likewise.
1897 * ld.h (struct symbol): Add local and hidden bits.
1898 * ld.c (create_special_section_symbol): These synthsized symbols
1899 are local and hidden.
1900 * ldgeneric.c (file_process2): Check whether input file matches
1901 the emulation.
1902 (fillin_special_symbol): Create symbols as local and/or hidden
1903 if requested.
1904 (ld_generic_create_outfile): Make local copy of symbol.
1905 Don't hide global, defined symbols in dynamic symbol table unless
1906 requested. Synthetic symbols have no version information.
1907
1908 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1909 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1910
19112006-07-04 Ulrich Drepper <drepper@redhat.com>
1912
1913 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1914 testing.
1915
19162006-07-03 Ulrich Drepper <drepper@redhat.com>
1917
1918 * elflint.c: Add testing of DT_GNU_HASH.
1919 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1920
1921 * Makefile.am: Add hacks to create dependency files for non-generic
1922 linker.
1923
Ulrich Drepper6ca46002006-06-12 22:40:23 +000019242006-06-12 Ulrich Drepper <drepper@redhat.com>
1925
1926 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1927 section if creating a DSO and no interpreter is given.
1928 (ld_generic_create_outfile): Don't store reference to symbols in
1929 discarded COMDAT groups. Don't create PHDR and INTERP program header
1930 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001931 (create_verneed_data): Pretty printing.
1932
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001933 * ldscript.y (content): If a DSO is created don't set default
1934 interpreter from linker script.
1935
1936 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1937 for symbols in discarded COMDAT groups.
1938 (elf_i386_create_relocations): Likewise.
1939 * ld.h (struct scninfo): Add unused_comdat.
1940 * ldgeneric.c (add_section): Also check group signature when
1941 matching COMDAT sections.
1942 (add_relocatable_file): Ignore symbols in COMDAT group which are
1943 discarded.
1944
1945 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1946 and symbol reference.
1947
Ulrich Drepper54f33a72006-06-11 09:07:37 +000019482006-06-11 Ulrich Drepper <drepper@redhat.com>
1949
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001950 * elflint.c (check_dynamic): Fix checking value of tags which are
1951 offsets in the string section. Make sure DT_STRTAB points to the
1952 section referenced in sh_link.
1953
1954 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1955
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001956 * ld.c: Recognize --eh-frame-hdr option.
1957 * ld.h (struct ld_state): Add eh_frame_hdr field.
1958 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1959
1960 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1961 SH_FLAGS_COMBINE.
1962 (add_relocatable_file): Minor optimization of last change.
1963 (match_section): Don't preserve SHF_GROUP flag any longer.
1964
Ulrich Drepper2d880282006-06-11 00:20:43 +000019652006-06-10 Ulrich Drepper <drepper@redhat.com>
1966
1967 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001968 Handle record and ignore as position dependent options.
1969 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001970 * ld.h (struct ld_state): Add execstack field.
1971 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1972 sections.
1973 (ld_generic_create_outfile): Fix program header creation in native
1974 linker. Add PT_GNU_STACK program header.
1975
Ulrich Dreppera688a732006-06-10 06:33:00 +000019762006-06-09 Ulrich Drepper <drepper@redhat.com>
1977
1978 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1979 for PLT entries if there is no local definition.
1980
1981 * ld.c (parse_option): Handle -z ignore like --as-needed and
1982 -z record like --no-as-needed.
1983 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1984 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1985 looping over DSOs. When deciding about adding DT_NEEDED entries
1986 use ->as_needed instead of ignore_unused_dsos.
1987
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000019882006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001989
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001990 * ld.c: Recognize --as-needed and --no-as-needed options.
1991 * ld.h (struct usedfile): Add as_needed field.
1992 (struct ld_state): Likewise.
1993 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1994 the list.
1995 * ldscript.y (filename_id_list): Split to correctly parse all
1996 combinations.
1997 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001998
Ulrich Drepper697f4db2006-06-10 06:50:47 +000019992006-05-28 Ulrich Drepper <drepper@redhat.com>
2000
2001 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2002 and colno.
2003
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000020042006-05-27 Ulrich Drepper <drepper@redhat.com>
2005
2006 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002007 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002008
Ulrich Drepper82c345d2006-04-04 22:07:54 +000020092006-04-04 Ulrich Drepper <drepper@redhat.com>
2010
2011 * addr2line.c: Update copyright year.
2012 * elfcmp.c: Likewise.
2013 * elflint.c: Likewise.
2014 * findtextrel.c: Likewise.
2015 * ld.c: Likewise.
2016 * nm.c: Likewise.
2017 * objdump.c: Likewise.
2018 * ranlib.c: Likewise.
2019 * readelf.c: Likewise.
2020 * size.c: Likewise.
2021 * strings.c: Likewise.
2022 * strip.c: Likewise.
2023
Roland McGrathdd7e22b2006-03-09 23:05:47 +000020242006-03-09 Roland McGrath <roland@redhat.com>
2025
2026 * Makefile.am (AM_LDFLAGS): New variable.
2027
Roland McGrath060fa052006-03-02 07:51:50 +000020282006-03-01 Roland McGrath <roland@redhat.com>
2029
2030 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2031 for dwarf.h changes matching 3.0 spec.
2032 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2033
Ulrich Drepper038129b2005-12-04 16:47:24 +000020342005-12-04 Ulrich Drepper <drepper@redhat.com>
2035
2036 * elflint.c (check_one_reloc): If relocation section is not loaded,
2037 don't check whether the relocations modify read-only sections or
2038 loaded and unloaded sections.
2039
Ulrich Drepper607e0542005-12-04 15:51:06 +000020402005-11-28 Ulrich Drepper <drepper@redhat.com>
2041
2042 * elflint.c (check_one_reloc): Take additional parameters. Use
2043 them to determine whether relocation is valid in this type of
2044 file. DSOs and executables can contain relocation sections in
2045 unloaded sections which just show the relocations the linker
2046 applied. Adjust all callers.
2047 (check_program_header): Check that PT_PHDR is loaded and that offset
2048 matches the one in the ELF header.
2049
Roland McGrath6724c902005-10-28 07:07:19 +000020502005-10-26 Roland McGrath <roland@redhat.com>
2051
2052 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2053
Ulrich Drepperd0449522005-09-03 07:23:52 +000020542005-09-03 Ulrich Drepper <drepper@redhat.com>
2055
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002056 * strip.c (handle_elf): Unify some error messages.
2057 * ld.c (main): Likewise.
2058 * ldgeneric.c (open_elf): Likewise.
2059 * elfcmp.c (main): Likewise.
2060 * elflint.c (check_elf_header): Likewise.
2061
2062 * size.c (process_file): Fix typo in error message.
2063
Ulrich Drepperd0449522005-09-03 07:23:52 +00002064 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2065
Ulrich Dreppera60501e2005-09-02 19:50:17 +000020662005-09-02 Ulrich Drepper <drepper@redhat.com>
2067
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002068 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002069 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002070
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000020712005-08-28 Ulrich Drepper <drepper@redhat.com>
2072
2073 * ranlib.c: Don't define pread_retry and write_retry here.
2074
2075 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2076 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2077
2078 * strings.c (process_chunk): Reorder expressions in conditional
2079 (process_chunk_mb): Likewise.
2080
2081 * strings.c: New file.
2082 * Makefile.am (bin_PROGRAMS): Add strings.
2083 (strings_no_Wstring): Define.
2084 (strings_LDADD): Define.
2085
Roland McGrath71e15a02005-08-27 10:33:26 +000020862005-08-27 Roland McGrath <roland@redhat.com>
2087
2088 * addr2line.c (dwarf_diename_integrate): Function removed.
2089 (print_dwarf_function): Use plain dwarf_diename.
2090
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000020912005-08-24 Ulrich Drepper <drepper@redhat.com>
2092
2093 * elflint.c (check_versym): Versioned symbols should not have
2094 local binding.
2095
Ulrich Drepper5d832292005-08-15 21:36:27 +000020962005-08-15 Ulrich Drepper <drepper@redhat.com>
2097
Ulrich Drepper61655e02005-08-16 04:23:02 +00002098 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2099 undefined.
2100
Ulrich Drepper5d832292005-08-15 21:36:27 +00002101 * Makefile.am: Add rules to build ranlib.
2102 * ranlib.c: New file.
2103
Roland McGrath18e13422005-08-15 08:01:25 +000021042005-08-14 Roland McGrath <roland@redhat.com>
2105
2106 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2107 sh_type it recognizes.
2108
2109 * elflint.c (check_sections): Print unknown flags in hex, don't
2110 truncate high bits. Print section number and name for unknown type.
2111
Roland McGrathf6895042005-08-13 20:56:52 +000021122005-08-13 Roland McGrath <roland@redhat.com>
2113
2114 * elflint.c (check_program_header): Use ebl_segment_type_name and
2115 allow any p_type it recognizes. Include p_type value in error
2116 message for unknown type.
2117
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000021182005-08-13 Ulrich Drepper <drepper@redhat.com>
2119
2120 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2121 to ebl_check_special_symbol.
2122 (check_sections): Pass ehdr to ebl_bss_plt_p.
2123
Roland McGrath653d3762005-08-13 01:59:10 +000021242005-08-12 Roland McGrath <roland@redhat.com>
2125
2126 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2127 refers to the right section if it's not SHN_ABS.
2128 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2129
2130 * elflint.c (check_sections): Don't complain about a non-NOBITS
2131 section taking no segment space, if it's sh_size is 0.
2132
2133 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2134 be PROGBITS or NOBITS.
2135
2136 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2137 standard st_value and st_size checks.
2138
Roland McGrath1c83bf12005-08-11 07:03:55 +000021392005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002140
Roland McGrath1c83bf12005-08-11 07:03:55 +00002141 * addr2line.c (options, parse_opt): Don't handle -e here.
2142 (executable): Variable removed.
2143 (argp_children): New static variable.
2144 (argp): Use it. Make const.
2145 (main): Fill in argp_children from dwfl_standard_argp ().
2146 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2147 (print_dwarf_function): New function. Try to figure out inline chain.
2148 (elf_getname): Function removed, libdwfl does it for us.
2149 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2150 Use dwfl_module_addrname instead of elf_getname.
2151 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2152 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2153
21542005-08-10 Ulrich Drepper <drepper@redhat.com>
2155
2156 * strip.c (parse_opt): STATE parameter is now used.
2157 Various little cleanups.
2158
2159 * readelf.c (print_debug_line_section): Correct fallout of renaming
2160 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002161
Roland McGrath8f31c2c2005-08-09 04:58:05 +000021622005-08-08 Roland McGrath <roland@redhat.com>
2163
2164 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2165 with binutils strip. Likewise -d, -S, as aliases for -g.
2166 Likewise ignore -s/--strip-all.
2167
Roland McGrath095a01b2005-08-08 03:49:35 +000021682005-08-07 Roland McGrath <roland@redhat.com>
2169
2170 * strip.c (process_file): Open read-only when using a different output
2171 file.
2172
Ulrich Drepper47be7952005-08-07 04:41:39 +000021732005-08-06 Ulrich Drepper <drepper@redhat.com>
2174
Ulrich Drepper637963b2005-08-07 05:33:07 +00002175 * elflint.c (in_nobits_scn): New function.
2176 (check_versym): Allow references for defined symbols against versions
2177 of other DSOs also for symbols in nobits sections.
2178 Move a few variables around.
2179
Ulrich Drepper47be7952005-08-07 04:41:39 +00002180 * Makefile.am (AM_CFLAGS): Avoid duplication.
2181 Link with statis libs if BUILD_STATIC.
2182
Ulrich Drepperdbace232005-08-06 01:37:23 +000021832005-08-05 Ulrich Drepper <drepper@redhat.com>
2184
2185 * elflint.c: Many, many more tests. Mostly related to symbol
2186 versioning. Those sections should now be completely checked.
2187
2188 * readelf.c (print_dynamic): Use gelf_offscn.
2189
Ulrich Drepperacb89832005-08-04 07:01:49 +000021902005-08-04 Ulrich Drepper <drepper@redhat.com>
2191
2192 * elflint.c: Add lots more tests: more extension symbol table sanity,
2193 versioning section tests, hash table tests. General cleanup.
2194
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000021952005-08-02 Ulrich Drepper <drepper@redhat.com>
2196
Ulrich Drepper8a687742005-08-03 02:24:12 +00002197 * objdump.c: New file.
2198 * Makefile.am (bin_PROGRAMS): Add objdump.
2199 (objdump_LDADD): Define.
2200
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002201 * elflint.c (check_reloc_shdr): New function split out from check_rela
2202 and check_rel.
2203 (check_one_reloc): New function. Likewise.
2204 (check_rela): Use check_reloc_shdr and check_one_reloc.
2205 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002206 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2207 section.
2208 Add checks that relocations against read-only segments are flagged,
2209 that the text relocation flag is not set unnecessarily, and that
2210 relocations in one section are either against loaded or not-loaded
2211 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002212
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000022132005-08-01 Ulrich Drepper <drepper@redhat.com>
2214
2215 * elfcmp.c (main): Ignore section count and section name string table
2216 section index.
2217
Roland McGrathf9ece8a2005-07-28 07:03:04 +000022182005-07-27 Roland McGrath <roland@redhat.com>
2219
2220 * elfcmp.c: Include <locale.h>.
2221
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000022222005-07-27 Ulrich Drepper <drepper@redhat.com>
2223
2224 * elfcmp.c: Print name and index of differing section.
2225
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000022262005-07-24 Ulrich Drepper <drepper@redhat.com>
2227
2228 * elfcmp.c: Implement comparing gaps between sections.
2229
22302005-07-23 Ulrich Drepper <drepper@redhat.com>
2231
2232 * elflint.c: Include libeblP.h instead of libebl.h.
2233 * nm.c: Likewise.
2234 * readelf.c: Likewise.
2235 * elfcmp.c: Likewise.
2236
2237 * elfcmp.c (main): Compare individual ELF header fields, excluding
2238 e_shoff instead of the whole struct at once.
2239 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2240 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2241
22422005-07-22 Ulrich Drepper <drepper@redhat.com>
2243
2244 * elfcmp.c (main): Take empty section into account when comparing
2245 section content.
2246
2247 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2248 using it.
2249
22502005-07-21 Ulrich Drepper <drepper@redhat.com>
2251
2252 * elfcmp.c: New file.
2253 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2254 (elfcmp_LDADD): Define.
2255
2256 * elflint.c (check_rela): Check that copy relocations only reference
2257 object symbols or symbols with unknown type.
2258 (check_rel): Likewise.
2259
22602005-06-08 Roland McGrath <roland@redhat.com>
2261
2262 * readelf.c (print_ops): Add consts.
2263
22642005-05-31 Roland McGrath <roland@redhat.com>
2265
2266 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2267 abbreviations. Print a header line before each CU section.
2268
2269 * readelf.c (print_debug_loc_section): Fix indentation for larger
2270 address size.
2271
22722005-05-30 Roland McGrath <roland@redhat.com>
2273
2274 * readelf.c (print_debug_line_section): Print section offset of each
2275 CU's table, so they are easy to find from seeing the stmt_list value.
2276
2277 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2278 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2279
2280 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2281 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2282
2283 * readelf.c (print_ops): Take different args for indentation control.
2284 (attr_callback): Caller updated.
2285 Grok several more block-form attributes as being location expressions.
2286 For those same attributes with udata forms, format output differently
2287 for location list offset.
2288 (print_debug_loc_section): Implement it for real.
2289
2290 * readelf.c (options): Mention ranges for --debug-dump.
2291 (enum section_e): Add section_ranges.
2292 (parse_opt): Grok "ranges" for -w/--debug-dump.
2293 (print_debug_ranges_section): New function.
2294 (print_debug): Handle .debug_ranges section.
2295
22962005-05-30 Ulrich Drepper <drepper@redhat.com>
2297
2298 * readelf.c (handle_notes): At least x86-64 need not have the note
2299 section values aligned to 8 bytes.
2300
23012005-05-18 Ulrich Drepper <drepper@redhat.com>
2302
2303 * readelf.c (dwarf_tag_string): Add new tags.
2304
23052005-05-08 Roland McGrath <roland@redhat.com>
2306
2307 * strip.c (handle_elf): Don't translate hash and versym data formats,
2308 elf_getdata already did it for us.
2309
23102005-05-07 Ulrich Drepper <drepper@redhat.com>
2311
2312 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2313 (addr2line_LDADD): Likewise.
2314
23152005-05-03 Roland McGrath <roland@redhat.com>
2316
2317 * strip.c (handle_elf): Apply symbol table fixups to discarded
2318 relocation sections when they are being saved in the debug file.
2319
2320 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2321 and gelf_xlatetof, not the native byte order.
2322
2323 * strip.c (parse_opt): Give error if -f or -o is repeated.
2324 (main): Exit if argp_parse returns nonzero.
2325
2326 * strip.c (debug_fname_embed): New variable.
2327 (options, parse_opt): New option -F to set it.
2328
23292005-05-07 Ulrich Drepper <drepper@redhat.com>
2330
2331 * readelf.c (parse_opt): Make any_control_option variable
2332 local. Simplify some tests.
2333
23342005-05-03 Roland McGrath <roland@redhat.com>
2335
2336 * strip.c (crc32_file): Function removed (now in ../lib).
2337
23382005-05-03 Roland McGrath <roland@redhat.com>
2339
2340 * elflint.c (is_debuginfo): New variable.
2341 (options, parse_opt): New option --debuginfo/-d to set it.
2342 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2343 (check_note): If is_debuginfo, don't try to get note contents.
2344
23452005-04-24 Ulrich Drepper <drepper@redhat.com>
2346
2347 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2348 section reached.
2349
23502005-04-14 Ulrich Drepper <drepper@redhat.com>
2351
2352 * readelf.c (dwarf_encoding_string): New function.
2353 (dwarf_inline_string): New function.
2354 (dwarf_access_string): New function.
2355 (dwarf_visibility_string): New function.
2356 (dwarf_virtuality_string): New function.
2357 (dwarf_identifier_case_string): New function.
2358 (dwarf_calling_convention_string): New function.
2359 (dwarf_ordering_string): New function.
2360 (dwarf_discr_list_string): New function.
2361 (attr_callback): Decode man more attribute values.
2362
23632005-04-01 Ulrich Drepper <drepper@redhat.com>
2364
2365 * addr2line.c: Finish implementation of -f option.
2366
23672005-03-29 Ulrich Drepper <drepper@redhat.com>
2368
2369 * addr2line.c: New file.
2370 * Makefile.am (bin_PROGRAMS): Add addr2line.
2371 Define addr2line_LDADD.
2372
2373 * findtextrel.c: Use new dwarf_addrdie function.
2374
2375 * findtextrel.c: Fix usage message and re-add accidentally removed
2376 line.
2377
23782005-03-28 Ulrich Drepper <drepper@redhat.com>
2379
2380 * findtextrel.c: New file.
2381 * Makefile: Add rules to build findtextrel.
2382
23832005-02-15 Ulrich Drepper <drepper@redhat.com>
2384
2385 * ldlex.l: Provide ECHO definition to avoid warning.
2386
2387 * elflint.c (check_program_header): Fix typo in RELRO test.
2388
2389 * Makefile.am (AM_CFLAGS): Add more warning options.
2390 * elflint.c: Fix warnings introduced by the new warning options.
2391 * i386_ld.c: Likewise.
2392 * ld.c: Likewise.
2393 * ld.h: Likewise.
2394 * ldgeneric.c: Likewise.
2395 * nm.c: Likewise.
2396 * readelf.c: Likewise.
2397 * sectionhash.c: Likewise.
2398 * size.c: Likewise.
2399 * string.c: Likewise.
2400
24012005-02-05 Ulrich Drepper <drepper@redhat.com>
2402
2403 * Makefile.am: Check for text relocations in constructed DSOs.
2404
2405 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2406 with -lmudflap.
2407
2408 * ldscript.y: Add as_needed handling.
2409 * ldlex.l: Recognize AS_NEEDED token.
2410 * ld.h (struct filename_list): Add as_needed flag.
2411
24122005-02-04 Ulrich Drepper <drepper@redhat.com>
2413
2414 * elflint.c (check_symtab): Correctly determine size of GOT section.
2415
24162005-01-19 Ulrich Drepper <drepper@redhat.com>
2417
2418 * ld.c: Remove unnecessary more_help function. Print bug report
2419 address using argp.
2420 * strip.c: Likewise.
2421 * size.c: Likewise.
2422 * nm.c: Likewise.
2423 * readelf.c: Likewise.
2424 * elflint.c: Likewise.
2425
2426 * elflint.c (main): Don't check for parameter problems here.
2427 (parse_opt): Do it here, where we get informed about some of them
2428 anyway.
2429
2430 * readelf.c (main): Don't check for parameter problems here.
2431 (parse_opt): Do it here, where we get informed about some of them
2432 anyway.
2433
24342005-01-11 Ulrich Drepper <drepper@redhat.com>
2435
2436 * strip.c: Update copyright year.
2437 * readelf.c: Likewise.
2438 * size.c: Likewise.
2439 * nm.c: Likewise.
2440 * ld.c: Likewise.
2441 * elflint.c: Likewise.
2442
2443 * elflint.c (check_symtab): Don't warn about wrong size for
2444 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2445
24462004-10-05 Ulrich Drepper <drepper@redhat.com>
2447
2448 * readelf.c (print_phdr): In section mapping, also indicate
2449 sections in read-only segments.
2450
24512004-09-25 Ulrich Drepper <drepper@redhat.com>
2452
2453 * readelf.c: Make compile with gcc 4.0.
2454 * strip.c: Likewise.
2455
24562004-08-16 Ulrich Drepper <drepper@redhat.com>
2457
2458 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2459 allocate to work around gcc 3.4 bug.
2460
24612004-01-25 Ulrich Drepper <drepper@redhat.com>
2462
2463 * ldlex.l (invalid_char): Better error message.
2464
24652004-01-23 Ulrich Drepper <drepper@redhat.com>
2466
2467 * readelf.c: Print SHT_GNU_LIBLIST sections.
2468
2469 * none_ld.c: New file.
2470
24712004-01-21 Ulrich Drepper <drepper@redhat.com>
2472
2473 * Makefile.am: Enable building of machine specific linker.
2474
24752004-01-20 Ulrich Drepper <drepper@redhat.com>
2476
2477 * Makefile.am: Support building with mudflap.
2478
2479 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2480 * ldgeneric.c: Likewise.
2481 * ldscript.y: Likewise.
2482 * readelf.c: Likewise.
2483 * strip.c: Likewise.
2484
2485 * readelf.c (print_debug_line_section): Determine address size
2486 correctly.
2487
24882004-01-19 Ulrich Drepper <drepper@redhat.com>
2489
2490 * readelf.c (print_phdr): Show which sections are covered by the
2491 PT_GNU_RELRO entry.
2492
2493 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2494
2495 * readelf.c (print_debug_macinfo_section): Implement.
2496
24972004-01-18 Ulrich Drepper <drepper@redhat.com>
2498
2499 * readelf.c (print_debug_line_section): Implement.
2500
25012004-01-17 Ulrich Drepper <drepper@redhat.com>
2502
2503 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2504 * src/ld.c: Likewise.
2505 * src/nm.c: Likewise.
2506 * src/readelf.c: Likewise.
2507 * src/size.c: Likewise.
2508 * src/strip.c: Likewise.
2509
2510 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2511
2512 * Makefile.am: Support building with mudflap.
2513
25142004-01-16 Ulrich Drepper <drepper@redhat.com>
2515
2516 * readelf.c (print_debug_info_section): Free dies memory.
2517
2518 * readelf.c: Print .debug_info section content.
2519
25202004-01-13 Ulrich Drepper <drepper@redhat.com>
2521
2522 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2523
25242004-01-12 Ulrich Drepper <drepper@redhat.com>
2525
2526 * readelf.c (print_debug_aranges): Implement using libdw.
2527
25282004-01-11 Ulrich Drepper <drepper@redhat.com>
2529
2530 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2531
2532 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2533 behavior is available yet.
2534 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2535
25362004-01-09 Ulrich Drepper <drepper@redhat.com>
2537
2538 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2539
2540 * nm.c: Implement getting information about local variables.
2541
25422004-01-07 Ulrich Drepper <drepper@redhat.com>
2543
2544 * nm.c: Read also debug information for local symbols.
2545
25462004-01-05 Ulrich Drepper <drepper@redhat.com>
2547
2548 * nm.c: Shuffle dwarf handling code around so the maximum column
2549 width can be computed ahead of printing. Avoid collection symbols
2550 which are not printed anyway.
2551
2552 * nm.c: Rewrite dwarf handling to use libdw.
2553 * Makefile.am (AM_CFLAGS): Add -std parameter.
2554 (INCLUDES): Find header in libdw subdir.
2555 (nm_LDADD): Replace libdwarf with libdw.
2556
2557 * elflint.c: Update copyright year.
2558 * readelf.c: Likewise.
2559 * size.c: Likewise.
2560 * strip.c: Likewise.
2561 * nm.c: Likewise.
2562
25632003-12-31 Ulrich Drepper <drepper@redhat.com>
2564
2565 * strip.c (process_file): Close file before returning.
2566
25672003-11-19 Ulrich Drepper <drepper@redhat.com>
2568
2569 * readelf.c (handle_dynamic): Make column for tag name wider.
2570
25712003-09-29 Ulrich Drepper <drepper@redhat.com>
2572
2573 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2574
25752003-09-25 Ulrich Drepper <drepper@redhat.com>
2576
2577 * strip.c (process_file): Don't mmap the input file, we modify the
2578 data structures and don't want the change end up on disk.
2579
25802003-09-23 Jakub Jelinek <jakub@redhat.com>
2581
2582 * unaligned.h (union u_2ubyte_unaligned,
2583 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2584 packed attribute.
2585 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2586 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2587 Read/store value through _ptr->u instead of *_ptr.
2588
25892003-09-22 Ulrich Drepper <drepper@redhat.com>
2590
2591 * size.c (show_sysv): Change type of maxlen to int.
2592
2593 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2594 buckets.
2595
2596 * i386_ld.c: Many many fixes and extensions.
2597 * ld.c: Likewise.
2598 * ldgeneric.c: Likewise.
2599
26002003-08-16 Ulrich Drepper <drepper@redhat.com>
2601
2602 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2603 the reference is from another DSO.
2604
26052003-08-15 Ulrich Drepper <drepper@redhat.com>
2606
2607 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2608 point is found when creating a DSO.
2609
26102003-08-14 Ulrich Drepper <drepper@redhat.com>
2611
2612 * ld.c (main): Always call FLAG_UNRESOLVED.
2613 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2614 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2615
26162003-08-13 Ulrich Drepper <drepper@redhat.com>
2617
2618 * Makefile.in: Depend on libebl.a, not libebl.so.
2619
2620 * ld.c (main): Mark stream for linker script as locked by caller.
2621 (read_version_script): Likewise.
2622 * ldlex.c: Define fread and fwrite to _unlocked variant.
2623
2624 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2625 target_bswap_32.
2626 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2627 target_bswap_64.
2628 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2629 store_8ubyte_unaligned): Define using new macros.
2630
26312003-08-12 Ulrich Drepper <drepper@redhat.com>
2632
2633 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2634 possibly unaligned memory. Support use of big endian machines.
2635
26362003-08-11 Ulrich Drepper <drepper@redhat.com>
2637
2638 * Moved to CVS archive.