blob: 6658687059c451a6d3ef21c1ffc7cb2cb8717cb8 [file] [log] [blame]
Petr Machataa47a0962013-11-14 01:07:22 +010012013-11-14 Petr Machata <pmachata@redhat.com>
2
3 * readelf.c (handle_core_item) <'h'>: New branch for handling
4 fields that shouldn't be displayed.
5
Mark Wielaard875cad82013-11-10 22:17:05 +010062013-11-10 Mark Wielaard <mjw@redhat.com>
7
8 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
9 ARGP_PROGRAM_BUG_ADDRESS_DEF.
10 (print_version): New function.
11
Mark Wielaard03d76f42013-11-09 16:45:22 +0100122013-11-09 Mark Wielaard <mjw@redhat.com>
13
14 * arlib.c (arlib_init): Call snprintf before using the result
15 with memcpy.
16 (arlib_finalize): Likewise.
17 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
18
Jan Kratochvil0b867462013-05-30 14:37:38 +0200192013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
20
21 * Makefile.am (bin_PROGRAMS): Add stack.
22 (stack_LDADD): New.
23 * stack.c: New file.
24
Mark Wielaardbe860842013-11-05 13:37:33 +0100252013-11-05 Mark Wielaard <mjw@redhat.com>
26
27 * readelf.c (print_debug_ranges_section): Cast address to size_t
28 before comparison.
29 (print_debug_loc_section): Likewise.
30
Mark Wielaard4f7673f2013-10-18 10:37:53 +0200312013-10-18 Mark Wielaard <mjw@redhat.com>
32
33 * ar.c (main): Correct operation check when instance_specifed is set.
34
Petr Machataab224102013-09-26 00:39:34 +0200352013-09-26 Petr Machata <pmachata@redhat.com>
36
Petr Machata0c9ae0c2013-09-26 21:02:22 +020037 * readelf.c (handle_file_note): New function.
38 (handle_notes_data): Call it to handle NT_FILE notes.
39
402013-09-26 Petr Machata <pmachata@redhat.com>
41
Petr Machataab224102013-09-26 00:39:34 +020042 * readelf.c (handle_siginfo_note): New function.
43 (handle_notes_data): Call it to handle NT_SIGINFO notes.
44 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
45
Mark Wielaard4b9e6392013-08-13 11:40:21 +0200462013-08-13 Mark Wielaard <mjw@redhat.com>
47
48 * addr2line.c (options): Add "inlines", 'i'.
49 (show_inlines): New bool.
50 (parse_opt): Handle 'i'.
51 (print_diesym): New static function.
52 (print_src): New function taking code from...
53 (handle_address): here. Call print_src. Print inlines.
54
Mark Wielaardd0f85012013-08-12 14:21:31 +0200552013-08-12 Mark Wielaard <mjw@redhat.com>
56
57 * addr2line.c (main): If there is a newline char at end of buf,
58 then remove it.
59
Mark Wielaard35230222013-07-05 16:44:47 +0200602013-07-05 Mark Wielaard <mjw@redhat.com>
61
62 * readelf.c (print_ops): Take CU as argument, use it to print
63 parameter_ref DIE offset.
64 (struct listptr): Replace base field with cu.
65 (listptr_base): New function.
66 (compare_listptr): Use listptr_base.
67 (notice_listptr): Take CU as argument.
68 (skip_listptr_hole): Likewise.
69 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
70 (print_cfa_program): Pass NULL as CU to print_ops.
71 (struct attrcb_args): Replace cu_base field with cu.
72 (attr_callback): Pass cu not cu_base to notice_listptr.
73 (print_debug_units): Don't calculate base, just set cu.
74 (print_debug_loc_section): Pass cu to skip_listptr_hole and
75 print_ops.
76
Mark Wielaard63d8bfd2013-05-06 15:48:56 +0200772013-05-06 Mark Wielaard <mjw@redhat.com>
78
79 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
80 argument as DIE offset.
81
Mark Wielaardcdaaf212013-04-25 16:50:11 -0400822013-04-24 Mark Wielaard <mjw@redhat.com>
83
84 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
85
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100862013-03-25 Mark Wielaard <mjw@redhat.com>
87
Mark Wielaard1a094202013-03-25 14:48:06 +010088 * readelf.c (argp_options): Add decodedline.
89 (decodedline): New boolean initialized to false.
90 (parse_opt): Set decodedline when arg is decodedline.
91 (print_decoded_line_section): New function.
92 (print_debug_line_section): Call print_decoded_line_section when
93 decodedline is true.
94
952013-03-25 Mark Wielaard <mjw@redhat.com>
96
Mark Wielaardb79788c2013-03-25 11:45:22 +010097 * readelf.c (argp_option): Add decodedaranges.
98 (decodedaranges): New boolean initialized to false.
99 (parse_opt): Set decodedaranges when arg is decodedaranges.
100 (print_debug_aranges_section): Reimplemented and original
101 implementation renamed to...
102 (print_decoded_aranges_section): this.
103
1042013-03-25 Mark Wielaard <mjw@redhat.com>
105
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100106 * readelf.c (attrcb_args): Add Dwarf_Die.
107 (attr_callback): When highpc is in constant form also print as
108 address.
109 (print_debug_units): Set args.die.
110
Mark Wielaard10cd97e2013-03-19 11:43:49 +01001112013-03-19 Mark Wielaard <mjw@redhat.com>
112
113 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
114
Mark Wielaarda73fecc2013-03-18 13:54:50 +01001152013-03-18 Mark Wielaard <mjw@redhat.com>
116
117 * readelf.c (print_gdb_index_section): Accept version 8.
118
Mark Wielaarda58951b2013-03-01 11:51:58 +01001192013-03-01 Mark Wielaard <mjw@redhat.com>
120
121 * findtextrel.c (process_file): Release ELF and close file when not
122 text relocations are found.
123 * strip.c (handle_elf): Track memory used for .debuglink section data
124 and free when done.
125
Mark Wielaardb94ccea2013-02-24 22:58:49 +01001262013-02-24 Mark Wielaard <mjw@redhat.com>
127
128 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
129 allowed to have out of section values because of GNU ld bugs.
130
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01001312013-02-06 Mark Wielaard <mjw@redhat.com>
132
133 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
134 list of symbols allowed to have out of section values because of
135 GNU ld bugs in either .symtab or .dynsym, but only when they are
136 zero sized.
137
Mark Wielaard10186a12013-01-24 11:29:21 +01001382013-01-24 Mark Wielaard <mjw@redhat.com>
139
140 * readelf.c (argp_option): Add unresolved-address-offsets, U.
141 (print_unresolved_addresses): New static.
142 (parse_opt): Handle 'U', set print_unprocessed_values.
143 (format_dwarf_addr): Take and handle new raw argument.
144 (print_ops): Call format_dwarf_addr with raw offset values.
145 (print_debug_ranges_section): Likewise.
146 (print_debug_frame_section): Likewise.
147 (attr_callback): Likewise.
148 (print_debug_line_section): Likewise.
149 (print_debug_loc_section): Likewise.
150 (print_gdb_index_section): Likewise.
151
Mark Wielaard24257102013-01-18 22:19:08 +01001522013-01-18 Mark Wielaard <mjw@redhat.com>
153
154 * readelf.c (struct listptr): Add base Dwarf_Addr field.
155 (compare_listptr): Warn for same offset with different base.
156 (notice_listptr): Take base argument and set it.
157 (skip_listptr_hole): Likewise.
158 (struct attrcb_args): Removed unused cu_offset field.
159 Add cu_base Dwarf_Addr field.
160 (attr_callback): Call notice_listptr with cbargs->cu_base.
161 (print_debug_units): Set args.cu_base.
162 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
163 (print_debug_loc_section): Likewise.
164
Jan Kratochvilc44cce02012-10-10 19:32:05 +02001652013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
166
167 * readelf.c (handle_core_items): Limit special repeated items handling
168 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
169
Mark Wielaard6d258ce2013-01-16 15:19:20 +01001702012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
171
172 * readelf.c (ELF_INPUT_SECTION): New argp key value.
173 (argp_option): Add elf-section.
174 (elf_input_section): New static.
175 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
176 (open_input_section): New function.
177 (process_file): Call open_input_section if elf_input_section set.
178
David Abdurachmanov1a4d0662013-01-13 16:44:21 +01001792013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
180
181 ar.c (do_oper_delete): Fix num passed to memset.
182
Mark Wielaard55324042012-12-21 10:02:11 +01001832012-12-21 Mark Wielaard <mjw@redhat.com>
184
Mark Wielaard00f758c2012-12-21 22:11:44 +0100185 * readelf.c (print_debug_frame_section): Adjust FDE start address
186 if pcrel before feeding it to format_dwarf_addr.
187
1882012-12-21 Mark Wielaard <mjw@redhat.com>
189
190 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +0100191
Roland McGrath57bd66c2012-12-11 09:42:07 -08001922012-12-11 Roland McGrath <roland@hack.frob.com>
193
194 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
195 sh_name case.
196 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
197
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +01001982012-10-16 Mark Wielaard <mjw@redhat.com>
199
200 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
201 calculated beginning after the operand and 2-byte constant.
202
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02002032012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
204
205 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
206 (WRAP_COLUMN): ... here.
207 (print_core_item): Remove parameter format_max. Update function
208 comment. Replace FORMAT_MAX by the real output width.
209 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
210 calls of print_core_item, remove variable maxfmt, change
211 ITEM_WRAP_COLUMN to WRAP_COLUMN.
212 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
213 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
214
Roland McGrath82ed98a2012-10-11 14:53:18 -07002152012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
216
217 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
218 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
219
Mark Wielaarde89c5002012-08-27 14:30:05 +02002202012-08-27 Mark Wielaard <mjw@redhat.com>
221
Mark Wielaard3e440062012-08-27 15:21:58 +0200222 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
223
2242012-08-27 Mark Wielaard <mjw@redhat.com>
225
Mark Wielaarde89c5002012-08-27 14:30:05 +0200226 * readelf.c (register_info): Handle loc == NULL.
227
Jeff Kenton257dcf42012-08-22 09:00:03 -04002282012-08-22 Jeff Kenton <jkenton@tilera.com>
229
230 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
231
Mark Wielaardf31c4412012-08-17 00:35:03 +02002322012-08-16 Mark Wielaard <mjw@redhat.com>
233
234 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
235 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
236 appropriate.
237 (dwarf_attr_name): Likewise.
238 (dwarf_form_name): Likewise.
239 (dwarf_lang_name): Likewise.
240 (dwarf_inline_name): Likewise.
241 (dwarf_encoding_name): Likewise.
242 (dwarf_access_name): Likewise.
243 (dwarf_visibility_name): Likewise.
244 (dwarf_virtuality_name): Likewise.
245 (dwarf_identifier_case_name): Likewise.
246 (dwarf_calling_convention_name): Likewise.
247 (dwarf_ordering_name): Likewise.
248 (dwarf_discr_list_name): Likewise.
249 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
250 (attr_callback): Call new dwarf_foobar_name instead of old
251 dwarf_foobar_string functions.
252 (dwarf_tag_string): New function using known-dwarf.h macros.
253 (dwarf_attr_string): Likewise.
254 (dwarf_form_string): Likewise.
255 (dwarf_lang_string): Likewise.
256 (dwarf_inline_string): Likewise.
257 (dwarf_encoding_string): Likewise.
258 (dwarf_access_string): Likewise.
259 (dwarf_visibility_string): Likewise.
260 (dwarf_virtuality_string): Likewise.
261 (dwarf_identifier_case_string): Likewise.
262 (dwarf_calling_convention_string): Likewise.
263 (dwarf_ordering_string): Likewise.
264 (dwarf_discr_list_string): Likewise.
265 (dwarf_locexpr_opcode_string): Likewise.
266
Mark Wielaard775375e2012-06-22 12:02:45 +02002672012-06-27 Mark Wielaard <mjw@redhat.com>
268
269 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
270 DW_FORM_GNU_strp_alt.
271 (attr_callback): Likewise.
272
Petr Machatafe198bc2012-07-30 19:48:28 +02002732012-07-30 Petr Machata <pmachata@redhat.com>
274
275 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
276 corresponding printf) so that those that are referenced by only
277 one of the formatting strings are at the end.
278
Mark Wielaard629b2562012-07-29 14:05:20 +02002792012-07-29 Mark Wielaard <mjw@redhat.com>
280
281 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
282 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
283
Mark Wielaard515fba92012-07-20 00:09:56 +02002842012-07-19 Mark Wielaard <mjw@redhat.com>
285
286 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
287
Mark Wielaarde9b23882012-06-29 22:30:15 +02002882012-07-11 Mark Wielaard <mjw@redhat.com>
289
290 * readelf.c (options): Add macro to help of debug-dump.
291 (section_e): Add section_macro.
292 (section_all): Add section_macro.
293 (parse_opt): Handle macro.
294 (print_debug_macro_section): New function.
295 (print_debug): Add NEW_SECTION (macro).
296
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02002972012-07-10 Mark Wielaard <mjw@redhat.com>
298
299 * readelf.c (print_gdb_index_section): Add version 7 support.
300 Keep track of cu_nr. Print kind and static/global flag for each
301 symbol. When a symbol is in the TU list add 'T'.
302
Mark Wielaarda0172d72012-06-25 17:18:53 +02003032012-06-26 Mark Wielaard <mjw@redhat.com>
304
305 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
306
Mark Wielaard50e2d392012-06-22 16:44:54 +02003072012-06-22 Mark Wielaard <mjw@redhat.com>
308
309 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
310 for gcc 4.7 -Wformat.
311
Mark Wielaard36aa5982012-05-09 11:27:44 +02003122012-05-09 Roland McGrath <roland@hack.frob.com>
313
314 * elflint (check_sections): Allow zero sized sections at (filesz) end
315 of segment. And make check overflow-proofed.
316
Mark Wielaard716486d2012-04-24 11:56:42 +02003172012-04-24 Mark Wielaard <mjw@redhat.com>
318
319 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
320 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
321
Roland McGrath738c1832012-03-28 15:01:49 -07003222012-03-28 Roland McGrath <roland@hack.frob.com>
323
324 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
325
Mark Wielaard61651c12012-03-28 11:20:36 +02003262012-03-28 Mark Wielaard <mjw@redhat.com>
327
328 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
329 section data.
330 (print_debug_str_section): Likewise.
331
Mark Wielaard30bb7142012-03-21 16:05:31 +01003322012-03-21 Mark Wielaard <mjw@redhat.com>
333
334 * readelf.c (print_gdb_index_section): Accept version 6.
335
Mark Wielaardcb643d62012-01-31 19:22:03 +01003362012-01-31 Mark Wielaard <mjw@redhat.com>
337
338 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
339
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05003402012-01-21 Ulrich Drepper <drepper@gmail.com>
341
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500342 * addr2line.c: Update copyright year.
343 * ar.c: Likewise.
344 * elfcmp.c: Likewise.
345 * elflint.c: Likewise.
346 * findtextrel.c: Likewise.
347 * ld.c: Likewise.
348 * nm.c: Likewise.
349 * objdump.c: Likewise.
350 * ranlib.c: Likewise.
351 * readelf.c: Likewise.
352 * size.c: Likewise.
353 * strings.c: Likewise.
354 * strip.c: Likewise.
355 * unstrip.c: Likewise.
356
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -0500357 * nm.c (argp_children): Define.
358 (argp): Hook up argp_children.
359 (handle_ar): Optimize puts call.
360 (show_symbols_bsd): Use positional parameters to also print color
361 codes. Don't print STT_FILE symbols.
362 * objdump.c (options): Improve help text.
363 (argp_children): Define.
364 (argp): Hook up argp_children.
365 (disasm_info): Add elements for color codes.
366 (disasm_output): Print color codes as well.
367 (show_disasm): Set up disasm_info data for callback.
368
Roland McGrath85924782012-01-20 11:40:59 -08003692012-01-20 Roland McGrath <roland@hack.frob.com>
370
Roland McGrath3284b792012-01-20 12:51:46 -0800371 * arlib-argp.c (arlib_deterministic_output): Initialize from
372 configured value.
373 (help_filter): New function.
374 (argp): Use it.
375
Roland McGrath9bffd362012-01-20 12:04:19 -0800376 * ar.c (main): Handle oper_none as usage error.
377
Roland McGrath6e063d92012-01-20 11:43:36 -0800378 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
379
Roland McGrath85924782012-01-20 11:40:59 -0800380 * ranlib.c (argp): Use arlib_argp_children.
381
382 * arlib.c (arlib_init): Obey arlib_deterministic_output.
383
384 * arlib-argp.c: New file.
385 * Makefile.am (libar_a_SOURCES): Add it.
386 * arlib.h (arlib_deterministic_output, arlib_argp_children):
387 Declare new variables.
388 * ar.c (deterministic_output): Variable removed.
389 (do_oper_insert): Use arlib_deterministic_output instead.
390 (options, parse_opt): Don't handle -D here. Add group numbers.
391 (argp): Use arlib_argp_children.
392
Roland McGratha065c4b2011-12-20 10:55:01 -08003932011-12-20 Roland McGrath <roland@hack.frob.com>
394
395 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
396 Reported by Karel Klic <kklic@redhat.com>.
397
Roland McGrath4fa988e2011-11-05 20:58:14 -07003982011-11-05 Roland McGrath <roland@hack.frob.com>
399
Roland McGrathe5ba2a12011-11-05 21:08:07 -0700400 * ar.c (deterministic_output): New flag variable.
401 (options, parse_opt): Grok -D to set it.
402 (do_oper_insert): When set, use zero from mtime, uid, and gid.
403
Roland McGrath4fa988e2011-11-05 20:58:14 -0700404 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
405
Marek Polacek8d1e2972011-10-04 05:11:42 -04004062011-10-04 Marek Polacek <mpolacek@redhat.com>
407
408 * readelf.c (register_info): Assume the right size of an array.
409
Ulrich Drepper2356ba02011-10-03 07:23:07 -04004102011-10-03 Ulrich Drepper <drepper@gmail.com>
411
412 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
413 but don't show it in help anymore.
414 (mark_special): Renamed from mark_weak.
415 (parse_opt): Adjust.
416 (class_type_char): Take additional parameters for ELF file and ELF
417 header. Treat TLS symbols like objects.
418 In case of D symbols, show u for unique symbols, R for symbols in
419 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400420 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400421 header. Adjust for class_type_char change. Show TLS symbols with
422 @ after them in case --mark-special is selected.
423 (show_symbols_posix): Likewise.
424 (show_symbols): Adjust calls to show_symbols_bsd and
425 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -0400426 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400427 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400428
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -04004292011-10-02 Ulrich Drepper <drepper@gmail.com>
430
431 * Makefile.am (demanglelib): Define.
432 (nm_LDADD): Add demanglelib.
433 * nm.c (options): Add -C option.
434 (demangle): Define as global variable.
435 (parse_opt): Recognize -C.
436 (show_symbols_sysv): Handle demangling.
437 (show_symbols_bad): Likewise.
438 (show_symbols_posix): Likewise.
439 (show_symbols): Likewise.
440
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07004412011-07-09 Roland McGrath <roland@hack.frob.com>
442
Roland McGrathbd754192011-07-09 05:33:37 -0700443 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
444
445 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700446
Mark Wielaard02a958b2011-05-30 17:23:57 +02004472011-05-30 Mark Wielaard <mjw@redhat.com>
448
449 * strip.c (relocate): Make offset check overflow-proof.
450
Mark Wielaard1662bc32011-05-16 11:33:11 +02004512011-05-23 Mark Wielaard <mjw@redhat.com>
452
Mark Wielaard63868c22011-05-24 16:09:31 +0200453 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700454 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +0200455 Relocate against any debug section symbol, not just STT_SECTION
456 symbols. For SHT_REL relocations, fetch addend from offset and
457 add it to symbol value if not zero.
458
4592011-05-23 Mark Wielaard <mjw@redhat.com>
460
Mark Wielaard1662bc32011-05-16 11:33:11 +0200461 * strip.c (OPT_RELOC_DEBUG): New option.
462 (argp_option): Add new --reloc-debug-sections option.
463 (main): Check new option.
464 (parse_opt): Likewise.
465 (handle_elf): Remove any relocations between debug sections
466 in ET_REL for the debug file when requested.
467
Mark Wielaard7a125b92011-05-17 12:20:01 +02004682011-05-18 Mark Wielaard <mjw@redhat.com>
469
470 * strip.c (handle_elf): Make sure all sections of a removed group
471 section are removed too. Don't discard SHT_GROUP sections, copy
472 section table before it gets modified. Section group signature
473 symbols don't have to be retained.
474
Jakub Jelinek03124242011-05-17 17:00:14 +02004752011-05-16 Jakub Jelinek <jakub@redhat.com>
476
477 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
478 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
479 and DW_OP_GNU_reinterpret.
480
Mark Wielaard69a9b112011-05-17 15:34:02 +02004812011-05-17 Mark Wielaard <mjw@redhat.com>
482
483 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
484 DW_TAG_GNU_call_site_parameter return strings.
485
Marek Polacekc8920de2011-05-12 12:08:21 +02004862011-05-11 Marek Polacek <mpolacek@redhat.com>
487
488 * nm.c (show_symbols_sysv): Remove unused if/else, remove
489 unused `prefix' and `fname' parameters.
490
Marek Polacek82f77d72011-05-07 19:26:20 +02004912011-05-07 Marek Polacek <mpolacek@redhat.com>
492
493 * unstrip.c (compare_sections_nonrel): Mark this function as static.
494
Mark Wielaardbb9d1b42011-04-24 17:53:38 +02004952011-04-26 Mark Wielaard <mjw@redhat.com>
496
497 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
498 with note name.
499
Mark Wielaard093a1d32011-04-14 23:47:26 +02005002011-04-14 Mark Wielaard <mjw@redhat.com>
501
502 * readelf.c (options): Add gdb_index.
503 (section_e): Define section_gdb_index.
504 (parse_opt): Recognize gdb_index debug-dump argument.
505 (print_gdb_index_section): New function.
506 (print_debug): Add gdb_index to debug_sections.
507
Petr Machata1879e5b2011-03-25 15:17:04 +01005082011-03-24 Petr Machata <pmachata@redhat.com>
509
510 * readelf.c (print_debug_line_section): Emit initial space for all
511 opcode lines. Print offset in front of each opcode.
512
Marek Polacek44de92a2011-03-22 01:07:20 +01005132011-03-22 Marek Polacek <mpolacek@redhat.com>
514
515 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
516
Mark Wielaarde3368c52011-03-22 23:03:31 +01005172011-03-22 Mark Wielaard <mjw@redhat.com>
518
519 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
520 and DW_TAG_GNU_call_site_parameter.
521 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
522 DW_AT_GNU_call_site_data_value,
523 DW_AT_GNU_call_site_target,
524 DW_AT_GNU_call_site_target_clobbered,
525 DW_AT_GNU_tail_call,
526 DW_AT_GNU_all_tail_call_sites,
527 DW_AT_GNU_all_call_sites,
528 and DW_AT_GNU_all_source_call_sites.
529 (print_ops): Handle DW_OP_GNU_entry_value.
530 (attr_callback): Handle DW_AT_GNU_call_site_value,
531 DW_AT_GNU_call_site_data_value,
532 DW_AT_GNU_call_site_target,
533 and DW_AT_GNU_call_site_target_clobbered.
534
Mark Wielaarda062b6b2011-03-10 13:02:32 +01005352011-03-10 Mark Wielaard <mjw@redhat.com>
536
537 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
538
Jan Kratochvilfec39992011-02-27 12:01:25 -08005392011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
540
541 * readelf.c (reset_listptr): Clear TABLE->TABLE.
542
Mark Wielaardcf454ab2011-02-25 12:58:54 +01005432011-02-25 Mark Wielaard <mjw@redhat.com>
544
545 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
546 (dwarf_form_string): Properly format and return unknown form.
547
Roland McGrath47c53232011-02-23 09:23:08 -08005482011-02-23 Roland McGrath <roland@redhat.com>
549
Roland McGrath725aad52011-02-23 19:52:46 -0800550 * readelf.c (section_name): New function.
551 (print_debug_abbrev_section): Use it instead of constant.
552 (print_debug_aranges_section): Likewise.
553 (print_debug_ranges_section): Likewise.
554 (print_debug_units): Likewise.
555 (print_debug_line_section): Likewise.
556 (print_debug_loc_section): Likewise.
557 (print_debug_macinfo_section): Likewise.
558 (print_debug_pubnames_section): Likewise.
559 (print_debug_str_section): Likewise.
560 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
561 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
562 (print_debug_str_section): Likewise.
563
Roland McGrath47c53232011-02-23 09:23:08 -0800564 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
565
Roland McGrath1fb9c912011-02-11 10:32:30 -08005662011-02-11 Roland McGrath <roland@redhat.com>
567
Roland McGrath4a14ef72011-02-11 10:42:45 -0800568 * elfcmp.c (verbose): New variable.
569 (options, parse_opt): Grok -l/--verbose to set it.
570 (main): Under -l, keep going after first difference.
571
Roland McGrath1fb9c912011-02-11 10:32:30 -0800572 * elfcmp.c (ignore_build_id): New variable.
573 (options, parse_opt): Grok --ignore-build-id to set it.
574 (main): For SHT_NOTE sections, compare note details rather than raw
575 bytes. Under --ignore-build-id, don't complain about differing build
576 ID contents if lengths match.
577
Roland McGrathfd992542011-02-08 19:45:12 -08005782011-02-08 Roland McGrath <roland@redhat.com>
579
Roland McGrath240784b2011-02-08 19:48:42 -0800580 * ldscript.y (filename_id_star): Remove unused variable.
581
Roland McGrath8f6c1792011-02-08 19:48:02 -0800582 * unstrip.c (copy_elided_sections): Remove unused variable.
583
Roland McGrath4db89f02011-02-08 19:46:50 -0800584 * elflint.c (check_dynamic): Remove unused variables.
585
Roland McGrath33231312011-02-08 19:45:26 -0800586 * elflint.c (check_symtab): Warn about missing xndx section only once.
587
Roland McGrathfd992542011-02-08 19:45:12 -0800588 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
589
Roland McGrathf151b7d2011-01-06 12:14:43 -08005902011-01-06 Roland McGrath <roland@redhat.com>
591
592 * strip.c (handle_elf): Under --strip-sections, remove all
593 non-allocated sections and never generate .gnu_debuglink.
594
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08005952011-01-04 Roland McGrath <roland@redhat.com>
596
597 * strip.c (remove_shdrs): New variable.
598 (options, parse_opt): Grok --strip-sections to set it.
599 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
600
Roland McGrath77221de2010-11-10 19:47:31 -08006012010-11-10 Roland McGrath <roland@redhat.com>
602
603 * findtextrel.c (process_file): Don't assume order of sections.
604 Reported by Mike Hommey <mh@glandium.org>.
605
Roland McGrath932585d2010-05-08 04:01:14 -07006062010-07-26 Roland McGrath <roland@redhat.com>
607
608 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
609
Roland McGratha1599152010-08-30 04:04:37 -07006102010-08-30 Roland McGrath <roland@redhat.com>
611
Roland McGrathfa144952010-08-30 19:22:41 -0700612 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
613 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
614 for ranges, loc.
615 (struct listptr, struct listptr_table): New types.
616 (compare_listptr, reset_listptr, sort_listptr): New functions.
617 (notice_listptr, skip_listptr_hole): New functions.
618 (struct attrcb_args): Add silent member.
619 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
620 Suppress output if silent, but still call notice_listptr.
621 (print_debug_units): Suppress output if section_info not requested.
622 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
623 (print_debug_ranges_section): Likewise.
624 (print_debug): Call reset_listptr on both tables.
625
626 * readelf.c (print_debug_ranges_section): Print empty list.
627 (print_debug_loc_section): Likewise.
628
Roland McGratha1599152010-08-30 04:04:37 -0700629 * readelf.c (print_debug_loc_section): Check for bogus length
630 before calling print_ops.
631 (print_ops): Check harder for bogus data that would read off end.
632
Roland McGrathf4763cf2010-08-11 13:04:12 -07006332010-08-11 Roland McGrath <roland@redhat.com>
634
635 * readelf.c (for_each_section_argument): Process all sections with
636 matching name, not just the first.
637
Roland McGrath52604ba2010-07-26 21:29:44 -07006382010-07-26 Roland McGrath <roland@redhat.com>
639
640 * readelf.c (print_ops): Take new argument for CU version.
641 Fix DW_OP_call_ref decoding to depend on it.
642 (print_debug_loc_section): Update caller.
643 (print_cfa_program): Take new argument, pass it down.
644 (print_debug_frame_section): Update caller.
645 (struct attrcb_args): New member version.
646 (print_debug_units): Initialize it.
647
Roland McGrath2f14a312010-07-02 11:16:25 -07006482010-07-02 Roland McGrath <roland@redhat.com>
649
650 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
651 initial_location.
652
Roland McGrathb6458032010-06-30 11:57:19 -07006532010-06-30 Roland McGrath <roland@redhat.com>
654
655 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
656 Ignore st_size for a non-S_ISREG file descriptor.
657 (read_block): Move assert after no-mmap bail-out.
658 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
659
Roland McGrathfa799902010-06-22 13:05:23 -07006602010-06-22 Roland McGrath <roland@redhat.com>
661
662 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
663
Roland McGrath0c5638c2010-06-21 23:00:35 -07006642010-06-21 Roland McGrath <roland@redhat.com>
665
666 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700667 (dwarf_attr_string): Add new attributes.
668 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700669
670 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
671 (print_cfa_program): Likewise.
672
Roland McGrathe5251a12010-06-20 16:59:39 -07006732010-06-20 Roland McGrath <roland@redhat.com>
674
Roland McGrath2b1f0952010-06-20 17:55:50 -0700675 * readelf.c (print_debug_units): New function, broken out of ...
676 (print_debug_info_section): ... here. Call it.
677 (print_debug_types_section): New function.
678 (enum section_e): Add section_types alias for section_info.
679 (print_debug): Add types to the sections table.
680
Roland McGrath599f7f52010-06-20 17:12:43 -0700681 * readelf.c (print_debug_frame_section): Handle version 4 format.
682
Roland McGrathe5251a12010-06-20 16:59:39 -0700683 * readelf.c (print_debug_line_section): Handle version 4 format.
684
Roland McGrathec86e5f2010-06-14 17:44:38 -07006852010-06-14 Roland McGrath <roland@redhat.com>
686
687 * unstrip.c (copy_elided_sections): Make sure all sections' data have
688 been read in before we write anything out.
689
Roland McGrath3b1b6512010-06-04 02:26:30 -07006902010-06-04 Roland McGrath <roland@redhat.com>
691
Roland McGrathaa32f922010-06-04 02:29:08 -0700692 * unstrip.c (update_shdr): New function.
693 (update_sh_size): Call it instead of gelf_update_shdr.
694 (adjust_relocs, add_new_section_symbols): Likewise.
695 (new_shstrtab, copy_elided_sections): Likewise.
696
Roland McGrath3b1b6512010-06-04 02:26:30 -0700697 * unstrip.c (copy_elided_sections): Bail if stripped file has more
698 sections than unstripped file, rather than getting confused later.
699
Roland McGrath7a5bed82010-06-01 13:44:00 -07007002010-06-01 Roland McGrath <roland@redhat.com>
701
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700702 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
703 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700704 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700705
Roland McGrath7a5bed82010-06-01 13:44:00 -0700706 * readelf.c (print_debug): Don't bail if libdw setup fails.
707 Suppress complaint if we only want .eh_frame anyway.
708
Ulrich Drepper173ade82010-05-28 07:39:49 -07007092010-05-28 Ulrich Drepper <drepper@redhat.com>
710
711 * readelf.c (attr_callback): Also print form information.
712
Roland McGrath12e3d1f2010-05-19 18:03:31 -07007132010-05-19 Roland McGrath <roland@redhat.com>
714
715 * addr2line.c (find_symbol): Short-circuit on empty name.
716 (handle_address): Handle SYMBOL with no +OFFSET.
717
Roland McGrath688f7fc2010-05-08 03:22:59 -07007182010-05-08 Roland McGrath <roland@redhat.com>
719
720 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
721 Use that for DW_OP_call_ref, not ADDRSIZE.
722 (print_cfa_program): Update caller.
723 (struct attrcb_args): Add offset_size field.
724 (attr_callback): Use it for print_ops call.
725 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700726 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700727
Roland McGrath62b28b62010-04-14 11:54:06 -07007282010-04-14 Roland McGrath <roland@redhat.com>
729
730 * readelf.c (handle_core_item): Fix bitmask printing.
731
Roland McGrath3b495d82010-04-06 12:58:32 -07007322010-04-06 Roland McGrath <roland@redhat.com>
733
734 * ld.c (options): Fix some typos in messages.
735 * elflint.c (check_scn_group, check_group): Likewise.
736 * ldscript.y (add_id_list): Likewise.
737 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
738 before translated string containing a literal %.
739
Roland McGrath890081b2010-02-26 17:57:50 -08007402010-02-26 Roland McGrath <roland@redhat.com>
741
742 * readelf.c (process_file): Don't leak an fd in failure case.
743
Roland McGrathc2b26f12010-02-15 15:16:15 -08007442010-02-15 Roland McGrath <roland@redhat.com>
745
Roland McGrath22359e22010-02-15 15:57:03 -0800746 * Makefile.am: Use config/eu.am for common stuff.
747
Roland McGrathc2b26f12010-02-15 15:16:15 -0800748 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
749 mismatch in comparison.
750
Roland McGrathf920fd52010-02-02 15:50:15 -08007512010-02-02 Roland McGrath <roland@redhat.com>
752
753 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
754 (read_encoded): Likewise.
755 (print_debug_frame_section): Check for bogus augmentation length.
756 For P augmentation, use read_encoded, print the encoding description,
757 and use hex for unsigned values.
758
Roland McGrathb337b1f2010-01-15 01:02:27 -08007592010-01-15 Roland McGrath <roland@redhat.com>
760
761 * ar.c: Include <sys/stat.h>.
762 * elflint.c: Likewise.
763 * readelf.c: Likewise.
764 * strip.c: Likewise.
765 * unstrip.c: Likewise
766
Roland McGrathbd733ca2010-01-07 20:11:42 -08007672010-01-07 Roland McGrath <roland@redhat.com>
768
Roland McGrath8111da02010-01-07 20:31:59 -0800769 * readelf.c (print_ehdr): Handle PN_XNUM.
770 (phnum): New static variable.
771 (process_elf_file): Set it with elf_getphdrnum.
772 (print_phdr): Use phnum instead of EHDR->e_phnum.
773 (print_dynamic, handle_notes): Likewise.
774 (handle_relocs_rel, handle_relocs_rela): Likewise.
775
Roland McGrathbd733ca2010-01-07 20:11:42 -0800776 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
777
778 * elflint.c (phnum): New static variable.
779 (check_elf_header): Set it, handling PN_XNUM.
780 Use that in place of EHDR->e_phnum throughout.
781 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
782 (unknown_dependency_p, check_sections, check_program_header): Likewise.
783
Roland McGrath019d9fb2010-01-05 13:36:07 -08007842010-01-05 Roland McGrath <roland@redhat.com>
785
786 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
787 DW_AT_GNU_template_name.
788
Roland McGrathe4061d02010-01-04 20:25:09 -08007892010-01-04 Roland McGrath <roland@redhat.com>
790
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800791 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
792 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
793 (handle_core_item): Handle .format of '\n' as \n-separated strings.
794
Roland McGrath2e79deb2010-01-04 20:36:10 -0800795 * readelf.c (implicit_debug_sections): New variable.
796 (parse_opt): Set it instead of print_debug_sections for -a.
797 OR them together for print_debug check.
798 (print_debug): OR them together for section check.
799
Roland McGratha7422be2010-01-04 20:29:33 -0800800 * readelf.c (options): Repartition into set implied by -a and others.
801 Correct -a text to match reality.
802
Roland McGrathe4061d02010-01-04 20:25:09 -0800803 * readelf.c (struct section_argument): Add bool member 'implicit'.
804 (parse_opt): Set it for -a cases, clear it for -x args.
805 (for_each_section_argument): Don't complain about a missing section by
806 name if it's implicit.
807
Roland McGrathefa64962009-11-16 01:50:58 -08008082009-11-16 Roland McGrath <roland@redhat.com>
809
810 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
811 sections, just as dump_data_section already does.
812
Mark Wielaardc49d00a2009-09-21 16:47:07 -07008132009-09-21 Ulrich Drepper <drepper@redhat.com>
814
815 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
816 set for .comment section.
817 Patch by Mark Wielaard <mjw@redhat.com>.
818
Roland McGrathfb33c672009-09-08 00:21:18 -07008192009-09-08 Roland McGrath <roland@redhat.com>
820
821 * ar.c (main): Fix typo in message format.
822
Roland McGrath2d13ea22009-08-21 03:16:32 -07008232009-08-21 Roland McGrath <roland@redhat.com>
824
825 * readelf.c (attr_callback): Use print_block only when we don't use
826 print_ops.
827
Roland McGrath536127f2009-08-14 13:10:09 -07008282009-08-14 Roland McGrath <roland@redhat.com>
829
830 * ar.c (do_oper_extract): Use pathconf instead of statfs.
831
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07008322009-08-01 Ulrich Drepper <drepper@redhat.com>
833
834 * debugpred.h: Add two most const.
835
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07008362009-07-26 Mark Wielaard <mjw@redhat.com>
837
838 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
839
Mark Wielaard79178202009-07-25 12:44:46 -07008402009-07-25 Mark Wielaard <mjw@redhat.com>
841
842 * Makefile.am (addr2line_LDADD): Add $(libelf).
843
Roland McGrathbe4589d2009-07-24 16:23:12 -07008442009-07-24 Roland McGrath <roland@redhat.com>
845
846 * readelf.c (print_block): New function.
847 (print_ops): Use it.
848 (attr_callback): Use it for DW_FORM_block* forms.
849
Mark Wielaarddaf85b22009-07-24 15:49:51 -07008502009-07-20 Mark Wielaard <mjw@redhat.com>
851
852 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
853 and DW_OP_stack_value.
854
Ulrich Drepper96d950e2009-07-14 10:42:01 -07008552009-07-14 Ulrich Drepper <drepper@redhat.com>
856
857 * elflint.c (check_elf_header): Allow Linux ABI.
858 (check_symtab): Handle STB_GNU_UNIQUE.
859
Mark Wielaardf735db12009-07-08 19:18:53 +02008602009-07-08 Mark Wielaard <mjw@redhat.com>
861
862 * readelf.c (attr_callback): Handle DW_Form constants for
863 DW_AT_data_member_location.
864
Roland McGrathdffc33d2009-07-06 16:06:41 -07008652009-07-06 Roland McGrath <roland@redhat.com>
866
867 * readelf.c (register_info): New function. Handle unknown register #s.
868 (print_cfa_program): Use it.
869 (handle_core_register, handle_core_registers): Likewise.
870
Roland McGrath5dbccdb2009-06-28 14:48:02 -07008712009-06-28 Roland McGrath <roland@redhat.com>
872
873 * readelf.c (print_address_names): New static variable.
874 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
875 (format_dwarf_addr): Don't look up name if !print_address_names.
876
Ulrich Drepperf1894932009-06-13 15:55:42 -07008772009-06-13 Ulrich Drepper <drepper@redhat.com>
878
879 * ldgeneric.c: Don't use deprecated libelf functions.
880 * nm.c: Likewise.
881 * objdump.c: Likewise.
882 * readelf.c: Likewise.
883 * size.c: Likewise.
884 * strip.c: Likewise.
885 * unstrip.c: Likewise.
886 * ld.h: Fix up comment.
887
Ulrich Drepperb47d2902009-06-01 07:38:32 -07008882009-06-01 Ulrich Drepper <drepper@redhat.com>
889
890 * readelf.c (print_relocs): Expect ELF header argument and pass on
891 to handle_relocs_rel* functions. Adjust caller.
892 (handle_relocs_rel): Add ELF header argument. Add special case for
893 the IRELATIVE relocations in statically linked executables.
894 (handle_relocs_rela): Likewise.
895
Roland McGrathdb19f0b2009-05-07 18:44:27 -07008962009-04-29 Ulrich Drepper <drepper@redhat.com>
897
898 * elflint.c (check_symtab): Add tests of st_other field.
899
Ulrich Drepperaab90f92009-04-23 07:44:36 -07009002009-04-23 Ulrich Drepper <drepper@redhat.com>
901
902 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
903
Roland McGrathd86e1832009-04-20 00:49:33 -07009042009-04-20 Roland McGrath <roland@redhat.com>
905
Roland McGrath8a592412009-04-20 01:20:44 -0700906 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
907 of inline call sites.
908
Roland McGrathd86e1832009-04-20 00:49:33 -0700909 * addr2line.c (just_section): New variable.
910 (adjust_to_section): New function, broken out of ...
911 (handle_address): ... here.
912 (options, parse_opt): Add -j/--section=NAME to set it.
913
Roland McGrath2fb90512009-04-15 14:47:13 -07009142009-04-15 Roland McGrath <roland@redhat.com>
915
916 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
917 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
918
Roland McGrath04a14162009-04-14 01:02:17 -07009192009-04-14 Roland McGrath <roland@redhat.com>
920
Roland McGratheb9ba472009-04-14 18:44:45 -0700921 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
922 like SHT_GNU_ATTRIBUTES.
923
Roland McGrath94f43832009-04-14 04:39:32 -0700924 * readelf.c (handle_core_registers): Fix error message.
925
Roland McGrath04a14162009-04-14 01:02:17 -0700926 * strip.c (handle_elf: check_preserved): Don't note any change when
927 .debug_data is already filled from a previous pass.
928
Ulrich Drepper411cdb22009-02-05 22:04:26 -08009292009-02-05 Ulrich Drepper <drepper@redhat.com>
930
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800931 * objdump.c (show_relocs_x): Minor cleanups.
932
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800933 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800934 Print first DW_CFA_expression and DW_CFA_val_expression parameter
935 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800936
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08009372009-02-01 Ulrich Drepper <drepper@redhat.com>
938
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800939 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
940 into ...
941 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800942 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800943
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800944 * objdump.c (show_relocs_rela): Show offsets as signed values.
945
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800946 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
947 Improve some error messages.
948 Use program_invocation_short_name instead of AR macro.
949 * Makefile.am (CFLAGS_ar): Remove.
950 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
951 * objdump.c (parse_opt): Likewise.
952 * readelf.c (parse_opt): Likewise.
953
Roland McGrath51f01282009-01-27 17:08:03 -08009542009-01-27 Roland McGrath <roland@redhat.com>
955
956 * readelf.c (print_ops): Notice short length, don't overrun buffer
957 (still need to fix LEB128).
958
959 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
960
961 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
962
Ulrich Drepper62c46532009-01-24 17:01:08 -08009632009-01-24 Ulrich Drepper <drepper@redhat.com>
964
965 * readelf.c (print_debug_frame_section): Fix computation of vma_base
966 for PC-relative mode.
967
Ulrich Drepperd7285e12009-01-23 16:10:44 -08009682009-01-23 Ulrich Drepper <drepper@redhat.com>
969
Ulrich Drepperccccab02009-01-23 16:32:21 -0800970 * size.c (process_file): When handling archive, close file descriptor
971 here. For unknown file format also close file descriptor.
972 (handle_ar): Don't close file descriptor here.
973
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800974 * readelf.c (parse_opt): Move code to add to dump_data_sections and
975 string_sections list in local function add_dump_section. Adjust 'x'
976 key handling. For 'a' key add .strtab, .dynstr, and .comment section
977 to string_sections list.
978
Roland McGrathe9de9b42009-01-22 13:05:40 -08009792009-01-22 Roland McGrath <roland@redhat.com>
980
Roland McGrath9a847e12009-01-22 19:55:00 -0800981 * readelf.c (print_phdr): Don't print section mapping when no sections.
982
Roland McGrathd759aa62009-01-22 19:17:07 -0800983 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
984
Roland McGrathcabeeee2009-01-22 13:17:45 -0800985 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
986 and reset it only for the 'true' cases.
987
988 * Makefile.am (addr2line_no_Wformat): New variable.
989
Roland McGrathe9de9b42009-01-22 13:05:40 -0800990 * readelf.c (print_debug_frame_section): Use t instead of j formats
991 for ptrdiff_t OFFSET.
992
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08009932009-01-21 Ulrich Drepper <drepper@redhat.com>
994
995 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800996 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800997 (check_exception_data): First sanity test.
998
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08009992009-01-17 Ulrich Drepper <drepper@redhat.com>
1000
Ulrich Drepper935edde2009-01-17 16:06:42 -08001001 * readelf.c (print_debug_exception_table): Show target of ar_disp
1002 field.
1003
1004 * elflint.c (check_program_header): Add most consistency checks for
1005 PT_GNU_EH_FRAME entry.
1006
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001007 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1008 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1009 * ar.c: Likewise.
1010 * elfcmp.c: Likewise.
1011 * elflint.c: Likewise.
1012 * findtextrel.c: Likewise.
1013 * ld.c: Likewise.
1014 * nm.c: Likewise.
1015 * objdump.c: Likewise.
1016 * ranlib.c: Likewise.
1017 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001018
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001019 * size.c: Likewise.
1020 * strings.c: Likewise.
1021 * strip.c: Likewise.
1022 * unstrip.c: Likewise.
1023
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080010242009-01-16 Ulrich Drepper <drepper@redhat.com>
1025
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001026 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1027 matches .eh_frame_hdr section, if it is available. Also check that
1028 the segment is allocated, not writable, not executable.
1029
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001030 * readelf.c: Add -e option. Dump exception and unwind related
1031 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001032 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001033 (print_debug_exception_table): Beginning of support.
1034 (print_debug): Hook up print_debug_exception_table for
1035 .gcc_except_table sections.
1036
1037 * readelf.c (print_debug_frame_section): Some fixes for last change.
1038
Ulrich Drepper351bf202009-01-15 20:18:40 -080010392009-01-15 Ulrich Drepper <drepper@redhat.com>
1040
1041 * readelf.c (print_encoding): Now a toplevel function.
1042 (print_relinfo): Likewise.
1043 (print_encoding_base): Broken out of print_debug_frame_section.
1044 (print_debug_frame_section): Print different header for .eh_frame
1045 sections. Fix recognition of matching CIEs in .debug_frame sections.
1046 Print absolute offset for PC-relative FDE locations. Don't print
1047 table header for FDEs if the table is empty.
1048 (read_encoded): New function.
1049 (print_debug_frame_hdr_section): New function.
1050 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1051 sections.
1052
1053 * readelf.c (handle_relocs_rel): Print section number.
1054 (print_debug_abbrev_section): Likewise.
1055 (print_debug_aranges_section): Likewise.
1056 (print_debug_ranges_section): Likewise.
1057 (print_debug_info_section): Likewise.
1058 (print_debug_line_section): Likewise.
1059 (print_debug_loc_section): Likewise.
1060 (print_debug_macinfo_section): Likewise.
1061 (print_debug_pubnames_section): Likewise.
1062 (print_debug_str_section): Likewise.
1063
Ulrich Drepper8b394632009-01-10 18:29:56 -080010642009-01-10 Ulrich Drepper <drepper@redhat.com>
1065
1066 * strings.c (read_block): Fix typo in error message string.
1067
Ulrich Drepper87cf5832009-01-07 20:39:21 -080010682009-01-07 Ulrich Drepper <drepper@redhat.com>
1069
1070 * ld.c (ld_new_searchdir): Fix adding to search path list.
1071
Ulrich Drepperac194d02009-01-06 00:30:01 -080010722009-01-06 Ulrich Drepper <drepper@redhat.com>
1073
1074 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001075
Roland McGrath3614d992009-01-05 18:05:32 -080010762009-01-05 Roland McGrath <roland@redhat.com>
1077
1078 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1079 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001080
Ulrich Drepper44173ed2009-01-01 19:00:41 -080010812009-01-01 Ulrich Drepper <drepper@redhat.com>
1082
1083 * addr2line.c: Update copyright year.
1084 * ar.c: Likewise.
1085 * elfcmp.c: Likewise.
1086 * elflint.c: Likewise.
1087 * findtextrel.c: Likewise.
1088 * ld.c: Likewise.
1089 * nm.c: Likewise.
1090 * objdump.c: Likewise.
1091 * ranlib.c: Likewise.
1092 * readelf.c: Likewise.
1093 * size.c: Likewise.
1094 * strings.c: Likewise.
1095 * strip.c: Likewise.
1096 * unstrip.c: Likewise.
1097
Roland McGrath468fe4d2008-12-11 21:00:12 -080010982008-12-11 Roland McGrath <roland@redhat.com>
1099
1100 * nm.c (sym_name): New function.
1101 (show_symbols_sysv): Use it in place of elf_strptr.
1102 (show_symbols_bsd, show_symbols_posix): Likewise.
1103 Fixes RHBZ#476136.
1104
1105 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1106 elf_strptr fails.
1107
Roland McGratha845f682008-12-03 03:41:58 +000011082008-12-02 Roland McGrath <roland@redhat.com>
1109
1110 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1111 nonzero OFFSET argument to dwfl_getmodules.
1112
Roland McGrath1d8bb252008-08-07 08:39:41 +000011132008-08-07 Roland McGrath <roland@redhat.com>
1114
1115 * addr2line.c (main): Pass string to handle_address.
1116 (see_one_module): New function, subroutine of handle_address.
1117 (find_symbol): Likewise.
1118 (handle_address): Take string argument rather than address.
1119 Convert plain number, or handle strings like "(section)+offset"
1120 or "symbol+offset".
1121
11222008-08-01 Roland McGrath <roland@redhat.com>
1123
1124 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1125 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1126
1127 * readelf.c (convert): Take new argument SIZE.
1128 (handle_core_register, handle_core_item): Update callers.
1129 (handle_core_item): Take new arg REPEATED_SIZE.
1130 (handle_core_items): Special case for a singleton item,
1131 let handle_core_item handle repeats if it wants to.
1132
1133 * readelf.c (handle_core_items): Give abridged output
1134 for identical groups repeated more than twice.
1135
11362008-07-04 Roland McGrath <roland@redhat.com>
1137
1138 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1139
Roland McGrath521c47d2008-04-11 07:01:58 +000011402008-04-10 Roland McGrath <roland@redhat.com>
1141
1142 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1143 refer to. Instead, just be sure to preserve the original symbol
1144 table in the debug file so those symbols go with their sections and
1145 can be elided from the stripped version of the symbol table.
1146
1147 * strip.c (handle_elf): When a discarded section kept in the debug
1148 file refers to a nondiscard section via sh_link/sh_info, preserve
1149 that nondiscarded section unmodified in the debug file as well.
1150 Skip adjustment of discarded sections symbol table references when
1151 that symbol table is copied in this way.
1152
1153 * elflint.c (check_symtab): Don't crash from missing symbol names
1154 after diagnosing bogus strtab.
1155
1156 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1157 adjustment for symtab changes.
1158
Roland McGrath13b69602008-04-01 02:30:05 +000011592008-03-31 Roland McGrath <roland@redhat.com>
1160
1161 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1162 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1163 excuse a special section.
1164
11652008-03-27 Roland McGrath <roland@redhat.com>
1166
1167 * elflint.c (check_sections): Check that executability and writability
1168 of sections is reflected in segment p_flags.
1169
Roland McGrathd11f9cb2008-03-26 20:51:59 +000011702008-03-26 Roland McGrath <roland@redhat.com>
1171
1172 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1173 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1174 is valid in RELRO.
1175
Roland McGrath47c5c352008-02-29 10:17:16 +000011762008-02-29 Roland McGrath <roland@redhat.com>
1177
1178 * readelf.c (print_attributes): Add a cast.
1179 * elflint.c (check_attributes): Likewise.
1180
1181 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1182 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1183 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1184
Ulrich Drepper834de6f2008-02-23 06:50:01 +000011852008-02-03 Ulrich Drepper <drepper@redhat.com>
1186
1187 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1188 when linked into executable.
1189 (elf_i386_create_relocations): Likewise.
1190
Roland McGrath059c83e2008-02-21 06:19:39 +000011912008-02-20 Roland McGrath <roland@redhat.com>
1192
1193 * readelf.c (print_attributes): New function.
1194 (process_elf_file): Call it under -A.
1195
1196 * elflint.c (check_attributes): Implement it for real.
1197
11982008-02-19 Roland McGrath <roland@redhat.com>
1199
1200 * elflint.c (special_sections): Handle .gnu.attributes section.
1201 (check_sections): Likewise.
1202 (check_attributes): New function.
1203
12042008-02-10 Roland McGrath <roland@redhat.com>
1205
1206 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1207 sections and ET_REL files.
1208
Ulrich Drepper712d78e2008-02-02 10:01:53 +000012092008-02-02 Ulrich Drepper <drepper@redhat.com>
1210
1211 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1212 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1213 and R_386_TLS_LE.
1214 (elf_i386_create_relocations): Likewise.
1215 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1216 elements.
1217 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1218 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1219 Fix generation of PT_GNU_STACK entry.
1220
Ulrich Drepperc54785a2008-02-01 18:05:21 +000012212008-02-01 Ulrich Drepper <drepper@redhat.com>
1222
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001223 * ld.c (replace_args): Prevent loop over replacements if the parameter
1224 is only two characters long.
1225
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001226 * ld.c: Recognize sha1 argument for --build-id parameter.
1227 * ldgeneric.c (create_build_id_section): Handle sha1.
1228 (compute_hash_sum): New function. Broken out of compute_build_id.
1229 Take hash function and context as parameters.
1230 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1231 implementation.
1232
Ulrich Drepper89759c72008-01-31 19:44:12 +000012332008-01-31 Ulrich Drepper <drepper@redhat.com>
1234
1235 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1236 * ld.c: Recognize --build-id command line parameter.
1237 * ld.h: Define scn_dot_note_gnu_build_id.
1238 (struct ld_state): Add build_id and buildidscnidx elements.
1239 * ldgeneric.c: Implement --build-id command line parameter.
1240 * ldlex.l (ID): Recognize - as valid character after the first one.
1241
Ulrich Drepper5530ec52008-01-29 10:42:07 +000012422008-01-29 Ulrich Drepper <drepper@redhat.com>
1243
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001244 * ld.c (replace_args): New function.
1245 (main): Use it to rewrite old-style parameters.
1246
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001247 * elf32-i386.script: Add .gnu.hash section.
1248 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1249 (fillin_special_symbol): Initialize st_size.
1250 (sortfct_hashval): New function.
1251 (create_gnu_hash): New function.
1252 (create_hash): New function.
1253 (ld_generic_create_outfile): Use the new functions to create the
1254 hash tables.
1255
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001256 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1257
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000012582008-01-24 Ulrich Drepper <drepper@redhat.com>
1259
1260 * elflint.c (check_group): Check that signature symbol for section
1261 group is not an empty string.
1262 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1263 section. Start implementation of --hash-style.
1264 * i386_ld.c: Likewise.
1265 * ld.c: Recognize --hash-style.
1266 * ld.h (struct scninfo): Add comdat_group.
1267 Add additional parameter to finalize_plt callback.
1268
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000012692008-01-22 Ulrich Drepper <drepper@redhat.com>
1270
1271 * ld.h (struct callbacks): Add initialize_gotplt.
1272 (struct scnhead): Add scn_dot_gotplt.
1273 (struct ld_state): Add gotpltscnidx.
1274 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1275 (elf_i386_initialize_pltrel): Likewise.
1276 (elf_i386_initialize_got): There is now a separate .got.plt, so
1277 don't do the PLT-related work here. Initialize d_type.
1278 (elf_i386_initialize_gotplt): New function.
1279 (elf_i386_plt0): Use ud2a after indirect jump.
1280 (elf_i386_pic_plt0_entry): Likewise.
1281 (elf_i386_finalize_plt): Reference now .got.plt.
1282 (elf_i386_count_relocations): For GOT entries which need no relocation
1283 don't bump nrel_got.
1284 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1285 handling for split .got/.got.plt.
1286 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1287 * elf32-i386.script: Sort sections for security. There are no .got
1288 input sections. Add .got.plt.
1289 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1290 (ld_generic_create_outfile): Initialize .got.plt section.
1291 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1292
Ulrich Drepperd9488292008-01-20 16:43:15 +000012932008-01-19 Ulrich Drepper <drepper@redhat.com>
1294
1295 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1296 symbols are not carried over into statically linked output files.
1297 Add dummy entries for more TLS relocations.
1298
1299 * ld.c (options): Add long names for -( and -).
1300
1301 * ldgeneric.c (check_definition): For newly found definitions don't
1302 mark section as used if symbol is absolute.
1303 (extract_from_archive): Only assign archive sequence number the first
1304 time the archive is handled. Update ld_state.last_archive_used
1305 if any symbol was used. Remove nround variable.
1306 (file_process2): When using symbol from an archive, update
1307 ld_state.group_start_archive, ld_state.archives, and
1308 ld_state.tailarchives.
1309 (ld_generic_file_process): If group is not handled anymore, after
1310 freeing ELF handles for the archives, clear ld_state.archives and
1311 *nextp. Fix wrong logic in recognizing first iteration of group
1312 loop. When clearing flags, also clear ld_state.group_start_archive.
1313
Ulrich Drepper5eee1222008-01-11 10:12:18 +000013142008-01-11 Ulrich Drepper <drepper@redhat.com>
1315
1316 * objdump.c (show_disasm): Adjust disassembler format string for
1317 removal of %e.
1318
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000013192008-01-04 Roland McGrath <roland@redhat.com>
1320
Roland McGrath059c83e2008-02-21 06:19:39 +00001321 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1322 a size greater than the items cover means multiple sets of items.
1323 (handle_core_note): Update caller.
1324
13252008-01-04 Roland McGrath <roland@redhat.com>
1326
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001327 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1328
13292008-01-03 Roland McGrath <roland@redhat.com>
1330
1331 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1332
1333 * elflint.c (check_dynamic): Remove duplicate initializer.
1334
Ulrich Drepperad024af2008-01-02 17:42:52 +000013352008-01-02 Ulrich Drepper <drepper@redhat.com>
1336
1337 * addr2line.c: Update copyright year.
1338 * ar.c: Likewise.
1339 * elfcmp.c: Likewise.
1340 * elflint.c: Likewise.
1341 * findtextrel.c: Likewise.
1342 * ld.c: Likewise.
1343 * nm.c: Likewise.
1344 * objdump.c: Likewise.
1345 * ranlib.c: Likewise.
1346 * readelf.c: Likewise.
1347 * size.c: Likewise.
1348 * strings.c: Likewise.
1349 * strip.c: Likewise.
1350 * unstrip.c: Likewise.
1351
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000013522007-12-30 Ulrich Drepper <drepper@redhat.com>
1353
1354 * objdump (show_disasm): Use %e after third parameter.
1355
13562007-12-21 Ulrich Drepper <drepper@redhat.com>
1357
1358 * strip.c: Fix wrong parenthesis in a few branch predictions.
1359 * strings.c: Likewise.
1360
13612007-12-20 Ulrich Drepper <drepper@redhat.com>
1362
1363 * Makefile.am (DEFS): Add DEBUGPRED.
1364 * addr2line.c: Include debugpred.h.
1365 * ar.c: Likewise.
1366 * elfcmp.c: Likewise.
1367 * elflint.c: Likewise.
1368 * findtextrel.c: Likewise.
1369 * nm.c: Likewise.
1370 * objdump.c: Likewise.
1371 * ranlib.c: Likewise.
1372 * readelf.c: Likewise.
1373 * size.c: Likewise.
1374 * strings.c: Likewise.
1375 * strip.c: Likewise.
1376 * unstrip.c: Likewise.
1377 * debugpred.h: New file.
1378
1379 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1380 (handle_relocs_rela): Likewise.
1381
1382 * readelf.c: Add lots of likely/unlikely.
1383
1384 * elflint.c: Minor cleanups.
1385
Roland McGrath1a2e8f42007-12-15 23:39:34 +000013862007-11-19 Roland McGrath <roland@redhat.com>
1387
1388 * readelf.c (print_ops): Handle all bad op codes gracefully.
1389 Print their numbers instead of just ???.
1390
Roland McGrath07a696e2007-11-09 22:44:26 +000013912007-11-09 Roland McGrath <roland@redhat.com>
1392
1393 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00001394 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1395 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1396 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1397 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00001398
Roland McGrathe4c22ea2007-10-23 13:07:39 +000013992007-10-20 Roland McGrath <roland@redhat.com>
1400
1401 * unstrip.c (options): Update -R description.
1402 (struct symbol): Put symbol details a union with a size_t pointer
1403 `duplicate'.
1404 (compare_symbols_output): Use null ->name as marker for discard
1405 symbols, not zero *->map.
1406 (copy_elided_sections): Record forwarding pointers for discarded
1407 duplicates and fill SYMNDX_MAP elements through them.
1408
1409 * readelf.c (process_file): Set offline_next_address to 0 at start.
1410 (struct process_dwflmod_args): New type.
1411 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1412 (process_file): Update caller; dup FD for passing to libdwfl.
1413 (process_elf_file): Take new arg FD. For ET_REL file when
1414 displaying data affected by libdwfl relocation, open a new Elf handle.
1415
14162007-10-17 Roland McGrath <roland@redhat.com>
1417
1418 * readelf.c (print_debug_line_section): For invalid data inside a
1419 unit with plausible length, keep printing at the next unit boundary.
1420
1421 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1422
14232007-10-16 Roland McGrath <roland@redhat.com>
1424
1425 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1426
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000014272007-10-15 Roland McGrath <roland@redhat.com>
1428
1429 * make-debug-archive.in: New file.
1430 * Makefile.am (EXTRA_DIST): Add it.
1431 (make-debug-archive): New target.
1432 (bin_SCRIPTS, CLEANFILES): Add it.
1433
14342007-10-10 Roland McGrath <roland@redhat.com>
1435
1436 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1437 Use it to check MERGE|STRINGS for .debug_str.
1438 (check_sections): Handle exact_or_gnuld.
1439
14402007-10-08 Roland McGrath <roland@redhat.com>
1441
1442 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1443 64-bit struct timeval with 32-bit tv_usec.
1444
14452007-10-07 Roland McGrath <roland@redhat.com>
1446
1447 * readelf.c (check_archive_index): New function.
1448 (process_file): Call it. Change signature to take only fd and name.
1449 Use libdwfl to open the file, then iterate on its modules (multiple
1450 for an archive) to print file name and call process_elf_file.
1451 (main): Update caller. Let process_file do elf_begin.
1452 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1453 (process_elf_file): Take only Dwfl_Module * argument.
1454 Don't print the file name here.
1455 (print_debug_*_section): Take Dwfl_Module * argument.
1456 (print_debug): Likewise. Update caller.
1457 (format_dwarf_addr): New function.
1458 (print_debug_ranges_section): Use it.
1459 (attr_callback): Likewise.
1460 (print_debug_line_section, print_debug_loc_section): Likewise.
1461
1462 * readelf.c (print_debug_ranges_section): Translate all strings.
1463 (print_debug_loc_section): Likewise.
1464
1465 * unstrip.c (copy_elided_sections): Initialize SEC.
1466
1467 * ar.c (do_oper_insert): Put trailing / on short names.
1468
1469 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1470
1471 * arlib2.c (arlib_add_long_name): Adjust for header size.
1472
1473 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1474
1475 * ar.c (do_oper_insert): Use write_retry for padding write.
1476
1477 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1478 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1479 (remember_long_name): New function.
1480 (do_oper_insert): Call it. Correctly use length of basename,
1481 not original name. Don't store long name twice for new member.
1482
14832007-10-06 Roland McGrath <roland@redhat.com>
1484
1485 * elflint.c (check_note): Skip empty segment.
1486 (check_note_section): Skip empty section.
1487
1488 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1489 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1490 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1491 (compare_alloc_sections): Take new arg REL, ignore address if true.
1492 (compare_sections): Likewise, pass it down.
1493 (compare_sections_rel, compare_sections_nonrel): New functions.
1494 (find_alloc_sections_prelink, copy_elided_sections): Use them
1495 instead of compare_sections.
1496 (sections_match): New function, broken out of ...
1497 (find_alloc_section): ... here.
1498 (copy_elided_sections): Reorganize section match-up logic.
1499 Use sections_match for SHF_ALLOC in ET_REL.
1500 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1501
1502 * unstrip.c (add_new_section_symbols): Take new arg REL.
1503 When true, do not update section symbol values.
1504 (collect_symbols): Likewise. Update section symbols with address
1505 of chosen output section, not original section.
1506 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1507
1508 * unstrip.c (compare_alloc_sections): At the same address, preserve
1509 original section order.
1510
1511 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1512 .debug_str, it didn't always have them with older tools.
1513
1514 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1515
15162007-10-05 Roland McGrath <roland@redhat.com>
1517
1518 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1519 ET_REL file.
1520
1521 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1522 SHN_UNDEF as "bad section". Use shndx value in messages.
1523
1524 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1525 for ".debug" so it matches as a prefix.
1526 (IS_KNOWN_SPECIAL): New macro.
1527 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1528 type even under -d, for a .debug* or .shstrtab section.
1529
1530 * readelf.c (print_ops): Use hex for address operand.
1531
15322007-10-04 Roland McGrath <roland@redhat.com>
1533
1534 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1535 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1536 sections mapped to SHN_UNDEF.
1537
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000015382007-10-04 Ulrich Drepper <drepper@redhat.com>
1539
1540 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1541 variable with older glibc versions.
1542 Add some branch prediction.
1543
Roland McGrath59ea7f32007-10-04 08:50:09 +000015442007-10-04 Roland McGrath <roland@redhat.com>
1545
1546 * readelf.c (print_archive_index): New variable.
1547 (options, parse_opt): Accept -c/--archive-index to set it.
1548 (dump_archive_index): New function.
1549 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1550 Call dump_archive_index on archives if set.
1551 (main): Update caller.
1552 (any_control_option): Give it file scope, moved out of ...
1553 (parse_opt): ... here.
1554
15552007-10-03 Roland McGrath <roland@redhat.com>
1556
1557 * unstrip.c (struct arg_info): Add `list' flag.
1558 (options, parse_opt): Grok -n/--list to set it.
1559 (list_module): New function.
1560 (handle_implicit_modules): Call it under -n.
1561
1562 * elflint.c (check_note_section): New function.
1563 (check_sections): Call it for SHT_NOTE.
1564
1565 * readelf.c (handle_notes): Use sections when available.
1566
1567 * elflint.c (check_note_data): New function, broken out of ...
1568 (check_note): ... here. Call it and elf_getdata_rawchunk.
1569
1570 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1571 Use elf_getdata_rawchunk and gelf_getauxv.
1572 (handle_notes_data): New function, broken out of ...
1573 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1574
Roland McGrath241ac022007-10-01 18:21:46 +000015752007-10-01 Roland McGrath <roland@redhat.com>
1576
Roland McGrathac0a16c2007-10-01 18:50:35 +00001577 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1578
Roland McGrath241ac022007-10-01 18:21:46 +00001579 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1580
Roland McGrathc76f0b02007-09-27 07:31:33 +000015812007-09-10 Roland McGrath <roland@redhat.com>
1582
1583 * readelf.c (options): Give -p optional argument, alias --string-dump.
1584 (string_sections, string_sections_tail): New static variables.
1585 (parse_opt): Set them when -p has an argument.
1586 (print_string_section): New function, broken out of ...
1587 (print_strings): ... here. Call it.
1588 (dump_data_section): New function, broken out of ...
1589 (dump_data): ... here. Call it.
1590 (for_each_section_argument): New function, broken out of ...
1591 (dump_data): ... here. Call it.
1592 (dump_strings): New function.
1593
15942007-08-31 Roland McGrath <roland@redhat.com>
1595
1596 * readelf.c (print_strings): Typo fix.
1597
Roland McGrathcb6d8652007-08-23 08:10:54 +000015982007-08-23 Roland McGrath <roland@redhat.com>
1599
1600 * readelf.c (printf_with_wrap): Function removed.
1601 (REGISTER_WRAP_COLUMN): New macro.
1602 (handle_core_register): Use print_core_item instead.
1603 (struct register_info): New type.
1604 (compare_registers, compare_register_sets): New functions.
1605 (register_bitpos, compare_sets_by_info): New functions.
1606 (handle_core_registers): Use those to segregate and sort registers
1607 for display.
1608
1609 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1610 (print_core_item): New function.
1611 (handle_core_item): Use it instead of printf_with_wrap.
1612 (compare_core_items, compare_core_item_groups): New functions.
1613 (handle_core_items): Use them. Sort by group and force line breaks
1614 between groups.
1615
1616 * readelf.c (handle_core_registers, handle_core_items): New functions,
1617 broken out of ...
1618 (handle_core_note): ... here. Call them.
1619
16202007-08-22 Roland McGrath <roland@redhat.com>
1621
1622 * unstrip.c (new_shstrtab): New function, broken out of ...
1623 (copy_elided_sections): ... here.
1624
16252007-08-20 Roland McGrath <roland@redhat.com>
1626
1627 Avoid local function trampolines in nm binary.
1628 * nm.c (sort_by_address): Move to a static function instead of local
1629 inside show_symbols.
1630 (sort_by_name_strtab): New static variable.
1631 (sort_by_name): Use it. Move to a static function instead of local
1632 inside show_symbols.
1633 (show_symbols): Set sort_by_name_strtab.
1634
16352007-08-19 Roland McGrath <roland@redhat.com>
1636
1637 * readelf.c (handle_auxv_note): New function.
1638 (handle_notes): Call it.
1639
1640 * readelf.c (printf_with_wrap, convert): New functions.
1641 (handle_core_item, (handle_core_register): New functions.
1642 (handle_notes): Call those with details from ebl_core_note.
1643
Roland McGrath099dd522007-08-13 22:58:36 +000016442007-08-12 Roland McGrath <roland@redhat.com>
1645
1646 * elflint.c (check_note): Accept type 0 with name "Linux".
1647
1648 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1649
1650 * elflint.c (section_flags_string): Return "none" for 0, not "".
1651
Roland McGrathd8221722007-08-11 21:18:09 +000016522007-08-11 Roland McGrath <roland@redhat.com>
1653
1654 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1655
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000016562007-08-04 Ulrich Drepper <drepper@redhat.com>
1657
1658 * readelf.c (hex_dump): Use isprint to determine whether to print
1659 character itself or full stop character.
1660 (dump_data): No need to check endp for NULL after strtol call.
1661
Roland McGrath60fc84c2007-08-03 21:59:15 +000016622007-08-03 Roland McGrath <roland@redhat.com>
1663
1664 * readelf.c (print_string_sections): New variable.
1665 (options, parse_opt): Handle --strings/-p to set it.
1666 (print_strings): New function.
1667 (process_elf_file): Call it under -p.
1668
1669 * readelf.c (options): Add hidden aliases --segments, --sections,
1670 as taken by binutils readelf.
1671
16722007-08-01 Roland McGrath <roland@redhat.com>
1673
1674 * readelf.c (dump_data_sections, dump_data_sections_tail):
1675 New variables.
1676 (options, parse_opt): Handle --hex-dump/-x, set them.
1677 (hex_dump): New function.
1678 (dump_data): New function, call it.
1679 (process_elf_file): Call it.
1680
16812007-07-25 Roland McGrath <roland@redhat.com>
1682
1683 * addr2line.c (show_symbols): New variable.
1684 (print_addrsym): New function.
1685 (handle_address): Call it.
1686 (options, parse_opt): Handle -S/--symbols.
1687
Ulrich Drepperb0243862007-06-06 00:09:36 +000016882007-06-05 Ulrich Drepper <drepper@redhat.com>
1689
1690 * addr2line.c: Update for latest autoconf header.
1691 * ar.c: Likewise.
1692 * elfcmp.c: Likewise.
1693 * elflint.c: Likewise.
1694 * findtextrel.c: Likewise.
1695 * ld.c: Likewise.
1696 * ldgeneric.c: Likewise.
1697 * nm.c: Likewise.
1698 * objdump.c: Likewise.
1699 * ranlib.c: Likewise.
1700 * readelf.c: Likewise.
1701 * size.c: Likewise.
1702 * strings.c: Likewise.
1703 * strip.c: Likewise.
1704 * unstrip.c: Likewise.
1705
Roland McGrath9aa8ef72007-05-18 08:59:43 +000017062007-05-18 Roland McGrath <roland@redhat.com>
1707
1708 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1709 stripped file, so as not to duplicate a section copied in both.
1710
1711 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1712
17132007-05-17 Roland McGrath <roland@redhat.com>
1714
1715 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1716
1717 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1718
1719 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1720 call make_directories here.
1721 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1722 (handle_dwfl_module): Likewise.
1723 (handle_implicit_modules): Update callers.
1724 (handle_output_dir_module): Likewise. Don't do make_directories here.
1725
1726 * unstrip.c (get_section_name): New function, broken out of ...
1727 (copy_elided_sections): here. Update callers.
1728 (find_alloc_section): Broken out of ...
1729 (copy_elided_sections): ... here. Update caller.
1730 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1731 update STT_SECTION symbols' st_value fields as a side effect.
1732 (check_symtab_section_symbols): Update caller.
1733 (add_new_section_symbols): Set st_value in symbols added.
1734 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1735 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1736 from .bss to .dynbss.
1737 (find_alloc_sections_prelink): New function. Associate debug file
1738 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1739 .gnu.prelink_undo information.
1740 (copy_elided_sections): Call it when we couldn't find every allocated
1741 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1742 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1743 (handle_file): Update callers.
1744
1745 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1746 named ".comment".
1747
1748 * elflint.c (check_sections): Fix association of segments with
1749 sections when p_memsz > p_filesz.
1750
17512007-04-29 Roland McGrath <roland@redhat.com>
1752
1753 * addr2line.c (options, main): Tweak argp group settings to fix
1754 usage output.
1755
17562007-04-28 Roland McGrath <roland@redhat.com>
1757
1758 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1759 sizes to match sections adjusted in the stripped file.
1760
Roland McGrath4be15242007-04-25 03:09:33 +000017612007-04-24 Roland McGrath <roland@redhat.com>
1762
1763 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1764 (hash_inexact): New variable.
1765 (options, parse_opt): Add --hash-inexact option to set it.
1766 (hash_content_equivalent): New function.
1767 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1768
17692007-04-23 Roland McGrath <roland@redhat.com>
1770
1771 * unstrip.c: New file.
1772 * Makefile.am (bin_PROGRAMS): Add it.
1773 (unstrip_LDADD): New variable.
1774
1775 * strip.c (options): Allow --output for -o.
1776
Ulrich Drepper8b383102007-02-16 00:31:57 +000017772007-02-15 Ulrich Drepper <drepper@redhat.com>
1778
1779 * readelf.c: Remove unused code. Add a few consts.
1780
Ulrich Drepper903c1162007-02-15 19:40:37 +000017812007-02-15 Roland McGrath <roland@redhat.com>
1782
1783 * readelf.c (print_debug): Fix brainos in SHDR test.
1784
Roland McGrathf82a1ec2007-02-06 04:47:44 +000017852007-02-05 Roland McGrath <roland@redhat.com>
1786
1787 * ar.c: Include <limits.h>, since we use LONG_MAX.
1788
Ulrich Drepper0fe63532007-02-05 21:05:51 +000017892007-02-05 Ulrich Drepper <drepper@redhat.com>
1790
Ulrich Drepper8b383102007-02-16 00:31:57 +00001791 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001792 ignore fchown's return value.
1793 (do_oper_insert): Handle error when writing padding.
1794 * ranlib.c: Add fchown complain work around.
1795
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001796 * arlib.c: Make symtab a global variable. Change all users.
1797 * arlib2.c: Likewise.
1798 * ranlib.c: Likewise.
1799 * ar.c: Likewise.
1800 * arlib.h: Declare it.
1801
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000018022007-01-11 Roland McGrath <roland@redhat.com>
1803
1804 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1805 SHF_MASKPROC bits separately from generic sh_flags validation.
1806
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000018072007-02-04 Ulrich Drepper <drepper@redhat.com>
1808
1809 * ar.c: New file.
1810 * arlib.c: New file.
1811 * arlib2.c: New file.
1812 * arlib.h: New file.
1813 * Makefile (noinst_LIBRARIES): Add libar.
1814 (libar_a_SOURCES): Define.
1815 (ar_LDADD): Define.
1816 (CFLAGS_ar): Define.
1817 * ranlib.c: Change to use arlib.
1818
1819 * elflint.c (check_symtab): Work around GNU ld bug which omits
1820 sections but not symbols in those sections.
1821
Ulrich Drepperb770cf92007-01-10 21:02:34 +000018222007-01-10 Ulrich Drepper <drepper@redhat.com>
1823
1824 * addr2line.c: Update copyright year.
1825 * elfcmp.c: Likewise.
1826 * elflint.c: Likewise.
1827 * findtextrel.c: Likewise.
1828 * ld.c: Likewise.
1829 * nm.c: Likewise.
1830 * objdump.c: Likewise.
1831 * ranlib.c: Likewise.
1832 * readelf.c: Likewise.
1833 * size.c: Likewise.
1834 * strings.c: Likewise.
1835 * strip.c: Likewise.
1836
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000018372006-12-09 Ulrich Drepper <drepper@redhat.com>
1838
1839 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1840 two hash tables have different content (module expected omission
1841 of undefined symbols).
1842
Roland McGrath8190db62006-12-17 23:56:51 +000018432006-10-31 Roland McGrath <roland@redhat.com>
1844
1845 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001846 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001847
18482006-09-19 Jakub Jelinek <jakub@redhat.com>
1849
1850 * strip.c (process_file): Disallow -f on archives.
1851
18522006-10-09 Roland McGrath <roland@redhat.com>
1853
1854 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1855
Roland McGrathc373d852006-10-10 00:25:21 +000018562006-08-29 Roland McGrath <roland@redhat.com>
1857
1858 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1859
1860 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1861 Reported by Christian Aichinger <Greek0@gmx.net>.
1862
1863 * elflint.c (valid_e_machine): Add EM_ALPHA.
1864 Reported by Christian Aichinger <Greek0@gmx.net>.
1865
Ulrich Drepper231c5902006-08-08 22:00:11 +000018662006-08-08 Ulrich Drepper <drepper@redhat.com>
1867
1868 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1869 Keep track of which "high DT" entries are present.
1870 Check that either old or GNU-style hash table is present.
1871 If GNU-style hash table is used a symbol table is mandatory.
1872 Check that if any prelink entry is present all of them are.
1873 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1874 table if they don't refer to functions.
1875
Roland McGrath858b1892006-07-17 08:41:15 +000018762006-07-17 Roland McGrath <roland@redhat.com>
1877
1878 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1879 (add_version): Likewise for argument.
1880 (check_versym): Cast constant to GElf_Versym for comparison.
1881
Roland McGrath4ec807e2006-07-13 03:59:46 +000018822006-07-12 Roland McGrath <roland@redhat.com>
1883
1884 * readelf.c (handle_gnu_hash): Add casts for machines where
1885 Elf32_Word != unsigned int.
1886
Ulrich Drepperdcf61602006-07-12 19:59:02 +000018872006-07-12 Ulrich Drepper <drepper@redhat.com>
1888
1889 * elflint.c (check_sysv_hash64): Fix printf format.
1890
Ulrich Dreppercc415622006-07-12 19:42:23 +000018912006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001892
Ulrich Dreppercc415622006-07-12 19:42:23 +00001893 * addr2line.c (options): English fix in -f doc string.
1894
1895 * addr2line.c (use_comp_dir): New variable.
1896 (options, parse_opt): Grok -A/--absolute to set it.
1897 (handle_address): If set, prepend dwfl_line_comp_dir results to
1898 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001899
Ulrich Drepper28ed8952006-07-07 03:43:47 +000019002006-07-06 Ulrich Drepper <drepper@redhat.com>
1901
1902 * elflint.c: Adjust for latest new hash table format.
1903 * readelf.c: Likewise.
1904
1905 * elflint.c (check_versym): Ignore hidden bit when comparing version
1906 numbers.
1907
19082006-07-05 Ulrich Drepper <drepper@redhat.com>
1909
1910 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1911 discarded COMDAT symbols.
1912
1913 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1914 (elf_i386_create_relocations): Likewise.
1915 * ld.h (struct symbol): Add local and hidden bits.
1916 * ld.c (create_special_section_symbol): These synthsized symbols
1917 are local and hidden.
1918 * ldgeneric.c (file_process2): Check whether input file matches
1919 the emulation.
1920 (fillin_special_symbol): Create symbols as local and/or hidden
1921 if requested.
1922 (ld_generic_create_outfile): Make local copy of symbol.
1923 Don't hide global, defined symbols in dynamic symbol table unless
1924 requested. Synthetic symbols have no version information.
1925
1926 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1927 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1928
19292006-07-04 Ulrich Drepper <drepper@redhat.com>
1930
1931 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1932 testing.
1933
19342006-07-03 Ulrich Drepper <drepper@redhat.com>
1935
1936 * elflint.c: Add testing of DT_GNU_HASH.
1937 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1938
1939 * Makefile.am: Add hacks to create dependency files for non-generic
1940 linker.
1941
Ulrich Drepper6ca46002006-06-12 22:40:23 +000019422006-06-12 Ulrich Drepper <drepper@redhat.com>
1943
1944 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1945 section if creating a DSO and no interpreter is given.
1946 (ld_generic_create_outfile): Don't store reference to symbols in
1947 discarded COMDAT groups. Don't create PHDR and INTERP program header
1948 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001949 (create_verneed_data): Pretty printing.
1950
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001951 * ldscript.y (content): If a DSO is created don't set default
1952 interpreter from linker script.
1953
1954 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1955 for symbols in discarded COMDAT groups.
1956 (elf_i386_create_relocations): Likewise.
1957 * ld.h (struct scninfo): Add unused_comdat.
1958 * ldgeneric.c (add_section): Also check group signature when
1959 matching COMDAT sections.
1960 (add_relocatable_file): Ignore symbols in COMDAT group which are
1961 discarded.
1962
1963 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1964 and symbol reference.
1965
Ulrich Drepper54f33a72006-06-11 09:07:37 +000019662006-06-11 Ulrich Drepper <drepper@redhat.com>
1967
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001968 * elflint.c (check_dynamic): Fix checking value of tags which are
1969 offsets in the string section. Make sure DT_STRTAB points to the
1970 section referenced in sh_link.
1971
1972 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1973
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001974 * ld.c: Recognize --eh-frame-hdr option.
1975 * ld.h (struct ld_state): Add eh_frame_hdr field.
1976 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1977
1978 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1979 SH_FLAGS_COMBINE.
1980 (add_relocatable_file): Minor optimization of last change.
1981 (match_section): Don't preserve SHF_GROUP flag any longer.
1982
Ulrich Drepper2d880282006-06-11 00:20:43 +000019832006-06-10 Ulrich Drepper <drepper@redhat.com>
1984
1985 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001986 Handle record and ignore as position dependent options.
1987 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001988 * ld.h (struct ld_state): Add execstack field.
1989 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1990 sections.
1991 (ld_generic_create_outfile): Fix program header creation in native
1992 linker. Add PT_GNU_STACK program header.
1993
Ulrich Dreppera688a732006-06-10 06:33:00 +000019942006-06-09 Ulrich Drepper <drepper@redhat.com>
1995
1996 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1997 for PLT entries if there is no local definition.
1998
1999 * ld.c (parse_option): Handle -z ignore like --as-needed and
2000 -z record like --no-as-needed.
2001 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
2002 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
2003 looping over DSOs. When deciding about adding DT_NEEDED entries
2004 use ->as_needed instead of ignore_unused_dsos.
2005
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000020062006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002007
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00002008 * ld.c: Recognize --as-needed and --no-as-needed options.
2009 * ld.h (struct usedfile): Add as_needed field.
2010 (struct ld_state): Likewise.
2011 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
2012 the list.
2013 * ldscript.y (filename_id_list): Split to correctly parse all
2014 combinations.
2015 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002016
Ulrich Drepper697f4db2006-06-10 06:50:47 +000020172006-05-28 Ulrich Drepper <drepper@redhat.com>
2018
2019 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2020 and colno.
2021
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000020222006-05-27 Ulrich Drepper <drepper@redhat.com>
2023
2024 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002025 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002026
Ulrich Drepper82c345d2006-04-04 22:07:54 +000020272006-04-04 Ulrich Drepper <drepper@redhat.com>
2028
2029 * addr2line.c: Update copyright year.
2030 * elfcmp.c: Likewise.
2031 * elflint.c: Likewise.
2032 * findtextrel.c: Likewise.
2033 * ld.c: Likewise.
2034 * nm.c: Likewise.
2035 * objdump.c: Likewise.
2036 * ranlib.c: Likewise.
2037 * readelf.c: Likewise.
2038 * size.c: Likewise.
2039 * strings.c: Likewise.
2040 * strip.c: Likewise.
2041
Roland McGrathdd7e22b2006-03-09 23:05:47 +000020422006-03-09 Roland McGrath <roland@redhat.com>
2043
2044 * Makefile.am (AM_LDFLAGS): New variable.
2045
Roland McGrath060fa052006-03-02 07:51:50 +000020462006-03-01 Roland McGrath <roland@redhat.com>
2047
2048 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2049 for dwarf.h changes matching 3.0 spec.
2050 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2051
Ulrich Drepper038129b2005-12-04 16:47:24 +000020522005-12-04 Ulrich Drepper <drepper@redhat.com>
2053
2054 * elflint.c (check_one_reloc): If relocation section is not loaded,
2055 don't check whether the relocations modify read-only sections or
2056 loaded and unloaded sections.
2057
Ulrich Drepper607e0542005-12-04 15:51:06 +000020582005-11-28 Ulrich Drepper <drepper@redhat.com>
2059
2060 * elflint.c (check_one_reloc): Take additional parameters. Use
2061 them to determine whether relocation is valid in this type of
2062 file. DSOs and executables can contain relocation sections in
2063 unloaded sections which just show the relocations the linker
2064 applied. Adjust all callers.
2065 (check_program_header): Check that PT_PHDR is loaded and that offset
2066 matches the one in the ELF header.
2067
Roland McGrath6724c902005-10-28 07:07:19 +000020682005-10-26 Roland McGrath <roland@redhat.com>
2069
2070 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2071
Ulrich Drepperd0449522005-09-03 07:23:52 +000020722005-09-03 Ulrich Drepper <drepper@redhat.com>
2073
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002074 * strip.c (handle_elf): Unify some error messages.
2075 * ld.c (main): Likewise.
2076 * ldgeneric.c (open_elf): Likewise.
2077 * elfcmp.c (main): Likewise.
2078 * elflint.c (check_elf_header): Likewise.
2079
2080 * size.c (process_file): Fix typo in error message.
2081
Ulrich Drepperd0449522005-09-03 07:23:52 +00002082 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2083
Ulrich Dreppera60501e2005-09-02 19:50:17 +000020842005-09-02 Ulrich Drepper <drepper@redhat.com>
2085
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002086 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002087 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002088
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000020892005-08-28 Ulrich Drepper <drepper@redhat.com>
2090
2091 * ranlib.c: Don't define pread_retry and write_retry here.
2092
2093 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2094 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2095
2096 * strings.c (process_chunk): Reorder expressions in conditional
2097 (process_chunk_mb): Likewise.
2098
2099 * strings.c: New file.
2100 * Makefile.am (bin_PROGRAMS): Add strings.
2101 (strings_no_Wstring): Define.
2102 (strings_LDADD): Define.
2103
Roland McGrath71e15a02005-08-27 10:33:26 +000021042005-08-27 Roland McGrath <roland@redhat.com>
2105
2106 * addr2line.c (dwarf_diename_integrate): Function removed.
2107 (print_dwarf_function): Use plain dwarf_diename.
2108
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000021092005-08-24 Ulrich Drepper <drepper@redhat.com>
2110
2111 * elflint.c (check_versym): Versioned symbols should not have
2112 local binding.
2113
Ulrich Drepper5d832292005-08-15 21:36:27 +000021142005-08-15 Ulrich Drepper <drepper@redhat.com>
2115
Ulrich Drepper61655e02005-08-16 04:23:02 +00002116 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2117 undefined.
2118
Ulrich Drepper5d832292005-08-15 21:36:27 +00002119 * Makefile.am: Add rules to build ranlib.
2120 * ranlib.c: New file.
2121
Roland McGrath18e13422005-08-15 08:01:25 +000021222005-08-14 Roland McGrath <roland@redhat.com>
2123
2124 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2125 sh_type it recognizes.
2126
2127 * elflint.c (check_sections): Print unknown flags in hex, don't
2128 truncate high bits. Print section number and name for unknown type.
2129
Roland McGrathf6895042005-08-13 20:56:52 +000021302005-08-13 Roland McGrath <roland@redhat.com>
2131
2132 * elflint.c (check_program_header): Use ebl_segment_type_name and
2133 allow any p_type it recognizes. Include p_type value in error
2134 message for unknown type.
2135
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000021362005-08-13 Ulrich Drepper <drepper@redhat.com>
2137
2138 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2139 to ebl_check_special_symbol.
2140 (check_sections): Pass ehdr to ebl_bss_plt_p.
2141
Roland McGrath653d3762005-08-13 01:59:10 +000021422005-08-12 Roland McGrath <roland@redhat.com>
2143
2144 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2145 refers to the right section if it's not SHN_ABS.
2146 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2147
2148 * elflint.c (check_sections): Don't complain about a non-NOBITS
2149 section taking no segment space, if it's sh_size is 0.
2150
2151 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2152 be PROGBITS or NOBITS.
2153
2154 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2155 standard st_value and st_size checks.
2156
Roland McGrath1c83bf12005-08-11 07:03:55 +000021572005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002158
Roland McGrath1c83bf12005-08-11 07:03:55 +00002159 * addr2line.c (options, parse_opt): Don't handle -e here.
2160 (executable): Variable removed.
2161 (argp_children): New static variable.
2162 (argp): Use it. Make const.
2163 (main): Fill in argp_children from dwfl_standard_argp ().
2164 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2165 (print_dwarf_function): New function. Try to figure out inline chain.
2166 (elf_getname): Function removed, libdwfl does it for us.
2167 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2168 Use dwfl_module_addrname instead of elf_getname.
2169 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2170 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2171
21722005-08-10 Ulrich Drepper <drepper@redhat.com>
2173
2174 * strip.c (parse_opt): STATE parameter is now used.
2175 Various little cleanups.
2176
2177 * readelf.c (print_debug_line_section): Correct fallout of renaming
2178 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002179
Roland McGrath8f31c2c2005-08-09 04:58:05 +000021802005-08-08 Roland McGrath <roland@redhat.com>
2181
2182 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2183 with binutils strip. Likewise -d, -S, as aliases for -g.
2184 Likewise ignore -s/--strip-all.
2185
Roland McGrath095a01b2005-08-08 03:49:35 +000021862005-08-07 Roland McGrath <roland@redhat.com>
2187
2188 * strip.c (process_file): Open read-only when using a different output
2189 file.
2190
Ulrich Drepper47be7952005-08-07 04:41:39 +000021912005-08-06 Ulrich Drepper <drepper@redhat.com>
2192
Ulrich Drepper637963b2005-08-07 05:33:07 +00002193 * elflint.c (in_nobits_scn): New function.
2194 (check_versym): Allow references for defined symbols against versions
2195 of other DSOs also for symbols in nobits sections.
2196 Move a few variables around.
2197
Ulrich Drepper47be7952005-08-07 04:41:39 +00002198 * Makefile.am (AM_CFLAGS): Avoid duplication.
2199 Link with statis libs if BUILD_STATIC.
2200
Ulrich Drepperdbace232005-08-06 01:37:23 +000022012005-08-05 Ulrich Drepper <drepper@redhat.com>
2202
2203 * elflint.c: Many, many more tests. Mostly related to symbol
2204 versioning. Those sections should now be completely checked.
2205
2206 * readelf.c (print_dynamic): Use gelf_offscn.
2207
Ulrich Drepperacb89832005-08-04 07:01:49 +000022082005-08-04 Ulrich Drepper <drepper@redhat.com>
2209
2210 * elflint.c: Add lots more tests: more extension symbol table sanity,
2211 versioning section tests, hash table tests. General cleanup.
2212
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000022132005-08-02 Ulrich Drepper <drepper@redhat.com>
2214
Ulrich Drepper8a687742005-08-03 02:24:12 +00002215 * objdump.c: New file.
2216 * Makefile.am (bin_PROGRAMS): Add objdump.
2217 (objdump_LDADD): Define.
2218
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002219 * elflint.c (check_reloc_shdr): New function split out from check_rela
2220 and check_rel.
2221 (check_one_reloc): New function. Likewise.
2222 (check_rela): Use check_reloc_shdr and check_one_reloc.
2223 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002224 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2225 section.
2226 Add checks that relocations against read-only segments are flagged,
2227 that the text relocation flag is not set unnecessarily, and that
2228 relocations in one section are either against loaded or not-loaded
2229 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002230
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000022312005-08-01 Ulrich Drepper <drepper@redhat.com>
2232
2233 * elfcmp.c (main): Ignore section count and section name string table
2234 section index.
2235
Roland McGrathf9ece8a2005-07-28 07:03:04 +000022362005-07-27 Roland McGrath <roland@redhat.com>
2237
2238 * elfcmp.c: Include <locale.h>.
2239
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000022402005-07-27 Ulrich Drepper <drepper@redhat.com>
2241
2242 * elfcmp.c: Print name and index of differing section.
2243
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000022442005-07-24 Ulrich Drepper <drepper@redhat.com>
2245
2246 * elfcmp.c: Implement comparing gaps between sections.
2247
22482005-07-23 Ulrich Drepper <drepper@redhat.com>
2249
2250 * elflint.c: Include libeblP.h instead of libebl.h.
2251 * nm.c: Likewise.
2252 * readelf.c: Likewise.
2253 * elfcmp.c: Likewise.
2254
2255 * elfcmp.c (main): Compare individual ELF header fields, excluding
2256 e_shoff instead of the whole struct at once.
2257 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2258 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2259
22602005-07-22 Ulrich Drepper <drepper@redhat.com>
2261
2262 * elfcmp.c (main): Take empty section into account when comparing
2263 section content.
2264
2265 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2266 using it.
2267
22682005-07-21 Ulrich Drepper <drepper@redhat.com>
2269
2270 * elfcmp.c: New file.
2271 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2272 (elfcmp_LDADD): Define.
2273
2274 * elflint.c (check_rela): Check that copy relocations only reference
2275 object symbols or symbols with unknown type.
2276 (check_rel): Likewise.
2277
22782005-06-08 Roland McGrath <roland@redhat.com>
2279
2280 * readelf.c (print_ops): Add consts.
2281
22822005-05-31 Roland McGrath <roland@redhat.com>
2283
2284 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2285 abbreviations. Print a header line before each CU section.
2286
2287 * readelf.c (print_debug_loc_section): Fix indentation for larger
2288 address size.
2289
22902005-05-30 Roland McGrath <roland@redhat.com>
2291
2292 * readelf.c (print_debug_line_section): Print section offset of each
2293 CU's table, so they are easy to find from seeing the stmt_list value.
2294
2295 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2296 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2297
2298 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2299 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2300
2301 * readelf.c (print_ops): Take different args for indentation control.
2302 (attr_callback): Caller updated.
2303 Grok several more block-form attributes as being location expressions.
2304 For those same attributes with udata forms, format output differently
2305 for location list offset.
2306 (print_debug_loc_section): Implement it for real.
2307
2308 * readelf.c (options): Mention ranges for --debug-dump.
2309 (enum section_e): Add section_ranges.
2310 (parse_opt): Grok "ranges" for -w/--debug-dump.
2311 (print_debug_ranges_section): New function.
2312 (print_debug): Handle .debug_ranges section.
2313
23142005-05-30 Ulrich Drepper <drepper@redhat.com>
2315
2316 * readelf.c (handle_notes): At least x86-64 need not have the note
2317 section values aligned to 8 bytes.
2318
23192005-05-18 Ulrich Drepper <drepper@redhat.com>
2320
2321 * readelf.c (dwarf_tag_string): Add new tags.
2322
23232005-05-08 Roland McGrath <roland@redhat.com>
2324
2325 * strip.c (handle_elf): Don't translate hash and versym data formats,
2326 elf_getdata already did it for us.
2327
23282005-05-07 Ulrich Drepper <drepper@redhat.com>
2329
2330 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2331 (addr2line_LDADD): Likewise.
2332
23332005-05-03 Roland McGrath <roland@redhat.com>
2334
2335 * strip.c (handle_elf): Apply symbol table fixups to discarded
2336 relocation sections when they are being saved in the debug file.
2337
2338 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2339 and gelf_xlatetof, not the native byte order.
2340
2341 * strip.c (parse_opt): Give error if -f or -o is repeated.
2342 (main): Exit if argp_parse returns nonzero.
2343
2344 * strip.c (debug_fname_embed): New variable.
2345 (options, parse_opt): New option -F to set it.
2346
23472005-05-07 Ulrich Drepper <drepper@redhat.com>
2348
2349 * readelf.c (parse_opt): Make any_control_option variable
2350 local. Simplify some tests.
2351
23522005-05-03 Roland McGrath <roland@redhat.com>
2353
2354 * strip.c (crc32_file): Function removed (now in ../lib).
2355
23562005-05-03 Roland McGrath <roland@redhat.com>
2357
2358 * elflint.c (is_debuginfo): New variable.
2359 (options, parse_opt): New option --debuginfo/-d to set it.
2360 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2361 (check_note): If is_debuginfo, don't try to get note contents.
2362
23632005-04-24 Ulrich Drepper <drepper@redhat.com>
2364
2365 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2366 section reached.
2367
23682005-04-14 Ulrich Drepper <drepper@redhat.com>
2369
2370 * readelf.c (dwarf_encoding_string): New function.
2371 (dwarf_inline_string): New function.
2372 (dwarf_access_string): New function.
2373 (dwarf_visibility_string): New function.
2374 (dwarf_virtuality_string): New function.
2375 (dwarf_identifier_case_string): New function.
2376 (dwarf_calling_convention_string): New function.
2377 (dwarf_ordering_string): New function.
2378 (dwarf_discr_list_string): New function.
2379 (attr_callback): Decode man more attribute values.
2380
23812005-04-01 Ulrich Drepper <drepper@redhat.com>
2382
2383 * addr2line.c: Finish implementation of -f option.
2384
23852005-03-29 Ulrich Drepper <drepper@redhat.com>
2386
2387 * addr2line.c: New file.
2388 * Makefile.am (bin_PROGRAMS): Add addr2line.
2389 Define addr2line_LDADD.
2390
2391 * findtextrel.c: Use new dwarf_addrdie function.
2392
2393 * findtextrel.c: Fix usage message and re-add accidentally removed
2394 line.
2395
23962005-03-28 Ulrich Drepper <drepper@redhat.com>
2397
2398 * findtextrel.c: New file.
2399 * Makefile: Add rules to build findtextrel.
2400
24012005-02-15 Ulrich Drepper <drepper@redhat.com>
2402
2403 * ldlex.l: Provide ECHO definition to avoid warning.
2404
2405 * elflint.c (check_program_header): Fix typo in RELRO test.
2406
2407 * Makefile.am (AM_CFLAGS): Add more warning options.
2408 * elflint.c: Fix warnings introduced by the new warning options.
2409 * i386_ld.c: Likewise.
2410 * ld.c: Likewise.
2411 * ld.h: Likewise.
2412 * ldgeneric.c: Likewise.
2413 * nm.c: Likewise.
2414 * readelf.c: Likewise.
2415 * sectionhash.c: Likewise.
2416 * size.c: Likewise.
2417 * string.c: Likewise.
2418
24192005-02-05 Ulrich Drepper <drepper@redhat.com>
2420
2421 * Makefile.am: Check for text relocations in constructed DSOs.
2422
2423 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2424 with -lmudflap.
2425
2426 * ldscript.y: Add as_needed handling.
2427 * ldlex.l: Recognize AS_NEEDED token.
2428 * ld.h (struct filename_list): Add as_needed flag.
2429
24302005-02-04 Ulrich Drepper <drepper@redhat.com>
2431
2432 * elflint.c (check_symtab): Correctly determine size of GOT section.
2433
24342005-01-19 Ulrich Drepper <drepper@redhat.com>
2435
2436 * ld.c: Remove unnecessary more_help function. Print bug report
2437 address using argp.
2438 * strip.c: Likewise.
2439 * size.c: Likewise.
2440 * nm.c: Likewise.
2441 * readelf.c: Likewise.
2442 * elflint.c: Likewise.
2443
2444 * elflint.c (main): Don't check for parameter problems here.
2445 (parse_opt): Do it here, where we get informed about some of them
2446 anyway.
2447
2448 * readelf.c (main): Don't check for parameter problems here.
2449 (parse_opt): Do it here, where we get informed about some of them
2450 anyway.
2451
24522005-01-11 Ulrich Drepper <drepper@redhat.com>
2453
2454 * strip.c: Update copyright year.
2455 * readelf.c: Likewise.
2456 * size.c: Likewise.
2457 * nm.c: Likewise.
2458 * ld.c: Likewise.
2459 * elflint.c: Likewise.
2460
2461 * elflint.c (check_symtab): Don't warn about wrong size for
2462 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2463
24642004-10-05 Ulrich Drepper <drepper@redhat.com>
2465
2466 * readelf.c (print_phdr): In section mapping, also indicate
2467 sections in read-only segments.
2468
24692004-09-25 Ulrich Drepper <drepper@redhat.com>
2470
2471 * readelf.c: Make compile with gcc 4.0.
2472 * strip.c: Likewise.
2473
24742004-08-16 Ulrich Drepper <drepper@redhat.com>
2475
2476 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2477 allocate to work around gcc 3.4 bug.
2478
24792004-01-25 Ulrich Drepper <drepper@redhat.com>
2480
2481 * ldlex.l (invalid_char): Better error message.
2482
24832004-01-23 Ulrich Drepper <drepper@redhat.com>
2484
2485 * readelf.c: Print SHT_GNU_LIBLIST sections.
2486
2487 * none_ld.c: New file.
2488
24892004-01-21 Ulrich Drepper <drepper@redhat.com>
2490
2491 * Makefile.am: Enable building of machine specific linker.
2492
24932004-01-20 Ulrich Drepper <drepper@redhat.com>
2494
2495 * Makefile.am: Support building with mudflap.
2496
2497 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2498 * ldgeneric.c: Likewise.
2499 * ldscript.y: Likewise.
2500 * readelf.c: Likewise.
2501 * strip.c: Likewise.
2502
2503 * readelf.c (print_debug_line_section): Determine address size
2504 correctly.
2505
25062004-01-19 Ulrich Drepper <drepper@redhat.com>
2507
2508 * readelf.c (print_phdr): Show which sections are covered by the
2509 PT_GNU_RELRO entry.
2510
2511 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2512
2513 * readelf.c (print_debug_macinfo_section): Implement.
2514
25152004-01-18 Ulrich Drepper <drepper@redhat.com>
2516
2517 * readelf.c (print_debug_line_section): Implement.
2518
25192004-01-17 Ulrich Drepper <drepper@redhat.com>
2520
2521 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2522 * src/ld.c: Likewise.
2523 * src/nm.c: Likewise.
2524 * src/readelf.c: Likewise.
2525 * src/size.c: Likewise.
2526 * src/strip.c: Likewise.
2527
2528 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2529
2530 * Makefile.am: Support building with mudflap.
2531
25322004-01-16 Ulrich Drepper <drepper@redhat.com>
2533
2534 * readelf.c (print_debug_info_section): Free dies memory.
2535
2536 * readelf.c: Print .debug_info section content.
2537
25382004-01-13 Ulrich Drepper <drepper@redhat.com>
2539
2540 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2541
25422004-01-12 Ulrich Drepper <drepper@redhat.com>
2543
2544 * readelf.c (print_debug_aranges): Implement using libdw.
2545
25462004-01-11 Ulrich Drepper <drepper@redhat.com>
2547
2548 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2549
2550 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2551 behavior is available yet.
2552 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2553
25542004-01-09 Ulrich Drepper <drepper@redhat.com>
2555
2556 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2557
2558 * nm.c: Implement getting information about local variables.
2559
25602004-01-07 Ulrich Drepper <drepper@redhat.com>
2561
2562 * nm.c: Read also debug information for local symbols.
2563
25642004-01-05 Ulrich Drepper <drepper@redhat.com>
2565
2566 * nm.c: Shuffle dwarf handling code around so the maximum column
2567 width can be computed ahead of printing. Avoid collection symbols
2568 which are not printed anyway.
2569
2570 * nm.c: Rewrite dwarf handling to use libdw.
2571 * Makefile.am (AM_CFLAGS): Add -std parameter.
2572 (INCLUDES): Find header in libdw subdir.
2573 (nm_LDADD): Replace libdwarf with libdw.
2574
2575 * elflint.c: Update copyright year.
2576 * readelf.c: Likewise.
2577 * size.c: Likewise.
2578 * strip.c: Likewise.
2579 * nm.c: Likewise.
2580
25812003-12-31 Ulrich Drepper <drepper@redhat.com>
2582
2583 * strip.c (process_file): Close file before returning.
2584
25852003-11-19 Ulrich Drepper <drepper@redhat.com>
2586
2587 * readelf.c (handle_dynamic): Make column for tag name wider.
2588
25892003-09-29 Ulrich Drepper <drepper@redhat.com>
2590
2591 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2592
25932003-09-25 Ulrich Drepper <drepper@redhat.com>
2594
2595 * strip.c (process_file): Don't mmap the input file, we modify the
2596 data structures and don't want the change end up on disk.
2597
25982003-09-23 Jakub Jelinek <jakub@redhat.com>
2599
2600 * unaligned.h (union u_2ubyte_unaligned,
2601 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2602 packed attribute.
2603 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2604 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2605 Read/store value through _ptr->u instead of *_ptr.
2606
26072003-09-22 Ulrich Drepper <drepper@redhat.com>
2608
2609 * size.c (show_sysv): Change type of maxlen to int.
2610
2611 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2612 buckets.
2613
2614 * i386_ld.c: Many many fixes and extensions.
2615 * ld.c: Likewise.
2616 * ldgeneric.c: Likewise.
2617
26182003-08-16 Ulrich Drepper <drepper@redhat.com>
2619
2620 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2621 the reference is from another DSO.
2622
26232003-08-15 Ulrich Drepper <drepper@redhat.com>
2624
2625 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2626 point is found when creating a DSO.
2627
26282003-08-14 Ulrich Drepper <drepper@redhat.com>
2629
2630 * ld.c (main): Always call FLAG_UNRESOLVED.
2631 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2632 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2633
26342003-08-13 Ulrich Drepper <drepper@redhat.com>
2635
2636 * Makefile.in: Depend on libebl.a, not libebl.so.
2637
2638 * ld.c (main): Mark stream for linker script as locked by caller.
2639 (read_version_script): Likewise.
2640 * ldlex.c: Define fread and fwrite to _unlocked variant.
2641
2642 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2643 target_bswap_32.
2644 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2645 target_bswap_64.
2646 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2647 store_8ubyte_unaligned): Define using new macros.
2648
26492003-08-12 Ulrich Drepper <drepper@redhat.com>
2650
2651 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2652 possibly unaligned memory. Support use of big endian machines.
2653
26542003-08-11 Ulrich Drepper <drepper@redhat.com>
2655
2656 * Moved to CVS archive.