blob: 290bf1296387b9fd80babade4772b5274e96efcb [file] [log] [blame]
Mark Wielaardbb9d1b42011-04-24 17:53:38 +020012011-04-26 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
4 with note name.
5
Petr Machata1879e5b2011-03-25 15:17:04 +010062011-03-24 Petr Machata <pmachata@redhat.com>
7
8 * readelf.c (print_debug_line_section): Emit initial space for all
9 opcode lines. Print offset in front of each opcode.
10
Marek Polacek44de92a2011-03-22 01:07:20 +0100112011-03-22 Marek Polacek <mpolacek@redhat.com>
12
13 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
14
Mark Wielaarde3368c52011-03-22 23:03:31 +0100152011-03-22 Mark Wielaard <mjw@redhat.com>
16
17 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
18 and DW_TAG_GNU_call_site_parameter.
19 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
20 DW_AT_GNU_call_site_data_value,
21 DW_AT_GNU_call_site_target,
22 DW_AT_GNU_call_site_target_clobbered,
23 DW_AT_GNU_tail_call,
24 DW_AT_GNU_all_tail_call_sites,
25 DW_AT_GNU_all_call_sites,
26 and DW_AT_GNU_all_source_call_sites.
27 (print_ops): Handle DW_OP_GNU_entry_value.
28 (attr_callback): Handle DW_AT_GNU_call_site_value,
29 DW_AT_GNU_call_site_data_value,
30 DW_AT_GNU_call_site_target,
31 and DW_AT_GNU_call_site_target_clobbered.
32
Mark Wielaarda062b6b2011-03-10 13:02:32 +0100332011-03-10 Mark Wielaard <mjw@redhat.com>
34
35 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
36
Jan Kratochvilfec39992011-02-27 12:01:25 -0800372011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
38
39 * readelf.c (reset_listptr): Clear TABLE->TABLE.
40
Mark Wielaardcf454ab2011-02-25 12:58:54 +0100412011-02-25 Mark Wielaard <mjw@redhat.com>
42
43 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
44 (dwarf_form_string): Properly format and return unknown form.
45
Roland McGrath47c53232011-02-23 09:23:08 -0800462011-02-23 Roland McGrath <roland@redhat.com>
47
Roland McGrath725aad52011-02-23 19:52:46 -080048 * readelf.c (section_name): New function.
49 (print_debug_abbrev_section): Use it instead of constant.
50 (print_debug_aranges_section): Likewise.
51 (print_debug_ranges_section): Likewise.
52 (print_debug_units): Likewise.
53 (print_debug_line_section): Likewise.
54 (print_debug_loc_section): Likewise.
55 (print_debug_macinfo_section): Likewise.
56 (print_debug_pubnames_section): Likewise.
57 (print_debug_str_section): Likewise.
58 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
59 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
60 (print_debug_str_section): Likewise.
61
Roland McGrath47c53232011-02-23 09:23:08 -080062 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
63
Roland McGrath1fb9c912011-02-11 10:32:30 -0800642011-02-11 Roland McGrath <roland@redhat.com>
65
Roland McGrath4a14ef72011-02-11 10:42:45 -080066 * elfcmp.c (verbose): New variable.
67 (options, parse_opt): Grok -l/--verbose to set it.
68 (main): Under -l, keep going after first difference.
69
Roland McGrath1fb9c912011-02-11 10:32:30 -080070 * elfcmp.c (ignore_build_id): New variable.
71 (options, parse_opt): Grok --ignore-build-id to set it.
72 (main): For SHT_NOTE sections, compare note details rather than raw
73 bytes. Under --ignore-build-id, don't complain about differing build
74 ID contents if lengths match.
75
Roland McGrathfd992542011-02-08 19:45:12 -0800762011-02-08 Roland McGrath <roland@redhat.com>
77
Roland McGrath240784b2011-02-08 19:48:42 -080078 * ldscript.y (filename_id_star): Remove unused variable.
79
Roland McGrath8f6c1792011-02-08 19:48:02 -080080 * unstrip.c (copy_elided_sections): Remove unused variable.
81
Roland McGrath4db89f02011-02-08 19:46:50 -080082 * elflint.c (check_dynamic): Remove unused variables.
83
Roland McGrath33231312011-02-08 19:45:26 -080084 * elflint.c (check_symtab): Warn about missing xndx section only once.
85
Roland McGrathfd992542011-02-08 19:45:12 -080086 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
87
Roland McGrathf151b7d2011-01-06 12:14:43 -0800882011-01-06 Roland McGrath <roland@redhat.com>
89
90 * strip.c (handle_elf): Under --strip-sections, remove all
91 non-allocated sections and never generate .gnu_debuglink.
92
Roland McGrath0b9d1fb2011-01-04 19:29:24 -0800932011-01-04 Roland McGrath <roland@redhat.com>
94
95 * strip.c (remove_shdrs): New variable.
96 (options, parse_opt): Grok --strip-sections to set it.
97 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
98
Roland McGrath77221de2010-11-10 19:47:31 -0800992010-11-10 Roland McGrath <roland@redhat.com>
100
101 * findtextrel.c (process_file): Don't assume order of sections.
102 Reported by Mike Hommey <mh@glandium.org>.
103
Roland McGrath932585d2010-05-08 04:01:14 -07001042010-07-26 Roland McGrath <roland@redhat.com>
105
106 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
107
Roland McGratha1599152010-08-30 04:04:37 -07001082010-08-30 Roland McGrath <roland@redhat.com>
109
Roland McGrathfa144952010-08-30 19:22:41 -0700110 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
111 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
112 for ranges, loc.
113 (struct listptr, struct listptr_table): New types.
114 (compare_listptr, reset_listptr, sort_listptr): New functions.
115 (notice_listptr, skip_listptr_hole): New functions.
116 (struct attrcb_args): Add silent member.
117 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
118 Suppress output if silent, but still call notice_listptr.
119 (print_debug_units): Suppress output if section_info not requested.
120 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
121 (print_debug_ranges_section): Likewise.
122 (print_debug): Call reset_listptr on both tables.
123
124 * readelf.c (print_debug_ranges_section): Print empty list.
125 (print_debug_loc_section): Likewise.
126
Roland McGratha1599152010-08-30 04:04:37 -0700127 * readelf.c (print_debug_loc_section): Check for bogus length
128 before calling print_ops.
129 (print_ops): Check harder for bogus data that would read off end.
130
Roland McGrathf4763cf2010-08-11 13:04:12 -07001312010-08-11 Roland McGrath <roland@redhat.com>
132
133 * readelf.c (for_each_section_argument): Process all sections with
134 matching name, not just the first.
135
Roland McGrath52604ba2010-07-26 21:29:44 -07001362010-07-26 Roland McGrath <roland@redhat.com>
137
138 * readelf.c (print_ops): Take new argument for CU version.
139 Fix DW_OP_call_ref decoding to depend on it.
140 (print_debug_loc_section): Update caller.
141 (print_cfa_program): Take new argument, pass it down.
142 (print_debug_frame_section): Update caller.
143 (struct attrcb_args): New member version.
144 (print_debug_units): Initialize it.
145
Roland McGrath2f14a312010-07-02 11:16:25 -07001462010-07-02 Roland McGrath <roland@redhat.com>
147
148 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
149 initial_location.
150
Roland McGrathb6458032010-06-30 11:57:19 -07001512010-06-30 Roland McGrath <roland@redhat.com>
152
153 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
154 Ignore st_size for a non-S_ISREG file descriptor.
155 (read_block): Move assert after no-mmap bail-out.
156 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
157
Roland McGrathfa799902010-06-22 13:05:23 -07001582010-06-22 Roland McGrath <roland@redhat.com>
159
160 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
161
Roland McGrath0c5638c2010-06-21 23:00:35 -07001622010-06-21 Roland McGrath <roland@redhat.com>
163
164 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700165 (dwarf_attr_string): Add new attributes.
166 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700167
168 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
169 (print_cfa_program): Likewise.
170
Roland McGrathe5251a12010-06-20 16:59:39 -07001712010-06-20 Roland McGrath <roland@redhat.com>
172
Roland McGrath2b1f0952010-06-20 17:55:50 -0700173 * readelf.c (print_debug_units): New function, broken out of ...
174 (print_debug_info_section): ... here. Call it.
175 (print_debug_types_section): New function.
176 (enum section_e): Add section_types alias for section_info.
177 (print_debug): Add types to the sections table.
178
Roland McGrath599f7f52010-06-20 17:12:43 -0700179 * readelf.c (print_debug_frame_section): Handle version 4 format.
180
Roland McGrathe5251a12010-06-20 16:59:39 -0700181 * readelf.c (print_debug_line_section): Handle version 4 format.
182
Roland McGrathec86e5f2010-06-14 17:44:38 -07001832010-06-14 Roland McGrath <roland@redhat.com>
184
185 * unstrip.c (copy_elided_sections): Make sure all sections' data have
186 been read in before we write anything out.
187
Roland McGrath3b1b6512010-06-04 02:26:30 -07001882010-06-04 Roland McGrath <roland@redhat.com>
189
Roland McGrathaa32f922010-06-04 02:29:08 -0700190 * unstrip.c (update_shdr): New function.
191 (update_sh_size): Call it instead of gelf_update_shdr.
192 (adjust_relocs, add_new_section_symbols): Likewise.
193 (new_shstrtab, copy_elided_sections): Likewise.
194
Roland McGrath3b1b6512010-06-04 02:26:30 -0700195 * unstrip.c (copy_elided_sections): Bail if stripped file has more
196 sections than unstripped file, rather than getting confused later.
197
Roland McGrath7a5bed82010-06-01 13:44:00 -07001982010-06-01 Roland McGrath <roland@redhat.com>
199
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700200 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
201 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700202 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700203
Roland McGrath7a5bed82010-06-01 13:44:00 -0700204 * readelf.c (print_debug): Don't bail if libdw setup fails.
205 Suppress complaint if we only want .eh_frame anyway.
206
Ulrich Drepper173ade82010-05-28 07:39:49 -07002072010-05-28 Ulrich Drepper <drepper@redhat.com>
208
209 * readelf.c (attr_callback): Also print form information.
210
Roland McGrath12e3d1f2010-05-19 18:03:31 -07002112010-05-19 Roland McGrath <roland@redhat.com>
212
213 * addr2line.c (find_symbol): Short-circuit on empty name.
214 (handle_address): Handle SYMBOL with no +OFFSET.
215
Roland McGrath688f7fc2010-05-08 03:22:59 -07002162010-05-08 Roland McGrath <roland@redhat.com>
217
218 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
219 Use that for DW_OP_call_ref, not ADDRSIZE.
220 (print_cfa_program): Update caller.
221 (struct attrcb_args): Add offset_size field.
222 (attr_callback): Use it for print_ops call.
223 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700224 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700225
Roland McGrath62b28b62010-04-14 11:54:06 -07002262010-04-14 Roland McGrath <roland@redhat.com>
227
228 * readelf.c (handle_core_item): Fix bitmask printing.
229
Roland McGrath3b495d82010-04-06 12:58:32 -07002302010-04-06 Roland McGrath <roland@redhat.com>
231
232 * ld.c (options): Fix some typos in messages.
233 * elflint.c (check_scn_group, check_group): Likewise.
234 * ldscript.y (add_id_list): Likewise.
235 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
236 before translated string containing a literal %.
237
Roland McGrath890081b2010-02-26 17:57:50 -08002382010-02-26 Roland McGrath <roland@redhat.com>
239
240 * readelf.c (process_file): Don't leak an fd in failure case.
241
Roland McGrathc2b26f12010-02-15 15:16:15 -08002422010-02-15 Roland McGrath <roland@redhat.com>
243
Roland McGrath22359e22010-02-15 15:57:03 -0800244 * Makefile.am: Use config/eu.am for common stuff.
245
Roland McGrathc2b26f12010-02-15 15:16:15 -0800246 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
247 mismatch in comparison.
248
Roland McGrathf920fd52010-02-02 15:50:15 -08002492010-02-02 Roland McGrath <roland@redhat.com>
250
251 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
252 (read_encoded): Likewise.
253 (print_debug_frame_section): Check for bogus augmentation length.
254 For P augmentation, use read_encoded, print the encoding description,
255 and use hex for unsigned values.
256
Roland McGrathb337b1f2010-01-15 01:02:27 -08002572010-01-15 Roland McGrath <roland@redhat.com>
258
259 * ar.c: Include <sys/stat.h>.
260 * elflint.c: Likewise.
261 * readelf.c: Likewise.
262 * strip.c: Likewise.
263 * unstrip.c: Likewise
264
Roland McGrathbd733ca2010-01-07 20:11:42 -08002652010-01-07 Roland McGrath <roland@redhat.com>
266
Roland McGrath8111da02010-01-07 20:31:59 -0800267 * readelf.c (print_ehdr): Handle PN_XNUM.
268 (phnum): New static variable.
269 (process_elf_file): Set it with elf_getphdrnum.
270 (print_phdr): Use phnum instead of EHDR->e_phnum.
271 (print_dynamic, handle_notes): Likewise.
272 (handle_relocs_rel, handle_relocs_rela): Likewise.
273
Roland McGrathbd733ca2010-01-07 20:11:42 -0800274 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
275
276 * elflint.c (phnum): New static variable.
277 (check_elf_header): Set it, handling PN_XNUM.
278 Use that in place of EHDR->e_phnum throughout.
279 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
280 (unknown_dependency_p, check_sections, check_program_header): Likewise.
281
Roland McGrath019d9fb2010-01-05 13:36:07 -08002822010-01-05 Roland McGrath <roland@redhat.com>
283
284 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
285 DW_AT_GNU_template_name.
286
Roland McGrathe4061d02010-01-04 20:25:09 -08002872010-01-04 Roland McGrath <roland@redhat.com>
288
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800289 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
290 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
291 (handle_core_item): Handle .format of '\n' as \n-separated strings.
292
Roland McGrath2e79deb2010-01-04 20:36:10 -0800293 * readelf.c (implicit_debug_sections): New variable.
294 (parse_opt): Set it instead of print_debug_sections for -a.
295 OR them together for print_debug check.
296 (print_debug): OR them together for section check.
297
Roland McGratha7422be2010-01-04 20:29:33 -0800298 * readelf.c (options): Repartition into set implied by -a and others.
299 Correct -a text to match reality.
300
Roland McGrathe4061d02010-01-04 20:25:09 -0800301 * readelf.c (struct section_argument): Add bool member 'implicit'.
302 (parse_opt): Set it for -a cases, clear it for -x args.
303 (for_each_section_argument): Don't complain about a missing section by
304 name if it's implicit.
305
Roland McGrathefa64962009-11-16 01:50:58 -08003062009-11-16 Roland McGrath <roland@redhat.com>
307
308 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
309 sections, just as dump_data_section already does.
310
Mark Wielaardc49d00a2009-09-21 16:47:07 -07003112009-09-21 Ulrich Drepper <drepper@redhat.com>
312
313 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
314 set for .comment section.
315 Patch by Mark Wielaard <mjw@redhat.com>.
316
Roland McGrathfb33c672009-09-08 00:21:18 -07003172009-09-08 Roland McGrath <roland@redhat.com>
318
319 * ar.c (main): Fix typo in message format.
320
Roland McGrath2d13ea22009-08-21 03:16:32 -07003212009-08-21 Roland McGrath <roland@redhat.com>
322
323 * readelf.c (attr_callback): Use print_block only when we don't use
324 print_ops.
325
Roland McGrath536127f2009-08-14 13:10:09 -07003262009-08-14 Roland McGrath <roland@redhat.com>
327
328 * ar.c (do_oper_extract): Use pathconf instead of statfs.
329
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07003302009-08-01 Ulrich Drepper <drepper@redhat.com>
331
332 * debugpred.h: Add two most const.
333
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07003342009-07-26 Mark Wielaard <mjw@redhat.com>
335
336 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
337
Mark Wielaard79178202009-07-25 12:44:46 -07003382009-07-25 Mark Wielaard <mjw@redhat.com>
339
340 * Makefile.am (addr2line_LDADD): Add $(libelf).
341
Roland McGrathbe4589d2009-07-24 16:23:12 -07003422009-07-24 Roland McGrath <roland@redhat.com>
343
344 * readelf.c (print_block): New function.
345 (print_ops): Use it.
346 (attr_callback): Use it for DW_FORM_block* forms.
347
Mark Wielaarddaf85b22009-07-24 15:49:51 -07003482009-07-20 Mark Wielaard <mjw@redhat.com>
349
350 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
351 and DW_OP_stack_value.
352
Ulrich Drepper96d950e2009-07-14 10:42:01 -07003532009-07-14 Ulrich Drepper <drepper@redhat.com>
354
355 * elflint.c (check_elf_header): Allow Linux ABI.
356 (check_symtab): Handle STB_GNU_UNIQUE.
357
Mark Wielaardf735db12009-07-08 19:18:53 +02003582009-07-08 Mark Wielaard <mjw@redhat.com>
359
360 * readelf.c (attr_callback): Handle DW_Form constants for
361 DW_AT_data_member_location.
362
Roland McGrathdffc33d2009-07-06 16:06:41 -07003632009-07-06 Roland McGrath <roland@redhat.com>
364
365 * readelf.c (register_info): New function. Handle unknown register #s.
366 (print_cfa_program): Use it.
367 (handle_core_register, handle_core_registers): Likewise.
368
Roland McGrath5dbccdb2009-06-28 14:48:02 -07003692009-06-28 Roland McGrath <roland@redhat.com>
370
371 * readelf.c (print_address_names): New static variable.
372 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
373 (format_dwarf_addr): Don't look up name if !print_address_names.
374
Ulrich Drepperf1894932009-06-13 15:55:42 -07003752009-06-13 Ulrich Drepper <drepper@redhat.com>
376
377 * ldgeneric.c: Don't use deprecated libelf functions.
378 * nm.c: Likewise.
379 * objdump.c: Likewise.
380 * readelf.c: Likewise.
381 * size.c: Likewise.
382 * strip.c: Likewise.
383 * unstrip.c: Likewise.
384 * ld.h: Fix up comment.
385
Ulrich Drepperb47d2902009-06-01 07:38:32 -07003862009-06-01 Ulrich Drepper <drepper@redhat.com>
387
388 * readelf.c (print_relocs): Expect ELF header argument and pass on
389 to handle_relocs_rel* functions. Adjust caller.
390 (handle_relocs_rel): Add ELF header argument. Add special case for
391 the IRELATIVE relocations in statically linked executables.
392 (handle_relocs_rela): Likewise.
393
Roland McGrathdb19f0b2009-05-07 18:44:27 -07003942009-04-29 Ulrich Drepper <drepper@redhat.com>
395
396 * elflint.c (check_symtab): Add tests of st_other field.
397
Ulrich Drepperaab90f92009-04-23 07:44:36 -07003982009-04-23 Ulrich Drepper <drepper@redhat.com>
399
400 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
401
Roland McGrathd86e1832009-04-20 00:49:33 -07004022009-04-20 Roland McGrath <roland@redhat.com>
403
Roland McGrath8a592412009-04-20 01:20:44 -0700404 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
405 of inline call sites.
406
Roland McGrathd86e1832009-04-20 00:49:33 -0700407 * addr2line.c (just_section): New variable.
408 (adjust_to_section): New function, broken out of ...
409 (handle_address): ... here.
410 (options, parse_opt): Add -j/--section=NAME to set it.
411
Roland McGrath2fb90512009-04-15 14:47:13 -07004122009-04-15 Roland McGrath <roland@redhat.com>
413
414 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
415 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
416
Roland McGrath04a14162009-04-14 01:02:17 -07004172009-04-14 Roland McGrath <roland@redhat.com>
418
Roland McGratheb9ba472009-04-14 18:44:45 -0700419 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
420 like SHT_GNU_ATTRIBUTES.
421
Roland McGrath94f43832009-04-14 04:39:32 -0700422 * readelf.c (handle_core_registers): Fix error message.
423
Roland McGrath04a14162009-04-14 01:02:17 -0700424 * strip.c (handle_elf: check_preserved): Don't note any change when
425 .debug_data is already filled from a previous pass.
426
Ulrich Drepper411cdb22009-02-05 22:04:26 -08004272009-02-05 Ulrich Drepper <drepper@redhat.com>
428
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800429 * objdump.c (show_relocs_x): Minor cleanups.
430
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800431 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800432 Print first DW_CFA_expression and DW_CFA_val_expression parameter
433 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800434
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08004352009-02-01 Ulrich Drepper <drepper@redhat.com>
436
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800437 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
438 into ...
439 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800440 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800441
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800442 * objdump.c (show_relocs_rela): Show offsets as signed values.
443
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800444 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
445 Improve some error messages.
446 Use program_invocation_short_name instead of AR macro.
447 * Makefile.am (CFLAGS_ar): Remove.
448 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
449 * objdump.c (parse_opt): Likewise.
450 * readelf.c (parse_opt): Likewise.
451
Roland McGrath51f01282009-01-27 17:08:03 -08004522009-01-27 Roland McGrath <roland@redhat.com>
453
454 * readelf.c (print_ops): Notice short length, don't overrun buffer
455 (still need to fix LEB128).
456
457 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
458
459 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
460
Ulrich Drepper62c46532009-01-24 17:01:08 -08004612009-01-24 Ulrich Drepper <drepper@redhat.com>
462
463 * readelf.c (print_debug_frame_section): Fix computation of vma_base
464 for PC-relative mode.
465
Ulrich Drepperd7285e12009-01-23 16:10:44 -08004662009-01-23 Ulrich Drepper <drepper@redhat.com>
467
Ulrich Drepperccccab02009-01-23 16:32:21 -0800468 * size.c (process_file): When handling archive, close file descriptor
469 here. For unknown file format also close file descriptor.
470 (handle_ar): Don't close file descriptor here.
471
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800472 * readelf.c (parse_opt): Move code to add to dump_data_sections and
473 string_sections list in local function add_dump_section. Adjust 'x'
474 key handling. For 'a' key add .strtab, .dynstr, and .comment section
475 to string_sections list.
476
Roland McGrathe9de9b42009-01-22 13:05:40 -08004772009-01-22 Roland McGrath <roland@redhat.com>
478
Roland McGrath9a847e12009-01-22 19:55:00 -0800479 * readelf.c (print_phdr): Don't print section mapping when no sections.
480
Roland McGrathd759aa62009-01-22 19:17:07 -0800481 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
482
Roland McGrathcabeeee2009-01-22 13:17:45 -0800483 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
484 and reset it only for the 'true' cases.
485
486 * Makefile.am (addr2line_no_Wformat): New variable.
487
Roland McGrathe9de9b42009-01-22 13:05:40 -0800488 * readelf.c (print_debug_frame_section): Use t instead of j formats
489 for ptrdiff_t OFFSET.
490
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08004912009-01-21 Ulrich Drepper <drepper@redhat.com>
492
493 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800494 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800495 (check_exception_data): First sanity test.
496
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08004972009-01-17 Ulrich Drepper <drepper@redhat.com>
498
Ulrich Drepper935edde2009-01-17 16:06:42 -0800499 * readelf.c (print_debug_exception_table): Show target of ar_disp
500 field.
501
502 * elflint.c (check_program_header): Add most consistency checks for
503 PT_GNU_EH_FRAME entry.
504
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800505 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
506 ARGP_PROGRAM_BUG_ADDRESS_DEF.
507 * ar.c: Likewise.
508 * elfcmp.c: Likewise.
509 * elflint.c: Likewise.
510 * findtextrel.c: Likewise.
511 * ld.c: Likewise.
512 * nm.c: Likewise.
513 * objdump.c: Likewise.
514 * ranlib.c: Likewise.
515 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800516
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800517 * size.c: Likewise.
518 * strings.c: Likewise.
519 * strip.c: Likewise.
520 * unstrip.c: Likewise.
521
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08005222009-01-16 Ulrich Drepper <drepper@redhat.com>
523
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800524 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
525 matches .eh_frame_hdr section, if it is available. Also check that
526 the segment is allocated, not writable, not executable.
527
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800528 * readelf.c: Add -e option. Dump exception and unwind related
529 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800530 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800531 (print_debug_exception_table): Beginning of support.
532 (print_debug): Hook up print_debug_exception_table for
533 .gcc_except_table sections.
534
535 * readelf.c (print_debug_frame_section): Some fixes for last change.
536
Ulrich Drepper351bf202009-01-15 20:18:40 -08005372009-01-15 Ulrich Drepper <drepper@redhat.com>
538
539 * readelf.c (print_encoding): Now a toplevel function.
540 (print_relinfo): Likewise.
541 (print_encoding_base): Broken out of print_debug_frame_section.
542 (print_debug_frame_section): Print different header for .eh_frame
543 sections. Fix recognition of matching CIEs in .debug_frame sections.
544 Print absolute offset for PC-relative FDE locations. Don't print
545 table header for FDEs if the table is empty.
546 (read_encoded): New function.
547 (print_debug_frame_hdr_section): New function.
548 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
549 sections.
550
551 * readelf.c (handle_relocs_rel): Print section number.
552 (print_debug_abbrev_section): Likewise.
553 (print_debug_aranges_section): Likewise.
554 (print_debug_ranges_section): Likewise.
555 (print_debug_info_section): Likewise.
556 (print_debug_line_section): Likewise.
557 (print_debug_loc_section): Likewise.
558 (print_debug_macinfo_section): Likewise.
559 (print_debug_pubnames_section): Likewise.
560 (print_debug_str_section): Likewise.
561
Ulrich Drepper8b394632009-01-10 18:29:56 -08005622009-01-10 Ulrich Drepper <drepper@redhat.com>
563
564 * strings.c (read_block): Fix typo in error message string.
565
Ulrich Drepper87cf5832009-01-07 20:39:21 -08005662009-01-07 Ulrich Drepper <drepper@redhat.com>
567
568 * ld.c (ld_new_searchdir): Fix adding to search path list.
569
Ulrich Drepperac194d02009-01-06 00:30:01 -08005702009-01-06 Ulrich Drepper <drepper@redhat.com>
571
572 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800573
Roland McGrath3614d992009-01-05 18:05:32 -08005742009-01-05 Roland McGrath <roland@redhat.com>
575
576 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
577 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800578
Ulrich Drepper44173ed2009-01-01 19:00:41 -08005792009-01-01 Ulrich Drepper <drepper@redhat.com>
580
581 * addr2line.c: Update copyright year.
582 * ar.c: Likewise.
583 * elfcmp.c: Likewise.
584 * elflint.c: Likewise.
585 * findtextrel.c: Likewise.
586 * ld.c: Likewise.
587 * nm.c: Likewise.
588 * objdump.c: Likewise.
589 * ranlib.c: Likewise.
590 * readelf.c: Likewise.
591 * size.c: Likewise.
592 * strings.c: Likewise.
593 * strip.c: Likewise.
594 * unstrip.c: Likewise.
595
Roland McGrath468fe4d2008-12-11 21:00:12 -08005962008-12-11 Roland McGrath <roland@redhat.com>
597
598 * nm.c (sym_name): New function.
599 (show_symbols_sysv): Use it in place of elf_strptr.
600 (show_symbols_bsd, show_symbols_posix): Likewise.
601 Fixes RHBZ#476136.
602
603 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
604 elf_strptr fails.
605
Roland McGratha845f682008-12-03 03:41:58 +00006062008-12-02 Roland McGrath <roland@redhat.com>
607
608 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
609 nonzero OFFSET argument to dwfl_getmodules.
610
Roland McGrath1d8bb252008-08-07 08:39:41 +00006112008-08-07 Roland McGrath <roland@redhat.com>
612
613 * addr2line.c (main): Pass string to handle_address.
614 (see_one_module): New function, subroutine of handle_address.
615 (find_symbol): Likewise.
616 (handle_address): Take string argument rather than address.
617 Convert plain number, or handle strings like "(section)+offset"
618 or "symbol+offset".
619
6202008-08-01 Roland McGrath <roland@redhat.com>
621
622 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
623 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
624
625 * readelf.c (convert): Take new argument SIZE.
626 (handle_core_register, handle_core_item): Update callers.
627 (handle_core_item): Take new arg REPEATED_SIZE.
628 (handle_core_items): Special case for a singleton item,
629 let handle_core_item handle repeats if it wants to.
630
631 * readelf.c (handle_core_items): Give abridged output
632 for identical groups repeated more than twice.
633
6342008-07-04 Roland McGrath <roland@redhat.com>
635
636 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
637
Roland McGrath521c47d2008-04-11 07:01:58 +00006382008-04-10 Roland McGrath <roland@redhat.com>
639
640 * strip.c (handle_elf): Don't keep sections that kept symbol tables
641 refer to. Instead, just be sure to preserve the original symbol
642 table in the debug file so those symbols go with their sections and
643 can be elided from the stripped version of the symbol table.
644
645 * strip.c (handle_elf): When a discarded section kept in the debug
646 file refers to a nondiscard section via sh_link/sh_info, preserve
647 that nondiscarded section unmodified in the debug file as well.
648 Skip adjustment of discarded sections symbol table references when
649 that symbol table is copied in this way.
650
651 * elflint.c (check_symtab): Don't crash from missing symbol names
652 after diagnosing bogus strtab.
653
654 * strip.c (handle_elf): Cosmetic cleanup in special section contents
655 adjustment for symtab changes.
656
Roland McGrath13b69602008-04-01 02:30:05 +00006572008-03-31 Roland McGrath <roland@redhat.com>
658
659 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
660 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
661 excuse a special section.
662
6632008-03-27 Roland McGrath <roland@redhat.com>
664
665 * elflint.c (check_sections): Check that executability and writability
666 of sections is reflected in segment p_flags.
667
Roland McGrathd11f9cb2008-03-26 20:51:59 +00006682008-03-26 Roland McGrath <roland@redhat.com>
669
670 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
671 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
672 is valid in RELRO.
673
Roland McGrath47c5c352008-02-29 10:17:16 +00006742008-02-29 Roland McGrath <roland@redhat.com>
675
676 * readelf.c (print_attributes): Add a cast.
677 * elflint.c (check_attributes): Likewise.
678
679 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
680 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
681 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
682
Ulrich Drepper834de6f2008-02-23 06:50:01 +00006832008-02-03 Ulrich Drepper <drepper@redhat.com>
684
685 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
686 when linked into executable.
687 (elf_i386_create_relocations): Likewise.
688
Roland McGrath059c83e2008-02-21 06:19:39 +00006892008-02-20 Roland McGrath <roland@redhat.com>
690
691 * readelf.c (print_attributes): New function.
692 (process_elf_file): Call it under -A.
693
694 * elflint.c (check_attributes): Implement it for real.
695
6962008-02-19 Roland McGrath <roland@redhat.com>
697
698 * elflint.c (special_sections): Handle .gnu.attributes section.
699 (check_sections): Likewise.
700 (check_attributes): New function.
701
7022008-02-10 Roland McGrath <roland@redhat.com>
703
704 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
705 sections and ET_REL files.
706
Ulrich Drepper712d78e2008-02-02 10:01:53 +00007072008-02-02 Ulrich Drepper <drepper@redhat.com>
708
709 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
710 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
711 and R_386_TLS_LE.
712 (elf_i386_create_relocations): Likewise.
713 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
714 elements.
715 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
716 (ld_generic_create_outfile): Add PT_TLS entry to program header.
717 Fix generation of PT_GNU_STACK entry.
718
Ulrich Drepperc54785a2008-02-01 18:05:21 +00007192008-02-01 Ulrich Drepper <drepper@redhat.com>
720
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000721 * ld.c (replace_args): Prevent loop over replacements if the parameter
722 is only two characters long.
723
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000724 * ld.c: Recognize sha1 argument for --build-id parameter.
725 * ldgeneric.c (create_build_id_section): Handle sha1.
726 (compute_hash_sum): New function. Broken out of compute_build_id.
727 Take hash function and context as parameters.
728 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
729 implementation.
730
Ulrich Drepper89759c72008-01-31 19:44:12 +00007312008-01-31 Ulrich Drepper <drepper@redhat.com>
732
733 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
734 * ld.c: Recognize --build-id command line parameter.
735 * ld.h: Define scn_dot_note_gnu_build_id.
736 (struct ld_state): Add build_id and buildidscnidx elements.
737 * ldgeneric.c: Implement --build-id command line parameter.
738 * ldlex.l (ID): Recognize - as valid character after the first one.
739
Ulrich Drepper5530ec52008-01-29 10:42:07 +00007402008-01-29 Ulrich Drepper <drepper@redhat.com>
741
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000742 * ld.c (replace_args): New function.
743 (main): Use it to rewrite old-style parameters.
744
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000745 * elf32-i386.script: Add .gnu.hash section.
746 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
747 (fillin_special_symbol): Initialize st_size.
748 (sortfct_hashval): New function.
749 (create_gnu_hash): New function.
750 (create_hash): New function.
751 (ld_generic_create_outfile): Use the new functions to create the
752 hash tables.
753
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000754 * elflint.c (check_gnu_hash): Fix index value printed in error message.
755
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00007562008-01-24 Ulrich Drepper <drepper@redhat.com>
757
758 * elflint.c (check_group): Check that signature symbol for section
759 group is not an empty string.
760 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
761 section. Start implementation of --hash-style.
762 * i386_ld.c: Likewise.
763 * ld.c: Recognize --hash-style.
764 * ld.h (struct scninfo): Add comdat_group.
765 Add additional parameter to finalize_plt callback.
766
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00007672008-01-22 Ulrich Drepper <drepper@redhat.com>
768
769 * ld.h (struct callbacks): Add initialize_gotplt.
770 (struct scnhead): Add scn_dot_gotplt.
771 (struct ld_state): Add gotpltscnidx.
772 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
773 (elf_i386_initialize_pltrel): Likewise.
774 (elf_i386_initialize_got): There is now a separate .got.plt, so
775 don't do the PLT-related work here. Initialize d_type.
776 (elf_i386_initialize_gotplt): New function.
777 (elf_i386_plt0): Use ud2a after indirect jump.
778 (elf_i386_pic_plt0_entry): Likewise.
779 (elf_i386_finalize_plt): Reference now .got.plt.
780 (elf_i386_count_relocations): For GOT entries which need no relocation
781 don't bump nrel_got.
782 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
783 handling for split .got/.got.plt.
784 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
785 * elf32-i386.script: Sort sections for security. There are no .got
786 input sections. Add .got.plt.
787 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
788 (ld_generic_create_outfile): Initialize .got.plt section.
789 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
790
Ulrich Drepperd9488292008-01-20 16:43:15 +00007912008-01-19 Ulrich Drepper <drepper@redhat.com>
792
793 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
794 symbols are not carried over into statically linked output files.
795 Add dummy entries for more TLS relocations.
796
797 * ld.c (options): Add long names for -( and -).
798
799 * ldgeneric.c (check_definition): For newly found definitions don't
800 mark section as used if symbol is absolute.
801 (extract_from_archive): Only assign archive sequence number the first
802 time the archive is handled. Update ld_state.last_archive_used
803 if any symbol was used. Remove nround variable.
804 (file_process2): When using symbol from an archive, update
805 ld_state.group_start_archive, ld_state.archives, and
806 ld_state.tailarchives.
807 (ld_generic_file_process): If group is not handled anymore, after
808 freeing ELF handles for the archives, clear ld_state.archives and
809 *nextp. Fix wrong logic in recognizing first iteration of group
810 loop. When clearing flags, also clear ld_state.group_start_archive.
811
Ulrich Drepper5eee1222008-01-11 10:12:18 +00008122008-01-11 Ulrich Drepper <drepper@redhat.com>
813
814 * objdump.c (show_disasm): Adjust disassembler format string for
815 removal of %e.
816
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00008172008-01-04 Roland McGrath <roland@redhat.com>
818
Roland McGrath059c83e2008-02-21 06:19:39 +0000819 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
820 a size greater than the items cover means multiple sets of items.
821 (handle_core_note): Update caller.
822
8232008-01-04 Roland McGrath <roland@redhat.com>
824
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000825 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
826
8272008-01-03 Roland McGrath <roland@redhat.com>
828
829 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
830
831 * elflint.c (check_dynamic): Remove duplicate initializer.
832
Ulrich Drepperad024af2008-01-02 17:42:52 +00008332008-01-02 Ulrich Drepper <drepper@redhat.com>
834
835 * addr2line.c: Update copyright year.
836 * ar.c: Likewise.
837 * elfcmp.c: Likewise.
838 * elflint.c: Likewise.
839 * findtextrel.c: Likewise.
840 * ld.c: Likewise.
841 * nm.c: Likewise.
842 * objdump.c: Likewise.
843 * ranlib.c: Likewise.
844 * readelf.c: Likewise.
845 * size.c: Likewise.
846 * strings.c: Likewise.
847 * strip.c: Likewise.
848 * unstrip.c: Likewise.
849
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00008502007-12-30 Ulrich Drepper <drepper@redhat.com>
851
852 * objdump (show_disasm): Use %e after third parameter.
853
8542007-12-21 Ulrich Drepper <drepper@redhat.com>
855
856 * strip.c: Fix wrong parenthesis in a few branch predictions.
857 * strings.c: Likewise.
858
8592007-12-20 Ulrich Drepper <drepper@redhat.com>
860
861 * Makefile.am (DEFS): Add DEBUGPRED.
862 * addr2line.c: Include debugpred.h.
863 * ar.c: Likewise.
864 * elfcmp.c: Likewise.
865 * elflint.c: Likewise.
866 * findtextrel.c: Likewise.
867 * nm.c: Likewise.
868 * objdump.c: Likewise.
869 * ranlib.c: Likewise.
870 * readelf.c: Likewise.
871 * size.c: Likewise.
872 * strings.c: Likewise.
873 * strip.c: Likewise.
874 * unstrip.c: Likewise.
875 * debugpred.h: New file.
876
877 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
878 (handle_relocs_rela): Likewise.
879
880 * readelf.c: Add lots of likely/unlikely.
881
882 * elflint.c: Minor cleanups.
883
Roland McGrath1a2e8f42007-12-15 23:39:34 +00008842007-11-19 Roland McGrath <roland@redhat.com>
885
886 * readelf.c (print_ops): Handle all bad op codes gracefully.
887 Print their numbers instead of just ???.
888
Roland McGrath07a696e2007-11-09 22:44:26 +00008892007-11-09 Roland McGrath <roland@redhat.com>
890
891 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000892 Handle block forms to mean a DWARF expression for DW_AT_allocated,
893 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
894 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
895 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000896
Roland McGrathe4c22ea2007-10-23 13:07:39 +00008972007-10-20 Roland McGrath <roland@redhat.com>
898
899 * unstrip.c (options): Update -R description.
900 (struct symbol): Put symbol details a union with a size_t pointer
901 `duplicate'.
902 (compare_symbols_output): Use null ->name as marker for discard
903 symbols, not zero *->map.
904 (copy_elided_sections): Record forwarding pointers for discarded
905 duplicates and fill SYMNDX_MAP elements through them.
906
907 * readelf.c (process_file): Set offline_next_address to 0 at start.
908 (struct process_dwflmod_args): New type.
909 (process_dwflmod): Take args in it, pass fd to process_elf_file.
910 (process_file): Update caller; dup FD for passing to libdwfl.
911 (process_elf_file): Take new arg FD. For ET_REL file when
912 displaying data affected by libdwfl relocation, open a new Elf handle.
913
9142007-10-17 Roland McGrath <roland@redhat.com>
915
916 * readelf.c (print_debug_line_section): For invalid data inside a
917 unit with plausible length, keep printing at the next unit boundary.
918
919 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
920
9212007-10-16 Roland McGrath <roland@redhat.com>
922
923 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
924
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00009252007-10-15 Roland McGrath <roland@redhat.com>
926
927 * make-debug-archive.in: New file.
928 * Makefile.am (EXTRA_DIST): Add it.
929 (make-debug-archive): New target.
930 (bin_SCRIPTS, CLEANFILES): Add it.
931
9322007-10-10 Roland McGrath <roland@redhat.com>
933
934 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
935 Use it to check MERGE|STRINGS for .debug_str.
936 (check_sections): Handle exact_or_gnuld.
937
9382007-10-08 Roland McGrath <roland@redhat.com>
939
940 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
941 64-bit struct timeval with 32-bit tv_usec.
942
9432007-10-07 Roland McGrath <roland@redhat.com>
944
945 * readelf.c (check_archive_index): New function.
946 (process_file): Call it. Change signature to take only fd and name.
947 Use libdwfl to open the file, then iterate on its modules (multiple
948 for an archive) to print file name and call process_elf_file.
949 (main): Update caller. Let process_file do elf_begin.
950 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
951 (process_elf_file): Take only Dwfl_Module * argument.
952 Don't print the file name here.
953 (print_debug_*_section): Take Dwfl_Module * argument.
954 (print_debug): Likewise. Update caller.
955 (format_dwarf_addr): New function.
956 (print_debug_ranges_section): Use it.
957 (attr_callback): Likewise.
958 (print_debug_line_section, print_debug_loc_section): Likewise.
959
960 * readelf.c (print_debug_ranges_section): Translate all strings.
961 (print_debug_loc_section): Likewise.
962
963 * unstrip.c (copy_elided_sections): Initialize SEC.
964
965 * ar.c (do_oper_insert): Put trailing / on short names.
966
967 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
968
969 * arlib2.c (arlib_add_long_name): Adjust for header size.
970
971 * arlib.c (arlib_finalize): Pad long name table to keep size even.
972
973 * ar.c (do_oper_insert): Use write_retry for padding write.
974
975 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
976 Unconditionally set FOUND[CNT]->elf when setting ->mem.
977 (remember_long_name): New function.
978 (do_oper_insert): Call it. Correctly use length of basename,
979 not original name. Don't store long name twice for new member.
980
9812007-10-06 Roland McGrath <roland@redhat.com>
982
983 * elflint.c (check_note): Skip empty segment.
984 (check_note_section): Skip empty section.
985
986 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
987 (handle_output_dir_module, handle_implicit_modules): Pass it down.
988 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
989 (compare_alloc_sections): Take new arg REL, ignore address if true.
990 (compare_sections): Likewise, pass it down.
991 (compare_sections_rel, compare_sections_nonrel): New functions.
992 (find_alloc_sections_prelink, copy_elided_sections): Use them
993 instead of compare_sections.
994 (sections_match): New function, broken out of ...
995 (find_alloc_section): ... here.
996 (copy_elided_sections): Reorganize section match-up logic.
997 Use sections_match for SHF_ALLOC in ET_REL.
998 For ET_REL, let the nonzero sh_addr from the debug file dominate.
999
1000 * unstrip.c (add_new_section_symbols): Take new arg REL.
1001 When true, do not update section symbol values.
1002 (collect_symbols): Likewise. Update section symbols with address
1003 of chosen output section, not original section.
1004 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1005
1006 * unstrip.c (compare_alloc_sections): At the same address, preserve
1007 original section order.
1008
1009 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1010 .debug_str, it didn't always have them with older tools.
1011
1012 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1013
10142007-10-05 Roland McGrath <roland@redhat.com>
1015
1016 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1017 ET_REL file.
1018
1019 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1020 SHN_UNDEF as "bad section". Use shndx value in messages.
1021
1022 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1023 for ".debug" so it matches as a prefix.
1024 (IS_KNOWN_SPECIAL): New macro.
1025 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1026 type even under -d, for a .debug* or .shstrtab section.
1027
1028 * readelf.c (print_ops): Use hex for address operand.
1029
10302007-10-04 Roland McGrath <roland@redhat.com>
1031
1032 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1033 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1034 sections mapped to SHN_UNDEF.
1035
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000010362007-10-04 Ulrich Drepper <drepper@redhat.com>
1037
1038 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1039 variable with older glibc versions.
1040 Add some branch prediction.
1041
Roland McGrath59ea7f32007-10-04 08:50:09 +000010422007-10-04 Roland McGrath <roland@redhat.com>
1043
1044 * readelf.c (print_archive_index): New variable.
1045 (options, parse_opt): Accept -c/--archive-index to set it.
1046 (dump_archive_index): New function.
1047 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1048 Call dump_archive_index on archives if set.
1049 (main): Update caller.
1050 (any_control_option): Give it file scope, moved out of ...
1051 (parse_opt): ... here.
1052
10532007-10-03 Roland McGrath <roland@redhat.com>
1054
1055 * unstrip.c (struct arg_info): Add `list' flag.
1056 (options, parse_opt): Grok -n/--list to set it.
1057 (list_module): New function.
1058 (handle_implicit_modules): Call it under -n.
1059
1060 * elflint.c (check_note_section): New function.
1061 (check_sections): Call it for SHT_NOTE.
1062
1063 * readelf.c (handle_notes): Use sections when available.
1064
1065 * elflint.c (check_note_data): New function, broken out of ...
1066 (check_note): ... here. Call it and elf_getdata_rawchunk.
1067
1068 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1069 Use elf_getdata_rawchunk and gelf_getauxv.
1070 (handle_notes_data): New function, broken out of ...
1071 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1072
Roland McGrath241ac022007-10-01 18:21:46 +000010732007-10-01 Roland McGrath <roland@redhat.com>
1074
Roland McGrathac0a16c2007-10-01 18:50:35 +00001075 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1076
Roland McGrath241ac022007-10-01 18:21:46 +00001077 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1078
Roland McGrathc76f0b02007-09-27 07:31:33 +000010792007-09-10 Roland McGrath <roland@redhat.com>
1080
1081 * readelf.c (options): Give -p optional argument, alias --string-dump.
1082 (string_sections, string_sections_tail): New static variables.
1083 (parse_opt): Set them when -p has an argument.
1084 (print_string_section): New function, broken out of ...
1085 (print_strings): ... here. Call it.
1086 (dump_data_section): New function, broken out of ...
1087 (dump_data): ... here. Call it.
1088 (for_each_section_argument): New function, broken out of ...
1089 (dump_data): ... here. Call it.
1090 (dump_strings): New function.
1091
10922007-08-31 Roland McGrath <roland@redhat.com>
1093
1094 * readelf.c (print_strings): Typo fix.
1095
Roland McGrathcb6d8652007-08-23 08:10:54 +000010962007-08-23 Roland McGrath <roland@redhat.com>
1097
1098 * readelf.c (printf_with_wrap): Function removed.
1099 (REGISTER_WRAP_COLUMN): New macro.
1100 (handle_core_register): Use print_core_item instead.
1101 (struct register_info): New type.
1102 (compare_registers, compare_register_sets): New functions.
1103 (register_bitpos, compare_sets_by_info): New functions.
1104 (handle_core_registers): Use those to segregate and sort registers
1105 for display.
1106
1107 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1108 (print_core_item): New function.
1109 (handle_core_item): Use it instead of printf_with_wrap.
1110 (compare_core_items, compare_core_item_groups): New functions.
1111 (handle_core_items): Use them. Sort by group and force line breaks
1112 between groups.
1113
1114 * readelf.c (handle_core_registers, handle_core_items): New functions,
1115 broken out of ...
1116 (handle_core_note): ... here. Call them.
1117
11182007-08-22 Roland McGrath <roland@redhat.com>
1119
1120 * unstrip.c (new_shstrtab): New function, broken out of ...
1121 (copy_elided_sections): ... here.
1122
11232007-08-20 Roland McGrath <roland@redhat.com>
1124
1125 Avoid local function trampolines in nm binary.
1126 * nm.c (sort_by_address): Move to a static function instead of local
1127 inside show_symbols.
1128 (sort_by_name_strtab): New static variable.
1129 (sort_by_name): Use it. Move to a static function instead of local
1130 inside show_symbols.
1131 (show_symbols): Set sort_by_name_strtab.
1132
11332007-08-19 Roland McGrath <roland@redhat.com>
1134
1135 * readelf.c (handle_auxv_note): New function.
1136 (handle_notes): Call it.
1137
1138 * readelf.c (printf_with_wrap, convert): New functions.
1139 (handle_core_item, (handle_core_register): New functions.
1140 (handle_notes): Call those with details from ebl_core_note.
1141
Roland McGrath099dd522007-08-13 22:58:36 +000011422007-08-12 Roland McGrath <roland@redhat.com>
1143
1144 * elflint.c (check_note): Accept type 0 with name "Linux".
1145
1146 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1147
1148 * elflint.c (section_flags_string): Return "none" for 0, not "".
1149
Roland McGrathd8221722007-08-11 21:18:09 +000011502007-08-11 Roland McGrath <roland@redhat.com>
1151
1152 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1153
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000011542007-08-04 Ulrich Drepper <drepper@redhat.com>
1155
1156 * readelf.c (hex_dump): Use isprint to determine whether to print
1157 character itself or full stop character.
1158 (dump_data): No need to check endp for NULL after strtol call.
1159
Roland McGrath60fc84c2007-08-03 21:59:15 +000011602007-08-03 Roland McGrath <roland@redhat.com>
1161
1162 * readelf.c (print_string_sections): New variable.
1163 (options, parse_opt): Handle --strings/-p to set it.
1164 (print_strings): New function.
1165 (process_elf_file): Call it under -p.
1166
1167 * readelf.c (options): Add hidden aliases --segments, --sections,
1168 as taken by binutils readelf.
1169
11702007-08-01 Roland McGrath <roland@redhat.com>
1171
1172 * readelf.c (dump_data_sections, dump_data_sections_tail):
1173 New variables.
1174 (options, parse_opt): Handle --hex-dump/-x, set them.
1175 (hex_dump): New function.
1176 (dump_data): New function, call it.
1177 (process_elf_file): Call it.
1178
11792007-07-25 Roland McGrath <roland@redhat.com>
1180
1181 * addr2line.c (show_symbols): New variable.
1182 (print_addrsym): New function.
1183 (handle_address): Call it.
1184 (options, parse_opt): Handle -S/--symbols.
1185
Ulrich Drepperb0243862007-06-06 00:09:36 +000011862007-06-05 Ulrich Drepper <drepper@redhat.com>
1187
1188 * addr2line.c: Update for latest autoconf header.
1189 * ar.c: Likewise.
1190 * elfcmp.c: Likewise.
1191 * elflint.c: Likewise.
1192 * findtextrel.c: Likewise.
1193 * ld.c: Likewise.
1194 * ldgeneric.c: Likewise.
1195 * nm.c: Likewise.
1196 * objdump.c: Likewise.
1197 * ranlib.c: Likewise.
1198 * readelf.c: Likewise.
1199 * size.c: Likewise.
1200 * strings.c: Likewise.
1201 * strip.c: Likewise.
1202 * unstrip.c: Likewise.
1203
Roland McGrath9aa8ef72007-05-18 08:59:43 +000012042007-05-18 Roland McGrath <roland@redhat.com>
1205
1206 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1207 stripped file, so as not to duplicate a section copied in both.
1208
1209 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1210
12112007-05-17 Roland McGrath <roland@redhat.com>
1212
1213 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1214
1215 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1216
1217 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1218 call make_directories here.
1219 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1220 (handle_dwfl_module): Likewise.
1221 (handle_implicit_modules): Update callers.
1222 (handle_output_dir_module): Likewise. Don't do make_directories here.
1223
1224 * unstrip.c (get_section_name): New function, broken out of ...
1225 (copy_elided_sections): here. Update callers.
1226 (find_alloc_section): Broken out of ...
1227 (copy_elided_sections): ... here. Update caller.
1228 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1229 update STT_SECTION symbols' st_value fields as a side effect.
1230 (check_symtab_section_symbols): Update caller.
1231 (add_new_section_symbols): Set st_value in symbols added.
1232 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1233 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1234 from .bss to .dynbss.
1235 (find_alloc_sections_prelink): New function. Associate debug file
1236 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1237 .gnu.prelink_undo information.
1238 (copy_elided_sections): Call it when we couldn't find every allocated
1239 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1240 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1241 (handle_file): Update callers.
1242
1243 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1244 named ".comment".
1245
1246 * elflint.c (check_sections): Fix association of segments with
1247 sections when p_memsz > p_filesz.
1248
12492007-04-29 Roland McGrath <roland@redhat.com>
1250
1251 * addr2line.c (options, main): Tweak argp group settings to fix
1252 usage output.
1253
12542007-04-28 Roland McGrath <roland@redhat.com>
1255
1256 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1257 sizes to match sections adjusted in the stripped file.
1258
Roland McGrath4be15242007-04-25 03:09:33 +000012592007-04-24 Roland McGrath <roland@redhat.com>
1260
1261 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1262 (hash_inexact): New variable.
1263 (options, parse_opt): Add --hash-inexact option to set it.
1264 (hash_content_equivalent): New function.
1265 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1266
12672007-04-23 Roland McGrath <roland@redhat.com>
1268
1269 * unstrip.c: New file.
1270 * Makefile.am (bin_PROGRAMS): Add it.
1271 (unstrip_LDADD): New variable.
1272
1273 * strip.c (options): Allow --output for -o.
1274
Ulrich Drepper8b383102007-02-16 00:31:57 +000012752007-02-15 Ulrich Drepper <drepper@redhat.com>
1276
1277 * readelf.c: Remove unused code. Add a few consts.
1278
Ulrich Drepper903c1162007-02-15 19:40:37 +000012792007-02-15 Roland McGrath <roland@redhat.com>
1280
1281 * readelf.c (print_debug): Fix brainos in SHDR test.
1282
Roland McGrathf82a1ec2007-02-06 04:47:44 +000012832007-02-05 Roland McGrath <roland@redhat.com>
1284
1285 * ar.c: Include <limits.h>, since we use LONG_MAX.
1286
Ulrich Drepper0fe63532007-02-05 21:05:51 +000012872007-02-05 Ulrich Drepper <drepper@redhat.com>
1288
Ulrich Drepper8b383102007-02-16 00:31:57 +00001289 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001290 ignore fchown's return value.
1291 (do_oper_insert): Handle error when writing padding.
1292 * ranlib.c: Add fchown complain work around.
1293
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001294 * arlib.c: Make symtab a global variable. Change all users.
1295 * arlib2.c: Likewise.
1296 * ranlib.c: Likewise.
1297 * ar.c: Likewise.
1298 * arlib.h: Declare it.
1299
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000013002007-01-11 Roland McGrath <roland@redhat.com>
1301
1302 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1303 SHF_MASKPROC bits separately from generic sh_flags validation.
1304
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000013052007-02-04 Ulrich Drepper <drepper@redhat.com>
1306
1307 * ar.c: New file.
1308 * arlib.c: New file.
1309 * arlib2.c: New file.
1310 * arlib.h: New file.
1311 * Makefile (noinst_LIBRARIES): Add libar.
1312 (libar_a_SOURCES): Define.
1313 (ar_LDADD): Define.
1314 (CFLAGS_ar): Define.
1315 * ranlib.c: Change to use arlib.
1316
1317 * elflint.c (check_symtab): Work around GNU ld bug which omits
1318 sections but not symbols in those sections.
1319
Ulrich Drepperb770cf92007-01-10 21:02:34 +000013202007-01-10 Ulrich Drepper <drepper@redhat.com>
1321
1322 * addr2line.c: Update copyright year.
1323 * elfcmp.c: Likewise.
1324 * elflint.c: Likewise.
1325 * findtextrel.c: Likewise.
1326 * ld.c: Likewise.
1327 * nm.c: Likewise.
1328 * objdump.c: Likewise.
1329 * ranlib.c: Likewise.
1330 * readelf.c: Likewise.
1331 * size.c: Likewise.
1332 * strings.c: Likewise.
1333 * strip.c: Likewise.
1334
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000013352006-12-09 Ulrich Drepper <drepper@redhat.com>
1336
1337 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1338 two hash tables have different content (module expected omission
1339 of undefined symbols).
1340
Roland McGrath8190db62006-12-17 23:56:51 +000013412006-10-31 Roland McGrath <roland@redhat.com>
1342
1343 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001344 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001345
13462006-09-19 Jakub Jelinek <jakub@redhat.com>
1347
1348 * strip.c (process_file): Disallow -f on archives.
1349
13502006-10-09 Roland McGrath <roland@redhat.com>
1351
1352 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1353
Roland McGrathc373d852006-10-10 00:25:21 +000013542006-08-29 Roland McGrath <roland@redhat.com>
1355
1356 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1357
1358 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1359 Reported by Christian Aichinger <Greek0@gmx.net>.
1360
1361 * elflint.c (valid_e_machine): Add EM_ALPHA.
1362 Reported by Christian Aichinger <Greek0@gmx.net>.
1363
Ulrich Drepper231c5902006-08-08 22:00:11 +000013642006-08-08 Ulrich Drepper <drepper@redhat.com>
1365
1366 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1367 Keep track of which "high DT" entries are present.
1368 Check that either old or GNU-style hash table is present.
1369 If GNU-style hash table is used a symbol table is mandatory.
1370 Check that if any prelink entry is present all of them are.
1371 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1372 table if they don't refer to functions.
1373
Roland McGrath858b1892006-07-17 08:41:15 +000013742006-07-17 Roland McGrath <roland@redhat.com>
1375
1376 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1377 (add_version): Likewise for argument.
1378 (check_versym): Cast constant to GElf_Versym for comparison.
1379
Roland McGrath4ec807e2006-07-13 03:59:46 +000013802006-07-12 Roland McGrath <roland@redhat.com>
1381
1382 * readelf.c (handle_gnu_hash): Add casts for machines where
1383 Elf32_Word != unsigned int.
1384
Ulrich Drepperdcf61602006-07-12 19:59:02 +000013852006-07-12 Ulrich Drepper <drepper@redhat.com>
1386
1387 * elflint.c (check_sysv_hash64): Fix printf format.
1388
Ulrich Dreppercc415622006-07-12 19:42:23 +000013892006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001390
Ulrich Dreppercc415622006-07-12 19:42:23 +00001391 * addr2line.c (options): English fix in -f doc string.
1392
1393 * addr2line.c (use_comp_dir): New variable.
1394 (options, parse_opt): Grok -A/--absolute to set it.
1395 (handle_address): If set, prepend dwfl_line_comp_dir results to
1396 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001397
Ulrich Drepper28ed8952006-07-07 03:43:47 +000013982006-07-06 Ulrich Drepper <drepper@redhat.com>
1399
1400 * elflint.c: Adjust for latest new hash table format.
1401 * readelf.c: Likewise.
1402
1403 * elflint.c (check_versym): Ignore hidden bit when comparing version
1404 numbers.
1405
14062006-07-05 Ulrich Drepper <drepper@redhat.com>
1407
1408 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1409 discarded COMDAT symbols.
1410
1411 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1412 (elf_i386_create_relocations): Likewise.
1413 * ld.h (struct symbol): Add local and hidden bits.
1414 * ld.c (create_special_section_symbol): These synthsized symbols
1415 are local and hidden.
1416 * ldgeneric.c (file_process2): Check whether input file matches
1417 the emulation.
1418 (fillin_special_symbol): Create symbols as local and/or hidden
1419 if requested.
1420 (ld_generic_create_outfile): Make local copy of symbol.
1421 Don't hide global, defined symbols in dynamic symbol table unless
1422 requested. Synthetic symbols have no version information.
1423
1424 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1425 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1426
14272006-07-04 Ulrich Drepper <drepper@redhat.com>
1428
1429 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1430 testing.
1431
14322006-07-03 Ulrich Drepper <drepper@redhat.com>
1433
1434 * elflint.c: Add testing of DT_GNU_HASH.
1435 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1436
1437 * Makefile.am: Add hacks to create dependency files for non-generic
1438 linker.
1439
Ulrich Drepper6ca46002006-06-12 22:40:23 +000014402006-06-12 Ulrich Drepper <drepper@redhat.com>
1441
1442 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1443 section if creating a DSO and no interpreter is given.
1444 (ld_generic_create_outfile): Don't store reference to symbols in
1445 discarded COMDAT groups. Don't create PHDR and INTERP program header
1446 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001447 (create_verneed_data): Pretty printing.
1448
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001449 * ldscript.y (content): If a DSO is created don't set default
1450 interpreter from linker script.
1451
1452 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1453 for symbols in discarded COMDAT groups.
1454 (elf_i386_create_relocations): Likewise.
1455 * ld.h (struct scninfo): Add unused_comdat.
1456 * ldgeneric.c (add_section): Also check group signature when
1457 matching COMDAT sections.
1458 (add_relocatable_file): Ignore symbols in COMDAT group which are
1459 discarded.
1460
1461 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1462 and symbol reference.
1463
Ulrich Drepper54f33a72006-06-11 09:07:37 +000014642006-06-11 Ulrich Drepper <drepper@redhat.com>
1465
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001466 * elflint.c (check_dynamic): Fix checking value of tags which are
1467 offsets in the string section. Make sure DT_STRTAB points to the
1468 section referenced in sh_link.
1469
1470 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1471
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001472 * ld.c: Recognize --eh-frame-hdr option.
1473 * ld.h (struct ld_state): Add eh_frame_hdr field.
1474 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1475
1476 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1477 SH_FLAGS_COMBINE.
1478 (add_relocatable_file): Minor optimization of last change.
1479 (match_section): Don't preserve SHF_GROUP flag any longer.
1480
Ulrich Drepper2d880282006-06-11 00:20:43 +000014812006-06-10 Ulrich Drepper <drepper@redhat.com>
1482
1483 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001484 Handle record and ignore as position dependent options.
1485 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001486 * ld.h (struct ld_state): Add execstack field.
1487 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1488 sections.
1489 (ld_generic_create_outfile): Fix program header creation in native
1490 linker. Add PT_GNU_STACK program header.
1491
Ulrich Dreppera688a732006-06-10 06:33:00 +000014922006-06-09 Ulrich Drepper <drepper@redhat.com>
1493
1494 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1495 for PLT entries if there is no local definition.
1496
1497 * ld.c (parse_option): Handle -z ignore like --as-needed and
1498 -z record like --no-as-needed.
1499 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1500 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1501 looping over DSOs. When deciding about adding DT_NEEDED entries
1502 use ->as_needed instead of ignore_unused_dsos.
1503
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000015042006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001505
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001506 * ld.c: Recognize --as-needed and --no-as-needed options.
1507 * ld.h (struct usedfile): Add as_needed field.
1508 (struct ld_state): Likewise.
1509 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1510 the list.
1511 * ldscript.y (filename_id_list): Split to correctly parse all
1512 combinations.
1513 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001514
Ulrich Drepper697f4db2006-06-10 06:50:47 +000015152006-05-28 Ulrich Drepper <drepper@redhat.com>
1516
1517 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1518 and colno.
1519
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000015202006-05-27 Ulrich Drepper <drepper@redhat.com>
1521
1522 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001523 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001524
Ulrich Drepper82c345d2006-04-04 22:07:54 +000015252006-04-04 Ulrich Drepper <drepper@redhat.com>
1526
1527 * addr2line.c: Update copyright year.
1528 * elfcmp.c: Likewise.
1529 * elflint.c: Likewise.
1530 * findtextrel.c: Likewise.
1531 * ld.c: Likewise.
1532 * nm.c: Likewise.
1533 * objdump.c: Likewise.
1534 * ranlib.c: Likewise.
1535 * readelf.c: Likewise.
1536 * size.c: Likewise.
1537 * strings.c: Likewise.
1538 * strip.c: Likewise.
1539
Roland McGrathdd7e22b2006-03-09 23:05:47 +000015402006-03-09 Roland McGrath <roland@redhat.com>
1541
1542 * Makefile.am (AM_LDFLAGS): New variable.
1543
Roland McGrath060fa052006-03-02 07:51:50 +000015442006-03-01 Roland McGrath <roland@redhat.com>
1545
1546 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1547 for dwarf.h changes matching 3.0 spec.
1548 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1549
Ulrich Drepper038129b2005-12-04 16:47:24 +000015502005-12-04 Ulrich Drepper <drepper@redhat.com>
1551
1552 * elflint.c (check_one_reloc): If relocation section is not loaded,
1553 don't check whether the relocations modify read-only sections or
1554 loaded and unloaded sections.
1555
Ulrich Drepper607e0542005-12-04 15:51:06 +000015562005-11-28 Ulrich Drepper <drepper@redhat.com>
1557
1558 * elflint.c (check_one_reloc): Take additional parameters. Use
1559 them to determine whether relocation is valid in this type of
1560 file. DSOs and executables can contain relocation sections in
1561 unloaded sections which just show the relocations the linker
1562 applied. Adjust all callers.
1563 (check_program_header): Check that PT_PHDR is loaded and that offset
1564 matches the one in the ELF header.
1565
Roland McGrath6724c902005-10-28 07:07:19 +000015662005-10-26 Roland McGrath <roland@redhat.com>
1567
1568 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1569
Ulrich Drepperd0449522005-09-03 07:23:52 +000015702005-09-03 Ulrich Drepper <drepper@redhat.com>
1571
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001572 * strip.c (handle_elf): Unify some error messages.
1573 * ld.c (main): Likewise.
1574 * ldgeneric.c (open_elf): Likewise.
1575 * elfcmp.c (main): Likewise.
1576 * elflint.c (check_elf_header): Likewise.
1577
1578 * size.c (process_file): Fix typo in error message.
1579
Ulrich Drepperd0449522005-09-03 07:23:52 +00001580 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1581
Ulrich Dreppera60501e2005-09-02 19:50:17 +000015822005-09-02 Ulrich Drepper <drepper@redhat.com>
1583
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001584 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001585 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001586
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000015872005-08-28 Ulrich Drepper <drepper@redhat.com>
1588
1589 * ranlib.c: Don't define pread_retry and write_retry here.
1590
1591 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1592 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1593
1594 * strings.c (process_chunk): Reorder expressions in conditional
1595 (process_chunk_mb): Likewise.
1596
1597 * strings.c: New file.
1598 * Makefile.am (bin_PROGRAMS): Add strings.
1599 (strings_no_Wstring): Define.
1600 (strings_LDADD): Define.
1601
Roland McGrath71e15a02005-08-27 10:33:26 +000016022005-08-27 Roland McGrath <roland@redhat.com>
1603
1604 * addr2line.c (dwarf_diename_integrate): Function removed.
1605 (print_dwarf_function): Use plain dwarf_diename.
1606
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000016072005-08-24 Ulrich Drepper <drepper@redhat.com>
1608
1609 * elflint.c (check_versym): Versioned symbols should not have
1610 local binding.
1611
Ulrich Drepper5d832292005-08-15 21:36:27 +000016122005-08-15 Ulrich Drepper <drepper@redhat.com>
1613
Ulrich Drepper61655e02005-08-16 04:23:02 +00001614 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1615 undefined.
1616
Ulrich Drepper5d832292005-08-15 21:36:27 +00001617 * Makefile.am: Add rules to build ranlib.
1618 * ranlib.c: New file.
1619
Roland McGrath18e13422005-08-15 08:01:25 +000016202005-08-14 Roland McGrath <roland@redhat.com>
1621
1622 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1623 sh_type it recognizes.
1624
1625 * elflint.c (check_sections): Print unknown flags in hex, don't
1626 truncate high bits. Print section number and name for unknown type.
1627
Roland McGrathf6895042005-08-13 20:56:52 +000016282005-08-13 Roland McGrath <roland@redhat.com>
1629
1630 * elflint.c (check_program_header): Use ebl_segment_type_name and
1631 allow any p_type it recognizes. Include p_type value in error
1632 message for unknown type.
1633
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000016342005-08-13 Ulrich Drepper <drepper@redhat.com>
1635
1636 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1637 to ebl_check_special_symbol.
1638 (check_sections): Pass ehdr to ebl_bss_plt_p.
1639
Roland McGrath653d3762005-08-13 01:59:10 +000016402005-08-12 Roland McGrath <roland@redhat.com>
1641
1642 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1643 refers to the right section if it's not SHN_ABS.
1644 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1645
1646 * elflint.c (check_sections): Don't complain about a non-NOBITS
1647 section taking no segment space, if it's sh_size is 0.
1648
1649 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1650 be PROGBITS or NOBITS.
1651
1652 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1653 standard st_value and st_size checks.
1654
Roland McGrath1c83bf12005-08-11 07:03:55 +000016552005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001656
Roland McGrath1c83bf12005-08-11 07:03:55 +00001657 * addr2line.c (options, parse_opt): Don't handle -e here.
1658 (executable): Variable removed.
1659 (argp_children): New static variable.
1660 (argp): Use it. Make const.
1661 (main): Fill in argp_children from dwfl_standard_argp ().
1662 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1663 (print_dwarf_function): New function. Try to figure out inline chain.
1664 (elf_getname): Function removed, libdwfl does it for us.
1665 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1666 Use dwfl_module_addrname instead of elf_getname.
1667 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1668 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1669
16702005-08-10 Ulrich Drepper <drepper@redhat.com>
1671
1672 * strip.c (parse_opt): STATE parameter is now used.
1673 Various little cleanups.
1674
1675 * readelf.c (print_debug_line_section): Correct fallout of renaming
1676 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001677
Roland McGrath8f31c2c2005-08-09 04:58:05 +000016782005-08-08 Roland McGrath <roland@redhat.com>
1679
1680 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1681 with binutils strip. Likewise -d, -S, as aliases for -g.
1682 Likewise ignore -s/--strip-all.
1683
Roland McGrath095a01b2005-08-08 03:49:35 +000016842005-08-07 Roland McGrath <roland@redhat.com>
1685
1686 * strip.c (process_file): Open read-only when using a different output
1687 file.
1688
Ulrich Drepper47be7952005-08-07 04:41:39 +000016892005-08-06 Ulrich Drepper <drepper@redhat.com>
1690
Ulrich Drepper637963b2005-08-07 05:33:07 +00001691 * elflint.c (in_nobits_scn): New function.
1692 (check_versym): Allow references for defined symbols against versions
1693 of other DSOs also for symbols in nobits sections.
1694 Move a few variables around.
1695
Ulrich Drepper47be7952005-08-07 04:41:39 +00001696 * Makefile.am (AM_CFLAGS): Avoid duplication.
1697 Link with statis libs if BUILD_STATIC.
1698
Ulrich Drepperdbace232005-08-06 01:37:23 +000016992005-08-05 Ulrich Drepper <drepper@redhat.com>
1700
1701 * elflint.c: Many, many more tests. Mostly related to symbol
1702 versioning. Those sections should now be completely checked.
1703
1704 * readelf.c (print_dynamic): Use gelf_offscn.
1705
Ulrich Drepperacb89832005-08-04 07:01:49 +000017062005-08-04 Ulrich Drepper <drepper@redhat.com>
1707
1708 * elflint.c: Add lots more tests: more extension symbol table sanity,
1709 versioning section tests, hash table tests. General cleanup.
1710
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000017112005-08-02 Ulrich Drepper <drepper@redhat.com>
1712
Ulrich Drepper8a687742005-08-03 02:24:12 +00001713 * objdump.c: New file.
1714 * Makefile.am (bin_PROGRAMS): Add objdump.
1715 (objdump_LDADD): Define.
1716
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001717 * elflint.c (check_reloc_shdr): New function split out from check_rela
1718 and check_rel.
1719 (check_one_reloc): New function. Likewise.
1720 (check_rela): Use check_reloc_shdr and check_one_reloc.
1721 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001722 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1723 section.
1724 Add checks that relocations against read-only segments are flagged,
1725 that the text relocation flag is not set unnecessarily, and that
1726 relocations in one section are either against loaded or not-loaded
1727 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001728
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000017292005-08-01 Ulrich Drepper <drepper@redhat.com>
1730
1731 * elfcmp.c (main): Ignore section count and section name string table
1732 section index.
1733
Roland McGrathf9ece8a2005-07-28 07:03:04 +000017342005-07-27 Roland McGrath <roland@redhat.com>
1735
1736 * elfcmp.c: Include <locale.h>.
1737
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000017382005-07-27 Ulrich Drepper <drepper@redhat.com>
1739
1740 * elfcmp.c: Print name and index of differing section.
1741
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000017422005-07-24 Ulrich Drepper <drepper@redhat.com>
1743
1744 * elfcmp.c: Implement comparing gaps between sections.
1745
17462005-07-23 Ulrich Drepper <drepper@redhat.com>
1747
1748 * elflint.c: Include libeblP.h instead of libebl.h.
1749 * nm.c: Likewise.
1750 * readelf.c: Likewise.
1751 * elfcmp.c: Likewise.
1752
1753 * elfcmp.c (main): Compare individual ELF header fields, excluding
1754 e_shoff instead of the whole struct at once.
1755 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1756 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1757
17582005-07-22 Ulrich Drepper <drepper@redhat.com>
1759
1760 * elfcmp.c (main): Take empty section into account when comparing
1761 section content.
1762
1763 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1764 using it.
1765
17662005-07-21 Ulrich Drepper <drepper@redhat.com>
1767
1768 * elfcmp.c: New file.
1769 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1770 (elfcmp_LDADD): Define.
1771
1772 * elflint.c (check_rela): Check that copy relocations only reference
1773 object symbols or symbols with unknown type.
1774 (check_rel): Likewise.
1775
17762005-06-08 Roland McGrath <roland@redhat.com>
1777
1778 * readelf.c (print_ops): Add consts.
1779
17802005-05-31 Roland McGrath <roland@redhat.com>
1781
1782 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1783 abbreviations. Print a header line before each CU section.
1784
1785 * readelf.c (print_debug_loc_section): Fix indentation for larger
1786 address size.
1787
17882005-05-30 Roland McGrath <roland@redhat.com>
1789
1790 * readelf.c (print_debug_line_section): Print section offset of each
1791 CU's table, so they are easy to find from seeing the stmt_list value.
1792
1793 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1794 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1795
1796 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1797 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1798
1799 * readelf.c (print_ops): Take different args for indentation control.
1800 (attr_callback): Caller updated.
1801 Grok several more block-form attributes as being location expressions.
1802 For those same attributes with udata forms, format output differently
1803 for location list offset.
1804 (print_debug_loc_section): Implement it for real.
1805
1806 * readelf.c (options): Mention ranges for --debug-dump.
1807 (enum section_e): Add section_ranges.
1808 (parse_opt): Grok "ranges" for -w/--debug-dump.
1809 (print_debug_ranges_section): New function.
1810 (print_debug): Handle .debug_ranges section.
1811
18122005-05-30 Ulrich Drepper <drepper@redhat.com>
1813
1814 * readelf.c (handle_notes): At least x86-64 need not have the note
1815 section values aligned to 8 bytes.
1816
18172005-05-18 Ulrich Drepper <drepper@redhat.com>
1818
1819 * readelf.c (dwarf_tag_string): Add new tags.
1820
18212005-05-08 Roland McGrath <roland@redhat.com>
1822
1823 * strip.c (handle_elf): Don't translate hash and versym data formats,
1824 elf_getdata already did it for us.
1825
18262005-05-07 Ulrich Drepper <drepper@redhat.com>
1827
1828 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1829 (addr2line_LDADD): Likewise.
1830
18312005-05-03 Roland McGrath <roland@redhat.com>
1832
1833 * strip.c (handle_elf): Apply symbol table fixups to discarded
1834 relocation sections when they are being saved in the debug file.
1835
1836 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1837 and gelf_xlatetof, not the native byte order.
1838
1839 * strip.c (parse_opt): Give error if -f or -o is repeated.
1840 (main): Exit if argp_parse returns nonzero.
1841
1842 * strip.c (debug_fname_embed): New variable.
1843 (options, parse_opt): New option -F to set it.
1844
18452005-05-07 Ulrich Drepper <drepper@redhat.com>
1846
1847 * readelf.c (parse_opt): Make any_control_option variable
1848 local. Simplify some tests.
1849
18502005-05-03 Roland McGrath <roland@redhat.com>
1851
1852 * strip.c (crc32_file): Function removed (now in ../lib).
1853
18542005-05-03 Roland McGrath <roland@redhat.com>
1855
1856 * elflint.c (is_debuginfo): New variable.
1857 (options, parse_opt): New option --debuginfo/-d to set it.
1858 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1859 (check_note): If is_debuginfo, don't try to get note contents.
1860
18612005-04-24 Ulrich Drepper <drepper@redhat.com>
1862
1863 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1864 section reached.
1865
18662005-04-14 Ulrich Drepper <drepper@redhat.com>
1867
1868 * readelf.c (dwarf_encoding_string): New function.
1869 (dwarf_inline_string): New function.
1870 (dwarf_access_string): New function.
1871 (dwarf_visibility_string): New function.
1872 (dwarf_virtuality_string): New function.
1873 (dwarf_identifier_case_string): New function.
1874 (dwarf_calling_convention_string): New function.
1875 (dwarf_ordering_string): New function.
1876 (dwarf_discr_list_string): New function.
1877 (attr_callback): Decode man more attribute values.
1878
18792005-04-01 Ulrich Drepper <drepper@redhat.com>
1880
1881 * addr2line.c: Finish implementation of -f option.
1882
18832005-03-29 Ulrich Drepper <drepper@redhat.com>
1884
1885 * addr2line.c: New file.
1886 * Makefile.am (bin_PROGRAMS): Add addr2line.
1887 Define addr2line_LDADD.
1888
1889 * findtextrel.c: Use new dwarf_addrdie function.
1890
1891 * findtextrel.c: Fix usage message and re-add accidentally removed
1892 line.
1893
18942005-03-28 Ulrich Drepper <drepper@redhat.com>
1895
1896 * findtextrel.c: New file.
1897 * Makefile: Add rules to build findtextrel.
1898
18992005-02-15 Ulrich Drepper <drepper@redhat.com>
1900
1901 * ldlex.l: Provide ECHO definition to avoid warning.
1902
1903 * elflint.c (check_program_header): Fix typo in RELRO test.
1904
1905 * Makefile.am (AM_CFLAGS): Add more warning options.
1906 * elflint.c: Fix warnings introduced by the new warning options.
1907 * i386_ld.c: Likewise.
1908 * ld.c: Likewise.
1909 * ld.h: Likewise.
1910 * ldgeneric.c: Likewise.
1911 * nm.c: Likewise.
1912 * readelf.c: Likewise.
1913 * sectionhash.c: Likewise.
1914 * size.c: Likewise.
1915 * string.c: Likewise.
1916
19172005-02-05 Ulrich Drepper <drepper@redhat.com>
1918
1919 * Makefile.am: Check for text relocations in constructed DSOs.
1920
1921 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1922 with -lmudflap.
1923
1924 * ldscript.y: Add as_needed handling.
1925 * ldlex.l: Recognize AS_NEEDED token.
1926 * ld.h (struct filename_list): Add as_needed flag.
1927
19282005-02-04 Ulrich Drepper <drepper@redhat.com>
1929
1930 * elflint.c (check_symtab): Correctly determine size of GOT section.
1931
19322005-01-19 Ulrich Drepper <drepper@redhat.com>
1933
1934 * ld.c: Remove unnecessary more_help function. Print bug report
1935 address using argp.
1936 * strip.c: Likewise.
1937 * size.c: Likewise.
1938 * nm.c: Likewise.
1939 * readelf.c: Likewise.
1940 * elflint.c: Likewise.
1941
1942 * elflint.c (main): Don't check for parameter problems here.
1943 (parse_opt): Do it here, where we get informed about some of them
1944 anyway.
1945
1946 * readelf.c (main): Don't check for parameter problems here.
1947 (parse_opt): Do it here, where we get informed about some of them
1948 anyway.
1949
19502005-01-11 Ulrich Drepper <drepper@redhat.com>
1951
1952 * strip.c: Update copyright year.
1953 * readelf.c: Likewise.
1954 * size.c: Likewise.
1955 * nm.c: Likewise.
1956 * ld.c: Likewise.
1957 * elflint.c: Likewise.
1958
1959 * elflint.c (check_symtab): Don't warn about wrong size for
1960 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1961
19622004-10-05 Ulrich Drepper <drepper@redhat.com>
1963
1964 * readelf.c (print_phdr): In section mapping, also indicate
1965 sections in read-only segments.
1966
19672004-09-25 Ulrich Drepper <drepper@redhat.com>
1968
1969 * readelf.c: Make compile with gcc 4.0.
1970 * strip.c: Likewise.
1971
19722004-08-16 Ulrich Drepper <drepper@redhat.com>
1973
1974 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1975 allocate to work around gcc 3.4 bug.
1976
19772004-01-25 Ulrich Drepper <drepper@redhat.com>
1978
1979 * ldlex.l (invalid_char): Better error message.
1980
19812004-01-23 Ulrich Drepper <drepper@redhat.com>
1982
1983 * readelf.c: Print SHT_GNU_LIBLIST sections.
1984
1985 * none_ld.c: New file.
1986
19872004-01-21 Ulrich Drepper <drepper@redhat.com>
1988
1989 * Makefile.am: Enable building of machine specific linker.
1990
19912004-01-20 Ulrich Drepper <drepper@redhat.com>
1992
1993 * Makefile.am: Support building with mudflap.
1994
1995 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1996 * ldgeneric.c: Likewise.
1997 * ldscript.y: Likewise.
1998 * readelf.c: Likewise.
1999 * strip.c: Likewise.
2000
2001 * readelf.c (print_debug_line_section): Determine address size
2002 correctly.
2003
20042004-01-19 Ulrich Drepper <drepper@redhat.com>
2005
2006 * readelf.c (print_phdr): Show which sections are covered by the
2007 PT_GNU_RELRO entry.
2008
2009 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2010
2011 * readelf.c (print_debug_macinfo_section): Implement.
2012
20132004-01-18 Ulrich Drepper <drepper@redhat.com>
2014
2015 * readelf.c (print_debug_line_section): Implement.
2016
20172004-01-17 Ulrich Drepper <drepper@redhat.com>
2018
2019 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2020 * src/ld.c: Likewise.
2021 * src/nm.c: Likewise.
2022 * src/readelf.c: Likewise.
2023 * src/size.c: Likewise.
2024 * src/strip.c: Likewise.
2025
2026 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2027
2028 * Makefile.am: Support building with mudflap.
2029
20302004-01-16 Ulrich Drepper <drepper@redhat.com>
2031
2032 * readelf.c (print_debug_info_section): Free dies memory.
2033
2034 * readelf.c: Print .debug_info section content.
2035
20362004-01-13 Ulrich Drepper <drepper@redhat.com>
2037
2038 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2039
20402004-01-12 Ulrich Drepper <drepper@redhat.com>
2041
2042 * readelf.c (print_debug_aranges): Implement using libdw.
2043
20442004-01-11 Ulrich Drepper <drepper@redhat.com>
2045
2046 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2047
2048 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2049 behavior is available yet.
2050 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2051
20522004-01-09 Ulrich Drepper <drepper@redhat.com>
2053
2054 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2055
2056 * nm.c: Implement getting information about local variables.
2057
20582004-01-07 Ulrich Drepper <drepper@redhat.com>
2059
2060 * nm.c: Read also debug information for local symbols.
2061
20622004-01-05 Ulrich Drepper <drepper@redhat.com>
2063
2064 * nm.c: Shuffle dwarf handling code around so the maximum column
2065 width can be computed ahead of printing. Avoid collection symbols
2066 which are not printed anyway.
2067
2068 * nm.c: Rewrite dwarf handling to use libdw.
2069 * Makefile.am (AM_CFLAGS): Add -std parameter.
2070 (INCLUDES): Find header in libdw subdir.
2071 (nm_LDADD): Replace libdwarf with libdw.
2072
2073 * elflint.c: Update copyright year.
2074 * readelf.c: Likewise.
2075 * size.c: Likewise.
2076 * strip.c: Likewise.
2077 * nm.c: Likewise.
2078
20792003-12-31 Ulrich Drepper <drepper@redhat.com>
2080
2081 * strip.c (process_file): Close file before returning.
2082
20832003-11-19 Ulrich Drepper <drepper@redhat.com>
2084
2085 * readelf.c (handle_dynamic): Make column for tag name wider.
2086
20872003-09-29 Ulrich Drepper <drepper@redhat.com>
2088
2089 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2090
20912003-09-25 Ulrich Drepper <drepper@redhat.com>
2092
2093 * strip.c (process_file): Don't mmap the input file, we modify the
2094 data structures and don't want the change end up on disk.
2095
20962003-09-23 Jakub Jelinek <jakub@redhat.com>
2097
2098 * unaligned.h (union u_2ubyte_unaligned,
2099 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2100 packed attribute.
2101 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2102 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2103 Read/store value through _ptr->u instead of *_ptr.
2104
21052003-09-22 Ulrich Drepper <drepper@redhat.com>
2106
2107 * size.c (show_sysv): Change type of maxlen to int.
2108
2109 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2110 buckets.
2111
2112 * i386_ld.c: Many many fixes and extensions.
2113 * ld.c: Likewise.
2114 * ldgeneric.c: Likewise.
2115
21162003-08-16 Ulrich Drepper <drepper@redhat.com>
2117
2118 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2119 the reference is from another DSO.
2120
21212003-08-15 Ulrich Drepper <drepper@redhat.com>
2122
2123 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2124 point is found when creating a DSO.
2125
21262003-08-14 Ulrich Drepper <drepper@redhat.com>
2127
2128 * ld.c (main): Always call FLAG_UNRESOLVED.
2129 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2130 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2131
21322003-08-13 Ulrich Drepper <drepper@redhat.com>
2133
2134 * Makefile.in: Depend on libebl.a, not libebl.so.
2135
2136 * ld.c (main): Mark stream for linker script as locked by caller.
2137 (read_version_script): Likewise.
2138 * ldlex.c: Define fread and fwrite to _unlocked variant.
2139
2140 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2141 target_bswap_32.
2142 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2143 target_bswap_64.
2144 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2145 store_8ubyte_unaligned): Define using new macros.
2146
21472003-08-12 Ulrich Drepper <drepper@redhat.com>
2148
2149 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2150 possibly unaligned memory. Support use of big endian machines.
2151
21522003-08-11 Ulrich Drepper <drepper@redhat.com>
2153
2154 * Moved to CVS archive.