blob: 341787d61f7756c48f128c350a827888cacb93e7 [file] [log] [blame]
Mark Wielaarddf85bf92014-05-01 14:48:27 +020012014-05-01 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
4 if looking for alternate debug file.
5
Mark Wielaard93802972014-04-11 23:52:47 +020062014-04-11 Mark Wielaard <mjw@redhat.com>
7
8 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
9
Mark Wielaard7c757b32014-04-22 22:23:18 +0200102014-04-22 Mark Wielaard <mjw@redhat.com>
11
Mark Wielaard7c680a22014-04-22 23:26:34 +020012 * readelf.c (handle_core_item): Make sure variable length array
13 contains at least enough space for terminating zero char.
14
152014-04-22 Mark Wielaard <mjw@redhat.com>
16
Mark Wielaard7c757b32014-04-22 22:23:18 +020017 * readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
18 left shift.
19
Mark Wielaard32324792014-04-13 17:39:57 +0200202014-03-13 Mark Wielaard <mjw@redhat.com>
21
22 * Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
23 LDADD lines.
24 * strings.c (process_chunk): Remove _MUDFLAP condition.
25
Mark Wielaardf7cdc742014-04-09 22:38:07 +0200262014-04-09 Mark Wielaard <mjw@redhat.com>
27
28 * readelf.c (print_debug_aranges_section): Don't get the raw section
29 data, use the possibly decompressed .[z]debug sectiondata.
30 (print_debug_ranges_section): Likewise.
31 (print_debug_frame_section): Likewise.
32 (print_debug_line_section): Likewise.
33 (print_debug_loc_section): Likewise.
34 (print_debug_macinfo_section): Likewise.
35 (print_debug_macro_section): Likewise.
36
Mark Wielaard110c2732014-04-10 15:02:53 +0200372014-04-10 Mark Wielaard <mjw@redhat.com>
38
39 * readelf.c (buf_read_ulong): Pass actual long size to convert.
40
Mark Wielaardb9207522014-03-05 16:17:54 +0100412014-03-05 Mark Wielaard <mjw@redhat.com>
42
43 * readelf.c (attr_callback): Print DW_FORM_sdata values as signed
44 numbers.
45
Mark Wielaardcb7b2d62014-02-24 17:44:42 +0100462014-02-24 Mark Wielaard <mjw@redhat.com>
47
48 * readelf (print_phdr): Check there is a SHT_PROGBITS section at the
49 offset given by p_offsets for a PT_INTERP segment before trying to
50 display the interpreter string.
51
Mark Wielaard43c9c2d2014-02-07 14:23:24 +0100522014-02-07 Mark Wielaard <mjw@redhat.com>
53
54 * readelf.c (print_phdr): Check phdr->p_filesz and make sure
55 interpreter string is zero terminated before calling printf.
56
Mark Wielaardf48eb6b2014-01-23 00:56:41 +0100572014-01-22 Mark Wielaard <mjw@redhat.com>
58
59 * Makefile.am (nm_no_Wformat): Removed.
60 (size_no_Wformat): Likewise.
61 (strings_no_Wformat): Likewise.
62 (addr2line_no_Wformat): Likewise.
63 * size.c (show_sysv): Use fmtstr directly as literal in printf.
64 (show_sysv_one_line): Likewise.
65 * strings.c (locfmt): Removed.
66 (radix): New static enum.
67 (parse_opt): Set radix, not locfmt.
68 (process_chunk_mb): Use fmtstr directly as literal in printf based
69 on radix.
70 (process_chunk): Likewise.
71 * nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
72 (show_symbols_bsd): Likewise.
73 (show_symbols_posix): Likewise.
74
Mark Wielaard13968d92014-01-21 16:13:49 +0100752014-01-21 Mark Wielaard <mjw@redhat.com>
76
77 * stack.c (show_inlines): New static boolean.
78 (print_frame): New function split out from...
79 (print_frames): ..here. If show_inlines is true and we found a
80 DIE for the frame address, call print_inline_frames otherwise
81 call print_frame. Keep track of and track frame_nr.
82 (print_inline_frames): New function.
83 (parse_opt): Handle '-i'.
84 (main): Add 'i' to options.
85
Mark Wielaard8520f702014-01-27 16:05:54 +0100862014-01-27 Mark Wielaard <mjw@redhat.com>
87
88 * stack.c (maxframes): Initialize to 256.
89 (main): Document new default in options. Document magic number
90 used in frames.allocated initialization.
91
Mark Wielaard247f8582014-01-20 13:49:48 +0100922014-01-20 Mark Wielaard <mjw@redhat.com>
93
Mark Wielaard531a30a2014-01-20 23:09:26 +010094 * stack.c (show_debugname): New static boolean.
95 (die_name): New function.
96 (print_frames): If show_debugname is true set symname to the
97 first function-like DIE with a name in scope for the address in
98 the debuginfo.
99 (parse_opt): Handle '-d'.
100 (main): Add 'd' to options.
101
1022014-01-20 Mark Wielaard <mjw@redhat.com>
103
Mark Wielaard247f8582014-01-20 13:49:48 +0100104 * addr2line.c (handle_address): Initialize scopes to NULL.
105
Roland McGrath7d5b3012014-01-17 17:11:39 +01001062014-01-17 Roland McGrath <roland@redhat.com>
107
Roland McGrath58d36192014-01-17 17:12:46 +0100108 * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
109 st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
110 Don't use assert on input values, instead bail with "illformed" error.
111
1122014-01-17 Roland McGrath <roland@redhat.com>
113
Roland McGrath7d5b3012014-01-17 17:11:39 +0100114 * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
115 (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
116 (handle_scngrp): Check for bogus sh_info.
117
Jakub Jelinek71c15342014-01-17 17:07:27 +01001182014-01-17 Jakub Jelinek <jakub@redhat.com>
119
120 * elflint.c (section_name): Return "<invalid>" instead of
121 crashing on invalid section name.
122 (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
123 check_symtab_shndx, check_hash, check_versym): Robustify.
124 (check_hash): Don't check entries beyond end of section.
125 (check_note): Don't crash if gelf_rawchunk fails.
126
Petr Machataced66872014-01-17 17:00:12 +01001272014-01-17 Petr Machata <pmachata@redhat.com>
128
129 * readelf.c (handle_dynamic, handle_relocs_rel)
130 (handle_relocs_rela, handle_versym, print_liblist):
131 Use gelf_fsize instead of relying on shdr->sh_entsize.
132
Mark Wielaard04781c32014-01-14 22:13:43 +01001332014-01-14 Mark Wielaard <mjw@redhat.com>
134
135 * readelf.c (print_debug_macro_section): Clear vendor array before
136 use.
137
Jan Kratochvil7c6e7852014-01-15 21:16:57 +01001382014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
139
140 Fix corruption of non-C++ symbols by the demangler.
141 * nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
142 (show_symbols): Check for _Z.
143 * stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
144
Mark Wielaard6034e2f2014-01-02 22:31:07 +01001452014-01-02 Mark Wielaard <mjw@redhat.com>
146
Mark Wielaardda91c5b2014-01-03 00:06:31 +0100147 * stack.c (show_raw): Declare unconditionally.
148 (parse_opt): Handle '-r' unconditionally.
149 (main): Show "raw" option even without USE_DEMANGLE.
150
1512014-01-02 Mark Wielaard <mjw@redhat.com>
152
Mark Wielaard36490c92014-01-02 23:59:41 +0100153 * stack.c (print_frames): Print 0x before build-id hex-offset.
154
1552014-01-02 Mark Wielaard <mjw@redhat.com>
156
Mark Wielaard6034e2f2014-01-02 22:31:07 +0100157 * stack.c (maxframes): Increase to 2048.
158 (struct frames): Add allocated field.
159 (frame_callback): If frames used is frames allocated, realloc.
160 (print_frames): Show an error if maxframes has been reached.
161 (parse_opt): Allow -n 0 for unlimited frames.
162 (main): Document -n 0 and new default 2048 frames. Allocate initial
163 number of frames with malloc.
164
Mark Wielaard19108012013-12-30 22:00:57 +01001652013-12-30 Mark Wielaard <mjw@redhat.com>
166
167 * stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
168 or dwfl_core_file_attach and check for errors.
169
Mark Wielaarda6141d22013-12-28 23:25:54 +01001702013-12-28 Mark Wielaard <mjw@redhat.com>
171
172 * stack.c (print_frames): Remove address width code and use...
173 (get_addr_width): ...this new function.
174 (show_modules): New static boolean.
175 (module_callback): New static function.
176 (parse_opt): Handle '-l'.
177 (main): Add 'l' to options. If show_modules then use dwfl_getmodules
178 with module_callback to show all detected modules and possible
179 build_id, elf and dwarf files.
180
Mark Wielaard1f7763e2013-12-27 10:49:51 +01001812013-12-27 Mark Wielaard <mjw@redhat.com>
182
183 * stack.c (frames_shown): New static boolean.
184 (EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
185 (frame_callback): Return -1 on error. Don't print error.
186 (print_frames): Add arguments, tid, dwflerr and what. Print tid.
187 If there was an error report it with address and module if possible.
188 Record whether any frames were actually printed.
189 (thread_callback): Collect tid and err, pass it to print_frames.
190 (parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
191 if dwfl_linux_proc_report returned it. Check whether we are properly
192 attached with dwfl_pid.
193 (main): Document exit status. Don't report DWARF_CB_ABORT from
194 callbacks as error. Pass real errors to print_frames. Return
195 EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
196 were any non-fatal errors.
197
Mark Wielaard99fc3f72013-12-23 00:47:06 +01001982013-12-23 Mark Wielaard <mjw@redhat.com>
199
Mark Wielaardfdb64e62013-12-23 21:19:05 +0100200 * Makefile.am (stack_LDADD): Add demanglelib.
201 * stack.c (show_quiet): New static boolean, default false.
202 (show_raw): Likewise.
203 (demangle_buffer_len): New static size_t.
204 (demangle_buffer): New static char *.
205 (print_frames): Don't resolve pc name if show_quiet. Demangle name
206 unless show_raw.
207 (parse_opt): Handle '-q' and '-r'.
208 (main): Add 'q' and 'r' to options. Free demangle_buffer.
209
2102013-12-23 Mark Wielaard <mjw@redhat.com>
211
Mark Wielaardfe9b95d2013-12-23 10:46:54 +0100212 * stack.c (OPT_DEBUGINFO): New define.
213 (OPT_COREFILE): Likewise.
214 (pid): New static.
215 (core_fd): Likewise.
216 (core): Likewise.
217 (exec): Likewise.
218 (debuginfo_path): Likewise.
219 (parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
220 Do argument sanity checking. Setup Dwfl.
221 (main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
222 Remove argp_child children, simplify argp doc, remove custom
223 usage message and construction of dwfl with dwfl_standard_argp.
224 Use pid directly as tid. close core and core_fd if opened. Print
225 pid of process or core.
226
2272013-12-23 Mark Wielaard <mjw@redhat.com>
228
Mark Wielaard99fc3f72013-12-23 00:47:06 +0100229 * stack.c (show_build_id): New static boolean.
230 (print_frames): Print module build-id, load address and pc offset
231 if show_build_id is true.
232 (parse_opt): Handle '-b'.
233 (main): Add -b to options.
234
Mark Wielaard9fec14a2013-12-22 23:48:26 +01002352013-12-22 Mark Wielaard <mjw@redhat.com>
236
237 * stack.c (maxframes): New static unsigned. Initialize to 64.
238 (struct frame): New struct.
239 (struct frames): Likewise.
240 (dwfl): New static Dwfl pointer.
241 (frame_callback): Use arg as struct frames and fill it next frame.
242 Return DWARF_CB_ABORT when maxframes has been reached. Move
243 printing of frame to...
244 (print_frames): ...here. New function.
245 (thread_callback): Use arg as struct frames and set frames to zero.
246 Call print_frames.
247 (parse_opt): Handle '-n'.
248 (main): Add -n to options. Allocate frames using maxframes. Pass
249 frames to frame_callback and thread_callback.
250
Mark Wielaarde962ec32013-12-20 10:09:12 +01002512013-12-20 Mark Wielaard <mjw@redhat.com>
252
253 * stack.c (show_one_tid): New static boolean.
254 (parse_opt): Handle '-1'.
255 (main): Add -1 to options. Call dwfl_getthread_frames when
256 show_one_tid is true.
257
Mark Wielaard159ac522013-12-18 11:05:54 +01002582013-12-18 Mark Wielaard <mjw@redhat.com>
259
260 * addr2line.c (options): Add symbol-sections, 'x'.
261 (show_symbol_sections): New static bool.
262 (parse_opt): Handle 'x'.
263 (print_addrsym): Use dwfl_module_addrinfo value.r
264 Also show section of address with show_symbol_sections.
265 (find_symbol): Use dwfl_module_getsym_info and set value.
266 (handle_address): Request value and use it instead of sym.st_value.
267 * readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
268 name and offset.
269
Masatake YAMATOc8c610b2013-12-17 12:03:29 +09002702013-12-17 Masatake YAMATO <yamato@redhat.com>
271 Mark Wielaard <mjw@redhat.com>
272
273 * stack.c (show_activation, show_module, show_source): New variables.
274 (parse_opt): Set show_activation if -a option is given.
275 Set show_module if -m option is given. Set show_source if -s option
276 is given. Set all show booleans when -v option is given.
277 (main): Added `-a', `-m', `-s', and `-v' to the help message.
278 (frame_callback): Print module and source file information.
279
Petr Machata98c8a732013-11-26 03:10:31 +01002802013-11-25 Petr Machata <pmachata@redhat.com>
281
282 * elflint.c (valid_e_machine): Add EM_AARCH64.
283
Petr Machataa47a0962013-11-14 01:07:22 +01002842013-11-14 Petr Machata <pmachata@redhat.com>
285
286 * readelf.c (handle_core_item) <'h'>: New branch for handling
287 fields that shouldn't be displayed.
288
Mark Wielaard875cad82013-11-10 22:17:05 +01002892013-11-10 Mark Wielaard <mjw@redhat.com>
290
291 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
292 ARGP_PROGRAM_BUG_ADDRESS_DEF.
293 (print_version): New function.
294
Mark Wielaard03d76f42013-11-09 16:45:22 +01002952013-11-09 Mark Wielaard <mjw@redhat.com>
296
297 * arlib.c (arlib_init): Call snprintf before using the result
298 with memcpy.
299 (arlib_finalize): Likewise.
300 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
301
Jan Kratochvil0b867462013-05-30 14:37:38 +02003022013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
303
304 * Makefile.am (bin_PROGRAMS): Add stack.
305 (stack_LDADD): New.
306 * stack.c: New file.
307
Mark Wielaardbe860842013-11-05 13:37:33 +01003082013-11-05 Mark Wielaard <mjw@redhat.com>
309
310 * readelf.c (print_debug_ranges_section): Cast address to size_t
311 before comparison.
312 (print_debug_loc_section): Likewise.
313
Mark Wielaard4f7673f2013-10-18 10:37:53 +02003142013-10-18 Mark Wielaard <mjw@redhat.com>
315
316 * ar.c (main): Correct operation check when instance_specifed is set.
317
Petr Machataab224102013-09-26 00:39:34 +02003182013-09-26 Petr Machata <pmachata@redhat.com>
319
Petr Machata0c9ae0c2013-09-26 21:02:22 +0200320 * readelf.c (handle_file_note): New function.
321 (handle_notes_data): Call it to handle NT_FILE notes.
322
3232013-09-26 Petr Machata <pmachata@redhat.com>
324
Petr Machataab224102013-09-26 00:39:34 +0200325 * readelf.c (handle_siginfo_note): New function.
326 (handle_notes_data): Call it to handle NT_SIGINFO notes.
327 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
328
Mark Wielaard4b9e6392013-08-13 11:40:21 +02003292013-08-13 Mark Wielaard <mjw@redhat.com>
330
331 * addr2line.c (options): Add "inlines", 'i'.
332 (show_inlines): New bool.
333 (parse_opt): Handle 'i'.
334 (print_diesym): New static function.
335 (print_src): New function taking code from...
336 (handle_address): here. Call print_src. Print inlines.
337
Mark Wielaardd0f85012013-08-12 14:21:31 +02003382013-08-12 Mark Wielaard <mjw@redhat.com>
339
340 * addr2line.c (main): If there is a newline char at end of buf,
341 then remove it.
342
Mark Wielaard35230222013-07-05 16:44:47 +02003432013-07-05 Mark Wielaard <mjw@redhat.com>
344
345 * readelf.c (print_ops): Take CU as argument, use it to print
346 parameter_ref DIE offset.
347 (struct listptr): Replace base field with cu.
348 (listptr_base): New function.
349 (compare_listptr): Use listptr_base.
350 (notice_listptr): Take CU as argument.
351 (skip_listptr_hole): Likewise.
352 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
353 (print_cfa_program): Pass NULL as CU to print_ops.
354 (struct attrcb_args): Replace cu_base field with cu.
355 (attr_callback): Pass cu not cu_base to notice_listptr.
356 (print_debug_units): Don't calculate base, just set cu.
357 (print_debug_loc_section): Pass cu to skip_listptr_hole and
358 print_ops.
359
Mark Wielaard63d8bfd2013-05-06 15:48:56 +02003602013-05-06 Mark Wielaard <mjw@redhat.com>
361
362 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
363 argument as DIE offset.
364
Mark Wielaardcdaaf212013-04-25 16:50:11 -04003652013-04-24 Mark Wielaard <mjw@redhat.com>
366
367 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
368
Mark Wielaarda8c7f052013-03-25 21:11:53 +01003692013-03-25 Mark Wielaard <mjw@redhat.com>
370
Mark Wielaard1a094202013-03-25 14:48:06 +0100371 * readelf.c (argp_options): Add decodedline.
372 (decodedline): New boolean initialized to false.
373 (parse_opt): Set decodedline when arg is decodedline.
374 (print_decoded_line_section): New function.
375 (print_debug_line_section): Call print_decoded_line_section when
376 decodedline is true.
377
3782013-03-25 Mark Wielaard <mjw@redhat.com>
379
Mark Wielaardb79788c2013-03-25 11:45:22 +0100380 * readelf.c (argp_option): Add decodedaranges.
381 (decodedaranges): New boolean initialized to false.
382 (parse_opt): Set decodedaranges when arg is decodedaranges.
383 (print_debug_aranges_section): Reimplemented and original
384 implementation renamed to...
385 (print_decoded_aranges_section): this.
386
3872013-03-25 Mark Wielaard <mjw@redhat.com>
388
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100389 * readelf.c (attrcb_args): Add Dwarf_Die.
390 (attr_callback): When highpc is in constant form also print as
391 address.
392 (print_debug_units): Set args.die.
393
Mark Wielaard10cd97e2013-03-19 11:43:49 +01003942013-03-19 Mark Wielaard <mjw@redhat.com>
395
396 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
397
Mark Wielaarda73fecc2013-03-18 13:54:50 +01003982013-03-18 Mark Wielaard <mjw@redhat.com>
399
400 * readelf.c (print_gdb_index_section): Accept version 8.
401
Mark Wielaarda58951b2013-03-01 11:51:58 +01004022013-03-01 Mark Wielaard <mjw@redhat.com>
403
404 * findtextrel.c (process_file): Release ELF and close file when not
405 text relocations are found.
406 * strip.c (handle_elf): Track memory used for .debuglink section data
407 and free when done.
408
Mark Wielaardb94ccea2013-02-24 22:58:49 +01004092013-02-24 Mark Wielaard <mjw@redhat.com>
410
411 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
412 allowed to have out of section values because of GNU ld bugs.
413
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01004142013-02-06 Mark Wielaard <mjw@redhat.com>
415
416 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
417 list of symbols allowed to have out of section values because of
418 GNU ld bugs in either .symtab or .dynsym, but only when they are
419 zero sized.
420
Mark Wielaard10186a12013-01-24 11:29:21 +01004212013-01-24 Mark Wielaard <mjw@redhat.com>
422
423 * readelf.c (argp_option): Add unresolved-address-offsets, U.
424 (print_unresolved_addresses): New static.
425 (parse_opt): Handle 'U', set print_unprocessed_values.
426 (format_dwarf_addr): Take and handle new raw argument.
427 (print_ops): Call format_dwarf_addr with raw offset values.
428 (print_debug_ranges_section): Likewise.
429 (print_debug_frame_section): Likewise.
430 (attr_callback): Likewise.
431 (print_debug_line_section): Likewise.
432 (print_debug_loc_section): Likewise.
433 (print_gdb_index_section): Likewise.
434
Mark Wielaard24257102013-01-18 22:19:08 +01004352013-01-18 Mark Wielaard <mjw@redhat.com>
436
437 * readelf.c (struct listptr): Add base Dwarf_Addr field.
438 (compare_listptr): Warn for same offset with different base.
439 (notice_listptr): Take base argument and set it.
440 (skip_listptr_hole): Likewise.
441 (struct attrcb_args): Removed unused cu_offset field.
442 Add cu_base Dwarf_Addr field.
443 (attr_callback): Call notice_listptr with cbargs->cu_base.
444 (print_debug_units): Set args.cu_base.
445 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
446 (print_debug_loc_section): Likewise.
447
Jan Kratochvilc44cce02012-10-10 19:32:05 +02004482013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
449
450 * readelf.c (handle_core_items): Limit special repeated items handling
451 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
452
Mark Wielaard6d258ce2013-01-16 15:19:20 +01004532012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
454
455 * readelf.c (ELF_INPUT_SECTION): New argp key value.
456 (argp_option): Add elf-section.
457 (elf_input_section): New static.
458 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
459 (open_input_section): New function.
460 (process_file): Call open_input_section if elf_input_section set.
461
David Abdurachmanov1a4d0662013-01-13 16:44:21 +01004622013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
463
464 ar.c (do_oper_delete): Fix num passed to memset.
465
Mark Wielaard55324042012-12-21 10:02:11 +01004662012-12-21 Mark Wielaard <mjw@redhat.com>
467
Mark Wielaard00f758c2012-12-21 22:11:44 +0100468 * readelf.c (print_debug_frame_section): Adjust FDE start address
469 if pcrel before feeding it to format_dwarf_addr.
470
4712012-12-21 Mark Wielaard <mjw@redhat.com>
472
473 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +0100474
Roland McGrath57bd66c2012-12-11 09:42:07 -08004752012-12-11 Roland McGrath <roland@hack.frob.com>
476
477 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
478 sh_name case.
479 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
480
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +01004812012-10-16 Mark Wielaard <mjw@redhat.com>
482
483 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
484 calculated beginning after the operand and 2-byte constant.
485
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02004862012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
487
488 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
489 (WRAP_COLUMN): ... here.
490 (print_core_item): Remove parameter format_max. Update function
491 comment. Replace FORMAT_MAX by the real output width.
492 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
493 calls of print_core_item, remove variable maxfmt, change
494 ITEM_WRAP_COLUMN to WRAP_COLUMN.
495 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
496 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
497
Roland McGrath82ed98a2012-10-11 14:53:18 -07004982012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
499
500 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
501 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
502
Mark Wielaarde89c5002012-08-27 14:30:05 +02005032012-08-27 Mark Wielaard <mjw@redhat.com>
504
Mark Wielaard3e440062012-08-27 15:21:58 +0200505 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
506
5072012-08-27 Mark Wielaard <mjw@redhat.com>
508
Mark Wielaarde89c5002012-08-27 14:30:05 +0200509 * readelf.c (register_info): Handle loc == NULL.
510
Jeff Kenton257dcf42012-08-22 09:00:03 -04005112012-08-22 Jeff Kenton <jkenton@tilera.com>
512
513 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
514
Mark Wielaardf31c4412012-08-17 00:35:03 +02005152012-08-16 Mark Wielaard <mjw@redhat.com>
516
517 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
518 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
519 appropriate.
520 (dwarf_attr_name): Likewise.
521 (dwarf_form_name): Likewise.
522 (dwarf_lang_name): Likewise.
523 (dwarf_inline_name): Likewise.
524 (dwarf_encoding_name): Likewise.
525 (dwarf_access_name): Likewise.
526 (dwarf_visibility_name): Likewise.
527 (dwarf_virtuality_name): Likewise.
528 (dwarf_identifier_case_name): Likewise.
529 (dwarf_calling_convention_name): Likewise.
530 (dwarf_ordering_name): Likewise.
531 (dwarf_discr_list_name): Likewise.
532 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
533 (attr_callback): Call new dwarf_foobar_name instead of old
534 dwarf_foobar_string functions.
535 (dwarf_tag_string): New function using known-dwarf.h macros.
536 (dwarf_attr_string): Likewise.
537 (dwarf_form_string): Likewise.
538 (dwarf_lang_string): Likewise.
539 (dwarf_inline_string): Likewise.
540 (dwarf_encoding_string): Likewise.
541 (dwarf_access_string): Likewise.
542 (dwarf_visibility_string): Likewise.
543 (dwarf_virtuality_string): Likewise.
544 (dwarf_identifier_case_string): Likewise.
545 (dwarf_calling_convention_string): Likewise.
546 (dwarf_ordering_string): Likewise.
547 (dwarf_discr_list_string): Likewise.
548 (dwarf_locexpr_opcode_string): Likewise.
549
Mark Wielaard775375e2012-06-22 12:02:45 +02005502012-06-27 Mark Wielaard <mjw@redhat.com>
551
552 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
553 DW_FORM_GNU_strp_alt.
554 (attr_callback): Likewise.
555
Petr Machatafe198bc2012-07-30 19:48:28 +02005562012-07-30 Petr Machata <pmachata@redhat.com>
557
558 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
559 corresponding printf) so that those that are referenced by only
560 one of the formatting strings are at the end.
561
Mark Wielaard629b2562012-07-29 14:05:20 +02005622012-07-29 Mark Wielaard <mjw@redhat.com>
563
564 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
565 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
566
Mark Wielaard515fba92012-07-20 00:09:56 +02005672012-07-19 Mark Wielaard <mjw@redhat.com>
568
569 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
570
Mark Wielaarde9b23882012-06-29 22:30:15 +02005712012-07-11 Mark Wielaard <mjw@redhat.com>
572
573 * readelf.c (options): Add macro to help of debug-dump.
574 (section_e): Add section_macro.
575 (section_all): Add section_macro.
576 (parse_opt): Handle macro.
577 (print_debug_macro_section): New function.
578 (print_debug): Add NEW_SECTION (macro).
579
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02005802012-07-10 Mark Wielaard <mjw@redhat.com>
581
582 * readelf.c (print_gdb_index_section): Add version 7 support.
583 Keep track of cu_nr. Print kind and static/global flag for each
584 symbol. When a symbol is in the TU list add 'T'.
585
Mark Wielaarda0172d72012-06-25 17:18:53 +02005862012-06-26 Mark Wielaard <mjw@redhat.com>
587
588 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
589
Mark Wielaard50e2d392012-06-22 16:44:54 +02005902012-06-22 Mark Wielaard <mjw@redhat.com>
591
592 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
593 for gcc 4.7 -Wformat.
594
Mark Wielaard36aa5982012-05-09 11:27:44 +02005952012-05-09 Roland McGrath <roland@hack.frob.com>
596
597 * elflint (check_sections): Allow zero sized sections at (filesz) end
598 of segment. And make check overflow-proofed.
599
Mark Wielaard716486d2012-04-24 11:56:42 +02006002012-04-24 Mark Wielaard <mjw@redhat.com>
601
602 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
603 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
604
Roland McGrath738c1832012-03-28 15:01:49 -07006052012-03-28 Roland McGrath <roland@hack.frob.com>
606
607 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
608
Mark Wielaard61651c12012-03-28 11:20:36 +02006092012-03-28 Mark Wielaard <mjw@redhat.com>
610
611 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
612 section data.
613 (print_debug_str_section): Likewise.
614
Mark Wielaard30bb7142012-03-21 16:05:31 +01006152012-03-21 Mark Wielaard <mjw@redhat.com>
616
617 * readelf.c (print_gdb_index_section): Accept version 6.
618
Mark Wielaardcb643d62012-01-31 19:22:03 +01006192012-01-31 Mark Wielaard <mjw@redhat.com>
620
621 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
622
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05006232012-01-21 Ulrich Drepper <drepper@gmail.com>
624
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500625 * addr2line.c: Update copyright year.
626 * ar.c: Likewise.
627 * elfcmp.c: Likewise.
628 * elflint.c: Likewise.
629 * findtextrel.c: Likewise.
630 * ld.c: Likewise.
631 * nm.c: Likewise.
632 * objdump.c: Likewise.
633 * ranlib.c: Likewise.
634 * readelf.c: Likewise.
635 * size.c: Likewise.
636 * strings.c: Likewise.
637 * strip.c: Likewise.
638 * unstrip.c: Likewise.
639
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -0500640 * nm.c (argp_children): Define.
641 (argp): Hook up argp_children.
642 (handle_ar): Optimize puts call.
643 (show_symbols_bsd): Use positional parameters to also print color
644 codes. Don't print STT_FILE symbols.
645 * objdump.c (options): Improve help text.
646 (argp_children): Define.
647 (argp): Hook up argp_children.
648 (disasm_info): Add elements for color codes.
649 (disasm_output): Print color codes as well.
650 (show_disasm): Set up disasm_info data for callback.
651
Roland McGrath85924782012-01-20 11:40:59 -08006522012-01-20 Roland McGrath <roland@hack.frob.com>
653
Roland McGrath3284b792012-01-20 12:51:46 -0800654 * arlib-argp.c (arlib_deterministic_output): Initialize from
655 configured value.
656 (help_filter): New function.
657 (argp): Use it.
658
Roland McGrath9bffd362012-01-20 12:04:19 -0800659 * ar.c (main): Handle oper_none as usage error.
660
Roland McGrath6e063d92012-01-20 11:43:36 -0800661 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
662
Roland McGrath85924782012-01-20 11:40:59 -0800663 * ranlib.c (argp): Use arlib_argp_children.
664
665 * arlib.c (arlib_init): Obey arlib_deterministic_output.
666
667 * arlib-argp.c: New file.
668 * Makefile.am (libar_a_SOURCES): Add it.
669 * arlib.h (arlib_deterministic_output, arlib_argp_children):
670 Declare new variables.
671 * ar.c (deterministic_output): Variable removed.
672 (do_oper_insert): Use arlib_deterministic_output instead.
673 (options, parse_opt): Don't handle -D here. Add group numbers.
674 (argp): Use arlib_argp_children.
675
Roland McGratha065c4b2011-12-20 10:55:01 -08006762011-12-20 Roland McGrath <roland@hack.frob.com>
677
678 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
679 Reported by Karel Klic <kklic@redhat.com>.
680
Roland McGrath4fa988e2011-11-05 20:58:14 -07006812011-11-05 Roland McGrath <roland@hack.frob.com>
682
Roland McGrathe5ba2a12011-11-05 21:08:07 -0700683 * ar.c (deterministic_output): New flag variable.
684 (options, parse_opt): Grok -D to set it.
685 (do_oper_insert): When set, use zero from mtime, uid, and gid.
686
Roland McGrath4fa988e2011-11-05 20:58:14 -0700687 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
688
Marek Polacek8d1e2972011-10-04 05:11:42 -04006892011-10-04 Marek Polacek <mpolacek@redhat.com>
690
691 * readelf.c (register_info): Assume the right size of an array.
692
Ulrich Drepper2356ba02011-10-03 07:23:07 -04006932011-10-03 Ulrich Drepper <drepper@gmail.com>
694
695 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
696 but don't show it in help anymore.
697 (mark_special): Renamed from mark_weak.
698 (parse_opt): Adjust.
699 (class_type_char): Take additional parameters for ELF file and ELF
700 header. Treat TLS symbols like objects.
701 In case of D symbols, show u for unique symbols, R for symbols in
702 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400703 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400704 header. Adjust for class_type_char change. Show TLS symbols with
705 @ after them in case --mark-special is selected.
706 (show_symbols_posix): Likewise.
707 (show_symbols): Adjust calls to show_symbols_bsd and
708 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -0400709 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -0400710 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -0400711
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -04007122011-10-02 Ulrich Drepper <drepper@gmail.com>
713
714 * Makefile.am (demanglelib): Define.
715 (nm_LDADD): Add demanglelib.
716 * nm.c (options): Add -C option.
717 (demangle): Define as global variable.
718 (parse_opt): Recognize -C.
719 (show_symbols_sysv): Handle demangling.
720 (show_symbols_bad): Likewise.
721 (show_symbols_posix): Likewise.
722 (show_symbols): Likewise.
723
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07007242011-07-09 Roland McGrath <roland@hack.frob.com>
725
Roland McGrathbd754192011-07-09 05:33:37 -0700726 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
727
728 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700729
Mark Wielaard02a958b2011-05-30 17:23:57 +02007302011-05-30 Mark Wielaard <mjw@redhat.com>
731
732 * strip.c (relocate): Make offset check overflow-proof.
733
Mark Wielaard1662bc32011-05-16 11:33:11 +02007342011-05-23 Mark Wielaard <mjw@redhat.com>
735
Mark Wielaard63868c22011-05-24 16:09:31 +0200736 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -0700737 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +0200738 Relocate against any debug section symbol, not just STT_SECTION
739 symbols. For SHT_REL relocations, fetch addend from offset and
740 add it to symbol value if not zero.
741
7422011-05-23 Mark Wielaard <mjw@redhat.com>
743
Mark Wielaard1662bc32011-05-16 11:33:11 +0200744 * strip.c (OPT_RELOC_DEBUG): New option.
745 (argp_option): Add new --reloc-debug-sections option.
746 (main): Check new option.
747 (parse_opt): Likewise.
748 (handle_elf): Remove any relocations between debug sections
749 in ET_REL for the debug file when requested.
750
Mark Wielaard7a125b92011-05-17 12:20:01 +02007512011-05-18 Mark Wielaard <mjw@redhat.com>
752
753 * strip.c (handle_elf): Make sure all sections of a removed group
754 section are removed too. Don't discard SHT_GROUP sections, copy
755 section table before it gets modified. Section group signature
756 symbols don't have to be retained.
757
Jakub Jelinek03124242011-05-17 17:00:14 +02007582011-05-16 Jakub Jelinek <jakub@redhat.com>
759
760 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
761 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
762 and DW_OP_GNU_reinterpret.
763
Mark Wielaard69a9b112011-05-17 15:34:02 +02007642011-05-17 Mark Wielaard <mjw@redhat.com>
765
766 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
767 DW_TAG_GNU_call_site_parameter return strings.
768
Marek Polacekc8920de2011-05-12 12:08:21 +02007692011-05-11 Marek Polacek <mpolacek@redhat.com>
770
771 * nm.c (show_symbols_sysv): Remove unused if/else, remove
772 unused `prefix' and `fname' parameters.
773
Marek Polacek82f77d72011-05-07 19:26:20 +02007742011-05-07 Marek Polacek <mpolacek@redhat.com>
775
776 * unstrip.c (compare_sections_nonrel): Mark this function as static.
777
Mark Wielaardbb9d1b42011-04-24 17:53:38 +02007782011-04-26 Mark Wielaard <mjw@redhat.com>
779
780 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
781 with note name.
782
Mark Wielaard093a1d32011-04-14 23:47:26 +02007832011-04-14 Mark Wielaard <mjw@redhat.com>
784
785 * readelf.c (options): Add gdb_index.
786 (section_e): Define section_gdb_index.
787 (parse_opt): Recognize gdb_index debug-dump argument.
788 (print_gdb_index_section): New function.
789 (print_debug): Add gdb_index to debug_sections.
790
Petr Machata1879e5b2011-03-25 15:17:04 +01007912011-03-24 Petr Machata <pmachata@redhat.com>
792
793 * readelf.c (print_debug_line_section): Emit initial space for all
794 opcode lines. Print offset in front of each opcode.
795
Marek Polacek44de92a2011-03-22 01:07:20 +01007962011-03-22 Marek Polacek <mpolacek@redhat.com>
797
798 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
799
Mark Wielaarde3368c52011-03-22 23:03:31 +01008002011-03-22 Mark Wielaard <mjw@redhat.com>
801
802 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
803 and DW_TAG_GNU_call_site_parameter.
804 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
805 DW_AT_GNU_call_site_data_value,
806 DW_AT_GNU_call_site_target,
807 DW_AT_GNU_call_site_target_clobbered,
808 DW_AT_GNU_tail_call,
809 DW_AT_GNU_all_tail_call_sites,
810 DW_AT_GNU_all_call_sites,
811 and DW_AT_GNU_all_source_call_sites.
812 (print_ops): Handle DW_OP_GNU_entry_value.
813 (attr_callback): Handle DW_AT_GNU_call_site_value,
814 DW_AT_GNU_call_site_data_value,
815 DW_AT_GNU_call_site_target,
816 and DW_AT_GNU_call_site_target_clobbered.
817
Mark Wielaarda062b6b2011-03-10 13:02:32 +01008182011-03-10 Mark Wielaard <mjw@redhat.com>
819
820 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
821
Jan Kratochvilfec39992011-02-27 12:01:25 -08008222011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
823
824 * readelf.c (reset_listptr): Clear TABLE->TABLE.
825
Mark Wielaardcf454ab2011-02-25 12:58:54 +01008262011-02-25 Mark Wielaard <mjw@redhat.com>
827
828 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
829 (dwarf_form_string): Properly format and return unknown form.
830
Roland McGrath47c53232011-02-23 09:23:08 -08008312011-02-23 Roland McGrath <roland@redhat.com>
832
Roland McGrath725aad52011-02-23 19:52:46 -0800833 * readelf.c (section_name): New function.
834 (print_debug_abbrev_section): Use it instead of constant.
835 (print_debug_aranges_section): Likewise.
836 (print_debug_ranges_section): Likewise.
837 (print_debug_units): Likewise.
838 (print_debug_line_section): Likewise.
839 (print_debug_loc_section): Likewise.
840 (print_debug_macinfo_section): Likewise.
841 (print_debug_pubnames_section): Likewise.
842 (print_debug_str_section): Likewise.
843 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
844 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
845 (print_debug_str_section): Likewise.
846
Roland McGrath47c53232011-02-23 09:23:08 -0800847 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
848
Roland McGrath1fb9c912011-02-11 10:32:30 -08008492011-02-11 Roland McGrath <roland@redhat.com>
850
Roland McGrath4a14ef72011-02-11 10:42:45 -0800851 * elfcmp.c (verbose): New variable.
852 (options, parse_opt): Grok -l/--verbose to set it.
853 (main): Under -l, keep going after first difference.
854
Roland McGrath1fb9c912011-02-11 10:32:30 -0800855 * elfcmp.c (ignore_build_id): New variable.
856 (options, parse_opt): Grok --ignore-build-id to set it.
857 (main): For SHT_NOTE sections, compare note details rather than raw
858 bytes. Under --ignore-build-id, don't complain about differing build
859 ID contents if lengths match.
860
Roland McGrathfd992542011-02-08 19:45:12 -08008612011-02-08 Roland McGrath <roland@redhat.com>
862
Roland McGrath240784b2011-02-08 19:48:42 -0800863 * ldscript.y (filename_id_star): Remove unused variable.
864
Roland McGrath8f6c1792011-02-08 19:48:02 -0800865 * unstrip.c (copy_elided_sections): Remove unused variable.
866
Roland McGrath4db89f02011-02-08 19:46:50 -0800867 * elflint.c (check_dynamic): Remove unused variables.
868
Roland McGrath33231312011-02-08 19:45:26 -0800869 * elflint.c (check_symtab): Warn about missing xndx section only once.
870
Roland McGrathfd992542011-02-08 19:45:12 -0800871 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
872
Roland McGrathf151b7d2011-01-06 12:14:43 -08008732011-01-06 Roland McGrath <roland@redhat.com>
874
875 * strip.c (handle_elf): Under --strip-sections, remove all
876 non-allocated sections and never generate .gnu_debuglink.
877
Roland McGrath0b9d1fb2011-01-04 19:29:24 -08008782011-01-04 Roland McGrath <roland@redhat.com>
879
880 * strip.c (remove_shdrs): New variable.
881 (options, parse_opt): Grok --strip-sections to set it.
882 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
883
Roland McGrath77221de2010-11-10 19:47:31 -08008842010-11-10 Roland McGrath <roland@redhat.com>
885
886 * findtextrel.c (process_file): Don't assume order of sections.
887 Reported by Mike Hommey <mh@glandium.org>.
888
Roland McGrath932585d2010-05-08 04:01:14 -07008892010-07-26 Roland McGrath <roland@redhat.com>
890
891 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
892
Roland McGratha1599152010-08-30 04:04:37 -07008932010-08-30 Roland McGrath <roland@redhat.com>
894
Roland McGrathfa144952010-08-30 19:22:41 -0700895 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
896 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
897 for ranges, loc.
898 (struct listptr, struct listptr_table): New types.
899 (compare_listptr, reset_listptr, sort_listptr): New functions.
900 (notice_listptr, skip_listptr_hole): New functions.
901 (struct attrcb_args): Add silent member.
902 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
903 Suppress output if silent, but still call notice_listptr.
904 (print_debug_units): Suppress output if section_info not requested.
905 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
906 (print_debug_ranges_section): Likewise.
907 (print_debug): Call reset_listptr on both tables.
908
909 * readelf.c (print_debug_ranges_section): Print empty list.
910 (print_debug_loc_section): Likewise.
911
Roland McGratha1599152010-08-30 04:04:37 -0700912 * readelf.c (print_debug_loc_section): Check for bogus length
913 before calling print_ops.
914 (print_ops): Check harder for bogus data that would read off end.
915
Roland McGrathf4763cf2010-08-11 13:04:12 -07009162010-08-11 Roland McGrath <roland@redhat.com>
917
918 * readelf.c (for_each_section_argument): Process all sections with
919 matching name, not just the first.
920
Roland McGrath52604ba2010-07-26 21:29:44 -07009212010-07-26 Roland McGrath <roland@redhat.com>
922
923 * readelf.c (print_ops): Take new argument for CU version.
924 Fix DW_OP_call_ref decoding to depend on it.
925 (print_debug_loc_section): Update caller.
926 (print_cfa_program): Take new argument, pass it down.
927 (print_debug_frame_section): Update caller.
928 (struct attrcb_args): New member version.
929 (print_debug_units): Initialize it.
930
Roland McGrath2f14a312010-07-02 11:16:25 -07009312010-07-02 Roland McGrath <roland@redhat.com>
932
933 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
934 initial_location.
935
Roland McGrathb6458032010-06-30 11:57:19 -07009362010-06-30 Roland McGrath <roland@redhat.com>
937
938 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
939 Ignore st_size for a non-S_ISREG file descriptor.
940 (read_block): Move assert after no-mmap bail-out.
941 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
942
Roland McGrathfa799902010-06-22 13:05:23 -07009432010-06-22 Roland McGrath <roland@redhat.com>
944
945 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
946
Roland McGrath0c5638c2010-06-21 23:00:35 -07009472010-06-21 Roland McGrath <roland@redhat.com>
948
949 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -0700950 (dwarf_attr_string): Add new attributes.
951 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -0700952
953 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
954 (print_cfa_program): Likewise.
955
Roland McGrathe5251a12010-06-20 16:59:39 -07009562010-06-20 Roland McGrath <roland@redhat.com>
957
Roland McGrath2b1f0952010-06-20 17:55:50 -0700958 * readelf.c (print_debug_units): New function, broken out of ...
959 (print_debug_info_section): ... here. Call it.
960 (print_debug_types_section): New function.
961 (enum section_e): Add section_types alias for section_info.
962 (print_debug): Add types to the sections table.
963
Roland McGrath599f7f52010-06-20 17:12:43 -0700964 * readelf.c (print_debug_frame_section): Handle version 4 format.
965
Roland McGrathe5251a12010-06-20 16:59:39 -0700966 * readelf.c (print_debug_line_section): Handle version 4 format.
967
Roland McGrathec86e5f2010-06-14 17:44:38 -07009682010-06-14 Roland McGrath <roland@redhat.com>
969
970 * unstrip.c (copy_elided_sections): Make sure all sections' data have
971 been read in before we write anything out.
972
Roland McGrath3b1b6512010-06-04 02:26:30 -07009732010-06-04 Roland McGrath <roland@redhat.com>
974
Roland McGrathaa32f922010-06-04 02:29:08 -0700975 * unstrip.c (update_shdr): New function.
976 (update_sh_size): Call it instead of gelf_update_shdr.
977 (adjust_relocs, add_new_section_symbols): Likewise.
978 (new_shstrtab, copy_elided_sections): Likewise.
979
Roland McGrath3b1b6512010-06-04 02:26:30 -0700980 * unstrip.c (copy_elided_sections): Bail if stripped file has more
981 sections than unstripped file, rather than getting confused later.
982
Roland McGrath7a5bed82010-06-01 13:44:00 -07009832010-06-01 Roland McGrath <roland@redhat.com>
984
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700985 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
986 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -0700987 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700988
Roland McGrath7a5bed82010-06-01 13:44:00 -0700989 * readelf.c (print_debug): Don't bail if libdw setup fails.
990 Suppress complaint if we only want .eh_frame anyway.
991
Ulrich Drepper173ade82010-05-28 07:39:49 -07009922010-05-28 Ulrich Drepper <drepper@redhat.com>
993
994 * readelf.c (attr_callback): Also print form information.
995
Roland McGrath12e3d1f2010-05-19 18:03:31 -07009962010-05-19 Roland McGrath <roland@redhat.com>
997
998 * addr2line.c (find_symbol): Short-circuit on empty name.
999 (handle_address): Handle SYMBOL with no +OFFSET.
1000
Roland McGrath688f7fc2010-05-08 03:22:59 -070010012010-05-08 Roland McGrath <roland@redhat.com>
1002
1003 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
1004 Use that for DW_OP_call_ref, not ADDRSIZE.
1005 (print_cfa_program): Update caller.
1006 (struct attrcb_args): Add offset_size field.
1007 (attr_callback): Use it for print_ops call.
1008 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -07001009 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -07001010
Roland McGrath62b28b62010-04-14 11:54:06 -070010112010-04-14 Roland McGrath <roland@redhat.com>
1012
1013 * readelf.c (handle_core_item): Fix bitmask printing.
1014
Roland McGrath3b495d82010-04-06 12:58:32 -070010152010-04-06 Roland McGrath <roland@redhat.com>
1016
1017 * ld.c (options): Fix some typos in messages.
1018 * elflint.c (check_scn_group, check_group): Likewise.
1019 * ldscript.y (add_id_list): Likewise.
1020 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
1021 before translated string containing a literal %.
1022
Roland McGrath890081b2010-02-26 17:57:50 -080010232010-02-26 Roland McGrath <roland@redhat.com>
1024
1025 * readelf.c (process_file): Don't leak an fd in failure case.
1026
Roland McGrathc2b26f12010-02-15 15:16:15 -080010272010-02-15 Roland McGrath <roland@redhat.com>
1028
Roland McGrath22359e22010-02-15 15:57:03 -08001029 * Makefile.am: Use config/eu.am for common stuff.
1030
Roland McGrathc2b26f12010-02-15 15:16:15 -08001031 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
1032 mismatch in comparison.
1033
Roland McGrathf920fd52010-02-02 15:50:15 -080010342010-02-02 Roland McGrath <roland@redhat.com>
1035
1036 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
1037 (read_encoded): Likewise.
1038 (print_debug_frame_section): Check for bogus augmentation length.
1039 For P augmentation, use read_encoded, print the encoding description,
1040 and use hex for unsigned values.
1041
Roland McGrathb337b1f2010-01-15 01:02:27 -080010422010-01-15 Roland McGrath <roland@redhat.com>
1043
1044 * ar.c: Include <sys/stat.h>.
1045 * elflint.c: Likewise.
1046 * readelf.c: Likewise.
1047 * strip.c: Likewise.
1048 * unstrip.c: Likewise
1049
Roland McGrathbd733ca2010-01-07 20:11:42 -080010502010-01-07 Roland McGrath <roland@redhat.com>
1051
Roland McGrath8111da02010-01-07 20:31:59 -08001052 * readelf.c (print_ehdr): Handle PN_XNUM.
1053 (phnum): New static variable.
1054 (process_elf_file): Set it with elf_getphdrnum.
1055 (print_phdr): Use phnum instead of EHDR->e_phnum.
1056 (print_dynamic, handle_notes): Likewise.
1057 (handle_relocs_rel, handle_relocs_rela): Likewise.
1058
Roland McGrathbd733ca2010-01-07 20:11:42 -08001059 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
1060
1061 * elflint.c (phnum): New static variable.
1062 (check_elf_header): Set it, handling PN_XNUM.
1063 Use that in place of EHDR->e_phnum throughout.
1064 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
1065 (unknown_dependency_p, check_sections, check_program_header): Likewise.
1066
Roland McGrath019d9fb2010-01-05 13:36:07 -080010672010-01-05 Roland McGrath <roland@redhat.com>
1068
1069 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
1070 DW_AT_GNU_template_name.
1071
Roland McGrathe4061d02010-01-04 20:25:09 -080010722010-01-04 Roland McGrath <roland@redhat.com>
1073
Roland McGrath0ccbbcd2010-01-04 21:59:07 -08001074 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
1075 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
1076 (handle_core_item): Handle .format of '\n' as \n-separated strings.
1077
Roland McGrath2e79deb2010-01-04 20:36:10 -08001078 * readelf.c (implicit_debug_sections): New variable.
1079 (parse_opt): Set it instead of print_debug_sections for -a.
1080 OR them together for print_debug check.
1081 (print_debug): OR them together for section check.
1082
Roland McGratha7422be2010-01-04 20:29:33 -08001083 * readelf.c (options): Repartition into set implied by -a and others.
1084 Correct -a text to match reality.
1085
Roland McGrathe4061d02010-01-04 20:25:09 -08001086 * readelf.c (struct section_argument): Add bool member 'implicit'.
1087 (parse_opt): Set it for -a cases, clear it for -x args.
1088 (for_each_section_argument): Don't complain about a missing section by
1089 name if it's implicit.
1090
Roland McGrathefa64962009-11-16 01:50:58 -080010912009-11-16 Roland McGrath <roland@redhat.com>
1092
1093 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
1094 sections, just as dump_data_section already does.
1095
Mark Wielaardc49d00a2009-09-21 16:47:07 -070010962009-09-21 Ulrich Drepper <drepper@redhat.com>
1097
1098 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
1099 set for .comment section.
1100 Patch by Mark Wielaard <mjw@redhat.com>.
1101
Roland McGrathfb33c672009-09-08 00:21:18 -070011022009-09-08 Roland McGrath <roland@redhat.com>
1103
1104 * ar.c (main): Fix typo in message format.
1105
Roland McGrath2d13ea22009-08-21 03:16:32 -070011062009-08-21 Roland McGrath <roland@redhat.com>
1107
1108 * readelf.c (attr_callback): Use print_block only when we don't use
1109 print_ops.
1110
Roland McGrath536127f2009-08-14 13:10:09 -070011112009-08-14 Roland McGrath <roland@redhat.com>
1112
1113 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1114
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -070011152009-08-01 Ulrich Drepper <drepper@redhat.com>
1116
1117 * debugpred.h: Add two most const.
1118
Mark Wielaardbc1b92e2009-07-26 08:33:18 -070011192009-07-26 Mark Wielaard <mjw@redhat.com>
1120
1121 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
1122
Mark Wielaard79178202009-07-25 12:44:46 -070011232009-07-25 Mark Wielaard <mjw@redhat.com>
1124
1125 * Makefile.am (addr2line_LDADD): Add $(libelf).
1126
Roland McGrathbe4589d2009-07-24 16:23:12 -070011272009-07-24 Roland McGrath <roland@redhat.com>
1128
1129 * readelf.c (print_block): New function.
1130 (print_ops): Use it.
1131 (attr_callback): Use it for DW_FORM_block* forms.
1132
Mark Wielaarddaf85b22009-07-24 15:49:51 -070011332009-07-20 Mark Wielaard <mjw@redhat.com>
1134
1135 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
1136 and DW_OP_stack_value.
1137
Ulrich Drepper96d950e2009-07-14 10:42:01 -070011382009-07-14 Ulrich Drepper <drepper@redhat.com>
1139
1140 * elflint.c (check_elf_header): Allow Linux ABI.
1141 (check_symtab): Handle STB_GNU_UNIQUE.
1142
Mark Wielaardf735db12009-07-08 19:18:53 +020011432009-07-08 Mark Wielaard <mjw@redhat.com>
1144
1145 * readelf.c (attr_callback): Handle DW_Form constants for
1146 DW_AT_data_member_location.
1147
Roland McGrathdffc33d2009-07-06 16:06:41 -070011482009-07-06 Roland McGrath <roland@redhat.com>
1149
1150 * readelf.c (register_info): New function. Handle unknown register #s.
1151 (print_cfa_program): Use it.
1152 (handle_core_register, handle_core_registers): Likewise.
1153
Roland McGrath5dbccdb2009-06-28 14:48:02 -070011542009-06-28 Roland McGrath <roland@redhat.com>
1155
1156 * readelf.c (print_address_names): New static variable.
1157 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
1158 (format_dwarf_addr): Don't look up name if !print_address_names.
1159
Ulrich Drepperf1894932009-06-13 15:55:42 -070011602009-06-13 Ulrich Drepper <drepper@redhat.com>
1161
1162 * ldgeneric.c: Don't use deprecated libelf functions.
1163 * nm.c: Likewise.
1164 * objdump.c: Likewise.
1165 * readelf.c: Likewise.
1166 * size.c: Likewise.
1167 * strip.c: Likewise.
1168 * unstrip.c: Likewise.
1169 * ld.h: Fix up comment.
1170
Ulrich Drepperb47d2902009-06-01 07:38:32 -070011712009-06-01 Ulrich Drepper <drepper@redhat.com>
1172
1173 * readelf.c (print_relocs): Expect ELF header argument and pass on
1174 to handle_relocs_rel* functions. Adjust caller.
1175 (handle_relocs_rel): Add ELF header argument. Add special case for
1176 the IRELATIVE relocations in statically linked executables.
1177 (handle_relocs_rela): Likewise.
1178
Roland McGrathdb19f0b2009-05-07 18:44:27 -070011792009-04-29 Ulrich Drepper <drepper@redhat.com>
1180
1181 * elflint.c (check_symtab): Add tests of st_other field.
1182
Ulrich Drepperaab90f92009-04-23 07:44:36 -070011832009-04-23 Ulrich Drepper <drepper@redhat.com>
1184
1185 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
1186
Roland McGrathd86e1832009-04-20 00:49:33 -070011872009-04-20 Roland McGrath <roland@redhat.com>
1188
Roland McGrath8a592412009-04-20 01:20:44 -07001189 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
1190 of inline call sites.
1191
Roland McGrathd86e1832009-04-20 00:49:33 -07001192 * addr2line.c (just_section): New variable.
1193 (adjust_to_section): New function, broken out of ...
1194 (handle_address): ... here.
1195 (options, parse_opt): Add -j/--section=NAME to set it.
1196
Roland McGrath2fb90512009-04-15 14:47:13 -070011972009-04-15 Roland McGrath <roland@redhat.com>
1198
1199 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
1200 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
1201
Roland McGrath04a14162009-04-14 01:02:17 -070012022009-04-14 Roland McGrath <roland@redhat.com>
1203
Roland McGratheb9ba472009-04-14 18:44:45 -07001204 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
1205 like SHT_GNU_ATTRIBUTES.
1206
Roland McGrath94f43832009-04-14 04:39:32 -07001207 * readelf.c (handle_core_registers): Fix error message.
1208
Roland McGrath04a14162009-04-14 01:02:17 -07001209 * strip.c (handle_elf: check_preserved): Don't note any change when
1210 .debug_data is already filled from a previous pass.
1211
Ulrich Drepper411cdb22009-02-05 22:04:26 -080012122009-02-05 Ulrich Drepper <drepper@redhat.com>
1213
Ulrich Drepper51b3f472009-02-05 22:10:39 -08001214 * objdump.c (show_relocs_x): Minor cleanups.
1215
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001216 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -08001217 Print first DW_CFA_expression and DW_CFA_val_expression parameter
1218 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001219
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080012202009-02-01 Ulrich Drepper <drepper@redhat.com>
1221
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001222 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
1223 into ...
1224 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -08001225 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001226
Ulrich Dreppercbb422e2009-02-01 18:18:55 -08001227 * objdump.c (show_relocs_rela): Show offsets as signed values.
1228
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08001229 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
1230 Improve some error messages.
1231 Use program_invocation_short_name instead of AR macro.
1232 * Makefile.am (CFLAGS_ar): Remove.
1233 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
1234 * objdump.c (parse_opt): Likewise.
1235 * readelf.c (parse_opt): Likewise.
1236
Roland McGrath51f01282009-01-27 17:08:03 -080012372009-01-27 Roland McGrath <roland@redhat.com>
1238
1239 * readelf.c (print_ops): Notice short length, don't overrun buffer
1240 (still need to fix LEB128).
1241
1242 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
1243
1244 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
1245
Ulrich Drepper62c46532009-01-24 17:01:08 -080012462009-01-24 Ulrich Drepper <drepper@redhat.com>
1247
1248 * readelf.c (print_debug_frame_section): Fix computation of vma_base
1249 for PC-relative mode.
1250
Ulrich Drepperd7285e12009-01-23 16:10:44 -080012512009-01-23 Ulrich Drepper <drepper@redhat.com>
1252
Ulrich Drepperccccab02009-01-23 16:32:21 -08001253 * size.c (process_file): When handling archive, close file descriptor
1254 here. For unknown file format also close file descriptor.
1255 (handle_ar): Don't close file descriptor here.
1256
Ulrich Drepperd7285e12009-01-23 16:10:44 -08001257 * readelf.c (parse_opt): Move code to add to dump_data_sections and
1258 string_sections list in local function add_dump_section. Adjust 'x'
1259 key handling. For 'a' key add .strtab, .dynstr, and .comment section
1260 to string_sections list.
1261
Roland McGrathe9de9b42009-01-22 13:05:40 -080012622009-01-22 Roland McGrath <roland@redhat.com>
1263
Roland McGrath9a847e12009-01-22 19:55:00 -08001264 * readelf.c (print_phdr): Don't print section mapping when no sections.
1265
Roland McGrathd759aa62009-01-22 19:17:07 -08001266 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
1267
Roland McGrathcabeeee2009-01-22 13:17:45 -08001268 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
1269 and reset it only for the 'true' cases.
1270
1271 * Makefile.am (addr2line_no_Wformat): New variable.
1272
Roland McGrathe9de9b42009-01-22 13:05:40 -08001273 * readelf.c (print_debug_frame_section): Use t instead of j formats
1274 for ptrdiff_t OFFSET.
1275
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080012762009-01-21 Ulrich Drepper <drepper@redhat.com>
1277
1278 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -08001279 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001280 (check_exception_data): First sanity test.
1281
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080012822009-01-17 Ulrich Drepper <drepper@redhat.com>
1283
Ulrich Drepper935edde2009-01-17 16:06:42 -08001284 * readelf.c (print_debug_exception_table): Show target of ar_disp
1285 field.
1286
1287 * elflint.c (check_program_header): Add most consistency checks for
1288 PT_GNU_EH_FRAME entry.
1289
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001290 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1291 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1292 * ar.c: Likewise.
1293 * elfcmp.c: Likewise.
1294 * elflint.c: Likewise.
1295 * findtextrel.c: Likewise.
1296 * ld.c: Likewise.
1297 * nm.c: Likewise.
1298 * objdump.c: Likewise.
1299 * ranlib.c: Likewise.
1300 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001301
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001302 * size.c: Likewise.
1303 * strings.c: Likewise.
1304 * strip.c: Likewise.
1305 * unstrip.c: Likewise.
1306
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080013072009-01-16 Ulrich Drepper <drepper@redhat.com>
1308
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001309 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1310 matches .eh_frame_hdr section, if it is available. Also check that
1311 the segment is allocated, not writable, not executable.
1312
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001313 * readelf.c: Add -e option. Dump exception and unwind related
1314 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001315 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001316 (print_debug_exception_table): Beginning of support.
1317 (print_debug): Hook up print_debug_exception_table for
1318 .gcc_except_table sections.
1319
1320 * readelf.c (print_debug_frame_section): Some fixes for last change.
1321
Ulrich Drepper351bf202009-01-15 20:18:40 -080013222009-01-15 Ulrich Drepper <drepper@redhat.com>
1323
1324 * readelf.c (print_encoding): Now a toplevel function.
1325 (print_relinfo): Likewise.
1326 (print_encoding_base): Broken out of print_debug_frame_section.
1327 (print_debug_frame_section): Print different header for .eh_frame
1328 sections. Fix recognition of matching CIEs in .debug_frame sections.
1329 Print absolute offset for PC-relative FDE locations. Don't print
1330 table header for FDEs if the table is empty.
1331 (read_encoded): New function.
1332 (print_debug_frame_hdr_section): New function.
1333 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1334 sections.
1335
1336 * readelf.c (handle_relocs_rel): Print section number.
1337 (print_debug_abbrev_section): Likewise.
1338 (print_debug_aranges_section): Likewise.
1339 (print_debug_ranges_section): Likewise.
1340 (print_debug_info_section): Likewise.
1341 (print_debug_line_section): Likewise.
1342 (print_debug_loc_section): Likewise.
1343 (print_debug_macinfo_section): Likewise.
1344 (print_debug_pubnames_section): Likewise.
1345 (print_debug_str_section): Likewise.
1346
Ulrich Drepper8b394632009-01-10 18:29:56 -080013472009-01-10 Ulrich Drepper <drepper@redhat.com>
1348
1349 * strings.c (read_block): Fix typo in error message string.
1350
Ulrich Drepper87cf5832009-01-07 20:39:21 -080013512009-01-07 Ulrich Drepper <drepper@redhat.com>
1352
1353 * ld.c (ld_new_searchdir): Fix adding to search path list.
1354
Ulrich Drepperac194d02009-01-06 00:30:01 -080013552009-01-06 Ulrich Drepper <drepper@redhat.com>
1356
1357 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001358
Roland McGrath3614d992009-01-05 18:05:32 -080013592009-01-05 Roland McGrath <roland@redhat.com>
1360
1361 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1362 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001363
Ulrich Drepper44173ed2009-01-01 19:00:41 -080013642009-01-01 Ulrich Drepper <drepper@redhat.com>
1365
1366 * addr2line.c: Update copyright year.
1367 * ar.c: Likewise.
1368 * elfcmp.c: Likewise.
1369 * elflint.c: Likewise.
1370 * findtextrel.c: Likewise.
1371 * ld.c: Likewise.
1372 * nm.c: Likewise.
1373 * objdump.c: Likewise.
1374 * ranlib.c: Likewise.
1375 * readelf.c: Likewise.
1376 * size.c: Likewise.
1377 * strings.c: Likewise.
1378 * strip.c: Likewise.
1379 * unstrip.c: Likewise.
1380
Roland McGrath468fe4d2008-12-11 21:00:12 -080013812008-12-11 Roland McGrath <roland@redhat.com>
1382
1383 * nm.c (sym_name): New function.
1384 (show_symbols_sysv): Use it in place of elf_strptr.
1385 (show_symbols_bsd, show_symbols_posix): Likewise.
1386 Fixes RHBZ#476136.
1387
1388 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1389 elf_strptr fails.
1390
Roland McGratha845f682008-12-03 03:41:58 +000013912008-12-02 Roland McGrath <roland@redhat.com>
1392
1393 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1394 nonzero OFFSET argument to dwfl_getmodules.
1395
Roland McGrath1d8bb252008-08-07 08:39:41 +000013962008-08-07 Roland McGrath <roland@redhat.com>
1397
1398 * addr2line.c (main): Pass string to handle_address.
1399 (see_one_module): New function, subroutine of handle_address.
1400 (find_symbol): Likewise.
1401 (handle_address): Take string argument rather than address.
1402 Convert plain number, or handle strings like "(section)+offset"
1403 or "symbol+offset".
1404
14052008-08-01 Roland McGrath <roland@redhat.com>
1406
1407 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1408 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1409
1410 * readelf.c (convert): Take new argument SIZE.
1411 (handle_core_register, handle_core_item): Update callers.
1412 (handle_core_item): Take new arg REPEATED_SIZE.
1413 (handle_core_items): Special case for a singleton item,
1414 let handle_core_item handle repeats if it wants to.
1415
1416 * readelf.c (handle_core_items): Give abridged output
1417 for identical groups repeated more than twice.
1418
14192008-07-04 Roland McGrath <roland@redhat.com>
1420
1421 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1422
Roland McGrath521c47d2008-04-11 07:01:58 +000014232008-04-10 Roland McGrath <roland@redhat.com>
1424
1425 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1426 refer to. Instead, just be sure to preserve the original symbol
1427 table in the debug file so those symbols go with their sections and
1428 can be elided from the stripped version of the symbol table.
1429
1430 * strip.c (handle_elf): When a discarded section kept in the debug
1431 file refers to a nondiscard section via sh_link/sh_info, preserve
1432 that nondiscarded section unmodified in the debug file as well.
1433 Skip adjustment of discarded sections symbol table references when
1434 that symbol table is copied in this way.
1435
1436 * elflint.c (check_symtab): Don't crash from missing symbol names
1437 after diagnosing bogus strtab.
1438
1439 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1440 adjustment for symtab changes.
1441
Roland McGrath13b69602008-04-01 02:30:05 +000014422008-03-31 Roland McGrath <roland@redhat.com>
1443
1444 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1445 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1446 excuse a special section.
1447
14482008-03-27 Roland McGrath <roland@redhat.com>
1449
1450 * elflint.c (check_sections): Check that executability and writability
1451 of sections is reflected in segment p_flags.
1452
Roland McGrathd11f9cb2008-03-26 20:51:59 +000014532008-03-26 Roland McGrath <roland@redhat.com>
1454
1455 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1456 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1457 is valid in RELRO.
1458
Roland McGrath47c5c352008-02-29 10:17:16 +000014592008-02-29 Roland McGrath <roland@redhat.com>
1460
1461 * readelf.c (print_attributes): Add a cast.
1462 * elflint.c (check_attributes): Likewise.
1463
1464 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1465 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1466 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1467
Ulrich Drepper834de6f2008-02-23 06:50:01 +000014682008-02-03 Ulrich Drepper <drepper@redhat.com>
1469
1470 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1471 when linked into executable.
1472 (elf_i386_create_relocations): Likewise.
1473
Roland McGrath059c83e2008-02-21 06:19:39 +000014742008-02-20 Roland McGrath <roland@redhat.com>
1475
1476 * readelf.c (print_attributes): New function.
1477 (process_elf_file): Call it under -A.
1478
1479 * elflint.c (check_attributes): Implement it for real.
1480
14812008-02-19 Roland McGrath <roland@redhat.com>
1482
1483 * elflint.c (special_sections): Handle .gnu.attributes section.
1484 (check_sections): Likewise.
1485 (check_attributes): New function.
1486
14872008-02-10 Roland McGrath <roland@redhat.com>
1488
1489 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1490 sections and ET_REL files.
1491
Ulrich Drepper712d78e2008-02-02 10:01:53 +000014922008-02-02 Ulrich Drepper <drepper@redhat.com>
1493
1494 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1495 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1496 and R_386_TLS_LE.
1497 (elf_i386_create_relocations): Likewise.
1498 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1499 elements.
1500 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1501 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1502 Fix generation of PT_GNU_STACK entry.
1503
Ulrich Drepperc54785a2008-02-01 18:05:21 +000015042008-02-01 Ulrich Drepper <drepper@redhat.com>
1505
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001506 * ld.c (replace_args): Prevent loop over replacements if the parameter
1507 is only two characters long.
1508
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001509 * ld.c: Recognize sha1 argument for --build-id parameter.
1510 * ldgeneric.c (create_build_id_section): Handle sha1.
1511 (compute_hash_sum): New function. Broken out of compute_build_id.
1512 Take hash function and context as parameters.
1513 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1514 implementation.
1515
Ulrich Drepper89759c72008-01-31 19:44:12 +000015162008-01-31 Ulrich Drepper <drepper@redhat.com>
1517
1518 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1519 * ld.c: Recognize --build-id command line parameter.
1520 * ld.h: Define scn_dot_note_gnu_build_id.
1521 (struct ld_state): Add build_id and buildidscnidx elements.
1522 * ldgeneric.c: Implement --build-id command line parameter.
1523 * ldlex.l (ID): Recognize - as valid character after the first one.
1524
Ulrich Drepper5530ec52008-01-29 10:42:07 +000015252008-01-29 Ulrich Drepper <drepper@redhat.com>
1526
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001527 * ld.c (replace_args): New function.
1528 (main): Use it to rewrite old-style parameters.
1529
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001530 * elf32-i386.script: Add .gnu.hash section.
1531 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1532 (fillin_special_symbol): Initialize st_size.
1533 (sortfct_hashval): New function.
1534 (create_gnu_hash): New function.
1535 (create_hash): New function.
1536 (ld_generic_create_outfile): Use the new functions to create the
1537 hash tables.
1538
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001539 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1540
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000015412008-01-24 Ulrich Drepper <drepper@redhat.com>
1542
1543 * elflint.c (check_group): Check that signature symbol for section
1544 group is not an empty string.
1545 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1546 section. Start implementation of --hash-style.
1547 * i386_ld.c: Likewise.
1548 * ld.c: Recognize --hash-style.
1549 * ld.h (struct scninfo): Add comdat_group.
1550 Add additional parameter to finalize_plt callback.
1551
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000015522008-01-22 Ulrich Drepper <drepper@redhat.com>
1553
1554 * ld.h (struct callbacks): Add initialize_gotplt.
1555 (struct scnhead): Add scn_dot_gotplt.
1556 (struct ld_state): Add gotpltscnidx.
1557 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1558 (elf_i386_initialize_pltrel): Likewise.
1559 (elf_i386_initialize_got): There is now a separate .got.plt, so
1560 don't do the PLT-related work here. Initialize d_type.
1561 (elf_i386_initialize_gotplt): New function.
1562 (elf_i386_plt0): Use ud2a after indirect jump.
1563 (elf_i386_pic_plt0_entry): Likewise.
1564 (elf_i386_finalize_plt): Reference now .got.plt.
1565 (elf_i386_count_relocations): For GOT entries which need no relocation
1566 don't bump nrel_got.
1567 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1568 handling for split .got/.got.plt.
1569 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1570 * elf32-i386.script: Sort sections for security. There are no .got
1571 input sections. Add .got.plt.
1572 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1573 (ld_generic_create_outfile): Initialize .got.plt section.
1574 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1575
Ulrich Drepperd9488292008-01-20 16:43:15 +000015762008-01-19 Ulrich Drepper <drepper@redhat.com>
1577
1578 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1579 symbols are not carried over into statically linked output files.
1580 Add dummy entries for more TLS relocations.
1581
1582 * ld.c (options): Add long names for -( and -).
1583
1584 * ldgeneric.c (check_definition): For newly found definitions don't
1585 mark section as used if symbol is absolute.
1586 (extract_from_archive): Only assign archive sequence number the first
1587 time the archive is handled. Update ld_state.last_archive_used
1588 if any symbol was used. Remove nround variable.
1589 (file_process2): When using symbol from an archive, update
1590 ld_state.group_start_archive, ld_state.archives, and
1591 ld_state.tailarchives.
1592 (ld_generic_file_process): If group is not handled anymore, after
1593 freeing ELF handles for the archives, clear ld_state.archives and
1594 *nextp. Fix wrong logic in recognizing first iteration of group
1595 loop. When clearing flags, also clear ld_state.group_start_archive.
1596
Ulrich Drepper5eee1222008-01-11 10:12:18 +000015972008-01-11 Ulrich Drepper <drepper@redhat.com>
1598
1599 * objdump.c (show_disasm): Adjust disassembler format string for
1600 removal of %e.
1601
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000016022008-01-04 Roland McGrath <roland@redhat.com>
1603
Roland McGrath059c83e2008-02-21 06:19:39 +00001604 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1605 a size greater than the items cover means multiple sets of items.
1606 (handle_core_note): Update caller.
1607
16082008-01-04 Roland McGrath <roland@redhat.com>
1609
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001610 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1611
16122008-01-03 Roland McGrath <roland@redhat.com>
1613
1614 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1615
1616 * elflint.c (check_dynamic): Remove duplicate initializer.
1617
Ulrich Drepperad024af2008-01-02 17:42:52 +000016182008-01-02 Ulrich Drepper <drepper@redhat.com>
1619
1620 * addr2line.c: Update copyright year.
1621 * ar.c: Likewise.
1622 * elfcmp.c: Likewise.
1623 * elflint.c: Likewise.
1624 * findtextrel.c: Likewise.
1625 * ld.c: Likewise.
1626 * nm.c: Likewise.
1627 * objdump.c: Likewise.
1628 * ranlib.c: Likewise.
1629 * readelf.c: Likewise.
1630 * size.c: Likewise.
1631 * strings.c: Likewise.
1632 * strip.c: Likewise.
1633 * unstrip.c: Likewise.
1634
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000016352007-12-30 Ulrich Drepper <drepper@redhat.com>
1636
1637 * objdump (show_disasm): Use %e after third parameter.
1638
16392007-12-21 Ulrich Drepper <drepper@redhat.com>
1640
1641 * strip.c: Fix wrong parenthesis in a few branch predictions.
1642 * strings.c: Likewise.
1643
16442007-12-20 Ulrich Drepper <drepper@redhat.com>
1645
1646 * Makefile.am (DEFS): Add DEBUGPRED.
1647 * addr2line.c: Include debugpred.h.
1648 * ar.c: Likewise.
1649 * elfcmp.c: Likewise.
1650 * elflint.c: Likewise.
1651 * findtextrel.c: Likewise.
1652 * nm.c: Likewise.
1653 * objdump.c: Likewise.
1654 * ranlib.c: Likewise.
1655 * readelf.c: Likewise.
1656 * size.c: Likewise.
1657 * strings.c: Likewise.
1658 * strip.c: Likewise.
1659 * unstrip.c: Likewise.
1660 * debugpred.h: New file.
1661
1662 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
1663 (handle_relocs_rela): Likewise.
1664
1665 * readelf.c: Add lots of likely/unlikely.
1666
1667 * elflint.c: Minor cleanups.
1668
Roland McGrath1a2e8f42007-12-15 23:39:34 +000016692007-11-19 Roland McGrath <roland@redhat.com>
1670
1671 * readelf.c (print_ops): Handle all bad op codes gracefully.
1672 Print their numbers instead of just ???.
1673
Roland McGrath07a696e2007-11-09 22:44:26 +000016742007-11-09 Roland McGrath <roland@redhat.com>
1675
1676 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00001677 Handle block forms to mean a DWARF expression for DW_AT_allocated,
1678 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
1679 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
1680 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00001681
Roland McGrathe4c22ea2007-10-23 13:07:39 +000016822007-10-20 Roland McGrath <roland@redhat.com>
1683
1684 * unstrip.c (options): Update -R description.
1685 (struct symbol): Put symbol details a union with a size_t pointer
1686 `duplicate'.
1687 (compare_symbols_output): Use null ->name as marker for discard
1688 symbols, not zero *->map.
1689 (copy_elided_sections): Record forwarding pointers for discarded
1690 duplicates and fill SYMNDX_MAP elements through them.
1691
1692 * readelf.c (process_file): Set offline_next_address to 0 at start.
1693 (struct process_dwflmod_args): New type.
1694 (process_dwflmod): Take args in it, pass fd to process_elf_file.
1695 (process_file): Update caller; dup FD for passing to libdwfl.
1696 (process_elf_file): Take new arg FD. For ET_REL file when
1697 displaying data affected by libdwfl relocation, open a new Elf handle.
1698
16992007-10-17 Roland McGrath <roland@redhat.com>
1700
1701 * readelf.c (print_debug_line_section): For invalid data inside a
1702 unit with plausible length, keep printing at the next unit boundary.
1703
1704 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
1705
17062007-10-16 Roland McGrath <roland@redhat.com>
1707
1708 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1709
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000017102007-10-15 Roland McGrath <roland@redhat.com>
1711
1712 * make-debug-archive.in: New file.
1713 * Makefile.am (EXTRA_DIST): Add it.
1714 (make-debug-archive): New target.
1715 (bin_SCRIPTS, CLEANFILES): Add it.
1716
17172007-10-10 Roland McGrath <roland@redhat.com>
1718
1719 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
1720 Use it to check MERGE|STRINGS for .debug_str.
1721 (check_sections): Handle exact_or_gnuld.
1722
17232007-10-08 Roland McGrath <roland@redhat.com>
1724
1725 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
1726 64-bit struct timeval with 32-bit tv_usec.
1727
17282007-10-07 Roland McGrath <roland@redhat.com>
1729
1730 * readelf.c (check_archive_index): New function.
1731 (process_file): Call it. Change signature to take only fd and name.
1732 Use libdwfl to open the file, then iterate on its modules (multiple
1733 for an archive) to print file name and call process_elf_file.
1734 (main): Update caller. Let process_file do elf_begin.
1735 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
1736 (process_elf_file): Take only Dwfl_Module * argument.
1737 Don't print the file name here.
1738 (print_debug_*_section): Take Dwfl_Module * argument.
1739 (print_debug): Likewise. Update caller.
1740 (format_dwarf_addr): New function.
1741 (print_debug_ranges_section): Use it.
1742 (attr_callback): Likewise.
1743 (print_debug_line_section, print_debug_loc_section): Likewise.
1744
1745 * readelf.c (print_debug_ranges_section): Translate all strings.
1746 (print_debug_loc_section): Likewise.
1747
1748 * unstrip.c (copy_elided_sections): Initialize SEC.
1749
1750 * ar.c (do_oper_insert): Put trailing / on short names.
1751
1752 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
1753
1754 * arlib2.c (arlib_add_long_name): Adjust for header size.
1755
1756 * arlib.c (arlib_finalize): Pad long name table to keep size even.
1757
1758 * ar.c (do_oper_insert): Use write_retry for padding write.
1759
1760 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
1761 Unconditionally set FOUND[CNT]->elf when setting ->mem.
1762 (remember_long_name): New function.
1763 (do_oper_insert): Call it. Correctly use length of basename,
1764 not original name. Don't store long name twice for new member.
1765
17662007-10-06 Roland McGrath <roland@redhat.com>
1767
1768 * elflint.c (check_note): Skip empty segment.
1769 (check_note_section): Skip empty section.
1770
1771 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
1772 (handle_output_dir_module, handle_implicit_modules): Pass it down.
1773 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
1774 (compare_alloc_sections): Take new arg REL, ignore address if true.
1775 (compare_sections): Likewise, pass it down.
1776 (compare_sections_rel, compare_sections_nonrel): New functions.
1777 (find_alloc_sections_prelink, copy_elided_sections): Use them
1778 instead of compare_sections.
1779 (sections_match): New function, broken out of ...
1780 (find_alloc_section): ... here.
1781 (copy_elided_sections): Reorganize section match-up logic.
1782 Use sections_match for SHF_ALLOC in ET_REL.
1783 For ET_REL, let the nonzero sh_addr from the debug file dominate.
1784
1785 * unstrip.c (add_new_section_symbols): Take new arg REL.
1786 When true, do not update section symbol values.
1787 (collect_symbols): Likewise. Update section symbols with address
1788 of chosen output section, not original section.
1789 (check_symtab_section_symbols, copy_elided_sections): Update callers.
1790
1791 * unstrip.c (compare_alloc_sections): At the same address, preserve
1792 original section order.
1793
1794 * elflint.c (special_sections): Don't require MERGE|STRINGS for
1795 .debug_str, it didn't always have them with older tools.
1796
1797 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
1798
17992007-10-05 Roland McGrath <roland@redhat.com>
1800
1801 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
1802 ET_REL file.
1803
1804 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
1805 SHN_UNDEF as "bad section". Use shndx value in messages.
1806
1807 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
1808 for ".debug" so it matches as a prefix.
1809 (IS_KNOWN_SPECIAL): New macro.
1810 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
1811 type even under -d, for a .debug* or .shstrtab section.
1812
1813 * readelf.c (print_ops): Use hex for address operand.
1814
18152007-10-04 Roland McGrath <roland@redhat.com>
1816
1817 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
1818 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
1819 sections mapped to SHN_UNDEF.
1820
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000018212007-10-04 Ulrich Drepper <drepper@redhat.com>
1822
1823 * readelf.c (dump_archive_index): Avoid warning about uninitialized
1824 variable with older glibc versions.
1825 Add some branch prediction.
1826
Roland McGrath59ea7f32007-10-04 08:50:09 +000018272007-10-04 Roland McGrath <roland@redhat.com>
1828
1829 * readelf.c (print_archive_index): New variable.
1830 (options, parse_opt): Accept -c/--archive-index to set it.
1831 (dump_archive_index): New function.
1832 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
1833 Call dump_archive_index on archives if set.
1834 (main): Update caller.
1835 (any_control_option): Give it file scope, moved out of ...
1836 (parse_opt): ... here.
1837
18382007-10-03 Roland McGrath <roland@redhat.com>
1839
1840 * unstrip.c (struct arg_info): Add `list' flag.
1841 (options, parse_opt): Grok -n/--list to set it.
1842 (list_module): New function.
1843 (handle_implicit_modules): Call it under -n.
1844
1845 * elflint.c (check_note_section): New function.
1846 (check_sections): Call it for SHT_NOTE.
1847
1848 * readelf.c (handle_notes): Use sections when available.
1849
1850 * elflint.c (check_note_data): New function, broken out of ...
1851 (check_note): ... here. Call it and elf_getdata_rawchunk.
1852
1853 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
1854 Use elf_getdata_rawchunk and gelf_getauxv.
1855 (handle_notes_data): New function, broken out of ...
1856 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
1857
Roland McGrath241ac022007-10-01 18:21:46 +000018582007-10-01 Roland McGrath <roland@redhat.com>
1859
Roland McGrathac0a16c2007-10-01 18:50:35 +00001860 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
1861
Roland McGrath241ac022007-10-01 18:21:46 +00001862 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
1863
Roland McGrathc76f0b02007-09-27 07:31:33 +000018642007-09-10 Roland McGrath <roland@redhat.com>
1865
1866 * readelf.c (options): Give -p optional argument, alias --string-dump.
1867 (string_sections, string_sections_tail): New static variables.
1868 (parse_opt): Set them when -p has an argument.
1869 (print_string_section): New function, broken out of ...
1870 (print_strings): ... here. Call it.
1871 (dump_data_section): New function, broken out of ...
1872 (dump_data): ... here. Call it.
1873 (for_each_section_argument): New function, broken out of ...
1874 (dump_data): ... here. Call it.
1875 (dump_strings): New function.
1876
18772007-08-31 Roland McGrath <roland@redhat.com>
1878
1879 * readelf.c (print_strings): Typo fix.
1880
Roland McGrathcb6d8652007-08-23 08:10:54 +000018812007-08-23 Roland McGrath <roland@redhat.com>
1882
1883 * readelf.c (printf_with_wrap): Function removed.
1884 (REGISTER_WRAP_COLUMN): New macro.
1885 (handle_core_register): Use print_core_item instead.
1886 (struct register_info): New type.
1887 (compare_registers, compare_register_sets): New functions.
1888 (register_bitpos, compare_sets_by_info): New functions.
1889 (handle_core_registers): Use those to segregate and sort registers
1890 for display.
1891
1892 * readelf.c (ITEM_WRAP_COLUMN): New macro.
1893 (print_core_item): New function.
1894 (handle_core_item): Use it instead of printf_with_wrap.
1895 (compare_core_items, compare_core_item_groups): New functions.
1896 (handle_core_items): Use them. Sort by group and force line breaks
1897 between groups.
1898
1899 * readelf.c (handle_core_registers, handle_core_items): New functions,
1900 broken out of ...
1901 (handle_core_note): ... here. Call them.
1902
19032007-08-22 Roland McGrath <roland@redhat.com>
1904
1905 * unstrip.c (new_shstrtab): New function, broken out of ...
1906 (copy_elided_sections): ... here.
1907
19082007-08-20 Roland McGrath <roland@redhat.com>
1909
1910 Avoid local function trampolines in nm binary.
1911 * nm.c (sort_by_address): Move to a static function instead of local
1912 inside show_symbols.
1913 (sort_by_name_strtab): New static variable.
1914 (sort_by_name): Use it. Move to a static function instead of local
1915 inside show_symbols.
1916 (show_symbols): Set sort_by_name_strtab.
1917
19182007-08-19 Roland McGrath <roland@redhat.com>
1919
1920 * readelf.c (handle_auxv_note): New function.
1921 (handle_notes): Call it.
1922
1923 * readelf.c (printf_with_wrap, convert): New functions.
1924 (handle_core_item, (handle_core_register): New functions.
1925 (handle_notes): Call those with details from ebl_core_note.
1926
Roland McGrath099dd522007-08-13 22:58:36 +000019272007-08-12 Roland McGrath <roland@redhat.com>
1928
1929 * elflint.c (check_note): Accept type 0 with name "Linux".
1930
1931 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
1932
1933 * elflint.c (section_flags_string): Return "none" for 0, not "".
1934
Roland McGrathd8221722007-08-11 21:18:09 +000019352007-08-11 Roland McGrath <roland@redhat.com>
1936
1937 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
1938
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000019392007-08-04 Ulrich Drepper <drepper@redhat.com>
1940
1941 * readelf.c (hex_dump): Use isprint to determine whether to print
1942 character itself or full stop character.
1943 (dump_data): No need to check endp for NULL after strtol call.
1944
Roland McGrath60fc84c2007-08-03 21:59:15 +000019452007-08-03 Roland McGrath <roland@redhat.com>
1946
1947 * readelf.c (print_string_sections): New variable.
1948 (options, parse_opt): Handle --strings/-p to set it.
1949 (print_strings): New function.
1950 (process_elf_file): Call it under -p.
1951
1952 * readelf.c (options): Add hidden aliases --segments, --sections,
1953 as taken by binutils readelf.
1954
19552007-08-01 Roland McGrath <roland@redhat.com>
1956
1957 * readelf.c (dump_data_sections, dump_data_sections_tail):
1958 New variables.
1959 (options, parse_opt): Handle --hex-dump/-x, set them.
1960 (hex_dump): New function.
1961 (dump_data): New function, call it.
1962 (process_elf_file): Call it.
1963
19642007-07-25 Roland McGrath <roland@redhat.com>
1965
1966 * addr2line.c (show_symbols): New variable.
1967 (print_addrsym): New function.
1968 (handle_address): Call it.
1969 (options, parse_opt): Handle -S/--symbols.
1970
Ulrich Drepperb0243862007-06-06 00:09:36 +000019712007-06-05 Ulrich Drepper <drepper@redhat.com>
1972
1973 * addr2line.c: Update for latest autoconf header.
1974 * ar.c: Likewise.
1975 * elfcmp.c: Likewise.
1976 * elflint.c: Likewise.
1977 * findtextrel.c: Likewise.
1978 * ld.c: Likewise.
1979 * ldgeneric.c: Likewise.
1980 * nm.c: Likewise.
1981 * objdump.c: Likewise.
1982 * ranlib.c: Likewise.
1983 * readelf.c: Likewise.
1984 * size.c: Likewise.
1985 * strings.c: Likewise.
1986 * strip.c: Likewise.
1987 * unstrip.c: Likewise.
1988
Roland McGrath9aa8ef72007-05-18 08:59:43 +000019892007-05-18 Roland McGrath <roland@redhat.com>
1990
1991 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
1992 stripped file, so as not to duplicate a section copied in both.
1993
1994 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
1995
19962007-05-17 Roland McGrath <roland@redhat.com>
1997
1998 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
1999
2000 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
2001
2002 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
2003 call make_directories here.
2004 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
2005 (handle_dwfl_module): Likewise.
2006 (handle_implicit_modules): Update callers.
2007 (handle_output_dir_module): Likewise. Don't do make_directories here.
2008
2009 * unstrip.c (get_section_name): New function, broken out of ...
2010 (copy_elided_sections): here. Update callers.
2011 (find_alloc_section): Broken out of ...
2012 (copy_elided_sections): ... here. Update caller.
2013 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
2014 update STT_SECTION symbols' st_value fields as a side effect.
2015 (check_symtab_section_symbols): Update caller.
2016 (add_new_section_symbols): Set st_value in symbols added.
2017 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
2018 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
2019 from .bss to .dynbss.
2020 (find_alloc_sections_prelink): New function. Associate debug file
2021 allocated SHT_NOBITS shdrs with stripped moved by prelink via
2022 .gnu.prelink_undo information.
2023 (copy_elided_sections): Call it when we couldn't find every allocated
2024 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
2025 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
2026 (handle_file): Update callers.
2027
2028 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
2029 named ".comment".
2030
2031 * elflint.c (check_sections): Fix association of segments with
2032 sections when p_memsz > p_filesz.
2033
20342007-04-29 Roland McGrath <roland@redhat.com>
2035
2036 * addr2line.c (options, main): Tweak argp group settings to fix
2037 usage output.
2038
20392007-04-28 Roland McGrath <roland@redhat.com>
2040
2041 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
2042 sizes to match sections adjusted in the stripped file.
2043
Roland McGrath4be15242007-04-25 03:09:33 +000020442007-04-24 Roland McGrath <roland@redhat.com>
2045
2046 * elfcmp.c (OPT_HASH_INEXACT): New macro.
2047 (hash_inexact): New variable.
2048 (options, parse_opt): Add --hash-inexact option to set it.
2049 (hash_content_equivalent): New function.
2050 (main): Call it for differing SHT_HASH sections under --hash-inexact.
2051
20522007-04-23 Roland McGrath <roland@redhat.com>
2053
2054 * unstrip.c: New file.
2055 * Makefile.am (bin_PROGRAMS): Add it.
2056 (unstrip_LDADD): New variable.
2057
2058 * strip.c (options): Allow --output for -o.
2059
Ulrich Drepper8b383102007-02-16 00:31:57 +000020602007-02-15 Ulrich Drepper <drepper@redhat.com>
2061
2062 * readelf.c: Remove unused code. Add a few consts.
2063
Ulrich Drepper903c1162007-02-15 19:40:37 +000020642007-02-15 Roland McGrath <roland@redhat.com>
2065
2066 * readelf.c (print_debug): Fix brainos in SHDR test.
2067
Roland McGrathf82a1ec2007-02-06 04:47:44 +000020682007-02-05 Roland McGrath <roland@redhat.com>
2069
2070 * ar.c: Include <limits.h>, since we use LONG_MAX.
2071
Ulrich Drepper0fe63532007-02-05 21:05:51 +000020722007-02-05 Ulrich Drepper <drepper@redhat.com>
2073
Ulrich Drepper8b383102007-02-16 00:31:57 +00002074 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00002075 ignore fchown's return value.
2076 (do_oper_insert): Handle error when writing padding.
2077 * ranlib.c: Add fchown complain work around.
2078
Ulrich Drepper0fe63532007-02-05 21:05:51 +00002079 * arlib.c: Make symtab a global variable. Change all users.
2080 * arlib2.c: Likewise.
2081 * ranlib.c: Likewise.
2082 * ar.c: Likewise.
2083 * arlib.h: Declare it.
2084
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000020852007-01-11 Roland McGrath <roland@redhat.com>
2086
2087 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
2088 SHF_MASKPROC bits separately from generic sh_flags validation.
2089
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000020902007-02-04 Ulrich Drepper <drepper@redhat.com>
2091
2092 * ar.c: New file.
2093 * arlib.c: New file.
2094 * arlib2.c: New file.
2095 * arlib.h: New file.
2096 * Makefile (noinst_LIBRARIES): Add libar.
2097 (libar_a_SOURCES): Define.
2098 (ar_LDADD): Define.
2099 (CFLAGS_ar): Define.
2100 * ranlib.c: Change to use arlib.
2101
2102 * elflint.c (check_symtab): Work around GNU ld bug which omits
2103 sections but not symbols in those sections.
2104
Ulrich Drepperb770cf92007-01-10 21:02:34 +000021052007-01-10 Ulrich Drepper <drepper@redhat.com>
2106
2107 * addr2line.c: Update copyright year.
2108 * elfcmp.c: Likewise.
2109 * elflint.c: Likewise.
2110 * findtextrel.c: Likewise.
2111 * ld.c: Likewise.
2112 * nm.c: Likewise.
2113 * objdump.c: Likewise.
2114 * ranlib.c: Likewise.
2115 * readelf.c: Likewise.
2116 * size.c: Likewise.
2117 * strings.c: Likewise.
2118 * strip.c: Likewise.
2119
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000021202006-12-09 Ulrich Drepper <drepper@redhat.com>
2121
2122 * elflint.c (compare_hash_gnu_hash): New function. Report if the
2123 two hash tables have different content (module expected omission
2124 of undefined symbols).
2125
Roland McGrath8190db62006-12-17 23:56:51 +000021262006-10-31 Roland McGrath <roland@redhat.com>
2127
2128 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00002129 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00002130
21312006-09-19 Jakub Jelinek <jakub@redhat.com>
2132
2133 * strip.c (process_file): Disallow -f on archives.
2134
21352006-10-09 Roland McGrath <roland@redhat.com>
2136
2137 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
2138
Roland McGrathc373d852006-10-10 00:25:21 +000021392006-08-29 Roland McGrath <roland@redhat.com>
2140
2141 * Makefile.am (MAINTAINERCLEANFILES): New variable.
2142
2143 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
2144 Reported by Christian Aichinger <Greek0@gmx.net>.
2145
2146 * elflint.c (valid_e_machine): Add EM_ALPHA.
2147 Reported by Christian Aichinger <Greek0@gmx.net>.
2148
Ulrich Drepper231c5902006-08-08 22:00:11 +000021492006-08-08 Ulrich Drepper <drepper@redhat.com>
2150
2151 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
2152 Keep track of which "high DT" entries are present.
2153 Check that either old or GNU-style hash table is present.
2154 If GNU-style hash table is used a symbol table is mandatory.
2155 Check that if any prelink entry is present all of them are.
2156 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
2157 table if they don't refer to functions.
2158
Roland McGrath858b1892006-07-17 08:41:15 +000021592006-07-17 Roland McGrath <roland@redhat.com>
2160
2161 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
2162 (add_version): Likewise for argument.
2163 (check_versym): Cast constant to GElf_Versym for comparison.
2164
Roland McGrath4ec807e2006-07-13 03:59:46 +000021652006-07-12 Roland McGrath <roland@redhat.com>
2166
2167 * readelf.c (handle_gnu_hash): Add casts for machines where
2168 Elf32_Word != unsigned int.
2169
Ulrich Drepperdcf61602006-07-12 19:59:02 +000021702006-07-12 Ulrich Drepper <drepper@redhat.com>
2171
2172 * elflint.c (check_sysv_hash64): Fix printf format.
2173
Ulrich Dreppercc415622006-07-12 19:42:23 +000021742006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002175
Ulrich Dreppercc415622006-07-12 19:42:23 +00002176 * addr2line.c (options): English fix in -f doc string.
2177
2178 * addr2line.c (use_comp_dir): New variable.
2179 (options, parse_opt): Grok -A/--absolute to set it.
2180 (handle_address): If set, prepend dwfl_line_comp_dir results to
2181 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002182
Ulrich Drepper28ed8952006-07-07 03:43:47 +000021832006-07-06 Ulrich Drepper <drepper@redhat.com>
2184
2185 * elflint.c: Adjust for latest new hash table format.
2186 * readelf.c: Likewise.
2187
2188 * elflint.c (check_versym): Ignore hidden bit when comparing version
2189 numbers.
2190
21912006-07-05 Ulrich Drepper <drepper@redhat.com>
2192
2193 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
2194 discarded COMDAT symbols.
2195
2196 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
2197 (elf_i386_create_relocations): Likewise.
2198 * ld.h (struct symbol): Add local and hidden bits.
2199 * ld.c (create_special_section_symbol): These synthsized symbols
2200 are local and hidden.
2201 * ldgeneric.c (file_process2): Check whether input file matches
2202 the emulation.
2203 (fillin_special_symbol): Create symbols as local and/or hidden
2204 if requested.
2205 (ld_generic_create_outfile): Make local copy of symbol.
2206 Don't hide global, defined symbols in dynamic symbol table unless
2207 requested. Synthetic symbols have no version information.
2208
2209 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
2210 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2211
22122006-07-04 Ulrich Drepper <drepper@redhat.com>
2213
2214 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
2215 testing.
2216
22172006-07-03 Ulrich Drepper <drepper@redhat.com>
2218
2219 * elflint.c: Add testing of DT_GNU_HASH.
2220 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
2221
2222 * Makefile.am: Add hacks to create dependency files for non-generic
2223 linker.
2224
Ulrich Drepper6ca46002006-06-12 22:40:23 +000022252006-06-12 Ulrich Drepper <drepper@redhat.com>
2226
2227 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
2228 section if creating a DSO and no interpreter is given.
2229 (ld_generic_create_outfile): Don't store reference to symbols in
2230 discarded COMDAT groups. Don't create PHDR and INTERP program header
2231 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00002232 (create_verneed_data): Pretty printing.
2233
Ulrich Drepper6ca46002006-06-12 22:40:23 +00002234 * ldscript.y (content): If a DSO is created don't set default
2235 interpreter from linker script.
2236
2237 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
2238 for symbols in discarded COMDAT groups.
2239 (elf_i386_create_relocations): Likewise.
2240 * ld.h (struct scninfo): Add unused_comdat.
2241 * ldgeneric.c (add_section): Also check group signature when
2242 matching COMDAT sections.
2243 (add_relocatable_file): Ignore symbols in COMDAT group which are
2244 discarded.
2245
2246 * elflint.c (check_one_reloc): For *_NONE relocs only check type
2247 and symbol reference.
2248
Ulrich Drepper54f33a72006-06-11 09:07:37 +000022492006-06-11 Ulrich Drepper <drepper@redhat.com>
2250
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00002251 * elflint.c (check_dynamic): Fix checking value of tags which are
2252 offsets in the string section. Make sure DT_STRTAB points to the
2253 section referenced in sh_link.
2254
2255 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
2256
Ulrich Drepper54f33a72006-06-11 09:07:37 +00002257 * ld.c: Recognize --eh-frame-hdr option.
2258 * ld.h (struct ld_state): Add eh_frame_hdr field.
2259 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
2260
2261 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
2262 SH_FLAGS_COMBINE.
2263 (add_relocatable_file): Minor optimization of last change.
2264 (match_section): Don't preserve SHF_GROUP flag any longer.
2265
Ulrich Drepper2d880282006-06-11 00:20:43 +000022662006-06-10 Ulrich Drepper <drepper@redhat.com>
2267
2268 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00002269 Handle record and ignore as position dependent options.
2270 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00002271 * ld.h (struct ld_state): Add execstack field.
2272 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
2273 sections.
2274 (ld_generic_create_outfile): Fix program header creation in native
2275 linker. Add PT_GNU_STACK program header.
2276
Ulrich Dreppera688a732006-06-10 06:33:00 +000022772006-06-09 Ulrich Drepper <drepper@redhat.com>
2278
2279 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
2280 for PLT entries if there is no local definition.
2281
2282 * ld.c (parse_option): Handle -z ignore like --as-needed and
2283 -z record like --no-as-needed.
2284 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
2285 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
2286 looping over DSOs. When deciding about adding DT_NEEDED entries
2287 use ->as_needed instead of ignore_unused_dsos.
2288
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000022892006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002290
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00002291 * ld.c: Recognize --as-needed and --no-as-needed options.
2292 * ld.h (struct usedfile): Add as_needed field.
2293 (struct ld_state): Likewise.
2294 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
2295 the list.
2296 * ldscript.y (filename_id_list): Split to correctly parse all
2297 combinations.
2298 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002299
Ulrich Drepper697f4db2006-06-10 06:50:47 +000023002006-05-28 Ulrich Drepper <drepper@redhat.com>
2301
2302 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2303 and colno.
2304
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000023052006-05-27 Ulrich Drepper <drepper@redhat.com>
2306
2307 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002308 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002309
Ulrich Drepper82c345d2006-04-04 22:07:54 +000023102006-04-04 Ulrich Drepper <drepper@redhat.com>
2311
2312 * addr2line.c: Update copyright year.
2313 * elfcmp.c: Likewise.
2314 * elflint.c: Likewise.
2315 * findtextrel.c: Likewise.
2316 * ld.c: Likewise.
2317 * nm.c: Likewise.
2318 * objdump.c: Likewise.
2319 * ranlib.c: Likewise.
2320 * readelf.c: Likewise.
2321 * size.c: Likewise.
2322 * strings.c: Likewise.
2323 * strip.c: Likewise.
2324
Roland McGrathdd7e22b2006-03-09 23:05:47 +000023252006-03-09 Roland McGrath <roland@redhat.com>
2326
2327 * Makefile.am (AM_LDFLAGS): New variable.
2328
Roland McGrath060fa052006-03-02 07:51:50 +000023292006-03-01 Roland McGrath <roland@redhat.com>
2330
2331 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2332 for dwarf.h changes matching 3.0 spec.
2333 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2334
Ulrich Drepper038129b2005-12-04 16:47:24 +000023352005-12-04 Ulrich Drepper <drepper@redhat.com>
2336
2337 * elflint.c (check_one_reloc): If relocation section is not loaded,
2338 don't check whether the relocations modify read-only sections or
2339 loaded and unloaded sections.
2340
Ulrich Drepper607e0542005-12-04 15:51:06 +000023412005-11-28 Ulrich Drepper <drepper@redhat.com>
2342
2343 * elflint.c (check_one_reloc): Take additional parameters. Use
2344 them to determine whether relocation is valid in this type of
2345 file. DSOs and executables can contain relocation sections in
2346 unloaded sections which just show the relocations the linker
2347 applied. Adjust all callers.
2348 (check_program_header): Check that PT_PHDR is loaded and that offset
2349 matches the one in the ELF header.
2350
Roland McGrath6724c902005-10-28 07:07:19 +000023512005-10-26 Roland McGrath <roland@redhat.com>
2352
2353 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2354
Ulrich Drepperd0449522005-09-03 07:23:52 +000023552005-09-03 Ulrich Drepper <drepper@redhat.com>
2356
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002357 * strip.c (handle_elf): Unify some error messages.
2358 * ld.c (main): Likewise.
2359 * ldgeneric.c (open_elf): Likewise.
2360 * elfcmp.c (main): Likewise.
2361 * elflint.c (check_elf_header): Likewise.
2362
2363 * size.c (process_file): Fix typo in error message.
2364
Ulrich Drepperd0449522005-09-03 07:23:52 +00002365 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2366
Ulrich Dreppera60501e2005-09-02 19:50:17 +000023672005-09-02 Ulrich Drepper <drepper@redhat.com>
2368
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002369 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002370 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002371
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000023722005-08-28 Ulrich Drepper <drepper@redhat.com>
2373
2374 * ranlib.c: Don't define pread_retry and write_retry here.
2375
2376 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2377 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2378
2379 * strings.c (process_chunk): Reorder expressions in conditional
2380 (process_chunk_mb): Likewise.
2381
2382 * strings.c: New file.
2383 * Makefile.am (bin_PROGRAMS): Add strings.
2384 (strings_no_Wstring): Define.
2385 (strings_LDADD): Define.
2386
Roland McGrath71e15a02005-08-27 10:33:26 +000023872005-08-27 Roland McGrath <roland@redhat.com>
2388
2389 * addr2line.c (dwarf_diename_integrate): Function removed.
2390 (print_dwarf_function): Use plain dwarf_diename.
2391
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000023922005-08-24 Ulrich Drepper <drepper@redhat.com>
2393
2394 * elflint.c (check_versym): Versioned symbols should not have
2395 local binding.
2396
Ulrich Drepper5d832292005-08-15 21:36:27 +000023972005-08-15 Ulrich Drepper <drepper@redhat.com>
2398
Ulrich Drepper61655e02005-08-16 04:23:02 +00002399 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2400 undefined.
2401
Ulrich Drepper5d832292005-08-15 21:36:27 +00002402 * Makefile.am: Add rules to build ranlib.
2403 * ranlib.c: New file.
2404
Roland McGrath18e13422005-08-15 08:01:25 +000024052005-08-14 Roland McGrath <roland@redhat.com>
2406
2407 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2408 sh_type it recognizes.
2409
2410 * elflint.c (check_sections): Print unknown flags in hex, don't
2411 truncate high bits. Print section number and name for unknown type.
2412
Roland McGrathf6895042005-08-13 20:56:52 +000024132005-08-13 Roland McGrath <roland@redhat.com>
2414
2415 * elflint.c (check_program_header): Use ebl_segment_type_name and
2416 allow any p_type it recognizes. Include p_type value in error
2417 message for unknown type.
2418
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000024192005-08-13 Ulrich Drepper <drepper@redhat.com>
2420
2421 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2422 to ebl_check_special_symbol.
2423 (check_sections): Pass ehdr to ebl_bss_plt_p.
2424
Roland McGrath653d3762005-08-13 01:59:10 +000024252005-08-12 Roland McGrath <roland@redhat.com>
2426
2427 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2428 refers to the right section if it's not SHN_ABS.
2429 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2430
2431 * elflint.c (check_sections): Don't complain about a non-NOBITS
2432 section taking no segment space, if it's sh_size is 0.
2433
2434 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2435 be PROGBITS or NOBITS.
2436
2437 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2438 standard st_value and st_size checks.
2439
Roland McGrath1c83bf12005-08-11 07:03:55 +000024402005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002441
Roland McGrath1c83bf12005-08-11 07:03:55 +00002442 * addr2line.c (options, parse_opt): Don't handle -e here.
2443 (executable): Variable removed.
2444 (argp_children): New static variable.
2445 (argp): Use it. Make const.
2446 (main): Fill in argp_children from dwfl_standard_argp ().
2447 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2448 (print_dwarf_function): New function. Try to figure out inline chain.
2449 (elf_getname): Function removed, libdwfl does it for us.
2450 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2451 Use dwfl_module_addrname instead of elf_getname.
2452 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2453 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2454
24552005-08-10 Ulrich Drepper <drepper@redhat.com>
2456
2457 * strip.c (parse_opt): STATE parameter is now used.
2458 Various little cleanups.
2459
2460 * readelf.c (print_debug_line_section): Correct fallout of renaming
2461 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002462
Roland McGrath8f31c2c2005-08-09 04:58:05 +000024632005-08-08 Roland McGrath <roland@redhat.com>
2464
2465 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2466 with binutils strip. Likewise -d, -S, as aliases for -g.
2467 Likewise ignore -s/--strip-all.
2468
Roland McGrath095a01b2005-08-08 03:49:35 +000024692005-08-07 Roland McGrath <roland@redhat.com>
2470
2471 * strip.c (process_file): Open read-only when using a different output
2472 file.
2473
Ulrich Drepper47be7952005-08-07 04:41:39 +000024742005-08-06 Ulrich Drepper <drepper@redhat.com>
2475
Ulrich Drepper637963b2005-08-07 05:33:07 +00002476 * elflint.c (in_nobits_scn): New function.
2477 (check_versym): Allow references for defined symbols against versions
2478 of other DSOs also for symbols in nobits sections.
2479 Move a few variables around.
2480
Ulrich Drepper47be7952005-08-07 04:41:39 +00002481 * Makefile.am (AM_CFLAGS): Avoid duplication.
2482 Link with statis libs if BUILD_STATIC.
2483
Ulrich Drepperdbace232005-08-06 01:37:23 +000024842005-08-05 Ulrich Drepper <drepper@redhat.com>
2485
2486 * elflint.c: Many, many more tests. Mostly related to symbol
2487 versioning. Those sections should now be completely checked.
2488
2489 * readelf.c (print_dynamic): Use gelf_offscn.
2490
Ulrich Drepperacb89832005-08-04 07:01:49 +000024912005-08-04 Ulrich Drepper <drepper@redhat.com>
2492
2493 * elflint.c: Add lots more tests: more extension symbol table sanity,
2494 versioning section tests, hash table tests. General cleanup.
2495
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000024962005-08-02 Ulrich Drepper <drepper@redhat.com>
2497
Ulrich Drepper8a687742005-08-03 02:24:12 +00002498 * objdump.c: New file.
2499 * Makefile.am (bin_PROGRAMS): Add objdump.
2500 (objdump_LDADD): Define.
2501
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002502 * elflint.c (check_reloc_shdr): New function split out from check_rela
2503 and check_rel.
2504 (check_one_reloc): New function. Likewise.
2505 (check_rela): Use check_reloc_shdr and check_one_reloc.
2506 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002507 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2508 section.
2509 Add checks that relocations against read-only segments are flagged,
2510 that the text relocation flag is not set unnecessarily, and that
2511 relocations in one section are either against loaded or not-loaded
2512 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002513
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000025142005-08-01 Ulrich Drepper <drepper@redhat.com>
2515
2516 * elfcmp.c (main): Ignore section count and section name string table
2517 section index.
2518
Roland McGrathf9ece8a2005-07-28 07:03:04 +000025192005-07-27 Roland McGrath <roland@redhat.com>
2520
2521 * elfcmp.c: Include <locale.h>.
2522
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000025232005-07-27 Ulrich Drepper <drepper@redhat.com>
2524
2525 * elfcmp.c: Print name and index of differing section.
2526
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000025272005-07-24 Ulrich Drepper <drepper@redhat.com>
2528
2529 * elfcmp.c: Implement comparing gaps between sections.
2530
25312005-07-23 Ulrich Drepper <drepper@redhat.com>
2532
2533 * elflint.c: Include libeblP.h instead of libebl.h.
2534 * nm.c: Likewise.
2535 * readelf.c: Likewise.
2536 * elfcmp.c: Likewise.
2537
2538 * elfcmp.c (main): Compare individual ELF header fields, excluding
2539 e_shoff instead of the whole struct at once.
2540 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2541 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2542
25432005-07-22 Ulrich Drepper <drepper@redhat.com>
2544
2545 * elfcmp.c (main): Take empty section into account when comparing
2546 section content.
2547
2548 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2549 using it.
2550
25512005-07-21 Ulrich Drepper <drepper@redhat.com>
2552
2553 * elfcmp.c: New file.
2554 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2555 (elfcmp_LDADD): Define.
2556
2557 * elflint.c (check_rela): Check that copy relocations only reference
2558 object symbols or symbols with unknown type.
2559 (check_rel): Likewise.
2560
25612005-06-08 Roland McGrath <roland@redhat.com>
2562
2563 * readelf.c (print_ops): Add consts.
2564
25652005-05-31 Roland McGrath <roland@redhat.com>
2566
2567 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2568 abbreviations. Print a header line before each CU section.
2569
2570 * readelf.c (print_debug_loc_section): Fix indentation for larger
2571 address size.
2572
25732005-05-30 Roland McGrath <roland@redhat.com>
2574
2575 * readelf.c (print_debug_line_section): Print section offset of each
2576 CU's table, so they are easy to find from seeing the stmt_list value.
2577
2578 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2579 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2580
2581 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2582 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2583
2584 * readelf.c (print_ops): Take different args for indentation control.
2585 (attr_callback): Caller updated.
2586 Grok several more block-form attributes as being location expressions.
2587 For those same attributes with udata forms, format output differently
2588 for location list offset.
2589 (print_debug_loc_section): Implement it for real.
2590
2591 * readelf.c (options): Mention ranges for --debug-dump.
2592 (enum section_e): Add section_ranges.
2593 (parse_opt): Grok "ranges" for -w/--debug-dump.
2594 (print_debug_ranges_section): New function.
2595 (print_debug): Handle .debug_ranges section.
2596
25972005-05-30 Ulrich Drepper <drepper@redhat.com>
2598
2599 * readelf.c (handle_notes): At least x86-64 need not have the note
2600 section values aligned to 8 bytes.
2601
26022005-05-18 Ulrich Drepper <drepper@redhat.com>
2603
2604 * readelf.c (dwarf_tag_string): Add new tags.
2605
26062005-05-08 Roland McGrath <roland@redhat.com>
2607
2608 * strip.c (handle_elf): Don't translate hash and versym data formats,
2609 elf_getdata already did it for us.
2610
26112005-05-07 Ulrich Drepper <drepper@redhat.com>
2612
2613 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2614 (addr2line_LDADD): Likewise.
2615
26162005-05-03 Roland McGrath <roland@redhat.com>
2617
2618 * strip.c (handle_elf): Apply symbol table fixups to discarded
2619 relocation sections when they are being saved in the debug file.
2620
2621 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2622 and gelf_xlatetof, not the native byte order.
2623
2624 * strip.c (parse_opt): Give error if -f or -o is repeated.
2625 (main): Exit if argp_parse returns nonzero.
2626
2627 * strip.c (debug_fname_embed): New variable.
2628 (options, parse_opt): New option -F to set it.
2629
26302005-05-07 Ulrich Drepper <drepper@redhat.com>
2631
2632 * readelf.c (parse_opt): Make any_control_option variable
2633 local. Simplify some tests.
2634
26352005-05-03 Roland McGrath <roland@redhat.com>
2636
2637 * strip.c (crc32_file): Function removed (now in ../lib).
2638
26392005-05-03 Roland McGrath <roland@redhat.com>
2640
2641 * elflint.c (is_debuginfo): New variable.
2642 (options, parse_opt): New option --debuginfo/-d to set it.
2643 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
2644 (check_note): If is_debuginfo, don't try to get note contents.
2645
26462005-04-24 Ulrich Drepper <drepper@redhat.com>
2647
2648 * readelf.c (print_debug_abbrev_section): Don't print error when end of
2649 section reached.
2650
26512005-04-14 Ulrich Drepper <drepper@redhat.com>
2652
2653 * readelf.c (dwarf_encoding_string): New function.
2654 (dwarf_inline_string): New function.
2655 (dwarf_access_string): New function.
2656 (dwarf_visibility_string): New function.
2657 (dwarf_virtuality_string): New function.
2658 (dwarf_identifier_case_string): New function.
2659 (dwarf_calling_convention_string): New function.
2660 (dwarf_ordering_string): New function.
2661 (dwarf_discr_list_string): New function.
2662 (attr_callback): Decode man more attribute values.
2663
26642005-04-01 Ulrich Drepper <drepper@redhat.com>
2665
2666 * addr2line.c: Finish implementation of -f option.
2667
26682005-03-29 Ulrich Drepper <drepper@redhat.com>
2669
2670 * addr2line.c: New file.
2671 * Makefile.am (bin_PROGRAMS): Add addr2line.
2672 Define addr2line_LDADD.
2673
2674 * findtextrel.c: Use new dwarf_addrdie function.
2675
2676 * findtextrel.c: Fix usage message and re-add accidentally removed
2677 line.
2678
26792005-03-28 Ulrich Drepper <drepper@redhat.com>
2680
2681 * findtextrel.c: New file.
2682 * Makefile: Add rules to build findtextrel.
2683
26842005-02-15 Ulrich Drepper <drepper@redhat.com>
2685
2686 * ldlex.l: Provide ECHO definition to avoid warning.
2687
2688 * elflint.c (check_program_header): Fix typo in RELRO test.
2689
2690 * Makefile.am (AM_CFLAGS): Add more warning options.
2691 * elflint.c: Fix warnings introduced by the new warning options.
2692 * i386_ld.c: Likewise.
2693 * ld.c: Likewise.
2694 * ld.h: Likewise.
2695 * ldgeneric.c: Likewise.
2696 * nm.c: Likewise.
2697 * readelf.c: Likewise.
2698 * sectionhash.c: Likewise.
2699 * size.c: Likewise.
2700 * string.c: Likewise.
2701
27022005-02-05 Ulrich Drepper <drepper@redhat.com>
2703
2704 * Makefile.am: Check for text relocations in constructed DSOs.
2705
2706 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
2707 with -lmudflap.
2708
2709 * ldscript.y: Add as_needed handling.
2710 * ldlex.l: Recognize AS_NEEDED token.
2711 * ld.h (struct filename_list): Add as_needed flag.
2712
27132005-02-04 Ulrich Drepper <drepper@redhat.com>
2714
2715 * elflint.c (check_symtab): Correctly determine size of GOT section.
2716
27172005-01-19 Ulrich Drepper <drepper@redhat.com>
2718
2719 * ld.c: Remove unnecessary more_help function. Print bug report
2720 address using argp.
2721 * strip.c: Likewise.
2722 * size.c: Likewise.
2723 * nm.c: Likewise.
2724 * readelf.c: Likewise.
2725 * elflint.c: Likewise.
2726
2727 * elflint.c (main): Don't check for parameter problems here.
2728 (parse_opt): Do it here, where we get informed about some of them
2729 anyway.
2730
2731 * readelf.c (main): Don't check for parameter problems here.
2732 (parse_opt): Do it here, where we get informed about some of them
2733 anyway.
2734
27352005-01-11 Ulrich Drepper <drepper@redhat.com>
2736
2737 * strip.c: Update copyright year.
2738 * readelf.c: Likewise.
2739 * size.c: Likewise.
2740 * nm.c: Likewise.
2741 * ld.c: Likewise.
2742 * elflint.c: Likewise.
2743
2744 * elflint.c (check_symtab): Don't warn about wrong size for
2745 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
2746
27472004-10-05 Ulrich Drepper <drepper@redhat.com>
2748
2749 * readelf.c (print_phdr): In section mapping, also indicate
2750 sections in read-only segments.
2751
27522004-09-25 Ulrich Drepper <drepper@redhat.com>
2753
2754 * readelf.c: Make compile with gcc 4.0.
2755 * strip.c: Likewise.
2756
27572004-08-16 Ulrich Drepper <drepper@redhat.com>
2758
2759 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
2760 allocate to work around gcc 3.4 bug.
2761
27622004-01-25 Ulrich Drepper <drepper@redhat.com>
2763
2764 * ldlex.l (invalid_char): Better error message.
2765
27662004-01-23 Ulrich Drepper <drepper@redhat.com>
2767
2768 * readelf.c: Print SHT_GNU_LIBLIST sections.
2769
2770 * none_ld.c: New file.
2771
27722004-01-21 Ulrich Drepper <drepper@redhat.com>
2773
2774 * Makefile.am: Enable building of machine specific linker.
2775
27762004-01-20 Ulrich Drepper <drepper@redhat.com>
2777
2778 * Makefile.am: Support building with mudflap.
2779
2780 * i386_ld.c: Fix warnings gcc 3.4 spits out.
2781 * ldgeneric.c: Likewise.
2782 * ldscript.y: Likewise.
2783 * readelf.c: Likewise.
2784 * strip.c: Likewise.
2785
2786 * readelf.c (print_debug_line_section): Determine address size
2787 correctly.
2788
27892004-01-19 Ulrich Drepper <drepper@redhat.com>
2790
2791 * readelf.c (print_phdr): Show which sections are covered by the
2792 PT_GNU_RELRO entry.
2793
2794 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
2795
2796 * readelf.c (print_debug_macinfo_section): Implement.
2797
27982004-01-18 Ulrich Drepper <drepper@redhat.com>
2799
2800 * readelf.c (print_debug_line_section): Implement.
2801
28022004-01-17 Ulrich Drepper <drepper@redhat.com>
2803
2804 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
2805 * src/ld.c: Likewise.
2806 * src/nm.c: Likewise.
2807 * src/readelf.c: Likewise.
2808 * src/size.c: Likewise.
2809 * src/strip.c: Likewise.
2810
2811 * strip.c: Add a few more unlikely. Reduce scope of some variables.
2812
2813 * Makefile.am: Support building with mudflap.
2814
28152004-01-16 Ulrich Drepper <drepper@redhat.com>
2816
2817 * readelf.c (print_debug_info_section): Free dies memory.
2818
2819 * readelf.c: Print .debug_info section content.
2820
28212004-01-13 Ulrich Drepper <drepper@redhat.com>
2822
2823 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
2824
28252004-01-12 Ulrich Drepper <drepper@redhat.com>
2826
2827 * readelf.c (print_debug_aranges): Implement using libdw.
2828
28292004-01-11 Ulrich Drepper <drepper@redhat.com>
2830
2831 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
2832
2833 * readelf.c: Use libdw instead of libdwarf. Not all of the old
2834 behavior is available yet.
2835 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
2836
28372004-01-09 Ulrich Drepper <drepper@redhat.com>
2838
2839 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
2840
2841 * nm.c: Implement getting information about local variables.
2842
28432004-01-07 Ulrich Drepper <drepper@redhat.com>
2844
2845 * nm.c: Read also debug information for local symbols.
2846
28472004-01-05 Ulrich Drepper <drepper@redhat.com>
2848
2849 * nm.c: Shuffle dwarf handling code around so the maximum column
2850 width can be computed ahead of printing. Avoid collection symbols
2851 which are not printed anyway.
2852
2853 * nm.c: Rewrite dwarf handling to use libdw.
2854 * Makefile.am (AM_CFLAGS): Add -std parameter.
2855 (INCLUDES): Find header in libdw subdir.
2856 (nm_LDADD): Replace libdwarf with libdw.
2857
2858 * elflint.c: Update copyright year.
2859 * readelf.c: Likewise.
2860 * size.c: Likewise.
2861 * strip.c: Likewise.
2862 * nm.c: Likewise.
2863
28642003-12-31 Ulrich Drepper <drepper@redhat.com>
2865
2866 * strip.c (process_file): Close file before returning.
2867
28682003-11-19 Ulrich Drepper <drepper@redhat.com>
2869
2870 * readelf.c (handle_dynamic): Make column for tag name wider.
2871
28722003-09-29 Ulrich Drepper <drepper@redhat.com>
2873
2874 * readelf.c (handle_dynamic): Always terminate tag name with a space.
2875
28762003-09-25 Ulrich Drepper <drepper@redhat.com>
2877
2878 * strip.c (process_file): Don't mmap the input file, we modify the
2879 data structures and don't want the change end up on disk.
2880
28812003-09-23 Jakub Jelinek <jakub@redhat.com>
2882
2883 * unaligned.h (union u_2ubyte_unaligned,
2884 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
2885 packed attribute.
2886 (add_2ubyte_unaligned, add_4ubyte_unaligned,
2887 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
2888 Read/store value through _ptr->u instead of *_ptr.
2889
28902003-09-22 Ulrich Drepper <drepper@redhat.com>
2891
2892 * size.c (show_sysv): Change type of maxlen to int.
2893
2894 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
2895 buckets.
2896
2897 * i386_ld.c: Many many fixes and extensions.
2898 * ld.c: Likewise.
2899 * ldgeneric.c: Likewise.
2900
29012003-08-16 Ulrich Drepper <drepper@redhat.com>
2902
2903 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
2904 the reference is from another DSO.
2905
29062003-08-15 Ulrich Drepper <drepper@redhat.com>
2907
2908 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
2909 point is found when creating a DSO.
2910
29112003-08-14 Ulrich Drepper <drepper@redhat.com>
2912
2913 * ld.c (main): Always call FLAG_UNRESOLVED.
2914 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
2915 undefined symbols if not creating DSO or ld_state.nodefs is not set.
2916
29172003-08-13 Ulrich Drepper <drepper@redhat.com>
2918
2919 * Makefile.in: Depend on libebl.a, not libebl.so.
2920
2921 * ld.c (main): Mark stream for linker script as locked by caller.
2922 (read_version_script): Likewise.
2923 * ldlex.c: Define fread and fwrite to _unlocked variant.
2924
2925 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
2926 target_bswap_32.
2927 * unaligned.h: Define target_bswap_16, target_bswap_32, and
2928 target_bswap_64.
2929 (store_2ubyte_unaligned, store_4ubyte_unaligned,
2930 store_8ubyte_unaligned): Define using new macros.
2931
29322003-08-12 Ulrich Drepper <drepper@redhat.com>
2933
2934 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
2935 possibly unaligned memory. Support use of big endian machines.
2936
29372003-08-11 Ulrich Drepper <drepper@redhat.com>
2938
2939 * Moved to CVS archive.