blob: 6c6bd9dfdd7d369de4eae12fcdc2adc5f2f4e35c [file] [log] [blame]
Ulrich Drepper2356ba02011-10-03 07:23:07 -040012011-10-03 Ulrich Drepper <drepper@gmail.com>
2
3 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
4 but don't show it in help anymore.
5 (mark_special): Renamed from mark_weak.
6 (parse_opt): Adjust.
7 (class_type_char): Take additional parameters for ELF file and ELF
8 header. Treat TLS symbols like objects.
9 In case of D symbols, show u for unique symbols, R for symbols in
10 read-only sections, B for symbols in BSS sections.
11 (show_symbols_bad): Take additional parameters for ELF file and ELF
12 header. Adjust for class_type_char change. Show TLS symbols with
13 @ after them in case --mark-special is selected.
14 (show_symbols_posix): Likewise.
15 (show_symbols): Adjust calls to show_symbols_bsd and
16 show_symbols_posix.
17
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -0400182011-10-02 Ulrich Drepper <drepper@gmail.com>
19
20 * Makefile.am (demanglelib): Define.
21 (nm_LDADD): Add demanglelib.
22 * nm.c (options): Add -C option.
23 (demangle): Define as global variable.
24 (parse_opt): Recognize -C.
25 (show_symbols_sysv): Handle demangling.
26 (show_symbols_bad): Likewise.
27 (show_symbols_posix): Likewise.
28 (show_symbols): Likewise.
29
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700302011-07-09 Roland McGrath <roland@hack.frob.com>
31
Roland McGrathbd754192011-07-09 05:33:37 -070032 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
33
34 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -070035
Mark Wielaard02a958b2011-05-30 17:23:57 +0200362011-05-30 Mark Wielaard <mjw@redhat.com>
37
38 * strip.c (relocate): Make offset check overflow-proof.
39
Mark Wielaard1662bc32011-05-16 11:33:11 +0200402011-05-23 Mark Wielaard <mjw@redhat.com>
41
Mark Wielaard63868c22011-05-24 16:09:31 +020042 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -070043 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +020044 Relocate against any debug section symbol, not just STT_SECTION
45 symbols. For SHT_REL relocations, fetch addend from offset and
46 add it to symbol value if not zero.
47
482011-05-23 Mark Wielaard <mjw@redhat.com>
49
Mark Wielaard1662bc32011-05-16 11:33:11 +020050 * strip.c (OPT_RELOC_DEBUG): New option.
51 (argp_option): Add new --reloc-debug-sections option.
52 (main): Check new option.
53 (parse_opt): Likewise.
54 (handle_elf): Remove any relocations between debug sections
55 in ET_REL for the debug file when requested.
56
Mark Wielaard7a125b92011-05-17 12:20:01 +0200572011-05-18 Mark Wielaard <mjw@redhat.com>
58
59 * strip.c (handle_elf): Make sure all sections of a removed group
60 section are removed too. Don't discard SHT_GROUP sections, copy
61 section table before it gets modified. Section group signature
62 symbols don't have to be retained.
63
Jakub Jelinek03124242011-05-17 17:00:14 +0200642011-05-16 Jakub Jelinek <jakub@redhat.com>
65
66 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
67 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
68 and DW_OP_GNU_reinterpret.
69
Mark Wielaard69a9b112011-05-17 15:34:02 +0200702011-05-17 Mark Wielaard <mjw@redhat.com>
71
72 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
73 DW_TAG_GNU_call_site_parameter return strings.
74
Marek Polacekc8920de2011-05-12 12:08:21 +0200752011-05-11 Marek Polacek <mpolacek@redhat.com>
76
77 * nm.c (show_symbols_sysv): Remove unused if/else, remove
78 unused `prefix' and `fname' parameters.
79
Marek Polacek82f77d72011-05-07 19:26:20 +0200802011-05-07 Marek Polacek <mpolacek@redhat.com>
81
82 * unstrip.c (compare_sections_nonrel): Mark this function as static.
83
Mark Wielaardbb9d1b42011-04-24 17:53:38 +0200842011-04-26 Mark Wielaard <mjw@redhat.com>
85
86 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
87 with note name.
88
Mark Wielaard093a1d32011-04-14 23:47:26 +0200892011-04-14 Mark Wielaard <mjw@redhat.com>
90
91 * readelf.c (options): Add gdb_index.
92 (section_e): Define section_gdb_index.
93 (parse_opt): Recognize gdb_index debug-dump argument.
94 (print_gdb_index_section): New function.
95 (print_debug): Add gdb_index to debug_sections.
96
Petr Machata1879e5b2011-03-25 15:17:04 +0100972011-03-24 Petr Machata <pmachata@redhat.com>
98
99 * readelf.c (print_debug_line_section): Emit initial space for all
100 opcode lines. Print offset in front of each opcode.
101
Marek Polacek44de92a2011-03-22 01:07:20 +01001022011-03-22 Marek Polacek <mpolacek@redhat.com>
103
104 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
105
Mark Wielaarde3368c52011-03-22 23:03:31 +01001062011-03-22 Mark Wielaard <mjw@redhat.com>
107
108 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
109 and DW_TAG_GNU_call_site_parameter.
110 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
111 DW_AT_GNU_call_site_data_value,
112 DW_AT_GNU_call_site_target,
113 DW_AT_GNU_call_site_target_clobbered,
114 DW_AT_GNU_tail_call,
115 DW_AT_GNU_all_tail_call_sites,
116 DW_AT_GNU_all_call_sites,
117 and DW_AT_GNU_all_source_call_sites.
118 (print_ops): Handle DW_OP_GNU_entry_value.
119 (attr_callback): Handle DW_AT_GNU_call_site_value,
120 DW_AT_GNU_call_site_data_value,
121 DW_AT_GNU_call_site_target,
122 and DW_AT_GNU_call_site_target_clobbered.
123
Mark Wielaarda062b6b2011-03-10 13:02:32 +01001242011-03-10 Mark Wielaard <mjw@redhat.com>
125
126 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
127
Jan Kratochvilfec39992011-02-27 12:01:25 -08001282011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
129
130 * readelf.c (reset_listptr): Clear TABLE->TABLE.
131
Mark Wielaardcf454ab2011-02-25 12:58:54 +01001322011-02-25 Mark Wielaard <mjw@redhat.com>
133
134 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
135 (dwarf_form_string): Properly format and return unknown form.
136
Roland McGrath47c53232011-02-23 09:23:08 -08001372011-02-23 Roland McGrath <roland@redhat.com>
138
Roland McGrath725aad52011-02-23 19:52:46 -0800139 * readelf.c (section_name): New function.
140 (print_debug_abbrev_section): Use it instead of constant.
141 (print_debug_aranges_section): Likewise.
142 (print_debug_ranges_section): Likewise.
143 (print_debug_units): Likewise.
144 (print_debug_line_section): Likewise.
145 (print_debug_loc_section): Likewise.
146 (print_debug_macinfo_section): Likewise.
147 (print_debug_pubnames_section): Likewise.
148 (print_debug_str_section): Likewise.
149 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
150 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
151 (print_debug_str_section): Likewise.
152
Roland McGrath47c53232011-02-23 09:23:08 -0800153 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
154
Roland McGrath1fb9c912011-02-11 10:32:30 -08001552011-02-11 Roland McGrath <roland@redhat.com>
156
Roland McGrath4a14ef72011-02-11 10:42:45 -0800157 * elfcmp.c (verbose): New variable.
158 (options, parse_opt): Grok -l/--verbose to set it.
159 (main): Under -l, keep going after first difference.
160
Roland McGrath1fb9c912011-02-11 10:32:30 -0800161 * elfcmp.c (ignore_build_id): New variable.
162 (options, parse_opt): Grok --ignore-build-id to set it.
163 (main): For SHT_NOTE sections, compare note details rather than raw
164 bytes. Under --ignore-build-id, don't complain about differing build
165 ID contents if lengths match.
166
Roland McGrathfd992542011-02-08 19:45:12 -08001672011-02-08 Roland McGrath <roland@redhat.com>
168
Roland McGrath240784b2011-02-08 19:48:42 -0800169 * ldscript.y (filename_id_star): Remove unused variable.
170
Roland McGrath8f6c1792011-02-08 19:48:02 -0800171 * unstrip.c (copy_elided_sections): Remove unused variable.
172
Roland McGrath4db89f02011-02-08 19:46:50 -0800173 * elflint.c (check_dynamic): Remove unused variables.
174
Roland McGrath33231312011-02-08 19:45:26 -0800175 * elflint.c (check_symtab): Warn about missing xndx section only once.
176
Roland McGrathfd992542011-02-08 19:45:12 -0800177 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
178
Roland McGrathf151b7d2011-01-06 12:14:43 -08001792011-01-06 Roland McGrath <roland@redhat.com>
180
181 * strip.c (handle_elf): Under --strip-sections, remove all
182 non-allocated sections and never generate .gnu_debuglink.
183
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08001842011-01-04 Roland McGrath <roland@redhat.com>
185
186 * strip.c (remove_shdrs): New variable.
187 (options, parse_opt): Grok --strip-sections to set it.
188 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
189
Roland McGrath77221de2010-11-10 19:47:31 -08001902010-11-10 Roland McGrath <roland@redhat.com>
191
192 * findtextrel.c (process_file): Don't assume order of sections.
193 Reported by Mike Hommey <mh@glandium.org>.
194
Roland McGrath932585d2010-05-08 04:01:14 -07001952010-07-26 Roland McGrath <roland@redhat.com>
196
197 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
198
Roland McGratha1599152010-08-30 04:04:37 -07001992010-08-30 Roland McGrath <roland@redhat.com>
200
Roland McGrathfa144952010-08-30 19:22:41 -0700201 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
202 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
203 for ranges, loc.
204 (struct listptr, struct listptr_table): New types.
205 (compare_listptr, reset_listptr, sort_listptr): New functions.
206 (notice_listptr, skip_listptr_hole): New functions.
207 (struct attrcb_args): Add silent member.
208 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
209 Suppress output if silent, but still call notice_listptr.
210 (print_debug_units): Suppress output if section_info not requested.
211 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
212 (print_debug_ranges_section): Likewise.
213 (print_debug): Call reset_listptr on both tables.
214
215 * readelf.c (print_debug_ranges_section): Print empty list.
216 (print_debug_loc_section): Likewise.
217
Roland McGratha1599152010-08-30 04:04:37 -0700218 * readelf.c (print_debug_loc_section): Check for bogus length
219 before calling print_ops.
220 (print_ops): Check harder for bogus data that would read off end.
221
Roland McGrathf4763cf2010-08-11 13:04:12 -07002222010-08-11 Roland McGrath <roland@redhat.com>
223
224 * readelf.c (for_each_section_argument): Process all sections with
225 matching name, not just the first.
226
Roland McGrath52604ba2010-07-26 21:29:44 -07002272010-07-26 Roland McGrath <roland@redhat.com>
228
229 * readelf.c (print_ops): Take new argument for CU version.
230 Fix DW_OP_call_ref decoding to depend on it.
231 (print_debug_loc_section): Update caller.
232 (print_cfa_program): Take new argument, pass it down.
233 (print_debug_frame_section): Update caller.
234 (struct attrcb_args): New member version.
235 (print_debug_units): Initialize it.
236
Roland McGrath2f14a312010-07-02 11:16:25 -07002372010-07-02 Roland McGrath <roland@redhat.com>
238
239 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
240 initial_location.
241
Roland McGrathb6458032010-06-30 11:57:19 -07002422010-06-30 Roland McGrath <roland@redhat.com>
243
244 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
245 Ignore st_size for a non-S_ISREG file descriptor.
246 (read_block): Move assert after no-mmap bail-out.
247 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
248
Roland McGrathfa799902010-06-22 13:05:23 -07002492010-06-22 Roland McGrath <roland@redhat.com>
250
251 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
252
Roland McGrath0c5638c2010-06-21 23:00:35 -07002532010-06-21 Roland McGrath <roland@redhat.com>
254
255 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700256 (dwarf_attr_string): Add new attributes.
257 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700258
259 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
260 (print_cfa_program): Likewise.
261
Roland McGrathe5251a12010-06-20 16:59:39 -07002622010-06-20 Roland McGrath <roland@redhat.com>
263
Roland McGrath2b1f0952010-06-20 17:55:50 -0700264 * readelf.c (print_debug_units): New function, broken out of ...
265 (print_debug_info_section): ... here. Call it.
266 (print_debug_types_section): New function.
267 (enum section_e): Add section_types alias for section_info.
268 (print_debug): Add types to the sections table.
269
Roland McGrath599f7f52010-06-20 17:12:43 -0700270 * readelf.c (print_debug_frame_section): Handle version 4 format.
271
Roland McGrathe5251a12010-06-20 16:59:39 -0700272 * readelf.c (print_debug_line_section): Handle version 4 format.
273
Roland McGrathec86e5f2010-06-14 17:44:38 -07002742010-06-14 Roland McGrath <roland@redhat.com>
275
276 * unstrip.c (copy_elided_sections): Make sure all sections' data have
277 been read in before we write anything out.
278
Roland McGrath3b1b6512010-06-04 02:26:30 -07002792010-06-04 Roland McGrath <roland@redhat.com>
280
Roland McGrathaa32f922010-06-04 02:29:08 -0700281 * unstrip.c (update_shdr): New function.
282 (update_sh_size): Call it instead of gelf_update_shdr.
283 (adjust_relocs, add_new_section_symbols): Likewise.
284 (new_shstrtab, copy_elided_sections): Likewise.
285
Roland McGrath3b1b6512010-06-04 02:26:30 -0700286 * unstrip.c (copy_elided_sections): Bail if stripped file has more
287 sections than unstripped file, rather than getting confused later.
288
Roland McGrath7a5bed82010-06-01 13:44:00 -07002892010-06-01 Roland McGrath <roland@redhat.com>
290
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700291 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
292 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700293 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700294
Roland McGrath7a5bed82010-06-01 13:44:00 -0700295 * readelf.c (print_debug): Don't bail if libdw setup fails.
296 Suppress complaint if we only want .eh_frame anyway.
297
Ulrich Drepper173ade82010-05-28 07:39:49 -07002982010-05-28 Ulrich Drepper <drepper@redhat.com>
299
300 * readelf.c (attr_callback): Also print form information.
301
Roland McGrath12e3d1f2010-05-19 18:03:31 -07003022010-05-19 Roland McGrath <roland@redhat.com>
303
304 * addr2line.c (find_symbol): Short-circuit on empty name.
305 (handle_address): Handle SYMBOL with no +OFFSET.
306
Roland McGrath688f7fc2010-05-08 03:22:59 -07003072010-05-08 Roland McGrath <roland@redhat.com>
308
309 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
310 Use that for DW_OP_call_ref, not ADDRSIZE.
311 (print_cfa_program): Update caller.
312 (struct attrcb_args): Add offset_size field.
313 (attr_callback): Use it for print_ops call.
314 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700315 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700316
Roland McGrath62b28b62010-04-14 11:54:06 -07003172010-04-14 Roland McGrath <roland@redhat.com>
318
319 * readelf.c (handle_core_item): Fix bitmask printing.
320
Roland McGrath3b495d82010-04-06 12:58:32 -07003212010-04-06 Roland McGrath <roland@redhat.com>
322
323 * ld.c (options): Fix some typos in messages.
324 * elflint.c (check_scn_group, check_group): Likewise.
325 * ldscript.y (add_id_list): Likewise.
326 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
327 before translated string containing a literal %.
328
Roland McGrath890081b2010-02-26 17:57:50 -08003292010-02-26 Roland McGrath <roland@redhat.com>
330
331 * readelf.c (process_file): Don't leak an fd in failure case.
332
Roland McGrathc2b26f12010-02-15 15:16:15 -08003332010-02-15 Roland McGrath <roland@redhat.com>
334
Roland McGrath22359e22010-02-15 15:57:03 -0800335 * Makefile.am: Use config/eu.am for common stuff.
336
Roland McGrathc2b26f12010-02-15 15:16:15 -0800337 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
338 mismatch in comparison.
339
Roland McGrathf920fd52010-02-02 15:50:15 -08003402010-02-02 Roland McGrath <roland@redhat.com>
341
342 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
343 (read_encoded): Likewise.
344 (print_debug_frame_section): Check for bogus augmentation length.
345 For P augmentation, use read_encoded, print the encoding description,
346 and use hex for unsigned values.
347
Roland McGrathb337b1f2010-01-15 01:02:27 -08003482010-01-15 Roland McGrath <roland@redhat.com>
349
350 * ar.c: Include <sys/stat.h>.
351 * elflint.c: Likewise.
352 * readelf.c: Likewise.
353 * strip.c: Likewise.
354 * unstrip.c: Likewise
355
Roland McGrathbd733ca2010-01-07 20:11:42 -08003562010-01-07 Roland McGrath <roland@redhat.com>
357
Roland McGrath8111da02010-01-07 20:31:59 -0800358 * readelf.c (print_ehdr): Handle PN_XNUM.
359 (phnum): New static variable.
360 (process_elf_file): Set it with elf_getphdrnum.
361 (print_phdr): Use phnum instead of EHDR->e_phnum.
362 (print_dynamic, handle_notes): Likewise.
363 (handle_relocs_rel, handle_relocs_rela): Likewise.
364
Roland McGrathbd733ca2010-01-07 20:11:42 -0800365 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
366
367 * elflint.c (phnum): New static variable.
368 (check_elf_header): Set it, handling PN_XNUM.
369 Use that in place of EHDR->e_phnum throughout.
370 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
371 (unknown_dependency_p, check_sections, check_program_header): Likewise.
372
Roland McGrath019d9fb2010-01-05 13:36:07 -08003732010-01-05 Roland McGrath <roland@redhat.com>
374
375 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
376 DW_AT_GNU_template_name.
377
Roland McGrathe4061d02010-01-04 20:25:09 -08003782010-01-04 Roland McGrath <roland@redhat.com>
379
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800380 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
381 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
382 (handle_core_item): Handle .format of '\n' as \n-separated strings.
383
Roland McGrath2e79deb2010-01-04 20:36:10 -0800384 * readelf.c (implicit_debug_sections): New variable.
385 (parse_opt): Set it instead of print_debug_sections for -a.
386 OR them together for print_debug check.
387 (print_debug): OR them together for section check.
388
Roland McGratha7422be2010-01-04 20:29:33 -0800389 * readelf.c (options): Repartition into set implied by -a and others.
390 Correct -a text to match reality.
391
Roland McGrathe4061d02010-01-04 20:25:09 -0800392 * readelf.c (struct section_argument): Add bool member 'implicit'.
393 (parse_opt): Set it for -a cases, clear it for -x args.
394 (for_each_section_argument): Don't complain about a missing section by
395 name if it's implicit.
396
Roland McGrathefa64962009-11-16 01:50:58 -08003972009-11-16 Roland McGrath <roland@redhat.com>
398
399 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
400 sections, just as dump_data_section already does.
401
Mark Wielaardc49d00a2009-09-21 16:47:07 -07004022009-09-21 Ulrich Drepper <drepper@redhat.com>
403
404 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
405 set for .comment section.
406 Patch by Mark Wielaard <mjw@redhat.com>.
407
Roland McGrathfb33c672009-09-08 00:21:18 -07004082009-09-08 Roland McGrath <roland@redhat.com>
409
410 * ar.c (main): Fix typo in message format.
411
Roland McGrath2d13ea22009-08-21 03:16:32 -07004122009-08-21 Roland McGrath <roland@redhat.com>
413
414 * readelf.c (attr_callback): Use print_block only when we don't use
415 print_ops.
416
Roland McGrath536127f2009-08-14 13:10:09 -07004172009-08-14 Roland McGrath <roland@redhat.com>
418
419 * ar.c (do_oper_extract): Use pathconf instead of statfs.
420
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07004212009-08-01 Ulrich Drepper <drepper@redhat.com>
422
423 * debugpred.h: Add two most const.
424
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07004252009-07-26 Mark Wielaard <mjw@redhat.com>
426
427 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
428
Mark Wielaard79178202009-07-25 12:44:46 -07004292009-07-25 Mark Wielaard <mjw@redhat.com>
430
431 * Makefile.am (addr2line_LDADD): Add $(libelf).
432
Roland McGrathbe4589d2009-07-24 16:23:12 -07004332009-07-24 Roland McGrath <roland@redhat.com>
434
435 * readelf.c (print_block): New function.
436 (print_ops): Use it.
437 (attr_callback): Use it for DW_FORM_block* forms.
438
Mark Wielaarddaf85b22009-07-24 15:49:51 -07004392009-07-20 Mark Wielaard <mjw@redhat.com>
440
441 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
442 and DW_OP_stack_value.
443
Ulrich Drepper96d950e2009-07-14 10:42:01 -07004442009-07-14 Ulrich Drepper <drepper@redhat.com>
445
446 * elflint.c (check_elf_header): Allow Linux ABI.
447 (check_symtab): Handle STB_GNU_UNIQUE.
448
Mark Wielaardf735db12009-07-08 19:18:53 +02004492009-07-08 Mark Wielaard <mjw@redhat.com>
450
451 * readelf.c (attr_callback): Handle DW_Form constants for
452 DW_AT_data_member_location.
453
Roland McGrathdffc33d2009-07-06 16:06:41 -07004542009-07-06 Roland McGrath <roland@redhat.com>
455
456 * readelf.c (register_info): New function. Handle unknown register #s.
457 (print_cfa_program): Use it.
458 (handle_core_register, handle_core_registers): Likewise.
459
Roland McGrath5dbccdb2009-06-28 14:48:02 -07004602009-06-28 Roland McGrath <roland@redhat.com>
461
462 * readelf.c (print_address_names): New static variable.
463 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
464 (format_dwarf_addr): Don't look up name if !print_address_names.
465
Ulrich Drepperf1894932009-06-13 15:55:42 -07004662009-06-13 Ulrich Drepper <drepper@redhat.com>
467
468 * ldgeneric.c: Don't use deprecated libelf functions.
469 * nm.c: Likewise.
470 * objdump.c: Likewise.
471 * readelf.c: Likewise.
472 * size.c: Likewise.
473 * strip.c: Likewise.
474 * unstrip.c: Likewise.
475 * ld.h: Fix up comment.
476
Ulrich Drepperb47d2902009-06-01 07:38:32 -07004772009-06-01 Ulrich Drepper <drepper@redhat.com>
478
479 * readelf.c (print_relocs): Expect ELF header argument and pass on
480 to handle_relocs_rel* functions. Adjust caller.
481 (handle_relocs_rel): Add ELF header argument. Add special case for
482 the IRELATIVE relocations in statically linked executables.
483 (handle_relocs_rela): Likewise.
484
Roland McGrathdb19f0b2009-05-07 18:44:27 -07004852009-04-29 Ulrich Drepper <drepper@redhat.com>
486
487 * elflint.c (check_symtab): Add tests of st_other field.
488
Ulrich Drepperaab90f92009-04-23 07:44:36 -07004892009-04-23 Ulrich Drepper <drepper@redhat.com>
490
491 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
492
Roland McGrathd86e1832009-04-20 00:49:33 -07004932009-04-20 Roland McGrath <roland@redhat.com>
494
Roland McGrath8a592412009-04-20 01:20:44 -0700495 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
496 of inline call sites.
497
Roland McGrathd86e1832009-04-20 00:49:33 -0700498 * addr2line.c (just_section): New variable.
499 (adjust_to_section): New function, broken out of ...
500 (handle_address): ... here.
501 (options, parse_opt): Add -j/--section=NAME to set it.
502
Roland McGrath2fb90512009-04-15 14:47:13 -07005032009-04-15 Roland McGrath <roland@redhat.com>
504
505 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
506 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
507
Roland McGrath04a14162009-04-14 01:02:17 -07005082009-04-14 Roland McGrath <roland@redhat.com>
509
Roland McGratheb9ba472009-04-14 18:44:45 -0700510 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
511 like SHT_GNU_ATTRIBUTES.
512
Roland McGrath94f43832009-04-14 04:39:32 -0700513 * readelf.c (handle_core_registers): Fix error message.
514
Roland McGrath04a14162009-04-14 01:02:17 -0700515 * strip.c (handle_elf: check_preserved): Don't note any change when
516 .debug_data is already filled from a previous pass.
517
Ulrich Drepper411cdb22009-02-05 22:04:26 -08005182009-02-05 Ulrich Drepper <drepper@redhat.com>
519
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800520 * objdump.c (show_relocs_x): Minor cleanups.
521
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800522 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800523 Print first DW_CFA_expression and DW_CFA_val_expression parameter
524 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800525
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08005262009-02-01 Ulrich Drepper <drepper@redhat.com>
527
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800528 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
529 into ...
530 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800531 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800532
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800533 * objdump.c (show_relocs_rela): Show offsets as signed values.
534
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800535 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
536 Improve some error messages.
537 Use program_invocation_short_name instead of AR macro.
538 * Makefile.am (CFLAGS_ar): Remove.
539 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
540 * objdump.c (parse_opt): Likewise.
541 * readelf.c (parse_opt): Likewise.
542
Roland McGrath51f01282009-01-27 17:08:03 -08005432009-01-27 Roland McGrath <roland@redhat.com>
544
545 * readelf.c (print_ops): Notice short length, don't overrun buffer
546 (still need to fix LEB128).
547
548 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
549
550 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
551
Ulrich Drepper62c46532009-01-24 17:01:08 -08005522009-01-24 Ulrich Drepper <drepper@redhat.com>
553
554 * readelf.c (print_debug_frame_section): Fix computation of vma_base
555 for PC-relative mode.
556
Ulrich Drepperd7285e12009-01-23 16:10:44 -08005572009-01-23 Ulrich Drepper <drepper@redhat.com>
558
Ulrich Drepperccccab02009-01-23 16:32:21 -0800559 * size.c (process_file): When handling archive, close file descriptor
560 here. For unknown file format also close file descriptor.
561 (handle_ar): Don't close file descriptor here.
562
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800563 * readelf.c (parse_opt): Move code to add to dump_data_sections and
564 string_sections list in local function add_dump_section. Adjust 'x'
565 key handling. For 'a' key add .strtab, .dynstr, and .comment section
566 to string_sections list.
567
Roland McGrathe9de9b42009-01-22 13:05:40 -08005682009-01-22 Roland McGrath <roland@redhat.com>
569
Roland McGrath9a847e12009-01-22 19:55:00 -0800570 * readelf.c (print_phdr): Don't print section mapping when no sections.
571
Roland McGrathd759aa62009-01-22 19:17:07 -0800572 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
573
Roland McGrathcabeeee2009-01-22 13:17:45 -0800574 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
575 and reset it only for the 'true' cases.
576
577 * Makefile.am (addr2line_no_Wformat): New variable.
578
Roland McGrathe9de9b42009-01-22 13:05:40 -0800579 * readelf.c (print_debug_frame_section): Use t instead of j formats
580 for ptrdiff_t OFFSET.
581
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08005822009-01-21 Ulrich Drepper <drepper@redhat.com>
583
584 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800585 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800586 (check_exception_data): First sanity test.
587
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08005882009-01-17 Ulrich Drepper <drepper@redhat.com>
589
Ulrich Drepper935edde2009-01-17 16:06:42 -0800590 * readelf.c (print_debug_exception_table): Show target of ar_disp
591 field.
592
593 * elflint.c (check_program_header): Add most consistency checks for
594 PT_GNU_EH_FRAME entry.
595
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800596 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
597 ARGP_PROGRAM_BUG_ADDRESS_DEF.
598 * ar.c: Likewise.
599 * elfcmp.c: Likewise.
600 * elflint.c: Likewise.
601 * findtextrel.c: Likewise.
602 * ld.c: Likewise.
603 * nm.c: Likewise.
604 * objdump.c: Likewise.
605 * ranlib.c: Likewise.
606 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800607
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800608 * size.c: Likewise.
609 * strings.c: Likewise.
610 * strip.c: Likewise.
611 * unstrip.c: Likewise.
612
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08006132009-01-16 Ulrich Drepper <drepper@redhat.com>
614
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800615 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
616 matches .eh_frame_hdr section, if it is available. Also check that
617 the segment is allocated, not writable, not executable.
618
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800619 * readelf.c: Add -e option. Dump exception and unwind related
620 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800621 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800622 (print_debug_exception_table): Beginning of support.
623 (print_debug): Hook up print_debug_exception_table for
624 .gcc_except_table sections.
625
626 * readelf.c (print_debug_frame_section): Some fixes for last change.
627
Ulrich Drepper351bf202009-01-15 20:18:40 -08006282009-01-15 Ulrich Drepper <drepper@redhat.com>
629
630 * readelf.c (print_encoding): Now a toplevel function.
631 (print_relinfo): Likewise.
632 (print_encoding_base): Broken out of print_debug_frame_section.
633 (print_debug_frame_section): Print different header for .eh_frame
634 sections. Fix recognition of matching CIEs in .debug_frame sections.
635 Print absolute offset for PC-relative FDE locations. Don't print
636 table header for FDEs if the table is empty.
637 (read_encoded): New function.
638 (print_debug_frame_hdr_section): New function.
639 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
640 sections.
641
642 * readelf.c (handle_relocs_rel): Print section number.
643 (print_debug_abbrev_section): Likewise.
644 (print_debug_aranges_section): Likewise.
645 (print_debug_ranges_section): Likewise.
646 (print_debug_info_section): Likewise.
647 (print_debug_line_section): Likewise.
648 (print_debug_loc_section): Likewise.
649 (print_debug_macinfo_section): Likewise.
650 (print_debug_pubnames_section): Likewise.
651 (print_debug_str_section): Likewise.
652
Ulrich Drepper8b394632009-01-10 18:29:56 -08006532009-01-10 Ulrich Drepper <drepper@redhat.com>
654
655 * strings.c (read_block): Fix typo in error message string.
656
Ulrich Drepper87cf5832009-01-07 20:39:21 -08006572009-01-07 Ulrich Drepper <drepper@redhat.com>
658
659 * ld.c (ld_new_searchdir): Fix adding to search path list.
660
Ulrich Drepperac194d02009-01-06 00:30:01 -08006612009-01-06 Ulrich Drepper <drepper@redhat.com>
662
663 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800664
Roland McGrath3614d992009-01-05 18:05:32 -08006652009-01-05 Roland McGrath <roland@redhat.com>
666
667 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
668 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800669
Ulrich Drepper44173ed2009-01-01 19:00:41 -08006702009-01-01 Ulrich Drepper <drepper@redhat.com>
671
672 * addr2line.c: Update copyright year.
673 * ar.c: Likewise.
674 * elfcmp.c: Likewise.
675 * elflint.c: Likewise.
676 * findtextrel.c: Likewise.
677 * ld.c: Likewise.
678 * nm.c: Likewise.
679 * objdump.c: Likewise.
680 * ranlib.c: Likewise.
681 * readelf.c: Likewise.
682 * size.c: Likewise.
683 * strings.c: Likewise.
684 * strip.c: Likewise.
685 * unstrip.c: Likewise.
686
Roland McGrath468fe4d2008-12-11 21:00:12 -08006872008-12-11 Roland McGrath <roland@redhat.com>
688
689 * nm.c (sym_name): New function.
690 (show_symbols_sysv): Use it in place of elf_strptr.
691 (show_symbols_bsd, show_symbols_posix): Likewise.
692 Fixes RHBZ#476136.
693
694 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
695 elf_strptr fails.
696
Roland McGratha845f682008-12-03 03:41:58 +00006972008-12-02 Roland McGrath <roland@redhat.com>
698
699 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
700 nonzero OFFSET argument to dwfl_getmodules.
701
Roland McGrath1d8bb252008-08-07 08:39:41 +00007022008-08-07 Roland McGrath <roland@redhat.com>
703
704 * addr2line.c (main): Pass string to handle_address.
705 (see_one_module): New function, subroutine of handle_address.
706 (find_symbol): Likewise.
707 (handle_address): Take string argument rather than address.
708 Convert plain number, or handle strings like "(section)+offset"
709 or "symbol+offset".
710
7112008-08-01 Roland McGrath <roland@redhat.com>
712
713 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
714 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
715
716 * readelf.c (convert): Take new argument SIZE.
717 (handle_core_register, handle_core_item): Update callers.
718 (handle_core_item): Take new arg REPEATED_SIZE.
719 (handle_core_items): Special case for a singleton item,
720 let handle_core_item handle repeats if it wants to.
721
722 * readelf.c (handle_core_items): Give abridged output
723 for identical groups repeated more than twice.
724
7252008-07-04 Roland McGrath <roland@redhat.com>
726
727 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
728
Roland McGrath521c47d2008-04-11 07:01:58 +00007292008-04-10 Roland McGrath <roland@redhat.com>
730
731 * strip.c (handle_elf): Don't keep sections that kept symbol tables
732 refer to. Instead, just be sure to preserve the original symbol
733 table in the debug file so those symbols go with their sections and
734 can be elided from the stripped version of the symbol table.
735
736 * strip.c (handle_elf): When a discarded section kept in the debug
737 file refers to a nondiscard section via sh_link/sh_info, preserve
738 that nondiscarded section unmodified in the debug file as well.
739 Skip adjustment of discarded sections symbol table references when
740 that symbol table is copied in this way.
741
742 * elflint.c (check_symtab): Don't crash from missing symbol names
743 after diagnosing bogus strtab.
744
745 * strip.c (handle_elf): Cosmetic cleanup in special section contents
746 adjustment for symtab changes.
747
Roland McGrath13b69602008-04-01 02:30:05 +00007482008-03-31 Roland McGrath <roland@redhat.com>
749
750 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
751 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
752 excuse a special section.
753
7542008-03-27 Roland McGrath <roland@redhat.com>
755
756 * elflint.c (check_sections): Check that executability and writability
757 of sections is reflected in segment p_flags.
758
Roland McGrathd11f9cb2008-03-26 20:51:59 +00007592008-03-26 Roland McGrath <roland@redhat.com>
760
761 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
762 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
763 is valid in RELRO.
764
Roland McGrath47c5c352008-02-29 10:17:16 +00007652008-02-29 Roland McGrath <roland@redhat.com>
766
767 * readelf.c (print_attributes): Add a cast.
768 * elflint.c (check_attributes): Likewise.
769
770 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
771 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
772 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
773
Ulrich Drepper834de6f2008-02-23 06:50:01 +00007742008-02-03 Ulrich Drepper <drepper@redhat.com>
775
776 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
777 when linked into executable.
778 (elf_i386_create_relocations): Likewise.
779
Roland McGrath059c83e2008-02-21 06:19:39 +00007802008-02-20 Roland McGrath <roland@redhat.com>
781
782 * readelf.c (print_attributes): New function.
783 (process_elf_file): Call it under -A.
784
785 * elflint.c (check_attributes): Implement it for real.
786
7872008-02-19 Roland McGrath <roland@redhat.com>
788
789 * elflint.c (special_sections): Handle .gnu.attributes section.
790 (check_sections): Likewise.
791 (check_attributes): New function.
792
7932008-02-10 Roland McGrath <roland@redhat.com>
794
795 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
796 sections and ET_REL files.
797
Ulrich Drepper712d78e2008-02-02 10:01:53 +00007982008-02-02 Ulrich Drepper <drepper@redhat.com>
799
800 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
801 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
802 and R_386_TLS_LE.
803 (elf_i386_create_relocations): Likewise.
804 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
805 elements.
806 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
807 (ld_generic_create_outfile): Add PT_TLS entry to program header.
808 Fix generation of PT_GNU_STACK entry.
809
Ulrich Drepperc54785a2008-02-01 18:05:21 +00008102008-02-01 Ulrich Drepper <drepper@redhat.com>
811
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000812 * ld.c (replace_args): Prevent loop over replacements if the parameter
813 is only two characters long.
814
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000815 * ld.c: Recognize sha1 argument for --build-id parameter.
816 * ldgeneric.c (create_build_id_section): Handle sha1.
817 (compute_hash_sum): New function. Broken out of compute_build_id.
818 Take hash function and context as parameters.
819 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
820 implementation.
821
Ulrich Drepper89759c72008-01-31 19:44:12 +00008222008-01-31 Ulrich Drepper <drepper@redhat.com>
823
824 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
825 * ld.c: Recognize --build-id command line parameter.
826 * ld.h: Define scn_dot_note_gnu_build_id.
827 (struct ld_state): Add build_id and buildidscnidx elements.
828 * ldgeneric.c: Implement --build-id command line parameter.
829 * ldlex.l (ID): Recognize - as valid character after the first one.
830
Ulrich Drepper5530ec52008-01-29 10:42:07 +00008312008-01-29 Ulrich Drepper <drepper@redhat.com>
832
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000833 * ld.c (replace_args): New function.
834 (main): Use it to rewrite old-style parameters.
835
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000836 * elf32-i386.script: Add .gnu.hash section.
837 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
838 (fillin_special_symbol): Initialize st_size.
839 (sortfct_hashval): New function.
840 (create_gnu_hash): New function.
841 (create_hash): New function.
842 (ld_generic_create_outfile): Use the new functions to create the
843 hash tables.
844
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000845 * elflint.c (check_gnu_hash): Fix index value printed in error message.
846
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00008472008-01-24 Ulrich Drepper <drepper@redhat.com>
848
849 * elflint.c (check_group): Check that signature symbol for section
850 group is not an empty string.
851 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
852 section. Start implementation of --hash-style.
853 * i386_ld.c: Likewise.
854 * ld.c: Recognize --hash-style.
855 * ld.h (struct scninfo): Add comdat_group.
856 Add additional parameter to finalize_plt callback.
857
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00008582008-01-22 Ulrich Drepper <drepper@redhat.com>
859
860 * ld.h (struct callbacks): Add initialize_gotplt.
861 (struct scnhead): Add scn_dot_gotplt.
862 (struct ld_state): Add gotpltscnidx.
863 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
864 (elf_i386_initialize_pltrel): Likewise.
865 (elf_i386_initialize_got): There is now a separate .got.plt, so
866 don't do the PLT-related work here. Initialize d_type.
867 (elf_i386_initialize_gotplt): New function.
868 (elf_i386_plt0): Use ud2a after indirect jump.
869 (elf_i386_pic_plt0_entry): Likewise.
870 (elf_i386_finalize_plt): Reference now .got.plt.
871 (elf_i386_count_relocations): For GOT entries which need no relocation
872 don't bump nrel_got.
873 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
874 handling for split .got/.got.plt.
875 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
876 * elf32-i386.script: Sort sections for security. There are no .got
877 input sections. Add .got.plt.
878 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
879 (ld_generic_create_outfile): Initialize .got.plt section.
880 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
881
Ulrich Drepperd9488292008-01-20 16:43:15 +00008822008-01-19 Ulrich Drepper <drepper@redhat.com>
883
884 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
885 symbols are not carried over into statically linked output files.
886 Add dummy entries for more TLS relocations.
887
888 * ld.c (options): Add long names for -( and -).
889
890 * ldgeneric.c (check_definition): For newly found definitions don't
891 mark section as used if symbol is absolute.
892 (extract_from_archive): Only assign archive sequence number the first
893 time the archive is handled. Update ld_state.last_archive_used
894 if any symbol was used. Remove nround variable.
895 (file_process2): When using symbol from an archive, update
896 ld_state.group_start_archive, ld_state.archives, and
897 ld_state.tailarchives.
898 (ld_generic_file_process): If group is not handled anymore, after
899 freeing ELF handles for the archives, clear ld_state.archives and
900 *nextp. Fix wrong logic in recognizing first iteration of group
901 loop. When clearing flags, also clear ld_state.group_start_archive.
902
Ulrich Drepper5eee1222008-01-11 10:12:18 +00009032008-01-11 Ulrich Drepper <drepper@redhat.com>
904
905 * objdump.c (show_disasm): Adjust disassembler format string for
906 removal of %e.
907
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00009082008-01-04 Roland McGrath <roland@redhat.com>
909
Roland McGrath059c83e2008-02-21 06:19:39 +0000910 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
911 a size greater than the items cover means multiple sets of items.
912 (handle_core_note): Update caller.
913
9142008-01-04 Roland McGrath <roland@redhat.com>
915
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000916 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
917
9182008-01-03 Roland McGrath <roland@redhat.com>
919
920 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
921
922 * elflint.c (check_dynamic): Remove duplicate initializer.
923
Ulrich Drepperad024af2008-01-02 17:42:52 +00009242008-01-02 Ulrich Drepper <drepper@redhat.com>
925
926 * addr2line.c: Update copyright year.
927 * ar.c: Likewise.
928 * elfcmp.c: Likewise.
929 * elflint.c: Likewise.
930 * findtextrel.c: Likewise.
931 * ld.c: Likewise.
932 * nm.c: Likewise.
933 * objdump.c: Likewise.
934 * ranlib.c: Likewise.
935 * readelf.c: Likewise.
936 * size.c: Likewise.
937 * strings.c: Likewise.
938 * strip.c: Likewise.
939 * unstrip.c: Likewise.
940
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00009412007-12-30 Ulrich Drepper <drepper@redhat.com>
942
943 * objdump (show_disasm): Use %e after third parameter.
944
9452007-12-21 Ulrich Drepper <drepper@redhat.com>
946
947 * strip.c: Fix wrong parenthesis in a few branch predictions.
948 * strings.c: Likewise.
949
9502007-12-20 Ulrich Drepper <drepper@redhat.com>
951
952 * Makefile.am (DEFS): Add DEBUGPRED.
953 * addr2line.c: Include debugpred.h.
954 * ar.c: Likewise.
955 * elfcmp.c: Likewise.
956 * elflint.c: Likewise.
957 * findtextrel.c: Likewise.
958 * nm.c: Likewise.
959 * objdump.c: Likewise.
960 * ranlib.c: Likewise.
961 * readelf.c: Likewise.
962 * size.c: Likewise.
963 * strings.c: Likewise.
964 * strip.c: Likewise.
965 * unstrip.c: Likewise.
966 * debugpred.h: New file.
967
968 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
969 (handle_relocs_rela): Likewise.
970
971 * readelf.c: Add lots of likely/unlikely.
972
973 * elflint.c: Minor cleanups.
974
Roland McGrath1a2e8f42007-12-15 23:39:34 +00009752007-11-19 Roland McGrath <roland@redhat.com>
976
977 * readelf.c (print_ops): Handle all bad op codes gracefully.
978 Print their numbers instead of just ???.
979
Roland McGrath07a696e2007-11-09 22:44:26 +00009802007-11-09 Roland McGrath <roland@redhat.com>
981
982 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000983 Handle block forms to mean a DWARF expression for DW_AT_allocated,
984 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
985 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
986 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000987
Roland McGrathe4c22ea2007-10-23 13:07:39 +00009882007-10-20 Roland McGrath <roland@redhat.com>
989
990 * unstrip.c (options): Update -R description.
991 (struct symbol): Put symbol details a union with a size_t pointer
992 `duplicate'.
993 (compare_symbols_output): Use null ->name as marker for discard
994 symbols, not zero *->map.
995 (copy_elided_sections): Record forwarding pointers for discarded
996 duplicates and fill SYMNDX_MAP elements through them.
997
998 * readelf.c (process_file): Set offline_next_address to 0 at start.
999 (struct process_dwflmod_args): New type.
1000 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1001 (process_file): Update caller; dup FD for passing to libdwfl.
1002 (process_elf_file): Take new arg FD. For ET_REL file when
1003 displaying data affected by libdwfl relocation, open a new Elf handle.
1004
10052007-10-17 Roland McGrath <roland@redhat.com>
1006
1007 * readelf.c (print_debug_line_section): For invalid data inside a
1008 unit with plausible length, keep printing at the next unit boundary.
1009
1010 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1011
10122007-10-16 Roland McGrath <roland@redhat.com>
1013
1014 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1015
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000010162007-10-15 Roland McGrath <roland@redhat.com>
1017
1018 * make-debug-archive.in: New file.
1019 * Makefile.am (EXTRA_DIST): Add it.
1020 (make-debug-archive): New target.
1021 (bin_SCRIPTS, CLEANFILES): Add it.
1022
10232007-10-10 Roland McGrath <roland@redhat.com>
1024
1025 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1026 Use it to check MERGE|STRINGS for .debug_str.
1027 (check_sections): Handle exact_or_gnuld.
1028
10292007-10-08 Roland McGrath <roland@redhat.com>
1030
1031 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1032 64-bit struct timeval with 32-bit tv_usec.
1033
10342007-10-07 Roland McGrath <roland@redhat.com>
1035
1036 * readelf.c (check_archive_index): New function.
1037 (process_file): Call it. Change signature to take only fd and name.
1038 Use libdwfl to open the file, then iterate on its modules (multiple
1039 for an archive) to print file name and call process_elf_file.
1040 (main): Update caller. Let process_file do elf_begin.
1041 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1042 (process_elf_file): Take only Dwfl_Module * argument.
1043 Don't print the file name here.
1044 (print_debug_*_section): Take Dwfl_Module * argument.
1045 (print_debug): Likewise. Update caller.
1046 (format_dwarf_addr): New function.
1047 (print_debug_ranges_section): Use it.
1048 (attr_callback): Likewise.
1049 (print_debug_line_section, print_debug_loc_section): Likewise.
1050
1051 * readelf.c (print_debug_ranges_section): Translate all strings.
1052 (print_debug_loc_section): Likewise.
1053
1054 * unstrip.c (copy_elided_sections): Initialize SEC.
1055
1056 * ar.c (do_oper_insert): Put trailing / on short names.
1057
1058 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1059
1060 * arlib2.c (arlib_add_long_name): Adjust for header size.
1061
1062 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1063
1064 * ar.c (do_oper_insert): Use write_retry for padding write.
1065
1066 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1067 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1068 (remember_long_name): New function.
1069 (do_oper_insert): Call it. Correctly use length of basename,
1070 not original name. Don't store long name twice for new member.
1071
10722007-10-06 Roland McGrath <roland@redhat.com>
1073
1074 * elflint.c (check_note): Skip empty segment.
1075 (check_note_section): Skip empty section.
1076
1077 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1078 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1079 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1080 (compare_alloc_sections): Take new arg REL, ignore address if true.
1081 (compare_sections): Likewise, pass it down.
1082 (compare_sections_rel, compare_sections_nonrel): New functions.
1083 (find_alloc_sections_prelink, copy_elided_sections): Use them
1084 instead of compare_sections.
1085 (sections_match): New function, broken out of ...
1086 (find_alloc_section): ... here.
1087 (copy_elided_sections): Reorganize section match-up logic.
1088 Use sections_match for SHF_ALLOC in ET_REL.
1089 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1090
1091 * unstrip.c (add_new_section_symbols): Take new arg REL.
1092 When true, do not update section symbol values.
1093 (collect_symbols): Likewise. Update section symbols with address
1094 of chosen output section, not original section.
1095 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1096
1097 * unstrip.c (compare_alloc_sections): At the same address, preserve
1098 original section order.
1099
1100 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1101 .debug_str, it didn't always have them with older tools.
1102
1103 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1104
11052007-10-05 Roland McGrath <roland@redhat.com>
1106
1107 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1108 ET_REL file.
1109
1110 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1111 SHN_UNDEF as "bad section". Use shndx value in messages.
1112
1113 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1114 for ".debug" so it matches as a prefix.
1115 (IS_KNOWN_SPECIAL): New macro.
1116 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1117 type even under -d, for a .debug* or .shstrtab section.
1118
1119 * readelf.c (print_ops): Use hex for address operand.
1120
11212007-10-04 Roland McGrath <roland@redhat.com>
1122
1123 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1124 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1125 sections mapped to SHN_UNDEF.
1126
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000011272007-10-04 Ulrich Drepper <drepper@redhat.com>
1128
1129 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1130 variable with older glibc versions.
1131 Add some branch prediction.
1132
Roland McGrath59ea7f32007-10-04 08:50:09 +000011332007-10-04 Roland McGrath <roland@redhat.com>
1134
1135 * readelf.c (print_archive_index): New variable.
1136 (options, parse_opt): Accept -c/--archive-index to set it.
1137 (dump_archive_index): New function.
1138 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1139 Call dump_archive_index on archives if set.
1140 (main): Update caller.
1141 (any_control_option): Give it file scope, moved out of ...
1142 (parse_opt): ... here.
1143
11442007-10-03 Roland McGrath <roland@redhat.com>
1145
1146 * unstrip.c (struct arg_info): Add `list' flag.
1147 (options, parse_opt): Grok -n/--list to set it.
1148 (list_module): New function.
1149 (handle_implicit_modules): Call it under -n.
1150
1151 * elflint.c (check_note_section): New function.
1152 (check_sections): Call it for SHT_NOTE.
1153
1154 * readelf.c (handle_notes): Use sections when available.
1155
1156 * elflint.c (check_note_data): New function, broken out of ...
1157 (check_note): ... here. Call it and elf_getdata_rawchunk.
1158
1159 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1160 Use elf_getdata_rawchunk and gelf_getauxv.
1161 (handle_notes_data): New function, broken out of ...
1162 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1163
Roland McGrath241ac022007-10-01 18:21:46 +000011642007-10-01 Roland McGrath <roland@redhat.com>
1165
Roland McGrathac0a16c2007-10-01 18:50:35 +00001166 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1167
Roland McGrath241ac022007-10-01 18:21:46 +00001168 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1169
Roland McGrathc76f0b02007-09-27 07:31:33 +000011702007-09-10 Roland McGrath <roland@redhat.com>
1171
1172 * readelf.c (options): Give -p optional argument, alias --string-dump.
1173 (string_sections, string_sections_tail): New static variables.
1174 (parse_opt): Set them when -p has an argument.
1175 (print_string_section): New function, broken out of ...
1176 (print_strings): ... here. Call it.
1177 (dump_data_section): New function, broken out of ...
1178 (dump_data): ... here. Call it.
1179 (for_each_section_argument): New function, broken out of ...
1180 (dump_data): ... here. Call it.
1181 (dump_strings): New function.
1182
11832007-08-31 Roland McGrath <roland@redhat.com>
1184
1185 * readelf.c (print_strings): Typo fix.
1186
Roland McGrathcb6d8652007-08-23 08:10:54 +000011872007-08-23 Roland McGrath <roland@redhat.com>
1188
1189 * readelf.c (printf_with_wrap): Function removed.
1190 (REGISTER_WRAP_COLUMN): New macro.
1191 (handle_core_register): Use print_core_item instead.
1192 (struct register_info): New type.
1193 (compare_registers, compare_register_sets): New functions.
1194 (register_bitpos, compare_sets_by_info): New functions.
1195 (handle_core_registers): Use those to segregate and sort registers
1196 for display.
1197
1198 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1199 (print_core_item): New function.
1200 (handle_core_item): Use it instead of printf_with_wrap.
1201 (compare_core_items, compare_core_item_groups): New functions.
1202 (handle_core_items): Use them. Sort by group and force line breaks
1203 between groups.
1204
1205 * readelf.c (handle_core_registers, handle_core_items): New functions,
1206 broken out of ...
1207 (handle_core_note): ... here. Call them.
1208
12092007-08-22 Roland McGrath <roland@redhat.com>
1210
1211 * unstrip.c (new_shstrtab): New function, broken out of ...
1212 (copy_elided_sections): ... here.
1213
12142007-08-20 Roland McGrath <roland@redhat.com>
1215
1216 Avoid local function trampolines in nm binary.
1217 * nm.c (sort_by_address): Move to a static function instead of local
1218 inside show_symbols.
1219 (sort_by_name_strtab): New static variable.
1220 (sort_by_name): Use it. Move to a static function instead of local
1221 inside show_symbols.
1222 (show_symbols): Set sort_by_name_strtab.
1223
12242007-08-19 Roland McGrath <roland@redhat.com>
1225
1226 * readelf.c (handle_auxv_note): New function.
1227 (handle_notes): Call it.
1228
1229 * readelf.c (printf_with_wrap, convert): New functions.
1230 (handle_core_item, (handle_core_register): New functions.
1231 (handle_notes): Call those with details from ebl_core_note.
1232
Roland McGrath099dd522007-08-13 22:58:36 +000012332007-08-12 Roland McGrath <roland@redhat.com>
1234
1235 * elflint.c (check_note): Accept type 0 with name "Linux".
1236
1237 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1238
1239 * elflint.c (section_flags_string): Return "none" for 0, not "".
1240
Roland McGrathd8221722007-08-11 21:18:09 +000012412007-08-11 Roland McGrath <roland@redhat.com>
1242
1243 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1244
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000012452007-08-04 Ulrich Drepper <drepper@redhat.com>
1246
1247 * readelf.c (hex_dump): Use isprint to determine whether to print
1248 character itself or full stop character.
1249 (dump_data): No need to check endp for NULL after strtol call.
1250
Roland McGrath60fc84c2007-08-03 21:59:15 +000012512007-08-03 Roland McGrath <roland@redhat.com>
1252
1253 * readelf.c (print_string_sections): New variable.
1254 (options, parse_opt): Handle --strings/-p to set it.
1255 (print_strings): New function.
1256 (process_elf_file): Call it under -p.
1257
1258 * readelf.c (options): Add hidden aliases --segments, --sections,
1259 as taken by binutils readelf.
1260
12612007-08-01 Roland McGrath <roland@redhat.com>
1262
1263 * readelf.c (dump_data_sections, dump_data_sections_tail):
1264 New variables.
1265 (options, parse_opt): Handle --hex-dump/-x, set them.
1266 (hex_dump): New function.
1267 (dump_data): New function, call it.
1268 (process_elf_file): Call it.
1269
12702007-07-25 Roland McGrath <roland@redhat.com>
1271
1272 * addr2line.c (show_symbols): New variable.
1273 (print_addrsym): New function.
1274 (handle_address): Call it.
1275 (options, parse_opt): Handle -S/--symbols.
1276
Ulrich Drepperb0243862007-06-06 00:09:36 +000012772007-06-05 Ulrich Drepper <drepper@redhat.com>
1278
1279 * addr2line.c: Update for latest autoconf header.
1280 * ar.c: Likewise.
1281 * elfcmp.c: Likewise.
1282 * elflint.c: Likewise.
1283 * findtextrel.c: Likewise.
1284 * ld.c: Likewise.
1285 * ldgeneric.c: Likewise.
1286 * nm.c: Likewise.
1287 * objdump.c: Likewise.
1288 * ranlib.c: Likewise.
1289 * readelf.c: Likewise.
1290 * size.c: Likewise.
1291 * strings.c: Likewise.
1292 * strip.c: Likewise.
1293 * unstrip.c: Likewise.
1294
Roland McGrath9aa8ef72007-05-18 08:59:43 +000012952007-05-18 Roland McGrath <roland@redhat.com>
1296
1297 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1298 stripped file, so as not to duplicate a section copied in both.
1299
1300 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1301
13022007-05-17 Roland McGrath <roland@redhat.com>
1303
1304 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1305
1306 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1307
1308 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1309 call make_directories here.
1310 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1311 (handle_dwfl_module): Likewise.
1312 (handle_implicit_modules): Update callers.
1313 (handle_output_dir_module): Likewise. Don't do make_directories here.
1314
1315 * unstrip.c (get_section_name): New function, broken out of ...
1316 (copy_elided_sections): here. Update callers.
1317 (find_alloc_section): Broken out of ...
1318 (copy_elided_sections): ... here. Update caller.
1319 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1320 update STT_SECTION symbols' st_value fields as a side effect.
1321 (check_symtab_section_symbols): Update caller.
1322 (add_new_section_symbols): Set st_value in symbols added.
1323 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1324 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1325 from .bss to .dynbss.
1326 (find_alloc_sections_prelink): New function. Associate debug file
1327 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1328 .gnu.prelink_undo information.
1329 (copy_elided_sections): Call it when we couldn't find every allocated
1330 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1331 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1332 (handle_file): Update callers.
1333
1334 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1335 named ".comment".
1336
1337 * elflint.c (check_sections): Fix association of segments with
1338 sections when p_memsz > p_filesz.
1339
13402007-04-29 Roland McGrath <roland@redhat.com>
1341
1342 * addr2line.c (options, main): Tweak argp group settings to fix
1343 usage output.
1344
13452007-04-28 Roland McGrath <roland@redhat.com>
1346
1347 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1348 sizes to match sections adjusted in the stripped file.
1349
Roland McGrath4be15242007-04-25 03:09:33 +000013502007-04-24 Roland McGrath <roland@redhat.com>
1351
1352 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1353 (hash_inexact): New variable.
1354 (options, parse_opt): Add --hash-inexact option to set it.
1355 (hash_content_equivalent): New function.
1356 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1357
13582007-04-23 Roland McGrath <roland@redhat.com>
1359
1360 * unstrip.c: New file.
1361 * Makefile.am (bin_PROGRAMS): Add it.
1362 (unstrip_LDADD): New variable.
1363
1364 * strip.c (options): Allow --output for -o.
1365
Ulrich Drepper8b383102007-02-16 00:31:57 +000013662007-02-15 Ulrich Drepper <drepper@redhat.com>
1367
1368 * readelf.c: Remove unused code. Add a few consts.
1369
Ulrich Drepper903c1162007-02-15 19:40:37 +000013702007-02-15 Roland McGrath <roland@redhat.com>
1371
1372 * readelf.c (print_debug): Fix brainos in SHDR test.
1373
Roland McGrathf82a1ec2007-02-06 04:47:44 +000013742007-02-05 Roland McGrath <roland@redhat.com>
1375
1376 * ar.c: Include <limits.h>, since we use LONG_MAX.
1377
Ulrich Drepper0fe63532007-02-05 21:05:51 +000013782007-02-05 Ulrich Drepper <drepper@redhat.com>
1379
Ulrich Drepper8b383102007-02-16 00:31:57 +00001380 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001381 ignore fchown's return value.
1382 (do_oper_insert): Handle error when writing padding.
1383 * ranlib.c: Add fchown complain work around.
1384
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001385 * arlib.c: Make symtab a global variable. Change all users.
1386 * arlib2.c: Likewise.
1387 * ranlib.c: Likewise.
1388 * ar.c: Likewise.
1389 * arlib.h: Declare it.
1390
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000013912007-01-11 Roland McGrath <roland@redhat.com>
1392
1393 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1394 SHF_MASKPROC bits separately from generic sh_flags validation.
1395
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000013962007-02-04 Ulrich Drepper <drepper@redhat.com>
1397
1398 * ar.c: New file.
1399 * arlib.c: New file.
1400 * arlib2.c: New file.
1401 * arlib.h: New file.
1402 * Makefile (noinst_LIBRARIES): Add libar.
1403 (libar_a_SOURCES): Define.
1404 (ar_LDADD): Define.
1405 (CFLAGS_ar): Define.
1406 * ranlib.c: Change to use arlib.
1407
1408 * elflint.c (check_symtab): Work around GNU ld bug which omits
1409 sections but not symbols in those sections.
1410
Ulrich Drepperb770cf92007-01-10 21:02:34 +000014112007-01-10 Ulrich Drepper <drepper@redhat.com>
1412
1413 * addr2line.c: Update copyright year.
1414 * elfcmp.c: Likewise.
1415 * elflint.c: Likewise.
1416 * findtextrel.c: Likewise.
1417 * ld.c: Likewise.
1418 * nm.c: Likewise.
1419 * objdump.c: Likewise.
1420 * ranlib.c: Likewise.
1421 * readelf.c: Likewise.
1422 * size.c: Likewise.
1423 * strings.c: Likewise.
1424 * strip.c: Likewise.
1425
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000014262006-12-09 Ulrich Drepper <drepper@redhat.com>
1427
1428 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1429 two hash tables have different content (module expected omission
1430 of undefined symbols).
1431
Roland McGrath8190db62006-12-17 23:56:51 +000014322006-10-31 Roland McGrath <roland@redhat.com>
1433
1434 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001435 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001436
14372006-09-19 Jakub Jelinek <jakub@redhat.com>
1438
1439 * strip.c (process_file): Disallow -f on archives.
1440
14412006-10-09 Roland McGrath <roland@redhat.com>
1442
1443 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1444
Roland McGrathc373d852006-10-10 00:25:21 +000014452006-08-29 Roland McGrath <roland@redhat.com>
1446
1447 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1448
1449 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1450 Reported by Christian Aichinger <Greek0@gmx.net>.
1451
1452 * elflint.c (valid_e_machine): Add EM_ALPHA.
1453 Reported by Christian Aichinger <Greek0@gmx.net>.
1454
Ulrich Drepper231c5902006-08-08 22:00:11 +000014552006-08-08 Ulrich Drepper <drepper@redhat.com>
1456
1457 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1458 Keep track of which "high DT" entries are present.
1459 Check that either old or GNU-style hash table is present.
1460 If GNU-style hash table is used a symbol table is mandatory.
1461 Check that if any prelink entry is present all of them are.
1462 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1463 table if they don't refer to functions.
1464
Roland McGrath858b1892006-07-17 08:41:15 +000014652006-07-17 Roland McGrath <roland@redhat.com>
1466
1467 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1468 (add_version): Likewise for argument.
1469 (check_versym): Cast constant to GElf_Versym for comparison.
1470
Roland McGrath4ec807e2006-07-13 03:59:46 +000014712006-07-12 Roland McGrath <roland@redhat.com>
1472
1473 * readelf.c (handle_gnu_hash): Add casts for machines where
1474 Elf32_Word != unsigned int.
1475
Ulrich Drepperdcf61602006-07-12 19:59:02 +000014762006-07-12 Ulrich Drepper <drepper@redhat.com>
1477
1478 * elflint.c (check_sysv_hash64): Fix printf format.
1479
Ulrich Dreppercc415622006-07-12 19:42:23 +000014802006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001481
Ulrich Dreppercc415622006-07-12 19:42:23 +00001482 * addr2line.c (options): English fix in -f doc string.
1483
1484 * addr2line.c (use_comp_dir): New variable.
1485 (options, parse_opt): Grok -A/--absolute to set it.
1486 (handle_address): If set, prepend dwfl_line_comp_dir results to
1487 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001488
Ulrich Drepper28ed8952006-07-07 03:43:47 +000014892006-07-06 Ulrich Drepper <drepper@redhat.com>
1490
1491 * elflint.c: Adjust for latest new hash table format.
1492 * readelf.c: Likewise.
1493
1494 * elflint.c (check_versym): Ignore hidden bit when comparing version
1495 numbers.
1496
14972006-07-05 Ulrich Drepper <drepper@redhat.com>
1498
1499 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1500 discarded COMDAT symbols.
1501
1502 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1503 (elf_i386_create_relocations): Likewise.
1504 * ld.h (struct symbol): Add local and hidden bits.
1505 * ld.c (create_special_section_symbol): These synthsized symbols
1506 are local and hidden.
1507 * ldgeneric.c (file_process2): Check whether input file matches
1508 the emulation.
1509 (fillin_special_symbol): Create symbols as local and/or hidden
1510 if requested.
1511 (ld_generic_create_outfile): Make local copy of symbol.
1512 Don't hide global, defined symbols in dynamic symbol table unless
1513 requested. Synthetic symbols have no version information.
1514
1515 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1516 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1517
15182006-07-04 Ulrich Drepper <drepper@redhat.com>
1519
1520 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1521 testing.
1522
15232006-07-03 Ulrich Drepper <drepper@redhat.com>
1524
1525 * elflint.c: Add testing of DT_GNU_HASH.
1526 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1527
1528 * Makefile.am: Add hacks to create dependency files for non-generic
1529 linker.
1530
Ulrich Drepper6ca46002006-06-12 22:40:23 +000015312006-06-12 Ulrich Drepper <drepper@redhat.com>
1532
1533 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1534 section if creating a DSO and no interpreter is given.
1535 (ld_generic_create_outfile): Don't store reference to symbols in
1536 discarded COMDAT groups. Don't create PHDR and INTERP program header
1537 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001538 (create_verneed_data): Pretty printing.
1539
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001540 * ldscript.y (content): If a DSO is created don't set default
1541 interpreter from linker script.
1542
1543 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1544 for symbols in discarded COMDAT groups.
1545 (elf_i386_create_relocations): Likewise.
1546 * ld.h (struct scninfo): Add unused_comdat.
1547 * ldgeneric.c (add_section): Also check group signature when
1548 matching COMDAT sections.
1549 (add_relocatable_file): Ignore symbols in COMDAT group which are
1550 discarded.
1551
1552 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1553 and symbol reference.
1554
Ulrich Drepper54f33a72006-06-11 09:07:37 +000015552006-06-11 Ulrich Drepper <drepper@redhat.com>
1556
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001557 * elflint.c (check_dynamic): Fix checking value of tags which are
1558 offsets in the string section. Make sure DT_STRTAB points to the
1559 section referenced in sh_link.
1560
1561 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1562
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001563 * ld.c: Recognize --eh-frame-hdr option.
1564 * ld.h (struct ld_state): Add eh_frame_hdr field.
1565 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1566
1567 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1568 SH_FLAGS_COMBINE.
1569 (add_relocatable_file): Minor optimization of last change.
1570 (match_section): Don't preserve SHF_GROUP flag any longer.
1571
Ulrich Drepper2d880282006-06-11 00:20:43 +000015722006-06-10 Ulrich Drepper <drepper@redhat.com>
1573
1574 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001575 Handle record and ignore as position dependent options.
1576 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001577 * ld.h (struct ld_state): Add execstack field.
1578 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1579 sections.
1580 (ld_generic_create_outfile): Fix program header creation in native
1581 linker. Add PT_GNU_STACK program header.
1582
Ulrich Dreppera688a732006-06-10 06:33:00 +000015832006-06-09 Ulrich Drepper <drepper@redhat.com>
1584
1585 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1586 for PLT entries if there is no local definition.
1587
1588 * ld.c (parse_option): Handle -z ignore like --as-needed and
1589 -z record like --no-as-needed.
1590 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1591 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1592 looping over DSOs. When deciding about adding DT_NEEDED entries
1593 use ->as_needed instead of ignore_unused_dsos.
1594
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000015952006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001596
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001597 * ld.c: Recognize --as-needed and --no-as-needed options.
1598 * ld.h (struct usedfile): Add as_needed field.
1599 (struct ld_state): Likewise.
1600 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1601 the list.
1602 * ldscript.y (filename_id_list): Split to correctly parse all
1603 combinations.
1604 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001605
Ulrich Drepper697f4db2006-06-10 06:50:47 +000016062006-05-28 Ulrich Drepper <drepper@redhat.com>
1607
1608 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1609 and colno.
1610
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000016112006-05-27 Ulrich Drepper <drepper@redhat.com>
1612
1613 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001614 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001615
Ulrich Drepper82c345d2006-04-04 22:07:54 +000016162006-04-04 Ulrich Drepper <drepper@redhat.com>
1617
1618 * addr2line.c: Update copyright year.
1619 * elfcmp.c: Likewise.
1620 * elflint.c: Likewise.
1621 * findtextrel.c: Likewise.
1622 * ld.c: Likewise.
1623 * nm.c: Likewise.
1624 * objdump.c: Likewise.
1625 * ranlib.c: Likewise.
1626 * readelf.c: Likewise.
1627 * size.c: Likewise.
1628 * strings.c: Likewise.
1629 * strip.c: Likewise.
1630
Roland McGrathdd7e22b2006-03-09 23:05:47 +000016312006-03-09 Roland McGrath <roland@redhat.com>
1632
1633 * Makefile.am (AM_LDFLAGS): New variable.
1634
Roland McGrath060fa052006-03-02 07:51:50 +000016352006-03-01 Roland McGrath <roland@redhat.com>
1636
1637 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1638 for dwarf.h changes matching 3.0 spec.
1639 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1640
Ulrich Drepper038129b2005-12-04 16:47:24 +000016412005-12-04 Ulrich Drepper <drepper@redhat.com>
1642
1643 * elflint.c (check_one_reloc): If relocation section is not loaded,
1644 don't check whether the relocations modify read-only sections or
1645 loaded and unloaded sections.
1646
Ulrich Drepper607e0542005-12-04 15:51:06 +000016472005-11-28 Ulrich Drepper <drepper@redhat.com>
1648
1649 * elflint.c (check_one_reloc): Take additional parameters. Use
1650 them to determine whether relocation is valid in this type of
1651 file. DSOs and executables can contain relocation sections in
1652 unloaded sections which just show the relocations the linker
1653 applied. Adjust all callers.
1654 (check_program_header): Check that PT_PHDR is loaded and that offset
1655 matches the one in the ELF header.
1656
Roland McGrath6724c902005-10-28 07:07:19 +000016572005-10-26 Roland McGrath <roland@redhat.com>
1658
1659 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1660
Ulrich Drepperd0449522005-09-03 07:23:52 +000016612005-09-03 Ulrich Drepper <drepper@redhat.com>
1662
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001663 * strip.c (handle_elf): Unify some error messages.
1664 * ld.c (main): Likewise.
1665 * ldgeneric.c (open_elf): Likewise.
1666 * elfcmp.c (main): Likewise.
1667 * elflint.c (check_elf_header): Likewise.
1668
1669 * size.c (process_file): Fix typo in error message.
1670
Ulrich Drepperd0449522005-09-03 07:23:52 +00001671 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1672
Ulrich Dreppera60501e2005-09-02 19:50:17 +000016732005-09-02 Ulrich Drepper <drepper@redhat.com>
1674
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001675 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001676 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001677
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000016782005-08-28 Ulrich Drepper <drepper@redhat.com>
1679
1680 * ranlib.c: Don't define pread_retry and write_retry here.
1681
1682 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1683 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1684
1685 * strings.c (process_chunk): Reorder expressions in conditional
1686 (process_chunk_mb): Likewise.
1687
1688 * strings.c: New file.
1689 * Makefile.am (bin_PROGRAMS): Add strings.
1690 (strings_no_Wstring): Define.
1691 (strings_LDADD): Define.
1692
Roland McGrath71e15a02005-08-27 10:33:26 +000016932005-08-27 Roland McGrath <roland@redhat.com>
1694
1695 * addr2line.c (dwarf_diename_integrate): Function removed.
1696 (print_dwarf_function): Use plain dwarf_diename.
1697
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000016982005-08-24 Ulrich Drepper <drepper@redhat.com>
1699
1700 * elflint.c (check_versym): Versioned symbols should not have
1701 local binding.
1702
Ulrich Drepper5d832292005-08-15 21:36:27 +000017032005-08-15 Ulrich Drepper <drepper@redhat.com>
1704
Ulrich Drepper61655e02005-08-16 04:23:02 +00001705 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1706 undefined.
1707
Ulrich Drepper5d832292005-08-15 21:36:27 +00001708 * Makefile.am: Add rules to build ranlib.
1709 * ranlib.c: New file.
1710
Roland McGrath18e13422005-08-15 08:01:25 +000017112005-08-14 Roland McGrath <roland@redhat.com>
1712
1713 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1714 sh_type it recognizes.
1715
1716 * elflint.c (check_sections): Print unknown flags in hex, don't
1717 truncate high bits. Print section number and name for unknown type.
1718
Roland McGrathf6895042005-08-13 20:56:52 +000017192005-08-13 Roland McGrath <roland@redhat.com>
1720
1721 * elflint.c (check_program_header): Use ebl_segment_type_name and
1722 allow any p_type it recognizes. Include p_type value in error
1723 message for unknown type.
1724
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000017252005-08-13 Ulrich Drepper <drepper@redhat.com>
1726
1727 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1728 to ebl_check_special_symbol.
1729 (check_sections): Pass ehdr to ebl_bss_plt_p.
1730
Roland McGrath653d3762005-08-13 01:59:10 +000017312005-08-12 Roland McGrath <roland@redhat.com>
1732
1733 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1734 refers to the right section if it's not SHN_ABS.
1735 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1736
1737 * elflint.c (check_sections): Don't complain about a non-NOBITS
1738 section taking no segment space, if it's sh_size is 0.
1739
1740 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1741 be PROGBITS or NOBITS.
1742
1743 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1744 standard st_value and st_size checks.
1745
Roland McGrath1c83bf12005-08-11 07:03:55 +000017462005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001747
Roland McGrath1c83bf12005-08-11 07:03:55 +00001748 * addr2line.c (options, parse_opt): Don't handle -e here.
1749 (executable): Variable removed.
1750 (argp_children): New static variable.
1751 (argp): Use it. Make const.
1752 (main): Fill in argp_children from dwfl_standard_argp ().
1753 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1754 (print_dwarf_function): New function. Try to figure out inline chain.
1755 (elf_getname): Function removed, libdwfl does it for us.
1756 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1757 Use dwfl_module_addrname instead of elf_getname.
1758 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1759 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1760
17612005-08-10 Ulrich Drepper <drepper@redhat.com>
1762
1763 * strip.c (parse_opt): STATE parameter is now used.
1764 Various little cleanups.
1765
1766 * readelf.c (print_debug_line_section): Correct fallout of renaming
1767 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001768
Roland McGrath8f31c2c2005-08-09 04:58:05 +000017692005-08-08 Roland McGrath <roland@redhat.com>
1770
1771 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1772 with binutils strip. Likewise -d, -S, as aliases for -g.
1773 Likewise ignore -s/--strip-all.
1774
Roland McGrath095a01b2005-08-08 03:49:35 +000017752005-08-07 Roland McGrath <roland@redhat.com>
1776
1777 * strip.c (process_file): Open read-only when using a different output
1778 file.
1779
Ulrich Drepper47be7952005-08-07 04:41:39 +000017802005-08-06 Ulrich Drepper <drepper@redhat.com>
1781
Ulrich Drepper637963b2005-08-07 05:33:07 +00001782 * elflint.c (in_nobits_scn): New function.
1783 (check_versym): Allow references for defined symbols against versions
1784 of other DSOs also for symbols in nobits sections.
1785 Move a few variables around.
1786
Ulrich Drepper47be7952005-08-07 04:41:39 +00001787 * Makefile.am (AM_CFLAGS): Avoid duplication.
1788 Link with statis libs if BUILD_STATIC.
1789
Ulrich Drepperdbace232005-08-06 01:37:23 +000017902005-08-05 Ulrich Drepper <drepper@redhat.com>
1791
1792 * elflint.c: Many, many more tests. Mostly related to symbol
1793 versioning. Those sections should now be completely checked.
1794
1795 * readelf.c (print_dynamic): Use gelf_offscn.
1796
Ulrich Drepperacb89832005-08-04 07:01:49 +000017972005-08-04 Ulrich Drepper <drepper@redhat.com>
1798
1799 * elflint.c: Add lots more tests: more extension symbol table sanity,
1800 versioning section tests, hash table tests. General cleanup.
1801
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000018022005-08-02 Ulrich Drepper <drepper@redhat.com>
1803
Ulrich Drepper8a687742005-08-03 02:24:12 +00001804 * objdump.c: New file.
1805 * Makefile.am (bin_PROGRAMS): Add objdump.
1806 (objdump_LDADD): Define.
1807
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001808 * elflint.c (check_reloc_shdr): New function split out from check_rela
1809 and check_rel.
1810 (check_one_reloc): New function. Likewise.
1811 (check_rela): Use check_reloc_shdr and check_one_reloc.
1812 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001813 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1814 section.
1815 Add checks that relocations against read-only segments are flagged,
1816 that the text relocation flag is not set unnecessarily, and that
1817 relocations in one section are either against loaded or not-loaded
1818 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001819
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000018202005-08-01 Ulrich Drepper <drepper@redhat.com>
1821
1822 * elfcmp.c (main): Ignore section count and section name string table
1823 section index.
1824
Roland McGrathf9ece8a2005-07-28 07:03:04 +000018252005-07-27 Roland McGrath <roland@redhat.com>
1826
1827 * elfcmp.c: Include <locale.h>.
1828
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000018292005-07-27 Ulrich Drepper <drepper@redhat.com>
1830
1831 * elfcmp.c: Print name and index of differing section.
1832
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000018332005-07-24 Ulrich Drepper <drepper@redhat.com>
1834
1835 * elfcmp.c: Implement comparing gaps between sections.
1836
18372005-07-23 Ulrich Drepper <drepper@redhat.com>
1838
1839 * elflint.c: Include libeblP.h instead of libebl.h.
1840 * nm.c: Likewise.
1841 * readelf.c: Likewise.
1842 * elfcmp.c: Likewise.
1843
1844 * elfcmp.c (main): Compare individual ELF header fields, excluding
1845 e_shoff instead of the whole struct at once.
1846 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1847 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1848
18492005-07-22 Ulrich Drepper <drepper@redhat.com>
1850
1851 * elfcmp.c (main): Take empty section into account when comparing
1852 section content.
1853
1854 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1855 using it.
1856
18572005-07-21 Ulrich Drepper <drepper@redhat.com>
1858
1859 * elfcmp.c: New file.
1860 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1861 (elfcmp_LDADD): Define.
1862
1863 * elflint.c (check_rela): Check that copy relocations only reference
1864 object symbols or symbols with unknown type.
1865 (check_rel): Likewise.
1866
18672005-06-08 Roland McGrath <roland@redhat.com>
1868
1869 * readelf.c (print_ops): Add consts.
1870
18712005-05-31 Roland McGrath <roland@redhat.com>
1872
1873 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1874 abbreviations. Print a header line before each CU section.
1875
1876 * readelf.c (print_debug_loc_section): Fix indentation for larger
1877 address size.
1878
18792005-05-30 Roland McGrath <roland@redhat.com>
1880
1881 * readelf.c (print_debug_line_section): Print section offset of each
1882 CU's table, so they are easy to find from seeing the stmt_list value.
1883
1884 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1885 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1886
1887 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1888 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1889
1890 * readelf.c (print_ops): Take different args for indentation control.
1891 (attr_callback): Caller updated.
1892 Grok several more block-form attributes as being location expressions.
1893 For those same attributes with udata forms, format output differently
1894 for location list offset.
1895 (print_debug_loc_section): Implement it for real.
1896
1897 * readelf.c (options): Mention ranges for --debug-dump.
1898 (enum section_e): Add section_ranges.
1899 (parse_opt): Grok "ranges" for -w/--debug-dump.
1900 (print_debug_ranges_section): New function.
1901 (print_debug): Handle .debug_ranges section.
1902
19032005-05-30 Ulrich Drepper <drepper@redhat.com>
1904
1905 * readelf.c (handle_notes): At least x86-64 need not have the note
1906 section values aligned to 8 bytes.
1907
19082005-05-18 Ulrich Drepper <drepper@redhat.com>
1909
1910 * readelf.c (dwarf_tag_string): Add new tags.
1911
19122005-05-08 Roland McGrath <roland@redhat.com>
1913
1914 * strip.c (handle_elf): Don't translate hash and versym data formats,
1915 elf_getdata already did it for us.
1916
19172005-05-07 Ulrich Drepper <drepper@redhat.com>
1918
1919 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1920 (addr2line_LDADD): Likewise.
1921
19222005-05-03 Roland McGrath <roland@redhat.com>
1923
1924 * strip.c (handle_elf): Apply symbol table fixups to discarded
1925 relocation sections when they are being saved in the debug file.
1926
1927 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1928 and gelf_xlatetof, not the native byte order.
1929
1930 * strip.c (parse_opt): Give error if -f or -o is repeated.
1931 (main): Exit if argp_parse returns nonzero.
1932
1933 * strip.c (debug_fname_embed): New variable.
1934 (options, parse_opt): New option -F to set it.
1935
19362005-05-07 Ulrich Drepper <drepper@redhat.com>
1937
1938 * readelf.c (parse_opt): Make any_control_option variable
1939 local. Simplify some tests.
1940
19412005-05-03 Roland McGrath <roland@redhat.com>
1942
1943 * strip.c (crc32_file): Function removed (now in ../lib).
1944
19452005-05-03 Roland McGrath <roland@redhat.com>
1946
1947 * elflint.c (is_debuginfo): New variable.
1948 (options, parse_opt): New option --debuginfo/-d to set it.
1949 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1950 (check_note): If is_debuginfo, don't try to get note contents.
1951
19522005-04-24 Ulrich Drepper <drepper@redhat.com>
1953
1954 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1955 section reached.
1956
19572005-04-14 Ulrich Drepper <drepper@redhat.com>
1958
1959 * readelf.c (dwarf_encoding_string): New function.
1960 (dwarf_inline_string): New function.
1961 (dwarf_access_string): New function.
1962 (dwarf_visibility_string): New function.
1963 (dwarf_virtuality_string): New function.
1964 (dwarf_identifier_case_string): New function.
1965 (dwarf_calling_convention_string): New function.
1966 (dwarf_ordering_string): New function.
1967 (dwarf_discr_list_string): New function.
1968 (attr_callback): Decode man more attribute values.
1969
19702005-04-01 Ulrich Drepper <drepper@redhat.com>
1971
1972 * addr2line.c: Finish implementation of -f option.
1973
19742005-03-29 Ulrich Drepper <drepper@redhat.com>
1975
1976 * addr2line.c: New file.
1977 * Makefile.am (bin_PROGRAMS): Add addr2line.
1978 Define addr2line_LDADD.
1979
1980 * findtextrel.c: Use new dwarf_addrdie function.
1981
1982 * findtextrel.c: Fix usage message and re-add accidentally removed
1983 line.
1984
19852005-03-28 Ulrich Drepper <drepper@redhat.com>
1986
1987 * findtextrel.c: New file.
1988 * Makefile: Add rules to build findtextrel.
1989
19902005-02-15 Ulrich Drepper <drepper@redhat.com>
1991
1992 * ldlex.l: Provide ECHO definition to avoid warning.
1993
1994 * elflint.c (check_program_header): Fix typo in RELRO test.
1995
1996 * Makefile.am (AM_CFLAGS): Add more warning options.
1997 * elflint.c: Fix warnings introduced by the new warning options.
1998 * i386_ld.c: Likewise.
1999 * ld.c: Likewise.
2000 * ld.h: Likewise.
2001 * ldgeneric.c: Likewise.
2002 * nm.c: Likewise.
2003 * readelf.c: Likewise.
2004 * sectionhash.c: Likewise.
2005 * size.c: Likewise.
2006 * string.c: Likewise.
2007
20082005-02-05 Ulrich Drepper <drepper@redhat.com>
2009
2010 * Makefile.am: Check for text relocations in constructed DSOs.
2011
2012 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2013 with -lmudflap.
2014
2015 * ldscript.y: Add as_needed handling.
2016 * ldlex.l: Recognize AS_NEEDED token.
2017 * ld.h (struct filename_list): Add as_needed flag.
2018
20192005-02-04 Ulrich Drepper <drepper@redhat.com>
2020
2021 * elflint.c (check_symtab): Correctly determine size of GOT section.
2022
20232005-01-19 Ulrich Drepper <drepper@redhat.com>
2024
2025 * ld.c: Remove unnecessary more_help function. Print bug report
2026 address using argp.
2027 * strip.c: Likewise.
2028 * size.c: Likewise.
2029 * nm.c: Likewise.
2030 * readelf.c: Likewise.
2031 * elflint.c: Likewise.
2032
2033 * elflint.c (main): Don't check for parameter problems here.
2034 (parse_opt): Do it here, where we get informed about some of them
2035 anyway.
2036
2037 * readelf.c (main): Don't check for parameter problems here.
2038 (parse_opt): Do it here, where we get informed about some of them
2039 anyway.
2040
20412005-01-11 Ulrich Drepper <drepper@redhat.com>
2042
2043 * strip.c: Update copyright year.
2044 * readelf.c: Likewise.
2045 * size.c: Likewise.
2046 * nm.c: Likewise.
2047 * ld.c: Likewise.
2048 * elflint.c: Likewise.
2049
2050 * elflint.c (check_symtab): Don't warn about wrong size for
2051 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2052
20532004-10-05 Ulrich Drepper <drepper@redhat.com>
2054
2055 * readelf.c (print_phdr): In section mapping, also indicate
2056 sections in read-only segments.
2057
20582004-09-25 Ulrich Drepper <drepper@redhat.com>
2059
2060 * readelf.c: Make compile with gcc 4.0.
2061 * strip.c: Likewise.
2062
20632004-08-16 Ulrich Drepper <drepper@redhat.com>
2064
2065 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2066 allocate to work around gcc 3.4 bug.
2067
20682004-01-25 Ulrich Drepper <drepper@redhat.com>
2069
2070 * ldlex.l (invalid_char): Better error message.
2071
20722004-01-23 Ulrich Drepper <drepper@redhat.com>
2073
2074 * readelf.c: Print SHT_GNU_LIBLIST sections.
2075
2076 * none_ld.c: New file.
2077
20782004-01-21 Ulrich Drepper <drepper@redhat.com>
2079
2080 * Makefile.am: Enable building of machine specific linker.
2081
20822004-01-20 Ulrich Drepper <drepper@redhat.com>
2083
2084 * Makefile.am: Support building with mudflap.
2085
2086 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2087 * ldgeneric.c: Likewise.
2088 * ldscript.y: Likewise.
2089 * readelf.c: Likewise.
2090 * strip.c: Likewise.
2091
2092 * readelf.c (print_debug_line_section): Determine address size
2093 correctly.
2094
20952004-01-19 Ulrich Drepper <drepper@redhat.com>
2096
2097 * readelf.c (print_phdr): Show which sections are covered by the
2098 PT_GNU_RELRO entry.
2099
2100 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2101
2102 * readelf.c (print_debug_macinfo_section): Implement.
2103
21042004-01-18 Ulrich Drepper <drepper@redhat.com>
2105
2106 * readelf.c (print_debug_line_section): Implement.
2107
21082004-01-17 Ulrich Drepper <drepper@redhat.com>
2109
2110 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2111 * src/ld.c: Likewise.
2112 * src/nm.c: Likewise.
2113 * src/readelf.c: Likewise.
2114 * src/size.c: Likewise.
2115 * src/strip.c: Likewise.
2116
2117 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2118
2119 * Makefile.am: Support building with mudflap.
2120
21212004-01-16 Ulrich Drepper <drepper@redhat.com>
2122
2123 * readelf.c (print_debug_info_section): Free dies memory.
2124
2125 * readelf.c: Print .debug_info section content.
2126
21272004-01-13 Ulrich Drepper <drepper@redhat.com>
2128
2129 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2130
21312004-01-12 Ulrich Drepper <drepper@redhat.com>
2132
2133 * readelf.c (print_debug_aranges): Implement using libdw.
2134
21352004-01-11 Ulrich Drepper <drepper@redhat.com>
2136
2137 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2138
2139 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2140 behavior is available yet.
2141 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2142
21432004-01-09 Ulrich Drepper <drepper@redhat.com>
2144
2145 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2146
2147 * nm.c: Implement getting information about local variables.
2148
21492004-01-07 Ulrich Drepper <drepper@redhat.com>
2150
2151 * nm.c: Read also debug information for local symbols.
2152
21532004-01-05 Ulrich Drepper <drepper@redhat.com>
2154
2155 * nm.c: Shuffle dwarf handling code around so the maximum column
2156 width can be computed ahead of printing. Avoid collection symbols
2157 which are not printed anyway.
2158
2159 * nm.c: Rewrite dwarf handling to use libdw.
2160 * Makefile.am (AM_CFLAGS): Add -std parameter.
2161 (INCLUDES): Find header in libdw subdir.
2162 (nm_LDADD): Replace libdwarf with libdw.
2163
2164 * elflint.c: Update copyright year.
2165 * readelf.c: Likewise.
2166 * size.c: Likewise.
2167 * strip.c: Likewise.
2168 * nm.c: Likewise.
2169
21702003-12-31 Ulrich Drepper <drepper@redhat.com>
2171
2172 * strip.c (process_file): Close file before returning.
2173
21742003-11-19 Ulrich Drepper <drepper@redhat.com>
2175
2176 * readelf.c (handle_dynamic): Make column for tag name wider.
2177
21782003-09-29 Ulrich Drepper <drepper@redhat.com>
2179
2180 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2181
21822003-09-25 Ulrich Drepper <drepper@redhat.com>
2183
2184 * strip.c (process_file): Don't mmap the input file, we modify the
2185 data structures and don't want the change end up on disk.
2186
21872003-09-23 Jakub Jelinek <jakub@redhat.com>
2188
2189 * unaligned.h (union u_2ubyte_unaligned,
2190 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2191 packed attribute.
2192 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2193 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2194 Read/store value through _ptr->u instead of *_ptr.
2195
21962003-09-22 Ulrich Drepper <drepper@redhat.com>
2197
2198 * size.c (show_sysv): Change type of maxlen to int.
2199
2200 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2201 buckets.
2202
2203 * i386_ld.c: Many many fixes and extensions.
2204 * ld.c: Likewise.
2205 * ldgeneric.c: Likewise.
2206
22072003-08-16 Ulrich Drepper <drepper@redhat.com>
2208
2209 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2210 the reference is from another DSO.
2211
22122003-08-15 Ulrich Drepper <drepper@redhat.com>
2213
2214 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2215 point is found when creating a DSO.
2216
22172003-08-14 Ulrich Drepper <drepper@redhat.com>
2218
2219 * ld.c (main): Always call FLAG_UNRESOLVED.
2220 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2221 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2222
22232003-08-13 Ulrich Drepper <drepper@redhat.com>
2224
2225 * Makefile.in: Depend on libebl.a, not libebl.so.
2226
2227 * ld.c (main): Mark stream for linker script as locked by caller.
2228 (read_version_script): Likewise.
2229 * ldlex.c: Define fread and fwrite to _unlocked variant.
2230
2231 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2232 target_bswap_32.
2233 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2234 target_bswap_64.
2235 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2236 store_8ubyte_unaligned): Define using new macros.
2237
22382003-08-12 Ulrich Drepper <drepper@redhat.com>
2239
2240 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2241 possibly unaligned memory. Support use of big endian machines.
2242
22432003-08-11 Ulrich Drepper <drepper@redhat.com>
2244
2245 * Moved to CVS archive.