blob: 9f0c525acfdc00666eeda569526aa03bd6c6f332 [file] [log] [blame]
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +010012012-10-16 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
4 calculated beginning after the operand and 2-byte constant.
5
Jan Kratochvil4bdbb672012-10-10 22:27:58 +020062012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7
8 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
9 (WRAP_COLUMN): ... here.
10 (print_core_item): Remove parameter format_max. Update function
11 comment. Replace FORMAT_MAX by the real output width.
12 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
13 calls of print_core_item, remove variable maxfmt, change
14 ITEM_WRAP_COLUMN to WRAP_COLUMN.
15 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
16 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
17
Roland McGrath82ed98a2012-10-11 14:53:18 -0700182012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
19
20 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
21 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
22
Mark Wielaarde89c5002012-08-27 14:30:05 +0200232012-08-27 Mark Wielaard <mjw@redhat.com>
24
Mark Wielaard3e440062012-08-27 15:21:58 +020025 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
26
272012-08-27 Mark Wielaard <mjw@redhat.com>
28
Mark Wielaarde89c5002012-08-27 14:30:05 +020029 * readelf.c (register_info): Handle loc == NULL.
30
Jeff Kenton257dcf42012-08-22 09:00:03 -0400312012-08-22 Jeff Kenton <jkenton@tilera.com>
32
33 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
34
Mark Wielaardf31c4412012-08-17 00:35:03 +0200352012-08-16 Mark Wielaard <mjw@redhat.com>
36
37 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
38 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
39 appropriate.
40 (dwarf_attr_name): Likewise.
41 (dwarf_form_name): Likewise.
42 (dwarf_lang_name): Likewise.
43 (dwarf_inline_name): Likewise.
44 (dwarf_encoding_name): Likewise.
45 (dwarf_access_name): Likewise.
46 (dwarf_visibility_name): Likewise.
47 (dwarf_virtuality_name): Likewise.
48 (dwarf_identifier_case_name): Likewise.
49 (dwarf_calling_convention_name): Likewise.
50 (dwarf_ordering_name): Likewise.
51 (dwarf_discr_list_name): Likewise.
52 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
53 (attr_callback): Call new dwarf_foobar_name instead of old
54 dwarf_foobar_string functions.
55 (dwarf_tag_string): New function using known-dwarf.h macros.
56 (dwarf_attr_string): Likewise.
57 (dwarf_form_string): Likewise.
58 (dwarf_lang_string): Likewise.
59 (dwarf_inline_string): Likewise.
60 (dwarf_encoding_string): Likewise.
61 (dwarf_access_string): Likewise.
62 (dwarf_visibility_string): Likewise.
63 (dwarf_virtuality_string): Likewise.
64 (dwarf_identifier_case_string): Likewise.
65 (dwarf_calling_convention_string): Likewise.
66 (dwarf_ordering_string): Likewise.
67 (dwarf_discr_list_string): Likewise.
68 (dwarf_locexpr_opcode_string): Likewise.
69
Mark Wielaard775375e2012-06-22 12:02:45 +0200702012-06-27 Mark Wielaard <mjw@redhat.com>
71
72 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
73 DW_FORM_GNU_strp_alt.
74 (attr_callback): Likewise.
75
Petr Machatafe198bc2012-07-30 19:48:28 +0200762012-07-30 Petr Machata <pmachata@redhat.com>
77
78 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
79 corresponding printf) so that those that are referenced by only
80 one of the formatting strings are at the end.
81
Mark Wielaard629b2562012-07-29 14:05:20 +0200822012-07-29 Mark Wielaard <mjw@redhat.com>
83
84 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
85 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
86
Mark Wielaard515fba92012-07-20 00:09:56 +0200872012-07-19 Mark Wielaard <mjw@redhat.com>
88
89 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
90
Mark Wielaarde9b23882012-06-29 22:30:15 +0200912012-07-11 Mark Wielaard <mjw@redhat.com>
92
93 * readelf.c (options): Add macro to help of debug-dump.
94 (section_e): Add section_macro.
95 (section_all): Add section_macro.
96 (parse_opt): Handle macro.
97 (print_debug_macro_section): New function.
98 (print_debug): Add NEW_SECTION (macro).
99
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02001002012-07-10 Mark Wielaard <mjw@redhat.com>
101
102 * readelf.c (print_gdb_index_section): Add version 7 support.
103 Keep track of cu_nr. Print kind and static/global flag for each
104 symbol. When a symbol is in the TU list add 'T'.
105
Mark Wielaarda0172d72012-06-25 17:18:53 +02001062012-06-26 Mark Wielaard <mjw@redhat.com>
107
108 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
109
Mark Wielaard50e2d392012-06-22 16:44:54 +02001102012-06-22 Mark Wielaard <mjw@redhat.com>
111
112 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
113 for gcc 4.7 -Wformat.
114
Mark Wielaard36aa5982012-05-09 11:27:44 +02001152012-05-09 Roland McGrath <roland@hack.frob.com>
116
117 * elflint (check_sections): Allow zero sized sections at (filesz) end
118 of segment. And make check overflow-proofed.
119
Mark Wielaard716486d2012-04-24 11:56:42 +02001202012-04-24 Mark Wielaard <mjw@redhat.com>
121
122 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
123 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
124
Roland McGrath738c1832012-03-28 15:01:49 -07001252012-03-28 Roland McGrath <roland@hack.frob.com>
126
127 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
128
Mark Wielaard61651c12012-03-28 11:20:36 +02001292012-03-28 Mark Wielaard <mjw@redhat.com>
130
131 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
132 section data.
133 (print_debug_str_section): Likewise.
134
Mark Wielaard30bb7142012-03-21 16:05:31 +01001352012-03-21 Mark Wielaard <mjw@redhat.com>
136
137 * readelf.c (print_gdb_index_section): Accept version 6.
138
Mark Wielaardcb643d62012-01-31 19:22:03 +01001392012-01-31 Mark Wielaard <mjw@redhat.com>
140
141 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
142
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05001432012-01-21 Ulrich Drepper <drepper@gmail.com>
144
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500145 * addr2line.c: Update copyright year.
146 * ar.c: Likewise.
147 * elfcmp.c: Likewise.
148 * elflint.c: Likewise.
149 * findtextrel.c: Likewise.
150 * ld.c: Likewise.
151 * nm.c: Likewise.
152 * objdump.c: Likewise.
153 * ranlib.c: Likewise.
154 * readelf.c: Likewise.
155 * size.c: Likewise.
156 * strings.c: Likewise.
157 * strip.c: Likewise.
158 * unstrip.c: Likewise.
159
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -0500160 * nm.c (argp_children): Define.
161 (argp): Hook up argp_children.
162 (handle_ar): Optimize puts call.
163 (show_symbols_bsd): Use positional parameters to also print color
164 codes. Don't print STT_FILE symbols.
165 * objdump.c (options): Improve help text.
166 (argp_children): Define.
167 (argp): Hook up argp_children.
168 (disasm_info): Add elements for color codes.
169 (disasm_output): Print color codes as well.
170 (show_disasm): Set up disasm_info data for callback.
171
Roland McGrath85924782012-01-20 11:40:59 -08001722012-01-20 Roland McGrath <roland@hack.frob.com>
173
Roland McGrath3284b792012-01-20 12:51:46 -0800174 * arlib-argp.c (arlib_deterministic_output): Initialize from
175 configured value.
176 (help_filter): New function.
177 (argp): Use it.
178
Roland McGrath9bffd362012-01-20 12:04:19 -0800179 * ar.c (main): Handle oper_none as usage error.
180
Roland McGrath6e063d92012-01-20 11:43:36 -0800181 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
182
Roland McGrath85924782012-01-20 11:40:59 -0800183 * ranlib.c (argp): Use arlib_argp_children.
184
185 * arlib.c (arlib_init): Obey arlib_deterministic_output.
186
187 * arlib-argp.c: New file.
188 * Makefile.am (libar_a_SOURCES): Add it.
189 * arlib.h (arlib_deterministic_output, arlib_argp_children):
190 Declare new variables.
191 * ar.c (deterministic_output): Variable removed.
192 (do_oper_insert): Use arlib_deterministic_output instead.
193 (options, parse_opt): Don't handle -D here. Add group numbers.
194 (argp): Use arlib_argp_children.
195
Roland McGratha065c4b2011-12-20 10:55:01 -08001962011-12-20 Roland McGrath <roland@hack.frob.com>
197
198 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
199 Reported by Karel Klic <kklic@redhat.com>.
200
Roland McGrath4fa988e2011-11-05 20:58:14 -07002012011-11-05 Roland McGrath <roland@hack.frob.com>
202
Roland McGrathe5ba2a12011-11-05 21:08:07 -0700203 * ar.c (deterministic_output): New flag variable.
204 (options, parse_opt): Grok -D to set it.
205 (do_oper_insert): When set, use zero from mtime, uid, and gid.
206
Roland McGrath4fa988e2011-11-05 20:58:14 -0700207 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
208
Marek Polacek8d1e2972011-10-04 05:11:42 -04002092011-10-04 Marek Polacek <mpolacek@redhat.com>
210
211 * readelf.c (register_info): Assume the right size of an array.
212
Ulrich Drepper2356ba02011-10-03 07:23:07 -04002132011-10-03 Ulrich Drepper <drepper@gmail.com>
214
215 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
216 but don't show it in help anymore.
217 (mark_special): Renamed from mark_weak.
218 (parse_opt): Adjust.
219 (class_type_char): Take additional parameters for ELF file and ELF
220 header. Treat TLS symbols like objects.
221 In case of D symbols, show u for unique symbols, R for symbols in
222 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400223 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400224 header. Adjust for class_type_char change. Show TLS symbols with
225 @ after them in case --mark-special is selected.
226 (show_symbols_posix): Likewise.
227 (show_symbols): Adjust calls to show_symbols_bsd and
228 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -0400229 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400230 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400231
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -04002322011-10-02 Ulrich Drepper <drepper@gmail.com>
233
234 * Makefile.am (demanglelib): Define.
235 (nm_LDADD): Add demanglelib.
236 * nm.c (options): Add -C option.
237 (demangle): Define as global variable.
238 (parse_opt): Recognize -C.
239 (show_symbols_sysv): Handle demangling.
240 (show_symbols_bad): Likewise.
241 (show_symbols_posix): Likewise.
242 (show_symbols): Likewise.
243
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07002442011-07-09 Roland McGrath <roland@hack.frob.com>
245
Roland McGrathbd754192011-07-09 05:33:37 -0700246 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
247
248 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700249
Mark Wielaard02a958b2011-05-30 17:23:57 +02002502011-05-30 Mark Wielaard <mjw@redhat.com>
251
252 * strip.c (relocate): Make offset check overflow-proof.
253
Mark Wielaard1662bc32011-05-16 11:33:11 +02002542011-05-23 Mark Wielaard <mjw@redhat.com>
255
Mark Wielaard63868c22011-05-24 16:09:31 +0200256 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700257 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +0200258 Relocate against any debug section symbol, not just STT_SECTION
259 symbols. For SHT_REL relocations, fetch addend from offset and
260 add it to symbol value if not zero.
261
2622011-05-23 Mark Wielaard <mjw@redhat.com>
263
Mark Wielaard1662bc32011-05-16 11:33:11 +0200264 * strip.c (OPT_RELOC_DEBUG): New option.
265 (argp_option): Add new --reloc-debug-sections option.
266 (main): Check new option.
267 (parse_opt): Likewise.
268 (handle_elf): Remove any relocations between debug sections
269 in ET_REL for the debug file when requested.
270
Mark Wielaard7a125b92011-05-17 12:20:01 +02002712011-05-18 Mark Wielaard <mjw@redhat.com>
272
273 * strip.c (handle_elf): Make sure all sections of a removed group
274 section are removed too. Don't discard SHT_GROUP sections, copy
275 section table before it gets modified. Section group signature
276 symbols don't have to be retained.
277
Jakub Jelinek03124242011-05-17 17:00:14 +02002782011-05-16 Jakub Jelinek <jakub@redhat.com>
279
280 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
281 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
282 and DW_OP_GNU_reinterpret.
283
Mark Wielaard69a9b112011-05-17 15:34:02 +02002842011-05-17 Mark Wielaard <mjw@redhat.com>
285
286 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
287 DW_TAG_GNU_call_site_parameter return strings.
288
Marek Polacekc8920de2011-05-12 12:08:21 +02002892011-05-11 Marek Polacek <mpolacek@redhat.com>
290
291 * nm.c (show_symbols_sysv): Remove unused if/else, remove
292 unused `prefix' and `fname' parameters.
293
Marek Polacek82f77d72011-05-07 19:26:20 +02002942011-05-07 Marek Polacek <mpolacek@redhat.com>
295
296 * unstrip.c (compare_sections_nonrel): Mark this function as static.
297
Mark Wielaardbb9d1b42011-04-24 17:53:38 +02002982011-04-26 Mark Wielaard <mjw@redhat.com>
299
300 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
301 with note name.
302
Mark Wielaard093a1d32011-04-14 23:47:26 +02003032011-04-14 Mark Wielaard <mjw@redhat.com>
304
305 * readelf.c (options): Add gdb_index.
306 (section_e): Define section_gdb_index.
307 (parse_opt): Recognize gdb_index debug-dump argument.
308 (print_gdb_index_section): New function.
309 (print_debug): Add gdb_index to debug_sections.
310
Petr Machata1879e5b2011-03-25 15:17:04 +01003112011-03-24 Petr Machata <pmachata@redhat.com>
312
313 * readelf.c (print_debug_line_section): Emit initial space for all
314 opcode lines. Print offset in front of each opcode.
315
Marek Polacek44de92a2011-03-22 01:07:20 +01003162011-03-22 Marek Polacek <mpolacek@redhat.com>
317
318 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
319
Mark Wielaarde3368c52011-03-22 23:03:31 +01003202011-03-22 Mark Wielaard <mjw@redhat.com>
321
322 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
323 and DW_TAG_GNU_call_site_parameter.
324 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
325 DW_AT_GNU_call_site_data_value,
326 DW_AT_GNU_call_site_target,
327 DW_AT_GNU_call_site_target_clobbered,
328 DW_AT_GNU_tail_call,
329 DW_AT_GNU_all_tail_call_sites,
330 DW_AT_GNU_all_call_sites,
331 and DW_AT_GNU_all_source_call_sites.
332 (print_ops): Handle DW_OP_GNU_entry_value.
333 (attr_callback): Handle DW_AT_GNU_call_site_value,
334 DW_AT_GNU_call_site_data_value,
335 DW_AT_GNU_call_site_target,
336 and DW_AT_GNU_call_site_target_clobbered.
337
Mark Wielaarda062b6b2011-03-10 13:02:32 +01003382011-03-10 Mark Wielaard <mjw@redhat.com>
339
340 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
341
Jan Kratochvilfec39992011-02-27 12:01:25 -08003422011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
343
344 * readelf.c (reset_listptr): Clear TABLE->TABLE.
345
Mark Wielaardcf454ab2011-02-25 12:58:54 +01003462011-02-25 Mark Wielaard <mjw@redhat.com>
347
348 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
349 (dwarf_form_string): Properly format and return unknown form.
350
Roland McGrath47c53232011-02-23 09:23:08 -08003512011-02-23 Roland McGrath <roland@redhat.com>
352
Roland McGrath725aad52011-02-23 19:52:46 -0800353 * readelf.c (section_name): New function.
354 (print_debug_abbrev_section): Use it instead of constant.
355 (print_debug_aranges_section): Likewise.
356 (print_debug_ranges_section): Likewise.
357 (print_debug_units): Likewise.
358 (print_debug_line_section): Likewise.
359 (print_debug_loc_section): Likewise.
360 (print_debug_macinfo_section): Likewise.
361 (print_debug_pubnames_section): Likewise.
362 (print_debug_str_section): Likewise.
363 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
364 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
365 (print_debug_str_section): Likewise.
366
Roland McGrath47c53232011-02-23 09:23:08 -0800367 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
368
Roland McGrath1fb9c912011-02-11 10:32:30 -08003692011-02-11 Roland McGrath <roland@redhat.com>
370
Roland McGrath4a14ef72011-02-11 10:42:45 -0800371 * elfcmp.c (verbose): New variable.
372 (options, parse_opt): Grok -l/--verbose to set it.
373 (main): Under -l, keep going after first difference.
374
Roland McGrath1fb9c912011-02-11 10:32:30 -0800375 * elfcmp.c (ignore_build_id): New variable.
376 (options, parse_opt): Grok --ignore-build-id to set it.
377 (main): For SHT_NOTE sections, compare note details rather than raw
378 bytes. Under --ignore-build-id, don't complain about differing build
379 ID contents if lengths match.
380
Roland McGrathfd992542011-02-08 19:45:12 -08003812011-02-08 Roland McGrath <roland@redhat.com>
382
Roland McGrath240784b2011-02-08 19:48:42 -0800383 * ldscript.y (filename_id_star): Remove unused variable.
384
Roland McGrath8f6c1792011-02-08 19:48:02 -0800385 * unstrip.c (copy_elided_sections): Remove unused variable.
386
Roland McGrath4db89f02011-02-08 19:46:50 -0800387 * elflint.c (check_dynamic): Remove unused variables.
388
Roland McGrath33231312011-02-08 19:45:26 -0800389 * elflint.c (check_symtab): Warn about missing xndx section only once.
390
Roland McGrathfd992542011-02-08 19:45:12 -0800391 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
392
Roland McGrathf151b7d2011-01-06 12:14:43 -08003932011-01-06 Roland McGrath <roland@redhat.com>
394
395 * strip.c (handle_elf): Under --strip-sections, remove all
396 non-allocated sections and never generate .gnu_debuglink.
397
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08003982011-01-04 Roland McGrath <roland@redhat.com>
399
400 * strip.c (remove_shdrs): New variable.
401 (options, parse_opt): Grok --strip-sections to set it.
402 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
403
Roland McGrath77221de2010-11-10 19:47:31 -08004042010-11-10 Roland McGrath <roland@redhat.com>
405
406 * findtextrel.c (process_file): Don't assume order of sections.
407 Reported by Mike Hommey <mh@glandium.org>.
408
Roland McGrath932585d2010-05-08 04:01:14 -07004092010-07-26 Roland McGrath <roland@redhat.com>
410
411 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
412
Roland McGratha1599152010-08-30 04:04:37 -07004132010-08-30 Roland McGrath <roland@redhat.com>
414
Roland McGrathfa144952010-08-30 19:22:41 -0700415 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
416 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
417 for ranges, loc.
418 (struct listptr, struct listptr_table): New types.
419 (compare_listptr, reset_listptr, sort_listptr): New functions.
420 (notice_listptr, skip_listptr_hole): New functions.
421 (struct attrcb_args): Add silent member.
422 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
423 Suppress output if silent, but still call notice_listptr.
424 (print_debug_units): Suppress output if section_info not requested.
425 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
426 (print_debug_ranges_section): Likewise.
427 (print_debug): Call reset_listptr on both tables.
428
429 * readelf.c (print_debug_ranges_section): Print empty list.
430 (print_debug_loc_section): Likewise.
431
Roland McGratha1599152010-08-30 04:04:37 -0700432 * readelf.c (print_debug_loc_section): Check for bogus length
433 before calling print_ops.
434 (print_ops): Check harder for bogus data that would read off end.
435
Roland McGrathf4763cf2010-08-11 13:04:12 -07004362010-08-11 Roland McGrath <roland@redhat.com>
437
438 * readelf.c (for_each_section_argument): Process all sections with
439 matching name, not just the first.
440
Roland McGrath52604ba2010-07-26 21:29:44 -07004412010-07-26 Roland McGrath <roland@redhat.com>
442
443 * readelf.c (print_ops): Take new argument for CU version.
444 Fix DW_OP_call_ref decoding to depend on it.
445 (print_debug_loc_section): Update caller.
446 (print_cfa_program): Take new argument, pass it down.
447 (print_debug_frame_section): Update caller.
448 (struct attrcb_args): New member version.
449 (print_debug_units): Initialize it.
450
Roland McGrath2f14a312010-07-02 11:16:25 -07004512010-07-02 Roland McGrath <roland@redhat.com>
452
453 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
454 initial_location.
455
Roland McGrathb6458032010-06-30 11:57:19 -07004562010-06-30 Roland McGrath <roland@redhat.com>
457
458 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
459 Ignore st_size for a non-S_ISREG file descriptor.
460 (read_block): Move assert after no-mmap bail-out.
461 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
462
Roland McGrathfa799902010-06-22 13:05:23 -07004632010-06-22 Roland McGrath <roland@redhat.com>
464
465 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
466
Roland McGrath0c5638c2010-06-21 23:00:35 -07004672010-06-21 Roland McGrath <roland@redhat.com>
468
469 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700470 (dwarf_attr_string): Add new attributes.
471 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700472
473 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
474 (print_cfa_program): Likewise.
475
Roland McGrathe5251a12010-06-20 16:59:39 -07004762010-06-20 Roland McGrath <roland@redhat.com>
477
Roland McGrath2b1f0952010-06-20 17:55:50 -0700478 * readelf.c (print_debug_units): New function, broken out of ...
479 (print_debug_info_section): ... here. Call it.
480 (print_debug_types_section): New function.
481 (enum section_e): Add section_types alias for section_info.
482 (print_debug): Add types to the sections table.
483
Roland McGrath599f7f52010-06-20 17:12:43 -0700484 * readelf.c (print_debug_frame_section): Handle version 4 format.
485
Roland McGrathe5251a12010-06-20 16:59:39 -0700486 * readelf.c (print_debug_line_section): Handle version 4 format.
487
Roland McGrathec86e5f2010-06-14 17:44:38 -07004882010-06-14 Roland McGrath <roland@redhat.com>
489
490 * unstrip.c (copy_elided_sections): Make sure all sections' data have
491 been read in before we write anything out.
492
Roland McGrath3b1b6512010-06-04 02:26:30 -07004932010-06-04 Roland McGrath <roland@redhat.com>
494
Roland McGrathaa32f922010-06-04 02:29:08 -0700495 * unstrip.c (update_shdr): New function.
496 (update_sh_size): Call it instead of gelf_update_shdr.
497 (adjust_relocs, add_new_section_symbols): Likewise.
498 (new_shstrtab, copy_elided_sections): Likewise.
499
Roland McGrath3b1b6512010-06-04 02:26:30 -0700500 * unstrip.c (copy_elided_sections): Bail if stripped file has more
501 sections than unstripped file, rather than getting confused later.
502
Roland McGrath7a5bed82010-06-01 13:44:00 -07005032010-06-01 Roland McGrath <roland@redhat.com>
504
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700505 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
506 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700507 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700508
Roland McGrath7a5bed82010-06-01 13:44:00 -0700509 * readelf.c (print_debug): Don't bail if libdw setup fails.
510 Suppress complaint if we only want .eh_frame anyway.
511
Ulrich Drepper173ade82010-05-28 07:39:49 -07005122010-05-28 Ulrich Drepper <drepper@redhat.com>
513
514 * readelf.c (attr_callback): Also print form information.
515
Roland McGrath12e3d1f2010-05-19 18:03:31 -07005162010-05-19 Roland McGrath <roland@redhat.com>
517
518 * addr2line.c (find_symbol): Short-circuit on empty name.
519 (handle_address): Handle SYMBOL with no +OFFSET.
520
Roland McGrath688f7fc2010-05-08 03:22:59 -07005212010-05-08 Roland McGrath <roland@redhat.com>
522
523 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
524 Use that for DW_OP_call_ref, not ADDRSIZE.
525 (print_cfa_program): Update caller.
526 (struct attrcb_args): Add offset_size field.
527 (attr_callback): Use it for print_ops call.
528 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -0700529 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -0700530
Roland McGrath62b28b62010-04-14 11:54:06 -07005312010-04-14 Roland McGrath <roland@redhat.com>
532
533 * readelf.c (handle_core_item): Fix bitmask printing.
534
Roland McGrath3b495d82010-04-06 12:58:32 -07005352010-04-06 Roland McGrath <roland@redhat.com>
536
537 * ld.c (options): Fix some typos in messages.
538 * elflint.c (check_scn_group, check_group): Likewise.
539 * ldscript.y (add_id_list): Likewise.
540 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
541 before translated string containing a literal %.
542
Roland McGrath890081b2010-02-26 17:57:50 -08005432010-02-26 Roland McGrath <roland@redhat.com>
544
545 * readelf.c (process_file): Don't leak an fd in failure case.
546
Roland McGrathc2b26f12010-02-15 15:16:15 -08005472010-02-15 Roland McGrath <roland@redhat.com>
548
Roland McGrath22359e22010-02-15 15:57:03 -0800549 * Makefile.am: Use config/eu.am for common stuff.
550
Roland McGrathc2b26f12010-02-15 15:16:15 -0800551 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
552 mismatch in comparison.
553
Roland McGrathf920fd52010-02-02 15:50:15 -08005542010-02-02 Roland McGrath <roland@redhat.com>
555
556 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
557 (read_encoded): Likewise.
558 (print_debug_frame_section): Check for bogus augmentation length.
559 For P augmentation, use read_encoded, print the encoding description,
560 and use hex for unsigned values.
561
Roland McGrathb337b1f2010-01-15 01:02:27 -08005622010-01-15 Roland McGrath <roland@redhat.com>
563
564 * ar.c: Include <sys/stat.h>.
565 * elflint.c: Likewise.
566 * readelf.c: Likewise.
567 * strip.c: Likewise.
568 * unstrip.c: Likewise
569
Roland McGrathbd733ca2010-01-07 20:11:42 -08005702010-01-07 Roland McGrath <roland@redhat.com>
571
Roland McGrath8111da02010-01-07 20:31:59 -0800572 * readelf.c (print_ehdr): Handle PN_XNUM.
573 (phnum): New static variable.
574 (process_elf_file): Set it with elf_getphdrnum.
575 (print_phdr): Use phnum instead of EHDR->e_phnum.
576 (print_dynamic, handle_notes): Likewise.
577 (handle_relocs_rel, handle_relocs_rela): Likewise.
578
Roland McGrathbd733ca2010-01-07 20:11:42 -0800579 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
580
581 * elflint.c (phnum): New static variable.
582 (check_elf_header): Set it, handling PN_XNUM.
583 Use that in place of EHDR->e_phnum throughout.
584 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
585 (unknown_dependency_p, check_sections, check_program_header): Likewise.
586
Roland McGrath019d9fb2010-01-05 13:36:07 -08005872010-01-05 Roland McGrath <roland@redhat.com>
588
589 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
590 DW_AT_GNU_template_name.
591
Roland McGrathe4061d02010-01-04 20:25:09 -08005922010-01-04 Roland McGrath <roland@redhat.com>
593
Roland McGrath0ccbbcd2010-01-04 21:59:07 -0800594 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
595 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
596 (handle_core_item): Handle .format of '\n' as \n-separated strings.
597
Roland McGrath2e79deb2010-01-04 20:36:10 -0800598 * readelf.c (implicit_debug_sections): New variable.
599 (parse_opt): Set it instead of print_debug_sections for -a.
600 OR them together for print_debug check.
601 (print_debug): OR them together for section check.
602
Roland McGratha7422be2010-01-04 20:29:33 -0800603 * readelf.c (options): Repartition into set implied by -a and others.
604 Correct -a text to match reality.
605
Roland McGrathe4061d02010-01-04 20:25:09 -0800606 * readelf.c (struct section_argument): Add bool member 'implicit'.
607 (parse_opt): Set it for -a cases, clear it for -x args.
608 (for_each_section_argument): Don't complain about a missing section by
609 name if it's implicit.
610
Roland McGrathefa64962009-11-16 01:50:58 -08006112009-11-16 Roland McGrath <roland@redhat.com>
612
613 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
614 sections, just as dump_data_section already does.
615
Mark Wielaardc49d00a2009-09-21 16:47:07 -07006162009-09-21 Ulrich Drepper <drepper@redhat.com>
617
618 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
619 set for .comment section.
620 Patch by Mark Wielaard <mjw@redhat.com>.
621
Roland McGrathfb33c672009-09-08 00:21:18 -07006222009-09-08 Roland McGrath <roland@redhat.com>
623
624 * ar.c (main): Fix typo in message format.
625
Roland McGrath2d13ea22009-08-21 03:16:32 -07006262009-08-21 Roland McGrath <roland@redhat.com>
627
628 * readelf.c (attr_callback): Use print_block only when we don't use
629 print_ops.
630
Roland McGrath536127f2009-08-14 13:10:09 -07006312009-08-14 Roland McGrath <roland@redhat.com>
632
633 * ar.c (do_oper_extract): Use pathconf instead of statfs.
634
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -07006352009-08-01 Ulrich Drepper <drepper@redhat.com>
636
637 * debugpred.h: Add two most const.
638
Mark Wielaardbc1b92e2009-07-26 08:33:18 -07006392009-07-26 Mark Wielaard <mjw@redhat.com>
640
641 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
642
Mark Wielaard79178202009-07-25 12:44:46 -07006432009-07-25 Mark Wielaard <mjw@redhat.com>
644
645 * Makefile.am (addr2line_LDADD): Add $(libelf).
646
Roland McGrathbe4589d2009-07-24 16:23:12 -07006472009-07-24 Roland McGrath <roland@redhat.com>
648
649 * readelf.c (print_block): New function.
650 (print_ops): Use it.
651 (attr_callback): Use it for DW_FORM_block* forms.
652
Mark Wielaarddaf85b22009-07-24 15:49:51 -07006532009-07-20 Mark Wielaard <mjw@redhat.com>
654
655 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
656 and DW_OP_stack_value.
657
Ulrich Drepper96d950e2009-07-14 10:42:01 -07006582009-07-14 Ulrich Drepper <drepper@redhat.com>
659
660 * elflint.c (check_elf_header): Allow Linux ABI.
661 (check_symtab): Handle STB_GNU_UNIQUE.
662
Mark Wielaardf735db12009-07-08 19:18:53 +02006632009-07-08 Mark Wielaard <mjw@redhat.com>
664
665 * readelf.c (attr_callback): Handle DW_Form constants for
666 DW_AT_data_member_location.
667
Roland McGrathdffc33d2009-07-06 16:06:41 -07006682009-07-06 Roland McGrath <roland@redhat.com>
669
670 * readelf.c (register_info): New function. Handle unknown register #s.
671 (print_cfa_program): Use it.
672 (handle_core_register, handle_core_registers): Likewise.
673
Roland McGrath5dbccdb2009-06-28 14:48:02 -07006742009-06-28 Roland McGrath <roland@redhat.com>
675
676 * readelf.c (print_address_names): New static variable.
677 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
678 (format_dwarf_addr): Don't look up name if !print_address_names.
679
Ulrich Drepperf1894932009-06-13 15:55:42 -07006802009-06-13 Ulrich Drepper <drepper@redhat.com>
681
682 * ldgeneric.c: Don't use deprecated libelf functions.
683 * nm.c: Likewise.
684 * objdump.c: Likewise.
685 * readelf.c: Likewise.
686 * size.c: Likewise.
687 * strip.c: Likewise.
688 * unstrip.c: Likewise.
689 * ld.h: Fix up comment.
690
Ulrich Drepperb47d2902009-06-01 07:38:32 -07006912009-06-01 Ulrich Drepper <drepper@redhat.com>
692
693 * readelf.c (print_relocs): Expect ELF header argument and pass on
694 to handle_relocs_rel* functions. Adjust caller.
695 (handle_relocs_rel): Add ELF header argument. Add special case for
696 the IRELATIVE relocations in statically linked executables.
697 (handle_relocs_rela): Likewise.
698
Roland McGrathdb19f0b2009-05-07 18:44:27 -07006992009-04-29 Ulrich Drepper <drepper@redhat.com>
700
701 * elflint.c (check_symtab): Add tests of st_other field.
702
Ulrich Drepperaab90f92009-04-23 07:44:36 -07007032009-04-23 Ulrich Drepper <drepper@redhat.com>
704
705 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
706
Roland McGrathd86e1832009-04-20 00:49:33 -07007072009-04-20 Roland McGrath <roland@redhat.com>
708
Roland McGrath8a592412009-04-20 01:20:44 -0700709 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
710 of inline call sites.
711
Roland McGrathd86e1832009-04-20 00:49:33 -0700712 * addr2line.c (just_section): New variable.
713 (adjust_to_section): New function, broken out of ...
714 (handle_address): ... here.
715 (options, parse_opt): Add -j/--section=NAME to set it.
716
Roland McGrath2fb90512009-04-15 14:47:13 -07007172009-04-15 Roland McGrath <roland@redhat.com>
718
719 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
720 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
721
Roland McGrath04a14162009-04-14 01:02:17 -07007222009-04-14 Roland McGrath <roland@redhat.com>
723
Roland McGratheb9ba472009-04-14 18:44:45 -0700724 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
725 like SHT_GNU_ATTRIBUTES.
726
Roland McGrath94f43832009-04-14 04:39:32 -0700727 * readelf.c (handle_core_registers): Fix error message.
728
Roland McGrath04a14162009-04-14 01:02:17 -0700729 * strip.c (handle_elf: check_preserved): Don't note any change when
730 .debug_data is already filled from a previous pass.
731
Ulrich Drepper411cdb22009-02-05 22:04:26 -08007322009-02-05 Ulrich Drepper <drepper@redhat.com>
733
Ulrich Drepper51b3f472009-02-05 22:10:39 -0800734 * objdump.c (show_relocs_x): Minor cleanups.
735
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800736 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -0800737 Print first DW_CFA_expression and DW_CFA_val_expression parameter
738 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800739
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08007402009-02-01 Ulrich Drepper <drepper@redhat.com>
741
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800742 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
743 into ...
744 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -0800745 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -0800746
Ulrich Dreppercbb422e2009-02-01 18:18:55 -0800747 * objdump.c (show_relocs_rela): Show offsets as signed values.
748
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800749 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
750 Improve some error messages.
751 Use program_invocation_short_name instead of AR macro.
752 * Makefile.am (CFLAGS_ar): Remove.
753 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
754 * objdump.c (parse_opt): Likewise.
755 * readelf.c (parse_opt): Likewise.
756
Roland McGrath51f01282009-01-27 17:08:03 -08007572009-01-27 Roland McGrath <roland@redhat.com>
758
759 * readelf.c (print_ops): Notice short length, don't overrun buffer
760 (still need to fix LEB128).
761
762 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
763
764 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
765
Ulrich Drepper62c46532009-01-24 17:01:08 -08007662009-01-24 Ulrich Drepper <drepper@redhat.com>
767
768 * readelf.c (print_debug_frame_section): Fix computation of vma_base
769 for PC-relative mode.
770
Ulrich Drepperd7285e12009-01-23 16:10:44 -08007712009-01-23 Ulrich Drepper <drepper@redhat.com>
772
Ulrich Drepperccccab02009-01-23 16:32:21 -0800773 * size.c (process_file): When handling archive, close file descriptor
774 here. For unknown file format also close file descriptor.
775 (handle_ar): Don't close file descriptor here.
776
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800777 * readelf.c (parse_opt): Move code to add to dump_data_sections and
778 string_sections list in local function add_dump_section. Adjust 'x'
779 key handling. For 'a' key add .strtab, .dynstr, and .comment section
780 to string_sections list.
781
Roland McGrathe9de9b42009-01-22 13:05:40 -08007822009-01-22 Roland McGrath <roland@redhat.com>
783
Roland McGrath9a847e12009-01-22 19:55:00 -0800784 * readelf.c (print_phdr): Don't print section mapping when no sections.
785
Roland McGrathd759aa62009-01-22 19:17:07 -0800786 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
787
Roland McGrathcabeeee2009-01-22 13:17:45 -0800788 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
789 and reset it only for the 'true' cases.
790
791 * Makefile.am (addr2line_no_Wformat): New variable.
792
Roland McGrathe9de9b42009-01-22 13:05:40 -0800793 * readelf.c (print_debug_frame_section): Use t instead of j formats
794 for ptrdiff_t OFFSET.
795
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08007962009-01-21 Ulrich Drepper <drepper@redhat.com>
797
798 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800799 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800800 (check_exception_data): First sanity test.
801
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08008022009-01-17 Ulrich Drepper <drepper@redhat.com>
803
Ulrich Drepper935edde2009-01-17 16:06:42 -0800804 * readelf.c (print_debug_exception_table): Show target of ar_disp
805 field.
806
807 * elflint.c (check_program_header): Add most consistency checks for
808 PT_GNU_EH_FRAME entry.
809
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800810 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
811 ARGP_PROGRAM_BUG_ADDRESS_DEF.
812 * ar.c: Likewise.
813 * elfcmp.c: Likewise.
814 * elflint.c: Likewise.
815 * findtextrel.c: Likewise.
816 * ld.c: Likewise.
817 * nm.c: Likewise.
818 * objdump.c: Likewise.
819 * ranlib.c: Likewise.
820 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800821
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800822 * size.c: Likewise.
823 * strings.c: Likewise.
824 * strip.c: Likewise.
825 * unstrip.c: Likewise.
826
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08008272009-01-16 Ulrich Drepper <drepper@redhat.com>
828
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800829 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
830 matches .eh_frame_hdr section, if it is available. Also check that
831 the segment is allocated, not writable, not executable.
832
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800833 * readelf.c: Add -e option. Dump exception and unwind related
834 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800835 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800836 (print_debug_exception_table): Beginning of support.
837 (print_debug): Hook up print_debug_exception_table for
838 .gcc_except_table sections.
839
840 * readelf.c (print_debug_frame_section): Some fixes for last change.
841
Ulrich Drepper351bf202009-01-15 20:18:40 -08008422009-01-15 Ulrich Drepper <drepper@redhat.com>
843
844 * readelf.c (print_encoding): Now a toplevel function.
845 (print_relinfo): Likewise.
846 (print_encoding_base): Broken out of print_debug_frame_section.
847 (print_debug_frame_section): Print different header for .eh_frame
848 sections. Fix recognition of matching CIEs in .debug_frame sections.
849 Print absolute offset for PC-relative FDE locations. Don't print
850 table header for FDEs if the table is empty.
851 (read_encoded): New function.
852 (print_debug_frame_hdr_section): New function.
853 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
854 sections.
855
856 * readelf.c (handle_relocs_rel): Print section number.
857 (print_debug_abbrev_section): Likewise.
858 (print_debug_aranges_section): Likewise.
859 (print_debug_ranges_section): Likewise.
860 (print_debug_info_section): Likewise.
861 (print_debug_line_section): Likewise.
862 (print_debug_loc_section): Likewise.
863 (print_debug_macinfo_section): Likewise.
864 (print_debug_pubnames_section): Likewise.
865 (print_debug_str_section): Likewise.
866
Ulrich Drepper8b394632009-01-10 18:29:56 -08008672009-01-10 Ulrich Drepper <drepper@redhat.com>
868
869 * strings.c (read_block): Fix typo in error message string.
870
Ulrich Drepper87cf5832009-01-07 20:39:21 -08008712009-01-07 Ulrich Drepper <drepper@redhat.com>
872
873 * ld.c (ld_new_searchdir): Fix adding to search path list.
874
Ulrich Drepperac194d02009-01-06 00:30:01 -08008752009-01-06 Ulrich Drepper <drepper@redhat.com>
876
877 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800878
Roland McGrath3614d992009-01-05 18:05:32 -08008792009-01-05 Roland McGrath <roland@redhat.com>
880
881 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
882 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800883
Ulrich Drepper44173ed2009-01-01 19:00:41 -08008842009-01-01 Ulrich Drepper <drepper@redhat.com>
885
886 * addr2line.c: Update copyright year.
887 * ar.c: Likewise.
888 * elfcmp.c: Likewise.
889 * elflint.c: Likewise.
890 * findtextrel.c: Likewise.
891 * ld.c: Likewise.
892 * nm.c: Likewise.
893 * objdump.c: Likewise.
894 * ranlib.c: Likewise.
895 * readelf.c: Likewise.
896 * size.c: Likewise.
897 * strings.c: Likewise.
898 * strip.c: Likewise.
899 * unstrip.c: Likewise.
900
Roland McGrath468fe4d2008-12-11 21:00:12 -08009012008-12-11 Roland McGrath <roland@redhat.com>
902
903 * nm.c (sym_name): New function.
904 (show_symbols_sysv): Use it in place of elf_strptr.
905 (show_symbols_bsd, show_symbols_posix): Likewise.
906 Fixes RHBZ#476136.
907
908 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
909 elf_strptr fails.
910
Roland McGratha845f682008-12-03 03:41:58 +00009112008-12-02 Roland McGrath <roland@redhat.com>
912
913 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
914 nonzero OFFSET argument to dwfl_getmodules.
915
Roland McGrath1d8bb252008-08-07 08:39:41 +00009162008-08-07 Roland McGrath <roland@redhat.com>
917
918 * addr2line.c (main): Pass string to handle_address.
919 (see_one_module): New function, subroutine of handle_address.
920 (find_symbol): Likewise.
921 (handle_address): Take string argument rather than address.
922 Convert plain number, or handle strings like "(section)+offset"
923 or "symbol+offset".
924
9252008-08-01 Roland McGrath <roland@redhat.com>
926
927 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
928 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
929
930 * readelf.c (convert): Take new argument SIZE.
931 (handle_core_register, handle_core_item): Update callers.
932 (handle_core_item): Take new arg REPEATED_SIZE.
933 (handle_core_items): Special case for a singleton item,
934 let handle_core_item handle repeats if it wants to.
935
936 * readelf.c (handle_core_items): Give abridged output
937 for identical groups repeated more than twice.
938
9392008-07-04 Roland McGrath <roland@redhat.com>
940
941 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
942
Roland McGrath521c47d2008-04-11 07:01:58 +00009432008-04-10 Roland McGrath <roland@redhat.com>
944
945 * strip.c (handle_elf): Don't keep sections that kept symbol tables
946 refer to. Instead, just be sure to preserve the original symbol
947 table in the debug file so those symbols go with their sections and
948 can be elided from the stripped version of the symbol table.
949
950 * strip.c (handle_elf): When a discarded section kept in the debug
951 file refers to a nondiscard section via sh_link/sh_info, preserve
952 that nondiscarded section unmodified in the debug file as well.
953 Skip adjustment of discarded sections symbol table references when
954 that symbol table is copied in this way.
955
956 * elflint.c (check_symtab): Don't crash from missing symbol names
957 after diagnosing bogus strtab.
958
959 * strip.c (handle_elf): Cosmetic cleanup in special section contents
960 adjustment for symtab changes.
961
Roland McGrath13b69602008-04-01 02:30:05 +00009622008-03-31 Roland McGrath <roland@redhat.com>
963
964 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
965 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
966 excuse a special section.
967
9682008-03-27 Roland McGrath <roland@redhat.com>
969
970 * elflint.c (check_sections): Check that executability and writability
971 of sections is reflected in segment p_flags.
972
Roland McGrathd11f9cb2008-03-26 20:51:59 +00009732008-03-26 Roland McGrath <roland@redhat.com>
974
975 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
976 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
977 is valid in RELRO.
978
Roland McGrath47c5c352008-02-29 10:17:16 +00009792008-02-29 Roland McGrath <roland@redhat.com>
980
981 * readelf.c (print_attributes): Add a cast.
982 * elflint.c (check_attributes): Likewise.
983
984 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
985 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
986 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
987
Ulrich Drepper834de6f2008-02-23 06:50:01 +00009882008-02-03 Ulrich Drepper <drepper@redhat.com>
989
990 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
991 when linked into executable.
992 (elf_i386_create_relocations): Likewise.
993
Roland McGrath059c83e2008-02-21 06:19:39 +00009942008-02-20 Roland McGrath <roland@redhat.com>
995
996 * readelf.c (print_attributes): New function.
997 (process_elf_file): Call it under -A.
998
999 * elflint.c (check_attributes): Implement it for real.
1000
10012008-02-19 Roland McGrath <roland@redhat.com>
1002
1003 * elflint.c (special_sections): Handle .gnu.attributes section.
1004 (check_sections): Likewise.
1005 (check_attributes): New function.
1006
10072008-02-10 Roland McGrath <roland@redhat.com>
1008
1009 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1010 sections and ET_REL files.
1011
Ulrich Drepper712d78e2008-02-02 10:01:53 +000010122008-02-02 Ulrich Drepper <drepper@redhat.com>
1013
1014 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1015 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1016 and R_386_TLS_LE.
1017 (elf_i386_create_relocations): Likewise.
1018 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1019 elements.
1020 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1021 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1022 Fix generation of PT_GNU_STACK entry.
1023
Ulrich Drepperc54785a2008-02-01 18:05:21 +000010242008-02-01 Ulrich Drepper <drepper@redhat.com>
1025
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001026 * ld.c (replace_args): Prevent loop over replacements if the parameter
1027 is only two characters long.
1028
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001029 * ld.c: Recognize sha1 argument for --build-id parameter.
1030 * ldgeneric.c (create_build_id_section): Handle sha1.
1031 (compute_hash_sum): New function. Broken out of compute_build_id.
1032 Take hash function and context as parameters.
1033 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1034 implementation.
1035
Ulrich Drepper89759c72008-01-31 19:44:12 +000010362008-01-31 Ulrich Drepper <drepper@redhat.com>
1037
1038 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1039 * ld.c: Recognize --build-id command line parameter.
1040 * ld.h: Define scn_dot_note_gnu_build_id.
1041 (struct ld_state): Add build_id and buildidscnidx elements.
1042 * ldgeneric.c: Implement --build-id command line parameter.
1043 * ldlex.l (ID): Recognize - as valid character after the first one.
1044
Ulrich Drepper5530ec52008-01-29 10:42:07 +000010452008-01-29 Ulrich Drepper <drepper@redhat.com>
1046
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001047 * ld.c (replace_args): New function.
1048 (main): Use it to rewrite old-style parameters.
1049
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001050 * elf32-i386.script: Add .gnu.hash section.
1051 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1052 (fillin_special_symbol): Initialize st_size.
1053 (sortfct_hashval): New function.
1054 (create_gnu_hash): New function.
1055 (create_hash): New function.
1056 (ld_generic_create_outfile): Use the new functions to create the
1057 hash tables.
1058
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001059 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1060
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000010612008-01-24 Ulrich Drepper <drepper@redhat.com>
1062
1063 * elflint.c (check_group): Check that signature symbol for section
1064 group is not an empty string.
1065 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1066 section. Start implementation of --hash-style.
1067 * i386_ld.c: Likewise.
1068 * ld.c: Recognize --hash-style.
1069 * ld.h (struct scninfo): Add comdat_group.
1070 Add additional parameter to finalize_plt callback.
1071
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000010722008-01-22 Ulrich Drepper <drepper@redhat.com>
1073
1074 * ld.h (struct callbacks): Add initialize_gotplt.
1075 (struct scnhead): Add scn_dot_gotplt.
1076 (struct ld_state): Add gotpltscnidx.
1077 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1078 (elf_i386_initialize_pltrel): Likewise.
1079 (elf_i386_initialize_got): There is now a separate .got.plt, so
1080 don't do the PLT-related work here. Initialize d_type.
1081 (elf_i386_initialize_gotplt): New function.
1082 (elf_i386_plt0): Use ud2a after indirect jump.
1083 (elf_i386_pic_plt0_entry): Likewise.
1084 (elf_i386_finalize_plt): Reference now .got.plt.
1085 (elf_i386_count_relocations): For GOT entries which need no relocation
1086 don't bump nrel_got.
1087 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1088 handling for split .got/.got.plt.
1089 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1090 * elf32-i386.script: Sort sections for security. There are no .got
1091 input sections. Add .got.plt.
1092 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1093 (ld_generic_create_outfile): Initialize .got.plt section.
1094 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1095
Ulrich Drepperd9488292008-01-20 16:43:15 +000010962008-01-19 Ulrich Drepper <drepper@redhat.com>
1097
1098 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1099 symbols are not carried over into statically linked output files.
1100 Add dummy entries for more TLS relocations.
1101
1102 * ld.c (options): Add long names for -( and -).
1103
1104 * ldgeneric.c (check_definition): For newly found definitions don't
1105 mark section as used if symbol is absolute.
1106 (extract_from_archive): Only assign archive sequence number the first
1107 time the archive is handled. Update ld_state.last_archive_used
1108 if any symbol was used. Remove nround variable.
1109 (file_process2): When using symbol from an archive, update
1110 ld_state.group_start_archive, ld_state.archives, and
1111 ld_state.tailarchives.
1112 (ld_generic_file_process): If group is not handled anymore, after
1113 freeing ELF handles for the archives, clear ld_state.archives and
1114 *nextp. Fix wrong logic in recognizing first iteration of group
1115 loop. When clearing flags, also clear ld_state.group_start_archive.
1116
Ulrich Drepper5eee1222008-01-11 10:12:18 +000011172008-01-11 Ulrich Drepper <drepper@redhat.com>
1118
1119 * objdump.c (show_disasm): Adjust disassembler format string for
1120 removal of %e.
1121
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000011222008-01-04 Roland McGrath <roland@redhat.com>
1123
Roland McGrath059c83e2008-02-21 06:19:39 +00001124 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1125 a size greater than the items cover means multiple sets of items.
1126 (handle_core_note): Update caller.
1127
11282008-01-04 Roland McGrath <roland@redhat.com>
1129
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001130 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1131
11322008-01-03 Roland McGrath <roland@redhat.com>
1133
1134 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1135
1136 * elflint.c (check_dynamic): Remove duplicate initializer.
1137
Ulrich Drepperad024af2008-01-02 17:42:52 +000011382008-01-02 Ulrich Drepper <drepper@redhat.com>
1139
1140 * addr2line.c: Update copyright year.
1141 * ar.c: Likewise.
1142 * elfcmp.c: Likewise.
1143 * elflint.c: Likewise.
1144 * findtextrel.c: Likewise.
1145 * ld.c: Likewise.
1146 * nm.c: Likewise.
1147 * objdump.c: Likewise.
1148 * ranlib.c: Likewise.
1149 * readelf.c: Likewise.
1150 * size.c: Likewise.
1151 * strings.c: Likewise.
1152 * strip.c: Likewise.
1153 * unstrip.c: Likewise.
1154
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000011552007-12-30 Ulrich Drepper <drepper@redhat.com>
1156
1157 * objdump (show_disasm): Use %e after third parameter.
1158
11592007-12-21 Ulrich Drepper <drepper@redhat.com>
1160
1161 * strip.c: Fix wrong parenthesis in a few branch predictions.
1162 * strings.c: Likewise.
1163
11642007-12-20 Ulrich Drepper <drepper@redhat.com>
1165
1166 * Makefile.am (DEFS): Add DEBUGPRED.
1167 * addr2line.c: Include debugpred.h.
1168 * ar.c: Likewise.
1169 * elfcmp.c: Likewise.
1170 * elflint.c: Likewise.
1171 * findtextrel.c: Likewise.
1172 * nm.c: Likewise.
1173 * objdump.c: Likewise.
1174 * ranlib.c: Likewise.
1175 * readelf.c: Likewise.
1176 * size.c: Likewise.
1177 * strings.c: Likewise.
1178 * strip.c: Likewise.
1179 * unstrip.c: Likewise.
1180 * debugpred.h: New file.
1181
1182 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1183 (handle_relocs_rela): Likewise.
1184
1185 * readelf.c: Add lots of likely/unlikely.
1186
1187 * elflint.c: Minor cleanups.
1188
Roland McGrath1a2e8f42007-12-15 23:39:34 +000011892007-11-19 Roland McGrath <roland@redhat.com>
1190
1191 * readelf.c (print_ops): Handle all bad op codes gracefully.
1192 Print their numbers instead of just ???.
1193
Roland McGrath07a696e2007-11-09 22:44:26 +000011942007-11-09 Roland McGrath <roland@redhat.com>
1195
1196 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00001197 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1198 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1199 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1200 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00001201
Roland McGrathe4c22ea2007-10-23 13:07:39 +000012022007-10-20 Roland McGrath <roland@redhat.com>
1203
1204 * unstrip.c (options): Update -R description.
1205 (struct symbol): Put symbol details a union with a size_t pointer
1206 `duplicate'.
1207 (compare_symbols_output): Use null ->name as marker for discard
1208 symbols, not zero *->map.
1209 (copy_elided_sections): Record forwarding pointers for discarded
1210 duplicates and fill SYMNDX_MAP elements through them.
1211
1212 * readelf.c (process_file): Set offline_next_address to 0 at start.
1213 (struct process_dwflmod_args): New type.
1214 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1215 (process_file): Update caller; dup FD for passing to libdwfl.
1216 (process_elf_file): Take new arg FD. For ET_REL file when
1217 displaying data affected by libdwfl relocation, open a new Elf handle.
1218
12192007-10-17 Roland McGrath <roland@redhat.com>
1220
1221 * readelf.c (print_debug_line_section): For invalid data inside a
1222 unit with plausible length, keep printing at the next unit boundary.
1223
1224 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1225
12262007-10-16 Roland McGrath <roland@redhat.com>
1227
1228 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1229
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000012302007-10-15 Roland McGrath <roland@redhat.com>
1231
1232 * make-debug-archive.in: New file.
1233 * Makefile.am (EXTRA_DIST): Add it.
1234 (make-debug-archive): New target.
1235 (bin_SCRIPTS, CLEANFILES): Add it.
1236
12372007-10-10 Roland McGrath <roland@redhat.com>
1238
1239 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1240 Use it to check MERGE|STRINGS for .debug_str.
1241 (check_sections): Handle exact_or_gnuld.
1242
12432007-10-08 Roland McGrath <roland@redhat.com>
1244
1245 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1246 64-bit struct timeval with 32-bit tv_usec.
1247
12482007-10-07 Roland McGrath <roland@redhat.com>
1249
1250 * readelf.c (check_archive_index): New function.
1251 (process_file): Call it. Change signature to take only fd and name.
1252 Use libdwfl to open the file, then iterate on its modules (multiple
1253 for an archive) to print file name and call process_elf_file.
1254 (main): Update caller. Let process_file do elf_begin.
1255 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1256 (process_elf_file): Take only Dwfl_Module * argument.
1257 Don't print the file name here.
1258 (print_debug_*_section): Take Dwfl_Module * argument.
1259 (print_debug): Likewise. Update caller.
1260 (format_dwarf_addr): New function.
1261 (print_debug_ranges_section): Use it.
1262 (attr_callback): Likewise.
1263 (print_debug_line_section, print_debug_loc_section): Likewise.
1264
1265 * readelf.c (print_debug_ranges_section): Translate all strings.
1266 (print_debug_loc_section): Likewise.
1267
1268 * unstrip.c (copy_elided_sections): Initialize SEC.
1269
1270 * ar.c (do_oper_insert): Put trailing / on short names.
1271
1272 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1273
1274 * arlib2.c (arlib_add_long_name): Adjust for header size.
1275
1276 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1277
1278 * ar.c (do_oper_insert): Use write_retry for padding write.
1279
1280 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1281 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1282 (remember_long_name): New function.
1283 (do_oper_insert): Call it. Correctly use length of basename,
1284 not original name. Don't store long name twice for new member.
1285
12862007-10-06 Roland McGrath <roland@redhat.com>
1287
1288 * elflint.c (check_note): Skip empty segment.
1289 (check_note_section): Skip empty section.
1290
1291 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1292 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1293 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1294 (compare_alloc_sections): Take new arg REL, ignore address if true.
1295 (compare_sections): Likewise, pass it down.
1296 (compare_sections_rel, compare_sections_nonrel): New functions.
1297 (find_alloc_sections_prelink, copy_elided_sections): Use them
1298 instead of compare_sections.
1299 (sections_match): New function, broken out of ...
1300 (find_alloc_section): ... here.
1301 (copy_elided_sections): Reorganize section match-up logic.
1302 Use sections_match for SHF_ALLOC in ET_REL.
1303 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1304
1305 * unstrip.c (add_new_section_symbols): Take new arg REL.
1306 When true, do not update section symbol values.
1307 (collect_symbols): Likewise. Update section symbols with address
1308 of chosen output section, not original section.
1309 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1310
1311 * unstrip.c (compare_alloc_sections): At the same address, preserve
1312 original section order.
1313
1314 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1315 .debug_str, it didn't always have them with older tools.
1316
1317 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1318
13192007-10-05 Roland McGrath <roland@redhat.com>
1320
1321 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1322 ET_REL file.
1323
1324 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1325 SHN_UNDEF as "bad section". Use shndx value in messages.
1326
1327 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1328 for ".debug" so it matches as a prefix.
1329 (IS_KNOWN_SPECIAL): New macro.
1330 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1331 type even under -d, for a .debug* or .shstrtab section.
1332
1333 * readelf.c (print_ops): Use hex for address operand.
1334
13352007-10-04 Roland McGrath <roland@redhat.com>
1336
1337 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1338 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1339 sections mapped to SHN_UNDEF.
1340
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000013412007-10-04 Ulrich Drepper <drepper@redhat.com>
1342
1343 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1344 variable with older glibc versions.
1345 Add some branch prediction.
1346
Roland McGrath59ea7f32007-10-04 08:50:09 +000013472007-10-04 Roland McGrath <roland@redhat.com>
1348
1349 * readelf.c (print_archive_index): New variable.
1350 (options, parse_opt): Accept -c/--archive-index to set it.
1351 (dump_archive_index): New function.
1352 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1353 Call dump_archive_index on archives if set.
1354 (main): Update caller.
1355 (any_control_option): Give it file scope, moved out of ...
1356 (parse_opt): ... here.
1357
13582007-10-03 Roland McGrath <roland@redhat.com>
1359
1360 * unstrip.c (struct arg_info): Add `list' flag.
1361 (options, parse_opt): Grok -n/--list to set it.
1362 (list_module): New function.
1363 (handle_implicit_modules): Call it under -n.
1364
1365 * elflint.c (check_note_section): New function.
1366 (check_sections): Call it for SHT_NOTE.
1367
1368 * readelf.c (handle_notes): Use sections when available.
1369
1370 * elflint.c (check_note_data): New function, broken out of ...
1371 (check_note): ... here. Call it and elf_getdata_rawchunk.
1372
1373 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1374 Use elf_getdata_rawchunk and gelf_getauxv.
1375 (handle_notes_data): New function, broken out of ...
1376 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1377
Roland McGrath241ac022007-10-01 18:21:46 +000013782007-10-01 Roland McGrath <roland@redhat.com>
1379
Roland McGrathac0a16c2007-10-01 18:50:35 +00001380 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1381
Roland McGrath241ac022007-10-01 18:21:46 +00001382 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1383
Roland McGrathc76f0b02007-09-27 07:31:33 +000013842007-09-10 Roland McGrath <roland@redhat.com>
1385
1386 * readelf.c (options): Give -p optional argument, alias --string-dump.
1387 (string_sections, string_sections_tail): New static variables.
1388 (parse_opt): Set them when -p has an argument.
1389 (print_string_section): New function, broken out of ...
1390 (print_strings): ... here. Call it.
1391 (dump_data_section): New function, broken out of ...
1392 (dump_data): ... here. Call it.
1393 (for_each_section_argument): New function, broken out of ...
1394 (dump_data): ... here. Call it.
1395 (dump_strings): New function.
1396
13972007-08-31 Roland McGrath <roland@redhat.com>
1398
1399 * readelf.c (print_strings): Typo fix.
1400
Roland McGrathcb6d8652007-08-23 08:10:54 +000014012007-08-23 Roland McGrath <roland@redhat.com>
1402
1403 * readelf.c (printf_with_wrap): Function removed.
1404 (REGISTER_WRAP_COLUMN): New macro.
1405 (handle_core_register): Use print_core_item instead.
1406 (struct register_info): New type.
1407 (compare_registers, compare_register_sets): New functions.
1408 (register_bitpos, compare_sets_by_info): New functions.
1409 (handle_core_registers): Use those to segregate and sort registers
1410 for display.
1411
1412 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1413 (print_core_item): New function.
1414 (handle_core_item): Use it instead of printf_with_wrap.
1415 (compare_core_items, compare_core_item_groups): New functions.
1416 (handle_core_items): Use them. Sort by group and force line breaks
1417 between groups.
1418
1419 * readelf.c (handle_core_registers, handle_core_items): New functions,
1420 broken out of ...
1421 (handle_core_note): ... here. Call them.
1422
14232007-08-22 Roland McGrath <roland@redhat.com>
1424
1425 * unstrip.c (new_shstrtab): New function, broken out of ...
1426 (copy_elided_sections): ... here.
1427
14282007-08-20 Roland McGrath <roland@redhat.com>
1429
1430 Avoid local function trampolines in nm binary.
1431 * nm.c (sort_by_address): Move to a static function instead of local
1432 inside show_symbols.
1433 (sort_by_name_strtab): New static variable.
1434 (sort_by_name): Use it. Move to a static function instead of local
1435 inside show_symbols.
1436 (show_symbols): Set sort_by_name_strtab.
1437
14382007-08-19 Roland McGrath <roland@redhat.com>
1439
1440 * readelf.c (handle_auxv_note): New function.
1441 (handle_notes): Call it.
1442
1443 * readelf.c (printf_with_wrap, convert): New functions.
1444 (handle_core_item, (handle_core_register): New functions.
1445 (handle_notes): Call those with details from ebl_core_note.
1446
Roland McGrath099dd522007-08-13 22:58:36 +000014472007-08-12 Roland McGrath <roland@redhat.com>
1448
1449 * elflint.c (check_note): Accept type 0 with name "Linux".
1450
1451 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1452
1453 * elflint.c (section_flags_string): Return "none" for 0, not "".
1454
Roland McGrathd8221722007-08-11 21:18:09 +000014552007-08-11 Roland McGrath <roland@redhat.com>
1456
1457 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1458
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000014592007-08-04 Ulrich Drepper <drepper@redhat.com>
1460
1461 * readelf.c (hex_dump): Use isprint to determine whether to print
1462 character itself or full stop character.
1463 (dump_data): No need to check endp for NULL after strtol call.
1464
Roland McGrath60fc84c2007-08-03 21:59:15 +000014652007-08-03 Roland McGrath <roland@redhat.com>
1466
1467 * readelf.c (print_string_sections): New variable.
1468 (options, parse_opt): Handle --strings/-p to set it.
1469 (print_strings): New function.
1470 (process_elf_file): Call it under -p.
1471
1472 * readelf.c (options): Add hidden aliases --segments, --sections,
1473 as taken by binutils readelf.
1474
14752007-08-01 Roland McGrath <roland@redhat.com>
1476
1477 * readelf.c (dump_data_sections, dump_data_sections_tail):
1478 New variables.
1479 (options, parse_opt): Handle --hex-dump/-x, set them.
1480 (hex_dump): New function.
1481 (dump_data): New function, call it.
1482 (process_elf_file): Call it.
1483
14842007-07-25 Roland McGrath <roland@redhat.com>
1485
1486 * addr2line.c (show_symbols): New variable.
1487 (print_addrsym): New function.
1488 (handle_address): Call it.
1489 (options, parse_opt): Handle -S/--symbols.
1490
Ulrich Drepperb0243862007-06-06 00:09:36 +000014912007-06-05 Ulrich Drepper <drepper@redhat.com>
1492
1493 * addr2line.c: Update for latest autoconf header.
1494 * ar.c: Likewise.
1495 * elfcmp.c: Likewise.
1496 * elflint.c: Likewise.
1497 * findtextrel.c: Likewise.
1498 * ld.c: Likewise.
1499 * ldgeneric.c: Likewise.
1500 * nm.c: Likewise.
1501 * objdump.c: Likewise.
1502 * ranlib.c: Likewise.
1503 * readelf.c: Likewise.
1504 * size.c: Likewise.
1505 * strings.c: Likewise.
1506 * strip.c: Likewise.
1507 * unstrip.c: Likewise.
1508
Roland McGrath9aa8ef72007-05-18 08:59:43 +000015092007-05-18 Roland McGrath <roland@redhat.com>
1510
1511 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1512 stripped file, so as not to duplicate a section copied in both.
1513
1514 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1515
15162007-05-17 Roland McGrath <roland@redhat.com>
1517
1518 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1519
1520 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
1521
1522 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
1523 call make_directories here.
1524 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
1525 (handle_dwfl_module): Likewise.
1526 (handle_implicit_modules): Update callers.
1527 (handle_output_dir_module): Likewise. Don't do make_directories here.
1528
1529 * unstrip.c (get_section_name): New function, broken out of ...
1530 (copy_elided_sections): here. Update callers.
1531 (find_alloc_section): Broken out of ...
1532 (copy_elided_sections): ... here. Update caller.
1533 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
1534 update STT_SECTION symbols' st_value fields as a side effect.
1535 (check_symtab_section_symbols): Update caller.
1536 (add_new_section_symbols): Set st_value in symbols added.
1537 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
1538 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
1539 from .bss to .dynbss.
1540 (find_alloc_sections_prelink): New function. Associate debug file
1541 allocated SHT_NOBITS shdrs with stripped moved by prelink via
1542 .gnu.prelink_undo information.
1543 (copy_elided_sections): Call it when we couldn't find every allocated
1544 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
1545 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
1546 (handle_file): Update callers.
1547
1548 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
1549 named ".comment".
1550
1551 * elflint.c (check_sections): Fix association of segments with
1552 sections when p_memsz > p_filesz.
1553
15542007-04-29 Roland McGrath <roland@redhat.com>
1555
1556 * addr2line.c (options, main): Tweak argp group settings to fix
1557 usage output.
1558
15592007-04-28 Roland McGrath <roland@redhat.com>
1560
1561 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
1562 sizes to match sections adjusted in the stripped file.
1563
Roland McGrath4be15242007-04-25 03:09:33 +000015642007-04-24 Roland McGrath <roland@redhat.com>
1565
1566 * elfcmp.c (OPT_HASH_INEXACT): New macro.
1567 (hash_inexact): New variable.
1568 (options, parse_opt): Add --hash-inexact option to set it.
1569 (hash_content_equivalent): New function.
1570 (main): Call it for differing SHT_HASH sections under --hash-inexact.
1571
15722007-04-23 Roland McGrath <roland@redhat.com>
1573
1574 * unstrip.c: New file.
1575 * Makefile.am (bin_PROGRAMS): Add it.
1576 (unstrip_LDADD): New variable.
1577
1578 * strip.c (options): Allow --output for -o.
1579
Ulrich Drepper8b383102007-02-16 00:31:57 +000015802007-02-15 Ulrich Drepper <drepper@redhat.com>
1581
1582 * readelf.c: Remove unused code. Add a few consts.
1583
Ulrich Drepper903c1162007-02-15 19:40:37 +000015842007-02-15 Roland McGrath <roland@redhat.com>
1585
1586 * readelf.c (print_debug): Fix brainos in SHDR test.
1587
Roland McGrathf82a1ec2007-02-06 04:47:44 +000015882007-02-05 Roland McGrath <roland@redhat.com>
1589
1590 * ar.c: Include <limits.h>, since we use LONG_MAX.
1591
Ulrich Drepper0fe63532007-02-05 21:05:51 +000015922007-02-05 Ulrich Drepper <drepper@redhat.com>
1593
Ulrich Drepper8b383102007-02-16 00:31:57 +00001594 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00001595 ignore fchown's return value.
1596 (do_oper_insert): Handle error when writing padding.
1597 * ranlib.c: Add fchown complain work around.
1598
Ulrich Drepper0fe63532007-02-05 21:05:51 +00001599 * arlib.c: Make symtab a global variable. Change all users.
1600 * arlib2.c: Likewise.
1601 * ranlib.c: Likewise.
1602 * ar.c: Likewise.
1603 * arlib.h: Declare it.
1604
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000016052007-01-11 Roland McGrath <roland@redhat.com>
1606
1607 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
1608 SHF_MASKPROC bits separately from generic sh_flags validation.
1609
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000016102007-02-04 Ulrich Drepper <drepper@redhat.com>
1611
1612 * ar.c: New file.
1613 * arlib.c: New file.
1614 * arlib2.c: New file.
1615 * arlib.h: New file.
1616 * Makefile (noinst_LIBRARIES): Add libar.
1617 (libar_a_SOURCES): Define.
1618 (ar_LDADD): Define.
1619 (CFLAGS_ar): Define.
1620 * ranlib.c: Change to use arlib.
1621
1622 * elflint.c (check_symtab): Work around GNU ld bug which omits
1623 sections but not symbols in those sections.
1624
Ulrich Drepperb770cf92007-01-10 21:02:34 +000016252007-01-10 Ulrich Drepper <drepper@redhat.com>
1626
1627 * addr2line.c: Update copyright year.
1628 * elfcmp.c: Likewise.
1629 * elflint.c: Likewise.
1630 * findtextrel.c: Likewise.
1631 * ld.c: Likewise.
1632 * nm.c: Likewise.
1633 * objdump.c: Likewise.
1634 * ranlib.c: Likewise.
1635 * readelf.c: Likewise.
1636 * size.c: Likewise.
1637 * strings.c: Likewise.
1638 * strip.c: Likewise.
1639
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000016402006-12-09 Ulrich Drepper <drepper@redhat.com>
1641
1642 * elflint.c (compare_hash_gnu_hash): New function. Report if the
1643 two hash tables have different content (module expected omission
1644 of undefined symbols).
1645
Roland McGrath8190db62006-12-17 23:56:51 +000016462006-10-31 Roland McGrath <roland@redhat.com>
1647
1648 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00001649 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00001650
16512006-09-19 Jakub Jelinek <jakub@redhat.com>
1652
1653 * strip.c (process_file): Disallow -f on archives.
1654
16552006-10-09 Roland McGrath <roland@redhat.com>
1656
1657 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1658
Roland McGrathc373d852006-10-10 00:25:21 +000016592006-08-29 Roland McGrath <roland@redhat.com>
1660
1661 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1662
1663 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1664 Reported by Christian Aichinger <Greek0@gmx.net>.
1665
1666 * elflint.c (valid_e_machine): Add EM_ALPHA.
1667 Reported by Christian Aichinger <Greek0@gmx.net>.
1668
Ulrich Drepper231c5902006-08-08 22:00:11 +000016692006-08-08 Ulrich Drepper <drepper@redhat.com>
1670
1671 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1672 Keep track of which "high DT" entries are present.
1673 Check that either old or GNU-style hash table is present.
1674 If GNU-style hash table is used a symbol table is mandatory.
1675 Check that if any prelink entry is present all of them are.
1676 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1677 table if they don't refer to functions.
1678
Roland McGrath858b1892006-07-17 08:41:15 +000016792006-07-17 Roland McGrath <roland@redhat.com>
1680
1681 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1682 (add_version): Likewise for argument.
1683 (check_versym): Cast constant to GElf_Versym for comparison.
1684
Roland McGrath4ec807e2006-07-13 03:59:46 +000016852006-07-12 Roland McGrath <roland@redhat.com>
1686
1687 * readelf.c (handle_gnu_hash): Add casts for machines where
1688 Elf32_Word != unsigned int.
1689
Ulrich Drepperdcf61602006-07-12 19:59:02 +000016902006-07-12 Ulrich Drepper <drepper@redhat.com>
1691
1692 * elflint.c (check_sysv_hash64): Fix printf format.
1693
Ulrich Dreppercc415622006-07-12 19:42:23 +000016942006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001695
Ulrich Dreppercc415622006-07-12 19:42:23 +00001696 * addr2line.c (options): English fix in -f doc string.
1697
1698 * addr2line.c (use_comp_dir): New variable.
1699 (options, parse_opt): Grok -A/--absolute to set it.
1700 (handle_address): If set, prepend dwfl_line_comp_dir results to
1701 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001702
Ulrich Drepper28ed8952006-07-07 03:43:47 +000017032006-07-06 Ulrich Drepper <drepper@redhat.com>
1704
1705 * elflint.c: Adjust for latest new hash table format.
1706 * readelf.c: Likewise.
1707
1708 * elflint.c (check_versym): Ignore hidden bit when comparing version
1709 numbers.
1710
17112006-07-05 Ulrich Drepper <drepper@redhat.com>
1712
1713 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1714 discarded COMDAT symbols.
1715
1716 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1717 (elf_i386_create_relocations): Likewise.
1718 * ld.h (struct symbol): Add local and hidden bits.
1719 * ld.c (create_special_section_symbol): These synthsized symbols
1720 are local and hidden.
1721 * ldgeneric.c (file_process2): Check whether input file matches
1722 the emulation.
1723 (fillin_special_symbol): Create symbols as local and/or hidden
1724 if requested.
1725 (ld_generic_create_outfile): Make local copy of symbol.
1726 Don't hide global, defined symbols in dynamic symbol table unless
1727 requested. Synthetic symbols have no version information.
1728
1729 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1730 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1731
17322006-07-04 Ulrich Drepper <drepper@redhat.com>
1733
1734 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1735 testing.
1736
17372006-07-03 Ulrich Drepper <drepper@redhat.com>
1738
1739 * elflint.c: Add testing of DT_GNU_HASH.
1740 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1741
1742 * Makefile.am: Add hacks to create dependency files for non-generic
1743 linker.
1744
Ulrich Drepper6ca46002006-06-12 22:40:23 +000017452006-06-12 Ulrich Drepper <drepper@redhat.com>
1746
1747 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1748 section if creating a DSO and no interpreter is given.
1749 (ld_generic_create_outfile): Don't store reference to symbols in
1750 discarded COMDAT groups. Don't create PHDR and INTERP program header
1751 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001752 (create_verneed_data): Pretty printing.
1753
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001754 * ldscript.y (content): If a DSO is created don't set default
1755 interpreter from linker script.
1756
1757 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1758 for symbols in discarded COMDAT groups.
1759 (elf_i386_create_relocations): Likewise.
1760 * ld.h (struct scninfo): Add unused_comdat.
1761 * ldgeneric.c (add_section): Also check group signature when
1762 matching COMDAT sections.
1763 (add_relocatable_file): Ignore symbols in COMDAT group which are
1764 discarded.
1765
1766 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1767 and symbol reference.
1768
Ulrich Drepper54f33a72006-06-11 09:07:37 +000017692006-06-11 Ulrich Drepper <drepper@redhat.com>
1770
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001771 * elflint.c (check_dynamic): Fix checking value of tags which are
1772 offsets in the string section. Make sure DT_STRTAB points to the
1773 section referenced in sh_link.
1774
1775 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1776
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001777 * ld.c: Recognize --eh-frame-hdr option.
1778 * ld.h (struct ld_state): Add eh_frame_hdr field.
1779 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1780
1781 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1782 SH_FLAGS_COMBINE.
1783 (add_relocatable_file): Minor optimization of last change.
1784 (match_section): Don't preserve SHF_GROUP flag any longer.
1785
Ulrich Drepper2d880282006-06-11 00:20:43 +000017862006-06-10 Ulrich Drepper <drepper@redhat.com>
1787
1788 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001789 Handle record and ignore as position dependent options.
1790 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001791 * ld.h (struct ld_state): Add execstack field.
1792 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1793 sections.
1794 (ld_generic_create_outfile): Fix program header creation in native
1795 linker. Add PT_GNU_STACK program header.
1796
Ulrich Dreppera688a732006-06-10 06:33:00 +000017972006-06-09 Ulrich Drepper <drepper@redhat.com>
1798
1799 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1800 for PLT entries if there is no local definition.
1801
1802 * ld.c (parse_option): Handle -z ignore like --as-needed and
1803 -z record like --no-as-needed.
1804 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1805 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1806 looping over DSOs. When deciding about adding DT_NEEDED entries
1807 use ->as_needed instead of ignore_unused_dsos.
1808
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000018092006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001810
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001811 * ld.c: Recognize --as-needed and --no-as-needed options.
1812 * ld.h (struct usedfile): Add as_needed field.
1813 (struct ld_state): Likewise.
1814 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1815 the list.
1816 * ldscript.y (filename_id_list): Split to correctly parse all
1817 combinations.
1818 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001819
Ulrich Drepper697f4db2006-06-10 06:50:47 +000018202006-05-28 Ulrich Drepper <drepper@redhat.com>
1821
1822 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1823 and colno.
1824
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000018252006-05-27 Ulrich Drepper <drepper@redhat.com>
1826
1827 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001828 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001829
Ulrich Drepper82c345d2006-04-04 22:07:54 +000018302006-04-04 Ulrich Drepper <drepper@redhat.com>
1831
1832 * addr2line.c: Update copyright year.
1833 * elfcmp.c: Likewise.
1834 * elflint.c: Likewise.
1835 * findtextrel.c: Likewise.
1836 * ld.c: Likewise.
1837 * nm.c: Likewise.
1838 * objdump.c: Likewise.
1839 * ranlib.c: Likewise.
1840 * readelf.c: Likewise.
1841 * size.c: Likewise.
1842 * strings.c: Likewise.
1843 * strip.c: Likewise.
1844
Roland McGrathdd7e22b2006-03-09 23:05:47 +000018452006-03-09 Roland McGrath <roland@redhat.com>
1846
1847 * Makefile.am (AM_LDFLAGS): New variable.
1848
Roland McGrath060fa052006-03-02 07:51:50 +000018492006-03-01 Roland McGrath <roland@redhat.com>
1850
1851 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1852 for dwarf.h changes matching 3.0 spec.
1853 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1854
Ulrich Drepper038129b2005-12-04 16:47:24 +000018552005-12-04 Ulrich Drepper <drepper@redhat.com>
1856
1857 * elflint.c (check_one_reloc): If relocation section is not loaded,
1858 don't check whether the relocations modify read-only sections or
1859 loaded and unloaded sections.
1860
Ulrich Drepper607e0542005-12-04 15:51:06 +000018612005-11-28 Ulrich Drepper <drepper@redhat.com>
1862
1863 * elflint.c (check_one_reloc): Take additional parameters. Use
1864 them to determine whether relocation is valid in this type of
1865 file. DSOs and executables can contain relocation sections in
1866 unloaded sections which just show the relocations the linker
1867 applied. Adjust all callers.
1868 (check_program_header): Check that PT_PHDR is loaded and that offset
1869 matches the one in the ELF header.
1870
Roland McGrath6724c902005-10-28 07:07:19 +000018712005-10-26 Roland McGrath <roland@redhat.com>
1872
1873 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1874
Ulrich Drepperd0449522005-09-03 07:23:52 +000018752005-09-03 Ulrich Drepper <drepper@redhat.com>
1876
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001877 * strip.c (handle_elf): Unify some error messages.
1878 * ld.c (main): Likewise.
1879 * ldgeneric.c (open_elf): Likewise.
1880 * elfcmp.c (main): Likewise.
1881 * elflint.c (check_elf_header): Likewise.
1882
1883 * size.c (process_file): Fix typo in error message.
1884
Ulrich Drepperd0449522005-09-03 07:23:52 +00001885 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1886
Ulrich Dreppera60501e2005-09-02 19:50:17 +000018872005-09-02 Ulrich Drepper <drepper@redhat.com>
1888
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001889 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001890 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001891
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000018922005-08-28 Ulrich Drepper <drepper@redhat.com>
1893
1894 * ranlib.c: Don't define pread_retry and write_retry here.
1895
1896 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1897 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1898
1899 * strings.c (process_chunk): Reorder expressions in conditional
1900 (process_chunk_mb): Likewise.
1901
1902 * strings.c: New file.
1903 * Makefile.am (bin_PROGRAMS): Add strings.
1904 (strings_no_Wstring): Define.
1905 (strings_LDADD): Define.
1906
Roland McGrath71e15a02005-08-27 10:33:26 +000019072005-08-27 Roland McGrath <roland@redhat.com>
1908
1909 * addr2line.c (dwarf_diename_integrate): Function removed.
1910 (print_dwarf_function): Use plain dwarf_diename.
1911
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000019122005-08-24 Ulrich Drepper <drepper@redhat.com>
1913
1914 * elflint.c (check_versym): Versioned symbols should not have
1915 local binding.
1916
Ulrich Drepper5d832292005-08-15 21:36:27 +000019172005-08-15 Ulrich Drepper <drepper@redhat.com>
1918
Ulrich Drepper61655e02005-08-16 04:23:02 +00001919 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1920 undefined.
1921
Ulrich Drepper5d832292005-08-15 21:36:27 +00001922 * Makefile.am: Add rules to build ranlib.
1923 * ranlib.c: New file.
1924
Roland McGrath18e13422005-08-15 08:01:25 +000019252005-08-14 Roland McGrath <roland@redhat.com>
1926
1927 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1928 sh_type it recognizes.
1929
1930 * elflint.c (check_sections): Print unknown flags in hex, don't
1931 truncate high bits. Print section number and name for unknown type.
1932
Roland McGrathf6895042005-08-13 20:56:52 +000019332005-08-13 Roland McGrath <roland@redhat.com>
1934
1935 * elflint.c (check_program_header): Use ebl_segment_type_name and
1936 allow any p_type it recognizes. Include p_type value in error
1937 message for unknown type.
1938
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000019392005-08-13 Ulrich Drepper <drepper@redhat.com>
1940
1941 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1942 to ebl_check_special_symbol.
1943 (check_sections): Pass ehdr to ebl_bss_plt_p.
1944
Roland McGrath653d3762005-08-13 01:59:10 +000019452005-08-12 Roland McGrath <roland@redhat.com>
1946
1947 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1948 refers to the right section if it's not SHN_ABS.
1949 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1950
1951 * elflint.c (check_sections): Don't complain about a non-NOBITS
1952 section taking no segment space, if it's sh_size is 0.
1953
1954 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1955 be PROGBITS or NOBITS.
1956
1957 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1958 standard st_value and st_size checks.
1959
Roland McGrath1c83bf12005-08-11 07:03:55 +000019602005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001961
Roland McGrath1c83bf12005-08-11 07:03:55 +00001962 * addr2line.c (options, parse_opt): Don't handle -e here.
1963 (executable): Variable removed.
1964 (argp_children): New static variable.
1965 (argp): Use it. Make const.
1966 (main): Fill in argp_children from dwfl_standard_argp ().
1967 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1968 (print_dwarf_function): New function. Try to figure out inline chain.
1969 (elf_getname): Function removed, libdwfl does it for us.
1970 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1971 Use dwfl_module_addrname instead of elf_getname.
1972 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1973 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1974
19752005-08-10 Ulrich Drepper <drepper@redhat.com>
1976
1977 * strip.c (parse_opt): STATE parameter is now used.
1978 Various little cleanups.
1979
1980 * readelf.c (print_debug_line_section): Correct fallout of renaming
1981 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001982
Roland McGrath8f31c2c2005-08-09 04:58:05 +000019832005-08-08 Roland McGrath <roland@redhat.com>
1984
1985 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1986 with binutils strip. Likewise -d, -S, as aliases for -g.
1987 Likewise ignore -s/--strip-all.
1988
Roland McGrath095a01b2005-08-08 03:49:35 +000019892005-08-07 Roland McGrath <roland@redhat.com>
1990
1991 * strip.c (process_file): Open read-only when using a different output
1992 file.
1993
Ulrich Drepper47be7952005-08-07 04:41:39 +000019942005-08-06 Ulrich Drepper <drepper@redhat.com>
1995
Ulrich Drepper637963b2005-08-07 05:33:07 +00001996 * elflint.c (in_nobits_scn): New function.
1997 (check_versym): Allow references for defined symbols against versions
1998 of other DSOs also for symbols in nobits sections.
1999 Move a few variables around.
2000
Ulrich Drepper47be7952005-08-07 04:41:39 +00002001 * Makefile.am (AM_CFLAGS): Avoid duplication.
2002 Link with statis libs if BUILD_STATIC.
2003
Ulrich Drepperdbace232005-08-06 01:37:23 +000020042005-08-05 Ulrich Drepper <drepper@redhat.com>
2005
2006 * elflint.c: Many, many more tests. Mostly related to symbol
2007 versioning. Those sections should now be completely checked.
2008
2009 * readelf.c (print_dynamic): Use gelf_offscn.
2010
Ulrich Drepperacb89832005-08-04 07:01:49 +000020112005-08-04 Ulrich Drepper <drepper@redhat.com>
2012
2013 * elflint.c: Add lots more tests: more extension symbol table sanity,
2014 versioning section tests, hash table tests. General cleanup.
2015
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000020162005-08-02 Ulrich Drepper <drepper@redhat.com>
2017
Ulrich Drepper8a687742005-08-03 02:24:12 +00002018 * objdump.c: New file.
2019 * Makefile.am (bin_PROGRAMS): Add objdump.
2020 (objdump_LDADD): Define.
2021
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002022 * elflint.c (check_reloc_shdr): New function split out from check_rela
2023 and check_rel.
2024 (check_one_reloc): New function. Likewise.
2025 (check_rela): Use check_reloc_shdr and check_one_reloc.
2026 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002027 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2028 section.
2029 Add checks that relocations against read-only segments are flagged,
2030 that the text relocation flag is not set unnecessarily, and that
2031 relocations in one section are either against loaded or not-loaded
2032 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002033
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000020342005-08-01 Ulrich Drepper <drepper@redhat.com>
2035
2036 * elfcmp.c (main): Ignore section count and section name string table
2037 section index.
2038
Roland McGrathf9ece8a2005-07-28 07:03:04 +000020392005-07-27 Roland McGrath <roland@redhat.com>
2040
2041 * elfcmp.c: Include <locale.h>.
2042
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000020432005-07-27 Ulrich Drepper <drepper@redhat.com>
2044
2045 * elfcmp.c: Print name and index of differing section.
2046
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000020472005-07-24 Ulrich Drepper <drepper@redhat.com>
2048
2049 * elfcmp.c: Implement comparing gaps between sections.
2050
20512005-07-23 Ulrich Drepper <drepper@redhat.com>
2052
2053 * elflint.c: Include libeblP.h instead of libebl.h.
2054 * nm.c: Likewise.
2055 * readelf.c: Likewise.
2056 * elfcmp.c: Likewise.
2057
2058 * elfcmp.c (main): Compare individual ELF header fields, excluding
2059 e_shoff instead of the whole struct at once.
2060 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2061 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2062
20632005-07-22 Ulrich Drepper <drepper@redhat.com>
2064
2065 * elfcmp.c (main): Take empty section into account when comparing
2066 section content.
2067
2068 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2069 using it.
2070
20712005-07-21 Ulrich Drepper <drepper@redhat.com>
2072
2073 * elfcmp.c: New file.
2074 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2075 (elfcmp_LDADD): Define.
2076
2077 * elflint.c (check_rela): Check that copy relocations only reference
2078 object symbols or symbols with unknown type.
2079 (check_rel): Likewise.
2080
20812005-06-08 Roland McGrath <roland@redhat.com>
2082
2083 * readelf.c (print_ops): Add consts.
2084
20852005-05-31 Roland McGrath <roland@redhat.com>
2086
2087 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2088 abbreviations. Print a header line before each CU section.
2089
2090 * readelf.c (print_debug_loc_section): Fix indentation for larger
2091 address size.
2092
20932005-05-30 Roland McGrath <roland@redhat.com>
2094
2095 * readelf.c (print_debug_line_section): Print section offset of each
2096 CU's table, so they are easy to find from seeing the stmt_list value.
2097
2098 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2099 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2100
2101 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2102 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2103
2104 * readelf.c (print_ops): Take different args for indentation control.
2105 (attr_callback): Caller updated.
2106 Grok several more block-form attributes as being location expressions.
2107 For those same attributes with udata forms, format output differently
2108 for location list offset.
2109 (print_debug_loc_section): Implement it for real.
2110
2111 * readelf.c (options): Mention ranges for --debug-dump.
2112 (enum section_e): Add section_ranges.
2113 (parse_opt): Grok "ranges" for -w/--debug-dump.
2114 (print_debug_ranges_section): New function.
2115 (print_debug): Handle .debug_ranges section.
2116
21172005-05-30 Ulrich Drepper <drepper@redhat.com>
2118
2119 * readelf.c (handle_notes): At least x86-64 need not have the note
2120 section values aligned to 8 bytes.
2121
21222005-05-18 Ulrich Drepper <drepper@redhat.com>
2123
2124 * readelf.c (dwarf_tag_string): Add new tags.
2125
21262005-05-08 Roland McGrath <roland@redhat.com>
2127
2128 * strip.c (handle_elf): Don't translate hash and versym data formats,
2129 elf_getdata already did it for us.
2130
21312005-05-07 Ulrich Drepper <drepper@redhat.com>
2132
2133 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2134 (addr2line_LDADD): Likewise.
2135
21362005-05-03 Roland McGrath <roland@redhat.com>
2137
2138 * strip.c (handle_elf): Apply symbol table fixups to discarded
2139 relocation sections when they are being saved in the debug file.
2140
2141 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2142 and gelf_xlatetof, not the native byte order.
2143
2144 * strip.c (parse_opt): Give error if -f or -o is repeated.
2145 (main): Exit if argp_parse returns nonzero.
2146
2147 * strip.c (debug_fname_embed): New variable.
2148 (options, parse_opt): New option -F to set it.
2149
21502005-05-07 Ulrich Drepper <drepper@redhat.com>
2151
2152 * readelf.c (parse_opt): Make any_control_option variable
2153 local. Simplify some tests.
2154
21552005-05-03 Roland McGrath <roland@redhat.com>
2156
2157 * strip.c (crc32_file): Function removed (now in ../lib).
2158
21592005-05-03 Roland McGrath <roland@redhat.com>
2160
2161 * elflint.c (is_debuginfo): New variable.
2162 (options, parse_opt): New option --debuginfo/-d to set it.
2163 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2164 (check_note): If is_debuginfo, don't try to get note contents.
2165
21662005-04-24 Ulrich Drepper <drepper@redhat.com>
2167
2168 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2169 section reached.
2170
21712005-04-14 Ulrich Drepper <drepper@redhat.com>
2172
2173 * readelf.c (dwarf_encoding_string): New function.
2174 (dwarf_inline_string): New function.
2175 (dwarf_access_string): New function.
2176 (dwarf_visibility_string): New function.
2177 (dwarf_virtuality_string): New function.
2178 (dwarf_identifier_case_string): New function.
2179 (dwarf_calling_convention_string): New function.
2180 (dwarf_ordering_string): New function.
2181 (dwarf_discr_list_string): New function.
2182 (attr_callback): Decode man more attribute values.
2183
21842005-04-01 Ulrich Drepper <drepper@redhat.com>
2185
2186 * addr2line.c: Finish implementation of -f option.
2187
21882005-03-29 Ulrich Drepper <drepper@redhat.com>
2189
2190 * addr2line.c: New file.
2191 * Makefile.am (bin_PROGRAMS): Add addr2line.
2192 Define addr2line_LDADD.
2193
2194 * findtextrel.c: Use new dwarf_addrdie function.
2195
2196 * findtextrel.c: Fix usage message and re-add accidentally removed
2197 line.
2198
21992005-03-28 Ulrich Drepper <drepper@redhat.com>
2200
2201 * findtextrel.c: New file.
2202 * Makefile: Add rules to build findtextrel.
2203
22042005-02-15 Ulrich Drepper <drepper@redhat.com>
2205
2206 * ldlex.l: Provide ECHO definition to avoid warning.
2207
2208 * elflint.c (check_program_header): Fix typo in RELRO test.
2209
2210 * Makefile.am (AM_CFLAGS): Add more warning options.
2211 * elflint.c: Fix warnings introduced by the new warning options.
2212 * i386_ld.c: Likewise.
2213 * ld.c: Likewise.
2214 * ld.h: Likewise.
2215 * ldgeneric.c: Likewise.
2216 * nm.c: Likewise.
2217 * readelf.c: Likewise.
2218 * sectionhash.c: Likewise.
2219 * size.c: Likewise.
2220 * string.c: Likewise.
2221
22222005-02-05 Ulrich Drepper <drepper@redhat.com>
2223
2224 * Makefile.am: Check for text relocations in constructed DSOs.
2225
2226 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2227 with -lmudflap.
2228
2229 * ldscript.y: Add as_needed handling.
2230 * ldlex.l: Recognize AS_NEEDED token.
2231 * ld.h (struct filename_list): Add as_needed flag.
2232
22332005-02-04 Ulrich Drepper <drepper@redhat.com>
2234
2235 * elflint.c (check_symtab): Correctly determine size of GOT section.
2236
22372005-01-19 Ulrich Drepper <drepper@redhat.com>
2238
2239 * ld.c: Remove unnecessary more_help function. Print bug report
2240 address using argp.
2241 * strip.c: Likewise.
2242 * size.c: Likewise.
2243 * nm.c: Likewise.
2244 * readelf.c: Likewise.
2245 * elflint.c: Likewise.
2246
2247 * elflint.c (main): Don't check for parameter problems here.
2248 (parse_opt): Do it here, where we get informed about some of them
2249 anyway.
2250
2251 * readelf.c (main): Don't check for parameter problems here.
2252 (parse_opt): Do it here, where we get informed about some of them
2253 anyway.
2254
22552005-01-11 Ulrich Drepper <drepper@redhat.com>
2256
2257 * strip.c: Update copyright year.
2258 * readelf.c: Likewise.
2259 * size.c: Likewise.
2260 * nm.c: Likewise.
2261 * ld.c: Likewise.
2262 * elflint.c: Likewise.
2263
2264 * elflint.c (check_symtab): Don't warn about wrong size for
2265 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2266
22672004-10-05 Ulrich Drepper <drepper@redhat.com>
2268
2269 * readelf.c (print_phdr): In section mapping, also indicate
2270 sections in read-only segments.
2271
22722004-09-25 Ulrich Drepper <drepper@redhat.com>
2273
2274 * readelf.c: Make compile with gcc 4.0.
2275 * strip.c: Likewise.
2276
22772004-08-16 Ulrich Drepper <drepper@redhat.com>
2278
2279 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2280 allocate to work around gcc 3.4 bug.
2281
22822004-01-25 Ulrich Drepper <drepper@redhat.com>
2283
2284 * ldlex.l (invalid_char): Better error message.
2285
22862004-01-23 Ulrich Drepper <drepper@redhat.com>
2287
2288 * readelf.c: Print SHT_GNU_LIBLIST sections.
2289
2290 * none_ld.c: New file.
2291
22922004-01-21 Ulrich Drepper <drepper@redhat.com>
2293
2294 * Makefile.am: Enable building of machine specific linker.
2295
22962004-01-20 Ulrich Drepper <drepper@redhat.com>
2297
2298 * Makefile.am: Support building with mudflap.
2299
2300 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2301 * ldgeneric.c: Likewise.
2302 * ldscript.y: Likewise.
2303 * readelf.c: Likewise.
2304 * strip.c: Likewise.
2305
2306 * readelf.c (print_debug_line_section): Determine address size
2307 correctly.
2308
23092004-01-19 Ulrich Drepper <drepper@redhat.com>
2310
2311 * readelf.c (print_phdr): Show which sections are covered by the
2312 PT_GNU_RELRO entry.
2313
2314 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2315
2316 * readelf.c (print_debug_macinfo_section): Implement.
2317
23182004-01-18 Ulrich Drepper <drepper@redhat.com>
2319
2320 * readelf.c (print_debug_line_section): Implement.
2321
23222004-01-17 Ulrich Drepper <drepper@redhat.com>
2323
2324 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2325 * src/ld.c: Likewise.
2326 * src/nm.c: Likewise.
2327 * src/readelf.c: Likewise.
2328 * src/size.c: Likewise.
2329 * src/strip.c: Likewise.
2330
2331 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2332
2333 * Makefile.am: Support building with mudflap.
2334
23352004-01-16 Ulrich Drepper <drepper@redhat.com>
2336
2337 * readelf.c (print_debug_info_section): Free dies memory.
2338
2339 * readelf.c: Print .debug_info section content.
2340
23412004-01-13 Ulrich Drepper <drepper@redhat.com>
2342
2343 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2344
23452004-01-12 Ulrich Drepper <drepper@redhat.com>
2346
2347 * readelf.c (print_debug_aranges): Implement using libdw.
2348
23492004-01-11 Ulrich Drepper <drepper@redhat.com>
2350
2351 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2352
2353 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2354 behavior is available yet.
2355 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2356
23572004-01-09 Ulrich Drepper <drepper@redhat.com>
2358
2359 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2360
2361 * nm.c: Implement getting information about local variables.
2362
23632004-01-07 Ulrich Drepper <drepper@redhat.com>
2364
2365 * nm.c: Read also debug information for local symbols.
2366
23672004-01-05 Ulrich Drepper <drepper@redhat.com>
2368
2369 * nm.c: Shuffle dwarf handling code around so the maximum column
2370 width can be computed ahead of printing. Avoid collection symbols
2371 which are not printed anyway.
2372
2373 * nm.c: Rewrite dwarf handling to use libdw.
2374 * Makefile.am (AM_CFLAGS): Add -std parameter.
2375 (INCLUDES): Find header in libdw subdir.
2376 (nm_LDADD): Replace libdwarf with libdw.
2377
2378 * elflint.c: Update copyright year.
2379 * readelf.c: Likewise.
2380 * size.c: Likewise.
2381 * strip.c: Likewise.
2382 * nm.c: Likewise.
2383
23842003-12-31 Ulrich Drepper <drepper@redhat.com>
2385
2386 * strip.c (process_file): Close file before returning.
2387
23882003-11-19 Ulrich Drepper <drepper@redhat.com>
2389
2390 * readelf.c (handle_dynamic): Make column for tag name wider.
2391
23922003-09-29 Ulrich Drepper <drepper@redhat.com>
2393
2394 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2395
23962003-09-25 Ulrich Drepper <drepper@redhat.com>
2397
2398 * strip.c (process_file): Don't mmap the input file, we modify the
2399 data structures and don't want the change end up on disk.
2400
24012003-09-23 Jakub Jelinek <jakub@redhat.com>
2402
2403 * unaligned.h (union u_2ubyte_unaligned,
2404 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2405 packed attribute.
2406 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2407 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2408 Read/store value through _ptr->u instead of *_ptr.
2409
24102003-09-22 Ulrich Drepper <drepper@redhat.com>
2411
2412 * size.c (show_sysv): Change type of maxlen to int.
2413
2414 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2415 buckets.
2416
2417 * i386_ld.c: Many many fixes and extensions.
2418 * ld.c: Likewise.
2419 * ldgeneric.c: Likewise.
2420
24212003-08-16 Ulrich Drepper <drepper@redhat.com>
2422
2423 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2424 the reference is from another DSO.
2425
24262003-08-15 Ulrich Drepper <drepper@redhat.com>
2427
2428 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2429 point is found when creating a DSO.
2430
24312003-08-14 Ulrich Drepper <drepper@redhat.com>
2432
2433 * ld.c (main): Always call FLAG_UNRESOLVED.
2434 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2435 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2436
24372003-08-13 Ulrich Drepper <drepper@redhat.com>
2438
2439 * Makefile.in: Depend on libebl.a, not libebl.so.
2440
2441 * ld.c (main): Mark stream for linker script as locked by caller.
2442 (read_version_script): Likewise.
2443 * ldlex.c: Define fread and fwrite to _unlocked variant.
2444
2445 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2446 target_bswap_32.
2447 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2448 target_bswap_64.
2449 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2450 store_8ubyte_unaligned): Define using new macros.
2451
24522003-08-12 Ulrich Drepper <drepper@redhat.com>
2453
2454 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2455 possibly unaligned memory. Support use of big endian machines.
2456
24572003-08-11 Ulrich Drepper <drepper@redhat.com>
2458
2459 * Moved to CVS archive.