blob: 66f7ead1a487dfa944c0c2620fd18beb6fdd25d1 [file] [log] [blame]
Mark Wielaardb00a4fa2015-09-03 10:50:58 +020012015-09-03 Mark Wielaard <mjw@redhat.com>
2
3 * readelf.c (handle_core_item): Handle right shift >= 32 bits.
4
Mark Wielaard0292aef2015-08-12 00:11:26 +020052015-08-11 Mark Wielaard <mjw@redhat.com>
6
7 * elflint.c (check_sections): When gnuld and a NOBITS section falls
8 inside a segment make sure any ELF file contents is zero.
9
Mark Wielaardf9fc50c2015-07-29 17:51:27 +0200102015-07-29 Mark Wielaard <mjw@redhat.com>
11
12 * unstrip.c (sections_flags_match): New function.
13 (sections_match): Use sections_flags_match.
14 (find_alloc_sections_prelink): Only clear matched sections if there
15 is an undo section.
16 (copy_elided_sections): Add SHF_INFO_LINK to shdr_mem.sh_flags if
17 necessary.
18
Pino Toscanoaf29f772015-06-27 18:07:01 +0200192015-06-27 Pino Toscano <toscano.pino@tiscali.it>
20
21 * src/strings.c: Define MAP_POPULATE if not defined already.
22
Mark Wielaardc08079a2015-06-27 22:07:01 +0200232015-06-27 Mark Wielaard <mjw@redhat.com>
24
25 * nm.c (show_symbols): First call elf_getdata, then allocate memory.
26
Mark Wielaardafd11602015-06-18 11:00:51 +0200272015-06-18 Mark Wielaard <mjw@redhat.com>
28
Mark Wielaarda1f359e2015-06-18 23:43:39 +020029 * findtextrel.c (process_file): Free segments after use.
30
312015-06-18 Mark Wielaard <mjw@redhat.com>
32
Mark Wielaard222cd822015-06-18 20:24:39 +020033 * readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals
34 phdr2 pointer.
35
362015-06-18 Mark Wielaard <mjw@redhat.com>
37
Mark Wielaard90a7bd22015-06-18 10:57:53 +020038 * readelf.c (handle_gnu_hash): Free lengths on invalid_data.
39
402015-06-18 Mark Wielaard <mjw@redhat.com>
41
Mark Wielaard77be59b2015-06-18 12:50:47 +020042 * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
43 exists. Warn otherwise.
44
452015-06-18 Mark Wielaard <mjw@redhat.com>
46
Mark Wielaard9beaa942015-06-18 11:07:41 +020047 * nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
48 known whether or not we stack allocated memory.
49
502015-06-18 Mark Wielaard <mjw@redhat.com>
51
Mark Wielaardafd11602015-06-18 11:00:51 +020052 * strings.c (readelf): Use "<unknown>" if we cannot retrieve section
53 name.
54
Mark Wielaardcb499c42015-06-09 16:26:16 +0200552015-06-09 Mark Wielaard <mjw@redhat.com>
56
Mark Wielaard5aa90b92015-06-10 00:22:58 +020057 * addr2line.c (print_dwarf_function): Always free scopes before
58 returning.
59
602015-06-09 Mark Wielaard <mjw@redhat.com>
61
Mark Wielaardcb499c42015-06-09 16:26:16 +020062 * strip.c (handle_ar): Mark as unused.
63 (process_file): Produce an error when trying to handle an ar.
64
Mark Wielaard0d528f92015-05-30 23:55:50 +0200652015-05-30 Mark Wielaard <mjw@redhat.com>
66
67 * elfcmp.c (main): Only call memcmp when d_size != 0.
68
Mark Wielaard712f3c82015-05-23 17:50:09 +0200692015-05-23 Mark Wielaard <mjw@redhat.com>
70
71 * Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint,
72 findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage.
73
Mark Wielaard6f2e64a2015-05-21 16:05:18 +0200742015-05-21 Mark Wielaard <mjw@redhat.com>
75
76 * addr2line.c (handle_address): Set scopes to NULL after free.
77
Mark Wielaard472890f2015-05-20 12:10:47 +0200782015-05-20 Mark Wielaard <mjw@redhat.com>
79
Mark Wielaardb23a5b22015-05-20 14:09:46 +020080 * addr2line.c (OPT_PRETTY): New constant define.
81 (argp_option): Add "pretty-print".
82 (pretty): New static bool.
83 (parse_opt): Set pretty.
84 (print_dwarf_function): Adjust output when pretty is set.
85 (print_addrsym): Likewise.
86 (handle_address): Likewise.
87
882015-05-20 Mark Wielaard <mjw@redhat.com>
89
Mark Wielaardcd2da6c2015-05-20 11:52:27 +020090 * Makefile.am (addr2line_LDADD): Add demanglelib.
91 * addr2line.c (argp_option): Move demangle under output format.
92 (demangle): New static bool.
93 (demangle_buffer_len): New static size_t.
94 (demangle_buffer): New static char *.
95 (main): free demangle_buffer.
96 (parse_opt): Set demangle.
97 (symname): New static function.
98 (get_diename): Use symname.
99 (print_dwarf_function): Likewise.
100 (print_addrsym): Likewise.
101 (handle_address): Likewise.
102
1032015-05-20 Mark Wielaard <mjw@redhat.com>
104
Mark Wielaard70a504d2015-05-19 16:21:27 +0200105 * addr2line.c (argp_option): Add "addresses", 'a'.
106 (print_addresses): New static bool.
107 (parse_opt): Set print_addresses.
108 (get_addr_width): New static function.
109 (handle_address): Print address if print_addresses is true.
110
1112015-05-20 Mark Wielaard <mjw@redhat.com>
112
Mark Wielaardd76d73f2015-05-19 23:08:00 +0200113 * addr2line.c (handle_address): Call strtoumax with base 16. Make
114 sure all input has been processed.
115
1162015-05-20 Mark Wielaard <mjw@redhat.com>
117
Mark Wielaard472890f2015-05-20 12:10:47 +0200118 * addr2line (argp_option): Group 'section' under "Input format
119 options".
120
Mark Wielaard6d93c8c2015-05-12 15:59:04 +02001212015-05-12 Mark Wielaard <mjw@redhat.com>
122
123 * strip.c (debug_fd): New static variable.
124 (tmp_debug_fname): Likewise.
125 (cleanup_debug): New function using the above to clean up temporary
126 debug file.
127 (INTERNAL_ERROR): Call cleanup_debug.
128 (handle_elf): Use debug_fd and tmp_debug_fname statics and call
129 cleanup_debug before any error. Use output_fname instead of fname in
130 error messages when it exists (-o was given). SHT_NOBITS sections
131 can also be moved freely even if SHF_ALLOC is set. Add various
132 sanity checks. Use elf_assert instead of plain assert.
133
Mark Wielaarda2b964c2015-05-08 17:56:32 +02001342015-05-08 Mark Wielaard <mjw@redhat.com>
135
136 * nm.c (show_symbols): Call gelf_fsize with EV_CURRENT.
137 * strip.c (handle_elf): Likewise.
138
Mark Wielaard16e2ac32015-05-06 13:09:23 +02001392015-05-06 Mark Wielaard <mjw@redhat.com>
140
141 * elflint.c (check_gnu_hash): Return early when 2nd hash function
Mark Wielaard281bb492015-05-06 18:02:10 +0200142 shift too big. Check there is enough data available. Make sure
143 bitmask_words is not zero.
Mark Wielaard9d092652015-05-06 16:01:55 +0200144 (check_verdef): Use Elf64_Word for shdr->sh_info cnt.
145 (check_verneed): Likewise.
Mark Wielaard5e80a1e2015-05-06 17:38:18 +0200146 (check_attributes): Break when vendor name isn't terminated.
147 Add overflow check for subsection_len.
Mark Wielaard16e2ac32015-05-06 13:09:23 +0200148
Mark Wielaarda3344c72015-05-06 12:45:49 +02001492015-05-05 Mark Wielaard <mjw@redhat.com>
150
151 * nm.c (show_symbols): Handle dwarf_linesrc returning NULL.
152
Max Filippovb88bece2015-05-04 02:25:40 +03001532015-05-04 Max Filippov <jcmvbkbc@gmail.com>
154
Max Filippov8c4aa0e2015-05-04 20:17:51 +0300155 * ar.c (do_oper_extract): Replace struct timeval with struct timespec
156 and futimes with futimens.
157 * strip.c (process_file): Replace struct timeval with struct timespec.
158 (handle_elf, handle_ar): Replace struct timeval with struct timespec
159 in prototype. Replace futimes with futimens.
160
1612015-05-04 Max Filippov <jcmvbkbc@gmail.com>
162
Max Filippovb88bece2015-05-04 02:25:40 +0300163 * addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
164 * ar.c: Likewise.
165 * ld.c: Likewise.
166 * nm.c: Likewise.
167 * objdump.c: Likewise.
168 * ranlib.c: Likewise.
169 * size.c: Likewise.
170 * strip.c: Likewise.
171 * unstrip.c: Likewise.
172
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +03001732015-05-04 Anthony G. Basile <blueness@gentoo.org>
174
175 * Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
176 (ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
177 (elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
178 (ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
179
Mark Wielaardf333a1c2015-04-22 11:44:32 +02001802015-03-22 Mark Wielaard <mjw@redhat.com>
181
Mark Wielaard32d5b6f2015-04-22 12:47:46 +0200182 * readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
183 before subtracting cie_id. And cast cie_offset to Dwarf_Off before
184 comparison.
185
1862015-03-22 Mark Wielaard <mjw@redhat.com>
187
Mark Wielaardf333a1c2015-04-22 11:44:32 +0200188 * readelf.c (print_gdb_index_section): Check all offsets used
189 against section d_size.
190
Mark Wielaard86de7922015-04-17 20:03:44 +02001912015-03-17 Mark Wielaard <mjw@redhat.com>
192
Mark Wielaard9b5f7952015-04-17 22:24:41 +0200193 * readelf.c (print_debug): Don't return, but always use dummy_dbg.
194
1952015-03-17 Mark Wielaard <mjw@redhat.com>
196
Mark Wielaard86de7922015-04-17 20:03:44 +0200197 * readelf.c (print_gdb_index_section): Add overflow checking for
198 dataend checks.
199
Mark Wielaard587c4b32015-04-14 11:59:36 +02002002015-03-14 Mark Wielaard <mjw@redhat.com>
201
202 * nm.c (INTERNAL_ERROR): Remove __DATE__.
203 * objdump.c (INTERNAL_ERROR): Likewise.
204 * size.c (INTERNAL_ERROR): Likewise.
205 * strip.c (INTERNAL_ERROR): Likewise.
206
Petr Machata7f617342015-03-18 19:42:02 +01002072015-03-18 Petr Machata <pmachata@redhat.com>
208
209 * readelf.c (dwarf_tag_string, dwarf_attr_string)
210 (dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
211 (dwarf_encoding_string, dwarf_access_string)
212 (dwarf_visibility_string, dwarf_virtuality_string)
213 (dwarf_identifier_case_string, dwarf_calling_convention_string)
214 (dwarf_ordering_string, dwarf_discr_list_string)
215 (dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
216 to match the API changes.
217
Mark Wielaardae9aa3e2015-03-09 16:41:48 +01002182015-03-09 Mark Wielaard <mjw@redhat.com>
219
220 * elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
221
Mark Wielaarde16e1412015-01-04 00:35:25 +01002222015-01-03 Mark Wielaard <mjw@redhat.com>
223
224 * elfcmp (main): Check section name is not NULL. Check sh_entsize
225 is not zero for symbol tables. Check phdrs are not NULL.
226 (search_for_copy_reloc): Check sh_entsize is not zero.
227
Mark Wielaard0a545e62014-12-29 00:53:27 +01002282014-12-30 Mark Wielaard <mjw@redhat.com>
229
230 * elflint.c (check_scn_group): Check d_buf and name are not NULL.
231 (is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
232 zero.
233 (check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
234 (check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
235 Check shdr and symshdr sh_entsize are not zero.
236 (check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
237 Check symshdr->sh_entsize is not zero. Check data->d_buf is not
238 NULL.
239 (compare_hash_gnu_hash): Check sections d_buf are not NULL.
240 Check section data is large enough. Use gnu_symbias.
241 (check_group): Check section val is valid.
242 (has_copy_reloc): Check sh_entsize is not zero.
243 (check_versym): Likewise.
244 (unknown_dependency_p): Likewise.
245 (check_verneed): Break on invalid ref or offset. Don't assert.
246 Report error when next offset is zero, but more vers expected.
247 (check_verdef): Likewise.
248 (check_attributes): Make sure d_buf is not NULL.
249 (check_note): Likewise.
250 (check_note_section): Likewise.
251 (check_program_header): Make sure section name is not NULL.
252
Mark Wielaard0b799ad2014-12-26 16:12:52 +01002532014-12-26 Mark Wielaard <mjw@redhat.com>
254
Mark Wielaard555fdae2014-12-26 22:57:00 +0100255 * strings.c (read_elf): Produce error when section data falls outside
256 file.
257
2582014-12-26 Mark Wielaard <mjw@redhat.com>
259
Mark Wielaard309e7122014-12-26 19:36:31 +0100260 * nm.c (show_symbols): Guard against divide by zero in error check.
261 Add section index number in error message.
262
2632014-12-26 Mark Wielaard <mjw@redhat.com>
264
Mark Wielaard8fb260f2014-12-26 16:20:39 +0100265 * nm.c (handle_ar): Skip over /SYM64/ entries.
266
2672014-12-26 Mark Wielaard <mjw@redhat.com>
268
Mark Wielaard0b799ad2014-12-26 16:12:52 +0100269 * nm.c (handle_ar): Break on arsym with invalid offset.
270
Mark Wielaardcda1a312014-12-21 22:55:54 +01002712014-12-20 Mark Wielaard <mjw@redhat.com>
272
Mark Wielaard8f2f5802014-12-21 23:02:12 +0100273 * readelf.c (print_debug_macinfo_section): Mark cus sentinel files
274 as -1 non-existent. Check macoff against sentinel cus.
275
2762014-12-20 Mark Wielaard <mjw@redhat.com>
277
Mark Wielaardcda1a312014-12-21 22:55:54 +0100278 * readelf.c (print_debug_exception_table): Add max_action overflow
279 check. Check action_table_end before reading slib128. Check
280 max_ar_filter underflow.
281
Ulrich Drepper898ed262014-12-18 12:32:39 -05002822014-12-18 Ulrich Drepper <drepper@gmail.com>
283
284 * Makefile.am: Suppress output of textrel_check command.
285
Mark Wielaard99a6f222014-12-17 15:07:49 +01002862014-12-17 Mark Wielaard <mjw@redhat.com>
287
288 * readelf.c (print_cfa_program): Add bounds check before each op that
289 takes at least one argument.
290
Mark Wielaardff1ce972014-12-16 16:10:28 +01002912014-12-16 Mark Wielaard <mjw@redhat.com>
292
Mark Wielaard32270932014-12-16 22:19:08 +0100293 * readelf.c (print_decoded_line_section): Print dwarf_errmsg if
294 dwarf_onesrcline or dwarf_linesrc fails.
295
2962014-12-16 Mark Wielaard <mjw@redhat.com>
297
Mark Wielaardff1ce972014-12-16 16:10:28 +0100298 * readelf.c (print_debug_line_section): Correct overflow check for
299 unit_length.
Mark Wielaardacb50692014-12-16 16:30:59 +0100300 (print_debug_aranges_section): Correct overflow check for length.
Mark Wielaardff1ce972014-12-16 16:10:28 +0100301
Mark Wielaardb171ca42014-12-15 11:35:46 +01003022014-12-15 Mark Wielaard <mjw@redhat.com>
303
Mark Wielaard6a8a9e32014-12-15 19:43:02 +0100304 * readelf.c (notice_listptr): Return false if offset doesn't fit
305 in 61-bits.
306 (attr_callback): Warn if loclist or rangelist offset doesn't fit.
307
3082014-12-15 Mark Wielaard <mjw@redhat.com>
309
Mark Wielaard198e9492014-12-15 19:05:43 +0100310 * readelf.c (print_ops): Don't assert when addr_size or ref_size
311 is not 4 or 8, just report invalid data.
312
3132014-12-15 Mark Wielaard <mjw@redhat.com>
314
Mark Wielaard2323b452014-12-15 15:34:59 +0100315 * readelf.c (print_gdb_index_section): Add more bounds checks.
316
3172014-12-15 Mark Wielaard <mjw@redhat.com>
318
Mark Wielaardb171ca42014-12-15 11:35:46 +0100319 * readelf.c (print_debug_line_section): Check there is enough room
Mark Wielaard9c42b782014-12-15 13:40:18 +0100320 for DW_LNE_set_address argument. Make sure there is enough room
321 for the the initial unit_length.
Mark Wielaardb171ca42014-12-15 11:35:46 +0100322
Mark Wielaard7a053472014-12-14 21:48:23 +01003232014-12-14 Mark Wielaard <mjw@redhat.com>
324
325 * elflint.c (check_attributes): Call get_uleb128 with end pointer.
326 * readelf.c (print_attributes): Likewise.
327 (print_ops): Likewise and also for get_sleb128.
328 (print_cfa_program): Likewise and add more readp bounds checks.
329 (read_encoded): Likewise.
330 (print_debug_frame_section): Likewise.
331 (print_debug_line_section): Likewise.
332 (print_debug_macinfo_section): Likewise.
333 (print_debug_macro_section): Likewise.
334 (print_debug_exception_table): Likewise.
335
Mark Wielaard274cbda2014-12-16 11:04:55 +01003362014-12-16 Mark Wielaard <mjw@redhat.com>
337
338 * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
339 difference doesn't wrap around before returning as int.
340
Mark Wielaardcd339292014-12-11 17:21:22 +01003412014-12-11 Mark Wielaard <mjw@redhat.com>
342
Mark Wielaardee5693b2014-12-11 18:26:09 +0100343 * readelf.c (print_debug_exception_table): Check TType base offset
344 and Action table are sane.
345
3462014-12-11 Mark Wielaard <mjw@redhat.com>
347
Mark Wielaardcd339292014-12-11 17:21:22 +0100348 * readelf.c (print_debug_frame_section): Check number of augmentation
349 chars to print.
350
Mark Wielaarda0da7562014-12-09 12:58:07 +01003512014-12-09 Mark Wielaard <mjw@redhat.com>
352
353 * readelf.c (handle_file_note): Check count fits data section and
354 doesn't overflow fptr.
355
Mark Wielaard990fbe52014-12-08 10:11:43 +01003562014-12-08 Mark Wielaard <mjw@redhat.com>
357
358 * readelf.c (print_debug_exception_table): Report invalid data if
359 action table doesn't immediately follow call site table.
360
Josh Stoneaecdf262014-12-10 11:06:52 -08003612014-12-10 Josh Stone <jistone@redhat.com>
362
Josh Stone2098b3d2014-12-10 11:14:40 -0800363 * addr2line.c (get_diename): New, get linkage_name or name.
364 * addr2line.c (print_dwarf_function): Use get_diename.
365 * addr2line.c (handle_address): Likewise.
366 * addr2line.c (print_diesym): Removed.
367
3682014-12-10 Josh Stone <jistone@redhat.com>
369
Josh Stoneaecdf262014-12-10 11:06:52 -0800370 * addr2line.c (handle_address): Find the proper inline parents.
371
Mark Wielaard96ddcad2014-12-07 22:45:28 +01003722014-12-07 Mark Wielaard <mjw@redhat.com>
373
Mark Wielaardf0c5ef82014-12-07 23:40:12 +0100374 * readelf.c (print_debug_line_section): max_ops_per_instr cannot
375 be zero.
376
3772014-12-07 Mark Wielaard <mjw@redhat.com>
378
Mark Wielaard96ddcad2014-12-07 22:45:28 +0100379 * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
380 and DW_OP_GNU_implicit_pointer.
381
Mark Wielaardd0070a92014-12-04 17:01:20 +01003822014-12-04 Mark Wielaard <mjw@redhat.com>
383
384 * objdump.c (show_relocs_x): Make sure destshdr exists.
385 (show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
386 (show_relocs_rela): Likewise.
387 (show_relocs): Make sure destshdr, symshdr and symdata exists.
388
Mark Wielaard0ed4f982014-11-30 21:03:57 +01003892014-11-30 Mark Wielaard <mjw@redhat.com>
390
391 * readelf.c (handle_sysv_hash64): Fix overflow check.
392
Mark Wielaard98755612014-11-28 22:22:16 +01003932014-11-28 Mark Wielaard <mjw@redhat.com>
394
395 * readelf.c (handle_relocs_rel): Don't reuse destshdr to store
396 section header of a relocation against a STT_SECTION symbol. Use
397 a new local variable secshdr.
398 (handle_relocs_rela): Likewise.
399
Mark Wielaard13a9fa32014-11-27 00:12:32 +01004002014-11-26 Mark Wielaard <mjw@redhat.com>
401
402 * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
403 to ptrdiff_t for comparison.
404
Mark Wielaard020fc022014-11-24 21:54:42 +01004052014-11-24 Mark Wielaard <mjw@redhat.com>
406
407 * readelf.c (print_debug_line_section): Check line_range is not zero
408 before usage.
409
Mark Wielaard49296062014-11-23 18:26:16 +01004102014-11-23 Mark Wielaard <mjw@redhat.com>
411
412 * readelf.c (print_debug_aranges_section): Check length to catch
413 nexthdr overflow.
414
Mark Wielaard9644aaf2014-11-21 23:26:35 +01004152014-11-21 Mark Wielaard <mjw@redhat.com>
416
417 * readelf.c (print_attributes): Guard against empty section.
418 Document attribute format. Break when vendor name isn't terminated.
419 Add overflow check for subsection_len. Handle both gnu and non-gnu
420 attribute tags.
421
Mark Wielaard712c8fa2014-11-22 23:08:48 +01004222014-11-22 Mark Wielaard <mjw@redhat.com>
423
424 * elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
425 * findtextrel.c (process_file): Use elf_getphdrnum.
426 * readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
427 (print_phdr): Check phnum.
428 * size.c (show_segments): Use elf_getphdrnum.
429 * strip.c (handle_elf): Likewise.
430 * unstrip.c (copy_elf): Likewise.
431 (copy_elided_sections): Likewise.
432 (handle_file): Likewise.
433
Mark Wielaard86b0b132014-11-18 10:07:10 +01004342014-11-18 Mark Wielaard <mjw@redhat.com>
435
436 * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
437 length.
438
Mark Wielaard7df0da32014-11-17 23:01:34 +01004392014-11-17 Mark Wielaard <mjw@redhat.com>
440
Mark Wielaard3b3a1912014-11-17 23:35:28 +0100441 * readelf.c (handle_verneed): Check vna_next and vn_next exist.
442 (handle_verdef): Check vda_next and vd_next exist.
443 (handle_versym): Check vd_next, vna_next and vn_next exist.
444 Check vername and filename are not NULL before use.
445
4462014-11-17 Mark Wielaard <mjw@redhat.com>
447
Mark Wielaard5c1a45c2014-11-17 23:15:45 +0100448 * elfcmp.c (main): Check section names are NULL before use.
449 * objdump.c (section_match): Likewise.
450 * size.c (show_sysv): Likewise.
451
4522014-11-17 Mark Wielaard <mjw@redhat.com>
453
Mark Wielaard7df0da32014-11-17 23:01:34 +0100454 * readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
455 or 8 instead of just calling print_cfa_program.
456
Mark Wielaard2af7b492014-11-16 11:40:08 +01004572014-11-16 Mark Wielaard <mjw@redhat.com>
458
Mark Wielaard436275e2014-11-17 00:33:36 +0100459 * readelf (process_elf_file): Set phnum to zero if there aren't
460 actually any pheaders.
461 (print_phdr): Check there actually is a phdr.
462
4632014-11-16 Mark Wielaard <mjw@redhat.com>
464
Mark Wielaard2af7b492014-11-16 11:40:08 +0100465 * readelf.c (print_cfa_program): Check block len before calling
466 print_ops.
467
Mark Wielaardad87d272014-11-14 12:24:28 +01004682014-11-14 Mark Wielaard <mjw@redhat.com>
469
Mark Wielaardd1b11632014-11-14 21:42:47 +0100470 * readelf.c (print_debug_frame_section): Sanity Check CIE
471 unit_length and augmentationlen.
472
4732014-11-14 Mark Wielaard <mjw@redhat.com>
474
Mark Wielaardad87d272014-11-14 12:24:28 +0100475 * readelf.c (handle_versym): Check def == NULL before use.
476
Mark Wielaardd8b96822014-11-08 14:04:27 +01004772014-11-08 Mark Wielaard <mjw@redhat.com>
478
479 * readelf.c (handle_versym): Initialize vername and filename array
480 elements.
481
Mark Wielaard6b246e02014-11-07 12:54:02 +01004822014-11-07 Mark Wielaard <mjw@redhat.com>
483
484 * readelf.c (handle_sysv_hash): Sanity check section contents.
485 (handle_sysv_hash64): Likewise.
486 (handle_gnu_hash): Likewise.
487
Petr Machatafbf1a442014-09-14 00:47:42 +02004882014-09-14 Petr Machata <pmachata@redhat.com>
489
490 * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
491
Petr Machata1498f542014-09-12 19:03:33 +02004922014-09-12 Petr Machata <pmachata@redhat.com>
493
494 * readelf.c (encoded_ptr_size): In the switch statement, change
495 magic constants 3 and 4 to DW_EH_PE_* counterparts. Still accept
496 0. Print diagnostic for anything else.
497
Josh Stonef1ec7442014-08-25 14:40:35 -07004982014-08-25 Josh Stone <jistone@redhat.com>
499
500 * Makefile.am: Prevent premature @AR@ replacement in a sed expression.
501
Mark Wielaarda95c4ad2014-07-04 14:30:48 +02005022014-07-04 Menanteau Guy <menantea@linux.vnet.ibm.com>
503 Mark Wielaard <mjw@redhat.com>
504
505 * elflint (check_symtab): Add ".TOC." to the list of possibly
506 dangling symbols because of sourceware PR13621.
507
Mark Wielaardc1c1c062014-06-14 17:15:37 +02005082014-06-14 Mark Wielaard <mjw@redhat.com>
509
510 * elflint (check_symtab): Use ebl_func_addr_mask on st_value.
511
Mark Wielaard903f3342014-05-27 10:25:27 +02005122014-05-27 Mark Wielaard <mjw@redhat.com>
513
514 * readelf.c (print_debug): Skip section if name is NULL.
515
Mark Wielaard22497092014-05-26 21:28:05 +02005162014-05-26 Mark Wielaard <mjw@redhat.com>
517
Mark Wielaardeb4811d2014-05-26 22:54:38 +0200518 * readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
519 does, when sh_info == 0.
520
5212014-05-26 Mark Wielaard <mjw@redhat.com>
522
Mark Wielaardbd1a0d12014-05-26 22:35:30 +0200523 * unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
524 section when sh_size of the original and undo .bss section are equal.
525
5262014-05-26 Mark Wielaard <mjw@redhat.com>
527
Mark Wielaard22497092014-05-26 21:28:05 +0200528 * unstrip.c (options): Add --force, -F.
529 (struct arg_info): Add bool force.
530 (parse_opt): Handle 'F', set force.
531 (handle_explicit_files): Add force argument, add warn function,
532 separate check ehdr field checks, use warn.
533 (handle_dwfl_module): Add force argument, pass on to
534 handle_explicit_files.
535 (handle_output_dir_module): Add force argument, pass on to
536 handle_dwfl_module.
537 (handle_implicit_modules): Pass info->force to handle_dwfl_module and
538 handle_output_dir_module.
539 (main): Pass info.force to handle_explicit_files.
540
Mark Wielaard028d0ab2014-05-19 16:52:56 +02005412014-05-19 Mark Wielaard <mjw@redhat.com>
542
543 * elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
544
Mark Wielaarddf85bf92014-05-01 14:48:27 +02005452014-05-01 Mark Wielaard <mjw@redhat.com>
546
547 * readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
548 if looking for alternate debug file.
549
Mark Wielaard93802972014-04-11 23:52:47 +02005502014-04-11 Mark Wielaard <mjw@redhat.com>
551
552 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
553
Mark Wielaard7c757b32014-04-22 22:23:18 +02005542014-04-22 Mark Wielaard <mjw@redhat.com>
555
Mark Wielaard7c680a22014-04-22 23:26:34 +0200556 * readelf.c (handle_core_item): Make sure variable length array
557 contains at least enough space for terminating zero char.
558
5592014-04-22 Mark Wielaard <mjw@redhat.com>
560
Mark Wielaard7c757b32014-04-22 22:23:18 +0200561 * readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
562 left shift.
563
Mark Wielaard32324792014-04-13 17:39:57 +02005642014-03-13 Mark Wielaard <mjw@redhat.com>
565
566 * Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
567 LDADD lines.
568 * strings.c (process_chunk): Remove _MUDFLAP condition.
569
Mark Wielaardf7cdc742014-04-09 22:38:07 +02005702014-04-09 Mark Wielaard <mjw@redhat.com>
571
572 * readelf.c (print_debug_aranges_section): Don't get the raw section
573 data, use the possibly decompressed .[z]debug sectiondata.
574 (print_debug_ranges_section): Likewise.
575 (print_debug_frame_section): Likewise.
576 (print_debug_line_section): Likewise.
577 (print_debug_loc_section): Likewise.
578 (print_debug_macinfo_section): Likewise.
579 (print_debug_macro_section): Likewise.
580
Mark Wielaard110c2732014-04-10 15:02:53 +02005812014-04-10 Mark Wielaard <mjw@redhat.com>
582
583 * readelf.c (buf_read_ulong): Pass actual long size to convert.
584
Mark Wielaardb9207522014-03-05 16:17:54 +01005852014-03-05 Mark Wielaard <mjw@redhat.com>
586
587 * readelf.c (attr_callback): Print DW_FORM_sdata values as signed
588 numbers.
589
Mark Wielaardcb7b2d62014-02-24 17:44:42 +01005902014-02-24 Mark Wielaard <mjw@redhat.com>
591
592 * readelf (print_phdr): Check there is a SHT_PROGBITS section at the
593 offset given by p_offsets for a PT_INTERP segment before trying to
594 display the interpreter string.
595
Mark Wielaard43c9c2d2014-02-07 14:23:24 +01005962014-02-07 Mark Wielaard <mjw@redhat.com>
597
598 * readelf.c (print_phdr): Check phdr->p_filesz and make sure
599 interpreter string is zero terminated before calling printf.
600
Mark Wielaardf48eb6b2014-01-23 00:56:41 +01006012014-01-22 Mark Wielaard <mjw@redhat.com>
602
603 * Makefile.am (nm_no_Wformat): Removed.
604 (size_no_Wformat): Likewise.
605 (strings_no_Wformat): Likewise.
606 (addr2line_no_Wformat): Likewise.
607 * size.c (show_sysv): Use fmtstr directly as literal in printf.
608 (show_sysv_one_line): Likewise.
609 * strings.c (locfmt): Removed.
610 (radix): New static enum.
611 (parse_opt): Set radix, not locfmt.
612 (process_chunk_mb): Use fmtstr directly as literal in printf based
613 on radix.
614 (process_chunk): Likewise.
615 * nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
616 (show_symbols_bsd): Likewise.
617 (show_symbols_posix): Likewise.
618
Mark Wielaard13968d92014-01-21 16:13:49 +01006192014-01-21 Mark Wielaard <mjw@redhat.com>
620
621 * stack.c (show_inlines): New static boolean.
622 (print_frame): New function split out from...
623 (print_frames): ..here. If show_inlines is true and we found a
624 DIE for the frame address, call print_inline_frames otherwise
625 call print_frame. Keep track of and track frame_nr.
626 (print_inline_frames): New function.
627 (parse_opt): Handle '-i'.
628 (main): Add 'i' to options.
629
Mark Wielaard8520f702014-01-27 16:05:54 +01006302014-01-27 Mark Wielaard <mjw@redhat.com>
631
632 * stack.c (maxframes): Initialize to 256.
633 (main): Document new default in options. Document magic number
634 used in frames.allocated initialization.
635
Mark Wielaard247f8582014-01-20 13:49:48 +01006362014-01-20 Mark Wielaard <mjw@redhat.com>
637
Mark Wielaard531a30a2014-01-20 23:09:26 +0100638 * stack.c (show_debugname): New static boolean.
639 (die_name): New function.
640 (print_frames): If show_debugname is true set symname to the
641 first function-like DIE with a name in scope for the address in
642 the debuginfo.
643 (parse_opt): Handle '-d'.
644 (main): Add 'd' to options.
645
6462014-01-20 Mark Wielaard <mjw@redhat.com>
647
Mark Wielaard247f8582014-01-20 13:49:48 +0100648 * addr2line.c (handle_address): Initialize scopes to NULL.
649
Roland McGrath7d5b3012014-01-17 17:11:39 +01006502014-01-17 Roland McGrath <roland@redhat.com>
651
Roland McGrath58d36192014-01-17 17:12:46 +0100652 * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
653 st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
654 Don't use assert on input values, instead bail with "illformed" error.
655
6562014-01-17 Roland McGrath <roland@redhat.com>
657
Roland McGrath7d5b3012014-01-17 17:11:39 +0100658 * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
659 (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
660 (handle_scngrp): Check for bogus sh_info.
661
Jakub Jelinek71c15342014-01-17 17:07:27 +01006622014-01-17 Jakub Jelinek <jakub@redhat.com>
663
664 * elflint.c (section_name): Return "<invalid>" instead of
665 crashing on invalid section name.
666 (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
667 check_symtab_shndx, check_hash, check_versym): Robustify.
668 (check_hash): Don't check entries beyond end of section.
669 (check_note): Don't crash if gelf_rawchunk fails.
670
Petr Machataced66872014-01-17 17:00:12 +01006712014-01-17 Petr Machata <pmachata@redhat.com>
672
673 * readelf.c (handle_dynamic, handle_relocs_rel)
674 (handle_relocs_rela, handle_versym, print_liblist):
675 Use gelf_fsize instead of relying on shdr->sh_entsize.
676
Mark Wielaard04781c32014-01-14 22:13:43 +01006772014-01-14 Mark Wielaard <mjw@redhat.com>
678
679 * readelf.c (print_debug_macro_section): Clear vendor array before
680 use.
681
Jan Kratochvil7c6e7852014-01-15 21:16:57 +01006822014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
683
684 Fix corruption of non-C++ symbols by the demangler.
685 * nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
686 (show_symbols): Check for _Z.
687 * stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
688
Mark Wielaard6034e2f2014-01-02 22:31:07 +01006892014-01-02 Mark Wielaard <mjw@redhat.com>
690
Mark Wielaardda91c5b2014-01-03 00:06:31 +0100691 * stack.c (show_raw): Declare unconditionally.
692 (parse_opt): Handle '-r' unconditionally.
693 (main): Show "raw" option even without USE_DEMANGLE.
694
6952014-01-02 Mark Wielaard <mjw@redhat.com>
696
Mark Wielaard36490c92014-01-02 23:59:41 +0100697 * stack.c (print_frames): Print 0x before build-id hex-offset.
698
6992014-01-02 Mark Wielaard <mjw@redhat.com>
700
Mark Wielaard6034e2f2014-01-02 22:31:07 +0100701 * stack.c (maxframes): Increase to 2048.
702 (struct frames): Add allocated field.
703 (frame_callback): If frames used is frames allocated, realloc.
704 (print_frames): Show an error if maxframes has been reached.
705 (parse_opt): Allow -n 0 for unlimited frames.
706 (main): Document -n 0 and new default 2048 frames. Allocate initial
707 number of frames with malloc.
708
Mark Wielaard19108012013-12-30 22:00:57 +01007092013-12-30 Mark Wielaard <mjw@redhat.com>
710
711 * stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
712 or dwfl_core_file_attach and check for errors.
713
Mark Wielaarda6141d22013-12-28 23:25:54 +01007142013-12-28 Mark Wielaard <mjw@redhat.com>
715
716 * stack.c (print_frames): Remove address width code and use...
717 (get_addr_width): ...this new function.
718 (show_modules): New static boolean.
719 (module_callback): New static function.
720 (parse_opt): Handle '-l'.
721 (main): Add 'l' to options. If show_modules then use dwfl_getmodules
722 with module_callback to show all detected modules and possible
723 build_id, elf and dwarf files.
724
Mark Wielaard1f7763e2013-12-27 10:49:51 +01007252013-12-27 Mark Wielaard <mjw@redhat.com>
726
727 * stack.c (frames_shown): New static boolean.
728 (EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
729 (frame_callback): Return -1 on error. Don't print error.
730 (print_frames): Add arguments, tid, dwflerr and what. Print tid.
731 If there was an error report it with address and module if possible.
732 Record whether any frames were actually printed.
733 (thread_callback): Collect tid and err, pass it to print_frames.
734 (parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
735 if dwfl_linux_proc_report returned it. Check whether we are properly
736 attached with dwfl_pid.
737 (main): Document exit status. Don't report DWARF_CB_ABORT from
738 callbacks as error. Pass real errors to print_frames. Return
739 EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
740 were any non-fatal errors.
741
Mark Wielaard99fc3f72013-12-23 00:47:06 +01007422013-12-23 Mark Wielaard <mjw@redhat.com>
743
Mark Wielaardfdb64e62013-12-23 21:19:05 +0100744 * Makefile.am (stack_LDADD): Add demanglelib.
745 * stack.c (show_quiet): New static boolean, default false.
746 (show_raw): Likewise.
747 (demangle_buffer_len): New static size_t.
748 (demangle_buffer): New static char *.
749 (print_frames): Don't resolve pc name if show_quiet. Demangle name
750 unless show_raw.
751 (parse_opt): Handle '-q' and '-r'.
752 (main): Add 'q' and 'r' to options. Free demangle_buffer.
753
7542013-12-23 Mark Wielaard <mjw@redhat.com>
755
Mark Wielaardfe9b95d2013-12-23 10:46:54 +0100756 * stack.c (OPT_DEBUGINFO): New define.
757 (OPT_COREFILE): Likewise.
758 (pid): New static.
759 (core_fd): Likewise.
760 (core): Likewise.
761 (exec): Likewise.
762 (debuginfo_path): Likewise.
763 (parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
764 Do argument sanity checking. Setup Dwfl.
765 (main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
766 Remove argp_child children, simplify argp doc, remove custom
767 usage message and construction of dwfl with dwfl_standard_argp.
768 Use pid directly as tid. close core and core_fd if opened. Print
769 pid of process or core.
770
7712013-12-23 Mark Wielaard <mjw@redhat.com>
772
Mark Wielaard99fc3f72013-12-23 00:47:06 +0100773 * stack.c (show_build_id): New static boolean.
774 (print_frames): Print module build-id, load address and pc offset
775 if show_build_id is true.
776 (parse_opt): Handle '-b'.
777 (main): Add -b to options.
778
Mark Wielaard9fec14a2013-12-22 23:48:26 +01007792013-12-22 Mark Wielaard <mjw@redhat.com>
780
781 * stack.c (maxframes): New static unsigned. Initialize to 64.
782 (struct frame): New struct.
783 (struct frames): Likewise.
784 (dwfl): New static Dwfl pointer.
785 (frame_callback): Use arg as struct frames and fill it next frame.
786 Return DWARF_CB_ABORT when maxframes has been reached. Move
787 printing of frame to...
788 (print_frames): ...here. New function.
789 (thread_callback): Use arg as struct frames and set frames to zero.
790 Call print_frames.
791 (parse_opt): Handle '-n'.
792 (main): Add -n to options. Allocate frames using maxframes. Pass
793 frames to frame_callback and thread_callback.
794
Mark Wielaarde962ec32013-12-20 10:09:12 +01007952013-12-20 Mark Wielaard <mjw@redhat.com>
796
797 * stack.c (show_one_tid): New static boolean.
798 (parse_opt): Handle '-1'.
799 (main): Add -1 to options. Call dwfl_getthread_frames when
800 show_one_tid is true.
801
Mark Wielaard159ac522013-12-18 11:05:54 +01008022013-12-18 Mark Wielaard <mjw@redhat.com>
803
804 * addr2line.c (options): Add symbol-sections, 'x'.
805 (show_symbol_sections): New static bool.
806 (parse_opt): Handle 'x'.
807 (print_addrsym): Use dwfl_module_addrinfo value.r
808 Also show section of address with show_symbol_sections.
809 (find_symbol): Use dwfl_module_getsym_info and set value.
810 (handle_address): Request value and use it instead of sym.st_value.
811 * readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
812 name and offset.
813
Masatake YAMATOc8c610b2013-12-17 12:03:29 +09008142013-12-17 Masatake YAMATO <yamato@redhat.com>
815 Mark Wielaard <mjw@redhat.com>
816
817 * stack.c (show_activation, show_module, show_source): New variables.
818 (parse_opt): Set show_activation if -a option is given.
819 Set show_module if -m option is given. Set show_source if -s option
820 is given. Set all show booleans when -v option is given.
821 (main): Added `-a', `-m', `-s', and `-v' to the help message.
822 (frame_callback): Print module and source file information.
823
Petr Machata98c8a732013-11-26 03:10:31 +01008242013-11-25 Petr Machata <pmachata@redhat.com>
825
826 * elflint.c (valid_e_machine): Add EM_AARCH64.
827
Petr Machataa47a0962013-11-14 01:07:22 +01008282013-11-14 Petr Machata <pmachata@redhat.com>
829
830 * readelf.c (handle_core_item) <'h'>: New branch for handling
831 fields that shouldn't be displayed.
832
Mark Wielaard875cad82013-11-10 22:17:05 +01008332013-11-10 Mark Wielaard <mjw@redhat.com>
834
835 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
836 ARGP_PROGRAM_BUG_ADDRESS_DEF.
837 (print_version): New function.
838
Mark Wielaard03d76f42013-11-09 16:45:22 +01008392013-11-09 Mark Wielaard <mjw@redhat.com>
840
841 * arlib.c (arlib_init): Call snprintf before using the result
842 with memcpy.
843 (arlib_finalize): Likewise.
844 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
845
Jan Kratochvil0b867462013-05-30 14:37:38 +02008462013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
847
848 * Makefile.am (bin_PROGRAMS): Add stack.
849 (stack_LDADD): New.
850 * stack.c: New file.
851
Mark Wielaardbe860842013-11-05 13:37:33 +01008522013-11-05 Mark Wielaard <mjw@redhat.com>
853
854 * readelf.c (print_debug_ranges_section): Cast address to size_t
855 before comparison.
856 (print_debug_loc_section): Likewise.
857
Mark Wielaard4f7673f2013-10-18 10:37:53 +02008582013-10-18 Mark Wielaard <mjw@redhat.com>
859
860 * ar.c (main): Correct operation check when instance_specifed is set.
861
Petr Machataab224102013-09-26 00:39:34 +02008622013-09-26 Petr Machata <pmachata@redhat.com>
863
Petr Machata0c9ae0c2013-09-26 21:02:22 +0200864 * readelf.c (handle_file_note): New function.
865 (handle_notes_data): Call it to handle NT_FILE notes.
866
8672013-09-26 Petr Machata <pmachata@redhat.com>
868
Petr Machataab224102013-09-26 00:39:34 +0200869 * readelf.c (handle_siginfo_note): New function.
870 (handle_notes_data): Call it to handle NT_SIGINFO notes.
871 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
872
Mark Wielaard4b9e6392013-08-13 11:40:21 +02008732013-08-13 Mark Wielaard <mjw@redhat.com>
874
875 * addr2line.c (options): Add "inlines", 'i'.
876 (show_inlines): New bool.
877 (parse_opt): Handle 'i'.
878 (print_diesym): New static function.
879 (print_src): New function taking code from...
880 (handle_address): here. Call print_src. Print inlines.
881
Mark Wielaardd0f85012013-08-12 14:21:31 +02008822013-08-12 Mark Wielaard <mjw@redhat.com>
883
884 * addr2line.c (main): If there is a newline char at end of buf,
885 then remove it.
886
Mark Wielaard35230222013-07-05 16:44:47 +02008872013-07-05 Mark Wielaard <mjw@redhat.com>
888
889 * readelf.c (print_ops): Take CU as argument, use it to print
890 parameter_ref DIE offset.
891 (struct listptr): Replace base field with cu.
892 (listptr_base): New function.
893 (compare_listptr): Use listptr_base.
894 (notice_listptr): Take CU as argument.
895 (skip_listptr_hole): Likewise.
896 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
897 (print_cfa_program): Pass NULL as CU to print_ops.
898 (struct attrcb_args): Replace cu_base field with cu.
899 (attr_callback): Pass cu not cu_base to notice_listptr.
900 (print_debug_units): Don't calculate base, just set cu.
901 (print_debug_loc_section): Pass cu to skip_listptr_hole and
902 print_ops.
903
Mark Wielaard63d8bfd2013-05-06 15:48:56 +02009042013-05-06 Mark Wielaard <mjw@redhat.com>
905
906 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
907 argument as DIE offset.
908
Mark Wielaardcdaaf212013-04-25 16:50:11 -04009092013-04-24 Mark Wielaard <mjw@redhat.com>
910
911 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
912
Mark Wielaarda8c7f052013-03-25 21:11:53 +01009132013-03-25 Mark Wielaard <mjw@redhat.com>
914
Mark Wielaard1a094202013-03-25 14:48:06 +0100915 * readelf.c (argp_options): Add decodedline.
916 (decodedline): New boolean initialized to false.
917 (parse_opt): Set decodedline when arg is decodedline.
918 (print_decoded_line_section): New function.
919 (print_debug_line_section): Call print_decoded_line_section when
920 decodedline is true.
921
9222013-03-25 Mark Wielaard <mjw@redhat.com>
923
Mark Wielaardb79788c2013-03-25 11:45:22 +0100924 * readelf.c (argp_option): Add decodedaranges.
925 (decodedaranges): New boolean initialized to false.
926 (parse_opt): Set decodedaranges when arg is decodedaranges.
927 (print_debug_aranges_section): Reimplemented and original
928 implementation renamed to...
929 (print_decoded_aranges_section): this.
930
9312013-03-25 Mark Wielaard <mjw@redhat.com>
932
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100933 * readelf.c (attrcb_args): Add Dwarf_Die.
934 (attr_callback): When highpc is in constant form also print as
935 address.
936 (print_debug_units): Set args.die.
937
Mark Wielaard10cd97e2013-03-19 11:43:49 +01009382013-03-19 Mark Wielaard <mjw@redhat.com>
939
940 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
941
Mark Wielaarda73fecc2013-03-18 13:54:50 +01009422013-03-18 Mark Wielaard <mjw@redhat.com>
943
944 * readelf.c (print_gdb_index_section): Accept version 8.
945
Mark Wielaarda58951b2013-03-01 11:51:58 +01009462013-03-01 Mark Wielaard <mjw@redhat.com>
947
948 * findtextrel.c (process_file): Release ELF and close file when not
949 text relocations are found.
950 * strip.c (handle_elf): Track memory used for .debuglink section data
951 and free when done.
952
Mark Wielaardb94ccea2013-02-24 22:58:49 +01009532013-02-24 Mark Wielaard <mjw@redhat.com>
954
955 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
956 allowed to have out of section values because of GNU ld bugs.
957
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01009582013-02-06 Mark Wielaard <mjw@redhat.com>
959
960 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
961 list of symbols allowed to have out of section values because of
962 GNU ld bugs in either .symtab or .dynsym, but only when they are
963 zero sized.
964
Mark Wielaard10186a12013-01-24 11:29:21 +01009652013-01-24 Mark Wielaard <mjw@redhat.com>
966
967 * readelf.c (argp_option): Add unresolved-address-offsets, U.
968 (print_unresolved_addresses): New static.
969 (parse_opt): Handle 'U', set print_unprocessed_values.
970 (format_dwarf_addr): Take and handle new raw argument.
971 (print_ops): Call format_dwarf_addr with raw offset values.
972 (print_debug_ranges_section): Likewise.
973 (print_debug_frame_section): Likewise.
974 (attr_callback): Likewise.
975 (print_debug_line_section): Likewise.
976 (print_debug_loc_section): Likewise.
977 (print_gdb_index_section): Likewise.
978
Mark Wielaard24257102013-01-18 22:19:08 +01009792013-01-18 Mark Wielaard <mjw@redhat.com>
980
981 * readelf.c (struct listptr): Add base Dwarf_Addr field.
982 (compare_listptr): Warn for same offset with different base.
983 (notice_listptr): Take base argument and set it.
984 (skip_listptr_hole): Likewise.
985 (struct attrcb_args): Removed unused cu_offset field.
986 Add cu_base Dwarf_Addr field.
987 (attr_callback): Call notice_listptr with cbargs->cu_base.
988 (print_debug_units): Set args.cu_base.
989 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
990 (print_debug_loc_section): Likewise.
991
Jan Kratochvilc44cce02012-10-10 19:32:05 +02009922013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
993
994 * readelf.c (handle_core_items): Limit special repeated items handling
995 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
996
Mark Wielaard6d258ce2013-01-16 15:19:20 +01009972012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
998
999 * readelf.c (ELF_INPUT_SECTION): New argp key value.
1000 (argp_option): Add elf-section.
1001 (elf_input_section): New static.
1002 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
1003 (open_input_section): New function.
1004 (process_file): Call open_input_section if elf_input_section set.
1005
David Abdurachmanov1a4d0662013-01-13 16:44:21 +010010062013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
1007
1008 ar.c (do_oper_delete): Fix num passed to memset.
1009
Mark Wielaard55324042012-12-21 10:02:11 +010010102012-12-21 Mark Wielaard <mjw@redhat.com>
1011
Mark Wielaard00f758c2012-12-21 22:11:44 +01001012 * readelf.c (print_debug_frame_section): Adjust FDE start address
1013 if pcrel before feeding it to format_dwarf_addr.
1014
10152012-12-21 Mark Wielaard <mjw@redhat.com>
1016
1017 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +01001018
Roland McGrath57bd66c2012-12-11 09:42:07 -080010192012-12-11 Roland McGrath <roland@hack.frob.com>
1020
1021 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
1022 sh_name case.
1023 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
1024
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +010010252012-10-16 Mark Wielaard <mjw@redhat.com>
1026
1027 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
1028 calculated beginning after the operand and 2-byte constant.
1029
Jan Kratochvil4bdbb672012-10-10 22:27:58 +020010302012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1031
1032 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
1033 (WRAP_COLUMN): ... here.
1034 (print_core_item): Remove parameter format_max. Update function
1035 comment. Replace FORMAT_MAX by the real output width.
1036 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
1037 calls of print_core_item, remove variable maxfmt, change
1038 ITEM_WRAP_COLUMN to WRAP_COLUMN.
1039 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
1040 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
1041
Roland McGrath82ed98a2012-10-11 14:53:18 -070010422012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1043
1044 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
1045 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
1046
Mark Wielaarde89c5002012-08-27 14:30:05 +020010472012-08-27 Mark Wielaard <mjw@redhat.com>
1048
Mark Wielaard3e440062012-08-27 15:21:58 +02001049 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
1050
10512012-08-27 Mark Wielaard <mjw@redhat.com>
1052
Mark Wielaarde89c5002012-08-27 14:30:05 +02001053 * readelf.c (register_info): Handle loc == NULL.
1054
Jeff Kenton257dcf42012-08-22 09:00:03 -040010552012-08-22 Jeff Kenton <jkenton@tilera.com>
1056
1057 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
1058
Mark Wielaardf31c4412012-08-17 00:35:03 +020010592012-08-16 Mark Wielaard <mjw@redhat.com>
1060
1061 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
1062 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
1063 appropriate.
1064 (dwarf_attr_name): Likewise.
1065 (dwarf_form_name): Likewise.
1066 (dwarf_lang_name): Likewise.
1067 (dwarf_inline_name): Likewise.
1068 (dwarf_encoding_name): Likewise.
1069 (dwarf_access_name): Likewise.
1070 (dwarf_visibility_name): Likewise.
1071 (dwarf_virtuality_name): Likewise.
1072 (dwarf_identifier_case_name): Likewise.
1073 (dwarf_calling_convention_name): Likewise.
1074 (dwarf_ordering_name): Likewise.
1075 (dwarf_discr_list_name): Likewise.
1076 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
1077 (attr_callback): Call new dwarf_foobar_name instead of old
1078 dwarf_foobar_string functions.
1079 (dwarf_tag_string): New function using known-dwarf.h macros.
1080 (dwarf_attr_string): Likewise.
1081 (dwarf_form_string): Likewise.
1082 (dwarf_lang_string): Likewise.
1083 (dwarf_inline_string): Likewise.
1084 (dwarf_encoding_string): Likewise.
1085 (dwarf_access_string): Likewise.
1086 (dwarf_visibility_string): Likewise.
1087 (dwarf_virtuality_string): Likewise.
1088 (dwarf_identifier_case_string): Likewise.
1089 (dwarf_calling_convention_string): Likewise.
1090 (dwarf_ordering_string): Likewise.
1091 (dwarf_discr_list_string): Likewise.
1092 (dwarf_locexpr_opcode_string): Likewise.
1093
Mark Wielaard775375e2012-06-22 12:02:45 +020010942012-06-27 Mark Wielaard <mjw@redhat.com>
1095
1096 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
1097 DW_FORM_GNU_strp_alt.
1098 (attr_callback): Likewise.
1099
Petr Machatafe198bc2012-07-30 19:48:28 +020011002012-07-30 Petr Machata <pmachata@redhat.com>
1101
1102 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
1103 corresponding printf) so that those that are referenced by only
1104 one of the formatting strings are at the end.
1105
Mark Wielaard629b2562012-07-29 14:05:20 +020011062012-07-29 Mark Wielaard <mjw@redhat.com>
1107
1108 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
1109 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
1110
Mark Wielaard515fba92012-07-20 00:09:56 +020011112012-07-19 Mark Wielaard <mjw@redhat.com>
1112
1113 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
1114
Mark Wielaarde9b23882012-06-29 22:30:15 +020011152012-07-11 Mark Wielaard <mjw@redhat.com>
1116
1117 * readelf.c (options): Add macro to help of debug-dump.
1118 (section_e): Add section_macro.
1119 (section_all): Add section_macro.
1120 (parse_opt): Handle macro.
1121 (print_debug_macro_section): New function.
1122 (print_debug): Add NEW_SECTION (macro).
1123
Mark Wielaard84a1e0b2012-06-29 23:38:09 +020011242012-07-10 Mark Wielaard <mjw@redhat.com>
1125
1126 * readelf.c (print_gdb_index_section): Add version 7 support.
1127 Keep track of cu_nr. Print kind and static/global flag for each
1128 symbol. When a symbol is in the TU list add 'T'.
1129
Mark Wielaarda0172d72012-06-25 17:18:53 +020011302012-06-26 Mark Wielaard <mjw@redhat.com>
1131
1132 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
1133
Mark Wielaard50e2d392012-06-22 16:44:54 +020011342012-06-22 Mark Wielaard <mjw@redhat.com>
1135
1136 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
1137 for gcc 4.7 -Wformat.
1138
Mark Wielaard36aa5982012-05-09 11:27:44 +020011392012-05-09 Roland McGrath <roland@hack.frob.com>
1140
1141 * elflint (check_sections): Allow zero sized sections at (filesz) end
1142 of segment. And make check overflow-proofed.
1143
Mark Wielaard716486d2012-04-24 11:56:42 +020011442012-04-24 Mark Wielaard <mjw@redhat.com>
1145
1146 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
1147 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
1148
Roland McGrath738c1832012-03-28 15:01:49 -070011492012-03-28 Roland McGrath <roland@hack.frob.com>
1150
1151 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
1152
Mark Wielaard61651c12012-03-28 11:20:36 +020011532012-03-28 Mark Wielaard <mjw@redhat.com>
1154
1155 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
1156 section data.
1157 (print_debug_str_section): Likewise.
1158
Mark Wielaard30bb7142012-03-21 16:05:31 +010011592012-03-21 Mark Wielaard <mjw@redhat.com>
1160
1161 * readelf.c (print_gdb_index_section): Accept version 6.
1162
Mark Wielaardcb643d62012-01-31 19:22:03 +010011632012-01-31 Mark Wielaard <mjw@redhat.com>
1164
1165 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
1166
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -050011672012-01-21 Ulrich Drepper <drepper@gmail.com>
1168
Ulrich Drepper3a64a302012-01-21 18:19:24 -05001169 * addr2line.c: Update copyright year.
1170 * ar.c: Likewise.
1171 * elfcmp.c: Likewise.
1172 * elflint.c: Likewise.
1173 * findtextrel.c: Likewise.
1174 * ld.c: Likewise.
1175 * nm.c: Likewise.
1176 * objdump.c: Likewise.
1177 * ranlib.c: Likewise.
1178 * readelf.c: Likewise.
1179 * size.c: Likewise.
1180 * strings.c: Likewise.
1181 * strip.c: Likewise.
1182 * unstrip.c: Likewise.
1183
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05001184 * nm.c (argp_children): Define.
1185 (argp): Hook up argp_children.
1186 (handle_ar): Optimize puts call.
1187 (show_symbols_bsd): Use positional parameters to also print color
1188 codes. Don't print STT_FILE symbols.
1189 * objdump.c (options): Improve help text.
1190 (argp_children): Define.
1191 (argp): Hook up argp_children.
1192 (disasm_info): Add elements for color codes.
1193 (disasm_output): Print color codes as well.
1194 (show_disasm): Set up disasm_info data for callback.
1195
Roland McGrath85924782012-01-20 11:40:59 -080011962012-01-20 Roland McGrath <roland@hack.frob.com>
1197
Roland McGrath3284b792012-01-20 12:51:46 -08001198 * arlib-argp.c (arlib_deterministic_output): Initialize from
1199 configured value.
1200 (help_filter): New function.
1201 (argp): Use it.
1202
Roland McGrath9bffd362012-01-20 12:04:19 -08001203 * ar.c (main): Handle oper_none as usage error.
1204
Roland McGrath6e063d92012-01-20 11:43:36 -08001205 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
1206
Roland McGrath85924782012-01-20 11:40:59 -08001207 * ranlib.c (argp): Use arlib_argp_children.
1208
1209 * arlib.c (arlib_init): Obey arlib_deterministic_output.
1210
1211 * arlib-argp.c: New file.
1212 * Makefile.am (libar_a_SOURCES): Add it.
1213 * arlib.h (arlib_deterministic_output, arlib_argp_children):
1214 Declare new variables.
1215 * ar.c (deterministic_output): Variable removed.
1216 (do_oper_insert): Use arlib_deterministic_output instead.
1217 (options, parse_opt): Don't handle -D here. Add group numbers.
1218 (argp): Use arlib_argp_children.
1219
Roland McGratha065c4b2011-12-20 10:55:01 -080012202011-12-20 Roland McGrath <roland@hack.frob.com>
1221
1222 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
1223 Reported by Karel Klic <kklic@redhat.com>.
1224
Roland McGrath4fa988e2011-11-05 20:58:14 -070012252011-11-05 Roland McGrath <roland@hack.frob.com>
1226
Roland McGrathe5ba2a12011-11-05 21:08:07 -07001227 * ar.c (deterministic_output): New flag variable.
1228 (options, parse_opt): Grok -D to set it.
1229 (do_oper_insert): When set, use zero from mtime, uid, and gid.
1230
Roland McGrath4fa988e2011-11-05 20:58:14 -07001231 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
1232
Marek Polacek8d1e2972011-10-04 05:11:42 -040012332011-10-04 Marek Polacek <mpolacek@redhat.com>
1234
1235 * readelf.c (register_info): Assume the right size of an array.
1236
Ulrich Drepper2356ba02011-10-03 07:23:07 -040012372011-10-03 Ulrich Drepper <drepper@gmail.com>
1238
1239 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
1240 but don't show it in help anymore.
1241 (mark_special): Renamed from mark_weak.
1242 (parse_opt): Adjust.
1243 (class_type_char): Take additional parameters for ELF file and ELF
1244 header. Treat TLS symbols like objects.
1245 In case of D symbols, show u for unique symbols, R for symbols in
1246 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001247 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001248 header. Adjust for class_type_char change. Show TLS symbols with
1249 @ after them in case --mark-special is selected.
1250 (show_symbols_posix): Likewise.
1251 (show_symbols): Adjust calls to show_symbols_bsd and
1252 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -04001253 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001254 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001255
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -040012562011-10-02 Ulrich Drepper <drepper@gmail.com>
1257
1258 * Makefile.am (demanglelib): Define.
1259 (nm_LDADD): Add demanglelib.
1260 * nm.c (options): Add -C option.
1261 (demangle): Define as global variable.
1262 (parse_opt): Recognize -C.
1263 (show_symbols_sysv): Handle demangling.
1264 (show_symbols_bad): Likewise.
1265 (show_symbols_posix): Likewise.
1266 (show_symbols): Likewise.
1267
Roland McGrathb0a0e0d2011-07-09 03:20:16 -070012682011-07-09 Roland McGrath <roland@hack.frob.com>
1269
Roland McGrathbd754192011-07-09 05:33:37 -07001270 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
1271
1272 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001273
Mark Wielaard02a958b2011-05-30 17:23:57 +020012742011-05-30 Mark Wielaard <mjw@redhat.com>
1275
1276 * strip.c (relocate): Make offset check overflow-proof.
1277
Mark Wielaard1662bc32011-05-16 11:33:11 +020012782011-05-23 Mark Wielaard <mjw@redhat.com>
1279
Mark Wielaard63868c22011-05-24 16:09:31 +02001280 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001281 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +02001282 Relocate against any debug section symbol, not just STT_SECTION
1283 symbols. For SHT_REL relocations, fetch addend from offset and
1284 add it to symbol value if not zero.
1285
12862011-05-23 Mark Wielaard <mjw@redhat.com>
1287
Mark Wielaard1662bc32011-05-16 11:33:11 +02001288 * strip.c (OPT_RELOC_DEBUG): New option.
1289 (argp_option): Add new --reloc-debug-sections option.
1290 (main): Check new option.
1291 (parse_opt): Likewise.
1292 (handle_elf): Remove any relocations between debug sections
1293 in ET_REL for the debug file when requested.
1294
Mark Wielaard7a125b92011-05-17 12:20:01 +020012952011-05-18 Mark Wielaard <mjw@redhat.com>
1296
1297 * strip.c (handle_elf): Make sure all sections of a removed group
1298 section are removed too. Don't discard SHT_GROUP sections, copy
1299 section table before it gets modified. Section group signature
1300 symbols don't have to be retained.
1301
Jakub Jelinek03124242011-05-17 17:00:14 +020013022011-05-16 Jakub Jelinek <jakub@redhat.com>
1303
1304 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
1305 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
1306 and DW_OP_GNU_reinterpret.
1307
Mark Wielaard69a9b112011-05-17 15:34:02 +020013082011-05-17 Mark Wielaard <mjw@redhat.com>
1309
1310 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
1311 DW_TAG_GNU_call_site_parameter return strings.
1312
Marek Polacekc8920de2011-05-12 12:08:21 +020013132011-05-11 Marek Polacek <mpolacek@redhat.com>
1314
1315 * nm.c (show_symbols_sysv): Remove unused if/else, remove
1316 unused `prefix' and `fname' parameters.
1317
Marek Polacek82f77d72011-05-07 19:26:20 +020013182011-05-07 Marek Polacek <mpolacek@redhat.com>
1319
1320 * unstrip.c (compare_sections_nonrel): Mark this function as static.
1321
Mark Wielaardbb9d1b42011-04-24 17:53:38 +020013222011-04-26 Mark Wielaard <mjw@redhat.com>
1323
1324 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
1325 with note name.
1326
Mark Wielaard093a1d32011-04-14 23:47:26 +020013272011-04-14 Mark Wielaard <mjw@redhat.com>
1328
1329 * readelf.c (options): Add gdb_index.
1330 (section_e): Define section_gdb_index.
1331 (parse_opt): Recognize gdb_index debug-dump argument.
1332 (print_gdb_index_section): New function.
1333 (print_debug): Add gdb_index to debug_sections.
1334
Petr Machata1879e5b2011-03-25 15:17:04 +010013352011-03-24 Petr Machata <pmachata@redhat.com>
1336
1337 * readelf.c (print_debug_line_section): Emit initial space for all
1338 opcode lines. Print offset in front of each opcode.
1339
Marek Polacek44de92a2011-03-22 01:07:20 +010013402011-03-22 Marek Polacek <mpolacek@redhat.com>
1341
1342 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
1343
Mark Wielaarde3368c52011-03-22 23:03:31 +010013442011-03-22 Mark Wielaard <mjw@redhat.com>
1345
1346 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
1347 and DW_TAG_GNU_call_site_parameter.
1348 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
1349 DW_AT_GNU_call_site_data_value,
1350 DW_AT_GNU_call_site_target,
1351 DW_AT_GNU_call_site_target_clobbered,
1352 DW_AT_GNU_tail_call,
1353 DW_AT_GNU_all_tail_call_sites,
1354 DW_AT_GNU_all_call_sites,
1355 and DW_AT_GNU_all_source_call_sites.
1356 (print_ops): Handle DW_OP_GNU_entry_value.
1357 (attr_callback): Handle DW_AT_GNU_call_site_value,
1358 DW_AT_GNU_call_site_data_value,
1359 DW_AT_GNU_call_site_target,
1360 and DW_AT_GNU_call_site_target_clobbered.
1361
Mark Wielaarda062b6b2011-03-10 13:02:32 +010013622011-03-10 Mark Wielaard <mjw@redhat.com>
1363
1364 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
1365
Jan Kratochvilfec39992011-02-27 12:01:25 -080013662011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
1367
1368 * readelf.c (reset_listptr): Clear TABLE->TABLE.
1369
Mark Wielaardcf454ab2011-02-25 12:58:54 +010013702011-02-25 Mark Wielaard <mjw@redhat.com>
1371
1372 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
1373 (dwarf_form_string): Properly format and return unknown form.
1374
Roland McGrath47c53232011-02-23 09:23:08 -080013752011-02-23 Roland McGrath <roland@redhat.com>
1376
Roland McGrath725aad52011-02-23 19:52:46 -08001377 * readelf.c (section_name): New function.
1378 (print_debug_abbrev_section): Use it instead of constant.
1379 (print_debug_aranges_section): Likewise.
1380 (print_debug_ranges_section): Likewise.
1381 (print_debug_units): Likewise.
1382 (print_debug_line_section): Likewise.
1383 (print_debug_loc_section): Likewise.
1384 (print_debug_macinfo_section): Likewise.
1385 (print_debug_pubnames_section): Likewise.
1386 (print_debug_str_section): Likewise.
1387 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
1388 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
1389 (print_debug_str_section): Likewise.
1390
Roland McGrath47c53232011-02-23 09:23:08 -08001391 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
1392
Roland McGrath1fb9c912011-02-11 10:32:30 -080013932011-02-11 Roland McGrath <roland@redhat.com>
1394
Roland McGrath4a14ef72011-02-11 10:42:45 -08001395 * elfcmp.c (verbose): New variable.
1396 (options, parse_opt): Grok -l/--verbose to set it.
1397 (main): Under -l, keep going after first difference.
1398
Roland McGrath1fb9c912011-02-11 10:32:30 -08001399 * elfcmp.c (ignore_build_id): New variable.
1400 (options, parse_opt): Grok --ignore-build-id to set it.
1401 (main): For SHT_NOTE sections, compare note details rather than raw
1402 bytes. Under --ignore-build-id, don't complain about differing build
1403 ID contents if lengths match.
1404
Roland McGrathfd992542011-02-08 19:45:12 -080014052011-02-08 Roland McGrath <roland@redhat.com>
1406
Roland McGrath240784b2011-02-08 19:48:42 -08001407 * ldscript.y (filename_id_star): Remove unused variable.
1408
Roland McGrath8f6c1792011-02-08 19:48:02 -08001409 * unstrip.c (copy_elided_sections): Remove unused variable.
1410
Roland McGrath4db89f02011-02-08 19:46:50 -08001411 * elflint.c (check_dynamic): Remove unused variables.
1412
Roland McGrath33231312011-02-08 19:45:26 -08001413 * elflint.c (check_symtab): Warn about missing xndx section only once.
1414
Roland McGrathfd992542011-02-08 19:45:12 -08001415 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
1416
Roland McGrathf151b7d2011-01-06 12:14:43 -080014172011-01-06 Roland McGrath <roland@redhat.com>
1418
1419 * strip.c (handle_elf): Under --strip-sections, remove all
1420 non-allocated sections and never generate .gnu_debuglink.
1421
Roland McGrath0b9d1fb2011-01-04 19:29:24 -080014222011-01-04 Roland McGrath <roland@redhat.com>
1423
1424 * strip.c (remove_shdrs): New variable.
1425 (options, parse_opt): Grok --strip-sections to set it.
1426 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
1427
Roland McGrath77221de2010-11-10 19:47:31 -080014282010-11-10 Roland McGrath <roland@redhat.com>
1429
1430 * findtextrel.c (process_file): Don't assume order of sections.
1431 Reported by Mike Hommey <mh@glandium.org>.
1432
Roland McGrath932585d2010-05-08 04:01:14 -070014332010-07-26 Roland McGrath <roland@redhat.com>
1434
1435 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
1436
Roland McGratha1599152010-08-30 04:04:37 -070014372010-08-30 Roland McGrath <roland@redhat.com>
1438
Roland McGrathfa144952010-08-30 19:22:41 -07001439 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
1440 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
1441 for ranges, loc.
1442 (struct listptr, struct listptr_table): New types.
1443 (compare_listptr, reset_listptr, sort_listptr): New functions.
1444 (notice_listptr, skip_listptr_hole): New functions.
1445 (struct attrcb_args): Add silent member.
1446 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
1447 Suppress output if silent, but still call notice_listptr.
1448 (print_debug_units): Suppress output if section_info not requested.
1449 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
1450 (print_debug_ranges_section): Likewise.
1451 (print_debug): Call reset_listptr on both tables.
1452
1453 * readelf.c (print_debug_ranges_section): Print empty list.
1454 (print_debug_loc_section): Likewise.
1455
Roland McGratha1599152010-08-30 04:04:37 -07001456 * readelf.c (print_debug_loc_section): Check for bogus length
1457 before calling print_ops.
1458 (print_ops): Check harder for bogus data that would read off end.
1459
Roland McGrathf4763cf2010-08-11 13:04:12 -070014602010-08-11 Roland McGrath <roland@redhat.com>
1461
1462 * readelf.c (for_each_section_argument): Process all sections with
1463 matching name, not just the first.
1464
Roland McGrath52604ba2010-07-26 21:29:44 -070014652010-07-26 Roland McGrath <roland@redhat.com>
1466
1467 * readelf.c (print_ops): Take new argument for CU version.
1468 Fix DW_OP_call_ref decoding to depend on it.
1469 (print_debug_loc_section): Update caller.
1470 (print_cfa_program): Take new argument, pass it down.
1471 (print_debug_frame_section): Update caller.
1472 (struct attrcb_args): New member version.
1473 (print_debug_units): Initialize it.
1474
Roland McGrath2f14a312010-07-02 11:16:25 -070014752010-07-02 Roland McGrath <roland@redhat.com>
1476
1477 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
1478 initial_location.
1479
Roland McGrathb6458032010-06-30 11:57:19 -070014802010-06-30 Roland McGrath <roland@redhat.com>
1481
1482 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
1483 Ignore st_size for a non-S_ISREG file descriptor.
1484 (read_block): Move assert after no-mmap bail-out.
1485 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
1486
Roland McGrathfa799902010-06-22 13:05:23 -070014872010-06-22 Roland McGrath <roland@redhat.com>
1488
1489 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
1490
Roland McGrath0c5638c2010-06-21 23:00:35 -070014912010-06-21 Roland McGrath <roland@redhat.com>
1492
1493 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -07001494 (dwarf_attr_string): Add new attributes.
1495 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -07001496
1497 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
1498 (print_cfa_program): Likewise.
1499
Roland McGrathe5251a12010-06-20 16:59:39 -070015002010-06-20 Roland McGrath <roland@redhat.com>
1501
Roland McGrath2b1f0952010-06-20 17:55:50 -07001502 * readelf.c (print_debug_units): New function, broken out of ...
1503 (print_debug_info_section): ... here. Call it.
1504 (print_debug_types_section): New function.
1505 (enum section_e): Add section_types alias for section_info.
1506 (print_debug): Add types to the sections table.
1507
Roland McGrath599f7f52010-06-20 17:12:43 -07001508 * readelf.c (print_debug_frame_section): Handle version 4 format.
1509
Roland McGrathe5251a12010-06-20 16:59:39 -07001510 * readelf.c (print_debug_line_section): Handle version 4 format.
1511
Roland McGrathec86e5f2010-06-14 17:44:38 -070015122010-06-14 Roland McGrath <roland@redhat.com>
1513
1514 * unstrip.c (copy_elided_sections): Make sure all sections' data have
1515 been read in before we write anything out.
1516
Roland McGrath3b1b6512010-06-04 02:26:30 -070015172010-06-04 Roland McGrath <roland@redhat.com>
1518
Roland McGrathaa32f922010-06-04 02:29:08 -07001519 * unstrip.c (update_shdr): New function.
1520 (update_sh_size): Call it instead of gelf_update_shdr.
1521 (adjust_relocs, add_new_section_symbols): Likewise.
1522 (new_shstrtab, copy_elided_sections): Likewise.
1523
Roland McGrath3b1b6512010-06-04 02:26:30 -07001524 * unstrip.c (copy_elided_sections): Bail if stripped file has more
1525 sections than unstripped file, rather than getting confused later.
1526
Roland McGrath7a5bed82010-06-01 13:44:00 -070015272010-06-01 Roland McGrath <roland@redhat.com>
1528
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001529 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
1530 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -07001531 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001532
Roland McGrath7a5bed82010-06-01 13:44:00 -07001533 * readelf.c (print_debug): Don't bail if libdw setup fails.
1534 Suppress complaint if we only want .eh_frame anyway.
1535
Ulrich Drepper173ade82010-05-28 07:39:49 -070015362010-05-28 Ulrich Drepper <drepper@redhat.com>
1537
1538 * readelf.c (attr_callback): Also print form information.
1539
Roland McGrath12e3d1f2010-05-19 18:03:31 -070015402010-05-19 Roland McGrath <roland@redhat.com>
1541
1542 * addr2line.c (find_symbol): Short-circuit on empty name.
1543 (handle_address): Handle SYMBOL with no +OFFSET.
1544
Roland McGrath688f7fc2010-05-08 03:22:59 -070015452010-05-08 Roland McGrath <roland@redhat.com>
1546
1547 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
1548 Use that for DW_OP_call_ref, not ADDRSIZE.
1549 (print_cfa_program): Update caller.
1550 (struct attrcb_args): Add offset_size field.
1551 (attr_callback): Use it for print_ops call.
1552 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -07001553 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -07001554
Roland McGrath62b28b62010-04-14 11:54:06 -070015552010-04-14 Roland McGrath <roland@redhat.com>
1556
1557 * readelf.c (handle_core_item): Fix bitmask printing.
1558
Roland McGrath3b495d82010-04-06 12:58:32 -070015592010-04-06 Roland McGrath <roland@redhat.com>
1560
1561 * ld.c (options): Fix some typos in messages.
1562 * elflint.c (check_scn_group, check_group): Likewise.
1563 * ldscript.y (add_id_list): Likewise.
1564 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
1565 before translated string containing a literal %.
1566
Roland McGrath890081b2010-02-26 17:57:50 -080015672010-02-26 Roland McGrath <roland@redhat.com>
1568
1569 * readelf.c (process_file): Don't leak an fd in failure case.
1570
Roland McGrathc2b26f12010-02-15 15:16:15 -080015712010-02-15 Roland McGrath <roland@redhat.com>
1572
Roland McGrath22359e22010-02-15 15:57:03 -08001573 * Makefile.am: Use config/eu.am for common stuff.
1574
Roland McGrathc2b26f12010-02-15 15:16:15 -08001575 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
1576 mismatch in comparison.
1577
Roland McGrathf920fd52010-02-02 15:50:15 -080015782010-02-02 Roland McGrath <roland@redhat.com>
1579
1580 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
1581 (read_encoded): Likewise.
1582 (print_debug_frame_section): Check for bogus augmentation length.
1583 For P augmentation, use read_encoded, print the encoding description,
1584 and use hex for unsigned values.
1585
Roland McGrathb337b1f2010-01-15 01:02:27 -080015862010-01-15 Roland McGrath <roland@redhat.com>
1587
1588 * ar.c: Include <sys/stat.h>.
1589 * elflint.c: Likewise.
1590 * readelf.c: Likewise.
1591 * strip.c: Likewise.
1592 * unstrip.c: Likewise
1593
Roland McGrathbd733ca2010-01-07 20:11:42 -080015942010-01-07 Roland McGrath <roland@redhat.com>
1595
Roland McGrath8111da02010-01-07 20:31:59 -08001596 * readelf.c (print_ehdr): Handle PN_XNUM.
1597 (phnum): New static variable.
1598 (process_elf_file): Set it with elf_getphdrnum.
1599 (print_phdr): Use phnum instead of EHDR->e_phnum.
1600 (print_dynamic, handle_notes): Likewise.
1601 (handle_relocs_rel, handle_relocs_rela): Likewise.
1602
Roland McGrathbd733ca2010-01-07 20:11:42 -08001603 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
1604
1605 * elflint.c (phnum): New static variable.
1606 (check_elf_header): Set it, handling PN_XNUM.
1607 Use that in place of EHDR->e_phnum throughout.
1608 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
1609 (unknown_dependency_p, check_sections, check_program_header): Likewise.
1610
Roland McGrath019d9fb2010-01-05 13:36:07 -080016112010-01-05 Roland McGrath <roland@redhat.com>
1612
1613 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
1614 DW_AT_GNU_template_name.
1615
Roland McGrathe4061d02010-01-04 20:25:09 -080016162010-01-04 Roland McGrath <roland@redhat.com>
1617
Roland McGrath0ccbbcd2010-01-04 21:59:07 -08001618 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
1619 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
1620 (handle_core_item): Handle .format of '\n' as \n-separated strings.
1621
Roland McGrath2e79deb2010-01-04 20:36:10 -08001622 * readelf.c (implicit_debug_sections): New variable.
1623 (parse_opt): Set it instead of print_debug_sections for -a.
1624 OR them together for print_debug check.
1625 (print_debug): OR them together for section check.
1626
Roland McGratha7422be2010-01-04 20:29:33 -08001627 * readelf.c (options): Repartition into set implied by -a and others.
1628 Correct -a text to match reality.
1629
Roland McGrathe4061d02010-01-04 20:25:09 -08001630 * readelf.c (struct section_argument): Add bool member 'implicit'.
1631 (parse_opt): Set it for -a cases, clear it for -x args.
1632 (for_each_section_argument): Don't complain about a missing section by
1633 name if it's implicit.
1634
Roland McGrathefa64962009-11-16 01:50:58 -080016352009-11-16 Roland McGrath <roland@redhat.com>
1636
1637 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
1638 sections, just as dump_data_section already does.
1639
Mark Wielaardc49d00a2009-09-21 16:47:07 -070016402009-09-21 Ulrich Drepper <drepper@redhat.com>
1641
1642 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
1643 set for .comment section.
1644 Patch by Mark Wielaard <mjw@redhat.com>.
1645
Roland McGrathfb33c672009-09-08 00:21:18 -070016462009-09-08 Roland McGrath <roland@redhat.com>
1647
1648 * ar.c (main): Fix typo in message format.
1649
Roland McGrath2d13ea22009-08-21 03:16:32 -070016502009-08-21 Roland McGrath <roland@redhat.com>
1651
1652 * readelf.c (attr_callback): Use print_block only when we don't use
1653 print_ops.
1654
Roland McGrath536127f2009-08-14 13:10:09 -070016552009-08-14 Roland McGrath <roland@redhat.com>
1656
1657 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1658
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -070016592009-08-01 Ulrich Drepper <drepper@redhat.com>
1660
1661 * debugpred.h: Add two most const.
1662
Mark Wielaardbc1b92e2009-07-26 08:33:18 -070016632009-07-26 Mark Wielaard <mjw@redhat.com>
1664
1665 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
1666
Mark Wielaard79178202009-07-25 12:44:46 -070016672009-07-25 Mark Wielaard <mjw@redhat.com>
1668
1669 * Makefile.am (addr2line_LDADD): Add $(libelf).
1670
Roland McGrathbe4589d2009-07-24 16:23:12 -070016712009-07-24 Roland McGrath <roland@redhat.com>
1672
1673 * readelf.c (print_block): New function.
1674 (print_ops): Use it.
1675 (attr_callback): Use it for DW_FORM_block* forms.
1676
Mark Wielaarddaf85b22009-07-24 15:49:51 -070016772009-07-20 Mark Wielaard <mjw@redhat.com>
1678
1679 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
1680 and DW_OP_stack_value.
1681
Ulrich Drepper96d950e2009-07-14 10:42:01 -070016822009-07-14 Ulrich Drepper <drepper@redhat.com>
1683
1684 * elflint.c (check_elf_header): Allow Linux ABI.
1685 (check_symtab): Handle STB_GNU_UNIQUE.
1686
Mark Wielaardf735db12009-07-08 19:18:53 +020016872009-07-08 Mark Wielaard <mjw@redhat.com>
1688
1689 * readelf.c (attr_callback): Handle DW_Form constants for
1690 DW_AT_data_member_location.
1691
Roland McGrathdffc33d2009-07-06 16:06:41 -070016922009-07-06 Roland McGrath <roland@redhat.com>
1693
1694 * readelf.c (register_info): New function. Handle unknown register #s.
1695 (print_cfa_program): Use it.
1696 (handle_core_register, handle_core_registers): Likewise.
1697
Roland McGrath5dbccdb2009-06-28 14:48:02 -070016982009-06-28 Roland McGrath <roland@redhat.com>
1699
1700 * readelf.c (print_address_names): New static variable.
1701 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
1702 (format_dwarf_addr): Don't look up name if !print_address_names.
1703
Ulrich Drepperf1894932009-06-13 15:55:42 -070017042009-06-13 Ulrich Drepper <drepper@redhat.com>
1705
1706 * ldgeneric.c: Don't use deprecated libelf functions.
1707 * nm.c: Likewise.
1708 * objdump.c: Likewise.
1709 * readelf.c: Likewise.
1710 * size.c: Likewise.
1711 * strip.c: Likewise.
1712 * unstrip.c: Likewise.
1713 * ld.h: Fix up comment.
1714
Ulrich Drepperb47d2902009-06-01 07:38:32 -070017152009-06-01 Ulrich Drepper <drepper@redhat.com>
1716
1717 * readelf.c (print_relocs): Expect ELF header argument and pass on
1718 to handle_relocs_rel* functions. Adjust caller.
1719 (handle_relocs_rel): Add ELF header argument. Add special case for
1720 the IRELATIVE relocations in statically linked executables.
1721 (handle_relocs_rela): Likewise.
1722
Roland McGrathdb19f0b2009-05-07 18:44:27 -070017232009-04-29 Ulrich Drepper <drepper@redhat.com>
1724
1725 * elflint.c (check_symtab): Add tests of st_other field.
1726
Ulrich Drepperaab90f92009-04-23 07:44:36 -070017272009-04-23 Ulrich Drepper <drepper@redhat.com>
1728
1729 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
1730
Roland McGrathd86e1832009-04-20 00:49:33 -070017312009-04-20 Roland McGrath <roland@redhat.com>
1732
Roland McGrath8a592412009-04-20 01:20:44 -07001733 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
1734 of inline call sites.
1735
Roland McGrathd86e1832009-04-20 00:49:33 -07001736 * addr2line.c (just_section): New variable.
1737 (adjust_to_section): New function, broken out of ...
1738 (handle_address): ... here.
1739 (options, parse_opt): Add -j/--section=NAME to set it.
1740
Roland McGrath2fb90512009-04-15 14:47:13 -070017412009-04-15 Roland McGrath <roland@redhat.com>
1742
1743 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
1744 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
1745
Roland McGrath04a14162009-04-14 01:02:17 -070017462009-04-14 Roland McGrath <roland@redhat.com>
1747
Roland McGratheb9ba472009-04-14 18:44:45 -07001748 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
1749 like SHT_GNU_ATTRIBUTES.
1750
Roland McGrath94f43832009-04-14 04:39:32 -07001751 * readelf.c (handle_core_registers): Fix error message.
1752
Roland McGrath04a14162009-04-14 01:02:17 -07001753 * strip.c (handle_elf: check_preserved): Don't note any change when
1754 .debug_data is already filled from a previous pass.
1755
Ulrich Drepper411cdb22009-02-05 22:04:26 -080017562009-02-05 Ulrich Drepper <drepper@redhat.com>
1757
Ulrich Drepper51b3f472009-02-05 22:10:39 -08001758 * objdump.c (show_relocs_x): Minor cleanups.
1759
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001760 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -08001761 Print first DW_CFA_expression and DW_CFA_val_expression parameter
1762 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001763
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080017642009-02-01 Ulrich Drepper <drepper@redhat.com>
1765
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001766 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
1767 into ...
1768 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -08001769 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001770
Ulrich Dreppercbb422e2009-02-01 18:18:55 -08001771 * objdump.c (show_relocs_rela): Show offsets as signed values.
1772
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08001773 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
1774 Improve some error messages.
1775 Use program_invocation_short_name instead of AR macro.
1776 * Makefile.am (CFLAGS_ar): Remove.
1777 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
1778 * objdump.c (parse_opt): Likewise.
1779 * readelf.c (parse_opt): Likewise.
1780
Roland McGrath51f01282009-01-27 17:08:03 -080017812009-01-27 Roland McGrath <roland@redhat.com>
1782
1783 * readelf.c (print_ops): Notice short length, don't overrun buffer
1784 (still need to fix LEB128).
1785
1786 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
1787
1788 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
1789
Ulrich Drepper62c46532009-01-24 17:01:08 -080017902009-01-24 Ulrich Drepper <drepper@redhat.com>
1791
1792 * readelf.c (print_debug_frame_section): Fix computation of vma_base
1793 for PC-relative mode.
1794
Ulrich Drepperd7285e12009-01-23 16:10:44 -080017952009-01-23 Ulrich Drepper <drepper@redhat.com>
1796
Ulrich Drepperccccab02009-01-23 16:32:21 -08001797 * size.c (process_file): When handling archive, close file descriptor
1798 here. For unknown file format also close file descriptor.
1799 (handle_ar): Don't close file descriptor here.
1800
Ulrich Drepperd7285e12009-01-23 16:10:44 -08001801 * readelf.c (parse_opt): Move code to add to dump_data_sections and
1802 string_sections list in local function add_dump_section. Adjust 'x'
1803 key handling. For 'a' key add .strtab, .dynstr, and .comment section
1804 to string_sections list.
1805
Roland McGrathe9de9b42009-01-22 13:05:40 -080018062009-01-22 Roland McGrath <roland@redhat.com>
1807
Roland McGrath9a847e12009-01-22 19:55:00 -08001808 * readelf.c (print_phdr): Don't print section mapping when no sections.
1809
Roland McGrathd759aa62009-01-22 19:17:07 -08001810 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
1811
Roland McGrathcabeeee2009-01-22 13:17:45 -08001812 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
1813 and reset it only for the 'true' cases.
1814
1815 * Makefile.am (addr2line_no_Wformat): New variable.
1816
Roland McGrathe9de9b42009-01-22 13:05:40 -08001817 * readelf.c (print_debug_frame_section): Use t instead of j formats
1818 for ptrdiff_t OFFSET.
1819
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080018202009-01-21 Ulrich Drepper <drepper@redhat.com>
1821
1822 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -08001823 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001824 (check_exception_data): First sanity test.
1825
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080018262009-01-17 Ulrich Drepper <drepper@redhat.com>
1827
Ulrich Drepper935edde2009-01-17 16:06:42 -08001828 * readelf.c (print_debug_exception_table): Show target of ar_disp
1829 field.
1830
1831 * elflint.c (check_program_header): Add most consistency checks for
1832 PT_GNU_EH_FRAME entry.
1833
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001834 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1835 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1836 * ar.c: Likewise.
1837 * elfcmp.c: Likewise.
1838 * elflint.c: Likewise.
1839 * findtextrel.c: Likewise.
1840 * ld.c: Likewise.
1841 * nm.c: Likewise.
1842 * objdump.c: Likewise.
1843 * ranlib.c: Likewise.
1844 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001845
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001846 * size.c: Likewise.
1847 * strings.c: Likewise.
1848 * strip.c: Likewise.
1849 * unstrip.c: Likewise.
1850
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080018512009-01-16 Ulrich Drepper <drepper@redhat.com>
1852
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001853 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1854 matches .eh_frame_hdr section, if it is available. Also check that
1855 the segment is allocated, not writable, not executable.
1856
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001857 * readelf.c: Add -e option. Dump exception and unwind related
1858 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001859 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001860 (print_debug_exception_table): Beginning of support.
1861 (print_debug): Hook up print_debug_exception_table for
1862 .gcc_except_table sections.
1863
1864 * readelf.c (print_debug_frame_section): Some fixes for last change.
1865
Ulrich Drepper351bf202009-01-15 20:18:40 -080018662009-01-15 Ulrich Drepper <drepper@redhat.com>
1867
1868 * readelf.c (print_encoding): Now a toplevel function.
1869 (print_relinfo): Likewise.
1870 (print_encoding_base): Broken out of print_debug_frame_section.
1871 (print_debug_frame_section): Print different header for .eh_frame
1872 sections. Fix recognition of matching CIEs in .debug_frame sections.
1873 Print absolute offset for PC-relative FDE locations. Don't print
1874 table header for FDEs if the table is empty.
1875 (read_encoded): New function.
1876 (print_debug_frame_hdr_section): New function.
1877 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1878 sections.
1879
1880 * readelf.c (handle_relocs_rel): Print section number.
1881 (print_debug_abbrev_section): Likewise.
1882 (print_debug_aranges_section): Likewise.
1883 (print_debug_ranges_section): Likewise.
1884 (print_debug_info_section): Likewise.
1885 (print_debug_line_section): Likewise.
1886 (print_debug_loc_section): Likewise.
1887 (print_debug_macinfo_section): Likewise.
1888 (print_debug_pubnames_section): Likewise.
1889 (print_debug_str_section): Likewise.
1890
Ulrich Drepper8b394632009-01-10 18:29:56 -080018912009-01-10 Ulrich Drepper <drepper@redhat.com>
1892
1893 * strings.c (read_block): Fix typo in error message string.
1894
Ulrich Drepper87cf5832009-01-07 20:39:21 -080018952009-01-07 Ulrich Drepper <drepper@redhat.com>
1896
1897 * ld.c (ld_new_searchdir): Fix adding to search path list.
1898
Ulrich Drepperac194d02009-01-06 00:30:01 -080018992009-01-06 Ulrich Drepper <drepper@redhat.com>
1900
1901 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001902
Roland McGrath3614d992009-01-05 18:05:32 -080019032009-01-05 Roland McGrath <roland@redhat.com>
1904
1905 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1906 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001907
Ulrich Drepper44173ed2009-01-01 19:00:41 -080019082009-01-01 Ulrich Drepper <drepper@redhat.com>
1909
1910 * addr2line.c: Update copyright year.
1911 * ar.c: Likewise.
1912 * elfcmp.c: Likewise.
1913 * elflint.c: Likewise.
1914 * findtextrel.c: Likewise.
1915 * ld.c: Likewise.
1916 * nm.c: Likewise.
1917 * objdump.c: Likewise.
1918 * ranlib.c: Likewise.
1919 * readelf.c: Likewise.
1920 * size.c: Likewise.
1921 * strings.c: Likewise.
1922 * strip.c: Likewise.
1923 * unstrip.c: Likewise.
1924
Roland McGrath468fe4d2008-12-11 21:00:12 -080019252008-12-11 Roland McGrath <roland@redhat.com>
1926
1927 * nm.c (sym_name): New function.
1928 (show_symbols_sysv): Use it in place of elf_strptr.
1929 (show_symbols_bsd, show_symbols_posix): Likewise.
1930 Fixes RHBZ#476136.
1931
1932 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1933 elf_strptr fails.
1934
Roland McGratha845f682008-12-03 03:41:58 +000019352008-12-02 Roland McGrath <roland@redhat.com>
1936
1937 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1938 nonzero OFFSET argument to dwfl_getmodules.
1939
Roland McGrath1d8bb252008-08-07 08:39:41 +000019402008-08-07 Roland McGrath <roland@redhat.com>
1941
1942 * addr2line.c (main): Pass string to handle_address.
1943 (see_one_module): New function, subroutine of handle_address.
1944 (find_symbol): Likewise.
1945 (handle_address): Take string argument rather than address.
1946 Convert plain number, or handle strings like "(section)+offset"
1947 or "symbol+offset".
1948
19492008-08-01 Roland McGrath <roland@redhat.com>
1950
1951 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1952 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1953
1954 * readelf.c (convert): Take new argument SIZE.
1955 (handle_core_register, handle_core_item): Update callers.
1956 (handle_core_item): Take new arg REPEATED_SIZE.
1957 (handle_core_items): Special case for a singleton item,
1958 let handle_core_item handle repeats if it wants to.
1959
1960 * readelf.c (handle_core_items): Give abridged output
1961 for identical groups repeated more than twice.
1962
19632008-07-04 Roland McGrath <roland@redhat.com>
1964
1965 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1966
Roland McGrath521c47d2008-04-11 07:01:58 +000019672008-04-10 Roland McGrath <roland@redhat.com>
1968
1969 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1970 refer to. Instead, just be sure to preserve the original symbol
1971 table in the debug file so those symbols go with their sections and
1972 can be elided from the stripped version of the symbol table.
1973
1974 * strip.c (handle_elf): When a discarded section kept in the debug
1975 file refers to a nondiscard section via sh_link/sh_info, preserve
1976 that nondiscarded section unmodified in the debug file as well.
1977 Skip adjustment of discarded sections symbol table references when
1978 that symbol table is copied in this way.
1979
1980 * elflint.c (check_symtab): Don't crash from missing symbol names
1981 after diagnosing bogus strtab.
1982
1983 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1984 adjustment for symtab changes.
1985
Roland McGrath13b69602008-04-01 02:30:05 +000019862008-03-31 Roland McGrath <roland@redhat.com>
1987
1988 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1989 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1990 excuse a special section.
1991
19922008-03-27 Roland McGrath <roland@redhat.com>
1993
1994 * elflint.c (check_sections): Check that executability and writability
1995 of sections is reflected in segment p_flags.
1996
Roland McGrathd11f9cb2008-03-26 20:51:59 +000019972008-03-26 Roland McGrath <roland@redhat.com>
1998
1999 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
2000 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
2001 is valid in RELRO.
2002
Roland McGrath47c5c352008-02-29 10:17:16 +000020032008-02-29 Roland McGrath <roland@redhat.com>
2004
2005 * readelf.c (print_attributes): Add a cast.
2006 * elflint.c (check_attributes): Likewise.
2007
2008 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
2009 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
2010 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
2011
Ulrich Drepper834de6f2008-02-23 06:50:01 +000020122008-02-03 Ulrich Drepper <drepper@redhat.com>
2013
2014 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
2015 when linked into executable.
2016 (elf_i386_create_relocations): Likewise.
2017
Roland McGrath059c83e2008-02-21 06:19:39 +000020182008-02-20 Roland McGrath <roland@redhat.com>
2019
2020 * readelf.c (print_attributes): New function.
2021 (process_elf_file): Call it under -A.
2022
2023 * elflint.c (check_attributes): Implement it for real.
2024
20252008-02-19 Roland McGrath <roland@redhat.com>
2026
2027 * elflint.c (special_sections): Handle .gnu.attributes section.
2028 (check_sections): Likewise.
2029 (check_attributes): New function.
2030
20312008-02-10 Roland McGrath <roland@redhat.com>
2032
2033 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
2034 sections and ET_REL files.
2035
Ulrich Drepper712d78e2008-02-02 10:01:53 +000020362008-02-02 Ulrich Drepper <drepper@redhat.com>
2037
2038 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
2039 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
2040 and R_386_TLS_LE.
2041 (elf_i386_create_relocations): Likewise.
2042 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
2043 elements.
2044 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
2045 (ld_generic_create_outfile): Add PT_TLS entry to program header.
2046 Fix generation of PT_GNU_STACK entry.
2047
Ulrich Drepperc54785a2008-02-01 18:05:21 +000020482008-02-01 Ulrich Drepper <drepper@redhat.com>
2049
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00002050 * ld.c (replace_args): Prevent loop over replacements if the parameter
2051 is only two characters long.
2052
Ulrich Drepperc54785a2008-02-01 18:05:21 +00002053 * ld.c: Recognize sha1 argument for --build-id parameter.
2054 * ldgeneric.c (create_build_id_section): Handle sha1.
2055 (compute_hash_sum): New function. Broken out of compute_build_id.
2056 Take hash function and context as parameters.
2057 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
2058 implementation.
2059
Ulrich Drepper89759c72008-01-31 19:44:12 +000020602008-01-31 Ulrich Drepper <drepper@redhat.com>
2061
2062 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
2063 * ld.c: Recognize --build-id command line parameter.
2064 * ld.h: Define scn_dot_note_gnu_build_id.
2065 (struct ld_state): Add build_id and buildidscnidx elements.
2066 * ldgeneric.c: Implement --build-id command line parameter.
2067 * ldlex.l (ID): Recognize - as valid character after the first one.
2068
Ulrich Drepper5530ec52008-01-29 10:42:07 +000020692008-01-29 Ulrich Drepper <drepper@redhat.com>
2070
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00002071 * ld.c (replace_args): New function.
2072 (main): Use it to rewrite old-style parameters.
2073
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00002074 * elf32-i386.script: Add .gnu.hash section.
2075 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
2076 (fillin_special_symbol): Initialize st_size.
2077 (sortfct_hashval): New function.
2078 (create_gnu_hash): New function.
2079 (create_hash): New function.
2080 (ld_generic_create_outfile): Use the new functions to create the
2081 hash tables.
2082
Ulrich Drepper5530ec52008-01-29 10:42:07 +00002083 * elflint.c (check_gnu_hash): Fix index value printed in error message.
2084
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000020852008-01-24 Ulrich Drepper <drepper@redhat.com>
2086
2087 * elflint.c (check_group): Check that signature symbol for section
2088 group is not an empty string.
2089 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
2090 section. Start implementation of --hash-style.
2091 * i386_ld.c: Likewise.
2092 * ld.c: Recognize --hash-style.
2093 * ld.h (struct scninfo): Add comdat_group.
2094 Add additional parameter to finalize_plt callback.
2095
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000020962008-01-22 Ulrich Drepper <drepper@redhat.com>
2097
2098 * ld.h (struct callbacks): Add initialize_gotplt.
2099 (struct scnhead): Add scn_dot_gotplt.
2100 (struct ld_state): Add gotpltscnidx.
2101 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
2102 (elf_i386_initialize_pltrel): Likewise.
2103 (elf_i386_initialize_got): There is now a separate .got.plt, so
2104 don't do the PLT-related work here. Initialize d_type.
2105 (elf_i386_initialize_gotplt): New function.
2106 (elf_i386_plt0): Use ud2a after indirect jump.
2107 (elf_i386_pic_plt0_entry): Likewise.
2108 (elf_i386_finalize_plt): Reference now .got.plt.
2109 (elf_i386_count_relocations): For GOT entries which need no relocation
2110 don't bump nrel_got.
2111 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
2112 handling for split .got/.got.plt.
2113 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
2114 * elf32-i386.script: Sort sections for security. There are no .got
2115 input sections. Add .got.plt.
2116 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
2117 (ld_generic_create_outfile): Initialize .got.plt section.
2118 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
2119
Ulrich Drepperd9488292008-01-20 16:43:15 +000021202008-01-19 Ulrich Drepper <drepper@redhat.com>
2121
2122 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
2123 symbols are not carried over into statically linked output files.
2124 Add dummy entries for more TLS relocations.
2125
2126 * ld.c (options): Add long names for -( and -).
2127
2128 * ldgeneric.c (check_definition): For newly found definitions don't
2129 mark section as used if symbol is absolute.
2130 (extract_from_archive): Only assign archive sequence number the first
2131 time the archive is handled. Update ld_state.last_archive_used
2132 if any symbol was used. Remove nround variable.
2133 (file_process2): When using symbol from an archive, update
2134 ld_state.group_start_archive, ld_state.archives, and
2135 ld_state.tailarchives.
2136 (ld_generic_file_process): If group is not handled anymore, after
2137 freeing ELF handles for the archives, clear ld_state.archives and
2138 *nextp. Fix wrong logic in recognizing first iteration of group
2139 loop. When clearing flags, also clear ld_state.group_start_archive.
2140
Ulrich Drepper5eee1222008-01-11 10:12:18 +000021412008-01-11 Ulrich Drepper <drepper@redhat.com>
2142
2143 * objdump.c (show_disasm): Adjust disassembler format string for
2144 removal of %e.
2145
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000021462008-01-04 Roland McGrath <roland@redhat.com>
2147
Roland McGrath059c83e2008-02-21 06:19:39 +00002148 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
2149 a size greater than the items cover means multiple sets of items.
2150 (handle_core_note): Update caller.
2151
21522008-01-04 Roland McGrath <roland@redhat.com>
2153
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00002154 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
2155
21562008-01-03 Roland McGrath <roland@redhat.com>
2157
2158 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
2159
2160 * elflint.c (check_dynamic): Remove duplicate initializer.
2161
Ulrich Drepperad024af2008-01-02 17:42:52 +000021622008-01-02 Ulrich Drepper <drepper@redhat.com>
2163
2164 * addr2line.c: Update copyright year.
2165 * ar.c: Likewise.
2166 * elfcmp.c: Likewise.
2167 * elflint.c: Likewise.
2168 * findtextrel.c: Likewise.
2169 * ld.c: Likewise.
2170 * nm.c: Likewise.
2171 * objdump.c: Likewise.
2172 * ranlib.c: Likewise.
2173 * readelf.c: Likewise.
2174 * size.c: Likewise.
2175 * strings.c: Likewise.
2176 * strip.c: Likewise.
2177 * unstrip.c: Likewise.
2178
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000021792007-12-30 Ulrich Drepper <drepper@redhat.com>
2180
2181 * objdump (show_disasm): Use %e after third parameter.
2182
21832007-12-21 Ulrich Drepper <drepper@redhat.com>
2184
2185 * strip.c: Fix wrong parenthesis in a few branch predictions.
2186 * strings.c: Likewise.
2187
21882007-12-20 Ulrich Drepper <drepper@redhat.com>
2189
2190 * Makefile.am (DEFS): Add DEBUGPRED.
2191 * addr2line.c: Include debugpred.h.
2192 * ar.c: Likewise.
2193 * elfcmp.c: Likewise.
2194 * elflint.c: Likewise.
2195 * findtextrel.c: Likewise.
2196 * nm.c: Likewise.
2197 * objdump.c: Likewise.
2198 * ranlib.c: Likewise.
2199 * readelf.c: Likewise.
2200 * size.c: Likewise.
2201 * strings.c: Likewise.
2202 * strip.c: Likewise.
2203 * unstrip.c: Likewise.
2204 * debugpred.h: New file.
2205
2206 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
2207 (handle_relocs_rela): Likewise.
2208
2209 * readelf.c: Add lots of likely/unlikely.
2210
2211 * elflint.c: Minor cleanups.
2212
Roland McGrath1a2e8f42007-12-15 23:39:34 +000022132007-11-19 Roland McGrath <roland@redhat.com>
2214
2215 * readelf.c (print_ops): Handle all bad op codes gracefully.
2216 Print their numbers instead of just ???.
2217
Roland McGrath07a696e2007-11-09 22:44:26 +000022182007-11-09 Roland McGrath <roland@redhat.com>
2219
2220 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00002221 Handle block forms to mean a DWARF expression for DW_AT_allocated,
2222 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
2223 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
2224 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00002225
Roland McGrathe4c22ea2007-10-23 13:07:39 +000022262007-10-20 Roland McGrath <roland@redhat.com>
2227
2228 * unstrip.c (options): Update -R description.
2229 (struct symbol): Put symbol details a union with a size_t pointer
2230 `duplicate'.
2231 (compare_symbols_output): Use null ->name as marker for discard
2232 symbols, not zero *->map.
2233 (copy_elided_sections): Record forwarding pointers for discarded
2234 duplicates and fill SYMNDX_MAP elements through them.
2235
2236 * readelf.c (process_file): Set offline_next_address to 0 at start.
2237 (struct process_dwflmod_args): New type.
2238 (process_dwflmod): Take args in it, pass fd to process_elf_file.
2239 (process_file): Update caller; dup FD for passing to libdwfl.
2240 (process_elf_file): Take new arg FD. For ET_REL file when
2241 displaying data affected by libdwfl relocation, open a new Elf handle.
2242
22432007-10-17 Roland McGrath <roland@redhat.com>
2244
2245 * readelf.c (print_debug_line_section): For invalid data inside a
2246 unit with plausible length, keep printing at the next unit boundary.
2247
2248 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
2249
22502007-10-16 Roland McGrath <roland@redhat.com>
2251
2252 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
2253
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000022542007-10-15 Roland McGrath <roland@redhat.com>
2255
2256 * make-debug-archive.in: New file.
2257 * Makefile.am (EXTRA_DIST): Add it.
2258 (make-debug-archive): New target.
2259 (bin_SCRIPTS, CLEANFILES): Add it.
2260
22612007-10-10 Roland McGrath <roland@redhat.com>
2262
2263 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
2264 Use it to check MERGE|STRINGS for .debug_str.
2265 (check_sections): Handle exact_or_gnuld.
2266
22672007-10-08 Roland McGrath <roland@redhat.com>
2268
2269 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
2270 64-bit struct timeval with 32-bit tv_usec.
2271
22722007-10-07 Roland McGrath <roland@redhat.com>
2273
2274 * readelf.c (check_archive_index): New function.
2275 (process_file): Call it. Change signature to take only fd and name.
2276 Use libdwfl to open the file, then iterate on its modules (multiple
2277 for an archive) to print file name and call process_elf_file.
2278 (main): Update caller. Let process_file do elf_begin.
2279 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
2280 (process_elf_file): Take only Dwfl_Module * argument.
2281 Don't print the file name here.
2282 (print_debug_*_section): Take Dwfl_Module * argument.
2283 (print_debug): Likewise. Update caller.
2284 (format_dwarf_addr): New function.
2285 (print_debug_ranges_section): Use it.
2286 (attr_callback): Likewise.
2287 (print_debug_line_section, print_debug_loc_section): Likewise.
2288
2289 * readelf.c (print_debug_ranges_section): Translate all strings.
2290 (print_debug_loc_section): Likewise.
2291
2292 * unstrip.c (copy_elided_sections): Initialize SEC.
2293
2294 * ar.c (do_oper_insert): Put trailing / on short names.
2295
2296 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
2297
2298 * arlib2.c (arlib_add_long_name): Adjust for header size.
2299
2300 * arlib.c (arlib_finalize): Pad long name table to keep size even.
2301
2302 * ar.c (do_oper_insert): Use write_retry for padding write.
2303
2304 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
2305 Unconditionally set FOUND[CNT]->elf when setting ->mem.
2306 (remember_long_name): New function.
2307 (do_oper_insert): Call it. Correctly use length of basename,
2308 not original name. Don't store long name twice for new member.
2309
23102007-10-06 Roland McGrath <roland@redhat.com>
2311
2312 * elflint.c (check_note): Skip empty segment.
2313 (check_note_section): Skip empty section.
2314
2315 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
2316 (handle_output_dir_module, handle_implicit_modules): Pass it down.
2317 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
2318 (compare_alloc_sections): Take new arg REL, ignore address if true.
2319 (compare_sections): Likewise, pass it down.
2320 (compare_sections_rel, compare_sections_nonrel): New functions.
2321 (find_alloc_sections_prelink, copy_elided_sections): Use them
2322 instead of compare_sections.
2323 (sections_match): New function, broken out of ...
2324 (find_alloc_section): ... here.
2325 (copy_elided_sections): Reorganize section match-up logic.
2326 Use sections_match for SHF_ALLOC in ET_REL.
2327 For ET_REL, let the nonzero sh_addr from the debug file dominate.
2328
2329 * unstrip.c (add_new_section_symbols): Take new arg REL.
2330 When true, do not update section symbol values.
2331 (collect_symbols): Likewise. Update section symbols with address
2332 of chosen output section, not original section.
2333 (check_symtab_section_symbols, copy_elided_sections): Update callers.
2334
2335 * unstrip.c (compare_alloc_sections): At the same address, preserve
2336 original section order.
2337
2338 * elflint.c (special_sections): Don't require MERGE|STRINGS for
2339 .debug_str, it didn't always have them with older tools.
2340
2341 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
2342
23432007-10-05 Roland McGrath <roland@redhat.com>
2344
2345 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
2346 ET_REL file.
2347
2348 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
2349 SHN_UNDEF as "bad section". Use shndx value in messages.
2350
2351 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
2352 for ".debug" so it matches as a prefix.
2353 (IS_KNOWN_SPECIAL): New macro.
2354 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
2355 type even under -d, for a .debug* or .shstrtab section.
2356
2357 * readelf.c (print_ops): Use hex for address operand.
2358
23592007-10-04 Roland McGrath <roland@redhat.com>
2360
2361 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
2362 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
2363 sections mapped to SHN_UNDEF.
2364
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000023652007-10-04 Ulrich Drepper <drepper@redhat.com>
2366
2367 * readelf.c (dump_archive_index): Avoid warning about uninitialized
2368 variable with older glibc versions.
2369 Add some branch prediction.
2370
Roland McGrath59ea7f32007-10-04 08:50:09 +000023712007-10-04 Roland McGrath <roland@redhat.com>
2372
2373 * readelf.c (print_archive_index): New variable.
2374 (options, parse_opt): Accept -c/--archive-index to set it.
2375 (dump_archive_index): New function.
2376 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
2377 Call dump_archive_index on archives if set.
2378 (main): Update caller.
2379 (any_control_option): Give it file scope, moved out of ...
2380 (parse_opt): ... here.
2381
23822007-10-03 Roland McGrath <roland@redhat.com>
2383
2384 * unstrip.c (struct arg_info): Add `list' flag.
2385 (options, parse_opt): Grok -n/--list to set it.
2386 (list_module): New function.
2387 (handle_implicit_modules): Call it under -n.
2388
2389 * elflint.c (check_note_section): New function.
2390 (check_sections): Call it for SHT_NOTE.
2391
2392 * readelf.c (handle_notes): Use sections when available.
2393
2394 * elflint.c (check_note_data): New function, broken out of ...
2395 (check_note): ... here. Call it and elf_getdata_rawchunk.
2396
2397 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
2398 Use elf_getdata_rawchunk and gelf_getauxv.
2399 (handle_notes_data): New function, broken out of ...
2400 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
2401
Roland McGrath241ac022007-10-01 18:21:46 +000024022007-10-01 Roland McGrath <roland@redhat.com>
2403
Roland McGrathac0a16c2007-10-01 18:50:35 +00002404 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
2405
Roland McGrath241ac022007-10-01 18:21:46 +00002406 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
2407
Roland McGrathc76f0b02007-09-27 07:31:33 +000024082007-09-10 Roland McGrath <roland@redhat.com>
2409
2410 * readelf.c (options): Give -p optional argument, alias --string-dump.
2411 (string_sections, string_sections_tail): New static variables.
2412 (parse_opt): Set them when -p has an argument.
2413 (print_string_section): New function, broken out of ...
2414 (print_strings): ... here. Call it.
2415 (dump_data_section): New function, broken out of ...
2416 (dump_data): ... here. Call it.
2417 (for_each_section_argument): New function, broken out of ...
2418 (dump_data): ... here. Call it.
2419 (dump_strings): New function.
2420
24212007-08-31 Roland McGrath <roland@redhat.com>
2422
2423 * readelf.c (print_strings): Typo fix.
2424
Roland McGrathcb6d8652007-08-23 08:10:54 +000024252007-08-23 Roland McGrath <roland@redhat.com>
2426
2427 * readelf.c (printf_with_wrap): Function removed.
2428 (REGISTER_WRAP_COLUMN): New macro.
2429 (handle_core_register): Use print_core_item instead.
2430 (struct register_info): New type.
2431 (compare_registers, compare_register_sets): New functions.
2432 (register_bitpos, compare_sets_by_info): New functions.
2433 (handle_core_registers): Use those to segregate and sort registers
2434 for display.
2435
2436 * readelf.c (ITEM_WRAP_COLUMN): New macro.
2437 (print_core_item): New function.
2438 (handle_core_item): Use it instead of printf_with_wrap.
2439 (compare_core_items, compare_core_item_groups): New functions.
2440 (handle_core_items): Use them. Sort by group and force line breaks
2441 between groups.
2442
2443 * readelf.c (handle_core_registers, handle_core_items): New functions,
2444 broken out of ...
2445 (handle_core_note): ... here. Call them.
2446
24472007-08-22 Roland McGrath <roland@redhat.com>
2448
2449 * unstrip.c (new_shstrtab): New function, broken out of ...
2450 (copy_elided_sections): ... here.
2451
24522007-08-20 Roland McGrath <roland@redhat.com>
2453
2454 Avoid local function trampolines in nm binary.
2455 * nm.c (sort_by_address): Move to a static function instead of local
2456 inside show_symbols.
2457 (sort_by_name_strtab): New static variable.
2458 (sort_by_name): Use it. Move to a static function instead of local
2459 inside show_symbols.
2460 (show_symbols): Set sort_by_name_strtab.
2461
24622007-08-19 Roland McGrath <roland@redhat.com>
2463
2464 * readelf.c (handle_auxv_note): New function.
2465 (handle_notes): Call it.
2466
2467 * readelf.c (printf_with_wrap, convert): New functions.
2468 (handle_core_item, (handle_core_register): New functions.
2469 (handle_notes): Call those with details from ebl_core_note.
2470
Roland McGrath099dd522007-08-13 22:58:36 +000024712007-08-12 Roland McGrath <roland@redhat.com>
2472
2473 * elflint.c (check_note): Accept type 0 with name "Linux".
2474
2475 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
2476
2477 * elflint.c (section_flags_string): Return "none" for 0, not "".
2478
Roland McGrathd8221722007-08-11 21:18:09 +000024792007-08-11 Roland McGrath <roland@redhat.com>
2480
2481 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
2482
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000024832007-08-04 Ulrich Drepper <drepper@redhat.com>
2484
2485 * readelf.c (hex_dump): Use isprint to determine whether to print
2486 character itself or full stop character.
2487 (dump_data): No need to check endp for NULL after strtol call.
2488
Roland McGrath60fc84c2007-08-03 21:59:15 +000024892007-08-03 Roland McGrath <roland@redhat.com>
2490
2491 * readelf.c (print_string_sections): New variable.
2492 (options, parse_opt): Handle --strings/-p to set it.
2493 (print_strings): New function.
2494 (process_elf_file): Call it under -p.
2495
2496 * readelf.c (options): Add hidden aliases --segments, --sections,
2497 as taken by binutils readelf.
2498
24992007-08-01 Roland McGrath <roland@redhat.com>
2500
2501 * readelf.c (dump_data_sections, dump_data_sections_tail):
2502 New variables.
2503 (options, parse_opt): Handle --hex-dump/-x, set them.
2504 (hex_dump): New function.
2505 (dump_data): New function, call it.
2506 (process_elf_file): Call it.
2507
25082007-07-25 Roland McGrath <roland@redhat.com>
2509
2510 * addr2line.c (show_symbols): New variable.
2511 (print_addrsym): New function.
2512 (handle_address): Call it.
2513 (options, parse_opt): Handle -S/--symbols.
2514
Ulrich Drepperb0243862007-06-06 00:09:36 +000025152007-06-05 Ulrich Drepper <drepper@redhat.com>
2516
2517 * addr2line.c: Update for latest autoconf header.
2518 * ar.c: Likewise.
2519 * elfcmp.c: Likewise.
2520 * elflint.c: Likewise.
2521 * findtextrel.c: Likewise.
2522 * ld.c: Likewise.
2523 * ldgeneric.c: Likewise.
2524 * nm.c: Likewise.
2525 * objdump.c: Likewise.
2526 * ranlib.c: Likewise.
2527 * readelf.c: Likewise.
2528 * size.c: Likewise.
2529 * strings.c: Likewise.
2530 * strip.c: Likewise.
2531 * unstrip.c: Likewise.
2532
Roland McGrath9aa8ef72007-05-18 08:59:43 +000025332007-05-18 Roland McGrath <roland@redhat.com>
2534
2535 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
2536 stripped file, so as not to duplicate a section copied in both.
2537
2538 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
2539
25402007-05-17 Roland McGrath <roland@redhat.com>
2541
2542 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
2543
2544 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
2545
2546 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
2547 call make_directories here.
2548 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
2549 (handle_dwfl_module): Likewise.
2550 (handle_implicit_modules): Update callers.
2551 (handle_output_dir_module): Likewise. Don't do make_directories here.
2552
2553 * unstrip.c (get_section_name): New function, broken out of ...
2554 (copy_elided_sections): here. Update callers.
2555 (find_alloc_section): Broken out of ...
2556 (copy_elided_sections): ... here. Update caller.
2557 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
2558 update STT_SECTION symbols' st_value fields as a side effect.
2559 (check_symtab_section_symbols): Update caller.
2560 (add_new_section_symbols): Set st_value in symbols added.
2561 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
2562 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
2563 from .bss to .dynbss.
2564 (find_alloc_sections_prelink): New function. Associate debug file
2565 allocated SHT_NOBITS shdrs with stripped moved by prelink via
2566 .gnu.prelink_undo information.
2567 (copy_elided_sections): Call it when we couldn't find every allocated
2568 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
2569 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
2570 (handle_file): Update callers.
2571
2572 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
2573 named ".comment".
2574
2575 * elflint.c (check_sections): Fix association of segments with
2576 sections when p_memsz > p_filesz.
2577
25782007-04-29 Roland McGrath <roland@redhat.com>
2579
2580 * addr2line.c (options, main): Tweak argp group settings to fix
2581 usage output.
2582
25832007-04-28 Roland McGrath <roland@redhat.com>
2584
2585 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
2586 sizes to match sections adjusted in the stripped file.
2587
Roland McGrath4be15242007-04-25 03:09:33 +000025882007-04-24 Roland McGrath <roland@redhat.com>
2589
2590 * elfcmp.c (OPT_HASH_INEXACT): New macro.
2591 (hash_inexact): New variable.
2592 (options, parse_opt): Add --hash-inexact option to set it.
2593 (hash_content_equivalent): New function.
2594 (main): Call it for differing SHT_HASH sections under --hash-inexact.
2595
25962007-04-23 Roland McGrath <roland@redhat.com>
2597
2598 * unstrip.c: New file.
2599 * Makefile.am (bin_PROGRAMS): Add it.
2600 (unstrip_LDADD): New variable.
2601
2602 * strip.c (options): Allow --output for -o.
2603
Ulrich Drepper8b383102007-02-16 00:31:57 +000026042007-02-15 Ulrich Drepper <drepper@redhat.com>
2605
2606 * readelf.c: Remove unused code. Add a few consts.
2607
Ulrich Drepper903c1162007-02-15 19:40:37 +000026082007-02-15 Roland McGrath <roland@redhat.com>
2609
2610 * readelf.c (print_debug): Fix brainos in SHDR test.
2611
Roland McGrathf82a1ec2007-02-06 04:47:44 +000026122007-02-05 Roland McGrath <roland@redhat.com>
2613
2614 * ar.c: Include <limits.h>, since we use LONG_MAX.
2615
Ulrich Drepper0fe63532007-02-05 21:05:51 +000026162007-02-05 Ulrich Drepper <drepper@redhat.com>
2617
Ulrich Drepper8b383102007-02-16 00:31:57 +00002618 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00002619 ignore fchown's return value.
2620 (do_oper_insert): Handle error when writing padding.
2621 * ranlib.c: Add fchown complain work around.
2622
Ulrich Drepper0fe63532007-02-05 21:05:51 +00002623 * arlib.c: Make symtab a global variable. Change all users.
2624 * arlib2.c: Likewise.
2625 * ranlib.c: Likewise.
2626 * ar.c: Likewise.
2627 * arlib.h: Declare it.
2628
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000026292007-01-11 Roland McGrath <roland@redhat.com>
2630
2631 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
2632 SHF_MASKPROC bits separately from generic sh_flags validation.
2633
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000026342007-02-04 Ulrich Drepper <drepper@redhat.com>
2635
2636 * ar.c: New file.
2637 * arlib.c: New file.
2638 * arlib2.c: New file.
2639 * arlib.h: New file.
2640 * Makefile (noinst_LIBRARIES): Add libar.
2641 (libar_a_SOURCES): Define.
2642 (ar_LDADD): Define.
2643 (CFLAGS_ar): Define.
2644 * ranlib.c: Change to use arlib.
2645
2646 * elflint.c (check_symtab): Work around GNU ld bug which omits
2647 sections but not symbols in those sections.
2648
Ulrich Drepperb770cf92007-01-10 21:02:34 +000026492007-01-10 Ulrich Drepper <drepper@redhat.com>
2650
2651 * addr2line.c: Update copyright year.
2652 * elfcmp.c: Likewise.
2653 * elflint.c: Likewise.
2654 * findtextrel.c: Likewise.
2655 * ld.c: Likewise.
2656 * nm.c: Likewise.
2657 * objdump.c: Likewise.
2658 * ranlib.c: Likewise.
2659 * readelf.c: Likewise.
2660 * size.c: Likewise.
2661 * strings.c: Likewise.
2662 * strip.c: Likewise.
2663
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000026642006-12-09 Ulrich Drepper <drepper@redhat.com>
2665
2666 * elflint.c (compare_hash_gnu_hash): New function. Report if the
2667 two hash tables have different content (module expected omission
2668 of undefined symbols).
2669
Roland McGrath8190db62006-12-17 23:56:51 +000026702006-10-31 Roland McGrath <roland@redhat.com>
2671
2672 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00002673 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00002674
26752006-09-19 Jakub Jelinek <jakub@redhat.com>
2676
2677 * strip.c (process_file): Disallow -f on archives.
2678
26792006-10-09 Roland McGrath <roland@redhat.com>
2680
2681 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
2682
Roland McGrathc373d852006-10-10 00:25:21 +000026832006-08-29 Roland McGrath <roland@redhat.com>
2684
2685 * Makefile.am (MAINTAINERCLEANFILES): New variable.
2686
2687 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
2688 Reported by Christian Aichinger <Greek0@gmx.net>.
2689
2690 * elflint.c (valid_e_machine): Add EM_ALPHA.
2691 Reported by Christian Aichinger <Greek0@gmx.net>.
2692
Ulrich Drepper231c5902006-08-08 22:00:11 +000026932006-08-08 Ulrich Drepper <drepper@redhat.com>
2694
2695 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
2696 Keep track of which "high DT" entries are present.
2697 Check that either old or GNU-style hash table is present.
2698 If GNU-style hash table is used a symbol table is mandatory.
2699 Check that if any prelink entry is present all of them are.
2700 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
2701 table if they don't refer to functions.
2702
Roland McGrath858b1892006-07-17 08:41:15 +000027032006-07-17 Roland McGrath <roland@redhat.com>
2704
2705 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
2706 (add_version): Likewise for argument.
2707 (check_versym): Cast constant to GElf_Versym for comparison.
2708
Roland McGrath4ec807e2006-07-13 03:59:46 +000027092006-07-12 Roland McGrath <roland@redhat.com>
2710
2711 * readelf.c (handle_gnu_hash): Add casts for machines where
2712 Elf32_Word != unsigned int.
2713
Ulrich Drepperdcf61602006-07-12 19:59:02 +000027142006-07-12 Ulrich Drepper <drepper@redhat.com>
2715
2716 * elflint.c (check_sysv_hash64): Fix printf format.
2717
Ulrich Dreppercc415622006-07-12 19:42:23 +000027182006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002719
Ulrich Dreppercc415622006-07-12 19:42:23 +00002720 * addr2line.c (options): English fix in -f doc string.
2721
2722 * addr2line.c (use_comp_dir): New variable.
2723 (options, parse_opt): Grok -A/--absolute to set it.
2724 (handle_address): If set, prepend dwfl_line_comp_dir results to
2725 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002726
Ulrich Drepper28ed8952006-07-07 03:43:47 +000027272006-07-06 Ulrich Drepper <drepper@redhat.com>
2728
2729 * elflint.c: Adjust for latest new hash table format.
2730 * readelf.c: Likewise.
2731
2732 * elflint.c (check_versym): Ignore hidden bit when comparing version
2733 numbers.
2734
27352006-07-05 Ulrich Drepper <drepper@redhat.com>
2736
2737 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
2738 discarded COMDAT symbols.
2739
2740 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
2741 (elf_i386_create_relocations): Likewise.
2742 * ld.h (struct symbol): Add local and hidden bits.
2743 * ld.c (create_special_section_symbol): These synthsized symbols
2744 are local and hidden.
2745 * ldgeneric.c (file_process2): Check whether input file matches
2746 the emulation.
2747 (fillin_special_symbol): Create symbols as local and/or hidden
2748 if requested.
2749 (ld_generic_create_outfile): Make local copy of symbol.
2750 Don't hide global, defined symbols in dynamic symbol table unless
2751 requested. Synthetic symbols have no version information.
2752
2753 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
2754 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2755
27562006-07-04 Ulrich Drepper <drepper@redhat.com>
2757
2758 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
2759 testing.
2760
27612006-07-03 Ulrich Drepper <drepper@redhat.com>
2762
2763 * elflint.c: Add testing of DT_GNU_HASH.
2764 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
2765
2766 * Makefile.am: Add hacks to create dependency files for non-generic
2767 linker.
2768
Ulrich Drepper6ca46002006-06-12 22:40:23 +000027692006-06-12 Ulrich Drepper <drepper@redhat.com>
2770
2771 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
2772 section if creating a DSO and no interpreter is given.
2773 (ld_generic_create_outfile): Don't store reference to symbols in
2774 discarded COMDAT groups. Don't create PHDR and INTERP program header
2775 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00002776 (create_verneed_data): Pretty printing.
2777
Ulrich Drepper6ca46002006-06-12 22:40:23 +00002778 * ldscript.y (content): If a DSO is created don't set default
2779 interpreter from linker script.
2780
2781 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
2782 for symbols in discarded COMDAT groups.
2783 (elf_i386_create_relocations): Likewise.
2784 * ld.h (struct scninfo): Add unused_comdat.
2785 * ldgeneric.c (add_section): Also check group signature when
2786 matching COMDAT sections.
2787 (add_relocatable_file): Ignore symbols in COMDAT group which are
2788 discarded.
2789
2790 * elflint.c (check_one_reloc): For *_NONE relocs only check type
2791 and symbol reference.
2792
Ulrich Drepper54f33a72006-06-11 09:07:37 +000027932006-06-11 Ulrich Drepper <drepper@redhat.com>
2794
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00002795 * elflint.c (check_dynamic): Fix checking value of tags which are
2796 offsets in the string section. Make sure DT_STRTAB points to the
2797 section referenced in sh_link.
2798
2799 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
2800
Ulrich Drepper54f33a72006-06-11 09:07:37 +00002801 * ld.c: Recognize --eh-frame-hdr option.
2802 * ld.h (struct ld_state): Add eh_frame_hdr field.
2803 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
2804
2805 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
2806 SH_FLAGS_COMBINE.
2807 (add_relocatable_file): Minor optimization of last change.
2808 (match_section): Don't preserve SHF_GROUP flag any longer.
2809
Ulrich Drepper2d880282006-06-11 00:20:43 +000028102006-06-10 Ulrich Drepper <drepper@redhat.com>
2811
2812 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00002813 Handle record and ignore as position dependent options.
2814 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00002815 * ld.h (struct ld_state): Add execstack field.
2816 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
2817 sections.
2818 (ld_generic_create_outfile): Fix program header creation in native
2819 linker. Add PT_GNU_STACK program header.
2820
Ulrich Dreppera688a732006-06-10 06:33:00 +000028212006-06-09 Ulrich Drepper <drepper@redhat.com>
2822
2823 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
2824 for PLT entries if there is no local definition.
2825
2826 * ld.c (parse_option): Handle -z ignore like --as-needed and
2827 -z record like --no-as-needed.
2828 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
2829 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
2830 looping over DSOs. When deciding about adding DT_NEEDED entries
2831 use ->as_needed instead of ignore_unused_dsos.
2832
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000028332006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002834
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00002835 * ld.c: Recognize --as-needed and --no-as-needed options.
2836 * ld.h (struct usedfile): Add as_needed field.
2837 (struct ld_state): Likewise.
2838 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
2839 the list.
2840 * ldscript.y (filename_id_list): Split to correctly parse all
2841 combinations.
2842 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002843
Ulrich Drepper697f4db2006-06-10 06:50:47 +000028442006-05-28 Ulrich Drepper <drepper@redhat.com>
2845
2846 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2847 and colno.
2848
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000028492006-05-27 Ulrich Drepper <drepper@redhat.com>
2850
2851 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002852 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002853
Ulrich Drepper82c345d2006-04-04 22:07:54 +000028542006-04-04 Ulrich Drepper <drepper@redhat.com>
2855
2856 * addr2line.c: Update copyright year.
2857 * elfcmp.c: Likewise.
2858 * elflint.c: Likewise.
2859 * findtextrel.c: Likewise.
2860 * ld.c: Likewise.
2861 * nm.c: Likewise.
2862 * objdump.c: Likewise.
2863 * ranlib.c: Likewise.
2864 * readelf.c: Likewise.
2865 * size.c: Likewise.
2866 * strings.c: Likewise.
2867 * strip.c: Likewise.
2868
Roland McGrathdd7e22b2006-03-09 23:05:47 +000028692006-03-09 Roland McGrath <roland@redhat.com>
2870
2871 * Makefile.am (AM_LDFLAGS): New variable.
2872
Roland McGrath060fa052006-03-02 07:51:50 +000028732006-03-01 Roland McGrath <roland@redhat.com>
2874
2875 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2876 for dwarf.h changes matching 3.0 spec.
2877 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2878
Ulrich Drepper038129b2005-12-04 16:47:24 +000028792005-12-04 Ulrich Drepper <drepper@redhat.com>
2880
2881 * elflint.c (check_one_reloc): If relocation section is not loaded,
2882 don't check whether the relocations modify read-only sections or
2883 loaded and unloaded sections.
2884
Ulrich Drepper607e0542005-12-04 15:51:06 +000028852005-11-28 Ulrich Drepper <drepper@redhat.com>
2886
2887 * elflint.c (check_one_reloc): Take additional parameters. Use
2888 them to determine whether relocation is valid in this type of
2889 file. DSOs and executables can contain relocation sections in
2890 unloaded sections which just show the relocations the linker
2891 applied. Adjust all callers.
2892 (check_program_header): Check that PT_PHDR is loaded and that offset
2893 matches the one in the ELF header.
2894
Roland McGrath6724c902005-10-28 07:07:19 +000028952005-10-26 Roland McGrath <roland@redhat.com>
2896
2897 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2898
Ulrich Drepperd0449522005-09-03 07:23:52 +000028992005-09-03 Ulrich Drepper <drepper@redhat.com>
2900
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002901 * strip.c (handle_elf): Unify some error messages.
2902 * ld.c (main): Likewise.
2903 * ldgeneric.c (open_elf): Likewise.
2904 * elfcmp.c (main): Likewise.
2905 * elflint.c (check_elf_header): Likewise.
2906
2907 * size.c (process_file): Fix typo in error message.
2908
Ulrich Drepperd0449522005-09-03 07:23:52 +00002909 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2910
Ulrich Dreppera60501e2005-09-02 19:50:17 +000029112005-09-02 Ulrich Drepper <drepper@redhat.com>
2912
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002913 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002914 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002915
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000029162005-08-28 Ulrich Drepper <drepper@redhat.com>
2917
2918 * ranlib.c: Don't define pread_retry and write_retry here.
2919
2920 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2921 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2922
2923 * strings.c (process_chunk): Reorder expressions in conditional
2924 (process_chunk_mb): Likewise.
2925
2926 * strings.c: New file.
2927 * Makefile.am (bin_PROGRAMS): Add strings.
2928 (strings_no_Wstring): Define.
2929 (strings_LDADD): Define.
2930
Roland McGrath71e15a02005-08-27 10:33:26 +000029312005-08-27 Roland McGrath <roland@redhat.com>
2932
2933 * addr2line.c (dwarf_diename_integrate): Function removed.
2934 (print_dwarf_function): Use plain dwarf_diename.
2935
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000029362005-08-24 Ulrich Drepper <drepper@redhat.com>
2937
2938 * elflint.c (check_versym): Versioned symbols should not have
2939 local binding.
2940
Ulrich Drepper5d832292005-08-15 21:36:27 +000029412005-08-15 Ulrich Drepper <drepper@redhat.com>
2942
Ulrich Drepper61655e02005-08-16 04:23:02 +00002943 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2944 undefined.
2945
Ulrich Drepper5d832292005-08-15 21:36:27 +00002946 * Makefile.am: Add rules to build ranlib.
2947 * ranlib.c: New file.
2948
Roland McGrath18e13422005-08-15 08:01:25 +000029492005-08-14 Roland McGrath <roland@redhat.com>
2950
2951 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2952 sh_type it recognizes.
2953
2954 * elflint.c (check_sections): Print unknown flags in hex, don't
2955 truncate high bits. Print section number and name for unknown type.
2956
Roland McGrathf6895042005-08-13 20:56:52 +000029572005-08-13 Roland McGrath <roland@redhat.com>
2958
2959 * elflint.c (check_program_header): Use ebl_segment_type_name and
2960 allow any p_type it recognizes. Include p_type value in error
2961 message for unknown type.
2962
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000029632005-08-13 Ulrich Drepper <drepper@redhat.com>
2964
2965 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2966 to ebl_check_special_symbol.
2967 (check_sections): Pass ehdr to ebl_bss_plt_p.
2968
Roland McGrath653d3762005-08-13 01:59:10 +000029692005-08-12 Roland McGrath <roland@redhat.com>
2970
2971 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2972 refers to the right section if it's not SHN_ABS.
2973 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2974
2975 * elflint.c (check_sections): Don't complain about a non-NOBITS
2976 section taking no segment space, if it's sh_size is 0.
2977
2978 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2979 be PROGBITS or NOBITS.
2980
2981 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2982 standard st_value and st_size checks.
2983
Roland McGrath1c83bf12005-08-11 07:03:55 +000029842005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002985
Roland McGrath1c83bf12005-08-11 07:03:55 +00002986 * addr2line.c (options, parse_opt): Don't handle -e here.
2987 (executable): Variable removed.
2988 (argp_children): New static variable.
2989 (argp): Use it. Make const.
2990 (main): Fill in argp_children from dwfl_standard_argp ().
2991 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2992 (print_dwarf_function): New function. Try to figure out inline chain.
2993 (elf_getname): Function removed, libdwfl does it for us.
2994 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2995 Use dwfl_module_addrname instead of elf_getname.
2996 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2997 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2998
29992005-08-10 Ulrich Drepper <drepper@redhat.com>
3000
3001 * strip.c (parse_opt): STATE parameter is now used.
3002 Various little cleanups.
3003
3004 * readelf.c (print_debug_line_section): Correct fallout of renaming
3005 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00003006
Roland McGrath8f31c2c2005-08-09 04:58:05 +000030072005-08-08 Roland McGrath <roland@redhat.com>
3008
3009 * strip.c (options, parse_opt): Grok -R .comment for compatibility
3010 with binutils strip. Likewise -d, -S, as aliases for -g.
3011 Likewise ignore -s/--strip-all.
3012
Roland McGrath095a01b2005-08-08 03:49:35 +000030132005-08-07 Roland McGrath <roland@redhat.com>
3014
3015 * strip.c (process_file): Open read-only when using a different output
3016 file.
3017
Ulrich Drepper47be7952005-08-07 04:41:39 +000030182005-08-06 Ulrich Drepper <drepper@redhat.com>
3019
Ulrich Drepper637963b2005-08-07 05:33:07 +00003020 * elflint.c (in_nobits_scn): New function.
3021 (check_versym): Allow references for defined symbols against versions
3022 of other DSOs also for symbols in nobits sections.
3023 Move a few variables around.
3024
Ulrich Drepper47be7952005-08-07 04:41:39 +00003025 * Makefile.am (AM_CFLAGS): Avoid duplication.
3026 Link with statis libs if BUILD_STATIC.
3027
Ulrich Drepperdbace232005-08-06 01:37:23 +000030282005-08-05 Ulrich Drepper <drepper@redhat.com>
3029
3030 * elflint.c: Many, many more tests. Mostly related to symbol
3031 versioning. Those sections should now be completely checked.
3032
3033 * readelf.c (print_dynamic): Use gelf_offscn.
3034
Ulrich Drepperacb89832005-08-04 07:01:49 +000030352005-08-04 Ulrich Drepper <drepper@redhat.com>
3036
3037 * elflint.c: Add lots more tests: more extension symbol table sanity,
3038 versioning section tests, hash table tests. General cleanup.
3039
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000030402005-08-02 Ulrich Drepper <drepper@redhat.com>
3041
Ulrich Drepper8a687742005-08-03 02:24:12 +00003042 * objdump.c: New file.
3043 * Makefile.am (bin_PROGRAMS): Add objdump.
3044 (objdump_LDADD): Define.
3045
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00003046 * elflint.c (check_reloc_shdr): New function split out from check_rela
3047 and check_rel.
3048 (check_one_reloc): New function. Likewise.
3049 (check_rela): Use check_reloc_shdr and check_one_reloc.
3050 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00003051 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
3052 section.
3053 Add checks that relocations against read-only segments are flagged,
3054 that the text relocation flag is not set unnecessarily, and that
3055 relocations in one section are either against loaded or not-loaded
3056 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00003057
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000030582005-08-01 Ulrich Drepper <drepper@redhat.com>
3059
3060 * elfcmp.c (main): Ignore section count and section name string table
3061 section index.
3062
Roland McGrathf9ece8a2005-07-28 07:03:04 +000030632005-07-27 Roland McGrath <roland@redhat.com>
3064
3065 * elfcmp.c: Include <locale.h>.
3066
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000030672005-07-27 Ulrich Drepper <drepper@redhat.com>
3068
3069 * elfcmp.c: Print name and index of differing section.
3070
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000030712005-07-24 Ulrich Drepper <drepper@redhat.com>
3072
3073 * elfcmp.c: Implement comparing gaps between sections.
3074
30752005-07-23 Ulrich Drepper <drepper@redhat.com>
3076
3077 * elflint.c: Include libeblP.h instead of libebl.h.
3078 * nm.c: Likewise.
3079 * readelf.c: Likewise.
3080 * elfcmp.c: Likewise.
3081
3082 * elfcmp.c (main): Compare individual ELF header fields, excluding
3083 e_shoff instead of the whole struct at once.
3084 Use ebl_section_strip_p instead of SECTION_STRIP_P.
3085 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
3086
30872005-07-22 Ulrich Drepper <drepper@redhat.com>
3088
3089 * elfcmp.c (main): Take empty section into account when comparing
3090 section content.
3091
3092 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
3093 using it.
3094
30952005-07-21 Ulrich Drepper <drepper@redhat.com>
3096
3097 * elfcmp.c: New file.
3098 * Makefile.am (bin_PROGRAMS): Add elfcmp.
3099 (elfcmp_LDADD): Define.
3100
3101 * elflint.c (check_rela): Check that copy relocations only reference
3102 object symbols or symbols with unknown type.
3103 (check_rel): Likewise.
3104
31052005-06-08 Roland McGrath <roland@redhat.com>
3106
3107 * readelf.c (print_ops): Add consts.
3108
31092005-05-31 Roland McGrath <roland@redhat.com>
3110
3111 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
3112 abbreviations. Print a header line before each CU section.
3113
3114 * readelf.c (print_debug_loc_section): Fix indentation for larger
3115 address size.
3116
31172005-05-30 Roland McGrath <roland@redhat.com>
3118
3119 * readelf.c (print_debug_line_section): Print section offset of each
3120 CU's table, so they are easy to find from seeing the stmt_list value.
3121
3122 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
3123 (attr_callback): Grok DW_AT_ranges and print offset in hex.
3124
3125 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
3126 (print_debug_ranges_section, print_debug_loc_section): Likewise.
3127
3128 * readelf.c (print_ops): Take different args for indentation control.
3129 (attr_callback): Caller updated.
3130 Grok several more block-form attributes as being location expressions.
3131 For those same attributes with udata forms, format output differently
3132 for location list offset.
3133 (print_debug_loc_section): Implement it for real.
3134
3135 * readelf.c (options): Mention ranges for --debug-dump.
3136 (enum section_e): Add section_ranges.
3137 (parse_opt): Grok "ranges" for -w/--debug-dump.
3138 (print_debug_ranges_section): New function.
3139 (print_debug): Handle .debug_ranges section.
3140
31412005-05-30 Ulrich Drepper <drepper@redhat.com>
3142
3143 * readelf.c (handle_notes): At least x86-64 need not have the note
3144 section values aligned to 8 bytes.
3145
31462005-05-18 Ulrich Drepper <drepper@redhat.com>
3147
3148 * readelf.c (dwarf_tag_string): Add new tags.
3149
31502005-05-08 Roland McGrath <roland@redhat.com>
3151
3152 * strip.c (handle_elf): Don't translate hash and versym data formats,
3153 elf_getdata already did it for us.
3154
31552005-05-07 Ulrich Drepper <drepper@redhat.com>
3156
3157 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
3158 (addr2line_LDADD): Likewise.
3159
31602005-05-03 Roland McGrath <roland@redhat.com>
3161
3162 * strip.c (handle_elf): Apply symbol table fixups to discarded
3163 relocation sections when they are being saved in the debug file.
3164
3165 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
3166 and gelf_xlatetof, not the native byte order.
3167
3168 * strip.c (parse_opt): Give error if -f or -o is repeated.
3169 (main): Exit if argp_parse returns nonzero.
3170
3171 * strip.c (debug_fname_embed): New variable.
3172 (options, parse_opt): New option -F to set it.
3173
31742005-05-07 Ulrich Drepper <drepper@redhat.com>
3175
3176 * readelf.c (parse_opt): Make any_control_option variable
3177 local. Simplify some tests.
3178
31792005-05-03 Roland McGrath <roland@redhat.com>
3180
3181 * strip.c (crc32_file): Function removed (now in ../lib).
3182
31832005-05-03 Roland McGrath <roland@redhat.com>
3184
3185 * elflint.c (is_debuginfo): New variable.
3186 (options, parse_opt): New option --debuginfo/-d to set it.
3187 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
3188 (check_note): If is_debuginfo, don't try to get note contents.
3189
31902005-04-24 Ulrich Drepper <drepper@redhat.com>
3191
3192 * readelf.c (print_debug_abbrev_section): Don't print error when end of
3193 section reached.
3194
31952005-04-14 Ulrich Drepper <drepper@redhat.com>
3196
3197 * readelf.c (dwarf_encoding_string): New function.
3198 (dwarf_inline_string): New function.
3199 (dwarf_access_string): New function.
3200 (dwarf_visibility_string): New function.
3201 (dwarf_virtuality_string): New function.
3202 (dwarf_identifier_case_string): New function.
3203 (dwarf_calling_convention_string): New function.
3204 (dwarf_ordering_string): New function.
3205 (dwarf_discr_list_string): New function.
3206 (attr_callback): Decode man more attribute values.
3207
32082005-04-01 Ulrich Drepper <drepper@redhat.com>
3209
3210 * addr2line.c: Finish implementation of -f option.
3211
32122005-03-29 Ulrich Drepper <drepper@redhat.com>
3213
3214 * addr2line.c: New file.
3215 * Makefile.am (bin_PROGRAMS): Add addr2line.
3216 Define addr2line_LDADD.
3217
3218 * findtextrel.c: Use new dwarf_addrdie function.
3219
3220 * findtextrel.c: Fix usage message and re-add accidentally removed
3221 line.
3222
32232005-03-28 Ulrich Drepper <drepper@redhat.com>
3224
3225 * findtextrel.c: New file.
3226 * Makefile: Add rules to build findtextrel.
3227
32282005-02-15 Ulrich Drepper <drepper@redhat.com>
3229
3230 * ldlex.l: Provide ECHO definition to avoid warning.
3231
3232 * elflint.c (check_program_header): Fix typo in RELRO test.
3233
3234 * Makefile.am (AM_CFLAGS): Add more warning options.
3235 * elflint.c: Fix warnings introduced by the new warning options.
3236 * i386_ld.c: Likewise.
3237 * ld.c: Likewise.
3238 * ld.h: Likewise.
3239 * ldgeneric.c: Likewise.
3240 * nm.c: Likewise.
3241 * readelf.c: Likewise.
3242 * sectionhash.c: Likewise.
3243 * size.c: Likewise.
3244 * string.c: Likewise.
3245
32462005-02-05 Ulrich Drepper <drepper@redhat.com>
3247
3248 * Makefile.am: Check for text relocations in constructed DSOs.
3249
3250 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
3251 with -lmudflap.
3252
3253 * ldscript.y: Add as_needed handling.
3254 * ldlex.l: Recognize AS_NEEDED token.
3255 * ld.h (struct filename_list): Add as_needed flag.
3256
32572005-02-04 Ulrich Drepper <drepper@redhat.com>
3258
3259 * elflint.c (check_symtab): Correctly determine size of GOT section.
3260
32612005-01-19 Ulrich Drepper <drepper@redhat.com>
3262
3263 * ld.c: Remove unnecessary more_help function. Print bug report
3264 address using argp.
3265 * strip.c: Likewise.
3266 * size.c: Likewise.
3267 * nm.c: Likewise.
3268 * readelf.c: Likewise.
3269 * elflint.c: Likewise.
3270
3271 * elflint.c (main): Don't check for parameter problems here.
3272 (parse_opt): Do it here, where we get informed about some of them
3273 anyway.
3274
3275 * readelf.c (main): Don't check for parameter problems here.
3276 (parse_opt): Do it here, where we get informed about some of them
3277 anyway.
3278
32792005-01-11 Ulrich Drepper <drepper@redhat.com>
3280
3281 * strip.c: Update copyright year.
3282 * readelf.c: Likewise.
3283 * size.c: Likewise.
3284 * nm.c: Likewise.
3285 * ld.c: Likewise.
3286 * elflint.c: Likewise.
3287
3288 * elflint.c (check_symtab): Don't warn about wrong size for
3289 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
3290
32912004-10-05 Ulrich Drepper <drepper@redhat.com>
3292
3293 * readelf.c (print_phdr): In section mapping, also indicate
3294 sections in read-only segments.
3295
32962004-09-25 Ulrich Drepper <drepper@redhat.com>
3297
3298 * readelf.c: Make compile with gcc 4.0.
3299 * strip.c: Likewise.
3300
33012004-08-16 Ulrich Drepper <drepper@redhat.com>
3302
3303 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
3304 allocate to work around gcc 3.4 bug.
3305
33062004-01-25 Ulrich Drepper <drepper@redhat.com>
3307
3308 * ldlex.l (invalid_char): Better error message.
3309
33102004-01-23 Ulrich Drepper <drepper@redhat.com>
3311
3312 * readelf.c: Print SHT_GNU_LIBLIST sections.
3313
3314 * none_ld.c: New file.
3315
33162004-01-21 Ulrich Drepper <drepper@redhat.com>
3317
3318 * Makefile.am: Enable building of machine specific linker.
3319
33202004-01-20 Ulrich Drepper <drepper@redhat.com>
3321
3322 * Makefile.am: Support building with mudflap.
3323
3324 * i386_ld.c: Fix warnings gcc 3.4 spits out.
3325 * ldgeneric.c: Likewise.
3326 * ldscript.y: Likewise.
3327 * readelf.c: Likewise.
3328 * strip.c: Likewise.
3329
3330 * readelf.c (print_debug_line_section): Determine address size
3331 correctly.
3332
33332004-01-19 Ulrich Drepper <drepper@redhat.com>
3334
3335 * readelf.c (print_phdr): Show which sections are covered by the
3336 PT_GNU_RELRO entry.
3337
3338 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
3339
3340 * readelf.c (print_debug_macinfo_section): Implement.
3341
33422004-01-18 Ulrich Drepper <drepper@redhat.com>
3343
3344 * readelf.c (print_debug_line_section): Implement.
3345
33462004-01-17 Ulrich Drepper <drepper@redhat.com>
3347
3348 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
3349 * src/ld.c: Likewise.
3350 * src/nm.c: Likewise.
3351 * src/readelf.c: Likewise.
3352 * src/size.c: Likewise.
3353 * src/strip.c: Likewise.
3354
3355 * strip.c: Add a few more unlikely. Reduce scope of some variables.
3356
3357 * Makefile.am: Support building with mudflap.
3358
33592004-01-16 Ulrich Drepper <drepper@redhat.com>
3360
3361 * readelf.c (print_debug_info_section): Free dies memory.
3362
3363 * readelf.c: Print .debug_info section content.
3364
33652004-01-13 Ulrich Drepper <drepper@redhat.com>
3366
3367 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
3368
33692004-01-12 Ulrich Drepper <drepper@redhat.com>
3370
3371 * readelf.c (print_debug_aranges): Implement using libdw.
3372
33732004-01-11 Ulrich Drepper <drepper@redhat.com>
3374
3375 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
3376
3377 * readelf.c: Use libdw instead of libdwarf. Not all of the old
3378 behavior is available yet.
3379 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
3380
33812004-01-09 Ulrich Drepper <drepper@redhat.com>
3382
3383 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
3384
3385 * nm.c: Implement getting information about local variables.
3386
33872004-01-07 Ulrich Drepper <drepper@redhat.com>
3388
3389 * nm.c: Read also debug information for local symbols.
3390
33912004-01-05 Ulrich Drepper <drepper@redhat.com>
3392
3393 * nm.c: Shuffle dwarf handling code around so the maximum column
3394 width can be computed ahead of printing. Avoid collection symbols
3395 which are not printed anyway.
3396
3397 * nm.c: Rewrite dwarf handling to use libdw.
3398 * Makefile.am (AM_CFLAGS): Add -std parameter.
3399 (INCLUDES): Find header in libdw subdir.
3400 (nm_LDADD): Replace libdwarf with libdw.
3401
3402 * elflint.c: Update copyright year.
3403 * readelf.c: Likewise.
3404 * size.c: Likewise.
3405 * strip.c: Likewise.
3406 * nm.c: Likewise.
3407
34082003-12-31 Ulrich Drepper <drepper@redhat.com>
3409
3410 * strip.c (process_file): Close file before returning.
3411
34122003-11-19 Ulrich Drepper <drepper@redhat.com>
3413
3414 * readelf.c (handle_dynamic): Make column for tag name wider.
3415
34162003-09-29 Ulrich Drepper <drepper@redhat.com>
3417
3418 * readelf.c (handle_dynamic): Always terminate tag name with a space.
3419
34202003-09-25 Ulrich Drepper <drepper@redhat.com>
3421
3422 * strip.c (process_file): Don't mmap the input file, we modify the
3423 data structures and don't want the change end up on disk.
3424
34252003-09-23 Jakub Jelinek <jakub@redhat.com>
3426
3427 * unaligned.h (union u_2ubyte_unaligned,
3428 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
3429 packed attribute.
3430 (add_2ubyte_unaligned, add_4ubyte_unaligned,
3431 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
3432 Read/store value through _ptr->u instead of *_ptr.
3433
34342003-09-22 Ulrich Drepper <drepper@redhat.com>
3435
3436 * size.c (show_sysv): Change type of maxlen to int.
3437
3438 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
3439 buckets.
3440
3441 * i386_ld.c: Many many fixes and extensions.
3442 * ld.c: Likewise.
3443 * ldgeneric.c: Likewise.
3444
34452003-08-16 Ulrich Drepper <drepper@redhat.com>
3446
3447 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
3448 the reference is from another DSO.
3449
34502003-08-15 Ulrich Drepper <drepper@redhat.com>
3451
3452 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
3453 point is found when creating a DSO.
3454
34552003-08-14 Ulrich Drepper <drepper@redhat.com>
3456
3457 * ld.c (main): Always call FLAG_UNRESOLVED.
3458 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
3459 undefined symbols if not creating DSO or ld_state.nodefs is not set.
3460
34612003-08-13 Ulrich Drepper <drepper@redhat.com>
3462
3463 * Makefile.in: Depend on libebl.a, not libebl.so.
3464
3465 * ld.c (main): Mark stream for linker script as locked by caller.
3466 (read_version_script): Likewise.
3467 * ldlex.c: Define fread and fwrite to _unlocked variant.
3468
3469 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
3470 target_bswap_32.
3471 * unaligned.h: Define target_bswap_16, target_bswap_32, and
3472 target_bswap_64.
3473 (store_2ubyte_unaligned, store_4ubyte_unaligned,
3474 store_8ubyte_unaligned): Define using new macros.
3475
34762003-08-12 Ulrich Drepper <drepper@redhat.com>
3477
3478 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
3479 possibly unaligned memory. Support use of big endian machines.
3480
34812003-08-11 Ulrich Drepper <drepper@redhat.com>
3482
3483 * Moved to CVS archive.