blob: 15e6faea9cc30357581f84246dd9c274860f2ac5 [file] [log] [blame]
Mark Wielaardcb499c42015-06-09 16:26:16 +020012015-06-09 Mark Wielaard <mjw@redhat.com>
2
Mark Wielaard5aa90b92015-06-10 00:22:58 +02003 * addr2line.c (print_dwarf_function): Always free scopes before
4 returning.
5
62015-06-09 Mark Wielaard <mjw@redhat.com>
7
Mark Wielaardcb499c42015-06-09 16:26:16 +02008 * strip.c (handle_ar): Mark as unused.
9 (process_file): Produce an error when trying to handle an ar.
10
Mark Wielaard0d528f92015-05-30 23:55:50 +0200112015-05-30 Mark Wielaard <mjw@redhat.com>
12
13 * elfcmp.c (main): Only call memcmp when d_size != 0.
14
Mark Wielaard712f3c82015-05-23 17:50:09 +0200152015-05-23 Mark Wielaard <mjw@redhat.com>
16
17 * Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint,
18 findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage.
19
Mark Wielaard6f2e64a2015-05-21 16:05:18 +0200202015-05-21 Mark Wielaard <mjw@redhat.com>
21
22 * addr2line.c (handle_address): Set scopes to NULL after free.
23
Mark Wielaard472890f2015-05-20 12:10:47 +0200242015-05-20 Mark Wielaard <mjw@redhat.com>
25
Mark Wielaardb23a5b22015-05-20 14:09:46 +020026 * addr2line.c (OPT_PRETTY): New constant define.
27 (argp_option): Add "pretty-print".
28 (pretty): New static bool.
29 (parse_opt): Set pretty.
30 (print_dwarf_function): Adjust output when pretty is set.
31 (print_addrsym): Likewise.
32 (handle_address): Likewise.
33
342015-05-20 Mark Wielaard <mjw@redhat.com>
35
Mark Wielaardcd2da6c2015-05-20 11:52:27 +020036 * Makefile.am (addr2line_LDADD): Add demanglelib.
37 * addr2line.c (argp_option): Move demangle under output format.
38 (demangle): New static bool.
39 (demangle_buffer_len): New static size_t.
40 (demangle_buffer): New static char *.
41 (main): free demangle_buffer.
42 (parse_opt): Set demangle.
43 (symname): New static function.
44 (get_diename): Use symname.
45 (print_dwarf_function): Likewise.
46 (print_addrsym): Likewise.
47 (handle_address): Likewise.
48
492015-05-20 Mark Wielaard <mjw@redhat.com>
50
Mark Wielaard70a504d2015-05-19 16:21:27 +020051 * addr2line.c (argp_option): Add "addresses", 'a'.
52 (print_addresses): New static bool.
53 (parse_opt): Set print_addresses.
54 (get_addr_width): New static function.
55 (handle_address): Print address if print_addresses is true.
56
572015-05-20 Mark Wielaard <mjw@redhat.com>
58
Mark Wielaardd76d73f2015-05-19 23:08:00 +020059 * addr2line.c (handle_address): Call strtoumax with base 16. Make
60 sure all input has been processed.
61
622015-05-20 Mark Wielaard <mjw@redhat.com>
63
Mark Wielaard472890f2015-05-20 12:10:47 +020064 * addr2line (argp_option): Group 'section' under "Input format
65 options".
66
Mark Wielaard6d93c8c2015-05-12 15:59:04 +0200672015-05-12 Mark Wielaard <mjw@redhat.com>
68
69 * strip.c (debug_fd): New static variable.
70 (tmp_debug_fname): Likewise.
71 (cleanup_debug): New function using the above to clean up temporary
72 debug file.
73 (INTERNAL_ERROR): Call cleanup_debug.
74 (handle_elf): Use debug_fd and tmp_debug_fname statics and call
75 cleanup_debug before any error. Use output_fname instead of fname in
76 error messages when it exists (-o was given). SHT_NOBITS sections
77 can also be moved freely even if SHF_ALLOC is set. Add various
78 sanity checks. Use elf_assert instead of plain assert.
79
Mark Wielaarda2b964c2015-05-08 17:56:32 +0200802015-05-08 Mark Wielaard <mjw@redhat.com>
81
82 * nm.c (show_symbols): Call gelf_fsize with EV_CURRENT.
83 * strip.c (handle_elf): Likewise.
84
Mark Wielaard16e2ac32015-05-06 13:09:23 +0200852015-05-06 Mark Wielaard <mjw@redhat.com>
86
87 * elflint.c (check_gnu_hash): Return early when 2nd hash function
Mark Wielaard281bb492015-05-06 18:02:10 +020088 shift too big. Check there is enough data available. Make sure
89 bitmask_words is not zero.
Mark Wielaard9d092652015-05-06 16:01:55 +020090 (check_verdef): Use Elf64_Word for shdr->sh_info cnt.
91 (check_verneed): Likewise.
Mark Wielaard5e80a1e2015-05-06 17:38:18 +020092 (check_attributes): Break when vendor name isn't terminated.
93 Add overflow check for subsection_len.
Mark Wielaard16e2ac32015-05-06 13:09:23 +020094
Mark Wielaarda3344c72015-05-06 12:45:49 +0200952015-05-05 Mark Wielaard <mjw@redhat.com>
96
97 * nm.c (show_symbols): Handle dwarf_linesrc returning NULL.
98
Max Filippovb88bece2015-05-04 02:25:40 +0300992015-05-04 Max Filippov <jcmvbkbc@gmail.com>
100
Max Filippov8c4aa0e2015-05-04 20:17:51 +0300101 * ar.c (do_oper_extract): Replace struct timeval with struct timespec
102 and futimes with futimens.
103 * strip.c (process_file): Replace struct timeval with struct timespec.
104 (handle_elf, handle_ar): Replace struct timeval with struct timespec
105 in prototype. Replace futimes with futimens.
106
1072015-05-04 Max Filippov <jcmvbkbc@gmail.com>
108
Max Filippovb88bece2015-05-04 02:25:40 +0300109 * addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
110 * ar.c: Likewise.
111 * ld.c: Likewise.
112 * nm.c: Likewise.
113 * objdump.c: Likewise.
114 * ranlib.c: Likewise.
115 * size.c: Likewise.
116 * strip.c: Likewise.
117 * unstrip.c: Likewise.
118
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +03001192015-05-04 Anthony G. Basile <blueness@gentoo.org>
120
121 * Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
122 (ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
123 (elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
124 (ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
125
Mark Wielaardf333a1c2015-04-22 11:44:32 +02001262015-03-22 Mark Wielaard <mjw@redhat.com>
127
Mark Wielaard32d5b6f2015-04-22 12:47:46 +0200128 * readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
129 before subtracting cie_id. And cast cie_offset to Dwarf_Off before
130 comparison.
131
1322015-03-22 Mark Wielaard <mjw@redhat.com>
133
Mark Wielaardf333a1c2015-04-22 11:44:32 +0200134 * readelf.c (print_gdb_index_section): Check all offsets used
135 against section d_size.
136
Mark Wielaard86de7922015-04-17 20:03:44 +02001372015-03-17 Mark Wielaard <mjw@redhat.com>
138
Mark Wielaard9b5f7952015-04-17 22:24:41 +0200139 * readelf.c (print_debug): Don't return, but always use dummy_dbg.
140
1412015-03-17 Mark Wielaard <mjw@redhat.com>
142
Mark Wielaard86de7922015-04-17 20:03:44 +0200143 * readelf.c (print_gdb_index_section): Add overflow checking for
144 dataend checks.
145
Mark Wielaard587c4b32015-04-14 11:59:36 +02001462015-03-14 Mark Wielaard <mjw@redhat.com>
147
148 * nm.c (INTERNAL_ERROR): Remove __DATE__.
149 * objdump.c (INTERNAL_ERROR): Likewise.
150 * size.c (INTERNAL_ERROR): Likewise.
151 * strip.c (INTERNAL_ERROR): Likewise.
152
Petr Machata7f617342015-03-18 19:42:02 +01001532015-03-18 Petr Machata <pmachata@redhat.com>
154
155 * readelf.c (dwarf_tag_string, dwarf_attr_string)
156 (dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
157 (dwarf_encoding_string, dwarf_access_string)
158 (dwarf_visibility_string, dwarf_virtuality_string)
159 (dwarf_identifier_case_string, dwarf_calling_convention_string)
160 (dwarf_ordering_string, dwarf_discr_list_string)
161 (dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
162 to match the API changes.
163
Mark Wielaardae9aa3e2015-03-09 16:41:48 +01001642015-03-09 Mark Wielaard <mjw@redhat.com>
165
166 * elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
167
Mark Wielaarde16e1412015-01-04 00:35:25 +01001682015-01-03 Mark Wielaard <mjw@redhat.com>
169
170 * elfcmp (main): Check section name is not NULL. Check sh_entsize
171 is not zero for symbol tables. Check phdrs are not NULL.
172 (search_for_copy_reloc): Check sh_entsize is not zero.
173
Mark Wielaard0a545e62014-12-29 00:53:27 +01001742014-12-30 Mark Wielaard <mjw@redhat.com>
175
176 * elflint.c (check_scn_group): Check d_buf and name are not NULL.
177 (is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
178 zero.
179 (check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
180 (check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
181 Check shdr and symshdr sh_entsize are not zero.
182 (check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
183 Check symshdr->sh_entsize is not zero. Check data->d_buf is not
184 NULL.
185 (compare_hash_gnu_hash): Check sections d_buf are not NULL.
186 Check section data is large enough. Use gnu_symbias.
187 (check_group): Check section val is valid.
188 (has_copy_reloc): Check sh_entsize is not zero.
189 (check_versym): Likewise.
190 (unknown_dependency_p): Likewise.
191 (check_verneed): Break on invalid ref or offset. Don't assert.
192 Report error when next offset is zero, but more vers expected.
193 (check_verdef): Likewise.
194 (check_attributes): Make sure d_buf is not NULL.
195 (check_note): Likewise.
196 (check_note_section): Likewise.
197 (check_program_header): Make sure section name is not NULL.
198
Mark Wielaard0b799ad2014-12-26 16:12:52 +01001992014-12-26 Mark Wielaard <mjw@redhat.com>
200
Mark Wielaard555fdae2014-12-26 22:57:00 +0100201 * strings.c (read_elf): Produce error when section data falls outside
202 file.
203
2042014-12-26 Mark Wielaard <mjw@redhat.com>
205
Mark Wielaard309e7122014-12-26 19:36:31 +0100206 * nm.c (show_symbols): Guard against divide by zero in error check.
207 Add section index number in error message.
208
2092014-12-26 Mark Wielaard <mjw@redhat.com>
210
Mark Wielaard8fb260f2014-12-26 16:20:39 +0100211 * nm.c (handle_ar): Skip over /SYM64/ entries.
212
2132014-12-26 Mark Wielaard <mjw@redhat.com>
214
Mark Wielaard0b799ad2014-12-26 16:12:52 +0100215 * nm.c (handle_ar): Break on arsym with invalid offset.
216
Mark Wielaardcda1a312014-12-21 22:55:54 +01002172014-12-20 Mark Wielaard <mjw@redhat.com>
218
Mark Wielaard8f2f5802014-12-21 23:02:12 +0100219 * readelf.c (print_debug_macinfo_section): Mark cus sentinel files
220 as -1 non-existent. Check macoff against sentinel cus.
221
2222014-12-20 Mark Wielaard <mjw@redhat.com>
223
Mark Wielaardcda1a312014-12-21 22:55:54 +0100224 * readelf.c (print_debug_exception_table): Add max_action overflow
225 check. Check action_table_end before reading slib128. Check
226 max_ar_filter underflow.
227
Ulrich Drepper898ed262014-12-18 12:32:39 -05002282014-12-18 Ulrich Drepper <drepper@gmail.com>
229
230 * Makefile.am: Suppress output of textrel_check command.
231
Mark Wielaard99a6f222014-12-17 15:07:49 +01002322014-12-17 Mark Wielaard <mjw@redhat.com>
233
234 * readelf.c (print_cfa_program): Add bounds check before each op that
235 takes at least one argument.
236
Mark Wielaardff1ce972014-12-16 16:10:28 +01002372014-12-16 Mark Wielaard <mjw@redhat.com>
238
Mark Wielaard32270932014-12-16 22:19:08 +0100239 * readelf.c (print_decoded_line_section): Print dwarf_errmsg if
240 dwarf_onesrcline or dwarf_linesrc fails.
241
2422014-12-16 Mark Wielaard <mjw@redhat.com>
243
Mark Wielaardff1ce972014-12-16 16:10:28 +0100244 * readelf.c (print_debug_line_section): Correct overflow check for
245 unit_length.
Mark Wielaardacb50692014-12-16 16:30:59 +0100246 (print_debug_aranges_section): Correct overflow check for length.
Mark Wielaardff1ce972014-12-16 16:10:28 +0100247
Mark Wielaardb171ca42014-12-15 11:35:46 +01002482014-12-15 Mark Wielaard <mjw@redhat.com>
249
Mark Wielaard6a8a9e32014-12-15 19:43:02 +0100250 * readelf.c (notice_listptr): Return false if offset doesn't fit
251 in 61-bits.
252 (attr_callback): Warn if loclist or rangelist offset doesn't fit.
253
2542014-12-15 Mark Wielaard <mjw@redhat.com>
255
Mark Wielaard198e9492014-12-15 19:05:43 +0100256 * readelf.c (print_ops): Don't assert when addr_size or ref_size
257 is not 4 or 8, just report invalid data.
258
2592014-12-15 Mark Wielaard <mjw@redhat.com>
260
Mark Wielaard2323b452014-12-15 15:34:59 +0100261 * readelf.c (print_gdb_index_section): Add more bounds checks.
262
2632014-12-15 Mark Wielaard <mjw@redhat.com>
264
Mark Wielaardb171ca42014-12-15 11:35:46 +0100265 * readelf.c (print_debug_line_section): Check there is enough room
Mark Wielaard9c42b782014-12-15 13:40:18 +0100266 for DW_LNE_set_address argument. Make sure there is enough room
267 for the the initial unit_length.
Mark Wielaardb171ca42014-12-15 11:35:46 +0100268
Mark Wielaard7a053472014-12-14 21:48:23 +01002692014-12-14 Mark Wielaard <mjw@redhat.com>
270
271 * elflint.c (check_attributes): Call get_uleb128 with end pointer.
272 * readelf.c (print_attributes): Likewise.
273 (print_ops): Likewise and also for get_sleb128.
274 (print_cfa_program): Likewise and add more readp bounds checks.
275 (read_encoded): Likewise.
276 (print_debug_frame_section): Likewise.
277 (print_debug_line_section): Likewise.
278 (print_debug_macinfo_section): Likewise.
279 (print_debug_macro_section): Likewise.
280 (print_debug_exception_table): Likewise.
281
Mark Wielaard274cbda2014-12-16 11:04:55 +01002822014-12-16 Mark Wielaard <mjw@redhat.com>
283
284 * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
285 difference doesn't wrap around before returning as int.
286
Mark Wielaardcd339292014-12-11 17:21:22 +01002872014-12-11 Mark Wielaard <mjw@redhat.com>
288
Mark Wielaardee5693b2014-12-11 18:26:09 +0100289 * readelf.c (print_debug_exception_table): Check TType base offset
290 and Action table are sane.
291
2922014-12-11 Mark Wielaard <mjw@redhat.com>
293
Mark Wielaardcd339292014-12-11 17:21:22 +0100294 * readelf.c (print_debug_frame_section): Check number of augmentation
295 chars to print.
296
Mark Wielaarda0da7562014-12-09 12:58:07 +01002972014-12-09 Mark Wielaard <mjw@redhat.com>
298
299 * readelf.c (handle_file_note): Check count fits data section and
300 doesn't overflow fptr.
301
Mark Wielaard990fbe52014-12-08 10:11:43 +01003022014-12-08 Mark Wielaard <mjw@redhat.com>
303
304 * readelf.c (print_debug_exception_table): Report invalid data if
305 action table doesn't immediately follow call site table.
306
Josh Stoneaecdf262014-12-10 11:06:52 -08003072014-12-10 Josh Stone <jistone@redhat.com>
308
Josh Stone2098b3d2014-12-10 11:14:40 -0800309 * addr2line.c (get_diename): New, get linkage_name or name.
310 * addr2line.c (print_dwarf_function): Use get_diename.
311 * addr2line.c (handle_address): Likewise.
312 * addr2line.c (print_diesym): Removed.
313
3142014-12-10 Josh Stone <jistone@redhat.com>
315
Josh Stoneaecdf262014-12-10 11:06:52 -0800316 * addr2line.c (handle_address): Find the proper inline parents.
317
Mark Wielaard96ddcad2014-12-07 22:45:28 +01003182014-12-07 Mark Wielaard <mjw@redhat.com>
319
Mark Wielaardf0c5ef82014-12-07 23:40:12 +0100320 * readelf.c (print_debug_line_section): max_ops_per_instr cannot
321 be zero.
322
3232014-12-07 Mark Wielaard <mjw@redhat.com>
324
Mark Wielaard96ddcad2014-12-07 22:45:28 +0100325 * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
326 and DW_OP_GNU_implicit_pointer.
327
Mark Wielaardd0070a92014-12-04 17:01:20 +01003282014-12-04 Mark Wielaard <mjw@redhat.com>
329
330 * objdump.c (show_relocs_x): Make sure destshdr exists.
331 (show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
332 (show_relocs_rela): Likewise.
333 (show_relocs): Make sure destshdr, symshdr and symdata exists.
334
Mark Wielaard0ed4f982014-11-30 21:03:57 +01003352014-11-30 Mark Wielaard <mjw@redhat.com>
336
337 * readelf.c (handle_sysv_hash64): Fix overflow check.
338
Mark Wielaard98755612014-11-28 22:22:16 +01003392014-11-28 Mark Wielaard <mjw@redhat.com>
340
341 * readelf.c (handle_relocs_rel): Don't reuse destshdr to store
342 section header of a relocation against a STT_SECTION symbol. Use
343 a new local variable secshdr.
344 (handle_relocs_rela): Likewise.
345
Mark Wielaard13a9fa32014-11-27 00:12:32 +01003462014-11-26 Mark Wielaard <mjw@redhat.com>
347
348 * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
349 to ptrdiff_t for comparison.
350
Mark Wielaard020fc022014-11-24 21:54:42 +01003512014-11-24 Mark Wielaard <mjw@redhat.com>
352
353 * readelf.c (print_debug_line_section): Check line_range is not zero
354 before usage.
355
Mark Wielaard49296062014-11-23 18:26:16 +01003562014-11-23 Mark Wielaard <mjw@redhat.com>
357
358 * readelf.c (print_debug_aranges_section): Check length to catch
359 nexthdr overflow.
360
Mark Wielaard9644aaf2014-11-21 23:26:35 +01003612014-11-21 Mark Wielaard <mjw@redhat.com>
362
363 * readelf.c (print_attributes): Guard against empty section.
364 Document attribute format. Break when vendor name isn't terminated.
365 Add overflow check for subsection_len. Handle both gnu and non-gnu
366 attribute tags.
367
Mark Wielaard712c8fa2014-11-22 23:08:48 +01003682014-11-22 Mark Wielaard <mjw@redhat.com>
369
370 * elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
371 * findtextrel.c (process_file): Use elf_getphdrnum.
372 * readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
373 (print_phdr): Check phnum.
374 * size.c (show_segments): Use elf_getphdrnum.
375 * strip.c (handle_elf): Likewise.
376 * unstrip.c (copy_elf): Likewise.
377 (copy_elided_sections): Likewise.
378 (handle_file): Likewise.
379
Mark Wielaard86b0b132014-11-18 10:07:10 +01003802014-11-18 Mark Wielaard <mjw@redhat.com>
381
382 * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
383 length.
384
Mark Wielaard7df0da32014-11-17 23:01:34 +01003852014-11-17 Mark Wielaard <mjw@redhat.com>
386
Mark Wielaard3b3a1912014-11-17 23:35:28 +0100387 * readelf.c (handle_verneed): Check vna_next and vn_next exist.
388 (handle_verdef): Check vda_next and vd_next exist.
389 (handle_versym): Check vd_next, vna_next and vn_next exist.
390 Check vername and filename are not NULL before use.
391
3922014-11-17 Mark Wielaard <mjw@redhat.com>
393
Mark Wielaard5c1a45c2014-11-17 23:15:45 +0100394 * elfcmp.c (main): Check section names are NULL before use.
395 * objdump.c (section_match): Likewise.
396 * size.c (show_sysv): Likewise.
397
3982014-11-17 Mark Wielaard <mjw@redhat.com>
399
Mark Wielaard7df0da32014-11-17 23:01:34 +0100400 * readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
401 or 8 instead of just calling print_cfa_program.
402
Mark Wielaard2af7b492014-11-16 11:40:08 +01004032014-11-16 Mark Wielaard <mjw@redhat.com>
404
Mark Wielaard436275e2014-11-17 00:33:36 +0100405 * readelf (process_elf_file): Set phnum to zero if there aren't
406 actually any pheaders.
407 (print_phdr): Check there actually is a phdr.
408
4092014-11-16 Mark Wielaard <mjw@redhat.com>
410
Mark Wielaard2af7b492014-11-16 11:40:08 +0100411 * readelf.c (print_cfa_program): Check block len before calling
412 print_ops.
413
Mark Wielaardad87d272014-11-14 12:24:28 +01004142014-11-14 Mark Wielaard <mjw@redhat.com>
415
Mark Wielaardd1b11632014-11-14 21:42:47 +0100416 * readelf.c (print_debug_frame_section): Sanity Check CIE
417 unit_length and augmentationlen.
418
4192014-11-14 Mark Wielaard <mjw@redhat.com>
420
Mark Wielaardad87d272014-11-14 12:24:28 +0100421 * readelf.c (handle_versym): Check def == NULL before use.
422
Mark Wielaardd8b96822014-11-08 14:04:27 +01004232014-11-08 Mark Wielaard <mjw@redhat.com>
424
425 * readelf.c (handle_versym): Initialize vername and filename array
426 elements.
427
Mark Wielaard6b246e02014-11-07 12:54:02 +01004282014-11-07 Mark Wielaard <mjw@redhat.com>
429
430 * readelf.c (handle_sysv_hash): Sanity check section contents.
431 (handle_sysv_hash64): Likewise.
432 (handle_gnu_hash): Likewise.
433
Petr Machatafbf1a442014-09-14 00:47:42 +02004342014-09-14 Petr Machata <pmachata@redhat.com>
435
436 * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
437
Petr Machata1498f542014-09-12 19:03:33 +02004382014-09-12 Petr Machata <pmachata@redhat.com>
439
440 * readelf.c (encoded_ptr_size): In the switch statement, change
441 magic constants 3 and 4 to DW_EH_PE_* counterparts. Still accept
442 0. Print diagnostic for anything else.
443
Josh Stonef1ec7442014-08-25 14:40:35 -07004442014-08-25 Josh Stone <jistone@redhat.com>
445
446 * Makefile.am: Prevent premature @AR@ replacement in a sed expression.
447
Mark Wielaarda95c4ad2014-07-04 14:30:48 +02004482014-07-04 Menanteau Guy <menantea@linux.vnet.ibm.com>
449 Mark Wielaard <mjw@redhat.com>
450
451 * elflint (check_symtab): Add ".TOC." to the list of possibly
452 dangling symbols because of sourceware PR13621.
453
Mark Wielaardc1c1c062014-06-14 17:15:37 +02004542014-06-14 Mark Wielaard <mjw@redhat.com>
455
456 * elflint (check_symtab): Use ebl_func_addr_mask on st_value.
457
Mark Wielaard903f3342014-05-27 10:25:27 +02004582014-05-27 Mark Wielaard <mjw@redhat.com>
459
460 * readelf.c (print_debug): Skip section if name is NULL.
461
Mark Wielaard22497092014-05-26 21:28:05 +02004622014-05-26 Mark Wielaard <mjw@redhat.com>
463
Mark Wielaardeb4811d2014-05-26 22:54:38 +0200464 * readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
465 does, when sh_info == 0.
466
4672014-05-26 Mark Wielaard <mjw@redhat.com>
468
Mark Wielaardbd1a0d12014-05-26 22:35:30 +0200469 * unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
470 section when sh_size of the original and undo .bss section are equal.
471
4722014-05-26 Mark Wielaard <mjw@redhat.com>
473
Mark Wielaard22497092014-05-26 21:28:05 +0200474 * unstrip.c (options): Add --force, -F.
475 (struct arg_info): Add bool force.
476 (parse_opt): Handle 'F', set force.
477 (handle_explicit_files): Add force argument, add warn function,
478 separate check ehdr field checks, use warn.
479 (handle_dwfl_module): Add force argument, pass on to
480 handle_explicit_files.
481 (handle_output_dir_module): Add force argument, pass on to
482 handle_dwfl_module.
483 (handle_implicit_modules): Pass info->force to handle_dwfl_module and
484 handle_output_dir_module.
485 (main): Pass info.force to handle_explicit_files.
486
Mark Wielaard028d0ab2014-05-19 16:52:56 +02004872014-05-19 Mark Wielaard <mjw@redhat.com>
488
489 * elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
490
Mark Wielaarddf85bf92014-05-01 14:48:27 +02004912014-05-01 Mark Wielaard <mjw@redhat.com>
492
493 * readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
494 if looking for alternate debug file.
495
Mark Wielaard93802972014-04-11 23:52:47 +02004962014-04-11 Mark Wielaard <mjw@redhat.com>
497
498 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
499
Mark Wielaard7c757b32014-04-22 22:23:18 +02005002014-04-22 Mark Wielaard <mjw@redhat.com>
501
Mark Wielaard7c680a22014-04-22 23:26:34 +0200502 * readelf.c (handle_core_item): Make sure variable length array
503 contains at least enough space for terminating zero char.
504
5052014-04-22 Mark Wielaard <mjw@redhat.com>
506
Mark Wielaard7c757b32014-04-22 22:23:18 +0200507 * readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
508 left shift.
509
Mark Wielaard32324792014-04-13 17:39:57 +02005102014-03-13 Mark Wielaard <mjw@redhat.com>
511
512 * Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
513 LDADD lines.
514 * strings.c (process_chunk): Remove _MUDFLAP condition.
515
Mark Wielaardf7cdc742014-04-09 22:38:07 +02005162014-04-09 Mark Wielaard <mjw@redhat.com>
517
518 * readelf.c (print_debug_aranges_section): Don't get the raw section
519 data, use the possibly decompressed .[z]debug sectiondata.
520 (print_debug_ranges_section): Likewise.
521 (print_debug_frame_section): Likewise.
522 (print_debug_line_section): Likewise.
523 (print_debug_loc_section): Likewise.
524 (print_debug_macinfo_section): Likewise.
525 (print_debug_macro_section): Likewise.
526
Mark Wielaard110c2732014-04-10 15:02:53 +02005272014-04-10 Mark Wielaard <mjw@redhat.com>
528
529 * readelf.c (buf_read_ulong): Pass actual long size to convert.
530
Mark Wielaardb9207522014-03-05 16:17:54 +01005312014-03-05 Mark Wielaard <mjw@redhat.com>
532
533 * readelf.c (attr_callback): Print DW_FORM_sdata values as signed
534 numbers.
535
Mark Wielaardcb7b2d62014-02-24 17:44:42 +01005362014-02-24 Mark Wielaard <mjw@redhat.com>
537
538 * readelf (print_phdr): Check there is a SHT_PROGBITS section at the
539 offset given by p_offsets for a PT_INTERP segment before trying to
540 display the interpreter string.
541
Mark Wielaard43c9c2d2014-02-07 14:23:24 +01005422014-02-07 Mark Wielaard <mjw@redhat.com>
543
544 * readelf.c (print_phdr): Check phdr->p_filesz and make sure
545 interpreter string is zero terminated before calling printf.
546
Mark Wielaardf48eb6b2014-01-23 00:56:41 +01005472014-01-22 Mark Wielaard <mjw@redhat.com>
548
549 * Makefile.am (nm_no_Wformat): Removed.
550 (size_no_Wformat): Likewise.
551 (strings_no_Wformat): Likewise.
552 (addr2line_no_Wformat): Likewise.
553 * size.c (show_sysv): Use fmtstr directly as literal in printf.
554 (show_sysv_one_line): Likewise.
555 * strings.c (locfmt): Removed.
556 (radix): New static enum.
557 (parse_opt): Set radix, not locfmt.
558 (process_chunk_mb): Use fmtstr directly as literal in printf based
559 on radix.
560 (process_chunk): Likewise.
561 * nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
562 (show_symbols_bsd): Likewise.
563 (show_symbols_posix): Likewise.
564
Mark Wielaard13968d92014-01-21 16:13:49 +01005652014-01-21 Mark Wielaard <mjw@redhat.com>
566
567 * stack.c (show_inlines): New static boolean.
568 (print_frame): New function split out from...
569 (print_frames): ..here. If show_inlines is true and we found a
570 DIE for the frame address, call print_inline_frames otherwise
571 call print_frame. Keep track of and track frame_nr.
572 (print_inline_frames): New function.
573 (parse_opt): Handle '-i'.
574 (main): Add 'i' to options.
575
Mark Wielaard8520f702014-01-27 16:05:54 +01005762014-01-27 Mark Wielaard <mjw@redhat.com>
577
578 * stack.c (maxframes): Initialize to 256.
579 (main): Document new default in options. Document magic number
580 used in frames.allocated initialization.
581
Mark Wielaard247f8582014-01-20 13:49:48 +01005822014-01-20 Mark Wielaard <mjw@redhat.com>
583
Mark Wielaard531a30a2014-01-20 23:09:26 +0100584 * stack.c (show_debugname): New static boolean.
585 (die_name): New function.
586 (print_frames): If show_debugname is true set symname to the
587 first function-like DIE with a name in scope for the address in
588 the debuginfo.
589 (parse_opt): Handle '-d'.
590 (main): Add 'd' to options.
591
5922014-01-20 Mark Wielaard <mjw@redhat.com>
593
Mark Wielaard247f8582014-01-20 13:49:48 +0100594 * addr2line.c (handle_address): Initialize scopes to NULL.
595
Roland McGrath7d5b3012014-01-17 17:11:39 +01005962014-01-17 Roland McGrath <roland@redhat.com>
597
Roland McGrath58d36192014-01-17 17:12:46 +0100598 * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
599 st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
600 Don't use assert on input values, instead bail with "illformed" error.
601
6022014-01-17 Roland McGrath <roland@redhat.com>
603
Roland McGrath7d5b3012014-01-17 17:11:39 +0100604 * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
605 (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
606 (handle_scngrp): Check for bogus sh_info.
607
Jakub Jelinek71c15342014-01-17 17:07:27 +01006082014-01-17 Jakub Jelinek <jakub@redhat.com>
609
610 * elflint.c (section_name): Return "<invalid>" instead of
611 crashing on invalid section name.
612 (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
613 check_symtab_shndx, check_hash, check_versym): Robustify.
614 (check_hash): Don't check entries beyond end of section.
615 (check_note): Don't crash if gelf_rawchunk fails.
616
Petr Machataced66872014-01-17 17:00:12 +01006172014-01-17 Petr Machata <pmachata@redhat.com>
618
619 * readelf.c (handle_dynamic, handle_relocs_rel)
620 (handle_relocs_rela, handle_versym, print_liblist):
621 Use gelf_fsize instead of relying on shdr->sh_entsize.
622
Mark Wielaard04781c32014-01-14 22:13:43 +01006232014-01-14 Mark Wielaard <mjw@redhat.com>
624
625 * readelf.c (print_debug_macro_section): Clear vendor array before
626 use.
627
Jan Kratochvil7c6e7852014-01-15 21:16:57 +01006282014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
629
630 Fix corruption of non-C++ symbols by the demangler.
631 * nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
632 (show_symbols): Check for _Z.
633 * stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
634
Mark Wielaard6034e2f2014-01-02 22:31:07 +01006352014-01-02 Mark Wielaard <mjw@redhat.com>
636
Mark Wielaardda91c5b2014-01-03 00:06:31 +0100637 * stack.c (show_raw): Declare unconditionally.
638 (parse_opt): Handle '-r' unconditionally.
639 (main): Show "raw" option even without USE_DEMANGLE.
640
6412014-01-02 Mark Wielaard <mjw@redhat.com>
642
Mark Wielaard36490c92014-01-02 23:59:41 +0100643 * stack.c (print_frames): Print 0x before build-id hex-offset.
644
6452014-01-02 Mark Wielaard <mjw@redhat.com>
646
Mark Wielaard6034e2f2014-01-02 22:31:07 +0100647 * stack.c (maxframes): Increase to 2048.
648 (struct frames): Add allocated field.
649 (frame_callback): If frames used is frames allocated, realloc.
650 (print_frames): Show an error if maxframes has been reached.
651 (parse_opt): Allow -n 0 for unlimited frames.
652 (main): Document -n 0 and new default 2048 frames. Allocate initial
653 number of frames with malloc.
654
Mark Wielaard19108012013-12-30 22:00:57 +01006552013-12-30 Mark Wielaard <mjw@redhat.com>
656
657 * stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
658 or dwfl_core_file_attach and check for errors.
659
Mark Wielaarda6141d22013-12-28 23:25:54 +01006602013-12-28 Mark Wielaard <mjw@redhat.com>
661
662 * stack.c (print_frames): Remove address width code and use...
663 (get_addr_width): ...this new function.
664 (show_modules): New static boolean.
665 (module_callback): New static function.
666 (parse_opt): Handle '-l'.
667 (main): Add 'l' to options. If show_modules then use dwfl_getmodules
668 with module_callback to show all detected modules and possible
669 build_id, elf and dwarf files.
670
Mark Wielaard1f7763e2013-12-27 10:49:51 +01006712013-12-27 Mark Wielaard <mjw@redhat.com>
672
673 * stack.c (frames_shown): New static boolean.
674 (EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
675 (frame_callback): Return -1 on error. Don't print error.
676 (print_frames): Add arguments, tid, dwflerr and what. Print tid.
677 If there was an error report it with address and module if possible.
678 Record whether any frames were actually printed.
679 (thread_callback): Collect tid and err, pass it to print_frames.
680 (parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
681 if dwfl_linux_proc_report returned it. Check whether we are properly
682 attached with dwfl_pid.
683 (main): Document exit status. Don't report DWARF_CB_ABORT from
684 callbacks as error. Pass real errors to print_frames. Return
685 EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
686 were any non-fatal errors.
687
Mark Wielaard99fc3f72013-12-23 00:47:06 +01006882013-12-23 Mark Wielaard <mjw@redhat.com>
689
Mark Wielaardfdb64e62013-12-23 21:19:05 +0100690 * Makefile.am (stack_LDADD): Add demanglelib.
691 * stack.c (show_quiet): New static boolean, default false.
692 (show_raw): Likewise.
693 (demangle_buffer_len): New static size_t.
694 (demangle_buffer): New static char *.
695 (print_frames): Don't resolve pc name if show_quiet. Demangle name
696 unless show_raw.
697 (parse_opt): Handle '-q' and '-r'.
698 (main): Add 'q' and 'r' to options. Free demangle_buffer.
699
7002013-12-23 Mark Wielaard <mjw@redhat.com>
701
Mark Wielaardfe9b95d2013-12-23 10:46:54 +0100702 * stack.c (OPT_DEBUGINFO): New define.
703 (OPT_COREFILE): Likewise.
704 (pid): New static.
705 (core_fd): Likewise.
706 (core): Likewise.
707 (exec): Likewise.
708 (debuginfo_path): Likewise.
709 (parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
710 Do argument sanity checking. Setup Dwfl.
711 (main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
712 Remove argp_child children, simplify argp doc, remove custom
713 usage message and construction of dwfl with dwfl_standard_argp.
714 Use pid directly as tid. close core and core_fd if opened. Print
715 pid of process or core.
716
7172013-12-23 Mark Wielaard <mjw@redhat.com>
718
Mark Wielaard99fc3f72013-12-23 00:47:06 +0100719 * stack.c (show_build_id): New static boolean.
720 (print_frames): Print module build-id, load address and pc offset
721 if show_build_id is true.
722 (parse_opt): Handle '-b'.
723 (main): Add -b to options.
724
Mark Wielaard9fec14a2013-12-22 23:48:26 +01007252013-12-22 Mark Wielaard <mjw@redhat.com>
726
727 * stack.c (maxframes): New static unsigned. Initialize to 64.
728 (struct frame): New struct.
729 (struct frames): Likewise.
730 (dwfl): New static Dwfl pointer.
731 (frame_callback): Use arg as struct frames and fill it next frame.
732 Return DWARF_CB_ABORT when maxframes has been reached. Move
733 printing of frame to...
734 (print_frames): ...here. New function.
735 (thread_callback): Use arg as struct frames and set frames to zero.
736 Call print_frames.
737 (parse_opt): Handle '-n'.
738 (main): Add -n to options. Allocate frames using maxframes. Pass
739 frames to frame_callback and thread_callback.
740
Mark Wielaarde962ec32013-12-20 10:09:12 +01007412013-12-20 Mark Wielaard <mjw@redhat.com>
742
743 * stack.c (show_one_tid): New static boolean.
744 (parse_opt): Handle '-1'.
745 (main): Add -1 to options. Call dwfl_getthread_frames when
746 show_one_tid is true.
747
Mark Wielaard159ac522013-12-18 11:05:54 +01007482013-12-18 Mark Wielaard <mjw@redhat.com>
749
750 * addr2line.c (options): Add symbol-sections, 'x'.
751 (show_symbol_sections): New static bool.
752 (parse_opt): Handle 'x'.
753 (print_addrsym): Use dwfl_module_addrinfo value.r
754 Also show section of address with show_symbol_sections.
755 (find_symbol): Use dwfl_module_getsym_info and set value.
756 (handle_address): Request value and use it instead of sym.st_value.
757 * readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
758 name and offset.
759
Masatake YAMATOc8c610b2013-12-17 12:03:29 +09007602013-12-17 Masatake YAMATO <yamato@redhat.com>
761 Mark Wielaard <mjw@redhat.com>
762
763 * stack.c (show_activation, show_module, show_source): New variables.
764 (parse_opt): Set show_activation if -a option is given.
765 Set show_module if -m option is given. Set show_source if -s option
766 is given. Set all show booleans when -v option is given.
767 (main): Added `-a', `-m', `-s', and `-v' to the help message.
768 (frame_callback): Print module and source file information.
769
Petr Machata98c8a732013-11-26 03:10:31 +01007702013-11-25 Petr Machata <pmachata@redhat.com>
771
772 * elflint.c (valid_e_machine): Add EM_AARCH64.
773
Petr Machataa47a0962013-11-14 01:07:22 +01007742013-11-14 Petr Machata <pmachata@redhat.com>
775
776 * readelf.c (handle_core_item) <'h'>: New branch for handling
777 fields that shouldn't be displayed.
778
Mark Wielaard875cad82013-11-10 22:17:05 +01007792013-11-10 Mark Wielaard <mjw@redhat.com>
780
781 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
782 ARGP_PROGRAM_BUG_ADDRESS_DEF.
783 (print_version): New function.
784
Mark Wielaard03d76f42013-11-09 16:45:22 +01007852013-11-09 Mark Wielaard <mjw@redhat.com>
786
787 * arlib.c (arlib_init): Call snprintf before using the result
788 with memcpy.
789 (arlib_finalize): Likewise.
790 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
791
Jan Kratochvil0b867462013-05-30 14:37:38 +02007922013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
793
794 * Makefile.am (bin_PROGRAMS): Add stack.
795 (stack_LDADD): New.
796 * stack.c: New file.
797
Mark Wielaardbe860842013-11-05 13:37:33 +01007982013-11-05 Mark Wielaard <mjw@redhat.com>
799
800 * readelf.c (print_debug_ranges_section): Cast address to size_t
801 before comparison.
802 (print_debug_loc_section): Likewise.
803
Mark Wielaard4f7673f2013-10-18 10:37:53 +02008042013-10-18 Mark Wielaard <mjw@redhat.com>
805
806 * ar.c (main): Correct operation check when instance_specifed is set.
807
Petr Machataab224102013-09-26 00:39:34 +02008082013-09-26 Petr Machata <pmachata@redhat.com>
809
Petr Machata0c9ae0c2013-09-26 21:02:22 +0200810 * readelf.c (handle_file_note): New function.
811 (handle_notes_data): Call it to handle NT_FILE notes.
812
8132013-09-26 Petr Machata <pmachata@redhat.com>
814
Petr Machataab224102013-09-26 00:39:34 +0200815 * readelf.c (handle_siginfo_note): New function.
816 (handle_notes_data): Call it to handle NT_SIGINFO notes.
817 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
818
Mark Wielaard4b9e6392013-08-13 11:40:21 +02008192013-08-13 Mark Wielaard <mjw@redhat.com>
820
821 * addr2line.c (options): Add "inlines", 'i'.
822 (show_inlines): New bool.
823 (parse_opt): Handle 'i'.
824 (print_diesym): New static function.
825 (print_src): New function taking code from...
826 (handle_address): here. Call print_src. Print inlines.
827
Mark Wielaardd0f85012013-08-12 14:21:31 +02008282013-08-12 Mark Wielaard <mjw@redhat.com>
829
830 * addr2line.c (main): If there is a newline char at end of buf,
831 then remove it.
832
Mark Wielaard35230222013-07-05 16:44:47 +02008332013-07-05 Mark Wielaard <mjw@redhat.com>
834
835 * readelf.c (print_ops): Take CU as argument, use it to print
836 parameter_ref DIE offset.
837 (struct listptr): Replace base field with cu.
838 (listptr_base): New function.
839 (compare_listptr): Use listptr_base.
840 (notice_listptr): Take CU as argument.
841 (skip_listptr_hole): Likewise.
842 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
843 (print_cfa_program): Pass NULL as CU to print_ops.
844 (struct attrcb_args): Replace cu_base field with cu.
845 (attr_callback): Pass cu not cu_base to notice_listptr.
846 (print_debug_units): Don't calculate base, just set cu.
847 (print_debug_loc_section): Pass cu to skip_listptr_hole and
848 print_ops.
849
Mark Wielaard63d8bfd2013-05-06 15:48:56 +02008502013-05-06 Mark Wielaard <mjw@redhat.com>
851
852 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
853 argument as DIE offset.
854
Mark Wielaardcdaaf212013-04-25 16:50:11 -04008552013-04-24 Mark Wielaard <mjw@redhat.com>
856
857 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
858
Mark Wielaarda8c7f052013-03-25 21:11:53 +01008592013-03-25 Mark Wielaard <mjw@redhat.com>
860
Mark Wielaard1a094202013-03-25 14:48:06 +0100861 * readelf.c (argp_options): Add decodedline.
862 (decodedline): New boolean initialized to false.
863 (parse_opt): Set decodedline when arg is decodedline.
864 (print_decoded_line_section): New function.
865 (print_debug_line_section): Call print_decoded_line_section when
866 decodedline is true.
867
8682013-03-25 Mark Wielaard <mjw@redhat.com>
869
Mark Wielaardb79788c2013-03-25 11:45:22 +0100870 * readelf.c (argp_option): Add decodedaranges.
871 (decodedaranges): New boolean initialized to false.
872 (parse_opt): Set decodedaranges when arg is decodedaranges.
873 (print_debug_aranges_section): Reimplemented and original
874 implementation renamed to...
875 (print_decoded_aranges_section): this.
876
8772013-03-25 Mark Wielaard <mjw@redhat.com>
878
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100879 * readelf.c (attrcb_args): Add Dwarf_Die.
880 (attr_callback): When highpc is in constant form also print as
881 address.
882 (print_debug_units): Set args.die.
883
Mark Wielaard10cd97e2013-03-19 11:43:49 +01008842013-03-19 Mark Wielaard <mjw@redhat.com>
885
886 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
887
Mark Wielaarda73fecc2013-03-18 13:54:50 +01008882013-03-18 Mark Wielaard <mjw@redhat.com>
889
890 * readelf.c (print_gdb_index_section): Accept version 8.
891
Mark Wielaarda58951b2013-03-01 11:51:58 +01008922013-03-01 Mark Wielaard <mjw@redhat.com>
893
894 * findtextrel.c (process_file): Release ELF and close file when not
895 text relocations are found.
896 * strip.c (handle_elf): Track memory used for .debuglink section data
897 and free when done.
898
Mark Wielaardb94ccea2013-02-24 22:58:49 +01008992013-02-24 Mark Wielaard <mjw@redhat.com>
900
901 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
902 allowed to have out of section values because of GNU ld bugs.
903
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01009042013-02-06 Mark Wielaard <mjw@redhat.com>
905
906 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
907 list of symbols allowed to have out of section values because of
908 GNU ld bugs in either .symtab or .dynsym, but only when they are
909 zero sized.
910
Mark Wielaard10186a12013-01-24 11:29:21 +01009112013-01-24 Mark Wielaard <mjw@redhat.com>
912
913 * readelf.c (argp_option): Add unresolved-address-offsets, U.
914 (print_unresolved_addresses): New static.
915 (parse_opt): Handle 'U', set print_unprocessed_values.
916 (format_dwarf_addr): Take and handle new raw argument.
917 (print_ops): Call format_dwarf_addr with raw offset values.
918 (print_debug_ranges_section): Likewise.
919 (print_debug_frame_section): Likewise.
920 (attr_callback): Likewise.
921 (print_debug_line_section): Likewise.
922 (print_debug_loc_section): Likewise.
923 (print_gdb_index_section): Likewise.
924
Mark Wielaard24257102013-01-18 22:19:08 +01009252013-01-18 Mark Wielaard <mjw@redhat.com>
926
927 * readelf.c (struct listptr): Add base Dwarf_Addr field.
928 (compare_listptr): Warn for same offset with different base.
929 (notice_listptr): Take base argument and set it.
930 (skip_listptr_hole): Likewise.
931 (struct attrcb_args): Removed unused cu_offset field.
932 Add cu_base Dwarf_Addr field.
933 (attr_callback): Call notice_listptr with cbargs->cu_base.
934 (print_debug_units): Set args.cu_base.
935 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
936 (print_debug_loc_section): Likewise.
937
Jan Kratochvilc44cce02012-10-10 19:32:05 +02009382013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
939
940 * readelf.c (handle_core_items): Limit special repeated items handling
941 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
942
Mark Wielaard6d258ce2013-01-16 15:19:20 +01009432012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
944
945 * readelf.c (ELF_INPUT_SECTION): New argp key value.
946 (argp_option): Add elf-section.
947 (elf_input_section): New static.
948 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
949 (open_input_section): New function.
950 (process_file): Call open_input_section if elf_input_section set.
951
David Abdurachmanov1a4d0662013-01-13 16:44:21 +01009522013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
953
954 ar.c (do_oper_delete): Fix num passed to memset.
955
Mark Wielaard55324042012-12-21 10:02:11 +01009562012-12-21 Mark Wielaard <mjw@redhat.com>
957
Mark Wielaard00f758c2012-12-21 22:11:44 +0100958 * readelf.c (print_debug_frame_section): Adjust FDE start address
959 if pcrel before feeding it to format_dwarf_addr.
960
9612012-12-21 Mark Wielaard <mjw@redhat.com>
962
963 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +0100964
Roland McGrath57bd66c2012-12-11 09:42:07 -08009652012-12-11 Roland McGrath <roland@hack.frob.com>
966
967 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
968 sh_name case.
969 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
970
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +01009712012-10-16 Mark Wielaard <mjw@redhat.com>
972
973 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
974 calculated beginning after the operand and 2-byte constant.
975
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02009762012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
977
978 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
979 (WRAP_COLUMN): ... here.
980 (print_core_item): Remove parameter format_max. Update function
981 comment. Replace FORMAT_MAX by the real output width.
982 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
983 calls of print_core_item, remove variable maxfmt, change
984 ITEM_WRAP_COLUMN to WRAP_COLUMN.
985 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
986 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
987
Roland McGrath82ed98a2012-10-11 14:53:18 -07009882012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
989
990 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
991 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
992
Mark Wielaarde89c5002012-08-27 14:30:05 +02009932012-08-27 Mark Wielaard <mjw@redhat.com>
994
Mark Wielaard3e440062012-08-27 15:21:58 +0200995 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
996
9972012-08-27 Mark Wielaard <mjw@redhat.com>
998
Mark Wielaarde89c5002012-08-27 14:30:05 +0200999 * readelf.c (register_info): Handle loc == NULL.
1000
Jeff Kenton257dcf42012-08-22 09:00:03 -040010012012-08-22 Jeff Kenton <jkenton@tilera.com>
1002
1003 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
1004
Mark Wielaardf31c4412012-08-17 00:35:03 +020010052012-08-16 Mark Wielaard <mjw@redhat.com>
1006
1007 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
1008 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
1009 appropriate.
1010 (dwarf_attr_name): Likewise.
1011 (dwarf_form_name): Likewise.
1012 (dwarf_lang_name): Likewise.
1013 (dwarf_inline_name): Likewise.
1014 (dwarf_encoding_name): Likewise.
1015 (dwarf_access_name): Likewise.
1016 (dwarf_visibility_name): Likewise.
1017 (dwarf_virtuality_name): Likewise.
1018 (dwarf_identifier_case_name): Likewise.
1019 (dwarf_calling_convention_name): Likewise.
1020 (dwarf_ordering_name): Likewise.
1021 (dwarf_discr_list_name): Likewise.
1022 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
1023 (attr_callback): Call new dwarf_foobar_name instead of old
1024 dwarf_foobar_string functions.
1025 (dwarf_tag_string): New function using known-dwarf.h macros.
1026 (dwarf_attr_string): Likewise.
1027 (dwarf_form_string): Likewise.
1028 (dwarf_lang_string): Likewise.
1029 (dwarf_inline_string): Likewise.
1030 (dwarf_encoding_string): Likewise.
1031 (dwarf_access_string): Likewise.
1032 (dwarf_visibility_string): Likewise.
1033 (dwarf_virtuality_string): Likewise.
1034 (dwarf_identifier_case_string): Likewise.
1035 (dwarf_calling_convention_string): Likewise.
1036 (dwarf_ordering_string): Likewise.
1037 (dwarf_discr_list_string): Likewise.
1038 (dwarf_locexpr_opcode_string): Likewise.
1039
Mark Wielaard775375e2012-06-22 12:02:45 +020010402012-06-27 Mark Wielaard <mjw@redhat.com>
1041
1042 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
1043 DW_FORM_GNU_strp_alt.
1044 (attr_callback): Likewise.
1045
Petr Machatafe198bc2012-07-30 19:48:28 +020010462012-07-30 Petr Machata <pmachata@redhat.com>
1047
1048 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
1049 corresponding printf) so that those that are referenced by only
1050 one of the formatting strings are at the end.
1051
Mark Wielaard629b2562012-07-29 14:05:20 +020010522012-07-29 Mark Wielaard <mjw@redhat.com>
1053
1054 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
1055 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
1056
Mark Wielaard515fba92012-07-20 00:09:56 +020010572012-07-19 Mark Wielaard <mjw@redhat.com>
1058
1059 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
1060
Mark Wielaarde9b23882012-06-29 22:30:15 +020010612012-07-11 Mark Wielaard <mjw@redhat.com>
1062
1063 * readelf.c (options): Add macro to help of debug-dump.
1064 (section_e): Add section_macro.
1065 (section_all): Add section_macro.
1066 (parse_opt): Handle macro.
1067 (print_debug_macro_section): New function.
1068 (print_debug): Add NEW_SECTION (macro).
1069
Mark Wielaard84a1e0b2012-06-29 23:38:09 +020010702012-07-10 Mark Wielaard <mjw@redhat.com>
1071
1072 * readelf.c (print_gdb_index_section): Add version 7 support.
1073 Keep track of cu_nr. Print kind and static/global flag for each
1074 symbol. When a symbol is in the TU list add 'T'.
1075
Mark Wielaarda0172d72012-06-25 17:18:53 +020010762012-06-26 Mark Wielaard <mjw@redhat.com>
1077
1078 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
1079
Mark Wielaard50e2d392012-06-22 16:44:54 +020010802012-06-22 Mark Wielaard <mjw@redhat.com>
1081
1082 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
1083 for gcc 4.7 -Wformat.
1084
Mark Wielaard36aa5982012-05-09 11:27:44 +020010852012-05-09 Roland McGrath <roland@hack.frob.com>
1086
1087 * elflint (check_sections): Allow zero sized sections at (filesz) end
1088 of segment. And make check overflow-proofed.
1089
Mark Wielaard716486d2012-04-24 11:56:42 +020010902012-04-24 Mark Wielaard <mjw@redhat.com>
1091
1092 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
1093 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
1094
Roland McGrath738c1832012-03-28 15:01:49 -070010952012-03-28 Roland McGrath <roland@hack.frob.com>
1096
1097 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
1098
Mark Wielaard61651c12012-03-28 11:20:36 +020010992012-03-28 Mark Wielaard <mjw@redhat.com>
1100
1101 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
1102 section data.
1103 (print_debug_str_section): Likewise.
1104
Mark Wielaard30bb7142012-03-21 16:05:31 +010011052012-03-21 Mark Wielaard <mjw@redhat.com>
1106
1107 * readelf.c (print_gdb_index_section): Accept version 6.
1108
Mark Wielaardcb643d62012-01-31 19:22:03 +010011092012-01-31 Mark Wielaard <mjw@redhat.com>
1110
1111 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
1112
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -050011132012-01-21 Ulrich Drepper <drepper@gmail.com>
1114
Ulrich Drepper3a64a302012-01-21 18:19:24 -05001115 * addr2line.c: Update copyright year.
1116 * ar.c: Likewise.
1117 * elfcmp.c: Likewise.
1118 * elflint.c: Likewise.
1119 * findtextrel.c: Likewise.
1120 * ld.c: Likewise.
1121 * nm.c: Likewise.
1122 * objdump.c: Likewise.
1123 * ranlib.c: Likewise.
1124 * readelf.c: Likewise.
1125 * size.c: Likewise.
1126 * strings.c: Likewise.
1127 * strip.c: Likewise.
1128 * unstrip.c: Likewise.
1129
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05001130 * nm.c (argp_children): Define.
1131 (argp): Hook up argp_children.
1132 (handle_ar): Optimize puts call.
1133 (show_symbols_bsd): Use positional parameters to also print color
1134 codes. Don't print STT_FILE symbols.
1135 * objdump.c (options): Improve help text.
1136 (argp_children): Define.
1137 (argp): Hook up argp_children.
1138 (disasm_info): Add elements for color codes.
1139 (disasm_output): Print color codes as well.
1140 (show_disasm): Set up disasm_info data for callback.
1141
Roland McGrath85924782012-01-20 11:40:59 -080011422012-01-20 Roland McGrath <roland@hack.frob.com>
1143
Roland McGrath3284b792012-01-20 12:51:46 -08001144 * arlib-argp.c (arlib_deterministic_output): Initialize from
1145 configured value.
1146 (help_filter): New function.
1147 (argp): Use it.
1148
Roland McGrath9bffd362012-01-20 12:04:19 -08001149 * ar.c (main): Handle oper_none as usage error.
1150
Roland McGrath6e063d92012-01-20 11:43:36 -08001151 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
1152
Roland McGrath85924782012-01-20 11:40:59 -08001153 * ranlib.c (argp): Use arlib_argp_children.
1154
1155 * arlib.c (arlib_init): Obey arlib_deterministic_output.
1156
1157 * arlib-argp.c: New file.
1158 * Makefile.am (libar_a_SOURCES): Add it.
1159 * arlib.h (arlib_deterministic_output, arlib_argp_children):
1160 Declare new variables.
1161 * ar.c (deterministic_output): Variable removed.
1162 (do_oper_insert): Use arlib_deterministic_output instead.
1163 (options, parse_opt): Don't handle -D here. Add group numbers.
1164 (argp): Use arlib_argp_children.
1165
Roland McGratha065c4b2011-12-20 10:55:01 -080011662011-12-20 Roland McGrath <roland@hack.frob.com>
1167
1168 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
1169 Reported by Karel Klic <kklic@redhat.com>.
1170
Roland McGrath4fa988e2011-11-05 20:58:14 -070011712011-11-05 Roland McGrath <roland@hack.frob.com>
1172
Roland McGrathe5ba2a12011-11-05 21:08:07 -07001173 * ar.c (deterministic_output): New flag variable.
1174 (options, parse_opt): Grok -D to set it.
1175 (do_oper_insert): When set, use zero from mtime, uid, and gid.
1176
Roland McGrath4fa988e2011-11-05 20:58:14 -07001177 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
1178
Marek Polacek8d1e2972011-10-04 05:11:42 -040011792011-10-04 Marek Polacek <mpolacek@redhat.com>
1180
1181 * readelf.c (register_info): Assume the right size of an array.
1182
Ulrich Drepper2356ba02011-10-03 07:23:07 -040011832011-10-03 Ulrich Drepper <drepper@gmail.com>
1184
1185 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
1186 but don't show it in help anymore.
1187 (mark_special): Renamed from mark_weak.
1188 (parse_opt): Adjust.
1189 (class_type_char): Take additional parameters for ELF file and ELF
1190 header. Treat TLS symbols like objects.
1191 In case of D symbols, show u for unique symbols, R for symbols in
1192 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001193 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001194 header. Adjust for class_type_char change. Show TLS symbols with
1195 @ after them in case --mark-special is selected.
1196 (show_symbols_posix): Likewise.
1197 (show_symbols): Adjust calls to show_symbols_bsd and
1198 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -04001199 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001200 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001201
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -040012022011-10-02 Ulrich Drepper <drepper@gmail.com>
1203
1204 * Makefile.am (demanglelib): Define.
1205 (nm_LDADD): Add demanglelib.
1206 * nm.c (options): Add -C option.
1207 (demangle): Define as global variable.
1208 (parse_opt): Recognize -C.
1209 (show_symbols_sysv): Handle demangling.
1210 (show_symbols_bad): Likewise.
1211 (show_symbols_posix): Likewise.
1212 (show_symbols): Likewise.
1213
Roland McGrathb0a0e0d2011-07-09 03:20:16 -070012142011-07-09 Roland McGrath <roland@hack.frob.com>
1215
Roland McGrathbd754192011-07-09 05:33:37 -07001216 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
1217
1218 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001219
Mark Wielaard02a958b2011-05-30 17:23:57 +020012202011-05-30 Mark Wielaard <mjw@redhat.com>
1221
1222 * strip.c (relocate): Make offset check overflow-proof.
1223
Mark Wielaard1662bc32011-05-16 11:33:11 +020012242011-05-23 Mark Wielaard <mjw@redhat.com>
1225
Mark Wielaard63868c22011-05-24 16:09:31 +02001226 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001227 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +02001228 Relocate against any debug section symbol, not just STT_SECTION
1229 symbols. For SHT_REL relocations, fetch addend from offset and
1230 add it to symbol value if not zero.
1231
12322011-05-23 Mark Wielaard <mjw@redhat.com>
1233
Mark Wielaard1662bc32011-05-16 11:33:11 +02001234 * strip.c (OPT_RELOC_DEBUG): New option.
1235 (argp_option): Add new --reloc-debug-sections option.
1236 (main): Check new option.
1237 (parse_opt): Likewise.
1238 (handle_elf): Remove any relocations between debug sections
1239 in ET_REL for the debug file when requested.
1240
Mark Wielaard7a125b92011-05-17 12:20:01 +020012412011-05-18 Mark Wielaard <mjw@redhat.com>
1242
1243 * strip.c (handle_elf): Make sure all sections of a removed group
1244 section are removed too. Don't discard SHT_GROUP sections, copy
1245 section table before it gets modified. Section group signature
1246 symbols don't have to be retained.
1247
Jakub Jelinek03124242011-05-17 17:00:14 +020012482011-05-16 Jakub Jelinek <jakub@redhat.com>
1249
1250 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
1251 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
1252 and DW_OP_GNU_reinterpret.
1253
Mark Wielaard69a9b112011-05-17 15:34:02 +020012542011-05-17 Mark Wielaard <mjw@redhat.com>
1255
1256 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
1257 DW_TAG_GNU_call_site_parameter return strings.
1258
Marek Polacekc8920de2011-05-12 12:08:21 +020012592011-05-11 Marek Polacek <mpolacek@redhat.com>
1260
1261 * nm.c (show_symbols_sysv): Remove unused if/else, remove
1262 unused `prefix' and `fname' parameters.
1263
Marek Polacek82f77d72011-05-07 19:26:20 +020012642011-05-07 Marek Polacek <mpolacek@redhat.com>
1265
1266 * unstrip.c (compare_sections_nonrel): Mark this function as static.
1267
Mark Wielaardbb9d1b42011-04-24 17:53:38 +020012682011-04-26 Mark Wielaard <mjw@redhat.com>
1269
1270 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
1271 with note name.
1272
Mark Wielaard093a1d32011-04-14 23:47:26 +020012732011-04-14 Mark Wielaard <mjw@redhat.com>
1274
1275 * readelf.c (options): Add gdb_index.
1276 (section_e): Define section_gdb_index.
1277 (parse_opt): Recognize gdb_index debug-dump argument.
1278 (print_gdb_index_section): New function.
1279 (print_debug): Add gdb_index to debug_sections.
1280
Petr Machata1879e5b2011-03-25 15:17:04 +010012812011-03-24 Petr Machata <pmachata@redhat.com>
1282
1283 * readelf.c (print_debug_line_section): Emit initial space for all
1284 opcode lines. Print offset in front of each opcode.
1285
Marek Polacek44de92a2011-03-22 01:07:20 +010012862011-03-22 Marek Polacek <mpolacek@redhat.com>
1287
1288 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
1289
Mark Wielaarde3368c52011-03-22 23:03:31 +010012902011-03-22 Mark Wielaard <mjw@redhat.com>
1291
1292 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
1293 and DW_TAG_GNU_call_site_parameter.
1294 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
1295 DW_AT_GNU_call_site_data_value,
1296 DW_AT_GNU_call_site_target,
1297 DW_AT_GNU_call_site_target_clobbered,
1298 DW_AT_GNU_tail_call,
1299 DW_AT_GNU_all_tail_call_sites,
1300 DW_AT_GNU_all_call_sites,
1301 and DW_AT_GNU_all_source_call_sites.
1302 (print_ops): Handle DW_OP_GNU_entry_value.
1303 (attr_callback): Handle DW_AT_GNU_call_site_value,
1304 DW_AT_GNU_call_site_data_value,
1305 DW_AT_GNU_call_site_target,
1306 and DW_AT_GNU_call_site_target_clobbered.
1307
Mark Wielaarda062b6b2011-03-10 13:02:32 +010013082011-03-10 Mark Wielaard <mjw@redhat.com>
1309
1310 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
1311
Jan Kratochvilfec39992011-02-27 12:01:25 -080013122011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
1313
1314 * readelf.c (reset_listptr): Clear TABLE->TABLE.
1315
Mark Wielaardcf454ab2011-02-25 12:58:54 +010013162011-02-25 Mark Wielaard <mjw@redhat.com>
1317
1318 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
1319 (dwarf_form_string): Properly format and return unknown form.
1320
Roland McGrath47c53232011-02-23 09:23:08 -080013212011-02-23 Roland McGrath <roland@redhat.com>
1322
Roland McGrath725aad52011-02-23 19:52:46 -08001323 * readelf.c (section_name): New function.
1324 (print_debug_abbrev_section): Use it instead of constant.
1325 (print_debug_aranges_section): Likewise.
1326 (print_debug_ranges_section): Likewise.
1327 (print_debug_units): Likewise.
1328 (print_debug_line_section): Likewise.
1329 (print_debug_loc_section): Likewise.
1330 (print_debug_macinfo_section): Likewise.
1331 (print_debug_pubnames_section): Likewise.
1332 (print_debug_str_section): Likewise.
1333 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
1334 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
1335 (print_debug_str_section): Likewise.
1336
Roland McGrath47c53232011-02-23 09:23:08 -08001337 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
1338
Roland McGrath1fb9c912011-02-11 10:32:30 -080013392011-02-11 Roland McGrath <roland@redhat.com>
1340
Roland McGrath4a14ef72011-02-11 10:42:45 -08001341 * elfcmp.c (verbose): New variable.
1342 (options, parse_opt): Grok -l/--verbose to set it.
1343 (main): Under -l, keep going after first difference.
1344
Roland McGrath1fb9c912011-02-11 10:32:30 -08001345 * elfcmp.c (ignore_build_id): New variable.
1346 (options, parse_opt): Grok --ignore-build-id to set it.
1347 (main): For SHT_NOTE sections, compare note details rather than raw
1348 bytes. Under --ignore-build-id, don't complain about differing build
1349 ID contents if lengths match.
1350
Roland McGrathfd992542011-02-08 19:45:12 -080013512011-02-08 Roland McGrath <roland@redhat.com>
1352
Roland McGrath240784b2011-02-08 19:48:42 -08001353 * ldscript.y (filename_id_star): Remove unused variable.
1354
Roland McGrath8f6c1792011-02-08 19:48:02 -08001355 * unstrip.c (copy_elided_sections): Remove unused variable.
1356
Roland McGrath4db89f02011-02-08 19:46:50 -08001357 * elflint.c (check_dynamic): Remove unused variables.
1358
Roland McGrath33231312011-02-08 19:45:26 -08001359 * elflint.c (check_symtab): Warn about missing xndx section only once.
1360
Roland McGrathfd992542011-02-08 19:45:12 -08001361 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
1362
Roland McGrathf151b7d2011-01-06 12:14:43 -080013632011-01-06 Roland McGrath <roland@redhat.com>
1364
1365 * strip.c (handle_elf): Under --strip-sections, remove all
1366 non-allocated sections and never generate .gnu_debuglink.
1367
Roland McGrath0b9d1fb2011-01-04 19:29:24 -080013682011-01-04 Roland McGrath <roland@redhat.com>
1369
1370 * strip.c (remove_shdrs): New variable.
1371 (options, parse_opt): Grok --strip-sections to set it.
1372 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
1373
Roland McGrath77221de2010-11-10 19:47:31 -080013742010-11-10 Roland McGrath <roland@redhat.com>
1375
1376 * findtextrel.c (process_file): Don't assume order of sections.
1377 Reported by Mike Hommey <mh@glandium.org>.
1378
Roland McGrath932585d2010-05-08 04:01:14 -070013792010-07-26 Roland McGrath <roland@redhat.com>
1380
1381 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
1382
Roland McGratha1599152010-08-30 04:04:37 -070013832010-08-30 Roland McGrath <roland@redhat.com>
1384
Roland McGrathfa144952010-08-30 19:22:41 -07001385 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
1386 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
1387 for ranges, loc.
1388 (struct listptr, struct listptr_table): New types.
1389 (compare_listptr, reset_listptr, sort_listptr): New functions.
1390 (notice_listptr, skip_listptr_hole): New functions.
1391 (struct attrcb_args): Add silent member.
1392 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
1393 Suppress output if silent, but still call notice_listptr.
1394 (print_debug_units): Suppress output if section_info not requested.
1395 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
1396 (print_debug_ranges_section): Likewise.
1397 (print_debug): Call reset_listptr on both tables.
1398
1399 * readelf.c (print_debug_ranges_section): Print empty list.
1400 (print_debug_loc_section): Likewise.
1401
Roland McGratha1599152010-08-30 04:04:37 -07001402 * readelf.c (print_debug_loc_section): Check for bogus length
1403 before calling print_ops.
1404 (print_ops): Check harder for bogus data that would read off end.
1405
Roland McGrathf4763cf2010-08-11 13:04:12 -070014062010-08-11 Roland McGrath <roland@redhat.com>
1407
1408 * readelf.c (for_each_section_argument): Process all sections with
1409 matching name, not just the first.
1410
Roland McGrath52604ba2010-07-26 21:29:44 -070014112010-07-26 Roland McGrath <roland@redhat.com>
1412
1413 * readelf.c (print_ops): Take new argument for CU version.
1414 Fix DW_OP_call_ref decoding to depend on it.
1415 (print_debug_loc_section): Update caller.
1416 (print_cfa_program): Take new argument, pass it down.
1417 (print_debug_frame_section): Update caller.
1418 (struct attrcb_args): New member version.
1419 (print_debug_units): Initialize it.
1420
Roland McGrath2f14a312010-07-02 11:16:25 -070014212010-07-02 Roland McGrath <roland@redhat.com>
1422
1423 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
1424 initial_location.
1425
Roland McGrathb6458032010-06-30 11:57:19 -070014262010-06-30 Roland McGrath <roland@redhat.com>
1427
1428 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
1429 Ignore st_size for a non-S_ISREG file descriptor.
1430 (read_block): Move assert after no-mmap bail-out.
1431 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
1432
Roland McGrathfa799902010-06-22 13:05:23 -070014332010-06-22 Roland McGrath <roland@redhat.com>
1434
1435 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
1436
Roland McGrath0c5638c2010-06-21 23:00:35 -070014372010-06-21 Roland McGrath <roland@redhat.com>
1438
1439 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -07001440 (dwarf_attr_string): Add new attributes.
1441 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -07001442
1443 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
1444 (print_cfa_program): Likewise.
1445
Roland McGrathe5251a12010-06-20 16:59:39 -070014462010-06-20 Roland McGrath <roland@redhat.com>
1447
Roland McGrath2b1f0952010-06-20 17:55:50 -07001448 * readelf.c (print_debug_units): New function, broken out of ...
1449 (print_debug_info_section): ... here. Call it.
1450 (print_debug_types_section): New function.
1451 (enum section_e): Add section_types alias for section_info.
1452 (print_debug): Add types to the sections table.
1453
Roland McGrath599f7f52010-06-20 17:12:43 -07001454 * readelf.c (print_debug_frame_section): Handle version 4 format.
1455
Roland McGrathe5251a12010-06-20 16:59:39 -07001456 * readelf.c (print_debug_line_section): Handle version 4 format.
1457
Roland McGrathec86e5f2010-06-14 17:44:38 -070014582010-06-14 Roland McGrath <roland@redhat.com>
1459
1460 * unstrip.c (copy_elided_sections): Make sure all sections' data have
1461 been read in before we write anything out.
1462
Roland McGrath3b1b6512010-06-04 02:26:30 -070014632010-06-04 Roland McGrath <roland@redhat.com>
1464
Roland McGrathaa32f922010-06-04 02:29:08 -07001465 * unstrip.c (update_shdr): New function.
1466 (update_sh_size): Call it instead of gelf_update_shdr.
1467 (adjust_relocs, add_new_section_symbols): Likewise.
1468 (new_shstrtab, copy_elided_sections): Likewise.
1469
Roland McGrath3b1b6512010-06-04 02:26:30 -07001470 * unstrip.c (copy_elided_sections): Bail if stripped file has more
1471 sections than unstripped file, rather than getting confused later.
1472
Roland McGrath7a5bed82010-06-01 13:44:00 -070014732010-06-01 Roland McGrath <roland@redhat.com>
1474
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001475 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
1476 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -07001477 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001478
Roland McGrath7a5bed82010-06-01 13:44:00 -07001479 * readelf.c (print_debug): Don't bail if libdw setup fails.
1480 Suppress complaint if we only want .eh_frame anyway.
1481
Ulrich Drepper173ade82010-05-28 07:39:49 -070014822010-05-28 Ulrich Drepper <drepper@redhat.com>
1483
1484 * readelf.c (attr_callback): Also print form information.
1485
Roland McGrath12e3d1f2010-05-19 18:03:31 -070014862010-05-19 Roland McGrath <roland@redhat.com>
1487
1488 * addr2line.c (find_symbol): Short-circuit on empty name.
1489 (handle_address): Handle SYMBOL with no +OFFSET.
1490
Roland McGrath688f7fc2010-05-08 03:22:59 -070014912010-05-08 Roland McGrath <roland@redhat.com>
1492
1493 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
1494 Use that for DW_OP_call_ref, not ADDRSIZE.
1495 (print_cfa_program): Update caller.
1496 (struct attrcb_args): Add offset_size field.
1497 (attr_callback): Use it for print_ops call.
1498 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -07001499 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -07001500
Roland McGrath62b28b62010-04-14 11:54:06 -070015012010-04-14 Roland McGrath <roland@redhat.com>
1502
1503 * readelf.c (handle_core_item): Fix bitmask printing.
1504
Roland McGrath3b495d82010-04-06 12:58:32 -070015052010-04-06 Roland McGrath <roland@redhat.com>
1506
1507 * ld.c (options): Fix some typos in messages.
1508 * elflint.c (check_scn_group, check_group): Likewise.
1509 * ldscript.y (add_id_list): Likewise.
1510 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
1511 before translated string containing a literal %.
1512
Roland McGrath890081b2010-02-26 17:57:50 -080015132010-02-26 Roland McGrath <roland@redhat.com>
1514
1515 * readelf.c (process_file): Don't leak an fd in failure case.
1516
Roland McGrathc2b26f12010-02-15 15:16:15 -080015172010-02-15 Roland McGrath <roland@redhat.com>
1518
Roland McGrath22359e22010-02-15 15:57:03 -08001519 * Makefile.am: Use config/eu.am for common stuff.
1520
Roland McGrathc2b26f12010-02-15 15:16:15 -08001521 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
1522 mismatch in comparison.
1523
Roland McGrathf920fd52010-02-02 15:50:15 -080015242010-02-02 Roland McGrath <roland@redhat.com>
1525
1526 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
1527 (read_encoded): Likewise.
1528 (print_debug_frame_section): Check for bogus augmentation length.
1529 For P augmentation, use read_encoded, print the encoding description,
1530 and use hex for unsigned values.
1531
Roland McGrathb337b1f2010-01-15 01:02:27 -080015322010-01-15 Roland McGrath <roland@redhat.com>
1533
1534 * ar.c: Include <sys/stat.h>.
1535 * elflint.c: Likewise.
1536 * readelf.c: Likewise.
1537 * strip.c: Likewise.
1538 * unstrip.c: Likewise
1539
Roland McGrathbd733ca2010-01-07 20:11:42 -080015402010-01-07 Roland McGrath <roland@redhat.com>
1541
Roland McGrath8111da02010-01-07 20:31:59 -08001542 * readelf.c (print_ehdr): Handle PN_XNUM.
1543 (phnum): New static variable.
1544 (process_elf_file): Set it with elf_getphdrnum.
1545 (print_phdr): Use phnum instead of EHDR->e_phnum.
1546 (print_dynamic, handle_notes): Likewise.
1547 (handle_relocs_rel, handle_relocs_rela): Likewise.
1548
Roland McGrathbd733ca2010-01-07 20:11:42 -08001549 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
1550
1551 * elflint.c (phnum): New static variable.
1552 (check_elf_header): Set it, handling PN_XNUM.
1553 Use that in place of EHDR->e_phnum throughout.
1554 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
1555 (unknown_dependency_p, check_sections, check_program_header): Likewise.
1556
Roland McGrath019d9fb2010-01-05 13:36:07 -080015572010-01-05 Roland McGrath <roland@redhat.com>
1558
1559 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
1560 DW_AT_GNU_template_name.
1561
Roland McGrathe4061d02010-01-04 20:25:09 -080015622010-01-04 Roland McGrath <roland@redhat.com>
1563
Roland McGrath0ccbbcd2010-01-04 21:59:07 -08001564 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
1565 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
1566 (handle_core_item): Handle .format of '\n' as \n-separated strings.
1567
Roland McGrath2e79deb2010-01-04 20:36:10 -08001568 * readelf.c (implicit_debug_sections): New variable.
1569 (parse_opt): Set it instead of print_debug_sections for -a.
1570 OR them together for print_debug check.
1571 (print_debug): OR them together for section check.
1572
Roland McGratha7422be2010-01-04 20:29:33 -08001573 * readelf.c (options): Repartition into set implied by -a and others.
1574 Correct -a text to match reality.
1575
Roland McGrathe4061d02010-01-04 20:25:09 -08001576 * readelf.c (struct section_argument): Add bool member 'implicit'.
1577 (parse_opt): Set it for -a cases, clear it for -x args.
1578 (for_each_section_argument): Don't complain about a missing section by
1579 name if it's implicit.
1580
Roland McGrathefa64962009-11-16 01:50:58 -080015812009-11-16 Roland McGrath <roland@redhat.com>
1582
1583 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
1584 sections, just as dump_data_section already does.
1585
Mark Wielaardc49d00a2009-09-21 16:47:07 -070015862009-09-21 Ulrich Drepper <drepper@redhat.com>
1587
1588 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
1589 set for .comment section.
1590 Patch by Mark Wielaard <mjw@redhat.com>.
1591
Roland McGrathfb33c672009-09-08 00:21:18 -070015922009-09-08 Roland McGrath <roland@redhat.com>
1593
1594 * ar.c (main): Fix typo in message format.
1595
Roland McGrath2d13ea22009-08-21 03:16:32 -070015962009-08-21 Roland McGrath <roland@redhat.com>
1597
1598 * readelf.c (attr_callback): Use print_block only when we don't use
1599 print_ops.
1600
Roland McGrath536127f2009-08-14 13:10:09 -070016012009-08-14 Roland McGrath <roland@redhat.com>
1602
1603 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1604
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -070016052009-08-01 Ulrich Drepper <drepper@redhat.com>
1606
1607 * debugpred.h: Add two most const.
1608
Mark Wielaardbc1b92e2009-07-26 08:33:18 -070016092009-07-26 Mark Wielaard <mjw@redhat.com>
1610
1611 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
1612
Mark Wielaard79178202009-07-25 12:44:46 -070016132009-07-25 Mark Wielaard <mjw@redhat.com>
1614
1615 * Makefile.am (addr2line_LDADD): Add $(libelf).
1616
Roland McGrathbe4589d2009-07-24 16:23:12 -070016172009-07-24 Roland McGrath <roland@redhat.com>
1618
1619 * readelf.c (print_block): New function.
1620 (print_ops): Use it.
1621 (attr_callback): Use it for DW_FORM_block* forms.
1622
Mark Wielaarddaf85b22009-07-24 15:49:51 -070016232009-07-20 Mark Wielaard <mjw@redhat.com>
1624
1625 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
1626 and DW_OP_stack_value.
1627
Ulrich Drepper96d950e2009-07-14 10:42:01 -070016282009-07-14 Ulrich Drepper <drepper@redhat.com>
1629
1630 * elflint.c (check_elf_header): Allow Linux ABI.
1631 (check_symtab): Handle STB_GNU_UNIQUE.
1632
Mark Wielaardf735db12009-07-08 19:18:53 +020016332009-07-08 Mark Wielaard <mjw@redhat.com>
1634
1635 * readelf.c (attr_callback): Handle DW_Form constants for
1636 DW_AT_data_member_location.
1637
Roland McGrathdffc33d2009-07-06 16:06:41 -070016382009-07-06 Roland McGrath <roland@redhat.com>
1639
1640 * readelf.c (register_info): New function. Handle unknown register #s.
1641 (print_cfa_program): Use it.
1642 (handle_core_register, handle_core_registers): Likewise.
1643
Roland McGrath5dbccdb2009-06-28 14:48:02 -070016442009-06-28 Roland McGrath <roland@redhat.com>
1645
1646 * readelf.c (print_address_names): New static variable.
1647 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
1648 (format_dwarf_addr): Don't look up name if !print_address_names.
1649
Ulrich Drepperf1894932009-06-13 15:55:42 -070016502009-06-13 Ulrich Drepper <drepper@redhat.com>
1651
1652 * ldgeneric.c: Don't use deprecated libelf functions.
1653 * nm.c: Likewise.
1654 * objdump.c: Likewise.
1655 * readelf.c: Likewise.
1656 * size.c: Likewise.
1657 * strip.c: Likewise.
1658 * unstrip.c: Likewise.
1659 * ld.h: Fix up comment.
1660
Ulrich Drepperb47d2902009-06-01 07:38:32 -070016612009-06-01 Ulrich Drepper <drepper@redhat.com>
1662
1663 * readelf.c (print_relocs): Expect ELF header argument and pass on
1664 to handle_relocs_rel* functions. Adjust caller.
1665 (handle_relocs_rel): Add ELF header argument. Add special case for
1666 the IRELATIVE relocations in statically linked executables.
1667 (handle_relocs_rela): Likewise.
1668
Roland McGrathdb19f0b2009-05-07 18:44:27 -070016692009-04-29 Ulrich Drepper <drepper@redhat.com>
1670
1671 * elflint.c (check_symtab): Add tests of st_other field.
1672
Ulrich Drepperaab90f92009-04-23 07:44:36 -070016732009-04-23 Ulrich Drepper <drepper@redhat.com>
1674
1675 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
1676
Roland McGrathd86e1832009-04-20 00:49:33 -070016772009-04-20 Roland McGrath <roland@redhat.com>
1678
Roland McGrath8a592412009-04-20 01:20:44 -07001679 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
1680 of inline call sites.
1681
Roland McGrathd86e1832009-04-20 00:49:33 -07001682 * addr2line.c (just_section): New variable.
1683 (adjust_to_section): New function, broken out of ...
1684 (handle_address): ... here.
1685 (options, parse_opt): Add -j/--section=NAME to set it.
1686
Roland McGrath2fb90512009-04-15 14:47:13 -070016872009-04-15 Roland McGrath <roland@redhat.com>
1688
1689 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
1690 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
1691
Roland McGrath04a14162009-04-14 01:02:17 -070016922009-04-14 Roland McGrath <roland@redhat.com>
1693
Roland McGratheb9ba472009-04-14 18:44:45 -07001694 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
1695 like SHT_GNU_ATTRIBUTES.
1696
Roland McGrath94f43832009-04-14 04:39:32 -07001697 * readelf.c (handle_core_registers): Fix error message.
1698
Roland McGrath04a14162009-04-14 01:02:17 -07001699 * strip.c (handle_elf: check_preserved): Don't note any change when
1700 .debug_data is already filled from a previous pass.
1701
Ulrich Drepper411cdb22009-02-05 22:04:26 -080017022009-02-05 Ulrich Drepper <drepper@redhat.com>
1703
Ulrich Drepper51b3f472009-02-05 22:10:39 -08001704 * objdump.c (show_relocs_x): Minor cleanups.
1705
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001706 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -08001707 Print first DW_CFA_expression and DW_CFA_val_expression parameter
1708 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001709
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080017102009-02-01 Ulrich Drepper <drepper@redhat.com>
1711
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001712 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
1713 into ...
1714 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -08001715 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001716
Ulrich Dreppercbb422e2009-02-01 18:18:55 -08001717 * objdump.c (show_relocs_rela): Show offsets as signed values.
1718
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08001719 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
1720 Improve some error messages.
1721 Use program_invocation_short_name instead of AR macro.
1722 * Makefile.am (CFLAGS_ar): Remove.
1723 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
1724 * objdump.c (parse_opt): Likewise.
1725 * readelf.c (parse_opt): Likewise.
1726
Roland McGrath51f01282009-01-27 17:08:03 -080017272009-01-27 Roland McGrath <roland@redhat.com>
1728
1729 * readelf.c (print_ops): Notice short length, don't overrun buffer
1730 (still need to fix LEB128).
1731
1732 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
1733
1734 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
1735
Ulrich Drepper62c46532009-01-24 17:01:08 -080017362009-01-24 Ulrich Drepper <drepper@redhat.com>
1737
1738 * readelf.c (print_debug_frame_section): Fix computation of vma_base
1739 for PC-relative mode.
1740
Ulrich Drepperd7285e12009-01-23 16:10:44 -080017412009-01-23 Ulrich Drepper <drepper@redhat.com>
1742
Ulrich Drepperccccab02009-01-23 16:32:21 -08001743 * size.c (process_file): When handling archive, close file descriptor
1744 here. For unknown file format also close file descriptor.
1745 (handle_ar): Don't close file descriptor here.
1746
Ulrich Drepperd7285e12009-01-23 16:10:44 -08001747 * readelf.c (parse_opt): Move code to add to dump_data_sections and
1748 string_sections list in local function add_dump_section. Adjust 'x'
1749 key handling. For 'a' key add .strtab, .dynstr, and .comment section
1750 to string_sections list.
1751
Roland McGrathe9de9b42009-01-22 13:05:40 -080017522009-01-22 Roland McGrath <roland@redhat.com>
1753
Roland McGrath9a847e12009-01-22 19:55:00 -08001754 * readelf.c (print_phdr): Don't print section mapping when no sections.
1755
Roland McGrathd759aa62009-01-22 19:17:07 -08001756 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
1757
Roland McGrathcabeeee2009-01-22 13:17:45 -08001758 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
1759 and reset it only for the 'true' cases.
1760
1761 * Makefile.am (addr2line_no_Wformat): New variable.
1762
Roland McGrathe9de9b42009-01-22 13:05:40 -08001763 * readelf.c (print_debug_frame_section): Use t instead of j formats
1764 for ptrdiff_t OFFSET.
1765
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080017662009-01-21 Ulrich Drepper <drepper@redhat.com>
1767
1768 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -08001769 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001770 (check_exception_data): First sanity test.
1771
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080017722009-01-17 Ulrich Drepper <drepper@redhat.com>
1773
Ulrich Drepper935edde2009-01-17 16:06:42 -08001774 * readelf.c (print_debug_exception_table): Show target of ar_disp
1775 field.
1776
1777 * elflint.c (check_program_header): Add most consistency checks for
1778 PT_GNU_EH_FRAME entry.
1779
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001780 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1781 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1782 * ar.c: Likewise.
1783 * elfcmp.c: Likewise.
1784 * elflint.c: Likewise.
1785 * findtextrel.c: Likewise.
1786 * ld.c: Likewise.
1787 * nm.c: Likewise.
1788 * objdump.c: Likewise.
1789 * ranlib.c: Likewise.
1790 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001791
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001792 * size.c: Likewise.
1793 * strings.c: Likewise.
1794 * strip.c: Likewise.
1795 * unstrip.c: Likewise.
1796
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080017972009-01-16 Ulrich Drepper <drepper@redhat.com>
1798
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001799 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1800 matches .eh_frame_hdr section, if it is available. Also check that
1801 the segment is allocated, not writable, not executable.
1802
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001803 * readelf.c: Add -e option. Dump exception and unwind related
1804 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001805 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001806 (print_debug_exception_table): Beginning of support.
1807 (print_debug): Hook up print_debug_exception_table for
1808 .gcc_except_table sections.
1809
1810 * readelf.c (print_debug_frame_section): Some fixes for last change.
1811
Ulrich Drepper351bf202009-01-15 20:18:40 -080018122009-01-15 Ulrich Drepper <drepper@redhat.com>
1813
1814 * readelf.c (print_encoding): Now a toplevel function.
1815 (print_relinfo): Likewise.
1816 (print_encoding_base): Broken out of print_debug_frame_section.
1817 (print_debug_frame_section): Print different header for .eh_frame
1818 sections. Fix recognition of matching CIEs in .debug_frame sections.
1819 Print absolute offset for PC-relative FDE locations. Don't print
1820 table header for FDEs if the table is empty.
1821 (read_encoded): New function.
1822 (print_debug_frame_hdr_section): New function.
1823 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1824 sections.
1825
1826 * readelf.c (handle_relocs_rel): Print section number.
1827 (print_debug_abbrev_section): Likewise.
1828 (print_debug_aranges_section): Likewise.
1829 (print_debug_ranges_section): Likewise.
1830 (print_debug_info_section): Likewise.
1831 (print_debug_line_section): Likewise.
1832 (print_debug_loc_section): Likewise.
1833 (print_debug_macinfo_section): Likewise.
1834 (print_debug_pubnames_section): Likewise.
1835 (print_debug_str_section): Likewise.
1836
Ulrich Drepper8b394632009-01-10 18:29:56 -080018372009-01-10 Ulrich Drepper <drepper@redhat.com>
1838
1839 * strings.c (read_block): Fix typo in error message string.
1840
Ulrich Drepper87cf5832009-01-07 20:39:21 -080018412009-01-07 Ulrich Drepper <drepper@redhat.com>
1842
1843 * ld.c (ld_new_searchdir): Fix adding to search path list.
1844
Ulrich Drepperac194d02009-01-06 00:30:01 -080018452009-01-06 Ulrich Drepper <drepper@redhat.com>
1846
1847 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001848
Roland McGrath3614d992009-01-05 18:05:32 -080018492009-01-05 Roland McGrath <roland@redhat.com>
1850
1851 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1852 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001853
Ulrich Drepper44173ed2009-01-01 19:00:41 -080018542009-01-01 Ulrich Drepper <drepper@redhat.com>
1855
1856 * addr2line.c: Update copyright year.
1857 * ar.c: Likewise.
1858 * elfcmp.c: Likewise.
1859 * elflint.c: Likewise.
1860 * findtextrel.c: Likewise.
1861 * ld.c: Likewise.
1862 * nm.c: Likewise.
1863 * objdump.c: Likewise.
1864 * ranlib.c: Likewise.
1865 * readelf.c: Likewise.
1866 * size.c: Likewise.
1867 * strings.c: Likewise.
1868 * strip.c: Likewise.
1869 * unstrip.c: Likewise.
1870
Roland McGrath468fe4d2008-12-11 21:00:12 -080018712008-12-11 Roland McGrath <roland@redhat.com>
1872
1873 * nm.c (sym_name): New function.
1874 (show_symbols_sysv): Use it in place of elf_strptr.
1875 (show_symbols_bsd, show_symbols_posix): Likewise.
1876 Fixes RHBZ#476136.
1877
1878 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1879 elf_strptr fails.
1880
Roland McGratha845f682008-12-03 03:41:58 +000018812008-12-02 Roland McGrath <roland@redhat.com>
1882
1883 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1884 nonzero OFFSET argument to dwfl_getmodules.
1885
Roland McGrath1d8bb252008-08-07 08:39:41 +000018862008-08-07 Roland McGrath <roland@redhat.com>
1887
1888 * addr2line.c (main): Pass string to handle_address.
1889 (see_one_module): New function, subroutine of handle_address.
1890 (find_symbol): Likewise.
1891 (handle_address): Take string argument rather than address.
1892 Convert plain number, or handle strings like "(section)+offset"
1893 or "symbol+offset".
1894
18952008-08-01 Roland McGrath <roland@redhat.com>
1896
1897 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1898 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1899
1900 * readelf.c (convert): Take new argument SIZE.
1901 (handle_core_register, handle_core_item): Update callers.
1902 (handle_core_item): Take new arg REPEATED_SIZE.
1903 (handle_core_items): Special case for a singleton item,
1904 let handle_core_item handle repeats if it wants to.
1905
1906 * readelf.c (handle_core_items): Give abridged output
1907 for identical groups repeated more than twice.
1908
19092008-07-04 Roland McGrath <roland@redhat.com>
1910
1911 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1912
Roland McGrath521c47d2008-04-11 07:01:58 +000019132008-04-10 Roland McGrath <roland@redhat.com>
1914
1915 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1916 refer to. Instead, just be sure to preserve the original symbol
1917 table in the debug file so those symbols go with their sections and
1918 can be elided from the stripped version of the symbol table.
1919
1920 * strip.c (handle_elf): When a discarded section kept in the debug
1921 file refers to a nondiscard section via sh_link/sh_info, preserve
1922 that nondiscarded section unmodified in the debug file as well.
1923 Skip adjustment of discarded sections symbol table references when
1924 that symbol table is copied in this way.
1925
1926 * elflint.c (check_symtab): Don't crash from missing symbol names
1927 after diagnosing bogus strtab.
1928
1929 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1930 adjustment for symtab changes.
1931
Roland McGrath13b69602008-04-01 02:30:05 +000019322008-03-31 Roland McGrath <roland@redhat.com>
1933
1934 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1935 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1936 excuse a special section.
1937
19382008-03-27 Roland McGrath <roland@redhat.com>
1939
1940 * elflint.c (check_sections): Check that executability and writability
1941 of sections is reflected in segment p_flags.
1942
Roland McGrathd11f9cb2008-03-26 20:51:59 +000019432008-03-26 Roland McGrath <roland@redhat.com>
1944
1945 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1946 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1947 is valid in RELRO.
1948
Roland McGrath47c5c352008-02-29 10:17:16 +000019492008-02-29 Roland McGrath <roland@redhat.com>
1950
1951 * readelf.c (print_attributes): Add a cast.
1952 * elflint.c (check_attributes): Likewise.
1953
1954 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1955 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1956 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1957
Ulrich Drepper834de6f2008-02-23 06:50:01 +000019582008-02-03 Ulrich Drepper <drepper@redhat.com>
1959
1960 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1961 when linked into executable.
1962 (elf_i386_create_relocations): Likewise.
1963
Roland McGrath059c83e2008-02-21 06:19:39 +000019642008-02-20 Roland McGrath <roland@redhat.com>
1965
1966 * readelf.c (print_attributes): New function.
1967 (process_elf_file): Call it under -A.
1968
1969 * elflint.c (check_attributes): Implement it for real.
1970
19712008-02-19 Roland McGrath <roland@redhat.com>
1972
1973 * elflint.c (special_sections): Handle .gnu.attributes section.
1974 (check_sections): Likewise.
1975 (check_attributes): New function.
1976
19772008-02-10 Roland McGrath <roland@redhat.com>
1978
1979 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1980 sections and ET_REL files.
1981
Ulrich Drepper712d78e2008-02-02 10:01:53 +000019822008-02-02 Ulrich Drepper <drepper@redhat.com>
1983
1984 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1985 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1986 and R_386_TLS_LE.
1987 (elf_i386_create_relocations): Likewise.
1988 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1989 elements.
1990 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1991 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1992 Fix generation of PT_GNU_STACK entry.
1993
Ulrich Drepperc54785a2008-02-01 18:05:21 +000019942008-02-01 Ulrich Drepper <drepper@redhat.com>
1995
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001996 * ld.c (replace_args): Prevent loop over replacements if the parameter
1997 is only two characters long.
1998
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001999 * ld.c: Recognize sha1 argument for --build-id parameter.
2000 * ldgeneric.c (create_build_id_section): Handle sha1.
2001 (compute_hash_sum): New function. Broken out of compute_build_id.
2002 Take hash function and context as parameters.
2003 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
2004 implementation.
2005
Ulrich Drepper89759c72008-01-31 19:44:12 +000020062008-01-31 Ulrich Drepper <drepper@redhat.com>
2007
2008 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
2009 * ld.c: Recognize --build-id command line parameter.
2010 * ld.h: Define scn_dot_note_gnu_build_id.
2011 (struct ld_state): Add build_id and buildidscnidx elements.
2012 * ldgeneric.c: Implement --build-id command line parameter.
2013 * ldlex.l (ID): Recognize - as valid character after the first one.
2014
Ulrich Drepper5530ec52008-01-29 10:42:07 +000020152008-01-29 Ulrich Drepper <drepper@redhat.com>
2016
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00002017 * ld.c (replace_args): New function.
2018 (main): Use it to rewrite old-style parameters.
2019
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00002020 * elf32-i386.script: Add .gnu.hash section.
2021 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
2022 (fillin_special_symbol): Initialize st_size.
2023 (sortfct_hashval): New function.
2024 (create_gnu_hash): New function.
2025 (create_hash): New function.
2026 (ld_generic_create_outfile): Use the new functions to create the
2027 hash tables.
2028
Ulrich Drepper5530ec52008-01-29 10:42:07 +00002029 * elflint.c (check_gnu_hash): Fix index value printed in error message.
2030
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000020312008-01-24 Ulrich Drepper <drepper@redhat.com>
2032
2033 * elflint.c (check_group): Check that signature symbol for section
2034 group is not an empty string.
2035 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
2036 section. Start implementation of --hash-style.
2037 * i386_ld.c: Likewise.
2038 * ld.c: Recognize --hash-style.
2039 * ld.h (struct scninfo): Add comdat_group.
2040 Add additional parameter to finalize_plt callback.
2041
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000020422008-01-22 Ulrich Drepper <drepper@redhat.com>
2043
2044 * ld.h (struct callbacks): Add initialize_gotplt.
2045 (struct scnhead): Add scn_dot_gotplt.
2046 (struct ld_state): Add gotpltscnidx.
2047 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
2048 (elf_i386_initialize_pltrel): Likewise.
2049 (elf_i386_initialize_got): There is now a separate .got.plt, so
2050 don't do the PLT-related work here. Initialize d_type.
2051 (elf_i386_initialize_gotplt): New function.
2052 (elf_i386_plt0): Use ud2a after indirect jump.
2053 (elf_i386_pic_plt0_entry): Likewise.
2054 (elf_i386_finalize_plt): Reference now .got.plt.
2055 (elf_i386_count_relocations): For GOT entries which need no relocation
2056 don't bump nrel_got.
2057 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
2058 handling for split .got/.got.plt.
2059 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
2060 * elf32-i386.script: Sort sections for security. There are no .got
2061 input sections. Add .got.plt.
2062 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
2063 (ld_generic_create_outfile): Initialize .got.plt section.
2064 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
2065
Ulrich Drepperd9488292008-01-20 16:43:15 +000020662008-01-19 Ulrich Drepper <drepper@redhat.com>
2067
2068 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
2069 symbols are not carried over into statically linked output files.
2070 Add dummy entries for more TLS relocations.
2071
2072 * ld.c (options): Add long names for -( and -).
2073
2074 * ldgeneric.c (check_definition): For newly found definitions don't
2075 mark section as used if symbol is absolute.
2076 (extract_from_archive): Only assign archive sequence number the first
2077 time the archive is handled. Update ld_state.last_archive_used
2078 if any symbol was used. Remove nround variable.
2079 (file_process2): When using symbol from an archive, update
2080 ld_state.group_start_archive, ld_state.archives, and
2081 ld_state.tailarchives.
2082 (ld_generic_file_process): If group is not handled anymore, after
2083 freeing ELF handles for the archives, clear ld_state.archives and
2084 *nextp. Fix wrong logic in recognizing first iteration of group
2085 loop. When clearing flags, also clear ld_state.group_start_archive.
2086
Ulrich Drepper5eee1222008-01-11 10:12:18 +000020872008-01-11 Ulrich Drepper <drepper@redhat.com>
2088
2089 * objdump.c (show_disasm): Adjust disassembler format string for
2090 removal of %e.
2091
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000020922008-01-04 Roland McGrath <roland@redhat.com>
2093
Roland McGrath059c83e2008-02-21 06:19:39 +00002094 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
2095 a size greater than the items cover means multiple sets of items.
2096 (handle_core_note): Update caller.
2097
20982008-01-04 Roland McGrath <roland@redhat.com>
2099
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00002100 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
2101
21022008-01-03 Roland McGrath <roland@redhat.com>
2103
2104 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
2105
2106 * elflint.c (check_dynamic): Remove duplicate initializer.
2107
Ulrich Drepperad024af2008-01-02 17:42:52 +000021082008-01-02 Ulrich Drepper <drepper@redhat.com>
2109
2110 * addr2line.c: Update copyright year.
2111 * ar.c: Likewise.
2112 * elfcmp.c: Likewise.
2113 * elflint.c: Likewise.
2114 * findtextrel.c: Likewise.
2115 * ld.c: Likewise.
2116 * nm.c: Likewise.
2117 * objdump.c: Likewise.
2118 * ranlib.c: Likewise.
2119 * readelf.c: Likewise.
2120 * size.c: Likewise.
2121 * strings.c: Likewise.
2122 * strip.c: Likewise.
2123 * unstrip.c: Likewise.
2124
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000021252007-12-30 Ulrich Drepper <drepper@redhat.com>
2126
2127 * objdump (show_disasm): Use %e after third parameter.
2128
21292007-12-21 Ulrich Drepper <drepper@redhat.com>
2130
2131 * strip.c: Fix wrong parenthesis in a few branch predictions.
2132 * strings.c: Likewise.
2133
21342007-12-20 Ulrich Drepper <drepper@redhat.com>
2135
2136 * Makefile.am (DEFS): Add DEBUGPRED.
2137 * addr2line.c: Include debugpred.h.
2138 * ar.c: Likewise.
2139 * elfcmp.c: Likewise.
2140 * elflint.c: Likewise.
2141 * findtextrel.c: Likewise.
2142 * nm.c: Likewise.
2143 * objdump.c: Likewise.
2144 * ranlib.c: Likewise.
2145 * readelf.c: Likewise.
2146 * size.c: Likewise.
2147 * strings.c: Likewise.
2148 * strip.c: Likewise.
2149 * unstrip.c: Likewise.
2150 * debugpred.h: New file.
2151
2152 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
2153 (handle_relocs_rela): Likewise.
2154
2155 * readelf.c: Add lots of likely/unlikely.
2156
2157 * elflint.c: Minor cleanups.
2158
Roland McGrath1a2e8f42007-12-15 23:39:34 +000021592007-11-19 Roland McGrath <roland@redhat.com>
2160
2161 * readelf.c (print_ops): Handle all bad op codes gracefully.
2162 Print their numbers instead of just ???.
2163
Roland McGrath07a696e2007-11-09 22:44:26 +000021642007-11-09 Roland McGrath <roland@redhat.com>
2165
2166 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00002167 Handle block forms to mean a DWARF expression for DW_AT_allocated,
2168 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
2169 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
2170 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00002171
Roland McGrathe4c22ea2007-10-23 13:07:39 +000021722007-10-20 Roland McGrath <roland@redhat.com>
2173
2174 * unstrip.c (options): Update -R description.
2175 (struct symbol): Put symbol details a union with a size_t pointer
2176 `duplicate'.
2177 (compare_symbols_output): Use null ->name as marker for discard
2178 symbols, not zero *->map.
2179 (copy_elided_sections): Record forwarding pointers for discarded
2180 duplicates and fill SYMNDX_MAP elements through them.
2181
2182 * readelf.c (process_file): Set offline_next_address to 0 at start.
2183 (struct process_dwflmod_args): New type.
2184 (process_dwflmod): Take args in it, pass fd to process_elf_file.
2185 (process_file): Update caller; dup FD for passing to libdwfl.
2186 (process_elf_file): Take new arg FD. For ET_REL file when
2187 displaying data affected by libdwfl relocation, open a new Elf handle.
2188
21892007-10-17 Roland McGrath <roland@redhat.com>
2190
2191 * readelf.c (print_debug_line_section): For invalid data inside a
2192 unit with plausible length, keep printing at the next unit boundary.
2193
2194 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
2195
21962007-10-16 Roland McGrath <roland@redhat.com>
2197
2198 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
2199
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000022002007-10-15 Roland McGrath <roland@redhat.com>
2201
2202 * make-debug-archive.in: New file.
2203 * Makefile.am (EXTRA_DIST): Add it.
2204 (make-debug-archive): New target.
2205 (bin_SCRIPTS, CLEANFILES): Add it.
2206
22072007-10-10 Roland McGrath <roland@redhat.com>
2208
2209 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
2210 Use it to check MERGE|STRINGS for .debug_str.
2211 (check_sections): Handle exact_or_gnuld.
2212
22132007-10-08 Roland McGrath <roland@redhat.com>
2214
2215 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
2216 64-bit struct timeval with 32-bit tv_usec.
2217
22182007-10-07 Roland McGrath <roland@redhat.com>
2219
2220 * readelf.c (check_archive_index): New function.
2221 (process_file): Call it. Change signature to take only fd and name.
2222 Use libdwfl to open the file, then iterate on its modules (multiple
2223 for an archive) to print file name and call process_elf_file.
2224 (main): Update caller. Let process_file do elf_begin.
2225 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
2226 (process_elf_file): Take only Dwfl_Module * argument.
2227 Don't print the file name here.
2228 (print_debug_*_section): Take Dwfl_Module * argument.
2229 (print_debug): Likewise. Update caller.
2230 (format_dwarf_addr): New function.
2231 (print_debug_ranges_section): Use it.
2232 (attr_callback): Likewise.
2233 (print_debug_line_section, print_debug_loc_section): Likewise.
2234
2235 * readelf.c (print_debug_ranges_section): Translate all strings.
2236 (print_debug_loc_section): Likewise.
2237
2238 * unstrip.c (copy_elided_sections): Initialize SEC.
2239
2240 * ar.c (do_oper_insert): Put trailing / on short names.
2241
2242 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
2243
2244 * arlib2.c (arlib_add_long_name): Adjust for header size.
2245
2246 * arlib.c (arlib_finalize): Pad long name table to keep size even.
2247
2248 * ar.c (do_oper_insert): Use write_retry for padding write.
2249
2250 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
2251 Unconditionally set FOUND[CNT]->elf when setting ->mem.
2252 (remember_long_name): New function.
2253 (do_oper_insert): Call it. Correctly use length of basename,
2254 not original name. Don't store long name twice for new member.
2255
22562007-10-06 Roland McGrath <roland@redhat.com>
2257
2258 * elflint.c (check_note): Skip empty segment.
2259 (check_note_section): Skip empty section.
2260
2261 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
2262 (handle_output_dir_module, handle_implicit_modules): Pass it down.
2263 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
2264 (compare_alloc_sections): Take new arg REL, ignore address if true.
2265 (compare_sections): Likewise, pass it down.
2266 (compare_sections_rel, compare_sections_nonrel): New functions.
2267 (find_alloc_sections_prelink, copy_elided_sections): Use them
2268 instead of compare_sections.
2269 (sections_match): New function, broken out of ...
2270 (find_alloc_section): ... here.
2271 (copy_elided_sections): Reorganize section match-up logic.
2272 Use sections_match for SHF_ALLOC in ET_REL.
2273 For ET_REL, let the nonzero sh_addr from the debug file dominate.
2274
2275 * unstrip.c (add_new_section_symbols): Take new arg REL.
2276 When true, do not update section symbol values.
2277 (collect_symbols): Likewise. Update section symbols with address
2278 of chosen output section, not original section.
2279 (check_symtab_section_symbols, copy_elided_sections): Update callers.
2280
2281 * unstrip.c (compare_alloc_sections): At the same address, preserve
2282 original section order.
2283
2284 * elflint.c (special_sections): Don't require MERGE|STRINGS for
2285 .debug_str, it didn't always have them with older tools.
2286
2287 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
2288
22892007-10-05 Roland McGrath <roland@redhat.com>
2290
2291 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
2292 ET_REL file.
2293
2294 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
2295 SHN_UNDEF as "bad section". Use shndx value in messages.
2296
2297 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
2298 for ".debug" so it matches as a prefix.
2299 (IS_KNOWN_SPECIAL): New macro.
2300 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
2301 type even under -d, for a .debug* or .shstrtab section.
2302
2303 * readelf.c (print_ops): Use hex for address operand.
2304
23052007-10-04 Roland McGrath <roland@redhat.com>
2306
2307 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
2308 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
2309 sections mapped to SHN_UNDEF.
2310
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000023112007-10-04 Ulrich Drepper <drepper@redhat.com>
2312
2313 * readelf.c (dump_archive_index): Avoid warning about uninitialized
2314 variable with older glibc versions.
2315 Add some branch prediction.
2316
Roland McGrath59ea7f32007-10-04 08:50:09 +000023172007-10-04 Roland McGrath <roland@redhat.com>
2318
2319 * readelf.c (print_archive_index): New variable.
2320 (options, parse_opt): Accept -c/--archive-index to set it.
2321 (dump_archive_index): New function.
2322 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
2323 Call dump_archive_index on archives if set.
2324 (main): Update caller.
2325 (any_control_option): Give it file scope, moved out of ...
2326 (parse_opt): ... here.
2327
23282007-10-03 Roland McGrath <roland@redhat.com>
2329
2330 * unstrip.c (struct arg_info): Add `list' flag.
2331 (options, parse_opt): Grok -n/--list to set it.
2332 (list_module): New function.
2333 (handle_implicit_modules): Call it under -n.
2334
2335 * elflint.c (check_note_section): New function.
2336 (check_sections): Call it for SHT_NOTE.
2337
2338 * readelf.c (handle_notes): Use sections when available.
2339
2340 * elflint.c (check_note_data): New function, broken out of ...
2341 (check_note): ... here. Call it and elf_getdata_rawchunk.
2342
2343 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
2344 Use elf_getdata_rawchunk and gelf_getauxv.
2345 (handle_notes_data): New function, broken out of ...
2346 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
2347
Roland McGrath241ac022007-10-01 18:21:46 +000023482007-10-01 Roland McGrath <roland@redhat.com>
2349
Roland McGrathac0a16c2007-10-01 18:50:35 +00002350 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
2351
Roland McGrath241ac022007-10-01 18:21:46 +00002352 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
2353
Roland McGrathc76f0b02007-09-27 07:31:33 +000023542007-09-10 Roland McGrath <roland@redhat.com>
2355
2356 * readelf.c (options): Give -p optional argument, alias --string-dump.
2357 (string_sections, string_sections_tail): New static variables.
2358 (parse_opt): Set them when -p has an argument.
2359 (print_string_section): New function, broken out of ...
2360 (print_strings): ... here. Call it.
2361 (dump_data_section): New function, broken out of ...
2362 (dump_data): ... here. Call it.
2363 (for_each_section_argument): New function, broken out of ...
2364 (dump_data): ... here. Call it.
2365 (dump_strings): New function.
2366
23672007-08-31 Roland McGrath <roland@redhat.com>
2368
2369 * readelf.c (print_strings): Typo fix.
2370
Roland McGrathcb6d8652007-08-23 08:10:54 +000023712007-08-23 Roland McGrath <roland@redhat.com>
2372
2373 * readelf.c (printf_with_wrap): Function removed.
2374 (REGISTER_WRAP_COLUMN): New macro.
2375 (handle_core_register): Use print_core_item instead.
2376 (struct register_info): New type.
2377 (compare_registers, compare_register_sets): New functions.
2378 (register_bitpos, compare_sets_by_info): New functions.
2379 (handle_core_registers): Use those to segregate and sort registers
2380 for display.
2381
2382 * readelf.c (ITEM_WRAP_COLUMN): New macro.
2383 (print_core_item): New function.
2384 (handle_core_item): Use it instead of printf_with_wrap.
2385 (compare_core_items, compare_core_item_groups): New functions.
2386 (handle_core_items): Use them. Sort by group and force line breaks
2387 between groups.
2388
2389 * readelf.c (handle_core_registers, handle_core_items): New functions,
2390 broken out of ...
2391 (handle_core_note): ... here. Call them.
2392
23932007-08-22 Roland McGrath <roland@redhat.com>
2394
2395 * unstrip.c (new_shstrtab): New function, broken out of ...
2396 (copy_elided_sections): ... here.
2397
23982007-08-20 Roland McGrath <roland@redhat.com>
2399
2400 Avoid local function trampolines in nm binary.
2401 * nm.c (sort_by_address): Move to a static function instead of local
2402 inside show_symbols.
2403 (sort_by_name_strtab): New static variable.
2404 (sort_by_name): Use it. Move to a static function instead of local
2405 inside show_symbols.
2406 (show_symbols): Set sort_by_name_strtab.
2407
24082007-08-19 Roland McGrath <roland@redhat.com>
2409
2410 * readelf.c (handle_auxv_note): New function.
2411 (handle_notes): Call it.
2412
2413 * readelf.c (printf_with_wrap, convert): New functions.
2414 (handle_core_item, (handle_core_register): New functions.
2415 (handle_notes): Call those with details from ebl_core_note.
2416
Roland McGrath099dd522007-08-13 22:58:36 +000024172007-08-12 Roland McGrath <roland@redhat.com>
2418
2419 * elflint.c (check_note): Accept type 0 with name "Linux".
2420
2421 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
2422
2423 * elflint.c (section_flags_string): Return "none" for 0, not "".
2424
Roland McGrathd8221722007-08-11 21:18:09 +000024252007-08-11 Roland McGrath <roland@redhat.com>
2426
2427 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
2428
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000024292007-08-04 Ulrich Drepper <drepper@redhat.com>
2430
2431 * readelf.c (hex_dump): Use isprint to determine whether to print
2432 character itself or full stop character.
2433 (dump_data): No need to check endp for NULL after strtol call.
2434
Roland McGrath60fc84c2007-08-03 21:59:15 +000024352007-08-03 Roland McGrath <roland@redhat.com>
2436
2437 * readelf.c (print_string_sections): New variable.
2438 (options, parse_opt): Handle --strings/-p to set it.
2439 (print_strings): New function.
2440 (process_elf_file): Call it under -p.
2441
2442 * readelf.c (options): Add hidden aliases --segments, --sections,
2443 as taken by binutils readelf.
2444
24452007-08-01 Roland McGrath <roland@redhat.com>
2446
2447 * readelf.c (dump_data_sections, dump_data_sections_tail):
2448 New variables.
2449 (options, parse_opt): Handle --hex-dump/-x, set them.
2450 (hex_dump): New function.
2451 (dump_data): New function, call it.
2452 (process_elf_file): Call it.
2453
24542007-07-25 Roland McGrath <roland@redhat.com>
2455
2456 * addr2line.c (show_symbols): New variable.
2457 (print_addrsym): New function.
2458 (handle_address): Call it.
2459 (options, parse_opt): Handle -S/--symbols.
2460
Ulrich Drepperb0243862007-06-06 00:09:36 +000024612007-06-05 Ulrich Drepper <drepper@redhat.com>
2462
2463 * addr2line.c: Update for latest autoconf header.
2464 * ar.c: Likewise.
2465 * elfcmp.c: Likewise.
2466 * elflint.c: Likewise.
2467 * findtextrel.c: Likewise.
2468 * ld.c: Likewise.
2469 * ldgeneric.c: Likewise.
2470 * nm.c: Likewise.
2471 * objdump.c: Likewise.
2472 * ranlib.c: Likewise.
2473 * readelf.c: Likewise.
2474 * size.c: Likewise.
2475 * strings.c: Likewise.
2476 * strip.c: Likewise.
2477 * unstrip.c: Likewise.
2478
Roland McGrath9aa8ef72007-05-18 08:59:43 +000024792007-05-18 Roland McGrath <roland@redhat.com>
2480
2481 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
2482 stripped file, so as not to duplicate a section copied in both.
2483
2484 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
2485
24862007-05-17 Roland McGrath <roland@redhat.com>
2487
2488 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
2489
2490 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
2491
2492 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
2493 call make_directories here.
2494 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
2495 (handle_dwfl_module): Likewise.
2496 (handle_implicit_modules): Update callers.
2497 (handle_output_dir_module): Likewise. Don't do make_directories here.
2498
2499 * unstrip.c (get_section_name): New function, broken out of ...
2500 (copy_elided_sections): here. Update callers.
2501 (find_alloc_section): Broken out of ...
2502 (copy_elided_sections): ... here. Update caller.
2503 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
2504 update STT_SECTION symbols' st_value fields as a side effect.
2505 (check_symtab_section_symbols): Update caller.
2506 (add_new_section_symbols): Set st_value in symbols added.
2507 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
2508 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
2509 from .bss to .dynbss.
2510 (find_alloc_sections_prelink): New function. Associate debug file
2511 allocated SHT_NOBITS shdrs with stripped moved by prelink via
2512 .gnu.prelink_undo information.
2513 (copy_elided_sections): Call it when we couldn't find every allocated
2514 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
2515 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
2516 (handle_file): Update callers.
2517
2518 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
2519 named ".comment".
2520
2521 * elflint.c (check_sections): Fix association of segments with
2522 sections when p_memsz > p_filesz.
2523
25242007-04-29 Roland McGrath <roland@redhat.com>
2525
2526 * addr2line.c (options, main): Tweak argp group settings to fix
2527 usage output.
2528
25292007-04-28 Roland McGrath <roland@redhat.com>
2530
2531 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
2532 sizes to match sections adjusted in the stripped file.
2533
Roland McGrath4be15242007-04-25 03:09:33 +000025342007-04-24 Roland McGrath <roland@redhat.com>
2535
2536 * elfcmp.c (OPT_HASH_INEXACT): New macro.
2537 (hash_inexact): New variable.
2538 (options, parse_opt): Add --hash-inexact option to set it.
2539 (hash_content_equivalent): New function.
2540 (main): Call it for differing SHT_HASH sections under --hash-inexact.
2541
25422007-04-23 Roland McGrath <roland@redhat.com>
2543
2544 * unstrip.c: New file.
2545 * Makefile.am (bin_PROGRAMS): Add it.
2546 (unstrip_LDADD): New variable.
2547
2548 * strip.c (options): Allow --output for -o.
2549
Ulrich Drepper8b383102007-02-16 00:31:57 +000025502007-02-15 Ulrich Drepper <drepper@redhat.com>
2551
2552 * readelf.c: Remove unused code. Add a few consts.
2553
Ulrich Drepper903c1162007-02-15 19:40:37 +000025542007-02-15 Roland McGrath <roland@redhat.com>
2555
2556 * readelf.c (print_debug): Fix brainos in SHDR test.
2557
Roland McGrathf82a1ec2007-02-06 04:47:44 +000025582007-02-05 Roland McGrath <roland@redhat.com>
2559
2560 * ar.c: Include <limits.h>, since we use LONG_MAX.
2561
Ulrich Drepper0fe63532007-02-05 21:05:51 +000025622007-02-05 Ulrich Drepper <drepper@redhat.com>
2563
Ulrich Drepper8b383102007-02-16 00:31:57 +00002564 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00002565 ignore fchown's return value.
2566 (do_oper_insert): Handle error when writing padding.
2567 * ranlib.c: Add fchown complain work around.
2568
Ulrich Drepper0fe63532007-02-05 21:05:51 +00002569 * arlib.c: Make symtab a global variable. Change all users.
2570 * arlib2.c: Likewise.
2571 * ranlib.c: Likewise.
2572 * ar.c: Likewise.
2573 * arlib.h: Declare it.
2574
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000025752007-01-11 Roland McGrath <roland@redhat.com>
2576
2577 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
2578 SHF_MASKPROC bits separately from generic sh_flags validation.
2579
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000025802007-02-04 Ulrich Drepper <drepper@redhat.com>
2581
2582 * ar.c: New file.
2583 * arlib.c: New file.
2584 * arlib2.c: New file.
2585 * arlib.h: New file.
2586 * Makefile (noinst_LIBRARIES): Add libar.
2587 (libar_a_SOURCES): Define.
2588 (ar_LDADD): Define.
2589 (CFLAGS_ar): Define.
2590 * ranlib.c: Change to use arlib.
2591
2592 * elflint.c (check_symtab): Work around GNU ld bug which omits
2593 sections but not symbols in those sections.
2594
Ulrich Drepperb770cf92007-01-10 21:02:34 +000025952007-01-10 Ulrich Drepper <drepper@redhat.com>
2596
2597 * addr2line.c: Update copyright year.
2598 * elfcmp.c: Likewise.
2599 * elflint.c: Likewise.
2600 * findtextrel.c: Likewise.
2601 * ld.c: Likewise.
2602 * nm.c: Likewise.
2603 * objdump.c: Likewise.
2604 * ranlib.c: Likewise.
2605 * readelf.c: Likewise.
2606 * size.c: Likewise.
2607 * strings.c: Likewise.
2608 * strip.c: Likewise.
2609
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000026102006-12-09 Ulrich Drepper <drepper@redhat.com>
2611
2612 * elflint.c (compare_hash_gnu_hash): New function. Report if the
2613 two hash tables have different content (module expected omission
2614 of undefined symbols).
2615
Roland McGrath8190db62006-12-17 23:56:51 +000026162006-10-31 Roland McGrath <roland@redhat.com>
2617
2618 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00002619 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00002620
26212006-09-19 Jakub Jelinek <jakub@redhat.com>
2622
2623 * strip.c (process_file): Disallow -f on archives.
2624
26252006-10-09 Roland McGrath <roland@redhat.com>
2626
2627 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
2628
Roland McGrathc373d852006-10-10 00:25:21 +000026292006-08-29 Roland McGrath <roland@redhat.com>
2630
2631 * Makefile.am (MAINTAINERCLEANFILES): New variable.
2632
2633 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
2634 Reported by Christian Aichinger <Greek0@gmx.net>.
2635
2636 * elflint.c (valid_e_machine): Add EM_ALPHA.
2637 Reported by Christian Aichinger <Greek0@gmx.net>.
2638
Ulrich Drepper231c5902006-08-08 22:00:11 +000026392006-08-08 Ulrich Drepper <drepper@redhat.com>
2640
2641 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
2642 Keep track of which "high DT" entries are present.
2643 Check that either old or GNU-style hash table is present.
2644 If GNU-style hash table is used a symbol table is mandatory.
2645 Check that if any prelink entry is present all of them are.
2646 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
2647 table if they don't refer to functions.
2648
Roland McGrath858b1892006-07-17 08:41:15 +000026492006-07-17 Roland McGrath <roland@redhat.com>
2650
2651 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
2652 (add_version): Likewise for argument.
2653 (check_versym): Cast constant to GElf_Versym for comparison.
2654
Roland McGrath4ec807e2006-07-13 03:59:46 +000026552006-07-12 Roland McGrath <roland@redhat.com>
2656
2657 * readelf.c (handle_gnu_hash): Add casts for machines where
2658 Elf32_Word != unsigned int.
2659
Ulrich Drepperdcf61602006-07-12 19:59:02 +000026602006-07-12 Ulrich Drepper <drepper@redhat.com>
2661
2662 * elflint.c (check_sysv_hash64): Fix printf format.
2663
Ulrich Dreppercc415622006-07-12 19:42:23 +000026642006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002665
Ulrich Dreppercc415622006-07-12 19:42:23 +00002666 * addr2line.c (options): English fix in -f doc string.
2667
2668 * addr2line.c (use_comp_dir): New variable.
2669 (options, parse_opt): Grok -A/--absolute to set it.
2670 (handle_address): If set, prepend dwfl_line_comp_dir results to
2671 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002672
Ulrich Drepper28ed8952006-07-07 03:43:47 +000026732006-07-06 Ulrich Drepper <drepper@redhat.com>
2674
2675 * elflint.c: Adjust for latest new hash table format.
2676 * readelf.c: Likewise.
2677
2678 * elflint.c (check_versym): Ignore hidden bit when comparing version
2679 numbers.
2680
26812006-07-05 Ulrich Drepper <drepper@redhat.com>
2682
2683 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
2684 discarded COMDAT symbols.
2685
2686 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
2687 (elf_i386_create_relocations): Likewise.
2688 * ld.h (struct symbol): Add local and hidden bits.
2689 * ld.c (create_special_section_symbol): These synthsized symbols
2690 are local and hidden.
2691 * ldgeneric.c (file_process2): Check whether input file matches
2692 the emulation.
2693 (fillin_special_symbol): Create symbols as local and/or hidden
2694 if requested.
2695 (ld_generic_create_outfile): Make local copy of symbol.
2696 Don't hide global, defined symbols in dynamic symbol table unless
2697 requested. Synthetic symbols have no version information.
2698
2699 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
2700 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2701
27022006-07-04 Ulrich Drepper <drepper@redhat.com>
2703
2704 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
2705 testing.
2706
27072006-07-03 Ulrich Drepper <drepper@redhat.com>
2708
2709 * elflint.c: Add testing of DT_GNU_HASH.
2710 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
2711
2712 * Makefile.am: Add hacks to create dependency files for non-generic
2713 linker.
2714
Ulrich Drepper6ca46002006-06-12 22:40:23 +000027152006-06-12 Ulrich Drepper <drepper@redhat.com>
2716
2717 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
2718 section if creating a DSO and no interpreter is given.
2719 (ld_generic_create_outfile): Don't store reference to symbols in
2720 discarded COMDAT groups. Don't create PHDR and INTERP program header
2721 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00002722 (create_verneed_data): Pretty printing.
2723
Ulrich Drepper6ca46002006-06-12 22:40:23 +00002724 * ldscript.y (content): If a DSO is created don't set default
2725 interpreter from linker script.
2726
2727 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
2728 for symbols in discarded COMDAT groups.
2729 (elf_i386_create_relocations): Likewise.
2730 * ld.h (struct scninfo): Add unused_comdat.
2731 * ldgeneric.c (add_section): Also check group signature when
2732 matching COMDAT sections.
2733 (add_relocatable_file): Ignore symbols in COMDAT group which are
2734 discarded.
2735
2736 * elflint.c (check_one_reloc): For *_NONE relocs only check type
2737 and symbol reference.
2738
Ulrich Drepper54f33a72006-06-11 09:07:37 +000027392006-06-11 Ulrich Drepper <drepper@redhat.com>
2740
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00002741 * elflint.c (check_dynamic): Fix checking value of tags which are
2742 offsets in the string section. Make sure DT_STRTAB points to the
2743 section referenced in sh_link.
2744
2745 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
2746
Ulrich Drepper54f33a72006-06-11 09:07:37 +00002747 * ld.c: Recognize --eh-frame-hdr option.
2748 * ld.h (struct ld_state): Add eh_frame_hdr field.
2749 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
2750
2751 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
2752 SH_FLAGS_COMBINE.
2753 (add_relocatable_file): Minor optimization of last change.
2754 (match_section): Don't preserve SHF_GROUP flag any longer.
2755
Ulrich Drepper2d880282006-06-11 00:20:43 +000027562006-06-10 Ulrich Drepper <drepper@redhat.com>
2757
2758 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00002759 Handle record and ignore as position dependent options.
2760 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00002761 * ld.h (struct ld_state): Add execstack field.
2762 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
2763 sections.
2764 (ld_generic_create_outfile): Fix program header creation in native
2765 linker. Add PT_GNU_STACK program header.
2766
Ulrich Dreppera688a732006-06-10 06:33:00 +000027672006-06-09 Ulrich Drepper <drepper@redhat.com>
2768
2769 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
2770 for PLT entries if there is no local definition.
2771
2772 * ld.c (parse_option): Handle -z ignore like --as-needed and
2773 -z record like --no-as-needed.
2774 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
2775 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
2776 looping over DSOs. When deciding about adding DT_NEEDED entries
2777 use ->as_needed instead of ignore_unused_dsos.
2778
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000027792006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002780
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00002781 * ld.c: Recognize --as-needed and --no-as-needed options.
2782 * ld.h (struct usedfile): Add as_needed field.
2783 (struct ld_state): Likewise.
2784 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
2785 the list.
2786 * ldscript.y (filename_id_list): Split to correctly parse all
2787 combinations.
2788 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002789
Ulrich Drepper697f4db2006-06-10 06:50:47 +000027902006-05-28 Ulrich Drepper <drepper@redhat.com>
2791
2792 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2793 and colno.
2794
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000027952006-05-27 Ulrich Drepper <drepper@redhat.com>
2796
2797 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002798 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002799
Ulrich Drepper82c345d2006-04-04 22:07:54 +000028002006-04-04 Ulrich Drepper <drepper@redhat.com>
2801
2802 * addr2line.c: Update copyright year.
2803 * elfcmp.c: Likewise.
2804 * elflint.c: Likewise.
2805 * findtextrel.c: Likewise.
2806 * ld.c: Likewise.
2807 * nm.c: Likewise.
2808 * objdump.c: Likewise.
2809 * ranlib.c: Likewise.
2810 * readelf.c: Likewise.
2811 * size.c: Likewise.
2812 * strings.c: Likewise.
2813 * strip.c: Likewise.
2814
Roland McGrathdd7e22b2006-03-09 23:05:47 +000028152006-03-09 Roland McGrath <roland@redhat.com>
2816
2817 * Makefile.am (AM_LDFLAGS): New variable.
2818
Roland McGrath060fa052006-03-02 07:51:50 +000028192006-03-01 Roland McGrath <roland@redhat.com>
2820
2821 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2822 for dwarf.h changes matching 3.0 spec.
2823 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2824
Ulrich Drepper038129b2005-12-04 16:47:24 +000028252005-12-04 Ulrich Drepper <drepper@redhat.com>
2826
2827 * elflint.c (check_one_reloc): If relocation section is not loaded,
2828 don't check whether the relocations modify read-only sections or
2829 loaded and unloaded sections.
2830
Ulrich Drepper607e0542005-12-04 15:51:06 +000028312005-11-28 Ulrich Drepper <drepper@redhat.com>
2832
2833 * elflint.c (check_one_reloc): Take additional parameters. Use
2834 them to determine whether relocation is valid in this type of
2835 file. DSOs and executables can contain relocation sections in
2836 unloaded sections which just show the relocations the linker
2837 applied. Adjust all callers.
2838 (check_program_header): Check that PT_PHDR is loaded and that offset
2839 matches the one in the ELF header.
2840
Roland McGrath6724c902005-10-28 07:07:19 +000028412005-10-26 Roland McGrath <roland@redhat.com>
2842
2843 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2844
Ulrich Drepperd0449522005-09-03 07:23:52 +000028452005-09-03 Ulrich Drepper <drepper@redhat.com>
2846
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002847 * strip.c (handle_elf): Unify some error messages.
2848 * ld.c (main): Likewise.
2849 * ldgeneric.c (open_elf): Likewise.
2850 * elfcmp.c (main): Likewise.
2851 * elflint.c (check_elf_header): Likewise.
2852
2853 * size.c (process_file): Fix typo in error message.
2854
Ulrich Drepperd0449522005-09-03 07:23:52 +00002855 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2856
Ulrich Dreppera60501e2005-09-02 19:50:17 +000028572005-09-02 Ulrich Drepper <drepper@redhat.com>
2858
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002859 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002860 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002861
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000028622005-08-28 Ulrich Drepper <drepper@redhat.com>
2863
2864 * ranlib.c: Don't define pread_retry and write_retry here.
2865
2866 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2867 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2868
2869 * strings.c (process_chunk): Reorder expressions in conditional
2870 (process_chunk_mb): Likewise.
2871
2872 * strings.c: New file.
2873 * Makefile.am (bin_PROGRAMS): Add strings.
2874 (strings_no_Wstring): Define.
2875 (strings_LDADD): Define.
2876
Roland McGrath71e15a02005-08-27 10:33:26 +000028772005-08-27 Roland McGrath <roland@redhat.com>
2878
2879 * addr2line.c (dwarf_diename_integrate): Function removed.
2880 (print_dwarf_function): Use plain dwarf_diename.
2881
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000028822005-08-24 Ulrich Drepper <drepper@redhat.com>
2883
2884 * elflint.c (check_versym): Versioned symbols should not have
2885 local binding.
2886
Ulrich Drepper5d832292005-08-15 21:36:27 +000028872005-08-15 Ulrich Drepper <drepper@redhat.com>
2888
Ulrich Drepper61655e02005-08-16 04:23:02 +00002889 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2890 undefined.
2891
Ulrich Drepper5d832292005-08-15 21:36:27 +00002892 * Makefile.am: Add rules to build ranlib.
2893 * ranlib.c: New file.
2894
Roland McGrath18e13422005-08-15 08:01:25 +000028952005-08-14 Roland McGrath <roland@redhat.com>
2896
2897 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2898 sh_type it recognizes.
2899
2900 * elflint.c (check_sections): Print unknown flags in hex, don't
2901 truncate high bits. Print section number and name for unknown type.
2902
Roland McGrathf6895042005-08-13 20:56:52 +000029032005-08-13 Roland McGrath <roland@redhat.com>
2904
2905 * elflint.c (check_program_header): Use ebl_segment_type_name and
2906 allow any p_type it recognizes. Include p_type value in error
2907 message for unknown type.
2908
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000029092005-08-13 Ulrich Drepper <drepper@redhat.com>
2910
2911 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2912 to ebl_check_special_symbol.
2913 (check_sections): Pass ehdr to ebl_bss_plt_p.
2914
Roland McGrath653d3762005-08-13 01:59:10 +000029152005-08-12 Roland McGrath <roland@redhat.com>
2916
2917 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2918 refers to the right section if it's not SHN_ABS.
2919 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2920
2921 * elflint.c (check_sections): Don't complain about a non-NOBITS
2922 section taking no segment space, if it's sh_size is 0.
2923
2924 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2925 be PROGBITS or NOBITS.
2926
2927 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2928 standard st_value and st_size checks.
2929
Roland McGrath1c83bf12005-08-11 07:03:55 +000029302005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002931
Roland McGrath1c83bf12005-08-11 07:03:55 +00002932 * addr2line.c (options, parse_opt): Don't handle -e here.
2933 (executable): Variable removed.
2934 (argp_children): New static variable.
2935 (argp): Use it. Make const.
2936 (main): Fill in argp_children from dwfl_standard_argp ().
2937 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2938 (print_dwarf_function): New function. Try to figure out inline chain.
2939 (elf_getname): Function removed, libdwfl does it for us.
2940 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2941 Use dwfl_module_addrname instead of elf_getname.
2942 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2943 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2944
29452005-08-10 Ulrich Drepper <drepper@redhat.com>
2946
2947 * strip.c (parse_opt): STATE parameter is now used.
2948 Various little cleanups.
2949
2950 * readelf.c (print_debug_line_section): Correct fallout of renaming
2951 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002952
Roland McGrath8f31c2c2005-08-09 04:58:05 +000029532005-08-08 Roland McGrath <roland@redhat.com>
2954
2955 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2956 with binutils strip. Likewise -d, -S, as aliases for -g.
2957 Likewise ignore -s/--strip-all.
2958
Roland McGrath095a01b2005-08-08 03:49:35 +000029592005-08-07 Roland McGrath <roland@redhat.com>
2960
2961 * strip.c (process_file): Open read-only when using a different output
2962 file.
2963
Ulrich Drepper47be7952005-08-07 04:41:39 +000029642005-08-06 Ulrich Drepper <drepper@redhat.com>
2965
Ulrich Drepper637963b2005-08-07 05:33:07 +00002966 * elflint.c (in_nobits_scn): New function.
2967 (check_versym): Allow references for defined symbols against versions
2968 of other DSOs also for symbols in nobits sections.
2969 Move a few variables around.
2970
Ulrich Drepper47be7952005-08-07 04:41:39 +00002971 * Makefile.am (AM_CFLAGS): Avoid duplication.
2972 Link with statis libs if BUILD_STATIC.
2973
Ulrich Drepperdbace232005-08-06 01:37:23 +000029742005-08-05 Ulrich Drepper <drepper@redhat.com>
2975
2976 * elflint.c: Many, many more tests. Mostly related to symbol
2977 versioning. Those sections should now be completely checked.
2978
2979 * readelf.c (print_dynamic): Use gelf_offscn.
2980
Ulrich Drepperacb89832005-08-04 07:01:49 +000029812005-08-04 Ulrich Drepper <drepper@redhat.com>
2982
2983 * elflint.c: Add lots more tests: more extension symbol table sanity,
2984 versioning section tests, hash table tests. General cleanup.
2985
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000029862005-08-02 Ulrich Drepper <drepper@redhat.com>
2987
Ulrich Drepper8a687742005-08-03 02:24:12 +00002988 * objdump.c: New file.
2989 * Makefile.am (bin_PROGRAMS): Add objdump.
2990 (objdump_LDADD): Define.
2991
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002992 * elflint.c (check_reloc_shdr): New function split out from check_rela
2993 and check_rel.
2994 (check_one_reloc): New function. Likewise.
2995 (check_rela): Use check_reloc_shdr and check_one_reloc.
2996 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002997 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2998 section.
2999 Add checks that relocations against read-only segments are flagged,
3000 that the text relocation flag is not set unnecessarily, and that
3001 relocations in one section are either against loaded or not-loaded
3002 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00003003
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000030042005-08-01 Ulrich Drepper <drepper@redhat.com>
3005
3006 * elfcmp.c (main): Ignore section count and section name string table
3007 section index.
3008
Roland McGrathf9ece8a2005-07-28 07:03:04 +000030092005-07-27 Roland McGrath <roland@redhat.com>
3010
3011 * elfcmp.c: Include <locale.h>.
3012
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000030132005-07-27 Ulrich Drepper <drepper@redhat.com>
3014
3015 * elfcmp.c: Print name and index of differing section.
3016
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000030172005-07-24 Ulrich Drepper <drepper@redhat.com>
3018
3019 * elfcmp.c: Implement comparing gaps between sections.
3020
30212005-07-23 Ulrich Drepper <drepper@redhat.com>
3022
3023 * elflint.c: Include libeblP.h instead of libebl.h.
3024 * nm.c: Likewise.
3025 * readelf.c: Likewise.
3026 * elfcmp.c: Likewise.
3027
3028 * elfcmp.c (main): Compare individual ELF header fields, excluding
3029 e_shoff instead of the whole struct at once.
3030 Use ebl_section_strip_p instead of SECTION_STRIP_P.
3031 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
3032
30332005-07-22 Ulrich Drepper <drepper@redhat.com>
3034
3035 * elfcmp.c (main): Take empty section into account when comparing
3036 section content.
3037
3038 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
3039 using it.
3040
30412005-07-21 Ulrich Drepper <drepper@redhat.com>
3042
3043 * elfcmp.c: New file.
3044 * Makefile.am (bin_PROGRAMS): Add elfcmp.
3045 (elfcmp_LDADD): Define.
3046
3047 * elflint.c (check_rela): Check that copy relocations only reference
3048 object symbols or symbols with unknown type.
3049 (check_rel): Likewise.
3050
30512005-06-08 Roland McGrath <roland@redhat.com>
3052
3053 * readelf.c (print_ops): Add consts.
3054
30552005-05-31 Roland McGrath <roland@redhat.com>
3056
3057 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
3058 abbreviations. Print a header line before each CU section.
3059
3060 * readelf.c (print_debug_loc_section): Fix indentation for larger
3061 address size.
3062
30632005-05-30 Roland McGrath <roland@redhat.com>
3064
3065 * readelf.c (print_debug_line_section): Print section offset of each
3066 CU's table, so they are easy to find from seeing the stmt_list value.
3067
3068 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
3069 (attr_callback): Grok DW_AT_ranges and print offset in hex.
3070
3071 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
3072 (print_debug_ranges_section, print_debug_loc_section): Likewise.
3073
3074 * readelf.c (print_ops): Take different args for indentation control.
3075 (attr_callback): Caller updated.
3076 Grok several more block-form attributes as being location expressions.
3077 For those same attributes with udata forms, format output differently
3078 for location list offset.
3079 (print_debug_loc_section): Implement it for real.
3080
3081 * readelf.c (options): Mention ranges for --debug-dump.
3082 (enum section_e): Add section_ranges.
3083 (parse_opt): Grok "ranges" for -w/--debug-dump.
3084 (print_debug_ranges_section): New function.
3085 (print_debug): Handle .debug_ranges section.
3086
30872005-05-30 Ulrich Drepper <drepper@redhat.com>
3088
3089 * readelf.c (handle_notes): At least x86-64 need not have the note
3090 section values aligned to 8 bytes.
3091
30922005-05-18 Ulrich Drepper <drepper@redhat.com>
3093
3094 * readelf.c (dwarf_tag_string): Add new tags.
3095
30962005-05-08 Roland McGrath <roland@redhat.com>
3097
3098 * strip.c (handle_elf): Don't translate hash and versym data formats,
3099 elf_getdata already did it for us.
3100
31012005-05-07 Ulrich Drepper <drepper@redhat.com>
3102
3103 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
3104 (addr2line_LDADD): Likewise.
3105
31062005-05-03 Roland McGrath <roland@redhat.com>
3107
3108 * strip.c (handle_elf): Apply symbol table fixups to discarded
3109 relocation sections when they are being saved in the debug file.
3110
3111 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
3112 and gelf_xlatetof, not the native byte order.
3113
3114 * strip.c (parse_opt): Give error if -f or -o is repeated.
3115 (main): Exit if argp_parse returns nonzero.
3116
3117 * strip.c (debug_fname_embed): New variable.
3118 (options, parse_opt): New option -F to set it.
3119
31202005-05-07 Ulrich Drepper <drepper@redhat.com>
3121
3122 * readelf.c (parse_opt): Make any_control_option variable
3123 local. Simplify some tests.
3124
31252005-05-03 Roland McGrath <roland@redhat.com>
3126
3127 * strip.c (crc32_file): Function removed (now in ../lib).
3128
31292005-05-03 Roland McGrath <roland@redhat.com>
3130
3131 * elflint.c (is_debuginfo): New variable.
3132 (options, parse_opt): New option --debuginfo/-d to set it.
3133 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
3134 (check_note): If is_debuginfo, don't try to get note contents.
3135
31362005-04-24 Ulrich Drepper <drepper@redhat.com>
3137
3138 * readelf.c (print_debug_abbrev_section): Don't print error when end of
3139 section reached.
3140
31412005-04-14 Ulrich Drepper <drepper@redhat.com>
3142
3143 * readelf.c (dwarf_encoding_string): New function.
3144 (dwarf_inline_string): New function.
3145 (dwarf_access_string): New function.
3146 (dwarf_visibility_string): New function.
3147 (dwarf_virtuality_string): New function.
3148 (dwarf_identifier_case_string): New function.
3149 (dwarf_calling_convention_string): New function.
3150 (dwarf_ordering_string): New function.
3151 (dwarf_discr_list_string): New function.
3152 (attr_callback): Decode man more attribute values.
3153
31542005-04-01 Ulrich Drepper <drepper@redhat.com>
3155
3156 * addr2line.c: Finish implementation of -f option.
3157
31582005-03-29 Ulrich Drepper <drepper@redhat.com>
3159
3160 * addr2line.c: New file.
3161 * Makefile.am (bin_PROGRAMS): Add addr2line.
3162 Define addr2line_LDADD.
3163
3164 * findtextrel.c: Use new dwarf_addrdie function.
3165
3166 * findtextrel.c: Fix usage message and re-add accidentally removed
3167 line.
3168
31692005-03-28 Ulrich Drepper <drepper@redhat.com>
3170
3171 * findtextrel.c: New file.
3172 * Makefile: Add rules to build findtextrel.
3173
31742005-02-15 Ulrich Drepper <drepper@redhat.com>
3175
3176 * ldlex.l: Provide ECHO definition to avoid warning.
3177
3178 * elflint.c (check_program_header): Fix typo in RELRO test.
3179
3180 * Makefile.am (AM_CFLAGS): Add more warning options.
3181 * elflint.c: Fix warnings introduced by the new warning options.
3182 * i386_ld.c: Likewise.
3183 * ld.c: Likewise.
3184 * ld.h: Likewise.
3185 * ldgeneric.c: Likewise.
3186 * nm.c: Likewise.
3187 * readelf.c: Likewise.
3188 * sectionhash.c: Likewise.
3189 * size.c: Likewise.
3190 * string.c: Likewise.
3191
31922005-02-05 Ulrich Drepper <drepper@redhat.com>
3193
3194 * Makefile.am: Check for text relocations in constructed DSOs.
3195
3196 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
3197 with -lmudflap.
3198
3199 * ldscript.y: Add as_needed handling.
3200 * ldlex.l: Recognize AS_NEEDED token.
3201 * ld.h (struct filename_list): Add as_needed flag.
3202
32032005-02-04 Ulrich Drepper <drepper@redhat.com>
3204
3205 * elflint.c (check_symtab): Correctly determine size of GOT section.
3206
32072005-01-19 Ulrich Drepper <drepper@redhat.com>
3208
3209 * ld.c: Remove unnecessary more_help function. Print bug report
3210 address using argp.
3211 * strip.c: Likewise.
3212 * size.c: Likewise.
3213 * nm.c: Likewise.
3214 * readelf.c: Likewise.
3215 * elflint.c: Likewise.
3216
3217 * elflint.c (main): Don't check for parameter problems here.
3218 (parse_opt): Do it here, where we get informed about some of them
3219 anyway.
3220
3221 * readelf.c (main): Don't check for parameter problems here.
3222 (parse_opt): Do it here, where we get informed about some of them
3223 anyway.
3224
32252005-01-11 Ulrich Drepper <drepper@redhat.com>
3226
3227 * strip.c: Update copyright year.
3228 * readelf.c: Likewise.
3229 * size.c: Likewise.
3230 * nm.c: Likewise.
3231 * ld.c: Likewise.
3232 * elflint.c: Likewise.
3233
3234 * elflint.c (check_symtab): Don't warn about wrong size for
3235 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
3236
32372004-10-05 Ulrich Drepper <drepper@redhat.com>
3238
3239 * readelf.c (print_phdr): In section mapping, also indicate
3240 sections in read-only segments.
3241
32422004-09-25 Ulrich Drepper <drepper@redhat.com>
3243
3244 * readelf.c: Make compile with gcc 4.0.
3245 * strip.c: Likewise.
3246
32472004-08-16 Ulrich Drepper <drepper@redhat.com>
3248
3249 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
3250 allocate to work around gcc 3.4 bug.
3251
32522004-01-25 Ulrich Drepper <drepper@redhat.com>
3253
3254 * ldlex.l (invalid_char): Better error message.
3255
32562004-01-23 Ulrich Drepper <drepper@redhat.com>
3257
3258 * readelf.c: Print SHT_GNU_LIBLIST sections.
3259
3260 * none_ld.c: New file.
3261
32622004-01-21 Ulrich Drepper <drepper@redhat.com>
3263
3264 * Makefile.am: Enable building of machine specific linker.
3265
32662004-01-20 Ulrich Drepper <drepper@redhat.com>
3267
3268 * Makefile.am: Support building with mudflap.
3269
3270 * i386_ld.c: Fix warnings gcc 3.4 spits out.
3271 * ldgeneric.c: Likewise.
3272 * ldscript.y: Likewise.
3273 * readelf.c: Likewise.
3274 * strip.c: Likewise.
3275
3276 * readelf.c (print_debug_line_section): Determine address size
3277 correctly.
3278
32792004-01-19 Ulrich Drepper <drepper@redhat.com>
3280
3281 * readelf.c (print_phdr): Show which sections are covered by the
3282 PT_GNU_RELRO entry.
3283
3284 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
3285
3286 * readelf.c (print_debug_macinfo_section): Implement.
3287
32882004-01-18 Ulrich Drepper <drepper@redhat.com>
3289
3290 * readelf.c (print_debug_line_section): Implement.
3291
32922004-01-17 Ulrich Drepper <drepper@redhat.com>
3293
3294 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
3295 * src/ld.c: Likewise.
3296 * src/nm.c: Likewise.
3297 * src/readelf.c: Likewise.
3298 * src/size.c: Likewise.
3299 * src/strip.c: Likewise.
3300
3301 * strip.c: Add a few more unlikely. Reduce scope of some variables.
3302
3303 * Makefile.am: Support building with mudflap.
3304
33052004-01-16 Ulrich Drepper <drepper@redhat.com>
3306
3307 * readelf.c (print_debug_info_section): Free dies memory.
3308
3309 * readelf.c: Print .debug_info section content.
3310
33112004-01-13 Ulrich Drepper <drepper@redhat.com>
3312
3313 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
3314
33152004-01-12 Ulrich Drepper <drepper@redhat.com>
3316
3317 * readelf.c (print_debug_aranges): Implement using libdw.
3318
33192004-01-11 Ulrich Drepper <drepper@redhat.com>
3320
3321 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
3322
3323 * readelf.c: Use libdw instead of libdwarf. Not all of the old
3324 behavior is available yet.
3325 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
3326
33272004-01-09 Ulrich Drepper <drepper@redhat.com>
3328
3329 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
3330
3331 * nm.c: Implement getting information about local variables.
3332
33332004-01-07 Ulrich Drepper <drepper@redhat.com>
3334
3335 * nm.c: Read also debug information for local symbols.
3336
33372004-01-05 Ulrich Drepper <drepper@redhat.com>
3338
3339 * nm.c: Shuffle dwarf handling code around so the maximum column
3340 width can be computed ahead of printing. Avoid collection symbols
3341 which are not printed anyway.
3342
3343 * nm.c: Rewrite dwarf handling to use libdw.
3344 * Makefile.am (AM_CFLAGS): Add -std parameter.
3345 (INCLUDES): Find header in libdw subdir.
3346 (nm_LDADD): Replace libdwarf with libdw.
3347
3348 * elflint.c: Update copyright year.
3349 * readelf.c: Likewise.
3350 * size.c: Likewise.
3351 * strip.c: Likewise.
3352 * nm.c: Likewise.
3353
33542003-12-31 Ulrich Drepper <drepper@redhat.com>
3355
3356 * strip.c (process_file): Close file before returning.
3357
33582003-11-19 Ulrich Drepper <drepper@redhat.com>
3359
3360 * readelf.c (handle_dynamic): Make column for tag name wider.
3361
33622003-09-29 Ulrich Drepper <drepper@redhat.com>
3363
3364 * readelf.c (handle_dynamic): Always terminate tag name with a space.
3365
33662003-09-25 Ulrich Drepper <drepper@redhat.com>
3367
3368 * strip.c (process_file): Don't mmap the input file, we modify the
3369 data structures and don't want the change end up on disk.
3370
33712003-09-23 Jakub Jelinek <jakub@redhat.com>
3372
3373 * unaligned.h (union u_2ubyte_unaligned,
3374 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
3375 packed attribute.
3376 (add_2ubyte_unaligned, add_4ubyte_unaligned,
3377 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
3378 Read/store value through _ptr->u instead of *_ptr.
3379
33802003-09-22 Ulrich Drepper <drepper@redhat.com>
3381
3382 * size.c (show_sysv): Change type of maxlen to int.
3383
3384 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
3385 buckets.
3386
3387 * i386_ld.c: Many many fixes and extensions.
3388 * ld.c: Likewise.
3389 * ldgeneric.c: Likewise.
3390
33912003-08-16 Ulrich Drepper <drepper@redhat.com>
3392
3393 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
3394 the reference is from another DSO.
3395
33962003-08-15 Ulrich Drepper <drepper@redhat.com>
3397
3398 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
3399 point is found when creating a DSO.
3400
34012003-08-14 Ulrich Drepper <drepper@redhat.com>
3402
3403 * ld.c (main): Always call FLAG_UNRESOLVED.
3404 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
3405 undefined symbols if not creating DSO or ld_state.nodefs is not set.
3406
34072003-08-13 Ulrich Drepper <drepper@redhat.com>
3408
3409 * Makefile.in: Depend on libebl.a, not libebl.so.
3410
3411 * ld.c (main): Mark stream for linker script as locked by caller.
3412 (read_version_script): Likewise.
3413 * ldlex.c: Define fread and fwrite to _unlocked variant.
3414
3415 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
3416 target_bswap_32.
3417 * unaligned.h: Define target_bswap_16, target_bswap_32, and
3418 target_bswap_64.
3419 (store_2ubyte_unaligned, store_4ubyte_unaligned,
3420 store_8ubyte_unaligned): Define using new macros.
3421
34222003-08-12 Ulrich Drepper <drepper@redhat.com>
3423
3424 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
3425 possibly unaligned memory. Support use of big endian machines.
3426
34272003-08-11 Ulrich Drepper <drepper@redhat.com>
3428
3429 * Moved to CVS archive.