blob: 39ecf18f67a6041e945fb122f3c5dd5cd9a25db3 [file] [log] [blame]
Mark Wielaard093a1d32011-04-14 23:47:26 +020012011-04-14 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (options): Add gdb_index.
4 (section_e): Define section_gdb_index.
5 (parse_opt): Recognize gdb_index debug-dump argument.
6 (print_gdb_index_section): New function.
7 (print_debug): Add gdb_index to debug_sections.
8
Petr Machata1879e5b2011-03-25 15:17:04 +010092011-03-24 Petr Machata <pmachata@redhat.com>
10
11 * readelf.c (print_debug_line_section): Emit initial space for all
12 opcode lines. Print offset in front of each opcode.
13
Marek Polacek44de92a2011-03-22 01:07:20 +0100142011-03-22 Marek Polacek <mpolacek@redhat.com>
15
16 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
17
Mark Wielaarde3368c52011-03-22 23:03:31 +0100182011-03-22 Mark Wielaard <mjw@redhat.com>
19
20 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
21 and DW_TAG_GNU_call_site_parameter.
22 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
23 DW_AT_GNU_call_site_data_value,
24 DW_AT_GNU_call_site_target,
25 DW_AT_GNU_call_site_target_clobbered,
26 DW_AT_GNU_tail_call,
27 DW_AT_GNU_all_tail_call_sites,
28 DW_AT_GNU_all_call_sites,
29 and DW_AT_GNU_all_source_call_sites.
30 (print_ops): Handle DW_OP_GNU_entry_value.
31 (attr_callback): Handle DW_AT_GNU_call_site_value,
32 DW_AT_GNU_call_site_data_value,
33 DW_AT_GNU_call_site_target,
34 and DW_AT_GNU_call_site_target_clobbered.
35
Mark Wielaarda062b6b2011-03-10 13:02:32 +0100362011-03-10 Mark Wielaard <mjw@redhat.com>
37
38 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
39
Jan Kratochvilfec39992011-02-27 12:01:25 -0800402011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
41
42 * readelf.c (reset_listptr): Clear TABLE->TABLE.
43
Mark Wielaardcf454ab2011-02-25 12:58:54 +0100442011-02-25 Mark Wielaard <mjw@redhat.com>
45
46 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
47 (dwarf_form_string): Properly format and return unknown form.
48
Roland McGrath47c53232011-02-23 09:23:08 -0800492011-02-23 Roland McGrath <roland@redhat.com>
50
Roland McGrath725aad52011-02-23 19:52:46 -080051 * readelf.c (section_name): New function.
52 (print_debug_abbrev_section): Use it instead of constant.
53 (print_debug_aranges_section): Likewise.
54 (print_debug_ranges_section): Likewise.
55 (print_debug_units): Likewise.
56 (print_debug_line_section): Likewise.
57 (print_debug_loc_section): Likewise.
58 (print_debug_macinfo_section): Likewise.
59 (print_debug_pubnames_section): Likewise.
60 (print_debug_str_section): Likewise.
61 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
62 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
63 (print_debug_str_section): Likewise.
64
Roland McGrath47c53232011-02-23 09:23:08 -080065 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
66
Roland McGrath1fb9c912011-02-11 10:32:30 -0800672011-02-11 Roland McGrath <roland@redhat.com>
68
Roland McGrath4a14ef72011-02-11 10:42:45 -080069 * elfcmp.c (verbose): New variable.
70 (options, parse_opt): Grok -l/--verbose to set it.
71 (main): Under -l, keep going after first difference.
72
Roland McGrath1fb9c912011-02-11 10:32:30 -080073 * elfcmp.c (ignore_build_id): New variable.
74 (options, parse_opt): Grok --ignore-build-id to set it.
75 (main): For SHT_NOTE sections, compare note details rather than raw
76 bytes. Under --ignore-build-id, don't complain about differing build
77 ID contents if lengths match.
78
Roland McGrathfd992542011-02-08 19:45:12 -0800792011-02-08 Roland McGrath <roland@redhat.com>
80
Roland McGrath240784b2011-02-08 19:48:42 -080081 * ldscript.y (filename_id_star): Remove unused variable.
82
Roland McGrath8f6c1792011-02-08 19:48:02 -080083 * unstrip.c (copy_elided_sections): Remove unused variable.
84
Roland McGrath4db89f02011-02-08 19:46:50 -080085 * elflint.c (check_dynamic): Remove unused variables.
86
Roland McGrath33231312011-02-08 19:45:26 -080087 * elflint.c (check_symtab): Warn about missing xndx section only once.
88
Roland McGrathfd992542011-02-08 19:45:12 -080089 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
90
Roland McGrathf151b7d2011-01-06 12:14:43 -0800912011-01-06 Roland McGrath <roland@redhat.com>
92
93 * strip.c (handle_elf): Under --strip-sections, remove all
94 non-allocated sections and never generate .gnu_debuglink.
95
Roland McGrath0b9d1fb2011-01-04 19:29:24 -0800962011-01-04 Roland McGrath <roland@redhat.com>
97
98 * strip.c (remove_shdrs): New variable.
99 (options, parse_opt): Grok --strip-sections to set it.
100 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
101
Roland McGrath77221de2010-11-10 19:47:31 -08001022010-11-10 Roland McGrath <roland@redhat.com>
103
104 * findtextrel.c (process_file): Don't assume order of sections.
105 Reported by Mike Hommey <mh@glandium.org>.
106
Roland McGrath932585d2010-05-08 04:01:14 -07001072010-07-26 Roland McGrath <roland@redhat.com>
108
109 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
110
Roland McGratha1599152010-08-30 04:04:37 -07001112010-08-30 Roland McGrath <roland@redhat.com>
112
Roland McGrathfa144952010-08-30 19:22:41 -0700113 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
114 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
115 for ranges, loc.
116 (struct listptr, struct listptr_table): New types.
117 (compare_listptr, reset_listptr, sort_listptr): New functions.
118 (notice_listptr, skip_listptr_hole): New functions.
119 (struct attrcb_args): Add silent member.
120 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
121 Suppress output if silent, but still call notice_listptr.
122 (print_debug_units): Suppress output if section_info not requested.
123 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
124 (print_debug_ranges_section): Likewise.
125 (print_debug): Call reset_listptr on both tables.
126
127 * readelf.c (print_debug_ranges_section): Print empty list.
128 (print_debug_loc_section): Likewise.
129
Roland McGratha1599152010-08-30 04:04:37 -0700130 * readelf.c (print_debug_loc_section): Check for bogus length
131 before calling print_ops.
132 (print_ops): Check harder for bogus data that would read off end.
133
Roland McGrathf4763cf2010-08-11 13:04:12 -07001342010-08-11 Roland McGrath <roland@redhat.com>
135
136 * readelf.c (for_each_section_argument): Process all sections with
137 matching name, not just the first.
138
Roland McGrath52604ba2010-07-26 21:29:44 -07001392010-07-26 Roland McGrath <roland@redhat.com>
140
141 * readelf.c (print_ops): Take new argument for CU version.
142 Fix DW_OP_call_ref decoding to depend on it.
143 (print_debug_loc_section): Update caller.
144 (print_cfa_program): Take new argument, pass it down.
145 (print_debug_frame_section): Update caller.
146 (struct attrcb_args): New member version.
147 (print_debug_units): Initialize it.
148
Roland McGrath2f14a312010-07-02 11:16:25 -07001492010-07-02 Roland McGrath <roland@redhat.com>
150
151 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
152 initial_location.
153
Roland McGrathb6458032010-06-30 11:57:19 -07001542010-06-30 Roland McGrath <roland@redhat.com>
155
156 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
157 Ignore st_size for a non-S_ISREG file descriptor.
158 (read_block): Move assert after no-mmap bail-out.
159 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
160
Roland McGrathfa799902010-06-22 13:05:23 -07001612010-06-22 Roland McGrath <roland@redhat.com>
162
163 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
164
Roland McGrath0c5638c2010-06-21 23:00:35 -07001652010-06-21 Roland McGrath <roland@redhat.com>
166
167 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700168 (dwarf_attr_string): Add new attributes.
169 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700170
171 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
172 (print_cfa_program): Likewise.
173
Roland McGrathe5251a12010-06-20 16:59:39 -07001742010-06-20 Roland McGrath <roland@redhat.com>
175
Roland McGrath2b1f0952010-06-20 17:55:50 -0700176 * readelf.c (print_debug_units): New function, broken out of ...
177 (print_debug_info_section): ... here. Call it.
178 (print_debug_types_section): New function.
179 (enum section_e): Add section_types alias for section_info.
180 (print_debug): Add types to the sections table.
181
Roland McGrath599f7f52010-06-20 17:12:43 -0700182 * readelf.c (print_debug_frame_section): Handle version 4 format.
183
Roland McGrathe5251a12010-06-20 16:59:39 -0700184 * readelf.c (print_debug_line_section): Handle version 4 format.
185
Roland McGrathec86e5f2010-06-14 17:44:38 -07001862010-06-14 Roland McGrath <roland@redhat.com>
187
188 * unstrip.c (copy_elided_sections): Make sure all sections' data have
189 been read in before we write anything out.
190
Roland McGrath3b1b6512010-06-04 02:26:30 -07001912010-06-04 Roland McGrath <roland@redhat.com>
192
Roland McGrathaa32f922010-06-04 02:29:08 -0700193 * unstrip.c (update_shdr): New function.
194 (update_sh_size): Call it instead of gelf_update_shdr.
195 (adjust_relocs, add_new_section_symbols): Likewise.
196 (new_shstrtab, copy_elided_sections): Likewise.
197
Roland McGrath3b1b6512010-06-04 02:26:30 -0700198 * unstrip.c (copy_elided_sections): Bail if stripped file has more
199 sections than unstripped file, rather than getting confused later.
200
Roland McGrath7a5bed82010-06-01 13:44:00 -07002012010-06-01 Roland McGrath <roland@redhat.com>
202
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700203 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
204 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700205 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700206
Roland McGrath7a5bed82010-06-01 13:44:00 -0700207 * readelf.c (print_debug): Don't bail if libdw setup fails.
208 Suppress complaint if we only want .eh_frame anyway.
209
Ulrich Drepper173ade82010-05-28 07:39:49 -07002102010-05-28 Ulrich Drepper <drepper@redhat.com>
211
212 * readelf.c (attr_callback): Also print form information.
213
Roland McGrath12e3d1f2010-05-19 18:03:31 -07002142010-05-19 Roland McGrath <roland@redhat.com>
215
216 * addr2line.c (find_symbol): Short-circuit on empty name.
217 (handle_address): Handle SYMBOL with no +OFFSET.
218
Roland McGrath688f7fc2010-05-08 03:22:59 -07002192010-05-08 Roland McGrath <roland@redhat.com>
220
221 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
222 Use that for DW_OP_call_ref, not ADDRSIZE.
223 (print_cfa_program): Update caller.
224 (struct attrcb_args): Add offset_size field.
225 (attr_callback): Use it for print_ops call.
226 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700227 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700228
Roland McGrath62b28b62010-04-14 11:54:06 -07002292010-04-14 Roland McGrath <roland@redhat.com>
230
231 * readelf.c (handle_core_item): Fix bitmask printing.
232
Roland McGrath3b495d82010-04-06 12:58:32 -07002332010-04-06 Roland McGrath <roland@redhat.com>
234
235 * ld.c (options): Fix some typos in messages.
236 * elflint.c (check_scn_group, check_group): Likewise.
237 * ldscript.y (add_id_list): Likewise.
238 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
239 before translated string containing a literal %.
240
Roland McGrath890081b2010-02-26 17:57:50 -08002412010-02-26 Roland McGrath <roland@redhat.com>
242
243 * readelf.c (process_file): Don't leak an fd in failure case.
244
Roland McGrathc2b26f12010-02-15 15:16:15 -08002452010-02-15 Roland McGrath <roland@redhat.com>
246
Roland McGrath22359e22010-02-15 15:57:03 -0800247 * Makefile.am: Use config/eu.am for common stuff.
248
Roland McGrathc2b26f12010-02-15 15:16:15 -0800249 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
250 mismatch in comparison.
251
Roland McGrathf920fd52010-02-02 15:50:15 -08002522010-02-02 Roland McGrath <roland@redhat.com>
253
254 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
255 (read_encoded): Likewise.
256 (print_debug_frame_section): Check for bogus augmentation length.
257 For P augmentation, use read_encoded, print the encoding description,
258 and use hex for unsigned values.
259
Roland McGrathb337b1f2010-01-15 01:02:27 -08002602010-01-15 Roland McGrath <roland@redhat.com>
261
262 * ar.c: Include <sys/stat.h>.
263 * elflint.c: Likewise.
264 * readelf.c: Likewise.
265 * strip.c: Likewise.
266 * unstrip.c: Likewise
267
Roland McGrathbd733ca2010-01-07 20:11:42 -08002682010-01-07 Roland McGrath <roland@redhat.com>
269
Roland McGrath8111da02010-01-07 20:31:59 -0800270 * readelf.c (print_ehdr): Handle PN_XNUM.
271 (phnum): New static variable.
272 (process_elf_file): Set it with elf_getphdrnum.
273 (print_phdr): Use phnum instead of EHDR->e_phnum.
274 (print_dynamic, handle_notes): Likewise.
275 (handle_relocs_rel, handle_relocs_rela): Likewise.
276
Roland McGrathbd733ca2010-01-07 20:11:42 -0800277 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
278
279 * elflint.c (phnum): New static variable.
280 (check_elf_header): Set it, handling PN_XNUM.
281 Use that in place of EHDR->e_phnum throughout.
282 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
283 (unknown_dependency_p, check_sections, check_program_header): Likewise.
284
Roland McGrath019d9fb2010-01-05 13:36:07 -08002852010-01-05 Roland McGrath <roland@redhat.com>
286
287 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
288 DW_AT_GNU_template_name.
289
Roland McGrathe4061d02010-01-04 20:25:09 -08002902010-01-04 Roland McGrath <roland@redhat.com>
291
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800292 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
293 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
294 (handle_core_item): Handle .format of '\n' as \n-separated strings.
295
Roland McGrath2e79deb2010-01-04 20:36:10 -0800296 * readelf.c (implicit_debug_sections): New variable.
297 (parse_opt): Set it instead of print_debug_sections for -a.
298 OR them together for print_debug check.
299 (print_debug): OR them together for section check.
300
Roland McGratha7422be2010-01-04 20:29:33 -0800301 * readelf.c (options): Repartition into set implied by -a and others.
302 Correct -a text to match reality.
303
Roland McGrathe4061d02010-01-04 20:25:09 -0800304 * readelf.c (struct section_argument): Add bool member 'implicit'.
305 (parse_opt): Set it for -a cases, clear it for -x args.
306 (for_each_section_argument): Don't complain about a missing section by
307 name if it's implicit.
308
Roland McGrathefa64962009-11-16 01:50:58 -08003092009-11-16 Roland McGrath <roland@redhat.com>
310
311 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
312 sections, just as dump_data_section already does.
313
Mark Wielaardc49d00a2009-09-21 16:47:07 -07003142009-09-21 Ulrich Drepper <drepper@redhat.com>
315
316 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
317 set for .comment section.
318 Patch by Mark Wielaard <mjw@redhat.com>.
319
Roland McGrathfb33c672009-09-08 00:21:18 -07003202009-09-08 Roland McGrath <roland@redhat.com>
321
322 * ar.c (main): Fix typo in message format.
323
Roland McGrath2d13ea22009-08-21 03:16:32 -07003242009-08-21 Roland McGrath <roland@redhat.com>
325
326 * readelf.c (attr_callback): Use print_block only when we don't use
327 print_ops.
328
Roland McGrath536127f2009-08-14 13:10:09 -07003292009-08-14 Roland McGrath <roland@redhat.com>
330
331 * ar.c (do_oper_extract): Use pathconf instead of statfs.
332
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07003332009-08-01 Ulrich Drepper <drepper@redhat.com>
334
335 * debugpred.h: Add two most const.
336
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07003372009-07-26 Mark Wielaard <mjw@redhat.com>
338
339 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
340
Mark Wielaard79178202009-07-25 12:44:46 -07003412009-07-25 Mark Wielaard <mjw@redhat.com>
342
343 * Makefile.am (addr2line_LDADD): Add $(libelf).
344
Roland McGrathbe4589d2009-07-24 16:23:12 -07003452009-07-24 Roland McGrath <roland@redhat.com>
346
347 * readelf.c (print_block): New function.
348 (print_ops): Use it.
349 (attr_callback): Use it for DW_FORM_block* forms.
350
Mark Wielaarddaf85b22009-07-24 15:49:51 -07003512009-07-20 Mark Wielaard <mjw@redhat.com>
352
353 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
354 and DW_OP_stack_value.
355
Ulrich Drepper96d950e2009-07-14 10:42:01 -07003562009-07-14 Ulrich Drepper <drepper@redhat.com>
357
358 * elflint.c (check_elf_header): Allow Linux ABI.
359 (check_symtab): Handle STB_GNU_UNIQUE.
360
Mark Wielaardf735db12009-07-08 19:18:53 +02003612009-07-08 Mark Wielaard <mjw@redhat.com>
362
363 * readelf.c (attr_callback): Handle DW_Form constants for
364 DW_AT_data_member_location.
365
Roland McGrathdffc33d2009-07-06 16:06:41 -07003662009-07-06 Roland McGrath <roland@redhat.com>
367
368 * readelf.c (register_info): New function. Handle unknown register #s.
369 (print_cfa_program): Use it.
370 (handle_core_register, handle_core_registers): Likewise.
371
Roland McGrath5dbccdb2009-06-28 14:48:02 -07003722009-06-28 Roland McGrath <roland@redhat.com>
373
374 * readelf.c (print_address_names): New static variable.
375 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
376 (format_dwarf_addr): Don't look up name if !print_address_names.
377
Ulrich Drepperf1894932009-06-13 15:55:42 -07003782009-06-13 Ulrich Drepper <drepper@redhat.com>
379
380 * ldgeneric.c: Don't use deprecated libelf functions.
381 * nm.c: Likewise.
382 * objdump.c: Likewise.
383 * readelf.c: Likewise.
384 * size.c: Likewise.
385 * strip.c: Likewise.
386 * unstrip.c: Likewise.
387 * ld.h: Fix up comment.
388
Ulrich Drepperb47d2902009-06-01 07:38:32 -07003892009-06-01 Ulrich Drepper <drepper@redhat.com>
390
391 * readelf.c (print_relocs): Expect ELF header argument and pass on
392 to handle_relocs_rel* functions. Adjust caller.
393 (handle_relocs_rel): Add ELF header argument. Add special case for
394 the IRELATIVE relocations in statically linked executables.
395 (handle_relocs_rela): Likewise.
396
Roland McGrathdb19f0b2009-05-07 18:44:27 -07003972009-04-29 Ulrich Drepper <drepper@redhat.com>
398
399 * elflint.c (check_symtab): Add tests of st_other field.
400
Ulrich Drepperaab90f92009-04-23 07:44:36 -07004012009-04-23 Ulrich Drepper <drepper@redhat.com>
402
403 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
404
Roland McGrathd86e1832009-04-20 00:49:33 -07004052009-04-20 Roland McGrath <roland@redhat.com>
406
Roland McGrath8a592412009-04-20 01:20:44 -0700407 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
408 of inline call sites.
409
Roland McGrathd86e1832009-04-20 00:49:33 -0700410 * addr2line.c (just_section): New variable.
411 (adjust_to_section): New function, broken out of ...
412 (handle_address): ... here.
413 (options, parse_opt): Add -j/--section=NAME to set it.
414
Roland McGrath2fb90512009-04-15 14:47:13 -07004152009-04-15 Roland McGrath <roland@redhat.com>
416
417 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
418 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
419
Roland McGrath04a14162009-04-14 01:02:17 -07004202009-04-14 Roland McGrath <roland@redhat.com>
421
Roland McGratheb9ba472009-04-14 18:44:45 -0700422 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
423 like SHT_GNU_ATTRIBUTES.
424
Roland McGrath94f43832009-04-14 04:39:32 -0700425 * readelf.c (handle_core_registers): Fix error message.
426
Roland McGrath04a14162009-04-14 01:02:17 -0700427 * strip.c (handle_elf: check_preserved): Don't note any change when
428 .debug_data is already filled from a previous pass.
429
Ulrich Drepper411cdb22009-02-05 22:04:26 -08004302009-02-05 Ulrich Drepper <drepper@redhat.com>
431
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800432 * objdump.c (show_relocs_x): Minor cleanups.
433
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800434 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800435 Print first DW_CFA_expression and DW_CFA_val_expression parameter
436 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800437
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08004382009-02-01 Ulrich Drepper <drepper@redhat.com>
439
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800440 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
441 into ...
442 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800443 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800444
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800445 * objdump.c (show_relocs_rela): Show offsets as signed values.
446
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800447 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
448 Improve some error messages.
449 Use program_invocation_short_name instead of AR macro.
450 * Makefile.am (CFLAGS_ar): Remove.
451 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
452 * objdump.c (parse_opt): Likewise.
453 * readelf.c (parse_opt): Likewise.
454
Roland McGrath51f01282009-01-27 17:08:03 -08004552009-01-27 Roland McGrath <roland@redhat.com>
456
457 * readelf.c (print_ops): Notice short length, don't overrun buffer
458 (still need to fix LEB128).
459
460 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
461
462 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
463
Ulrich Drepper62c46532009-01-24 17:01:08 -08004642009-01-24 Ulrich Drepper <drepper@redhat.com>
465
466 * readelf.c (print_debug_frame_section): Fix computation of vma_base
467 for PC-relative mode.
468
Ulrich Drepperd7285e12009-01-23 16:10:44 -08004692009-01-23 Ulrich Drepper <drepper@redhat.com>
470
Ulrich Drepperccccab02009-01-23 16:32:21 -0800471 * size.c (process_file): When handling archive, close file descriptor
472 here. For unknown file format also close file descriptor.
473 (handle_ar): Don't close file descriptor here.
474
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800475 * readelf.c (parse_opt): Move code to add to dump_data_sections and
476 string_sections list in local function add_dump_section. Adjust 'x'
477 key handling. For 'a' key add .strtab, .dynstr, and .comment section
478 to string_sections list.
479
Roland McGrathe9de9b42009-01-22 13:05:40 -08004802009-01-22 Roland McGrath <roland@redhat.com>
481
Roland McGrath9a847e12009-01-22 19:55:00 -0800482 * readelf.c (print_phdr): Don't print section mapping when no sections.
483
Roland McGrathd759aa62009-01-22 19:17:07 -0800484 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
485
Roland McGrathcabeeee2009-01-22 13:17:45 -0800486 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
487 and reset it only for the 'true' cases.
488
489 * Makefile.am (addr2line_no_Wformat): New variable.
490
Roland McGrathe9de9b42009-01-22 13:05:40 -0800491 * readelf.c (print_debug_frame_section): Use t instead of j formats
492 for ptrdiff_t OFFSET.
493
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08004942009-01-21 Ulrich Drepper <drepper@redhat.com>
495
496 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800497 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800498 (check_exception_data): First sanity test.
499
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08005002009-01-17 Ulrich Drepper <drepper@redhat.com>
501
Ulrich Drepper935edde2009-01-17 16:06:42 -0800502 * readelf.c (print_debug_exception_table): Show target of ar_disp
503 field.
504
505 * elflint.c (check_program_header): Add most consistency checks for
506 PT_GNU_EH_FRAME entry.
507
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800508 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
509 ARGP_PROGRAM_BUG_ADDRESS_DEF.
510 * ar.c: Likewise.
511 * elfcmp.c: Likewise.
512 * elflint.c: Likewise.
513 * findtextrel.c: Likewise.
514 * ld.c: Likewise.
515 * nm.c: Likewise.
516 * objdump.c: Likewise.
517 * ranlib.c: Likewise.
518 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800519
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800520 * size.c: Likewise.
521 * strings.c: Likewise.
522 * strip.c: Likewise.
523 * unstrip.c: Likewise.
524
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08005252009-01-16 Ulrich Drepper <drepper@redhat.com>
526
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800527 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
528 matches .eh_frame_hdr section, if it is available. Also check that
529 the segment is allocated, not writable, not executable.
530
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800531 * readelf.c: Add -e option. Dump exception and unwind related
532 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800533 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800534 (print_debug_exception_table): Beginning of support.
535 (print_debug): Hook up print_debug_exception_table for
536 .gcc_except_table sections.
537
538 * readelf.c (print_debug_frame_section): Some fixes for last change.
539
Ulrich Drepper351bf202009-01-15 20:18:40 -08005402009-01-15 Ulrich Drepper <drepper@redhat.com>
541
542 * readelf.c (print_encoding): Now a toplevel function.
543 (print_relinfo): Likewise.
544 (print_encoding_base): Broken out of print_debug_frame_section.
545 (print_debug_frame_section): Print different header for .eh_frame
546 sections. Fix recognition of matching CIEs in .debug_frame sections.
547 Print absolute offset for PC-relative FDE locations. Don't print
548 table header for FDEs if the table is empty.
549 (read_encoded): New function.
550 (print_debug_frame_hdr_section): New function.
551 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
552 sections.
553
554 * readelf.c (handle_relocs_rel): Print section number.
555 (print_debug_abbrev_section): Likewise.
556 (print_debug_aranges_section): Likewise.
557 (print_debug_ranges_section): Likewise.
558 (print_debug_info_section): Likewise.
559 (print_debug_line_section): Likewise.
560 (print_debug_loc_section): Likewise.
561 (print_debug_macinfo_section): Likewise.
562 (print_debug_pubnames_section): Likewise.
563 (print_debug_str_section): Likewise.
564
Ulrich Drepper8b394632009-01-10 18:29:56 -08005652009-01-10 Ulrich Drepper <drepper@redhat.com>
566
567 * strings.c (read_block): Fix typo in error message string.
568
Ulrich Drepper87cf5832009-01-07 20:39:21 -08005692009-01-07 Ulrich Drepper <drepper@redhat.com>
570
571 * ld.c (ld_new_searchdir): Fix adding to search path list.
572
Ulrich Drepperac194d02009-01-06 00:30:01 -08005732009-01-06 Ulrich Drepper <drepper@redhat.com>
574
575 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800576
Roland McGrath3614d992009-01-05 18:05:32 -08005772009-01-05 Roland McGrath <roland@redhat.com>
578
579 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
580 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800581
Ulrich Drepper44173ed2009-01-01 19:00:41 -08005822009-01-01 Ulrich Drepper <drepper@redhat.com>
583
584 * addr2line.c: Update copyright year.
585 * ar.c: Likewise.
586 * elfcmp.c: Likewise.
587 * elflint.c: Likewise.
588 * findtextrel.c: Likewise.
589 * ld.c: Likewise.
590 * nm.c: Likewise.
591 * objdump.c: Likewise.
592 * ranlib.c: Likewise.
593 * readelf.c: Likewise.
594 * size.c: Likewise.
595 * strings.c: Likewise.
596 * strip.c: Likewise.
597 * unstrip.c: Likewise.
598
Roland McGrath468fe4d2008-12-11 21:00:12 -08005992008-12-11 Roland McGrath <roland@redhat.com>
600
601 * nm.c (sym_name): New function.
602 (show_symbols_sysv): Use it in place of elf_strptr.
603 (show_symbols_bsd, show_symbols_posix): Likewise.
604 Fixes RHBZ#476136.
605
606 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
607 elf_strptr fails.
608
Roland McGratha845f682008-12-03 03:41:58 +00006092008-12-02 Roland McGrath <roland@redhat.com>
610
611 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
612 nonzero OFFSET argument to dwfl_getmodules.
613
Roland McGrath1d8bb252008-08-07 08:39:41 +00006142008-08-07 Roland McGrath <roland@redhat.com>
615
616 * addr2line.c (main): Pass string to handle_address.
617 (see_one_module): New function, subroutine of handle_address.
618 (find_symbol): Likewise.
619 (handle_address): Take string argument rather than address.
620 Convert plain number, or handle strings like "(section)+offset"
621 or "symbol+offset".
622
6232008-08-01 Roland McGrath <roland@redhat.com>
624
625 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
626 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
627
628 * readelf.c (convert): Take new argument SIZE.
629 (handle_core_register, handle_core_item): Update callers.
630 (handle_core_item): Take new arg REPEATED_SIZE.
631 (handle_core_items): Special case for a singleton item,
632 let handle_core_item handle repeats if it wants to.
633
634 * readelf.c (handle_core_items): Give abridged output
635 for identical groups repeated more than twice.
636
6372008-07-04 Roland McGrath <roland@redhat.com>
638
639 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
640
Roland McGrath521c47d2008-04-11 07:01:58 +00006412008-04-10 Roland McGrath <roland@redhat.com>
642
643 * strip.c (handle_elf): Don't keep sections that kept symbol tables
644 refer to. Instead, just be sure to preserve the original symbol
645 table in the debug file so those symbols go with their sections and
646 can be elided from the stripped version of the symbol table.
647
648 * strip.c (handle_elf): When a discarded section kept in the debug
649 file refers to a nondiscard section via sh_link/sh_info, preserve
650 that nondiscarded section unmodified in the debug file as well.
651 Skip adjustment of discarded sections symbol table references when
652 that symbol table is copied in this way.
653
654 * elflint.c (check_symtab): Don't crash from missing symbol names
655 after diagnosing bogus strtab.
656
657 * strip.c (handle_elf): Cosmetic cleanup in special section contents
658 adjustment for symtab changes.
659
Roland McGrath13b69602008-04-01 02:30:05 +00006602008-03-31 Roland McGrath <roland@redhat.com>
661
662 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
663 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
664 excuse a special section.
665
6662008-03-27 Roland McGrath <roland@redhat.com>
667
668 * elflint.c (check_sections): Check that executability and writability
669 of sections is reflected in segment p_flags.
670
Roland McGrathd11f9cb2008-03-26 20:51:59 +00006712008-03-26 Roland McGrath <roland@redhat.com>
672
673 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
674 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
675 is valid in RELRO.
676
Roland McGrath47c5c352008-02-29 10:17:16 +00006772008-02-29 Roland McGrath <roland@redhat.com>
678
679 * readelf.c (print_attributes): Add a cast.
680 * elflint.c (check_attributes): Likewise.
681
682 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
683 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
684 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
685
Ulrich Drepper834de6f2008-02-23 06:50:01 +00006862008-02-03 Ulrich Drepper <drepper@redhat.com>
687
688 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
689 when linked into executable.
690 (elf_i386_create_relocations): Likewise.
691
Roland McGrath059c83e2008-02-21 06:19:39 +00006922008-02-20 Roland McGrath <roland@redhat.com>
693
694 * readelf.c (print_attributes): New function.
695 (process_elf_file): Call it under -A.
696
697 * elflint.c (check_attributes): Implement it for real.
698
6992008-02-19 Roland McGrath <roland@redhat.com>
700
701 * elflint.c (special_sections): Handle .gnu.attributes section.
702 (check_sections): Likewise.
703 (check_attributes): New function.
704
7052008-02-10 Roland McGrath <roland@redhat.com>
706
707 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
708 sections and ET_REL files.
709
Ulrich Drepper712d78e2008-02-02 10:01:53 +00007102008-02-02 Ulrich Drepper <drepper@redhat.com>
711
712 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
713 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
714 and R_386_TLS_LE.
715 (elf_i386_create_relocations): Likewise.
716 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
717 elements.
718 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
719 (ld_generic_create_outfile): Add PT_TLS entry to program header.
720 Fix generation of PT_GNU_STACK entry.
721
Ulrich Drepperc54785a2008-02-01 18:05:21 +00007222008-02-01 Ulrich Drepper <drepper@redhat.com>
723
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000724 * ld.c (replace_args): Prevent loop over replacements if the parameter
725 is only two characters long.
726
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000727 * ld.c: Recognize sha1 argument for --build-id parameter.
728 * ldgeneric.c (create_build_id_section): Handle sha1.
729 (compute_hash_sum): New function. Broken out of compute_build_id.
730 Take hash function and context as parameters.
731 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
732 implementation.
733
Ulrich Drepper89759c72008-01-31 19:44:12 +00007342008-01-31 Ulrich Drepper <drepper@redhat.com>
735
736 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
737 * ld.c: Recognize --build-id command line parameter.
738 * ld.h: Define scn_dot_note_gnu_build_id.
739 (struct ld_state): Add build_id and buildidscnidx elements.
740 * ldgeneric.c: Implement --build-id command line parameter.
741 * ldlex.l (ID): Recognize - as valid character after the first one.
742
Ulrich Drepper5530ec52008-01-29 10:42:07 +00007432008-01-29 Ulrich Drepper <drepper@redhat.com>
744
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000745 * ld.c (replace_args): New function.
746 (main): Use it to rewrite old-style parameters.
747
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000748 * elf32-i386.script: Add .gnu.hash section.
749 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
750 (fillin_special_symbol): Initialize st_size.
751 (sortfct_hashval): New function.
752 (create_gnu_hash): New function.
753 (create_hash): New function.
754 (ld_generic_create_outfile): Use the new functions to create the
755 hash tables.
756
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000757 * elflint.c (check_gnu_hash): Fix index value printed in error message.
758
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00007592008-01-24 Ulrich Drepper <drepper@redhat.com>
760
761 * elflint.c (check_group): Check that signature symbol for section
762 group is not an empty string.
763 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
764 section. Start implementation of --hash-style.
765 * i386_ld.c: Likewise.
766 * ld.c: Recognize --hash-style.
767 * ld.h (struct scninfo): Add comdat_group.
768 Add additional parameter to finalize_plt callback.
769
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00007702008-01-22 Ulrich Drepper <drepper@redhat.com>
771
772 * ld.h (struct callbacks): Add initialize_gotplt.
773 (struct scnhead): Add scn_dot_gotplt.
774 (struct ld_state): Add gotpltscnidx.
775 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
776 (elf_i386_initialize_pltrel): Likewise.
777 (elf_i386_initialize_got): There is now a separate .got.plt, so
778 don't do the PLT-related work here. Initialize d_type.
779 (elf_i386_initialize_gotplt): New function.
780 (elf_i386_plt0): Use ud2a after indirect jump.
781 (elf_i386_pic_plt0_entry): Likewise.
782 (elf_i386_finalize_plt): Reference now .got.plt.
783 (elf_i386_count_relocations): For GOT entries which need no relocation
784 don't bump nrel_got.
785 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
786 handling for split .got/.got.plt.
787 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
788 * elf32-i386.script: Sort sections for security. There are no .got
789 input sections. Add .got.plt.
790 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
791 (ld_generic_create_outfile): Initialize .got.plt section.
792 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
793
Ulrich Drepperd9488292008-01-20 16:43:15 +00007942008-01-19 Ulrich Drepper <drepper@redhat.com>
795
796 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
797 symbols are not carried over into statically linked output files.
798 Add dummy entries for more TLS relocations.
799
800 * ld.c (options): Add long names for -( and -).
801
802 * ldgeneric.c (check_definition): For newly found definitions don't
803 mark section as used if symbol is absolute.
804 (extract_from_archive): Only assign archive sequence number the first
805 time the archive is handled. Update ld_state.last_archive_used
806 if any symbol was used. Remove nround variable.
807 (file_process2): When using symbol from an archive, update
808 ld_state.group_start_archive, ld_state.archives, and
809 ld_state.tailarchives.
810 (ld_generic_file_process): If group is not handled anymore, after
811 freeing ELF handles for the archives, clear ld_state.archives and
812 *nextp. Fix wrong logic in recognizing first iteration of group
813 loop. When clearing flags, also clear ld_state.group_start_archive.
814
Ulrich Drepper5eee1222008-01-11 10:12:18 +00008152008-01-11 Ulrich Drepper <drepper@redhat.com>
816
817 * objdump.c (show_disasm): Adjust disassembler format string for
818 removal of %e.
819
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00008202008-01-04 Roland McGrath <roland@redhat.com>
821
Roland McGrath059c83e2008-02-21 06:19:39 +0000822 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
823 a size greater than the items cover means multiple sets of items.
824 (handle_core_note): Update caller.
825
8262008-01-04 Roland McGrath <roland@redhat.com>
827
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000828 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
829
8302008-01-03 Roland McGrath <roland@redhat.com>
831
832 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
833
834 * elflint.c (check_dynamic): Remove duplicate initializer.
835
Ulrich Drepperad024af2008-01-02 17:42:52 +00008362008-01-02 Ulrich Drepper <drepper@redhat.com>
837
838 * addr2line.c: Update copyright year.
839 * ar.c: Likewise.
840 * elfcmp.c: Likewise.
841 * elflint.c: Likewise.
842 * findtextrel.c: Likewise.
843 * ld.c: Likewise.
844 * nm.c: Likewise.
845 * objdump.c: Likewise.
846 * ranlib.c: Likewise.
847 * readelf.c: Likewise.
848 * size.c: Likewise.
849 * strings.c: Likewise.
850 * strip.c: Likewise.
851 * unstrip.c: Likewise.
852
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00008532007-12-30 Ulrich Drepper <drepper@redhat.com>
854
855 * objdump (show_disasm): Use %e after third parameter.
856
8572007-12-21 Ulrich Drepper <drepper@redhat.com>
858
859 * strip.c: Fix wrong parenthesis in a few branch predictions.
860 * strings.c: Likewise.
861
8622007-12-20 Ulrich Drepper <drepper@redhat.com>
863
864 * Makefile.am (DEFS): Add DEBUGPRED.
865 * addr2line.c: Include debugpred.h.
866 * ar.c: Likewise.
867 * elfcmp.c: Likewise.
868 * elflint.c: Likewise.
869 * findtextrel.c: Likewise.
870 * nm.c: Likewise.
871 * objdump.c: Likewise.
872 * ranlib.c: Likewise.
873 * readelf.c: Likewise.
874 * size.c: Likewise.
875 * strings.c: Likewise.
876 * strip.c: Likewise.
877 * unstrip.c: Likewise.
878 * debugpred.h: New file.
879
880 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
881 (handle_relocs_rela): Likewise.
882
883 * readelf.c: Add lots of likely/unlikely.
884
885 * elflint.c: Minor cleanups.
886
Roland McGrath1a2e8f42007-12-15 23:39:34 +00008872007-11-19 Roland McGrath <roland@redhat.com>
888
889 * readelf.c (print_ops): Handle all bad op codes gracefully.
890 Print their numbers instead of just ???.
891
Roland McGrath07a696e2007-11-09 22:44:26 +00008922007-11-09 Roland McGrath <roland@redhat.com>
893
894 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000895 Handle block forms to mean a DWARF expression for DW_AT_allocated,
896 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
897 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
898 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000899
Roland McGrathe4c22ea2007-10-23 13:07:39 +00009002007-10-20 Roland McGrath <roland@redhat.com>
901
902 * unstrip.c (options): Update -R description.
903 (struct symbol): Put symbol details a union with a size_t pointer
904 `duplicate'.
905 (compare_symbols_output): Use null ->name as marker for discard
906 symbols, not zero *->map.
907 (copy_elided_sections): Record forwarding pointers for discarded
908 duplicates and fill SYMNDX_MAP elements through them.
909
910 * readelf.c (process_file): Set offline_next_address to 0 at start.
911 (struct process_dwflmod_args): New type.
912 (process_dwflmod): Take args in it, pass fd to process_elf_file.
913 (process_file): Update caller; dup FD for passing to libdwfl.
914 (process_elf_file): Take new arg FD. For ET_REL file when
915 displaying data affected by libdwfl relocation, open a new Elf handle.
916
9172007-10-17 Roland McGrath <roland@redhat.com>
918
919 * readelf.c (print_debug_line_section): For invalid data inside a
920 unit with plausible length, keep printing at the next unit boundary.
921
922 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
923
9242007-10-16 Roland McGrath <roland@redhat.com>
925
926 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
927
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00009282007-10-15 Roland McGrath <roland@redhat.com>
929
930 * make-debug-archive.in: New file.
931 * Makefile.am (EXTRA_DIST): Add it.
932 (make-debug-archive): New target.
933 (bin_SCRIPTS, CLEANFILES): Add it.
934
9352007-10-10 Roland McGrath <roland@redhat.com>
936
937 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
938 Use it to check MERGE|STRINGS for .debug_str.
939 (check_sections): Handle exact_or_gnuld.
940
9412007-10-08 Roland McGrath <roland@redhat.com>
942
943 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
944 64-bit struct timeval with 32-bit tv_usec.
945
9462007-10-07 Roland McGrath <roland@redhat.com>
947
948 * readelf.c (check_archive_index): New function.
949 (process_file): Call it. Change signature to take only fd and name.
950 Use libdwfl to open the file, then iterate on its modules (multiple
951 for an archive) to print file name and call process_elf_file.
952 (main): Update caller. Let process_file do elf_begin.
953 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
954 (process_elf_file): Take only Dwfl_Module * argument.
955 Don't print the file name here.
956 (print_debug_*_section): Take Dwfl_Module * argument.
957 (print_debug): Likewise. Update caller.
958 (format_dwarf_addr): New function.
959 (print_debug_ranges_section): Use it.
960 (attr_callback): Likewise.
961 (print_debug_line_section, print_debug_loc_section): Likewise.
962
963 * readelf.c (print_debug_ranges_section): Translate all strings.
964 (print_debug_loc_section): Likewise.
965
966 * unstrip.c (copy_elided_sections): Initialize SEC.
967
968 * ar.c (do_oper_insert): Put trailing / on short names.
969
970 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
971
972 * arlib2.c (arlib_add_long_name): Adjust for header size.
973
974 * arlib.c (arlib_finalize): Pad long name table to keep size even.
975
976 * ar.c (do_oper_insert): Use write_retry for padding write.
977
978 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
979 Unconditionally set FOUND[CNT]->elf when setting ->mem.
980 (remember_long_name): New function.
981 (do_oper_insert): Call it. Correctly use length of basename,
982 not original name. Don't store long name twice for new member.
983
9842007-10-06 Roland McGrath <roland@redhat.com>
985
986 * elflint.c (check_note): Skip empty segment.
987 (check_note_section): Skip empty section.
988
989 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
990 (handle_output_dir_module, handle_implicit_modules): Pass it down.
991 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
992 (compare_alloc_sections): Take new arg REL, ignore address if true.
993 (compare_sections): Likewise, pass it down.
994 (compare_sections_rel, compare_sections_nonrel): New functions.
995 (find_alloc_sections_prelink, copy_elided_sections): Use them
996 instead of compare_sections.
997 (sections_match): New function, broken out of ...
998 (find_alloc_section): ... here.
999 (copy_elided_sections): Reorganize section match-up logic.
1000 Use sections_match for SHF_ALLOC in ET_REL.
1001 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1002
1003 * unstrip.c (add_new_section_symbols): Take new arg REL.
1004 When true, do not update section symbol values.
1005 (collect_symbols): Likewise. Update section symbols with address
1006 of chosen output section, not original section.
1007 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1008
1009 * unstrip.c (compare_alloc_sections): At the same address, preserve
1010 original section order.
1011
1012 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1013 .debug_str, it didn't always have them with older tools.
1014
1015 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1016
10172007-10-05 Roland McGrath <roland@redhat.com>
1018
1019 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1020 ET_REL file.
1021
1022 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1023 SHN_UNDEF as "bad section". Use shndx value in messages.
1024
1025 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1026 for ".debug" so it matches as a prefix.
1027 (IS_KNOWN_SPECIAL): New macro.
1028 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1029 type even under -d, for a .debug* or .shstrtab section.
1030
1031 * readelf.c (print_ops): Use hex for address operand.
1032
10332007-10-04 Roland McGrath <roland@redhat.com>
1034
1035 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1036 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1037 sections mapped to SHN_UNDEF.
1038
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000010392007-10-04 Ulrich Drepper <drepper@redhat.com>
1040
1041 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1042 variable with older glibc versions.
1043 Add some branch prediction.
1044
Roland McGrath59ea7f32007-10-04 08:50:09 +000010452007-10-04 Roland McGrath <roland@redhat.com>
1046
1047 * readelf.c (print_archive_index): New variable.
1048 (options, parse_opt): Accept -c/--archive-index to set it.
1049 (dump_archive_index): New function.
1050 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1051 Call dump_archive_index on archives if set.
1052 (main): Update caller.
1053 (any_control_option): Give it file scope, moved out of ...
1054 (parse_opt): ... here.
1055
10562007-10-03 Roland McGrath <roland@redhat.com>
1057
1058 * unstrip.c (struct arg_info): Add `list' flag.
1059 (options, parse_opt): Grok -n/--list to set it.
1060 (list_module): New function.
1061 (handle_implicit_modules): Call it under -n.
1062
1063 * elflint.c (check_note_section): New function.
1064 (check_sections): Call it for SHT_NOTE.
1065
1066 * readelf.c (handle_notes): Use sections when available.
1067
1068 * elflint.c (check_note_data): New function, broken out of ...
1069 (check_note): ... here. Call it and elf_getdata_rawchunk.
1070
1071 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1072 Use elf_getdata_rawchunk and gelf_getauxv.
1073 (handle_notes_data): New function, broken out of ...
1074 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1075
Roland McGrath241ac022007-10-01 18:21:46 +000010762007-10-01 Roland McGrath <roland@redhat.com>
1077
Roland McGrathac0a16c2007-10-01 18:50:35 +00001078 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1079
Roland McGrath241ac022007-10-01 18:21:46 +00001080 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1081
Roland McGrathc76f0b02007-09-27 07:31:33 +000010822007-09-10 Roland McGrath <roland@redhat.com>
1083
1084 * readelf.c (options): Give -p optional argument, alias --string-dump.
1085 (string_sections, string_sections_tail): New static variables.
1086 (parse_opt): Set them when -p has an argument.
1087 (print_string_section): New function, broken out of ...
1088 (print_strings): ... here. Call it.
1089 (dump_data_section): New function, broken out of ...
1090 (dump_data): ... here. Call it.
1091 (for_each_section_argument): New function, broken out of ...
1092 (dump_data): ... here. Call it.
1093 (dump_strings): New function.
1094
10952007-08-31 Roland McGrath <roland@redhat.com>
1096
1097 * readelf.c (print_strings): Typo fix.
1098
Roland McGrathcb6d8652007-08-23 08:10:54 +000010992007-08-23 Roland McGrath <roland@redhat.com>
1100
1101 * readelf.c (printf_with_wrap): Function removed.
1102 (REGISTER_WRAP_COLUMN): New macro.
1103 (handle_core_register): Use print_core_item instead.
1104 (struct register_info): New type.
1105 (compare_registers, compare_register_sets): New functions.
1106 (register_bitpos, compare_sets_by_info): New functions.
1107 (handle_core_registers): Use those to segregate and sort registers
1108 for display.
1109
1110 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1111 (print_core_item): New function.
1112 (handle_core_item): Use it instead of printf_with_wrap.
1113 (compare_core_items, compare_core_item_groups): New functions.
1114 (handle_core_items): Use them. Sort by group and force line breaks
1115 between groups.
1116
1117 * readelf.c (handle_core_registers, handle_core_items): New functions,
1118 broken out of ...
1119 (handle_core_note): ... here. Call them.
1120
11212007-08-22 Roland McGrath <roland@redhat.com>
1122
1123 * unstrip.c (new_shstrtab): New function, broken out of ...
1124 (copy_elided_sections): ... here.
1125
11262007-08-20 Roland McGrath <roland@redhat.com>
1127
1128 Avoid local function trampolines in nm binary.
1129 * nm.c (sort_by_address): Move to a static function instead of local
1130 inside show_symbols.
1131 (sort_by_name_strtab): New static variable.
1132 (sort_by_name): Use it. Move to a static function instead of local
1133 inside show_symbols.
1134 (show_symbols): Set sort_by_name_strtab.
1135
11362007-08-19 Roland McGrath <roland@redhat.com>
1137
1138 * readelf.c (handle_auxv_note): New function.
1139 (handle_notes): Call it.
1140
1141 * readelf.c (printf_with_wrap, convert): New functions.
1142 (handle_core_item, (handle_core_register): New functions.
1143 (handle_notes): Call those with details from ebl_core_note.
1144
Roland McGrath099dd522007-08-13 22:58:36 +000011452007-08-12 Roland McGrath <roland@redhat.com>
1146
1147 * elflint.c (check_note): Accept type 0 with name "Linux".
1148
1149 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1150
1151 * elflint.c (section_flags_string): Return "none" for 0, not "".
1152
Roland McGrathd8221722007-08-11 21:18:09 +000011532007-08-11 Roland McGrath <roland@redhat.com>
1154
1155 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1156
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000011572007-08-04 Ulrich Drepper <drepper@redhat.com>
1158
1159 * readelf.c (hex_dump): Use isprint to determine whether to print
1160 character itself or full stop character.
1161 (dump_data): No need to check endp for NULL after strtol call.
1162
Roland McGrath60fc84c2007-08-03 21:59:15 +000011632007-08-03 Roland McGrath <roland@redhat.com>
1164
1165 * readelf.c (print_string_sections): New variable.
1166 (options, parse_opt): Handle --strings/-p to set it.
1167 (print_strings): New function.
1168 (process_elf_file): Call it under -p.
1169
1170 * readelf.c (options): Add hidden aliases --segments, --sections,
1171 as taken by binutils readelf.
1172
11732007-08-01 Roland McGrath <roland@redhat.com>
1174
1175 * readelf.c (dump_data_sections, dump_data_sections_tail):
1176 New variables.
1177 (options, parse_opt): Handle --hex-dump/-x, set them.
1178 (hex_dump): New function.
1179 (dump_data): New function, call it.
1180 (process_elf_file): Call it.
1181
11822007-07-25 Roland McGrath <roland@redhat.com>
1183
1184 * addr2line.c (show_symbols): New variable.
1185 (print_addrsym): New function.
1186 (handle_address): Call it.
1187 (options, parse_opt): Handle -S/--symbols.
1188
Ulrich Drepperb0243862007-06-06 00:09:36 +000011892007-06-05 Ulrich Drepper <drepper@redhat.com>
1190
1191 * addr2line.c: Update for latest autoconf header.
1192 * ar.c: Likewise.
1193 * elfcmp.c: Likewise.
1194 * elflint.c: Likewise.
1195 * findtextrel.c: Likewise.
1196 * ld.c: Likewise.
1197 * ldgeneric.c: Likewise.
1198 * nm.c: Likewise.
1199 * objdump.c: Likewise.
1200 * ranlib.c: Likewise.
1201 * readelf.c: Likewise.
1202 * size.c: Likewise.
1203 * strings.c: Likewise.
1204 * strip.c: Likewise.
1205 * unstrip.c: Likewise.
1206
Roland McGrath9aa8ef72007-05-18 08:59:43 +000012072007-05-18 Roland McGrath <roland@redhat.com>
1208
1209 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1210 stripped file, so as not to duplicate a section copied in both.
1211
1212 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1213
12142007-05-17 Roland McGrath <roland@redhat.com>
1215
1216 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1217
1218 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1219
1220 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1221 call make_directories here.
1222 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1223 (handle_dwfl_module): Likewise.
1224 (handle_implicit_modules): Update callers.
1225 (handle_output_dir_module): Likewise. Don't do make_directories here.
1226
1227 * unstrip.c (get_section_name): New function, broken out of ...
1228 (copy_elided_sections): here. Update callers.
1229 (find_alloc_section): Broken out of ...
1230 (copy_elided_sections): ... here. Update caller.
1231 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1232 update STT_SECTION symbols' st_value fields as a side effect.
1233 (check_symtab_section_symbols): Update caller.
1234 (add_new_section_symbols): Set st_value in symbols added.
1235 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1236 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1237 from .bss to .dynbss.
1238 (find_alloc_sections_prelink): New function. Associate debug file
1239 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1240 .gnu.prelink_undo information.
1241 (copy_elided_sections): Call it when we couldn't find every allocated
1242 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1243 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1244 (handle_file): Update callers.
1245
1246 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1247 named ".comment".
1248
1249 * elflint.c (check_sections): Fix association of segments with
1250 sections when p_memsz > p_filesz.
1251
12522007-04-29 Roland McGrath <roland@redhat.com>
1253
1254 * addr2line.c (options, main): Tweak argp group settings to fix
1255 usage output.
1256
12572007-04-28 Roland McGrath <roland@redhat.com>
1258
1259 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1260 sizes to match sections adjusted in the stripped file.
1261
Roland McGrath4be15242007-04-25 03:09:33 +000012622007-04-24 Roland McGrath <roland@redhat.com>
1263
1264 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1265 (hash_inexact): New variable.
1266 (options, parse_opt): Add --hash-inexact option to set it.
1267 (hash_content_equivalent): New function.
1268 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1269
12702007-04-23 Roland McGrath <roland@redhat.com>
1271
1272 * unstrip.c: New file.
1273 * Makefile.am (bin_PROGRAMS): Add it.
1274 (unstrip_LDADD): New variable.
1275
1276 * strip.c (options): Allow --output for -o.
1277
Ulrich Drepper8b383102007-02-16 00:31:57 +000012782007-02-15 Ulrich Drepper <drepper@redhat.com>
1279
1280 * readelf.c: Remove unused code. Add a few consts.
1281
Ulrich Drepper903c1162007-02-15 19:40:37 +000012822007-02-15 Roland McGrath <roland@redhat.com>
1283
1284 * readelf.c (print_debug): Fix brainos in SHDR test.
1285
Roland McGrathf82a1ec2007-02-06 04:47:44 +000012862007-02-05 Roland McGrath <roland@redhat.com>
1287
1288 * ar.c: Include <limits.h>, since we use LONG_MAX.
1289
Ulrich Drepper0fe63532007-02-05 21:05:51 +000012902007-02-05 Ulrich Drepper <drepper@redhat.com>
1291
Ulrich Drepper8b383102007-02-16 00:31:57 +00001292 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001293 ignore fchown's return value.
1294 (do_oper_insert): Handle error when writing padding.
1295 * ranlib.c: Add fchown complain work around.
1296
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001297 * arlib.c: Make symtab a global variable. Change all users.
1298 * arlib2.c: Likewise.
1299 * ranlib.c: Likewise.
1300 * ar.c: Likewise.
1301 * arlib.h: Declare it.
1302
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000013032007-01-11 Roland McGrath <roland@redhat.com>
1304
1305 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1306 SHF_MASKPROC bits separately from generic sh_flags validation.
1307
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000013082007-02-04 Ulrich Drepper <drepper@redhat.com>
1309
1310 * ar.c: New file.
1311 * arlib.c: New file.
1312 * arlib2.c: New file.
1313 * arlib.h: New file.
1314 * Makefile (noinst_LIBRARIES): Add libar.
1315 (libar_a_SOURCES): Define.
1316 (ar_LDADD): Define.
1317 (CFLAGS_ar): Define.
1318 * ranlib.c: Change to use arlib.
1319
1320 * elflint.c (check_symtab): Work around GNU ld bug which omits
1321 sections but not symbols in those sections.
1322
Ulrich Drepperb770cf92007-01-10 21:02:34 +000013232007-01-10 Ulrich Drepper <drepper@redhat.com>
1324
1325 * addr2line.c: Update copyright year.
1326 * elfcmp.c: Likewise.
1327 * elflint.c: Likewise.
1328 * findtextrel.c: Likewise.
1329 * ld.c: Likewise.
1330 * nm.c: Likewise.
1331 * objdump.c: Likewise.
1332 * ranlib.c: Likewise.
1333 * readelf.c: Likewise.
1334 * size.c: Likewise.
1335 * strings.c: Likewise.
1336 * strip.c: Likewise.
1337
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000013382006-12-09 Ulrich Drepper <drepper@redhat.com>
1339
1340 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1341 two hash tables have different content (module expected omission
1342 of undefined symbols).
1343
Roland McGrath8190db62006-12-17 23:56:51 +000013442006-10-31 Roland McGrath <roland@redhat.com>
1345
1346 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001347 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001348
13492006-09-19 Jakub Jelinek <jakub@redhat.com>
1350
1351 * strip.c (process_file): Disallow -f on archives.
1352
13532006-10-09 Roland McGrath <roland@redhat.com>
1354
1355 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1356
Roland McGrathc373d852006-10-10 00:25:21 +000013572006-08-29 Roland McGrath <roland@redhat.com>
1358
1359 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1360
1361 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1362 Reported by Christian Aichinger <Greek0@gmx.net>.
1363
1364 * elflint.c (valid_e_machine): Add EM_ALPHA.
1365 Reported by Christian Aichinger <Greek0@gmx.net>.
1366
Ulrich Drepper231c5902006-08-08 22:00:11 +000013672006-08-08 Ulrich Drepper <drepper@redhat.com>
1368
1369 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1370 Keep track of which "high DT" entries are present.
1371 Check that either old or GNU-style hash table is present.
1372 If GNU-style hash table is used a symbol table is mandatory.
1373 Check that if any prelink entry is present all of them are.
1374 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1375 table if they don't refer to functions.
1376
Roland McGrath858b1892006-07-17 08:41:15 +000013772006-07-17 Roland McGrath <roland@redhat.com>
1378
1379 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1380 (add_version): Likewise for argument.
1381 (check_versym): Cast constant to GElf_Versym for comparison.
1382
Roland McGrath4ec807e2006-07-13 03:59:46 +000013832006-07-12 Roland McGrath <roland@redhat.com>
1384
1385 * readelf.c (handle_gnu_hash): Add casts for machines where
1386 Elf32_Word != unsigned int.
1387
Ulrich Drepperdcf61602006-07-12 19:59:02 +000013882006-07-12 Ulrich Drepper <drepper@redhat.com>
1389
1390 * elflint.c (check_sysv_hash64): Fix printf format.
1391
Ulrich Dreppercc415622006-07-12 19:42:23 +000013922006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001393
Ulrich Dreppercc415622006-07-12 19:42:23 +00001394 * addr2line.c (options): English fix in -f doc string.
1395
1396 * addr2line.c (use_comp_dir): New variable.
1397 (options, parse_opt): Grok -A/--absolute to set it.
1398 (handle_address): If set, prepend dwfl_line_comp_dir results to
1399 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001400
Ulrich Drepper28ed8952006-07-07 03:43:47 +000014012006-07-06 Ulrich Drepper <drepper@redhat.com>
1402
1403 * elflint.c: Adjust for latest new hash table format.
1404 * readelf.c: Likewise.
1405
1406 * elflint.c (check_versym): Ignore hidden bit when comparing version
1407 numbers.
1408
14092006-07-05 Ulrich Drepper <drepper@redhat.com>
1410
1411 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1412 discarded COMDAT symbols.
1413
1414 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1415 (elf_i386_create_relocations): Likewise.
1416 * ld.h (struct symbol): Add local and hidden bits.
1417 * ld.c (create_special_section_symbol): These synthsized symbols
1418 are local and hidden.
1419 * ldgeneric.c (file_process2): Check whether input file matches
1420 the emulation.
1421 (fillin_special_symbol): Create symbols as local and/or hidden
1422 if requested.
1423 (ld_generic_create_outfile): Make local copy of symbol.
1424 Don't hide global, defined symbols in dynamic symbol table unless
1425 requested. Synthetic symbols have no version information.
1426
1427 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1428 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1429
14302006-07-04 Ulrich Drepper <drepper@redhat.com>
1431
1432 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1433 testing.
1434
14352006-07-03 Ulrich Drepper <drepper@redhat.com>
1436
1437 * elflint.c: Add testing of DT_GNU_HASH.
1438 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1439
1440 * Makefile.am: Add hacks to create dependency files for non-generic
1441 linker.
1442
Ulrich Drepper6ca46002006-06-12 22:40:23 +000014432006-06-12 Ulrich Drepper <drepper@redhat.com>
1444
1445 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1446 section if creating a DSO and no interpreter is given.
1447 (ld_generic_create_outfile): Don't store reference to symbols in
1448 discarded COMDAT groups. Don't create PHDR and INTERP program header
1449 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001450 (create_verneed_data): Pretty printing.
1451
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001452 * ldscript.y (content): If a DSO is created don't set default
1453 interpreter from linker script.
1454
1455 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1456 for symbols in discarded COMDAT groups.
1457 (elf_i386_create_relocations): Likewise.
1458 * ld.h (struct scninfo): Add unused_comdat.
1459 * ldgeneric.c (add_section): Also check group signature when
1460 matching COMDAT sections.
1461 (add_relocatable_file): Ignore symbols in COMDAT group which are
1462 discarded.
1463
1464 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1465 and symbol reference.
1466
Ulrich Drepper54f33a72006-06-11 09:07:37 +000014672006-06-11 Ulrich Drepper <drepper@redhat.com>
1468
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001469 * elflint.c (check_dynamic): Fix checking value of tags which are
1470 offsets in the string section. Make sure DT_STRTAB points to the
1471 section referenced in sh_link.
1472
1473 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1474
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001475 * ld.c: Recognize --eh-frame-hdr option.
1476 * ld.h (struct ld_state): Add eh_frame_hdr field.
1477 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1478
1479 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1480 SH_FLAGS_COMBINE.
1481 (add_relocatable_file): Minor optimization of last change.
1482 (match_section): Don't preserve SHF_GROUP flag any longer.
1483
Ulrich Drepper2d880282006-06-11 00:20:43 +000014842006-06-10 Ulrich Drepper <drepper@redhat.com>
1485
1486 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001487 Handle record and ignore as position dependent options.
1488 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001489 * ld.h (struct ld_state): Add execstack field.
1490 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1491 sections.
1492 (ld_generic_create_outfile): Fix program header creation in native
1493 linker. Add PT_GNU_STACK program header.
1494
Ulrich Dreppera688a732006-06-10 06:33:00 +000014952006-06-09 Ulrich Drepper <drepper@redhat.com>
1496
1497 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1498 for PLT entries if there is no local definition.
1499
1500 * ld.c (parse_option): Handle -z ignore like --as-needed and
1501 -z record like --no-as-needed.
1502 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1503 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1504 looping over DSOs. When deciding about adding DT_NEEDED entries
1505 use ->as_needed instead of ignore_unused_dsos.
1506
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000015072006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001508
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001509 * ld.c: Recognize --as-needed and --no-as-needed options.
1510 * ld.h (struct usedfile): Add as_needed field.
1511 (struct ld_state): Likewise.
1512 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1513 the list.
1514 * ldscript.y (filename_id_list): Split to correctly parse all
1515 combinations.
1516 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001517
Ulrich Drepper697f4db2006-06-10 06:50:47 +000015182006-05-28 Ulrich Drepper <drepper@redhat.com>
1519
1520 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1521 and colno.
1522
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000015232006-05-27 Ulrich Drepper <drepper@redhat.com>
1524
1525 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001526 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001527
Ulrich Drepper82c345d2006-04-04 22:07:54 +000015282006-04-04 Ulrich Drepper <drepper@redhat.com>
1529
1530 * addr2line.c: Update copyright year.
1531 * elfcmp.c: Likewise.
1532 * elflint.c: Likewise.
1533 * findtextrel.c: Likewise.
1534 * ld.c: Likewise.
1535 * nm.c: Likewise.
1536 * objdump.c: Likewise.
1537 * ranlib.c: Likewise.
1538 * readelf.c: Likewise.
1539 * size.c: Likewise.
1540 * strings.c: Likewise.
1541 * strip.c: Likewise.
1542
Roland McGrathdd7e22b2006-03-09 23:05:47 +000015432006-03-09 Roland McGrath <roland@redhat.com>
1544
1545 * Makefile.am (AM_LDFLAGS): New variable.
1546
Roland McGrath060fa052006-03-02 07:51:50 +000015472006-03-01 Roland McGrath <roland@redhat.com>
1548
1549 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1550 for dwarf.h changes matching 3.0 spec.
1551 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1552
Ulrich Drepper038129b2005-12-04 16:47:24 +000015532005-12-04 Ulrich Drepper <drepper@redhat.com>
1554
1555 * elflint.c (check_one_reloc): If relocation section is not loaded,
1556 don't check whether the relocations modify read-only sections or
1557 loaded and unloaded sections.
1558
Ulrich Drepper607e0542005-12-04 15:51:06 +000015592005-11-28 Ulrich Drepper <drepper@redhat.com>
1560
1561 * elflint.c (check_one_reloc): Take additional parameters. Use
1562 them to determine whether relocation is valid in this type of
1563 file. DSOs and executables can contain relocation sections in
1564 unloaded sections which just show the relocations the linker
1565 applied. Adjust all callers.
1566 (check_program_header): Check that PT_PHDR is loaded and that offset
1567 matches the one in the ELF header.
1568
Roland McGrath6724c902005-10-28 07:07:19 +000015692005-10-26 Roland McGrath <roland@redhat.com>
1570
1571 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1572
Ulrich Drepperd0449522005-09-03 07:23:52 +000015732005-09-03 Ulrich Drepper <drepper@redhat.com>
1574
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001575 * strip.c (handle_elf): Unify some error messages.
1576 * ld.c (main): Likewise.
1577 * ldgeneric.c (open_elf): Likewise.
1578 * elfcmp.c (main): Likewise.
1579 * elflint.c (check_elf_header): Likewise.
1580
1581 * size.c (process_file): Fix typo in error message.
1582
Ulrich Drepperd0449522005-09-03 07:23:52 +00001583 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1584
Ulrich Dreppera60501e2005-09-02 19:50:17 +000015852005-09-02 Ulrich Drepper <drepper@redhat.com>
1586
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001587 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001588 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001589
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000015902005-08-28 Ulrich Drepper <drepper@redhat.com>
1591
1592 * ranlib.c: Don't define pread_retry and write_retry here.
1593
1594 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1595 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1596
1597 * strings.c (process_chunk): Reorder expressions in conditional
1598 (process_chunk_mb): Likewise.
1599
1600 * strings.c: New file.
1601 * Makefile.am (bin_PROGRAMS): Add strings.
1602 (strings_no_Wstring): Define.
1603 (strings_LDADD): Define.
1604
Roland McGrath71e15a02005-08-27 10:33:26 +000016052005-08-27 Roland McGrath <roland@redhat.com>
1606
1607 * addr2line.c (dwarf_diename_integrate): Function removed.
1608 (print_dwarf_function): Use plain dwarf_diename.
1609
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000016102005-08-24 Ulrich Drepper <drepper@redhat.com>
1611
1612 * elflint.c (check_versym): Versioned symbols should not have
1613 local binding.
1614
Ulrich Drepper5d832292005-08-15 21:36:27 +000016152005-08-15 Ulrich Drepper <drepper@redhat.com>
1616
Ulrich Drepper61655e02005-08-16 04:23:02 +00001617 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1618 undefined.
1619
Ulrich Drepper5d832292005-08-15 21:36:27 +00001620 * Makefile.am: Add rules to build ranlib.
1621 * ranlib.c: New file.
1622
Roland McGrath18e13422005-08-15 08:01:25 +000016232005-08-14 Roland McGrath <roland@redhat.com>
1624
1625 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1626 sh_type it recognizes.
1627
1628 * elflint.c (check_sections): Print unknown flags in hex, don't
1629 truncate high bits. Print section number and name for unknown type.
1630
Roland McGrathf6895042005-08-13 20:56:52 +000016312005-08-13 Roland McGrath <roland@redhat.com>
1632
1633 * elflint.c (check_program_header): Use ebl_segment_type_name and
1634 allow any p_type it recognizes. Include p_type value in error
1635 message for unknown type.
1636
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000016372005-08-13 Ulrich Drepper <drepper@redhat.com>
1638
1639 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1640 to ebl_check_special_symbol.
1641 (check_sections): Pass ehdr to ebl_bss_plt_p.
1642
Roland McGrath653d3762005-08-13 01:59:10 +000016432005-08-12 Roland McGrath <roland@redhat.com>
1644
1645 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1646 refers to the right section if it's not SHN_ABS.
1647 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1648
1649 * elflint.c (check_sections): Don't complain about a non-NOBITS
1650 section taking no segment space, if it's sh_size is 0.
1651
1652 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1653 be PROGBITS or NOBITS.
1654
1655 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1656 standard st_value and st_size checks.
1657
Roland McGrath1c83bf12005-08-11 07:03:55 +000016582005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001659
Roland McGrath1c83bf12005-08-11 07:03:55 +00001660 * addr2line.c (options, parse_opt): Don't handle -e here.
1661 (executable): Variable removed.
1662 (argp_children): New static variable.
1663 (argp): Use it. Make const.
1664 (main): Fill in argp_children from dwfl_standard_argp ().
1665 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1666 (print_dwarf_function): New function. Try to figure out inline chain.
1667 (elf_getname): Function removed, libdwfl does it for us.
1668 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1669 Use dwfl_module_addrname instead of elf_getname.
1670 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1671 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1672
16732005-08-10 Ulrich Drepper <drepper@redhat.com>
1674
1675 * strip.c (parse_opt): STATE parameter is now used.
1676 Various little cleanups.
1677
1678 * readelf.c (print_debug_line_section): Correct fallout of renaming
1679 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001680
Roland McGrath8f31c2c2005-08-09 04:58:05 +000016812005-08-08 Roland McGrath <roland@redhat.com>
1682
1683 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1684 with binutils strip. Likewise -d, -S, as aliases for -g.
1685 Likewise ignore -s/--strip-all.
1686
Roland McGrath095a01b2005-08-08 03:49:35 +000016872005-08-07 Roland McGrath <roland@redhat.com>
1688
1689 * strip.c (process_file): Open read-only when using a different output
1690 file.
1691
Ulrich Drepper47be7952005-08-07 04:41:39 +000016922005-08-06 Ulrich Drepper <drepper@redhat.com>
1693
Ulrich Drepper637963b2005-08-07 05:33:07 +00001694 * elflint.c (in_nobits_scn): New function.
1695 (check_versym): Allow references for defined symbols against versions
1696 of other DSOs also for symbols in nobits sections.
1697 Move a few variables around.
1698
Ulrich Drepper47be7952005-08-07 04:41:39 +00001699 * Makefile.am (AM_CFLAGS): Avoid duplication.
1700 Link with statis libs if BUILD_STATIC.
1701
Ulrich Drepperdbace232005-08-06 01:37:23 +000017022005-08-05 Ulrich Drepper <drepper@redhat.com>
1703
1704 * elflint.c: Many, many more tests. Mostly related to symbol
1705 versioning. Those sections should now be completely checked.
1706
1707 * readelf.c (print_dynamic): Use gelf_offscn.
1708
Ulrich Drepperacb89832005-08-04 07:01:49 +000017092005-08-04 Ulrich Drepper <drepper@redhat.com>
1710
1711 * elflint.c: Add lots more tests: more extension symbol table sanity,
1712 versioning section tests, hash table tests. General cleanup.
1713
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000017142005-08-02 Ulrich Drepper <drepper@redhat.com>
1715
Ulrich Drepper8a687742005-08-03 02:24:12 +00001716 * objdump.c: New file.
1717 * Makefile.am (bin_PROGRAMS): Add objdump.
1718 (objdump_LDADD): Define.
1719
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001720 * elflint.c (check_reloc_shdr): New function split out from check_rela
1721 and check_rel.
1722 (check_one_reloc): New function. Likewise.
1723 (check_rela): Use check_reloc_shdr and check_one_reloc.
1724 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001725 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1726 section.
1727 Add checks that relocations against read-only segments are flagged,
1728 that the text relocation flag is not set unnecessarily, and that
1729 relocations in one section are either against loaded or not-loaded
1730 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001731
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000017322005-08-01 Ulrich Drepper <drepper@redhat.com>
1733
1734 * elfcmp.c (main): Ignore section count and section name string table
1735 section index.
1736
Roland McGrathf9ece8a2005-07-28 07:03:04 +000017372005-07-27 Roland McGrath <roland@redhat.com>
1738
1739 * elfcmp.c: Include <locale.h>.
1740
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000017412005-07-27 Ulrich Drepper <drepper@redhat.com>
1742
1743 * elfcmp.c: Print name and index of differing section.
1744
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000017452005-07-24 Ulrich Drepper <drepper@redhat.com>
1746
1747 * elfcmp.c: Implement comparing gaps between sections.
1748
17492005-07-23 Ulrich Drepper <drepper@redhat.com>
1750
1751 * elflint.c: Include libeblP.h instead of libebl.h.
1752 * nm.c: Likewise.
1753 * readelf.c: Likewise.
1754 * elfcmp.c: Likewise.
1755
1756 * elfcmp.c (main): Compare individual ELF header fields, excluding
1757 e_shoff instead of the whole struct at once.
1758 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1759 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1760
17612005-07-22 Ulrich Drepper <drepper@redhat.com>
1762
1763 * elfcmp.c (main): Take empty section into account when comparing
1764 section content.
1765
1766 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1767 using it.
1768
17692005-07-21 Ulrich Drepper <drepper@redhat.com>
1770
1771 * elfcmp.c: New file.
1772 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1773 (elfcmp_LDADD): Define.
1774
1775 * elflint.c (check_rela): Check that copy relocations only reference
1776 object symbols or symbols with unknown type.
1777 (check_rel): Likewise.
1778
17792005-06-08 Roland McGrath <roland@redhat.com>
1780
1781 * readelf.c (print_ops): Add consts.
1782
17832005-05-31 Roland McGrath <roland@redhat.com>
1784
1785 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1786 abbreviations. Print a header line before each CU section.
1787
1788 * readelf.c (print_debug_loc_section): Fix indentation for larger
1789 address size.
1790
17912005-05-30 Roland McGrath <roland@redhat.com>
1792
1793 * readelf.c (print_debug_line_section): Print section offset of each
1794 CU's table, so they are easy to find from seeing the stmt_list value.
1795
1796 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1797 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1798
1799 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1800 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1801
1802 * readelf.c (print_ops): Take different args for indentation control.
1803 (attr_callback): Caller updated.
1804 Grok several more block-form attributes as being location expressions.
1805 For those same attributes with udata forms, format output differently
1806 for location list offset.
1807 (print_debug_loc_section): Implement it for real.
1808
1809 * readelf.c (options): Mention ranges for --debug-dump.
1810 (enum section_e): Add section_ranges.
1811 (parse_opt): Grok "ranges" for -w/--debug-dump.
1812 (print_debug_ranges_section): New function.
1813 (print_debug): Handle .debug_ranges section.
1814
18152005-05-30 Ulrich Drepper <drepper@redhat.com>
1816
1817 * readelf.c (handle_notes): At least x86-64 need not have the note
1818 section values aligned to 8 bytes.
1819
18202005-05-18 Ulrich Drepper <drepper@redhat.com>
1821
1822 * readelf.c (dwarf_tag_string): Add new tags.
1823
18242005-05-08 Roland McGrath <roland@redhat.com>
1825
1826 * strip.c (handle_elf): Don't translate hash and versym data formats,
1827 elf_getdata already did it for us.
1828
18292005-05-07 Ulrich Drepper <drepper@redhat.com>
1830
1831 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1832 (addr2line_LDADD): Likewise.
1833
18342005-05-03 Roland McGrath <roland@redhat.com>
1835
1836 * strip.c (handle_elf): Apply symbol table fixups to discarded
1837 relocation sections when they are being saved in the debug file.
1838
1839 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1840 and gelf_xlatetof, not the native byte order.
1841
1842 * strip.c (parse_opt): Give error if -f or -o is repeated.
1843 (main): Exit if argp_parse returns nonzero.
1844
1845 * strip.c (debug_fname_embed): New variable.
1846 (options, parse_opt): New option -F to set it.
1847
18482005-05-07 Ulrich Drepper <drepper@redhat.com>
1849
1850 * readelf.c (parse_opt): Make any_control_option variable
1851 local. Simplify some tests.
1852
18532005-05-03 Roland McGrath <roland@redhat.com>
1854
1855 * strip.c (crc32_file): Function removed (now in ../lib).
1856
18572005-05-03 Roland McGrath <roland@redhat.com>
1858
1859 * elflint.c (is_debuginfo): New variable.
1860 (options, parse_opt): New option --debuginfo/-d to set it.
1861 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1862 (check_note): If is_debuginfo, don't try to get note contents.
1863
18642005-04-24 Ulrich Drepper <drepper@redhat.com>
1865
1866 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1867 section reached.
1868
18692005-04-14 Ulrich Drepper <drepper@redhat.com>
1870
1871 * readelf.c (dwarf_encoding_string): New function.
1872 (dwarf_inline_string): New function.
1873 (dwarf_access_string): New function.
1874 (dwarf_visibility_string): New function.
1875 (dwarf_virtuality_string): New function.
1876 (dwarf_identifier_case_string): New function.
1877 (dwarf_calling_convention_string): New function.
1878 (dwarf_ordering_string): New function.
1879 (dwarf_discr_list_string): New function.
1880 (attr_callback): Decode man more attribute values.
1881
18822005-04-01 Ulrich Drepper <drepper@redhat.com>
1883
1884 * addr2line.c: Finish implementation of -f option.
1885
18862005-03-29 Ulrich Drepper <drepper@redhat.com>
1887
1888 * addr2line.c: New file.
1889 * Makefile.am (bin_PROGRAMS): Add addr2line.
1890 Define addr2line_LDADD.
1891
1892 * findtextrel.c: Use new dwarf_addrdie function.
1893
1894 * findtextrel.c: Fix usage message and re-add accidentally removed
1895 line.
1896
18972005-03-28 Ulrich Drepper <drepper@redhat.com>
1898
1899 * findtextrel.c: New file.
1900 * Makefile: Add rules to build findtextrel.
1901
19022005-02-15 Ulrich Drepper <drepper@redhat.com>
1903
1904 * ldlex.l: Provide ECHO definition to avoid warning.
1905
1906 * elflint.c (check_program_header): Fix typo in RELRO test.
1907
1908 * Makefile.am (AM_CFLAGS): Add more warning options.
1909 * elflint.c: Fix warnings introduced by the new warning options.
1910 * i386_ld.c: Likewise.
1911 * ld.c: Likewise.
1912 * ld.h: Likewise.
1913 * ldgeneric.c: Likewise.
1914 * nm.c: Likewise.
1915 * readelf.c: Likewise.
1916 * sectionhash.c: Likewise.
1917 * size.c: Likewise.
1918 * string.c: Likewise.
1919
19202005-02-05 Ulrich Drepper <drepper@redhat.com>
1921
1922 * Makefile.am: Check for text relocations in constructed DSOs.
1923
1924 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1925 with -lmudflap.
1926
1927 * ldscript.y: Add as_needed handling.
1928 * ldlex.l: Recognize AS_NEEDED token.
1929 * ld.h (struct filename_list): Add as_needed flag.
1930
19312005-02-04 Ulrich Drepper <drepper@redhat.com>
1932
1933 * elflint.c (check_symtab): Correctly determine size of GOT section.
1934
19352005-01-19 Ulrich Drepper <drepper@redhat.com>
1936
1937 * ld.c: Remove unnecessary more_help function. Print bug report
1938 address using argp.
1939 * strip.c: Likewise.
1940 * size.c: Likewise.
1941 * nm.c: Likewise.
1942 * readelf.c: Likewise.
1943 * elflint.c: Likewise.
1944
1945 * elflint.c (main): Don't check for parameter problems here.
1946 (parse_opt): Do it here, where we get informed about some of them
1947 anyway.
1948
1949 * readelf.c (main): Don't check for parameter problems here.
1950 (parse_opt): Do it here, where we get informed about some of them
1951 anyway.
1952
19532005-01-11 Ulrich Drepper <drepper@redhat.com>
1954
1955 * strip.c: Update copyright year.
1956 * readelf.c: Likewise.
1957 * size.c: Likewise.
1958 * nm.c: Likewise.
1959 * ld.c: Likewise.
1960 * elflint.c: Likewise.
1961
1962 * elflint.c (check_symtab): Don't warn about wrong size for
1963 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1964
19652004-10-05 Ulrich Drepper <drepper@redhat.com>
1966
1967 * readelf.c (print_phdr): In section mapping, also indicate
1968 sections in read-only segments.
1969
19702004-09-25 Ulrich Drepper <drepper@redhat.com>
1971
1972 * readelf.c: Make compile with gcc 4.0.
1973 * strip.c: Likewise.
1974
19752004-08-16 Ulrich Drepper <drepper@redhat.com>
1976
1977 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1978 allocate to work around gcc 3.4 bug.
1979
19802004-01-25 Ulrich Drepper <drepper@redhat.com>
1981
1982 * ldlex.l (invalid_char): Better error message.
1983
19842004-01-23 Ulrich Drepper <drepper@redhat.com>
1985
1986 * readelf.c: Print SHT_GNU_LIBLIST sections.
1987
1988 * none_ld.c: New file.
1989
19902004-01-21 Ulrich Drepper <drepper@redhat.com>
1991
1992 * Makefile.am: Enable building of machine specific linker.
1993
19942004-01-20 Ulrich Drepper <drepper@redhat.com>
1995
1996 * Makefile.am: Support building with mudflap.
1997
1998 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1999 * ldgeneric.c: Likewise.
2000 * ldscript.y: Likewise.
2001 * readelf.c: Likewise.
2002 * strip.c: Likewise.
2003
2004 * readelf.c (print_debug_line_section): Determine address size
2005 correctly.
2006
20072004-01-19 Ulrich Drepper <drepper@redhat.com>
2008
2009 * readelf.c (print_phdr): Show which sections are covered by the
2010 PT_GNU_RELRO entry.
2011
2012 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2013
2014 * readelf.c (print_debug_macinfo_section): Implement.
2015
20162004-01-18 Ulrich Drepper <drepper@redhat.com>
2017
2018 * readelf.c (print_debug_line_section): Implement.
2019
20202004-01-17 Ulrich Drepper <drepper@redhat.com>
2021
2022 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2023 * src/ld.c: Likewise.
2024 * src/nm.c: Likewise.
2025 * src/readelf.c: Likewise.
2026 * src/size.c: Likewise.
2027 * src/strip.c: Likewise.
2028
2029 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2030
2031 * Makefile.am: Support building with mudflap.
2032
20332004-01-16 Ulrich Drepper <drepper@redhat.com>
2034
2035 * readelf.c (print_debug_info_section): Free dies memory.
2036
2037 * readelf.c: Print .debug_info section content.
2038
20392004-01-13 Ulrich Drepper <drepper@redhat.com>
2040
2041 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2042
20432004-01-12 Ulrich Drepper <drepper@redhat.com>
2044
2045 * readelf.c (print_debug_aranges): Implement using libdw.
2046
20472004-01-11 Ulrich Drepper <drepper@redhat.com>
2048
2049 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2050
2051 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2052 behavior is available yet.
2053 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2054
20552004-01-09 Ulrich Drepper <drepper@redhat.com>
2056
2057 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2058
2059 * nm.c: Implement getting information about local variables.
2060
20612004-01-07 Ulrich Drepper <drepper@redhat.com>
2062
2063 * nm.c: Read also debug information for local symbols.
2064
20652004-01-05 Ulrich Drepper <drepper@redhat.com>
2066
2067 * nm.c: Shuffle dwarf handling code around so the maximum column
2068 width can be computed ahead of printing. Avoid collection symbols
2069 which are not printed anyway.
2070
2071 * nm.c: Rewrite dwarf handling to use libdw.
2072 * Makefile.am (AM_CFLAGS): Add -std parameter.
2073 (INCLUDES): Find header in libdw subdir.
2074 (nm_LDADD): Replace libdwarf with libdw.
2075
2076 * elflint.c: Update copyright year.
2077 * readelf.c: Likewise.
2078 * size.c: Likewise.
2079 * strip.c: Likewise.
2080 * nm.c: Likewise.
2081
20822003-12-31 Ulrich Drepper <drepper@redhat.com>
2083
2084 * strip.c (process_file): Close file before returning.
2085
20862003-11-19 Ulrich Drepper <drepper@redhat.com>
2087
2088 * readelf.c (handle_dynamic): Make column for tag name wider.
2089
20902003-09-29 Ulrich Drepper <drepper@redhat.com>
2091
2092 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2093
20942003-09-25 Ulrich Drepper <drepper@redhat.com>
2095
2096 * strip.c (process_file): Don't mmap the input file, we modify the
2097 data structures and don't want the change end up on disk.
2098
20992003-09-23 Jakub Jelinek <jakub@redhat.com>
2100
2101 * unaligned.h (union u_2ubyte_unaligned,
2102 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2103 packed attribute.
2104 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2105 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2106 Read/store value through _ptr->u instead of *_ptr.
2107
21082003-09-22 Ulrich Drepper <drepper@redhat.com>
2109
2110 * size.c (show_sysv): Change type of maxlen to int.
2111
2112 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2113 buckets.
2114
2115 * i386_ld.c: Many many fixes and extensions.
2116 * ld.c: Likewise.
2117 * ldgeneric.c: Likewise.
2118
21192003-08-16 Ulrich Drepper <drepper@redhat.com>
2120
2121 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2122 the reference is from another DSO.
2123
21242003-08-15 Ulrich Drepper <drepper@redhat.com>
2125
2126 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2127 point is found when creating a DSO.
2128
21292003-08-14 Ulrich Drepper <drepper@redhat.com>
2130
2131 * ld.c (main): Always call FLAG_UNRESOLVED.
2132 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2133 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2134
21352003-08-13 Ulrich Drepper <drepper@redhat.com>
2136
2137 * Makefile.in: Depend on libebl.a, not libebl.so.
2138
2139 * ld.c (main): Mark stream for linker script as locked by caller.
2140 (read_version_script): Likewise.
2141 * ldlex.c: Define fread and fwrite to _unlocked variant.
2142
2143 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2144 target_bswap_32.
2145 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2146 target_bswap_64.
2147 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2148 store_8ubyte_unaligned): Define using new macros.
2149
21502003-08-12 Ulrich Drepper <drepper@redhat.com>
2151
2152 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2153 possibly unaligned memory. Support use of big endian machines.
2154
21552003-08-11 Ulrich Drepper <drepper@redhat.com>
2156
2157 * Moved to CVS archive.