blob: 0aa85eee3f4626968005c5a714445476c0574aca [file] [log] [blame]
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +030012015-05-04 Anthony G. Basile <blueness@gentoo.org>
2
3 * Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
4 (ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD)
5 (elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD)
6 (ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD).
7
Mark Wielaardf333a1c2015-04-22 11:44:32 +020082015-03-22 Mark Wielaard <mjw@redhat.com>
9
Mark Wielaard32d5b6f2015-04-22 12:47:46 +020010 * readelf.c (print_debug_frame_section): Cast start to Dwarf_Off
11 before subtracting cie_id. And cast cie_offset to Dwarf_Off before
12 comparison.
13
142015-03-22 Mark Wielaard <mjw@redhat.com>
15
Mark Wielaardf333a1c2015-04-22 11:44:32 +020016 * readelf.c (print_gdb_index_section): Check all offsets used
17 against section d_size.
18
Mark Wielaard86de7922015-04-17 20:03:44 +0200192015-03-17 Mark Wielaard <mjw@redhat.com>
20
Mark Wielaard9b5f7952015-04-17 22:24:41 +020021 * readelf.c (print_debug): Don't return, but always use dummy_dbg.
22
232015-03-17 Mark Wielaard <mjw@redhat.com>
24
Mark Wielaard86de7922015-04-17 20:03:44 +020025 * readelf.c (print_gdb_index_section): Add overflow checking for
26 dataend checks.
27
Mark Wielaard587c4b32015-04-14 11:59:36 +0200282015-03-14 Mark Wielaard <mjw@redhat.com>
29
30 * nm.c (INTERNAL_ERROR): Remove __DATE__.
31 * objdump.c (INTERNAL_ERROR): Likewise.
32 * size.c (INTERNAL_ERROR): Likewise.
33 * strip.c (INTERNAL_ERROR): Likewise.
34
Petr Machata7f617342015-03-18 19:42:02 +0100352015-03-18 Petr Machata <pmachata@redhat.com>
36
37 * readelf.c (dwarf_tag_string, dwarf_attr_string)
38 (dwarf_form_string, dwarf_lang_string, dwarf_inline_string)
39 (dwarf_encoding_string, dwarf_access_string)
40 (dwarf_visibility_string, dwarf_virtuality_string)
41 (dwarf_identifier_case_string, dwarf_calling_convention_string)
42 (dwarf_ordering_string, dwarf_discr_list_string)
43 (dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros
44 to match the API changes.
45
Mark Wielaardae9aa3e2015-03-09 16:41:48 +0100462015-03-09 Mark Wielaard <mjw@redhat.com>
47
48 * elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage.
49
Mark Wielaarde16e1412015-01-04 00:35:25 +0100502015-01-03 Mark Wielaard <mjw@redhat.com>
51
52 * elfcmp (main): Check section name is not NULL. Check sh_entsize
53 is not zero for symbol tables. Check phdrs are not NULL.
54 (search_for_copy_reloc): Check sh_entsize is not zero.
55
Mark Wielaard0a545e62014-12-29 00:53:27 +0100562014-12-30 Mark Wielaard <mjw@redhat.com>
57
58 * elflint.c (check_scn_group): Check d_buf and name are not NULL.
59 (is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not
60 zero.
61 (check_dynamic): Check strshdr is not NULL. Check d_tag is positive.
62 (check_symtab_shndx): Check symshdr and data->d_buf are not NULL.
63 Check shdr and symshdr sh_entsize are not zero.
64 (check_gnu_hash): Make sure maskidx is smaller than bitmask_words.
65 Check symshdr->sh_entsize is not zero. Check data->d_buf is not
66 NULL.
67 (compare_hash_gnu_hash): Check sections d_buf are not NULL.
68 Check section data is large enough. Use gnu_symbias.
69 (check_group): Check section val is valid.
70 (has_copy_reloc): Check sh_entsize is not zero.
71 (check_versym): Likewise.
72 (unknown_dependency_p): Likewise.
73 (check_verneed): Break on invalid ref or offset. Don't assert.
74 Report error when next offset is zero, but more vers expected.
75 (check_verdef): Likewise.
76 (check_attributes): Make sure d_buf is not NULL.
77 (check_note): Likewise.
78 (check_note_section): Likewise.
79 (check_program_header): Make sure section name is not NULL.
80
Mark Wielaard0b799ad2014-12-26 16:12:52 +0100812014-12-26 Mark Wielaard <mjw@redhat.com>
82
Mark Wielaard555fdae2014-12-26 22:57:00 +010083 * strings.c (read_elf): Produce error when section data falls outside
84 file.
85
862014-12-26 Mark Wielaard <mjw@redhat.com>
87
Mark Wielaard309e7122014-12-26 19:36:31 +010088 * nm.c (show_symbols): Guard against divide by zero in error check.
89 Add section index number in error message.
90
912014-12-26 Mark Wielaard <mjw@redhat.com>
92
Mark Wielaard8fb260f2014-12-26 16:20:39 +010093 * nm.c (handle_ar): Skip over /SYM64/ entries.
94
952014-12-26 Mark Wielaard <mjw@redhat.com>
96
Mark Wielaard0b799ad2014-12-26 16:12:52 +010097 * nm.c (handle_ar): Break on arsym with invalid offset.
98
Mark Wielaardcda1a312014-12-21 22:55:54 +0100992014-12-20 Mark Wielaard <mjw@redhat.com>
100
Mark Wielaard8f2f5802014-12-21 23:02:12 +0100101 * readelf.c (print_debug_macinfo_section): Mark cus sentinel files
102 as -1 non-existent. Check macoff against sentinel cus.
103
1042014-12-20 Mark Wielaard <mjw@redhat.com>
105
Mark Wielaardcda1a312014-12-21 22:55:54 +0100106 * readelf.c (print_debug_exception_table): Add max_action overflow
107 check. Check action_table_end before reading slib128. Check
108 max_ar_filter underflow.
109
Ulrich Drepper898ed262014-12-18 12:32:39 -05001102014-12-18 Ulrich Drepper <drepper@gmail.com>
111
112 * Makefile.am: Suppress output of textrel_check command.
113
Mark Wielaard99a6f222014-12-17 15:07:49 +01001142014-12-17 Mark Wielaard <mjw@redhat.com>
115
116 * readelf.c (print_cfa_program): Add bounds check before each op that
117 takes at least one argument.
118
Mark Wielaardff1ce972014-12-16 16:10:28 +01001192014-12-16 Mark Wielaard <mjw@redhat.com>
120
Mark Wielaard32270932014-12-16 22:19:08 +0100121 * readelf.c (print_decoded_line_section): Print dwarf_errmsg if
122 dwarf_onesrcline or dwarf_linesrc fails.
123
1242014-12-16 Mark Wielaard <mjw@redhat.com>
125
Mark Wielaardff1ce972014-12-16 16:10:28 +0100126 * readelf.c (print_debug_line_section): Correct overflow check for
127 unit_length.
Mark Wielaardacb50692014-12-16 16:30:59 +0100128 (print_debug_aranges_section): Correct overflow check for length.
Mark Wielaardff1ce972014-12-16 16:10:28 +0100129
Mark Wielaardb171ca42014-12-15 11:35:46 +01001302014-12-15 Mark Wielaard <mjw@redhat.com>
131
Mark Wielaard6a8a9e32014-12-15 19:43:02 +0100132 * readelf.c (notice_listptr): Return false if offset doesn't fit
133 in 61-bits.
134 (attr_callback): Warn if loclist or rangelist offset doesn't fit.
135
1362014-12-15 Mark Wielaard <mjw@redhat.com>
137
Mark Wielaard198e9492014-12-15 19:05:43 +0100138 * readelf.c (print_ops): Don't assert when addr_size or ref_size
139 is not 4 or 8, just report invalid data.
140
1412014-12-15 Mark Wielaard <mjw@redhat.com>
142
Mark Wielaard2323b452014-12-15 15:34:59 +0100143 * readelf.c (print_gdb_index_section): Add more bounds checks.
144
1452014-12-15 Mark Wielaard <mjw@redhat.com>
146
Mark Wielaardb171ca42014-12-15 11:35:46 +0100147 * readelf.c (print_debug_line_section): Check there is enough room
Mark Wielaard9c42b782014-12-15 13:40:18 +0100148 for DW_LNE_set_address argument. Make sure there is enough room
149 for the the initial unit_length.
Mark Wielaardb171ca42014-12-15 11:35:46 +0100150
Mark Wielaard7a053472014-12-14 21:48:23 +01001512014-12-14 Mark Wielaard <mjw@redhat.com>
152
153 * elflint.c (check_attributes): Call get_uleb128 with end pointer.
154 * readelf.c (print_attributes): Likewise.
155 (print_ops): Likewise and also for get_sleb128.
156 (print_cfa_program): Likewise and add more readp bounds checks.
157 (read_encoded): Likewise.
158 (print_debug_frame_section): Likewise.
159 (print_debug_line_section): Likewise.
160 (print_debug_macinfo_section): Likewise.
161 (print_debug_macro_section): Likewise.
162 (print_debug_exception_table): Likewise.
163
Mark Wielaard274cbda2014-12-16 11:04:55 +01001642014-12-16 Mark Wielaard <mjw@redhat.com>
165
166 * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word
167 difference doesn't wrap around before returning as int.
168
Mark Wielaardcd339292014-12-11 17:21:22 +01001692014-12-11 Mark Wielaard <mjw@redhat.com>
170
Mark Wielaardee5693b2014-12-11 18:26:09 +0100171 * readelf.c (print_debug_exception_table): Check TType base offset
172 and Action table are sane.
173
1742014-12-11 Mark Wielaard <mjw@redhat.com>
175
Mark Wielaardcd339292014-12-11 17:21:22 +0100176 * readelf.c (print_debug_frame_section): Check number of augmentation
177 chars to print.
178
Mark Wielaarda0da7562014-12-09 12:58:07 +01001792014-12-09 Mark Wielaard <mjw@redhat.com>
180
181 * readelf.c (handle_file_note): Check count fits data section and
182 doesn't overflow fptr.
183
Mark Wielaard990fbe52014-12-08 10:11:43 +01001842014-12-08 Mark Wielaard <mjw@redhat.com>
185
186 * readelf.c (print_debug_exception_table): Report invalid data if
187 action table doesn't immediately follow call site table.
188
Josh Stoneaecdf262014-12-10 11:06:52 -08001892014-12-10 Josh Stone <jistone@redhat.com>
190
Josh Stone2098b3d2014-12-10 11:14:40 -0800191 * addr2line.c (get_diename): New, get linkage_name or name.
192 * addr2line.c (print_dwarf_function): Use get_diename.
193 * addr2line.c (handle_address): Likewise.
194 * addr2line.c (print_diesym): Removed.
195
1962014-12-10 Josh Stone <jistone@redhat.com>
197
Josh Stoneaecdf262014-12-10 11:06:52 -0800198 * addr2line.c (handle_address): Find the proper inline parents.
199
Mark Wielaard96ddcad2014-12-07 22:45:28 +01002002014-12-07 Mark Wielaard <mjw@redhat.com>
201
Mark Wielaardf0c5ef82014-12-07 23:40:12 +0100202 * readelf.c (print_debug_line_section): max_ops_per_instr cannot
203 be zero.
204
2052014-12-07 Mark Wielaard <mjw@redhat.com>
206
Mark Wielaard96ddcad2014-12-07 22:45:28 +0100207 * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref
208 and DW_OP_GNU_implicit_pointer.
209
Mark Wielaardd0070a92014-12-04 17:01:20 +01002102014-12-04 Mark Wielaard <mjw@redhat.com>
211
212 * objdump.c (show_relocs_x): Make sure destshdr exists.
213 (show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize.
214 (show_relocs_rela): Likewise.
215 (show_relocs): Make sure destshdr, symshdr and symdata exists.
216
Mark Wielaard0ed4f982014-11-30 21:03:57 +01002172014-11-30 Mark Wielaard <mjw@redhat.com>
218
219 * readelf.c (handle_sysv_hash64): Fix overflow check.
220
Mark Wielaard98755612014-11-28 22:22:16 +01002212014-11-28 Mark Wielaard <mjw@redhat.com>
222
223 * readelf.c (handle_relocs_rel): Don't reuse destshdr to store
224 section header of a relocation against a STT_SECTION symbol. Use
225 a new local variable secshdr.
226 (handle_relocs_rela): Likewise.
227
Mark Wielaard13a9fa32014-11-27 00:12:32 +01002282014-11-26 Mark Wielaard <mjw@redhat.com>
229
230 * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length
231 to ptrdiff_t for comparison.
232
Mark Wielaard020fc022014-11-24 21:54:42 +01002332014-11-24 Mark Wielaard <mjw@redhat.com>
234
235 * readelf.c (print_debug_line_section): Check line_range is not zero
236 before usage.
237
Mark Wielaard49296062014-11-23 18:26:16 +01002382014-11-23 Mark Wielaard <mjw@redhat.com>
239
240 * readelf.c (print_debug_aranges_section): Check length to catch
241 nexthdr overflow.
242
Mark Wielaard9644aaf2014-11-21 23:26:35 +01002432014-11-21 Mark Wielaard <mjw@redhat.com>
244
245 * readelf.c (print_attributes): Guard against empty section.
246 Document attribute format. Break when vendor name isn't terminated.
247 Add overflow check for subsection_len. Handle both gnu and non-gnu
248 attribute tags.
249
Mark Wielaard712c8fa2014-11-22 23:08:48 +01002502014-11-22 Mark Wielaard <mjw@redhat.com>
251
252 * elflint.c (check_sections): Call ebl_bss_plt_p without ehdr.
253 * findtextrel.c (process_file): Use elf_getphdrnum.
254 * readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check.
255 (print_phdr): Check phnum.
256 * size.c (show_segments): Use elf_getphdrnum.
257 * strip.c (handle_elf): Likewise.
258 * unstrip.c (copy_elf): Likewise.
259 (copy_elided_sections): Likewise.
260 (handle_file): Likewise.
261
Mark Wielaard86b0b132014-11-18 10:07:10 +01002622014-11-18 Mark Wielaard <mjw@redhat.com>
263
264 * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block
265 length.
266
Mark Wielaard7df0da32014-11-17 23:01:34 +01002672014-11-17 Mark Wielaard <mjw@redhat.com>
268
Mark Wielaard3b3a1912014-11-17 23:35:28 +0100269 * readelf.c (handle_verneed): Check vna_next and vn_next exist.
270 (handle_verdef): Check vda_next and vd_next exist.
271 (handle_versym): Check vd_next, vna_next and vn_next exist.
272 Check vername and filename are not NULL before use.
273
2742014-11-17 Mark Wielaard <mjw@redhat.com>
275
Mark Wielaard5c1a45c2014-11-17 23:15:45 +0100276 * elfcmp.c (main): Check section names are NULL before use.
277 * objdump.c (section_match): Likewise.
278 * size.c (show_sysv): Likewise.
279
2802014-11-17 Mark Wielaard <mjw@redhat.com>
281
Mark Wielaard7df0da32014-11-17 23:01:34 +0100282 * readelf.c (print_debug_frame_section): Warn if ptr_size is not 4
283 or 8 instead of just calling print_cfa_program.
284
Mark Wielaard2af7b492014-11-16 11:40:08 +01002852014-11-16 Mark Wielaard <mjw@redhat.com>
286
Mark Wielaard436275e2014-11-17 00:33:36 +0100287 * readelf (process_elf_file): Set phnum to zero if there aren't
288 actually any pheaders.
289 (print_phdr): Check there actually is a phdr.
290
2912014-11-16 Mark Wielaard <mjw@redhat.com>
292
Mark Wielaard2af7b492014-11-16 11:40:08 +0100293 * readelf.c (print_cfa_program): Check block len before calling
294 print_ops.
295
Mark Wielaardad87d272014-11-14 12:24:28 +01002962014-11-14 Mark Wielaard <mjw@redhat.com>
297
Mark Wielaardd1b11632014-11-14 21:42:47 +0100298 * readelf.c (print_debug_frame_section): Sanity Check CIE
299 unit_length and augmentationlen.
300
3012014-11-14 Mark Wielaard <mjw@redhat.com>
302
Mark Wielaardad87d272014-11-14 12:24:28 +0100303 * readelf.c (handle_versym): Check def == NULL before use.
304
Mark Wielaardd8b96822014-11-08 14:04:27 +01003052014-11-08 Mark Wielaard <mjw@redhat.com>
306
307 * readelf.c (handle_versym): Initialize vername and filename array
308 elements.
309
Mark Wielaard6b246e02014-11-07 12:54:02 +01003102014-11-07 Mark Wielaard <mjw@redhat.com>
311
312 * readelf.c (handle_sysv_hash): Sanity check section contents.
313 (handle_sysv_hash64): Likewise.
314 (handle_gnu_hash): Likewise.
315
Petr Machatafbf1a442014-09-14 00:47:42 +02003162014-09-14 Petr Machata <pmachata@redhat.com>
317
318 * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.
319
Petr Machata1498f542014-09-12 19:03:33 +02003202014-09-12 Petr Machata <pmachata@redhat.com>
321
322 * readelf.c (encoded_ptr_size): In the switch statement, change
323 magic constants 3 and 4 to DW_EH_PE_* counterparts. Still accept
324 0. Print diagnostic for anything else.
325
Josh Stonef1ec7442014-08-25 14:40:35 -07003262014-08-25 Josh Stone <jistone@redhat.com>
327
328 * Makefile.am: Prevent premature @AR@ replacement in a sed expression.
329
Mark Wielaarda95c4ad2014-07-04 14:30:48 +02003302014-07-04 Menanteau Guy <menantea@linux.vnet.ibm.com>
331 Mark Wielaard <mjw@redhat.com>
332
333 * elflint (check_symtab): Add ".TOC." to the list of possibly
334 dangling symbols because of sourceware PR13621.
335
Mark Wielaardc1c1c062014-06-14 17:15:37 +02003362014-06-14 Mark Wielaard <mjw@redhat.com>
337
338 * elflint (check_symtab): Use ebl_func_addr_mask on st_value.
339
Mark Wielaard903f3342014-05-27 10:25:27 +02003402014-05-27 Mark Wielaard <mjw@redhat.com>
341
342 * readelf.c (print_debug): Skip section if name is NULL.
343
Mark Wielaard22497092014-05-26 21:28:05 +02003442014-05-26 Mark Wielaard <mjw@redhat.com>
345
Mark Wielaardeb4811d2014-05-26 22:54:38 +0200346 * readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
347 does, when sh_info == 0.
348
3492014-05-26 Mark Wielaard <mjw@redhat.com>
350
Mark Wielaardbd1a0d12014-05-26 22:35:30 +0200351 * unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
352 section when sh_size of the original and undo .bss section are equal.
353
3542014-05-26 Mark Wielaard <mjw@redhat.com>
355
Mark Wielaard22497092014-05-26 21:28:05 +0200356 * unstrip.c (options): Add --force, -F.
357 (struct arg_info): Add bool force.
358 (parse_opt): Handle 'F', set force.
359 (handle_explicit_files): Add force argument, add warn function,
360 separate check ehdr field checks, use warn.
361 (handle_dwfl_module): Add force argument, pass on to
362 handle_explicit_files.
363 (handle_output_dir_module): Add force argument, pass on to
364 handle_dwfl_module.
365 (handle_implicit_modules): Pass info->force to handle_dwfl_module and
366 handle_output_dir_module.
367 (main): Pass info.force to handle_explicit_files.
368
Mark Wielaard028d0ab2014-05-19 16:52:56 +02003692014-05-19 Mark Wielaard <mjw@redhat.com>
370
371 * elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
372
Mark Wielaarddf85bf92014-05-01 14:48:27 +02003732014-05-01 Mark Wielaard <mjw@redhat.com>
374
375 * readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
376 if looking for alternate debug file.
377
Mark Wielaard93802972014-04-11 23:52:47 +02003782014-04-11 Mark Wielaard <mjw@redhat.com>
379
380 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
381
Mark Wielaard7c757b32014-04-22 22:23:18 +02003822014-04-22 Mark Wielaard <mjw@redhat.com>
383
Mark Wielaard7c680a22014-04-22 23:26:34 +0200384 * readelf.c (handle_core_item): Make sure variable length array
385 contains at least enough space for terminating zero char.
386
3872014-04-22 Mark Wielaard <mjw@redhat.com>
388
Mark Wielaard7c757b32014-04-22 22:23:18 +0200389 * readelf.c (print_gdb_index_section): Use unsigned int for 31 bits
390 left shift.
391
Mark Wielaard32324792014-04-13 17:39:57 +02003922014-03-13 Mark Wielaard <mjw@redhat.com>
393
394 * Makefile.am: Remove no_mudflap.os. Remove libmudflap from all
395 LDADD lines.
396 * strings.c (process_chunk): Remove _MUDFLAP condition.
397
Mark Wielaardf7cdc742014-04-09 22:38:07 +02003982014-04-09 Mark Wielaard <mjw@redhat.com>
399
400 * readelf.c (print_debug_aranges_section): Don't get the raw section
401 data, use the possibly decompressed .[z]debug sectiondata.
402 (print_debug_ranges_section): Likewise.
403 (print_debug_frame_section): Likewise.
404 (print_debug_line_section): Likewise.
405 (print_debug_loc_section): Likewise.
406 (print_debug_macinfo_section): Likewise.
407 (print_debug_macro_section): Likewise.
408
Mark Wielaard110c2732014-04-10 15:02:53 +02004092014-04-10 Mark Wielaard <mjw@redhat.com>
410
411 * readelf.c (buf_read_ulong): Pass actual long size to convert.
412
Mark Wielaardb9207522014-03-05 16:17:54 +01004132014-03-05 Mark Wielaard <mjw@redhat.com>
414
415 * readelf.c (attr_callback): Print DW_FORM_sdata values as signed
416 numbers.
417
Mark Wielaardcb7b2d62014-02-24 17:44:42 +01004182014-02-24 Mark Wielaard <mjw@redhat.com>
419
420 * readelf (print_phdr): Check there is a SHT_PROGBITS section at the
421 offset given by p_offsets for a PT_INTERP segment before trying to
422 display the interpreter string.
423
Mark Wielaard43c9c2d2014-02-07 14:23:24 +01004242014-02-07 Mark Wielaard <mjw@redhat.com>
425
426 * readelf.c (print_phdr): Check phdr->p_filesz and make sure
427 interpreter string is zero terminated before calling printf.
428
Mark Wielaardf48eb6b2014-01-23 00:56:41 +01004292014-01-22 Mark Wielaard <mjw@redhat.com>
430
431 * Makefile.am (nm_no_Wformat): Removed.
432 (size_no_Wformat): Likewise.
433 (strings_no_Wformat): Likewise.
434 (addr2line_no_Wformat): Likewise.
435 * size.c (show_sysv): Use fmtstr directly as literal in printf.
436 (show_sysv_one_line): Likewise.
437 * strings.c (locfmt): Removed.
438 (radix): New static enum.
439 (parse_opt): Set radix, not locfmt.
440 (process_chunk_mb): Use fmtstr directly as literal in printf based
441 on radix.
442 (process_chunk): Likewise.
443 * nm.c (show_symbols_sysv): Use fmtstr directly as literal in printf.
444 (show_symbols_bsd): Likewise.
445 (show_symbols_posix): Likewise.
446
Mark Wielaard13968d92014-01-21 16:13:49 +01004472014-01-21 Mark Wielaard <mjw@redhat.com>
448
449 * stack.c (show_inlines): New static boolean.
450 (print_frame): New function split out from...
451 (print_frames): ..here. If show_inlines is true and we found a
452 DIE for the frame address, call print_inline_frames otherwise
453 call print_frame. Keep track of and track frame_nr.
454 (print_inline_frames): New function.
455 (parse_opt): Handle '-i'.
456 (main): Add 'i' to options.
457
Mark Wielaard8520f702014-01-27 16:05:54 +01004582014-01-27 Mark Wielaard <mjw@redhat.com>
459
460 * stack.c (maxframes): Initialize to 256.
461 (main): Document new default in options. Document magic number
462 used in frames.allocated initialization.
463
Mark Wielaard247f8582014-01-20 13:49:48 +01004642014-01-20 Mark Wielaard <mjw@redhat.com>
465
Mark Wielaard531a30a2014-01-20 23:09:26 +0100466 * stack.c (show_debugname): New static boolean.
467 (die_name): New function.
468 (print_frames): If show_debugname is true set symname to the
469 first function-like DIE with a name in scope for the address in
470 the debuginfo.
471 (parse_opt): Handle '-d'.
472 (main): Add 'd' to options.
473
4742014-01-20 Mark Wielaard <mjw@redhat.com>
475
Mark Wielaard247f8582014-01-20 13:49:48 +0100476 * addr2line.c (handle_address): Initialize scopes to NULL.
477
Roland McGrath7d5b3012014-01-17 17:11:39 +01004782014-01-17 Roland McGrath <roland@redhat.com>
479
Roland McGrath58d36192014-01-17 17:12:46 +0100480 * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
481 st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
482 Don't use assert on input values, instead bail with "illformed" error.
483
4842014-01-17 Roland McGrath <roland@redhat.com>
485
Roland McGrath7d5b3012014-01-17 17:11:39 +0100486 * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
487 (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
488 (handle_scngrp): Check for bogus sh_info.
489
Jakub Jelinek71c15342014-01-17 17:07:27 +01004902014-01-17 Jakub Jelinek <jakub@redhat.com>
491
492 * elflint.c (section_name): Return "<invalid>" instead of
493 crashing on invalid section name.
494 (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
495 check_symtab_shndx, check_hash, check_versym): Robustify.
496 (check_hash): Don't check entries beyond end of section.
497 (check_note): Don't crash if gelf_rawchunk fails.
498
Petr Machataced66872014-01-17 17:00:12 +01004992014-01-17 Petr Machata <pmachata@redhat.com>
500
501 * readelf.c (handle_dynamic, handle_relocs_rel)
502 (handle_relocs_rela, handle_versym, print_liblist):
503 Use gelf_fsize instead of relying on shdr->sh_entsize.
504
Mark Wielaard04781c32014-01-14 22:13:43 +01005052014-01-14 Mark Wielaard <mjw@redhat.com>
506
507 * readelf.c (print_debug_macro_section): Clear vendor array before
508 use.
509
Jan Kratochvil7c6e7852014-01-15 21:16:57 +01005102014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
511
512 Fix corruption of non-C++ symbols by the demangler.
513 * nm.c (show_symbols_sysv, show_symbols_bsd, show_symbols_posix)
514 (show_symbols): Check for _Z.
515 * stack.c (print_frames) <USE_DEMANGLE>: Check for _Z.
516
Mark Wielaard6034e2f2014-01-02 22:31:07 +01005172014-01-02 Mark Wielaard <mjw@redhat.com>
518
Mark Wielaardda91c5b2014-01-03 00:06:31 +0100519 * stack.c (show_raw): Declare unconditionally.
520 (parse_opt): Handle '-r' unconditionally.
521 (main): Show "raw" option even without USE_DEMANGLE.
522
5232014-01-02 Mark Wielaard <mjw@redhat.com>
524
Mark Wielaard36490c92014-01-02 23:59:41 +0100525 * stack.c (print_frames): Print 0x before build-id hex-offset.
526
5272014-01-02 Mark Wielaard <mjw@redhat.com>
528
Mark Wielaard6034e2f2014-01-02 22:31:07 +0100529 * stack.c (maxframes): Increase to 2048.
530 (struct frames): Add allocated field.
531 (frame_callback): If frames used is frames allocated, realloc.
532 (print_frames): Show an error if maxframes has been reached.
533 (parse_opt): Allow -n 0 for unlimited frames.
534 (main): Document -n 0 and new default 2048 frames. Allocate initial
535 number of frames with malloc.
536
Mark Wielaard19108012013-12-30 22:00:57 +01005372013-12-30 Mark Wielaard <mjw@redhat.com>
538
539 * stack.c (parse_opt): Explicitly call dwfl_linux_proc_attach
540 or dwfl_core_file_attach and check for errors.
541
Mark Wielaarda6141d22013-12-28 23:25:54 +01005422013-12-28 Mark Wielaard <mjw@redhat.com>
543
544 * stack.c (print_frames): Remove address width code and use...
545 (get_addr_width): ...this new function.
546 (show_modules): New static boolean.
547 (module_callback): New static function.
548 (parse_opt): Handle '-l'.
549 (main): Add 'l' to options. If show_modules then use dwfl_getmodules
550 with module_callback to show all detected modules and possible
551 build_id, elf and dwarf files.
552
Mark Wielaard1f7763e2013-12-27 10:49:51 +01005532013-12-27 Mark Wielaard <mjw@redhat.com>
554
555 * stack.c (frames_shown): New static boolean.
556 (EXIT_OK,EXIT_ERROR,EXIT_BAD,EXIT_USAGES): New defines.
557 (frame_callback): Return -1 on error. Don't print error.
558 (print_frames): Add arguments, tid, dwflerr and what. Print tid.
559 If there was an error report it with address and module if possible.
560 Record whether any frames were actually printed.
561 (thread_callback): Collect tid and err, pass it to print_frames.
562 (parse_opt): Use EXIT_BAD for errors. On ARGP_KEY_END print errno
563 if dwfl_linux_proc_report returned it. Check whether we are properly
564 attached with dwfl_pid.
565 (main): Document exit status. Don't report DWARF_CB_ABORT from
566 callbacks as error. Pass real errors to print_frames. Return
567 EXIT_BAD if no frames could be shown. Return EXIT_ERROR if there
568 were any non-fatal errors.
569
Mark Wielaard99fc3f72013-12-23 00:47:06 +01005702013-12-23 Mark Wielaard <mjw@redhat.com>
571
Mark Wielaardfdb64e62013-12-23 21:19:05 +0100572 * Makefile.am (stack_LDADD): Add demanglelib.
573 * stack.c (show_quiet): New static boolean, default false.
574 (show_raw): Likewise.
575 (demangle_buffer_len): New static size_t.
576 (demangle_buffer): New static char *.
577 (print_frames): Don't resolve pc name if show_quiet. Demangle name
578 unless show_raw.
579 (parse_opt): Handle '-q' and '-r'.
580 (main): Add 'q' and 'r' to options. Free demangle_buffer.
581
5822013-12-23 Mark Wielaard <mjw@redhat.com>
583
Mark Wielaardfe9b95d2013-12-23 10:46:54 +0100584 * stack.c (OPT_DEBUGINFO): New define.
585 (OPT_COREFILE): Likewise.
586 (pid): New static.
587 (core_fd): Likewise.
588 (core): Likewise.
589 (exec): Likewise.
590 (debuginfo_path): Likewise.
591 (parse_opt): Handle '-p', '--core', '-e' and '--debuginfo-path'.
592 Do argument sanity checking. Setup Dwfl.
593 (main): Add 'p', 'core', 'e' and 'debuginfo-path' to options.
594 Remove argp_child children, simplify argp doc, remove custom
595 usage message and construction of dwfl with dwfl_standard_argp.
596 Use pid directly as tid. close core and core_fd if opened. Print
597 pid of process or core.
598
5992013-12-23 Mark Wielaard <mjw@redhat.com>
600
Mark Wielaard99fc3f72013-12-23 00:47:06 +0100601 * stack.c (show_build_id): New static boolean.
602 (print_frames): Print module build-id, load address and pc offset
603 if show_build_id is true.
604 (parse_opt): Handle '-b'.
605 (main): Add -b to options.
606
Mark Wielaard9fec14a2013-12-22 23:48:26 +01006072013-12-22 Mark Wielaard <mjw@redhat.com>
608
609 * stack.c (maxframes): New static unsigned. Initialize to 64.
610 (struct frame): New struct.
611 (struct frames): Likewise.
612 (dwfl): New static Dwfl pointer.
613 (frame_callback): Use arg as struct frames and fill it next frame.
614 Return DWARF_CB_ABORT when maxframes has been reached. Move
615 printing of frame to...
616 (print_frames): ...here. New function.
617 (thread_callback): Use arg as struct frames and set frames to zero.
618 Call print_frames.
619 (parse_opt): Handle '-n'.
620 (main): Add -n to options. Allocate frames using maxframes. Pass
621 frames to frame_callback and thread_callback.
622
Mark Wielaarde962ec32013-12-20 10:09:12 +01006232013-12-20 Mark Wielaard <mjw@redhat.com>
624
625 * stack.c (show_one_tid): New static boolean.
626 (parse_opt): Handle '-1'.
627 (main): Add -1 to options. Call dwfl_getthread_frames when
628 show_one_tid is true.
629
Mark Wielaard159ac522013-12-18 11:05:54 +01006302013-12-18 Mark Wielaard <mjw@redhat.com>
631
632 * addr2line.c (options): Add symbol-sections, 'x'.
633 (show_symbol_sections): New static bool.
634 (parse_opt): Handle 'x'.
635 (print_addrsym): Use dwfl_module_addrinfo value.r
636 Also show section of address with show_symbol_sections.
637 (find_symbol): Use dwfl_module_getsym_info and set value.
638 (handle_address): Request value and use it instead of sym.st_value.
639 * readelf.c (format_dwarf_addr): Use dwfl_module_addrinfo to get
640 name and offset.
641
Masatake YAMATOc8c610b2013-12-17 12:03:29 +09006422013-12-17 Masatake YAMATO <yamato@redhat.com>
643 Mark Wielaard <mjw@redhat.com>
644
645 * stack.c (show_activation, show_module, show_source): New variables.
646 (parse_opt): Set show_activation if -a option is given.
647 Set show_module if -m option is given. Set show_source if -s option
648 is given. Set all show booleans when -v option is given.
649 (main): Added `-a', `-m', `-s', and `-v' to the help message.
650 (frame_callback): Print module and source file information.
651
Petr Machata98c8a732013-11-26 03:10:31 +01006522013-11-25 Petr Machata <pmachata@redhat.com>
653
654 * elflint.c (valid_e_machine): Add EM_AARCH64.
655
Petr Machataa47a0962013-11-14 01:07:22 +01006562013-11-14 Petr Machata <pmachata@redhat.com>
657
658 * readelf.c (handle_core_item) <'h'>: New branch for handling
659 fields that shouldn't be displayed.
660
Mark Wielaard875cad82013-11-10 22:17:05 +01006612013-11-10 Mark Wielaard <mjw@redhat.com>
662
663 * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
664 ARGP_PROGRAM_BUG_ADDRESS_DEF.
665 (print_version): New function.
666
Mark Wielaard03d76f42013-11-09 16:45:22 +01006672013-11-09 Mark Wielaard <mjw@redhat.com>
668
669 * arlib.c (arlib_init): Call snprintf before using the result
670 with memcpy.
671 (arlib_finalize): Likewise.
672 * nm.c (show_symbols_sysv): Don't modify cnt inside assert.
673
Jan Kratochvil0b867462013-05-30 14:37:38 +02006742013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
675
676 * Makefile.am (bin_PROGRAMS): Add stack.
677 (stack_LDADD): New.
678 * stack.c: New file.
679
Mark Wielaardbe860842013-11-05 13:37:33 +01006802013-11-05 Mark Wielaard <mjw@redhat.com>
681
682 * readelf.c (print_debug_ranges_section): Cast address to size_t
683 before comparison.
684 (print_debug_loc_section): Likewise.
685
Mark Wielaard4f7673f2013-10-18 10:37:53 +02006862013-10-18 Mark Wielaard <mjw@redhat.com>
687
688 * ar.c (main): Correct operation check when instance_specifed is set.
689
Petr Machataab224102013-09-26 00:39:34 +02006902013-09-26 Petr Machata <pmachata@redhat.com>
691
Petr Machata0c9ae0c2013-09-26 21:02:22 +0200692 * readelf.c (handle_file_note): New function.
693 (handle_notes_data): Call it to handle NT_FILE notes.
694
6952013-09-26 Petr Machata <pmachata@redhat.com>
696
Petr Machataab224102013-09-26 00:39:34 +0200697 * readelf.c (handle_siginfo_note): New function.
698 (handle_notes_data): Call it to handle NT_SIGINFO notes.
699 (buf_read_int, buf_read_ulong, buf_has_data): New functions.
700
Mark Wielaard4b9e6392013-08-13 11:40:21 +02007012013-08-13 Mark Wielaard <mjw@redhat.com>
702
703 * addr2line.c (options): Add "inlines", 'i'.
704 (show_inlines): New bool.
705 (parse_opt): Handle 'i'.
706 (print_diesym): New static function.
707 (print_src): New function taking code from...
708 (handle_address): here. Call print_src. Print inlines.
709
Mark Wielaardd0f85012013-08-12 14:21:31 +02007102013-08-12 Mark Wielaard <mjw@redhat.com>
711
712 * addr2line.c (main): If there is a newline char at end of buf,
713 then remove it.
714
Mark Wielaard35230222013-07-05 16:44:47 +02007152013-07-05 Mark Wielaard <mjw@redhat.com>
716
717 * readelf.c (print_ops): Take CU as argument, use it to print
718 parameter_ref DIE offset.
719 (struct listptr): Replace base field with cu.
720 (listptr_base): New function.
721 (compare_listptr): Use listptr_base.
722 (notice_listptr): Take CU as argument.
723 (skip_listptr_hole): Likewise.
724 (print_debug_ranges_section): Pass NULL as CU to skip_listptr_hole.
725 (print_cfa_program): Pass NULL as CU to print_ops.
726 (struct attrcb_args): Replace cu_base field with cu.
727 (attr_callback): Pass cu not cu_base to notice_listptr.
728 (print_debug_units): Don't calculate base, just set cu.
729 (print_debug_loc_section): Pass cu to skip_listptr_hole and
730 print_ops.
731
Mark Wielaard63d8bfd2013-05-06 15:48:56 +02007322013-05-06 Mark Wielaard <mjw@redhat.com>
733
734 * readelf.c (print_ops): Format first DW_OP_GNU_implicit_pointer
735 argument as DIE offset.
736
Mark Wielaardcdaaf212013-04-25 16:50:11 -04007372013-04-24 Mark Wielaard <mjw@redhat.com>
738
739 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
740
Mark Wielaarda8c7f052013-03-25 21:11:53 +01007412013-03-25 Mark Wielaard <mjw@redhat.com>
742
Mark Wielaard1a094202013-03-25 14:48:06 +0100743 * readelf.c (argp_options): Add decodedline.
744 (decodedline): New boolean initialized to false.
745 (parse_opt): Set decodedline when arg is decodedline.
746 (print_decoded_line_section): New function.
747 (print_debug_line_section): Call print_decoded_line_section when
748 decodedline is true.
749
7502013-03-25 Mark Wielaard <mjw@redhat.com>
751
Mark Wielaardb79788c2013-03-25 11:45:22 +0100752 * readelf.c (argp_option): Add decodedaranges.
753 (decodedaranges): New boolean initialized to false.
754 (parse_opt): Set decodedaranges when arg is decodedaranges.
755 (print_debug_aranges_section): Reimplemented and original
756 implementation renamed to...
757 (print_decoded_aranges_section): this.
758
7592013-03-25 Mark Wielaard <mjw@redhat.com>
760
Mark Wielaarda8c7f052013-03-25 21:11:53 +0100761 * readelf.c (attrcb_args): Add Dwarf_Die.
762 (attr_callback): When highpc is in constant form also print as
763 address.
764 (print_debug_units): Set args.die.
765
Mark Wielaard10cd97e2013-03-19 11:43:49 +01007662013-03-19 Mark Wielaard <mjw@redhat.com>
767
768 * readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
769
Mark Wielaarda73fecc2013-03-18 13:54:50 +01007702013-03-18 Mark Wielaard <mjw@redhat.com>
771
772 * readelf.c (print_gdb_index_section): Accept version 8.
773
Mark Wielaarda58951b2013-03-01 11:51:58 +01007742013-03-01 Mark Wielaard <mjw@redhat.com>
775
776 * findtextrel.c (process_file): Release ELF and close file when not
777 text relocations are found.
778 * strip.c (handle_elf): Track memory used for .debuglink section data
779 and free when done.
780
Mark Wielaardb94ccea2013-02-24 22:58:49 +01007812013-02-24 Mark Wielaard <mjw@redhat.com>
782
783 * elflint.c (check_symtab): Add __bss_start__ to the list of symbols
784 allowed to have out of section values because of GNU ld bugs.
785
Mark Wielaard3bdc16c2013-02-06 16:20:17 +01007862013-02-06 Mark Wielaard <mjw@redhat.com>
787
788 * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the
789 list of symbols allowed to have out of section values because of
790 GNU ld bugs in either .symtab or .dynsym, but only when they are
791 zero sized.
792
Mark Wielaard10186a12013-01-24 11:29:21 +01007932013-01-24 Mark Wielaard <mjw@redhat.com>
794
795 * readelf.c (argp_option): Add unresolved-address-offsets, U.
796 (print_unresolved_addresses): New static.
797 (parse_opt): Handle 'U', set print_unprocessed_values.
798 (format_dwarf_addr): Take and handle new raw argument.
799 (print_ops): Call format_dwarf_addr with raw offset values.
800 (print_debug_ranges_section): Likewise.
801 (print_debug_frame_section): Likewise.
802 (attr_callback): Likewise.
803 (print_debug_line_section): Likewise.
804 (print_debug_loc_section): Likewise.
805 (print_gdb_index_section): Likewise.
806
Mark Wielaard24257102013-01-18 22:19:08 +01008072013-01-18 Mark Wielaard <mjw@redhat.com>
808
809 * readelf.c (struct listptr): Add base Dwarf_Addr field.
810 (compare_listptr): Warn for same offset with different base.
811 (notice_listptr): Take base argument and set it.
812 (skip_listptr_hole): Likewise.
813 (struct attrcb_args): Removed unused cu_offset field.
814 Add cu_base Dwarf_Addr field.
815 (attr_callback): Call notice_listptr with cbargs->cu_base.
816 (print_debug_units): Set args.cu_base.
817 (print_debug_ranges_section): Get base and use for format_dwarf_addr.
818 (print_debug_loc_section): Likewise.
819
Jan Kratochvilc44cce02012-10-10 19:32:05 +02008202013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
821
822 * readelf.c (handle_core_items): Limit special repeated items handling
823 to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there.
824
Mark Wielaard6d258ce2013-01-16 15:19:20 +01008252012-12-18 Mark Wielaard <mark@bordewijk.wildebeest.org>
826
827 * readelf.c (ELF_INPUT_SECTION): New argp key value.
828 (argp_option): Add elf-section.
829 (elf_input_section): New static.
830 (parse_opt): Handle ELF_INPUT_SECTION and set elf_input_section.
831 (open_input_section): New function.
832 (process_file): Call open_input_section if elf_input_section set.
833
David Abdurachmanov1a4d0662013-01-13 16:44:21 +01008342013-01-13 David Abdurachmanov <David.Abdurachmanov@cern.ch>
835
836 ar.c (do_oper_delete): Fix num passed to memset.
837
Mark Wielaard55324042012-12-21 10:02:11 +01008382012-12-21 Mark Wielaard <mjw@redhat.com>
839
Mark Wielaard00f758c2012-12-21 22:11:44 +0100840 * readelf.c (print_debug_frame_section): Adjust FDE start address
841 if pcrel before feeding it to format_dwarf_addr.
842
8432012-12-21 Mark Wielaard <mjw@redhat.com>
844
845 * addr2line.c (main): Call dwfl_end.
Mark Wielaard55324042012-12-21 10:02:11 +0100846
Roland McGrath57bd66c2012-12-11 09:42:07 -08008472012-12-11 Roland McGrath <roland@hack.frob.com>
848
849 * nm.c (show_symbols_sysv): Fix size passed to snprintf for invalid
850 sh_name case.
851 Reported by David Abdurachmanov <David.Abdurachmanov@cern.ch>.
852
Mark Wielaard7e3bd4f2012-11-16 12:25:04 +01008532012-10-16 Mark Wielaard <mjw@redhat.com>
854
855 * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
856 calculated beginning after the operand and 2-byte constant.
857
Jan Kratochvil4bdbb672012-10-10 22:27:58 +02008582012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
859
860 * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
861 (WRAP_COLUMN): ... here.
862 (print_core_item): Remove parameter format_max. Update function
863 comment. Replace FORMAT_MAX by the real output width.
864 (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
865 calls of print_core_item, remove variable maxfmt, change
866 ITEM_WRAP_COLUMN to WRAP_COLUMN.
867 (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
868 calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.
869
Roland McGrath82ed98a2012-10-11 14:53:18 -07008702012-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
871
872 * readelf.c (handle_core_item) <b>: Make run an outer block variable.
873 Increase run only if LASTBIT != 0. Print last element only if RUN > 0.
874
Mark Wielaarde89c5002012-08-27 14:30:05 +02008752012-08-27 Mark Wielaard <mjw@redhat.com>
876
Mark Wielaard3e440062012-08-27 15:21:58 +0200877 * readelf.c (print_debug_macro_section): Print offset as PRIx64.
878
8792012-08-27 Mark Wielaard <mjw@redhat.com>
880
Mark Wielaarde89c5002012-08-27 14:30:05 +0200881 * readelf.c (register_info): Handle loc == NULL.
882
Jeff Kenton257dcf42012-08-22 09:00:03 -04008832012-08-22 Jeff Kenton <jkenton@tilera.com>
884
885 * elflint.c (valid_e_machine): Add EM_TILEGX and EM_TILEPRO.
886
Mark Wielaardf31c4412012-08-17 00:35:03 +02008872012-08-16 Mark Wielaard <mjw@redhat.com>
888
889 * readelf.c (dwarf_tag_name): Renamed from dwarf_tag_string.
890 Uses new dwarf_tag_string or adds ??? or lo_user+%#x when
891 appropriate.
892 (dwarf_attr_name): Likewise.
893 (dwarf_form_name): Likewise.
894 (dwarf_lang_name): Likewise.
895 (dwarf_inline_name): Likewise.
896 (dwarf_encoding_name): Likewise.
897 (dwarf_access_name): Likewise.
898 (dwarf_visibility_name): Likewise.
899 (dwarf_virtuality_name): Likewise.
900 (dwarf_identifier_case_name): Likewise.
901 (dwarf_calling_convention_name): Likewise.
902 (dwarf_ordering_name): Likewise.
903 (dwarf_discr_list_name): Likewise.
904 (print_ops): Remove KNOWN. Use dwarf_locexpr_opcode_string.
905 (attr_callback): Call new dwarf_foobar_name instead of old
906 dwarf_foobar_string functions.
907 (dwarf_tag_string): New function using known-dwarf.h macros.
908 (dwarf_attr_string): Likewise.
909 (dwarf_form_string): Likewise.
910 (dwarf_lang_string): Likewise.
911 (dwarf_inline_string): Likewise.
912 (dwarf_encoding_string): Likewise.
913 (dwarf_access_string): Likewise.
914 (dwarf_visibility_string): Likewise.
915 (dwarf_virtuality_string): Likewise.
916 (dwarf_identifier_case_string): Likewise.
917 (dwarf_calling_convention_string): Likewise.
918 (dwarf_ordering_string): Likewise.
919 (dwarf_discr_list_string): Likewise.
920 (dwarf_locexpr_opcode_string): Likewise.
921
Mark Wielaard775375e2012-06-22 12:02:45 +02009222012-06-27 Mark Wielaard <mjw@redhat.com>
923
924 * readelf.c (dwarf_form_string): Handle DW_FORM_GNU_ref_alt and
925 DW_FORM_GNU_strp_alt.
926 (attr_callback): Likewise.
927
Petr Machatafe198bc2012-07-30 19:48:28 +02009282012-07-30 Petr Machata <pmachata@redhat.com>
929
930 * nm.c (show_symbols_bsd): Reorder arguments in {S,}FMTSTRS (and
931 corresponding printf) so that those that are referenced by only
932 one of the formatting strings are at the end.
933
Mark Wielaard629b2562012-07-29 14:05:20 +02009342012-07-29 Mark Wielaard <mjw@redhat.com>
935
936 * readelf.c (dwarf_lang_string): Use DW_LANG_ObjC, not DW_LANG_Objc.
937 (print_ops): Use known[op], not op_name, for DW_OP_GNU_parameter_ref.
938
Mark Wielaard515fba92012-07-20 00:09:56 +02009392012-07-19 Mark Wielaard <mjw@redhat.com>
940
941 * readelf.c (print_ops): Handle DW_OP_GNU_parameter_ref.
942
Mark Wielaarde9b23882012-06-29 22:30:15 +02009432012-07-11 Mark Wielaard <mjw@redhat.com>
944
945 * readelf.c (options): Add macro to help of debug-dump.
946 (section_e): Add section_macro.
947 (section_all): Add section_macro.
948 (parse_opt): Handle macro.
949 (print_debug_macro_section): New function.
950 (print_debug): Add NEW_SECTION (macro).
951
Mark Wielaard84a1e0b2012-06-29 23:38:09 +02009522012-07-10 Mark Wielaard <mjw@redhat.com>
953
954 * readelf.c (print_gdb_index_section): Add version 7 support.
955 Keep track of cu_nr. Print kind and static/global flag for each
956 symbol. When a symbol is in the TU list add 'T'.
957
Mark Wielaarda0172d72012-06-25 17:18:53 +02009582012-06-26 Mark Wielaard <mjw@redhat.com>
959
960 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_macros.
961
Mark Wielaard50e2d392012-06-22 16:44:54 +02009622012-06-22 Mark Wielaard <mjw@redhat.com>
963
964 * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
965 for gcc 4.7 -Wformat.
966
Mark Wielaard36aa5982012-05-09 11:27:44 +02009672012-05-09 Roland McGrath <roland@hack.frob.com>
968
969 * elflint (check_sections): Allow zero sized sections at (filesz) end
970 of segment. And make check overflow-proofed.
971
Mark Wielaard716486d2012-04-24 11:56:42 +02009722012-04-24 Mark Wielaard <mjw@redhat.com>
973
974 * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
975 DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
976
Roland McGrath738c1832012-03-28 15:01:49 -07009772012-03-28 Roland McGrath <roland@hack.frob.com>
978
979 * elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
980
Mark Wielaard61651c12012-03-28 11:20:36 +02009812012-03-28 Mark Wielaard <mjw@redhat.com>
982
983 * readelf.c (print_debug_abbrev_section): Check there is Dwarf
984 section data.
985 (print_debug_str_section): Likewise.
986
Mark Wielaard30bb7142012-03-21 16:05:31 +01009872012-03-21 Mark Wielaard <mjw@redhat.com>
988
989 * readelf.c (print_gdb_index_section): Accept version 6.
990
Mark Wielaardcb643d62012-01-31 19:22:03 +01009912012-01-31 Mark Wielaard <mjw@redhat.com>
992
993 * readelf.c (attr_callback): Don't special case DW_FORM_sec_offset.
994
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05009952012-01-21 Ulrich Drepper <drepper@gmail.com>
996
Ulrich Drepper3a64a302012-01-21 18:19:24 -0500997 * addr2line.c: Update copyright year.
998 * ar.c: Likewise.
999 * elfcmp.c: Likewise.
1000 * elflint.c: Likewise.
1001 * findtextrel.c: Likewise.
1002 * ld.c: Likewise.
1003 * nm.c: Likewise.
1004 * objdump.c: Likewise.
1005 * ranlib.c: Likewise.
1006 * readelf.c: Likewise.
1007 * size.c: Likewise.
1008 * strings.c: Likewise.
1009 * strip.c: Likewise.
1010 * unstrip.c: Likewise.
1011
Ulrich Drepperc6b3d0c2012-01-21 18:14:39 -05001012 * nm.c (argp_children): Define.
1013 (argp): Hook up argp_children.
1014 (handle_ar): Optimize puts call.
1015 (show_symbols_bsd): Use positional parameters to also print color
1016 codes. Don't print STT_FILE symbols.
1017 * objdump.c (options): Improve help text.
1018 (argp_children): Define.
1019 (argp): Hook up argp_children.
1020 (disasm_info): Add elements for color codes.
1021 (disasm_output): Print color codes as well.
1022 (show_disasm): Set up disasm_info data for callback.
1023
Roland McGrath85924782012-01-20 11:40:59 -080010242012-01-20 Roland McGrath <roland@hack.frob.com>
1025
Roland McGrath3284b792012-01-20 12:51:46 -08001026 * arlib-argp.c (arlib_deterministic_output): Initialize from
1027 configured value.
1028 (help_filter): New function.
1029 (argp): Use it.
1030
Roland McGrath9bffd362012-01-20 12:04:19 -08001031 * ar.c (main): Handle oper_none as usage error.
1032
Roland McGrath6e063d92012-01-20 11:43:36 -08001033 * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
1034
Roland McGrath85924782012-01-20 11:40:59 -08001035 * ranlib.c (argp): Use arlib_argp_children.
1036
1037 * arlib.c (arlib_init): Obey arlib_deterministic_output.
1038
1039 * arlib-argp.c: New file.
1040 * Makefile.am (libar_a_SOURCES): Add it.
1041 * arlib.h (arlib_deterministic_output, arlib_argp_children):
1042 Declare new variables.
1043 * ar.c (deterministic_output): Variable removed.
1044 (do_oper_insert): Use arlib_deterministic_output instead.
1045 (options, parse_opt): Don't handle -D here. Add group numbers.
1046 (argp): Use arlib_argp_children.
1047
Roland McGratha065c4b2011-12-20 10:55:01 -080010482011-12-20 Roland McGrath <roland@hack.frob.com>
1049
1050 * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
1051 Reported by Karel Klic <kklic@redhat.com>.
1052
Roland McGrath4fa988e2011-11-05 20:58:14 -070010532011-11-05 Roland McGrath <roland@hack.frob.com>
1054
Roland McGrathe5ba2a12011-11-05 21:08:07 -07001055 * ar.c (deterministic_output): New flag variable.
1056 (options, parse_opt): Grok -D to set it.
1057 (do_oper_insert): When set, use zero from mtime, uid, and gid.
1058
Roland McGrath4fa988e2011-11-05 20:58:14 -07001059 * ar.c (do_oper_insert): Fix check on elf_rawfile return value.
1060
Marek Polacek8d1e2972011-10-04 05:11:42 -040010612011-10-04 Marek Polacek <mpolacek@redhat.com>
1062
1063 * readelf.c (register_info): Assume the right size of an array.
1064
Ulrich Drepper2356ba02011-10-03 07:23:07 -040010652011-10-03 Ulrich Drepper <drepper@gmail.com>
1066
1067 * nm.c: Recognize option --mark-special. Still recognize --mark-weak
1068 but don't show it in help anymore.
1069 (mark_special): Renamed from mark_weak.
1070 (parse_opt): Adjust.
1071 (class_type_char): Take additional parameters for ELF file and ELF
1072 header. Treat TLS symbols like objects.
1073 In case of D symbols, show u for unique symbols, R for symbols in
1074 read-only sections, B for symbols in BSS sections.
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001075 (show_symbols_bsd): Take additional parameters for ELF file and ELF
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001076 header. Adjust for class_type_char change. Show TLS symbols with
1077 @ after them in case --mark-special is selected.
1078 (show_symbols_posix): Likewise.
1079 (show_symbols): Adjust calls to show_symbols_bsd and
1080 show_symbols_posix.
Ulrich Drepper66f4c372011-10-03 15:53:12 -04001081 (show_symbols_sysv): Avoid printing adress and size for undefined
Ulrich Drepper21b5d4c2011-10-03 16:08:33 -04001082 symbols. Don't print initial special entry and section entries.
Ulrich Drepper2356ba02011-10-03 07:23:07 -04001083
Ulrich Drepperb4a16cf2011-10-02 08:33:19 -040010842011-10-02 Ulrich Drepper <drepper@gmail.com>
1085
1086 * Makefile.am (demanglelib): Define.
1087 (nm_LDADD): Add demanglelib.
1088 * nm.c (options): Add -C option.
1089 (demangle): Define as global variable.
1090 (parse_opt): Recognize -C.
1091 (show_symbols_sysv): Handle demangling.
1092 (show_symbols_bad): Likewise.
1093 (show_symbols_posix): Likewise.
1094 (show_symbols): Likewise.
1095
Roland McGrathb0a0e0d2011-07-09 03:20:16 -070010962011-07-09 Roland McGrath <roland@hack.frob.com>
1097
Roland McGrathbd754192011-07-09 05:33:37 -07001098 * readelf.c (options, parse_opt): Grok -W/--wide and ignore it.
1099
1100 * ar.c (parse_opt): Grok -u.
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001101
Mark Wielaard02a958b2011-05-30 17:23:57 +020011022011-05-30 Mark Wielaard <mjw@redhat.com>
1103
1104 * strip.c (relocate): Make offset check overflow-proof.
1105
Mark Wielaard1662bc32011-05-16 11:33:11 +020011062011-05-23 Mark Wielaard <mjw@redhat.com>
1107
Mark Wielaard63868c22011-05-24 16:09:31 +02001108 * strip.c (relocate): Take new arguments is_rela to indicate
Roland McGrathb0a0e0d2011-07-09 03:20:16 -07001109 whether the relocation is from a SHT_REL or SHT_RELA section.
Mark Wielaard63868c22011-05-24 16:09:31 +02001110 Relocate against any debug section symbol, not just STT_SECTION
1111 symbols. For SHT_REL relocations, fetch addend from offset and
1112 add it to symbol value if not zero.
1113
11142011-05-23 Mark Wielaard <mjw@redhat.com>
1115
Mark Wielaard1662bc32011-05-16 11:33:11 +02001116 * strip.c (OPT_RELOC_DEBUG): New option.
1117 (argp_option): Add new --reloc-debug-sections option.
1118 (main): Check new option.
1119 (parse_opt): Likewise.
1120 (handle_elf): Remove any relocations between debug sections
1121 in ET_REL for the debug file when requested.
1122
Mark Wielaard7a125b92011-05-17 12:20:01 +020011232011-05-18 Mark Wielaard <mjw@redhat.com>
1124
1125 * strip.c (handle_elf): Make sure all sections of a removed group
1126 section are removed too. Don't discard SHT_GROUP sections, copy
1127 section table before it gets modified. Section group signature
1128 symbols don't have to be retained.
1129
Jakub Jelinek03124242011-05-17 17:00:14 +020011302011-05-16 Jakub Jelinek <jakub@redhat.com>
1131
1132 * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
1133 DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
1134 and DW_OP_GNU_reinterpret.
1135
Mark Wielaard69a9b112011-05-17 15:34:02 +020011362011-05-17 Mark Wielaard <mjw@redhat.com>
1137
1138 * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
1139 DW_TAG_GNU_call_site_parameter return strings.
1140
Marek Polacekc8920de2011-05-12 12:08:21 +020011412011-05-11 Marek Polacek <mpolacek@redhat.com>
1142
1143 * nm.c (show_symbols_sysv): Remove unused if/else, remove
1144 unused `prefix' and `fname' parameters.
1145
Marek Polacek82f77d72011-05-07 19:26:20 +020011462011-05-07 Marek Polacek <mpolacek@redhat.com>
1147
1148 * unstrip.c (compare_sections_nonrel): Mark this function as static.
1149
Mark Wielaardbb9d1b42011-04-24 17:53:38 +020011502011-04-26 Mark Wielaard <mjw@redhat.com>
1151
1152 * readelf.c (handle_notes_data): Call ebl_object_note_type_name
1153 with note name.
1154
Mark Wielaard093a1d32011-04-14 23:47:26 +020011552011-04-14 Mark Wielaard <mjw@redhat.com>
1156
1157 * readelf.c (options): Add gdb_index.
1158 (section_e): Define section_gdb_index.
1159 (parse_opt): Recognize gdb_index debug-dump argument.
1160 (print_gdb_index_section): New function.
1161 (print_debug): Add gdb_index to debug_sections.
1162
Petr Machata1879e5b2011-03-25 15:17:04 +010011632011-03-24 Petr Machata <pmachata@redhat.com>
1164
1165 * readelf.c (print_debug_line_section): Emit initial space for all
1166 opcode lines. Print offset in front of each opcode.
1167
Marek Polacek44de92a2011-03-22 01:07:20 +010011682011-03-22 Marek Polacek <mpolacek@redhat.com>
1169
1170 * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
1171
Mark Wielaarde3368c52011-03-22 23:03:31 +010011722011-03-22 Mark Wielaard <mjw@redhat.com>
1173
1174 * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
1175 and DW_TAG_GNU_call_site_parameter.
1176 (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
1177 DW_AT_GNU_call_site_data_value,
1178 DW_AT_GNU_call_site_target,
1179 DW_AT_GNU_call_site_target_clobbered,
1180 DW_AT_GNU_tail_call,
1181 DW_AT_GNU_all_tail_call_sites,
1182 DW_AT_GNU_all_call_sites,
1183 and DW_AT_GNU_all_source_call_sites.
1184 (print_ops): Handle DW_OP_GNU_entry_value.
1185 (attr_callback): Handle DW_AT_GNU_call_site_value,
1186 DW_AT_GNU_call_site_data_value,
1187 DW_AT_GNU_call_site_target,
1188 and DW_AT_GNU_call_site_target_clobbered.
1189
Mark Wielaarda062b6b2011-03-10 13:02:32 +010011902011-03-10 Mark Wielaard <mjw@redhat.com>
1191
1192 * elflint.c (check_symtab): Use ebl_check_st_other_bits.
1193
Jan Kratochvilfec39992011-02-27 12:01:25 -080011942011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
1195
1196 * readelf.c (reset_listptr): Clear TABLE->TABLE.
1197
Mark Wielaardcf454ab2011-02-25 12:58:54 +010011982011-02-25 Mark Wielaard <mjw@redhat.com>
1199
1200 * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
1201 (dwarf_form_string): Properly format and return unknown form.
1202
Roland McGrath47c53232011-02-23 09:23:08 -080012032011-02-23 Roland McGrath <roland@redhat.com>
1204
Roland McGrath725aad52011-02-23 19:52:46 -08001205 * readelf.c (section_name): New function.
1206 (print_debug_abbrev_section): Use it instead of constant.
1207 (print_debug_aranges_section): Likewise.
1208 (print_debug_ranges_section): Likewise.
1209 (print_debug_units): Likewise.
1210 (print_debug_line_section): Likewise.
1211 (print_debug_loc_section): Likewise.
1212 (print_debug_macinfo_section): Likewise.
1213 (print_debug_pubnames_section): Likewise.
1214 (print_debug_str_section): Likewise.
1215 (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
1216 (print_debug_abbrev_section): Use decoded d_size, not sh_size.
1217 (print_debug_str_section): Likewise.
1218
Roland McGrath47c53232011-02-23 09:23:08 -08001219 * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
1220
Roland McGrath1fb9c912011-02-11 10:32:30 -080012212011-02-11 Roland McGrath <roland@redhat.com>
1222
Roland McGrath4a14ef72011-02-11 10:42:45 -08001223 * elfcmp.c (verbose): New variable.
1224 (options, parse_opt): Grok -l/--verbose to set it.
1225 (main): Under -l, keep going after first difference.
1226
Roland McGrath1fb9c912011-02-11 10:32:30 -08001227 * elfcmp.c (ignore_build_id): New variable.
1228 (options, parse_opt): Grok --ignore-build-id to set it.
1229 (main): For SHT_NOTE sections, compare note details rather than raw
1230 bytes. Under --ignore-build-id, don't complain about differing build
1231 ID contents if lengths match.
1232
Roland McGrathfd992542011-02-08 19:45:12 -080012332011-02-08 Roland McGrath <roland@redhat.com>
1234
Roland McGrath240784b2011-02-08 19:48:42 -08001235 * ldscript.y (filename_id_star): Remove unused variable.
1236
Roland McGrath8f6c1792011-02-08 19:48:02 -08001237 * unstrip.c (copy_elided_sections): Remove unused variable.
1238
Roland McGrath4db89f02011-02-08 19:46:50 -08001239 * elflint.c (check_dynamic): Remove unused variables.
1240
Roland McGrath33231312011-02-08 19:45:26 -08001241 * elflint.c (check_symtab): Warn about missing xndx section only once.
1242
Roland McGrathfd992542011-02-08 19:45:12 -08001243 * ldgeneric.c (check_for_duplicate2): Remove unused variable.
1244
Roland McGrathf151b7d2011-01-06 12:14:43 -080012452011-01-06 Roland McGrath <roland@redhat.com>
1246
1247 * strip.c (handle_elf): Under --strip-sections, remove all
1248 non-allocated sections and never generate .gnu_debuglink.
1249
Roland McGrath0b9d1fb2011-01-04 19:29:24 -080012502011-01-04 Roland McGrath <roland@redhat.com>
1251
1252 * strip.c (remove_shdrs): New variable.
1253 (options, parse_opt): Grok --strip-sections to set it.
1254 (handle_elf): When that's set, truncate off .shstrtab and shdrs.
1255
Roland McGrath77221de2010-11-10 19:47:31 -080012562010-11-10 Roland McGrath <roland@redhat.com>
1257
1258 * findtextrel.c (process_file): Don't assume order of sections.
1259 Reported by Mike Hommey <mh@glandium.org>.
1260
Roland McGrath932585d2010-05-08 04:01:14 -070012612010-07-26 Roland McGrath <roland@redhat.com>
1262
1263 * readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.
1264
Roland McGratha1599152010-08-30 04:04:37 -070012652010-08-30 Roland McGrath <roland@redhat.com>
1266
Roland McGrathfa144952010-08-30 19:22:41 -07001267 Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
1268 * readelf.c (parse_opt): Add section_info to implicit_debug_sections
1269 for ranges, loc.
1270 (struct listptr, struct listptr_table): New types.
1271 (compare_listptr, reset_listptr, sort_listptr): New functions.
1272 (notice_listptr, skip_listptr_hole): New functions.
1273 (struct attrcb_args): Add silent member.
1274 (attr_callback): Call notice_listptr for loclistptr and rangelistptr.
1275 Suppress output if silent, but still call notice_listptr.
1276 (print_debug_units): Suppress output if section_info not requested.
1277 (print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
1278 (print_debug_ranges_section): Likewise.
1279 (print_debug): Call reset_listptr on both tables.
1280
1281 * readelf.c (print_debug_ranges_section): Print empty list.
1282 (print_debug_loc_section): Likewise.
1283
Roland McGratha1599152010-08-30 04:04:37 -07001284 * readelf.c (print_debug_loc_section): Check for bogus length
1285 before calling print_ops.
1286 (print_ops): Check harder for bogus data that would read off end.
1287
Roland McGrathf4763cf2010-08-11 13:04:12 -070012882010-08-11 Roland McGrath <roland@redhat.com>
1289
1290 * readelf.c (for_each_section_argument): Process all sections with
1291 matching name, not just the first.
1292
Roland McGrath52604ba2010-07-26 21:29:44 -070012932010-07-26 Roland McGrath <roland@redhat.com>
1294
1295 * readelf.c (print_ops): Take new argument for CU version.
1296 Fix DW_OP_call_ref decoding to depend on it.
1297 (print_debug_loc_section): Update caller.
1298 (print_cfa_program): Take new argument, pass it down.
1299 (print_debug_frame_section): Update caller.
1300 (struct attrcb_args): New member version.
1301 (print_debug_units): Initialize it.
1302
Roland McGrath2f14a312010-07-02 11:16:25 -070013032010-07-02 Roland McGrath <roland@redhat.com>
1304
1305 * readelf.c (print_debug_frame_section): Use format_dwarf_addr for
1306 initial_location.
1307
Roland McGrathb6458032010-06-30 11:57:19 -070013082010-06-30 Roland McGrath <roland@redhat.com>
1309
1310 * strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
1311 Ignore st_size for a non-S_ISREG file descriptor.
1312 (read_block): Move assert after no-mmap bail-out.
1313 (read_block_no_mmap): Fix size calculations for moving buffer remnant.
1314
Roland McGrathfa799902010-06-22 13:05:23 -070013152010-06-22 Roland McGrath <roland@redhat.com>
1316
1317 * readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.
1318
Roland McGrath0c5638c2010-06-21 23:00:35 -070013192010-06-21 Roland McGrath <roland@redhat.com>
1320
1321 * readelf.c (dwarf_tag_string): Handle new v4 tags.
Roland McGrath474cb482010-06-22 00:10:54 -07001322 (dwarf_attr_string): Add new attributes.
1323 (dwarf_tag_string): Handle DW_TAG_GNU_*.
Roland McGrath0c5638c2010-06-21 23:00:35 -07001324
1325 * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
1326 (print_cfa_program): Likewise.
1327
Roland McGrathe5251a12010-06-20 16:59:39 -070013282010-06-20 Roland McGrath <roland@redhat.com>
1329
Roland McGrath2b1f0952010-06-20 17:55:50 -07001330 * readelf.c (print_debug_units): New function, broken out of ...
1331 (print_debug_info_section): ... here. Call it.
1332 (print_debug_types_section): New function.
1333 (enum section_e): Add section_types alias for section_info.
1334 (print_debug): Add types to the sections table.
1335
Roland McGrath599f7f52010-06-20 17:12:43 -07001336 * readelf.c (print_debug_frame_section): Handle version 4 format.
1337
Roland McGrathe5251a12010-06-20 16:59:39 -07001338 * readelf.c (print_debug_line_section): Handle version 4 format.
1339
Roland McGrathec86e5f2010-06-14 17:44:38 -070013402010-06-14 Roland McGrath <roland@redhat.com>
1341
1342 * unstrip.c (copy_elided_sections): Make sure all sections' data have
1343 been read in before we write anything out.
1344
Roland McGrath3b1b6512010-06-04 02:26:30 -070013452010-06-04 Roland McGrath <roland@redhat.com>
1346
Roland McGrathaa32f922010-06-04 02:29:08 -07001347 * unstrip.c (update_shdr): New function.
1348 (update_sh_size): Call it instead of gelf_update_shdr.
1349 (adjust_relocs, add_new_section_symbols): Likewise.
1350 (new_shstrtab, copy_elided_sections): Likewise.
1351
Roland McGrath3b1b6512010-06-04 02:26:30 -07001352 * unstrip.c (copy_elided_sections): Bail if stripped file has more
1353 sections than unstripped file, rather than getting confused later.
1354
Roland McGrath7a5bed82010-06-01 13:44:00 -070013552010-06-01 Roland McGrath <roland@redhat.com>
1356
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001357 * readelf.c (dwarf_form_string): Handle DWARF 4 forms.
1358 (attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
Roland McGrathc8a06732010-06-01 19:52:39 -07001359 DW_FORM_sec_offset, DW_FORM_ref_sig8.
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001360
Roland McGrath7a5bed82010-06-01 13:44:00 -07001361 * readelf.c (print_debug): Don't bail if libdw setup fails.
1362 Suppress complaint if we only want .eh_frame anyway.
1363
Ulrich Drepper173ade82010-05-28 07:39:49 -070013642010-05-28 Ulrich Drepper <drepper@redhat.com>
1365
1366 * readelf.c (attr_callback): Also print form information.
1367
Roland McGrath12e3d1f2010-05-19 18:03:31 -070013682010-05-19 Roland McGrath <roland@redhat.com>
1369
1370 * addr2line.c (find_symbol): Short-circuit on empty name.
1371 (handle_address): Handle SYMBOL with no +OFFSET.
1372
Roland McGrath688f7fc2010-05-08 03:22:59 -070013732010-05-08 Roland McGrath <roland@redhat.com>
1374
1375 * readelf.c (print_ops): Take new arg OFFSET_SIZE.
1376 Use that for DW_OP_call_ref, not ADDRSIZE.
1377 (print_cfa_program): Update caller.
1378 (struct attrcb_args): Add offset_size field.
1379 (attr_callback): Use it for print_ops call.
1380 (print_debug_info_section): Initialize it.
Roland McGrath932585d2010-05-08 04:01:14 -07001381 (print_ops): Likewise.
Roland McGrath50aa8d12010-06-01 11:22:36 -07001382
Roland McGrath62b28b62010-04-14 11:54:06 -070013832010-04-14 Roland McGrath <roland@redhat.com>
1384
1385 * readelf.c (handle_core_item): Fix bitmask printing.
1386
Roland McGrath3b495d82010-04-06 12:58:32 -070013872010-04-06 Roland McGrath <roland@redhat.com>
1388
1389 * ld.c (options): Fix some typos in messages.
1390 * elflint.c (check_scn_group, check_group): Likewise.
1391 * ldscript.y (add_id_list): Likewise.
1392 * readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
1393 before translated string containing a literal %.
1394
Roland McGrath890081b2010-02-26 17:57:50 -080013952010-02-26 Roland McGrath <roland@redhat.com>
1396
1397 * readelf.c (process_file): Don't leak an fd in failure case.
1398
Roland McGrathc2b26f12010-02-15 15:16:15 -080013992010-02-15 Roland McGrath <roland@redhat.com>
1400
Roland McGrath22359e22010-02-15 15:57:03 -08001401 * Makefile.am: Use config/eu.am for common stuff.
1402
Roland McGrathc2b26f12010-02-15 15:16:15 -08001403 * readelf.c (print_debug_frame_section): Add a cast to avoid sign
1404 mismatch in comparison.
1405
Roland McGrathf920fd52010-02-02 15:50:15 -080014062010-02-02 Roland McGrath <roland@redhat.com>
1407
1408 * readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
1409 (read_encoded): Likewise.
1410 (print_debug_frame_section): Check for bogus augmentation length.
1411 For P augmentation, use read_encoded, print the encoding description,
1412 and use hex for unsigned values.
1413
Roland McGrathb337b1f2010-01-15 01:02:27 -080014142010-01-15 Roland McGrath <roland@redhat.com>
1415
1416 * ar.c: Include <sys/stat.h>.
1417 * elflint.c: Likewise.
1418 * readelf.c: Likewise.
1419 * strip.c: Likewise.
1420 * unstrip.c: Likewise
1421
Roland McGrathbd733ca2010-01-07 20:11:42 -080014222010-01-07 Roland McGrath <roland@redhat.com>
1423
Roland McGrath8111da02010-01-07 20:31:59 -08001424 * readelf.c (print_ehdr): Handle PN_XNUM.
1425 (phnum): New static variable.
1426 (process_elf_file): Set it with elf_getphdrnum.
1427 (print_phdr): Use phnum instead of EHDR->e_phnum.
1428 (print_dynamic, handle_notes): Likewise.
1429 (handle_relocs_rel, handle_relocs_rela): Likewise.
1430
Roland McGrathbd733ca2010-01-07 20:11:42 -08001431 * elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.
1432
1433 * elflint.c (phnum): New static variable.
1434 (check_elf_header): Set it, handling PN_XNUM.
1435 Use that in place of EHDR->e_phnum throughout.
1436 (check_symtab, check_reloc_shdr, check_dynamic): Likewise.
1437 (unknown_dependency_p, check_sections, check_program_header): Likewise.
1438
Roland McGrath019d9fb2010-01-05 13:36:07 -080014392010-01-05 Roland McGrath <roland@redhat.com>
1440
1441 * readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
1442 DW_AT_GNU_template_name.
1443
Roland McGrathe4061d02010-01-04 20:25:09 -080014442010-01-04 Roland McGrath <roland@redhat.com>
1445
Roland McGrath0ccbbcd2010-01-04 21:59:07 -08001446 * readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
1447 (handle_core_note): Pass NHDR and NAME to ebl_core_note.
1448 (handle_core_item): Handle .format of '\n' as \n-separated strings.
1449
Roland McGrath2e79deb2010-01-04 20:36:10 -08001450 * readelf.c (implicit_debug_sections): New variable.
1451 (parse_opt): Set it instead of print_debug_sections for -a.
1452 OR them together for print_debug check.
1453 (print_debug): OR them together for section check.
1454
Roland McGratha7422be2010-01-04 20:29:33 -08001455 * readelf.c (options): Repartition into set implied by -a and others.
1456 Correct -a text to match reality.
1457
Roland McGrathe4061d02010-01-04 20:25:09 -08001458 * readelf.c (struct section_argument): Add bool member 'implicit'.
1459 (parse_opt): Set it for -a cases, clear it for -x args.
1460 (for_each_section_argument): Don't complain about a missing section by
1461 name if it's implicit.
1462
Roland McGrathefa64962009-11-16 01:50:58 -080014632009-11-16 Roland McGrath <roland@redhat.com>
1464
1465 * readelf.c (print_string_section): Punt SHT_NOBITS like empty
1466 sections, just as dump_data_section already does.
1467
Mark Wielaardc49d00a2009-09-21 16:47:07 -070014682009-09-21 Ulrich Drepper <drepper@redhat.com>
1469
1470 * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
1471 set for .comment section.
1472 Patch by Mark Wielaard <mjw@redhat.com>.
1473
Roland McGrathfb33c672009-09-08 00:21:18 -070014742009-09-08 Roland McGrath <roland@redhat.com>
1475
1476 * ar.c (main): Fix typo in message format.
1477
Roland McGrath2d13ea22009-08-21 03:16:32 -070014782009-08-21 Roland McGrath <roland@redhat.com>
1479
1480 * readelf.c (attr_callback): Use print_block only when we don't use
1481 print_ops.
1482
Roland McGrath536127f2009-08-14 13:10:09 -070014832009-08-14 Roland McGrath <roland@redhat.com>
1484
1485 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1486
Ulrich Drepper9ccf76a2009-08-01 10:07:24 -070014872009-08-01 Ulrich Drepper <drepper@redhat.com>
1488
1489 * debugpred.h: Add two most const.
1490
Mark Wielaardbc1b92e2009-07-26 08:33:18 -070014912009-07-26 Mark Wielaard <mjw@redhat.com>
1492
1493 * elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.
1494
Mark Wielaard79178202009-07-25 12:44:46 -070014952009-07-25 Mark Wielaard <mjw@redhat.com>
1496
1497 * Makefile.am (addr2line_LDADD): Add $(libelf).
1498
Roland McGrathbe4589d2009-07-24 16:23:12 -070014992009-07-24 Roland McGrath <roland@redhat.com>
1500
1501 * readelf.c (print_block): New function.
1502 (print_ops): Use it.
1503 (attr_callback): Use it for DW_FORM_block* forms.
1504
Mark Wielaarddaf85b22009-07-24 15:49:51 -070015052009-07-20 Mark Wielaard <mjw@redhat.com>
1506
1507 * readelf.c (print_ops): Add handling of DW_OP_implicit_value
1508 and DW_OP_stack_value.
1509
Ulrich Drepper96d950e2009-07-14 10:42:01 -070015102009-07-14 Ulrich Drepper <drepper@redhat.com>
1511
1512 * elflint.c (check_elf_header): Allow Linux ABI.
1513 (check_symtab): Handle STB_GNU_UNIQUE.
1514
Mark Wielaardf735db12009-07-08 19:18:53 +020015152009-07-08 Mark Wielaard <mjw@redhat.com>
1516
1517 * readelf.c (attr_callback): Handle DW_Form constants for
1518 DW_AT_data_member_location.
1519
Roland McGrathdffc33d2009-07-06 16:06:41 -070015202009-07-06 Roland McGrath <roland@redhat.com>
1521
1522 * readelf.c (register_info): New function. Handle unknown register #s.
1523 (print_cfa_program): Use it.
1524 (handle_core_register, handle_core_registers): Likewise.
1525
Roland McGrath5dbccdb2009-06-28 14:48:02 -070015262009-06-28 Roland McGrath <roland@redhat.com>
1527
1528 * readelf.c (print_address_names): New static variable.
1529 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
1530 (format_dwarf_addr): Don't look up name if !print_address_names.
1531
Ulrich Drepperf1894932009-06-13 15:55:42 -070015322009-06-13 Ulrich Drepper <drepper@redhat.com>
1533
1534 * ldgeneric.c: Don't use deprecated libelf functions.
1535 * nm.c: Likewise.
1536 * objdump.c: Likewise.
1537 * readelf.c: Likewise.
1538 * size.c: Likewise.
1539 * strip.c: Likewise.
1540 * unstrip.c: Likewise.
1541 * ld.h: Fix up comment.
1542
Ulrich Drepperb47d2902009-06-01 07:38:32 -070015432009-06-01 Ulrich Drepper <drepper@redhat.com>
1544
1545 * readelf.c (print_relocs): Expect ELF header argument and pass on
1546 to handle_relocs_rel* functions. Adjust caller.
1547 (handle_relocs_rel): Add ELF header argument. Add special case for
1548 the IRELATIVE relocations in statically linked executables.
1549 (handle_relocs_rela): Likewise.
1550
Roland McGrathdb19f0b2009-05-07 18:44:27 -070015512009-04-29 Ulrich Drepper <drepper@redhat.com>
1552
1553 * elflint.c (check_symtab): Add tests of st_other field.
1554
Ulrich Drepperaab90f92009-04-23 07:44:36 -070015552009-04-23 Ulrich Drepper <drepper@redhat.com>
1556
1557 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
1558
Roland McGrathd86e1832009-04-20 00:49:33 -070015592009-04-20 Roland McGrath <roland@redhat.com>
1560
Roland McGrath8a592412009-04-20 01:20:44 -07001561 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
1562 of inline call sites.
1563
Roland McGrathd86e1832009-04-20 00:49:33 -07001564 * addr2line.c (just_section): New variable.
1565 (adjust_to_section): New function, broken out of ...
1566 (handle_address): ... here.
1567 (options, parse_opt): Add -j/--section=NAME to set it.
1568
Roland McGrath2fb90512009-04-15 14:47:13 -070015692009-04-15 Roland McGrath <roland@redhat.com>
1570
1571 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
1572 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
1573
Roland McGrath04a14162009-04-14 01:02:17 -070015742009-04-14 Roland McGrath <roland@redhat.com>
1575
Roland McGratheb9ba472009-04-14 18:44:45 -07001576 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
1577 like SHT_GNU_ATTRIBUTES.
1578
Roland McGrath94f43832009-04-14 04:39:32 -07001579 * readelf.c (handle_core_registers): Fix error message.
1580
Roland McGrath04a14162009-04-14 01:02:17 -07001581 * strip.c (handle_elf: check_preserved): Don't note any change when
1582 .debug_data is already filled from a previous pass.
1583
Ulrich Drepper411cdb22009-02-05 22:04:26 -080015842009-02-05 Ulrich Drepper <drepper@redhat.com>
1585
Ulrich Drepper51b3f472009-02-05 22:10:39 -08001586 * objdump.c (show_relocs_x): Minor cleanups.
1587
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001588 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -08001589 Print first DW_CFA_expression and DW_CFA_val_expression parameter
1590 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -08001591
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080015922009-02-01 Ulrich Drepper <drepper@redhat.com>
1593
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001594 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
1595 into ...
1596 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -08001597 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -08001598
Ulrich Dreppercbb422e2009-02-01 18:18:55 -08001599 * objdump.c (show_relocs_rela): Show offsets as signed values.
1600
Ulrich Drepper5ee720c2009-02-01 16:18:18 -08001601 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
1602 Improve some error messages.
1603 Use program_invocation_short_name instead of AR macro.
1604 * Makefile.am (CFLAGS_ar): Remove.
1605 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
1606 * objdump.c (parse_opt): Likewise.
1607 * readelf.c (parse_opt): Likewise.
1608
Roland McGrath51f01282009-01-27 17:08:03 -080016092009-01-27 Roland McGrath <roland@redhat.com>
1610
1611 * readelf.c (print_ops): Notice short length, don't overrun buffer
1612 (still need to fix LEB128).
1613
1614 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
1615
1616 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
1617
Ulrich Drepper62c46532009-01-24 17:01:08 -080016182009-01-24 Ulrich Drepper <drepper@redhat.com>
1619
1620 * readelf.c (print_debug_frame_section): Fix computation of vma_base
1621 for PC-relative mode.
1622
Ulrich Drepperd7285e12009-01-23 16:10:44 -080016232009-01-23 Ulrich Drepper <drepper@redhat.com>
1624
Ulrich Drepperccccab02009-01-23 16:32:21 -08001625 * size.c (process_file): When handling archive, close file descriptor
1626 here. For unknown file format also close file descriptor.
1627 (handle_ar): Don't close file descriptor here.
1628
Ulrich Drepperd7285e12009-01-23 16:10:44 -08001629 * readelf.c (parse_opt): Move code to add to dump_data_sections and
1630 string_sections list in local function add_dump_section. Adjust 'x'
1631 key handling. For 'a' key add .strtab, .dynstr, and .comment section
1632 to string_sections list.
1633
Roland McGrathe9de9b42009-01-22 13:05:40 -080016342009-01-22 Roland McGrath <roland@redhat.com>
1635
Roland McGrath9a847e12009-01-22 19:55:00 -08001636 * readelf.c (print_phdr): Don't print section mapping when no sections.
1637
Roland McGrathd759aa62009-01-22 19:17:07 -08001638 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
1639
Roland McGrathcabeeee2009-01-22 13:17:45 -08001640 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
1641 and reset it only for the 'true' cases.
1642
1643 * Makefile.am (addr2line_no_Wformat): New variable.
1644
Roland McGrathe9de9b42009-01-22 13:05:40 -08001645 * readelf.c (print_debug_frame_section): Use t instead of j formats
1646 for ptrdiff_t OFFSET.
1647
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080016482009-01-21 Ulrich Drepper <drepper@redhat.com>
1649
1650 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -08001651 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001652 (check_exception_data): First sanity test.
1653
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080016542009-01-17 Ulrich Drepper <drepper@redhat.com>
1655
Ulrich Drepper935edde2009-01-17 16:06:42 -08001656 * readelf.c (print_debug_exception_table): Show target of ar_disp
1657 field.
1658
1659 * elflint.c (check_program_header): Add most consistency checks for
1660 PT_GNU_EH_FRAME entry.
1661
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001662 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
1663 ARGP_PROGRAM_BUG_ADDRESS_DEF.
1664 * ar.c: Likewise.
1665 * elfcmp.c: Likewise.
1666 * elflint.c: Likewise.
1667 * findtextrel.c: Likewise.
1668 * ld.c: Likewise.
1669 * nm.c: Likewise.
1670 * objdump.c: Likewise.
1671 * ranlib.c: Likewise.
1672 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -08001673
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001674 * size.c: Likewise.
1675 * strings.c: Likewise.
1676 * strip.c: Likewise.
1677 * unstrip.c: Likewise.
1678
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080016792009-01-16 Ulrich Drepper <drepper@redhat.com>
1680
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -08001681 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
1682 matches .eh_frame_hdr section, if it is available. Also check that
1683 the segment is allocated, not writable, not executable.
1684
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001685 * readelf.c: Add -e option. Dump exception and unwind related
1686 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -08001687 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001688 (print_debug_exception_table): Beginning of support.
1689 (print_debug): Hook up print_debug_exception_table for
1690 .gcc_except_table sections.
1691
1692 * readelf.c (print_debug_frame_section): Some fixes for last change.
1693
Ulrich Drepper351bf202009-01-15 20:18:40 -080016942009-01-15 Ulrich Drepper <drepper@redhat.com>
1695
1696 * readelf.c (print_encoding): Now a toplevel function.
1697 (print_relinfo): Likewise.
1698 (print_encoding_base): Broken out of print_debug_frame_section.
1699 (print_debug_frame_section): Print different header for .eh_frame
1700 sections. Fix recognition of matching CIEs in .debug_frame sections.
1701 Print absolute offset for PC-relative FDE locations. Don't print
1702 table header for FDEs if the table is empty.
1703 (read_encoded): New function.
1704 (print_debug_frame_hdr_section): New function.
1705 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
1706 sections.
1707
1708 * readelf.c (handle_relocs_rel): Print section number.
1709 (print_debug_abbrev_section): Likewise.
1710 (print_debug_aranges_section): Likewise.
1711 (print_debug_ranges_section): Likewise.
1712 (print_debug_info_section): Likewise.
1713 (print_debug_line_section): Likewise.
1714 (print_debug_loc_section): Likewise.
1715 (print_debug_macinfo_section): Likewise.
1716 (print_debug_pubnames_section): Likewise.
1717 (print_debug_str_section): Likewise.
1718
Ulrich Drepper8b394632009-01-10 18:29:56 -080017192009-01-10 Ulrich Drepper <drepper@redhat.com>
1720
1721 * strings.c (read_block): Fix typo in error message string.
1722
Ulrich Drepper87cf5832009-01-07 20:39:21 -080017232009-01-07 Ulrich Drepper <drepper@redhat.com>
1724
1725 * ld.c (ld_new_searchdir): Fix adding to search path list.
1726
Ulrich Drepperac194d02009-01-06 00:30:01 -080017272009-01-06 Ulrich Drepper <drepper@redhat.com>
1728
1729 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -08001730
Roland McGrath3614d992009-01-05 18:05:32 -080017312009-01-05 Roland McGrath <roland@redhat.com>
1732
1733 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
1734 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001735
Ulrich Drepper44173ed2009-01-01 19:00:41 -080017362009-01-01 Ulrich Drepper <drepper@redhat.com>
1737
1738 * addr2line.c: Update copyright year.
1739 * ar.c: Likewise.
1740 * elfcmp.c: Likewise.
1741 * elflint.c: Likewise.
1742 * findtextrel.c: Likewise.
1743 * ld.c: Likewise.
1744 * nm.c: Likewise.
1745 * objdump.c: Likewise.
1746 * ranlib.c: Likewise.
1747 * readelf.c: Likewise.
1748 * size.c: Likewise.
1749 * strings.c: Likewise.
1750 * strip.c: Likewise.
1751 * unstrip.c: Likewise.
1752
Roland McGrath468fe4d2008-12-11 21:00:12 -080017532008-12-11 Roland McGrath <roland@redhat.com>
1754
1755 * nm.c (sym_name): New function.
1756 (show_symbols_sysv): Use it in place of elf_strptr.
1757 (show_symbols_bsd, show_symbols_posix): Likewise.
1758 Fixes RHBZ#476136.
1759
1760 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
1761 elf_strptr fails.
1762
Roland McGratha845f682008-12-03 03:41:58 +000017632008-12-02 Roland McGrath <roland@redhat.com>
1764
1765 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
1766 nonzero OFFSET argument to dwfl_getmodules.
1767
Roland McGrath1d8bb252008-08-07 08:39:41 +000017682008-08-07 Roland McGrath <roland@redhat.com>
1769
1770 * addr2line.c (main): Pass string to handle_address.
1771 (see_one_module): New function, subroutine of handle_address.
1772 (find_symbol): Likewise.
1773 (handle_address): Take string argument rather than address.
1774 Convert plain number, or handle strings like "(section)+offset"
1775 or "symbol+offset".
1776
17772008-08-01 Roland McGrath <roland@redhat.com>
1778
1779 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
1780 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
1781
1782 * readelf.c (convert): Take new argument SIZE.
1783 (handle_core_register, handle_core_item): Update callers.
1784 (handle_core_item): Take new arg REPEATED_SIZE.
1785 (handle_core_items): Special case for a singleton item,
1786 let handle_core_item handle repeats if it wants to.
1787
1788 * readelf.c (handle_core_items): Give abridged output
1789 for identical groups repeated more than twice.
1790
17912008-07-04 Roland McGrath <roland@redhat.com>
1792
1793 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
1794
Roland McGrath521c47d2008-04-11 07:01:58 +000017952008-04-10 Roland McGrath <roland@redhat.com>
1796
1797 * strip.c (handle_elf): Don't keep sections that kept symbol tables
1798 refer to. Instead, just be sure to preserve the original symbol
1799 table in the debug file so those symbols go with their sections and
1800 can be elided from the stripped version of the symbol table.
1801
1802 * strip.c (handle_elf): When a discarded section kept in the debug
1803 file refers to a nondiscard section via sh_link/sh_info, preserve
1804 that nondiscarded section unmodified in the debug file as well.
1805 Skip adjustment of discarded sections symbol table references when
1806 that symbol table is copied in this way.
1807
1808 * elflint.c (check_symtab): Don't crash from missing symbol names
1809 after diagnosing bogus strtab.
1810
1811 * strip.c (handle_elf): Cosmetic cleanup in special section contents
1812 adjustment for symtab changes.
1813
Roland McGrath13b69602008-04-01 02:30:05 +000018142008-03-31 Roland McGrath <roland@redhat.com>
1815
1816 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
1817 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
1818 excuse a special section.
1819
18202008-03-27 Roland McGrath <roland@redhat.com>
1821
1822 * elflint.c (check_sections): Check that executability and writability
1823 of sections is reflected in segment p_flags.
1824
Roland McGrathd11f9cb2008-03-26 20:51:59 +000018252008-03-26 Roland McGrath <roland@redhat.com>
1826
1827 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
1828 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1829 is valid in RELRO.
1830
Roland McGrath47c5c352008-02-29 10:17:16 +000018312008-02-29 Roland McGrath <roland@redhat.com>
1832
1833 * readelf.c (print_attributes): Add a cast.
1834 * elflint.c (check_attributes): Likewise.
1835
1836 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
1837 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
1838 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
1839
Ulrich Drepper834de6f2008-02-23 06:50:01 +000018402008-02-03 Ulrich Drepper <drepper@redhat.com>
1841
1842 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
1843 when linked into executable.
1844 (elf_i386_create_relocations): Likewise.
1845
Roland McGrath059c83e2008-02-21 06:19:39 +000018462008-02-20 Roland McGrath <roland@redhat.com>
1847
1848 * readelf.c (print_attributes): New function.
1849 (process_elf_file): Call it under -A.
1850
1851 * elflint.c (check_attributes): Implement it for real.
1852
18532008-02-19 Roland McGrath <roland@redhat.com>
1854
1855 * elflint.c (special_sections): Handle .gnu.attributes section.
1856 (check_sections): Likewise.
1857 (check_attributes): New function.
1858
18592008-02-10 Roland McGrath <roland@redhat.com>
1860
1861 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
1862 sections and ET_REL files.
1863
Ulrich Drepper712d78e2008-02-02 10:01:53 +000018642008-02-02 Ulrich Drepper <drepper@redhat.com>
1865
1866 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
1867 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
1868 and R_386_TLS_LE.
1869 (elf_i386_create_relocations): Likewise.
1870 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
1871 elements.
1872 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
1873 (ld_generic_create_outfile): Add PT_TLS entry to program header.
1874 Fix generation of PT_GNU_STACK entry.
1875
Ulrich Drepperc54785a2008-02-01 18:05:21 +000018762008-02-01 Ulrich Drepper <drepper@redhat.com>
1877
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +00001878 * ld.c (replace_args): Prevent loop over replacements if the parameter
1879 is only two characters long.
1880
Ulrich Drepperc54785a2008-02-01 18:05:21 +00001881 * ld.c: Recognize sha1 argument for --build-id parameter.
1882 * ldgeneric.c (create_build_id_section): Handle sha1.
1883 (compute_hash_sum): New function. Broken out of compute_build_id.
1884 Take hash function and context as parameters.
1885 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
1886 implementation.
1887
Ulrich Drepper89759c72008-01-31 19:44:12 +000018882008-01-31 Ulrich Drepper <drepper@redhat.com>
1889
1890 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
1891 * ld.c: Recognize --build-id command line parameter.
1892 * ld.h: Define scn_dot_note_gnu_build_id.
1893 (struct ld_state): Add build_id and buildidscnidx elements.
1894 * ldgeneric.c: Implement --build-id command line parameter.
1895 * ldlex.l (ID): Recognize - as valid character after the first one.
1896
Ulrich Drepper5530ec52008-01-29 10:42:07 +000018972008-01-29 Ulrich Drepper <drepper@redhat.com>
1898
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +00001899 * ld.c (replace_args): New function.
1900 (main): Use it to rewrite old-style parameters.
1901
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +00001902 * elf32-i386.script: Add .gnu.hash section.
1903 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
1904 (fillin_special_symbol): Initialize st_size.
1905 (sortfct_hashval): New function.
1906 (create_gnu_hash): New function.
1907 (create_hash): New function.
1908 (ld_generic_create_outfile): Use the new functions to create the
1909 hash tables.
1910
Ulrich Drepper5530ec52008-01-29 10:42:07 +00001911 * elflint.c (check_gnu_hash): Fix index value printed in error message.
1912
Ulrich Drepper0e864dd2008-01-25 00:18:42 +000019132008-01-24 Ulrich Drepper <drepper@redhat.com>
1914
1915 * elflint.c (check_group): Check that signature symbol for section
1916 group is not an empty string.
1917 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
1918 section. Start implementation of --hash-style.
1919 * i386_ld.c: Likewise.
1920 * ld.c: Recognize --hash-style.
1921 * ld.h (struct scninfo): Add comdat_group.
1922 Add additional parameter to finalize_plt callback.
1923
Ulrich Drepper5449a6b2008-01-22 15:49:39 +000019242008-01-22 Ulrich Drepper <drepper@redhat.com>
1925
1926 * ld.h (struct callbacks): Add initialize_gotplt.
1927 (struct scnhead): Add scn_dot_gotplt.
1928 (struct ld_state): Add gotpltscnidx.
1929 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
1930 (elf_i386_initialize_pltrel): Likewise.
1931 (elf_i386_initialize_got): There is now a separate .got.plt, so
1932 don't do the PLT-related work here. Initialize d_type.
1933 (elf_i386_initialize_gotplt): New function.
1934 (elf_i386_plt0): Use ud2a after indirect jump.
1935 (elf_i386_pic_plt0_entry): Likewise.
1936 (elf_i386_finalize_plt): Reference now .got.plt.
1937 (elf_i386_count_relocations): For GOT entries which need no relocation
1938 don't bump nrel_got.
1939 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
1940 handling for split .got/.got.plt.
1941 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
1942 * elf32-i386.script: Sort sections for security. There are no .got
1943 input sections. Add .got.plt.
1944 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
1945 (ld_generic_create_outfile): Initialize .got.plt section.
1946 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
1947
Ulrich Drepperd9488292008-01-20 16:43:15 +000019482008-01-19 Ulrich Drepper <drepper@redhat.com>
1949
1950 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
1951 symbols are not carried over into statically linked output files.
1952 Add dummy entries for more TLS relocations.
1953
1954 * ld.c (options): Add long names for -( and -).
1955
1956 * ldgeneric.c (check_definition): For newly found definitions don't
1957 mark section as used if symbol is absolute.
1958 (extract_from_archive): Only assign archive sequence number the first
1959 time the archive is handled. Update ld_state.last_archive_used
1960 if any symbol was used. Remove nround variable.
1961 (file_process2): When using symbol from an archive, update
1962 ld_state.group_start_archive, ld_state.archives, and
1963 ld_state.tailarchives.
1964 (ld_generic_file_process): If group is not handled anymore, after
1965 freeing ELF handles for the archives, clear ld_state.archives and
1966 *nextp. Fix wrong logic in recognizing first iteration of group
1967 loop. When clearing flags, also clear ld_state.group_start_archive.
1968
Ulrich Drepper5eee1222008-01-11 10:12:18 +000019692008-01-11 Ulrich Drepper <drepper@redhat.com>
1970
1971 * objdump.c (show_disasm): Adjust disassembler format string for
1972 removal of %e.
1973
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000019742008-01-04 Roland McGrath <roland@redhat.com>
1975
Roland McGrath059c83e2008-02-21 06:19:39 +00001976 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
1977 a size greater than the items cover means multiple sets of items.
1978 (handle_core_note): Update caller.
1979
19802008-01-04 Roland McGrath <roland@redhat.com>
1981
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001982 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
1983
19842008-01-03 Roland McGrath <roland@redhat.com>
1985
1986 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
1987
1988 * elflint.c (check_dynamic): Remove duplicate initializer.
1989
Ulrich Drepperad024af2008-01-02 17:42:52 +000019902008-01-02 Ulrich Drepper <drepper@redhat.com>
1991
1992 * addr2line.c: Update copyright year.
1993 * ar.c: Likewise.
1994 * elfcmp.c: Likewise.
1995 * elflint.c: Likewise.
1996 * findtextrel.c: Likewise.
1997 * ld.c: Likewise.
1998 * nm.c: Likewise.
1999 * objdump.c: Likewise.
2000 * ranlib.c: Likewise.
2001 * readelf.c: Likewise.
2002 * size.c: Likewise.
2003 * strings.c: Likewise.
2004 * strip.c: Likewise.
2005 * unstrip.c: Likewise.
2006
Ulrich Drepper3cbdd382008-01-02 17:44:39 +000020072007-12-30 Ulrich Drepper <drepper@redhat.com>
2008
2009 * objdump (show_disasm): Use %e after third parameter.
2010
20112007-12-21 Ulrich Drepper <drepper@redhat.com>
2012
2013 * strip.c: Fix wrong parenthesis in a few branch predictions.
2014 * strings.c: Likewise.
2015
20162007-12-20 Ulrich Drepper <drepper@redhat.com>
2017
2018 * Makefile.am (DEFS): Add DEBUGPRED.
2019 * addr2line.c: Include debugpred.h.
2020 * ar.c: Likewise.
2021 * elfcmp.c: Likewise.
2022 * elflint.c: Likewise.
2023 * findtextrel.c: Likewise.
2024 * nm.c: Likewise.
2025 * objdump.c: Likewise.
2026 * ranlib.c: Likewise.
2027 * readelf.c: Likewise.
2028 * size.c: Likewise.
2029 * strings.c: Likewise.
2030 * strip.c: Likewise.
2031 * unstrip.c: Likewise.
2032 * debugpred.h: New file.
2033
2034 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
2035 (handle_relocs_rela): Likewise.
2036
2037 * readelf.c: Add lots of likely/unlikely.
2038
2039 * elflint.c: Minor cleanups.
2040
Roland McGrath1a2e8f42007-12-15 23:39:34 +000020412007-11-19 Roland McGrath <roland@redhat.com>
2042
2043 * readelf.c (print_ops): Handle all bad op codes gracefully.
2044 Print their numbers instead of just ???.
2045
Roland McGrath07a696e2007-11-09 22:44:26 +000020462007-11-09 Roland McGrath <roland@redhat.com>
2047
2048 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +00002049 Handle block forms to mean a DWARF expression for DW_AT_allocated,
2050 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
2051 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
2052 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +00002053
Roland McGrathe4c22ea2007-10-23 13:07:39 +000020542007-10-20 Roland McGrath <roland@redhat.com>
2055
2056 * unstrip.c (options): Update -R description.
2057 (struct symbol): Put symbol details a union with a size_t pointer
2058 `duplicate'.
2059 (compare_symbols_output): Use null ->name as marker for discard
2060 symbols, not zero *->map.
2061 (copy_elided_sections): Record forwarding pointers for discarded
2062 duplicates and fill SYMNDX_MAP elements through them.
2063
2064 * readelf.c (process_file): Set offline_next_address to 0 at start.
2065 (struct process_dwflmod_args): New type.
2066 (process_dwflmod): Take args in it, pass fd to process_elf_file.
2067 (process_file): Update caller; dup FD for passing to libdwfl.
2068 (process_elf_file): Take new arg FD. For ET_REL file when
2069 displaying data affected by libdwfl relocation, open a new Elf handle.
2070
20712007-10-17 Roland McGrath <roland@redhat.com>
2072
2073 * readelf.c (print_debug_line_section): For invalid data inside a
2074 unit with plausible length, keep printing at the next unit boundary.
2075
2076 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
2077
20782007-10-16 Roland McGrath <roland@redhat.com>
2079
2080 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
2081
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000020822007-10-15 Roland McGrath <roland@redhat.com>
2083
2084 * make-debug-archive.in: New file.
2085 * Makefile.am (EXTRA_DIST): Add it.
2086 (make-debug-archive): New target.
2087 (bin_SCRIPTS, CLEANFILES): Add it.
2088
20892007-10-10 Roland McGrath <roland@redhat.com>
2090
2091 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
2092 Use it to check MERGE|STRINGS for .debug_str.
2093 (check_sections): Handle exact_or_gnuld.
2094
20952007-10-08 Roland McGrath <roland@redhat.com>
2096
2097 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
2098 64-bit struct timeval with 32-bit tv_usec.
2099
21002007-10-07 Roland McGrath <roland@redhat.com>
2101
2102 * readelf.c (check_archive_index): New function.
2103 (process_file): Call it. Change signature to take only fd and name.
2104 Use libdwfl to open the file, then iterate on its modules (multiple
2105 for an archive) to print file name and call process_elf_file.
2106 (main): Update caller. Let process_file do elf_begin.
2107 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
2108 (process_elf_file): Take only Dwfl_Module * argument.
2109 Don't print the file name here.
2110 (print_debug_*_section): Take Dwfl_Module * argument.
2111 (print_debug): Likewise. Update caller.
2112 (format_dwarf_addr): New function.
2113 (print_debug_ranges_section): Use it.
2114 (attr_callback): Likewise.
2115 (print_debug_line_section, print_debug_loc_section): Likewise.
2116
2117 * readelf.c (print_debug_ranges_section): Translate all strings.
2118 (print_debug_loc_section): Likewise.
2119
2120 * unstrip.c (copy_elided_sections): Initialize SEC.
2121
2122 * ar.c (do_oper_insert): Put trailing / on short names.
2123
2124 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
2125
2126 * arlib2.c (arlib_add_long_name): Adjust for header size.
2127
2128 * arlib.c (arlib_finalize): Pad long name table to keep size even.
2129
2130 * ar.c (do_oper_insert): Use write_retry for padding write.
2131
2132 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
2133 Unconditionally set FOUND[CNT]->elf when setting ->mem.
2134 (remember_long_name): New function.
2135 (do_oper_insert): Call it. Correctly use length of basename,
2136 not original name. Don't store long name twice for new member.
2137
21382007-10-06 Roland McGrath <roland@redhat.com>
2139
2140 * elflint.c (check_note): Skip empty segment.
2141 (check_note_section): Skip empty section.
2142
2143 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
2144 (handle_output_dir_module, handle_implicit_modules): Pass it down.
2145 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
2146 (compare_alloc_sections): Take new arg REL, ignore address if true.
2147 (compare_sections): Likewise, pass it down.
2148 (compare_sections_rel, compare_sections_nonrel): New functions.
2149 (find_alloc_sections_prelink, copy_elided_sections): Use them
2150 instead of compare_sections.
2151 (sections_match): New function, broken out of ...
2152 (find_alloc_section): ... here.
2153 (copy_elided_sections): Reorganize section match-up logic.
2154 Use sections_match for SHF_ALLOC in ET_REL.
2155 For ET_REL, let the nonzero sh_addr from the debug file dominate.
2156
2157 * unstrip.c (add_new_section_symbols): Take new arg REL.
2158 When true, do not update section symbol values.
2159 (collect_symbols): Likewise. Update section symbols with address
2160 of chosen output section, not original section.
2161 (check_symtab_section_symbols, copy_elided_sections): Update callers.
2162
2163 * unstrip.c (compare_alloc_sections): At the same address, preserve
2164 original section order.
2165
2166 * elflint.c (special_sections): Don't require MERGE|STRINGS for
2167 .debug_str, it didn't always have them with older tools.
2168
2169 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
2170
21712007-10-05 Roland McGrath <roland@redhat.com>
2172
2173 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
2174 ET_REL file.
2175
2176 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
2177 SHN_UNDEF as "bad section". Use shndx value in messages.
2178
2179 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
2180 for ".debug" so it matches as a prefix.
2181 (IS_KNOWN_SPECIAL): New macro.
2182 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
2183 type even under -d, for a .debug* or .shstrtab section.
2184
2185 * readelf.c (print_ops): Use hex for address operand.
2186
21872007-10-04 Roland McGrath <roland@redhat.com>
2188
2189 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
2190 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
2191 sections mapped to SHN_UNDEF.
2192
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000021932007-10-04 Ulrich Drepper <drepper@redhat.com>
2194
2195 * readelf.c (dump_archive_index): Avoid warning about uninitialized
2196 variable with older glibc versions.
2197 Add some branch prediction.
2198
Roland McGrath59ea7f32007-10-04 08:50:09 +000021992007-10-04 Roland McGrath <roland@redhat.com>
2200
2201 * readelf.c (print_archive_index): New variable.
2202 (options, parse_opt): Accept -c/--archive-index to set it.
2203 (dump_archive_index): New function.
2204 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
2205 Call dump_archive_index on archives if set.
2206 (main): Update caller.
2207 (any_control_option): Give it file scope, moved out of ...
2208 (parse_opt): ... here.
2209
22102007-10-03 Roland McGrath <roland@redhat.com>
2211
2212 * unstrip.c (struct arg_info): Add `list' flag.
2213 (options, parse_opt): Grok -n/--list to set it.
2214 (list_module): New function.
2215 (handle_implicit_modules): Call it under -n.
2216
2217 * elflint.c (check_note_section): New function.
2218 (check_sections): Call it for SHT_NOTE.
2219
2220 * readelf.c (handle_notes): Use sections when available.
2221
2222 * elflint.c (check_note_data): New function, broken out of ...
2223 (check_note): ... here. Call it and elf_getdata_rawchunk.
2224
2225 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
2226 Use elf_getdata_rawchunk and gelf_getauxv.
2227 (handle_notes_data): New function, broken out of ...
2228 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
2229
Roland McGrath241ac022007-10-01 18:21:46 +000022302007-10-01 Roland McGrath <roland@redhat.com>
2231
Roland McGrathac0a16c2007-10-01 18:50:35 +00002232 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
2233
Roland McGrath241ac022007-10-01 18:21:46 +00002234 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
2235
Roland McGrathc76f0b02007-09-27 07:31:33 +000022362007-09-10 Roland McGrath <roland@redhat.com>
2237
2238 * readelf.c (options): Give -p optional argument, alias --string-dump.
2239 (string_sections, string_sections_tail): New static variables.
2240 (parse_opt): Set them when -p has an argument.
2241 (print_string_section): New function, broken out of ...
2242 (print_strings): ... here. Call it.
2243 (dump_data_section): New function, broken out of ...
2244 (dump_data): ... here. Call it.
2245 (for_each_section_argument): New function, broken out of ...
2246 (dump_data): ... here. Call it.
2247 (dump_strings): New function.
2248
22492007-08-31 Roland McGrath <roland@redhat.com>
2250
2251 * readelf.c (print_strings): Typo fix.
2252
Roland McGrathcb6d8652007-08-23 08:10:54 +000022532007-08-23 Roland McGrath <roland@redhat.com>
2254
2255 * readelf.c (printf_with_wrap): Function removed.
2256 (REGISTER_WRAP_COLUMN): New macro.
2257 (handle_core_register): Use print_core_item instead.
2258 (struct register_info): New type.
2259 (compare_registers, compare_register_sets): New functions.
2260 (register_bitpos, compare_sets_by_info): New functions.
2261 (handle_core_registers): Use those to segregate and sort registers
2262 for display.
2263
2264 * readelf.c (ITEM_WRAP_COLUMN): New macro.
2265 (print_core_item): New function.
2266 (handle_core_item): Use it instead of printf_with_wrap.
2267 (compare_core_items, compare_core_item_groups): New functions.
2268 (handle_core_items): Use them. Sort by group and force line breaks
2269 between groups.
2270
2271 * readelf.c (handle_core_registers, handle_core_items): New functions,
2272 broken out of ...
2273 (handle_core_note): ... here. Call them.
2274
22752007-08-22 Roland McGrath <roland@redhat.com>
2276
2277 * unstrip.c (new_shstrtab): New function, broken out of ...
2278 (copy_elided_sections): ... here.
2279
22802007-08-20 Roland McGrath <roland@redhat.com>
2281
2282 Avoid local function trampolines in nm binary.
2283 * nm.c (sort_by_address): Move to a static function instead of local
2284 inside show_symbols.
2285 (sort_by_name_strtab): New static variable.
2286 (sort_by_name): Use it. Move to a static function instead of local
2287 inside show_symbols.
2288 (show_symbols): Set sort_by_name_strtab.
2289
22902007-08-19 Roland McGrath <roland@redhat.com>
2291
2292 * readelf.c (handle_auxv_note): New function.
2293 (handle_notes): Call it.
2294
2295 * readelf.c (printf_with_wrap, convert): New functions.
2296 (handle_core_item, (handle_core_register): New functions.
2297 (handle_notes): Call those with details from ebl_core_note.
2298
Roland McGrath099dd522007-08-13 22:58:36 +000022992007-08-12 Roland McGrath <roland@redhat.com>
2300
2301 * elflint.c (check_note): Accept type 0 with name "Linux".
2302
2303 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
2304
2305 * elflint.c (section_flags_string): Return "none" for 0, not "".
2306
Roland McGrathd8221722007-08-11 21:18:09 +000023072007-08-11 Roland McGrath <roland@redhat.com>
2308
2309 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
2310
Ulrich Drepperc98bcc72007-08-04 17:06:14 +000023112007-08-04 Ulrich Drepper <drepper@redhat.com>
2312
2313 * readelf.c (hex_dump): Use isprint to determine whether to print
2314 character itself or full stop character.
2315 (dump_data): No need to check endp for NULL after strtol call.
2316
Roland McGrath60fc84c2007-08-03 21:59:15 +000023172007-08-03 Roland McGrath <roland@redhat.com>
2318
2319 * readelf.c (print_string_sections): New variable.
2320 (options, parse_opt): Handle --strings/-p to set it.
2321 (print_strings): New function.
2322 (process_elf_file): Call it under -p.
2323
2324 * readelf.c (options): Add hidden aliases --segments, --sections,
2325 as taken by binutils readelf.
2326
23272007-08-01 Roland McGrath <roland@redhat.com>
2328
2329 * readelf.c (dump_data_sections, dump_data_sections_tail):
2330 New variables.
2331 (options, parse_opt): Handle --hex-dump/-x, set them.
2332 (hex_dump): New function.
2333 (dump_data): New function, call it.
2334 (process_elf_file): Call it.
2335
23362007-07-25 Roland McGrath <roland@redhat.com>
2337
2338 * addr2line.c (show_symbols): New variable.
2339 (print_addrsym): New function.
2340 (handle_address): Call it.
2341 (options, parse_opt): Handle -S/--symbols.
2342
Ulrich Drepperb0243862007-06-06 00:09:36 +000023432007-06-05 Ulrich Drepper <drepper@redhat.com>
2344
2345 * addr2line.c: Update for latest autoconf header.
2346 * ar.c: Likewise.
2347 * elfcmp.c: Likewise.
2348 * elflint.c: Likewise.
2349 * findtextrel.c: Likewise.
2350 * ld.c: Likewise.
2351 * ldgeneric.c: Likewise.
2352 * nm.c: Likewise.
2353 * objdump.c: Likewise.
2354 * ranlib.c: Likewise.
2355 * readelf.c: Likewise.
2356 * size.c: Likewise.
2357 * strings.c: Likewise.
2358 * strip.c: Likewise.
2359 * unstrip.c: Likewise.
2360
Roland McGrath9aa8ef72007-05-18 08:59:43 +000023612007-05-18 Roland McGrath <roland@redhat.com>
2362
2363 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
2364 stripped file, so as not to duplicate a section copied in both.
2365
2366 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
2367
23682007-05-17 Roland McGrath <roland@redhat.com>
2369
2370 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
2371
2372 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
2373
2374 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
2375 call make_directories here.
2376 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
2377 (handle_dwfl_module): Likewise.
2378 (handle_implicit_modules): Update callers.
2379 (handle_output_dir_module): Likewise. Don't do make_directories here.
2380
2381 * unstrip.c (get_section_name): New function, broken out of ...
2382 (copy_elided_sections): here. Update callers.
2383 (find_alloc_section): Broken out of ...
2384 (copy_elided_sections): ... here. Update caller.
2385 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
2386 update STT_SECTION symbols' st_value fields as a side effect.
2387 (check_symtab_section_symbols): Update caller.
2388 (add_new_section_symbols): Set st_value in symbols added.
2389 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
2390 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
2391 from .bss to .dynbss.
2392 (find_alloc_sections_prelink): New function. Associate debug file
2393 allocated SHT_NOBITS shdrs with stripped moved by prelink via
2394 .gnu.prelink_undo information.
2395 (copy_elided_sections): Call it when we couldn't find every allocated
2396 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
2397 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
2398 (handle_file): Update callers.
2399
2400 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
2401 named ".comment".
2402
2403 * elflint.c (check_sections): Fix association of segments with
2404 sections when p_memsz > p_filesz.
2405
24062007-04-29 Roland McGrath <roland@redhat.com>
2407
2408 * addr2line.c (options, main): Tweak argp group settings to fix
2409 usage output.
2410
24112007-04-28 Roland McGrath <roland@redhat.com>
2412
2413 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
2414 sizes to match sections adjusted in the stripped file.
2415
Roland McGrath4be15242007-04-25 03:09:33 +000024162007-04-24 Roland McGrath <roland@redhat.com>
2417
2418 * elfcmp.c (OPT_HASH_INEXACT): New macro.
2419 (hash_inexact): New variable.
2420 (options, parse_opt): Add --hash-inexact option to set it.
2421 (hash_content_equivalent): New function.
2422 (main): Call it for differing SHT_HASH sections under --hash-inexact.
2423
24242007-04-23 Roland McGrath <roland@redhat.com>
2425
2426 * unstrip.c: New file.
2427 * Makefile.am (bin_PROGRAMS): Add it.
2428 (unstrip_LDADD): New variable.
2429
2430 * strip.c (options): Allow --output for -o.
2431
Ulrich Drepper8b383102007-02-16 00:31:57 +000024322007-02-15 Ulrich Drepper <drepper@redhat.com>
2433
2434 * readelf.c: Remove unused code. Add a few consts.
2435
Ulrich Drepper903c1162007-02-15 19:40:37 +000024362007-02-15 Roland McGrath <roland@redhat.com>
2437
2438 * readelf.c (print_debug): Fix brainos in SHDR test.
2439
Roland McGrathf82a1ec2007-02-06 04:47:44 +000024402007-02-05 Roland McGrath <roland@redhat.com>
2441
2442 * ar.c: Include <limits.h>, since we use LONG_MAX.
2443
Ulrich Drepper0fe63532007-02-05 21:05:51 +000024442007-02-05 Ulrich Drepper <drepper@redhat.com>
2445
Ulrich Drepper8b383102007-02-16 00:31:57 +00002446 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +00002447 ignore fchown's return value.
2448 (do_oper_insert): Handle error when writing padding.
2449 * ranlib.c: Add fchown complain work around.
2450
Ulrich Drepper0fe63532007-02-05 21:05:51 +00002451 * arlib.c: Make symtab a global variable. Change all users.
2452 * arlib2.c: Likewise.
2453 * ranlib.c: Likewise.
2454 * ar.c: Likewise.
2455 * arlib.h: Declare it.
2456
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000024572007-01-11 Roland McGrath <roland@redhat.com>
2458
2459 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
2460 SHF_MASKPROC bits separately from generic sh_flags validation.
2461
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000024622007-02-04 Ulrich Drepper <drepper@redhat.com>
2463
2464 * ar.c: New file.
2465 * arlib.c: New file.
2466 * arlib2.c: New file.
2467 * arlib.h: New file.
2468 * Makefile (noinst_LIBRARIES): Add libar.
2469 (libar_a_SOURCES): Define.
2470 (ar_LDADD): Define.
2471 (CFLAGS_ar): Define.
2472 * ranlib.c: Change to use arlib.
2473
2474 * elflint.c (check_symtab): Work around GNU ld bug which omits
2475 sections but not symbols in those sections.
2476
Ulrich Drepperb770cf92007-01-10 21:02:34 +000024772007-01-10 Ulrich Drepper <drepper@redhat.com>
2478
2479 * addr2line.c: Update copyright year.
2480 * elfcmp.c: Likewise.
2481 * elflint.c: Likewise.
2482 * findtextrel.c: Likewise.
2483 * ld.c: Likewise.
2484 * nm.c: Likewise.
2485 * objdump.c: Likewise.
2486 * ranlib.c: Likewise.
2487 * readelf.c: Likewise.
2488 * size.c: Likewise.
2489 * strings.c: Likewise.
2490 * strip.c: Likewise.
2491
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +000024922006-12-09 Ulrich Drepper <drepper@redhat.com>
2493
2494 * elflint.c (compare_hash_gnu_hash): New function. Report if the
2495 two hash tables have different content (module expected omission
2496 of undefined symbols).
2497
Roland McGrath8190db62006-12-17 23:56:51 +000024982006-10-31 Roland McGrath <roland@redhat.com>
2499
2500 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +00002501 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +00002502
25032006-09-19 Jakub Jelinek <jakub@redhat.com>
2504
2505 * strip.c (process_file): Disallow -f on archives.
2506
25072006-10-09 Roland McGrath <roland@redhat.com>
2508
2509 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
2510
Roland McGrathc373d852006-10-10 00:25:21 +000025112006-08-29 Roland McGrath <roland@redhat.com>
2512
2513 * Makefile.am (MAINTAINERCLEANFILES): New variable.
2514
2515 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
2516 Reported by Christian Aichinger <Greek0@gmx.net>.
2517
2518 * elflint.c (valid_e_machine): Add EM_ALPHA.
2519 Reported by Christian Aichinger <Greek0@gmx.net>.
2520
Ulrich Drepper231c5902006-08-08 22:00:11 +000025212006-08-08 Ulrich Drepper <drepper@redhat.com>
2522
2523 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
2524 Keep track of which "high DT" entries are present.
2525 Check that either old or GNU-style hash table is present.
2526 If GNU-style hash table is used a symbol table is mandatory.
2527 Check that if any prelink entry is present all of them are.
2528 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
2529 table if they don't refer to functions.
2530
Roland McGrath858b1892006-07-17 08:41:15 +000025312006-07-17 Roland McGrath <roland@redhat.com>
2532
2533 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
2534 (add_version): Likewise for argument.
2535 (check_versym): Cast constant to GElf_Versym for comparison.
2536
Roland McGrath4ec807e2006-07-13 03:59:46 +000025372006-07-12 Roland McGrath <roland@redhat.com>
2538
2539 * readelf.c (handle_gnu_hash): Add casts for machines where
2540 Elf32_Word != unsigned int.
2541
Ulrich Drepperdcf61602006-07-12 19:59:02 +000025422006-07-12 Ulrich Drepper <drepper@redhat.com>
2543
2544 * elflint.c (check_sysv_hash64): Fix printf format.
2545
Ulrich Dreppercc415622006-07-12 19:42:23 +000025462006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002547
Ulrich Dreppercc415622006-07-12 19:42:23 +00002548 * addr2line.c (options): English fix in -f doc string.
2549
2550 * addr2line.c (use_comp_dir): New variable.
2551 (options, parse_opt): Grok -A/--absolute to set it.
2552 (handle_address): If set, prepend dwfl_line_comp_dir results to
2553 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00002554
Ulrich Drepper28ed8952006-07-07 03:43:47 +000025552006-07-06 Ulrich Drepper <drepper@redhat.com>
2556
2557 * elflint.c: Adjust for latest new hash table format.
2558 * readelf.c: Likewise.
2559
2560 * elflint.c (check_versym): Ignore hidden bit when comparing version
2561 numbers.
2562
25632006-07-05 Ulrich Drepper <drepper@redhat.com>
2564
2565 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
2566 discarded COMDAT symbols.
2567
2568 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
2569 (elf_i386_create_relocations): Likewise.
2570 * ld.h (struct symbol): Add local and hidden bits.
2571 * ld.c (create_special_section_symbol): These synthsized symbols
2572 are local and hidden.
2573 * ldgeneric.c (file_process2): Check whether input file matches
2574 the emulation.
2575 (fillin_special_symbol): Create symbols as local and/or hidden
2576 if requested.
2577 (ld_generic_create_outfile): Make local copy of symbol.
2578 Don't hide global, defined symbols in dynamic symbol table unless
2579 requested. Synthetic symbols have no version information.
2580
2581 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
2582 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2583
25842006-07-04 Ulrich Drepper <drepper@redhat.com>
2585
2586 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
2587 testing.
2588
25892006-07-03 Ulrich Drepper <drepper@redhat.com>
2590
2591 * elflint.c: Add testing of DT_GNU_HASH.
2592 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
2593
2594 * Makefile.am: Add hacks to create dependency files for non-generic
2595 linker.
2596
Ulrich Drepper6ca46002006-06-12 22:40:23 +000025972006-06-12 Ulrich Drepper <drepper@redhat.com>
2598
2599 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
2600 section if creating a DSO and no interpreter is given.
2601 (ld_generic_create_outfile): Don't store reference to symbols in
2602 discarded COMDAT groups. Don't create PHDR and INTERP program header
2603 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00002604 (create_verneed_data): Pretty printing.
2605
Ulrich Drepper6ca46002006-06-12 22:40:23 +00002606 * ldscript.y (content): If a DSO is created don't set default
2607 interpreter from linker script.
2608
2609 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
2610 for symbols in discarded COMDAT groups.
2611 (elf_i386_create_relocations): Likewise.
2612 * ld.h (struct scninfo): Add unused_comdat.
2613 * ldgeneric.c (add_section): Also check group signature when
2614 matching COMDAT sections.
2615 (add_relocatable_file): Ignore symbols in COMDAT group which are
2616 discarded.
2617
2618 * elflint.c (check_one_reloc): For *_NONE relocs only check type
2619 and symbol reference.
2620
Ulrich Drepper54f33a72006-06-11 09:07:37 +000026212006-06-11 Ulrich Drepper <drepper@redhat.com>
2622
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00002623 * elflint.c (check_dynamic): Fix checking value of tags which are
2624 offsets in the string section. Make sure DT_STRTAB points to the
2625 section referenced in sh_link.
2626
2627 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
2628
Ulrich Drepper54f33a72006-06-11 09:07:37 +00002629 * ld.c: Recognize --eh-frame-hdr option.
2630 * ld.h (struct ld_state): Add eh_frame_hdr field.
2631 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
2632
2633 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
2634 SH_FLAGS_COMBINE.
2635 (add_relocatable_file): Minor optimization of last change.
2636 (match_section): Don't preserve SHF_GROUP flag any longer.
2637
Ulrich Drepper2d880282006-06-11 00:20:43 +000026382006-06-10 Ulrich Drepper <drepper@redhat.com>
2639
2640 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00002641 Handle record and ignore as position dependent options.
2642 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00002643 * ld.h (struct ld_state): Add execstack field.
2644 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
2645 sections.
2646 (ld_generic_create_outfile): Fix program header creation in native
2647 linker. Add PT_GNU_STACK program header.
2648
Ulrich Dreppera688a732006-06-10 06:33:00 +000026492006-06-09 Ulrich Drepper <drepper@redhat.com>
2650
2651 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
2652 for PLT entries if there is no local definition.
2653
2654 * ld.c (parse_option): Handle -z ignore like --as-needed and
2655 -z record like --no-as-needed.
2656 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
2657 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
2658 looping over DSOs. When deciding about adding DT_NEEDED entries
2659 use ->as_needed instead of ignore_unused_dsos.
2660
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000026612006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002662
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00002663 * ld.c: Recognize --as-needed and --no-as-needed options.
2664 * ld.h (struct usedfile): Add as_needed field.
2665 (struct ld_state): Likewise.
2666 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
2667 the list.
2668 * ldscript.y (filename_id_list): Split to correctly parse all
2669 combinations.
2670 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00002671
Ulrich Drepper697f4db2006-06-10 06:50:47 +000026722006-05-28 Ulrich Drepper <drepper@redhat.com>
2673
2674 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
2675 and colno.
2676
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000026772006-05-27 Ulrich Drepper <drepper@redhat.com>
2678
2679 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00002680 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00002681
Ulrich Drepper82c345d2006-04-04 22:07:54 +000026822006-04-04 Ulrich Drepper <drepper@redhat.com>
2683
2684 * addr2line.c: Update copyright year.
2685 * elfcmp.c: Likewise.
2686 * elflint.c: Likewise.
2687 * findtextrel.c: Likewise.
2688 * ld.c: Likewise.
2689 * nm.c: Likewise.
2690 * objdump.c: Likewise.
2691 * ranlib.c: Likewise.
2692 * readelf.c: Likewise.
2693 * size.c: Likewise.
2694 * strings.c: Likewise.
2695 * strip.c: Likewise.
2696
Roland McGrathdd7e22b2006-03-09 23:05:47 +000026972006-03-09 Roland McGrath <roland@redhat.com>
2698
2699 * Makefile.am (AM_LDFLAGS): New variable.
2700
Roland McGrath060fa052006-03-02 07:51:50 +000027012006-03-01 Roland McGrath <roland@redhat.com>
2702
2703 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
2704 for dwarf.h changes matching 3.0 spec.
2705 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
2706
Ulrich Drepper038129b2005-12-04 16:47:24 +000027072005-12-04 Ulrich Drepper <drepper@redhat.com>
2708
2709 * elflint.c (check_one_reloc): If relocation section is not loaded,
2710 don't check whether the relocations modify read-only sections or
2711 loaded and unloaded sections.
2712
Ulrich Drepper607e0542005-12-04 15:51:06 +000027132005-11-28 Ulrich Drepper <drepper@redhat.com>
2714
2715 * elflint.c (check_one_reloc): Take additional parameters. Use
2716 them to determine whether relocation is valid in this type of
2717 file. DSOs and executables can contain relocation sections in
2718 unloaded sections which just show the relocations the linker
2719 applied. Adjust all callers.
2720 (check_program_header): Check that PT_PHDR is loaded and that offset
2721 matches the one in the ELF header.
2722
Roland McGrath6724c902005-10-28 07:07:19 +000027232005-10-26 Roland McGrath <roland@redhat.com>
2724
2725 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
2726
Ulrich Drepperd0449522005-09-03 07:23:52 +000027272005-09-03 Ulrich Drepper <drepper@redhat.com>
2728
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002729 * strip.c (handle_elf): Unify some error messages.
2730 * ld.c (main): Likewise.
2731 * ldgeneric.c (open_elf): Likewise.
2732 * elfcmp.c (main): Likewise.
2733 * elflint.c (check_elf_header): Likewise.
2734
2735 * size.c (process_file): Fix typo in error message.
2736
Ulrich Drepperd0449522005-09-03 07:23:52 +00002737 * readelf.c: Lots of little cleanups. Use _unlocked functions.
2738
Ulrich Dreppera60501e2005-09-02 19:50:17 +000027392005-09-02 Ulrich Drepper <drepper@redhat.com>
2740
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00002741 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00002742 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00002743
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000027442005-08-28 Ulrich Drepper <drepper@redhat.com>
2745
2746 * ranlib.c: Don't define pread_retry and write_retry here.
2747
2748 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
2749 (CLEANFILES): Add *.gcno *.gcda *.gconv.
2750
2751 * strings.c (process_chunk): Reorder expressions in conditional
2752 (process_chunk_mb): Likewise.
2753
2754 * strings.c: New file.
2755 * Makefile.am (bin_PROGRAMS): Add strings.
2756 (strings_no_Wstring): Define.
2757 (strings_LDADD): Define.
2758
Roland McGrath71e15a02005-08-27 10:33:26 +000027592005-08-27 Roland McGrath <roland@redhat.com>
2760
2761 * addr2line.c (dwarf_diename_integrate): Function removed.
2762 (print_dwarf_function): Use plain dwarf_diename.
2763
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000027642005-08-24 Ulrich Drepper <drepper@redhat.com>
2765
2766 * elflint.c (check_versym): Versioned symbols should not have
2767 local binding.
2768
Ulrich Drepper5d832292005-08-15 21:36:27 +000027692005-08-15 Ulrich Drepper <drepper@redhat.com>
2770
Ulrich Drepper61655e02005-08-16 04:23:02 +00002771 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
2772 undefined.
2773
Ulrich Drepper5d832292005-08-15 21:36:27 +00002774 * Makefile.am: Add rules to build ranlib.
2775 * ranlib.c: New file.
2776
Roland McGrath18e13422005-08-15 08:01:25 +000027772005-08-14 Roland McGrath <roland@redhat.com>
2778
2779 * elflint.c (check_sections): Use ebl_section_type_name and allow any
2780 sh_type it recognizes.
2781
2782 * elflint.c (check_sections): Print unknown flags in hex, don't
2783 truncate high bits. Print section number and name for unknown type.
2784
Roland McGrathf6895042005-08-13 20:56:52 +000027852005-08-13 Roland McGrath <roland@redhat.com>
2786
2787 * elflint.c (check_program_header): Use ebl_segment_type_name and
2788 allow any p_type it recognizes. Include p_type value in error
2789 message for unknown type.
2790
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000027912005-08-13 Ulrich Drepper <drepper@redhat.com>
2792
2793 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
2794 to ebl_check_special_symbol.
2795 (check_sections): Pass ehdr to ebl_bss_plt_p.
2796
Roland McGrath653d3762005-08-13 01:59:10 +000027972005-08-12 Roland McGrath <roland@redhat.com>
2798
2799 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
2800 refers to the right section if it's not SHN_ABS.
2801 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
2802
2803 * elflint.c (check_sections): Don't complain about a non-NOBITS
2804 section taking no segment space, if it's sh_size is 0.
2805
2806 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
2807 be PROGBITS or NOBITS.
2808
2809 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
2810 standard st_value and st_size checks.
2811
Roland McGrath1c83bf12005-08-11 07:03:55 +000028122005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00002813
Roland McGrath1c83bf12005-08-11 07:03:55 +00002814 * addr2line.c (options, parse_opt): Don't handle -e here.
2815 (executable): Variable removed.
2816 (argp_children): New static variable.
2817 (argp): Use it. Make const.
2818 (main): Fill in argp_children from dwfl_standard_argp ().
2819 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
2820 (print_dwarf_function): New function. Try to figure out inline chain.
2821 (elf_getname): Function removed, libdwfl does it for us.
2822 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
2823 Use dwfl_module_addrname instead of elf_getname.
2824 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
2825 * Makefile.am (INCLUDES): Add libdwfl directory to path.
2826
28272005-08-10 Ulrich Drepper <drepper@redhat.com>
2828
2829 * strip.c (parse_opt): STATE parameter is now used.
2830 Various little cleanups.
2831
2832 * readelf.c (print_debug_line_section): Correct fallout of renaming
2833 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002834
Roland McGrath8f31c2c2005-08-09 04:58:05 +000028352005-08-08 Roland McGrath <roland@redhat.com>
2836
2837 * strip.c (options, parse_opt): Grok -R .comment for compatibility
2838 with binutils strip. Likewise -d, -S, as aliases for -g.
2839 Likewise ignore -s/--strip-all.
2840
Roland McGrath095a01b2005-08-08 03:49:35 +000028412005-08-07 Roland McGrath <roland@redhat.com>
2842
2843 * strip.c (process_file): Open read-only when using a different output
2844 file.
2845
Ulrich Drepper47be7952005-08-07 04:41:39 +000028462005-08-06 Ulrich Drepper <drepper@redhat.com>
2847
Ulrich Drepper637963b2005-08-07 05:33:07 +00002848 * elflint.c (in_nobits_scn): New function.
2849 (check_versym): Allow references for defined symbols against versions
2850 of other DSOs also for symbols in nobits sections.
2851 Move a few variables around.
2852
Ulrich Drepper47be7952005-08-07 04:41:39 +00002853 * Makefile.am (AM_CFLAGS): Avoid duplication.
2854 Link with statis libs if BUILD_STATIC.
2855
Ulrich Drepperdbace232005-08-06 01:37:23 +000028562005-08-05 Ulrich Drepper <drepper@redhat.com>
2857
2858 * elflint.c: Many, many more tests. Mostly related to symbol
2859 versioning. Those sections should now be completely checked.
2860
2861 * readelf.c (print_dynamic): Use gelf_offscn.
2862
Ulrich Drepperacb89832005-08-04 07:01:49 +000028632005-08-04 Ulrich Drepper <drepper@redhat.com>
2864
2865 * elflint.c: Add lots more tests: more extension symbol table sanity,
2866 versioning section tests, hash table tests. General cleanup.
2867
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000028682005-08-02 Ulrich Drepper <drepper@redhat.com>
2869
Ulrich Drepper8a687742005-08-03 02:24:12 +00002870 * objdump.c: New file.
2871 * Makefile.am (bin_PROGRAMS): Add objdump.
2872 (objdump_LDADD): Define.
2873
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002874 * elflint.c (check_reloc_shdr): New function split out from check_rela
2875 and check_rel.
2876 (check_one_reloc): New function. Likewise.
2877 (check_rela): Use check_reloc_shdr and check_one_reloc.
2878 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00002879 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
2880 section.
2881 Add checks that relocations against read-only segments are flagged,
2882 that the text relocation flag is not set unnecessarily, and that
2883 relocations in one section are either against loaded or not-loaded
2884 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00002885
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000028862005-08-01 Ulrich Drepper <drepper@redhat.com>
2887
2888 * elfcmp.c (main): Ignore section count and section name string table
2889 section index.
2890
Roland McGrathf9ece8a2005-07-28 07:03:04 +000028912005-07-27 Roland McGrath <roland@redhat.com>
2892
2893 * elfcmp.c: Include <locale.h>.
2894
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000028952005-07-27 Ulrich Drepper <drepper@redhat.com>
2896
2897 * elfcmp.c: Print name and index of differing section.
2898
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000028992005-07-24 Ulrich Drepper <drepper@redhat.com>
2900
2901 * elfcmp.c: Implement comparing gaps between sections.
2902
29032005-07-23 Ulrich Drepper <drepper@redhat.com>
2904
2905 * elflint.c: Include libeblP.h instead of libebl.h.
2906 * nm.c: Likewise.
2907 * readelf.c: Likewise.
2908 * elfcmp.c: Likewise.
2909
2910 * elfcmp.c (main): Compare individual ELF header fields, excluding
2911 e_shoff instead of the whole struct at once.
2912 Use ebl_section_strip_p instead of SECTION_STRIP_P.
2913 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
2914
29152005-07-22 Ulrich Drepper <drepper@redhat.com>
2916
2917 * elfcmp.c (main): Take empty section into account when comparing
2918 section content.
2919
2920 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
2921 using it.
2922
29232005-07-21 Ulrich Drepper <drepper@redhat.com>
2924
2925 * elfcmp.c: New file.
2926 * Makefile.am (bin_PROGRAMS): Add elfcmp.
2927 (elfcmp_LDADD): Define.
2928
2929 * elflint.c (check_rela): Check that copy relocations only reference
2930 object symbols or symbols with unknown type.
2931 (check_rel): Likewise.
2932
29332005-06-08 Roland McGrath <roland@redhat.com>
2934
2935 * readelf.c (print_ops): Add consts.
2936
29372005-05-31 Roland McGrath <roland@redhat.com>
2938
2939 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
2940 abbreviations. Print a header line before each CU section.
2941
2942 * readelf.c (print_debug_loc_section): Fix indentation for larger
2943 address size.
2944
29452005-05-30 Roland McGrath <roland@redhat.com>
2946
2947 * readelf.c (print_debug_line_section): Print section offset of each
2948 CU's table, so they are easy to find from seeing the stmt_list value.
2949
2950 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
2951 (attr_callback): Grok DW_AT_ranges and print offset in hex.
2952
2953 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
2954 (print_debug_ranges_section, print_debug_loc_section): Likewise.
2955
2956 * readelf.c (print_ops): Take different args for indentation control.
2957 (attr_callback): Caller updated.
2958 Grok several more block-form attributes as being location expressions.
2959 For those same attributes with udata forms, format output differently
2960 for location list offset.
2961 (print_debug_loc_section): Implement it for real.
2962
2963 * readelf.c (options): Mention ranges for --debug-dump.
2964 (enum section_e): Add section_ranges.
2965 (parse_opt): Grok "ranges" for -w/--debug-dump.
2966 (print_debug_ranges_section): New function.
2967 (print_debug): Handle .debug_ranges section.
2968
29692005-05-30 Ulrich Drepper <drepper@redhat.com>
2970
2971 * readelf.c (handle_notes): At least x86-64 need not have the note
2972 section values aligned to 8 bytes.
2973
29742005-05-18 Ulrich Drepper <drepper@redhat.com>
2975
2976 * readelf.c (dwarf_tag_string): Add new tags.
2977
29782005-05-08 Roland McGrath <roland@redhat.com>
2979
2980 * strip.c (handle_elf): Don't translate hash and versym data formats,
2981 elf_getdata already did it for us.
2982
29832005-05-07 Ulrich Drepper <drepper@redhat.com>
2984
2985 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
2986 (addr2line_LDADD): Likewise.
2987
29882005-05-03 Roland McGrath <roland@redhat.com>
2989
2990 * strip.c (handle_elf): Apply symbol table fixups to discarded
2991 relocation sections when they are being saved in the debug file.
2992
2993 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
2994 and gelf_xlatetof, not the native byte order.
2995
2996 * strip.c (parse_opt): Give error if -f or -o is repeated.
2997 (main): Exit if argp_parse returns nonzero.
2998
2999 * strip.c (debug_fname_embed): New variable.
3000 (options, parse_opt): New option -F to set it.
3001
30022005-05-07 Ulrich Drepper <drepper@redhat.com>
3003
3004 * readelf.c (parse_opt): Make any_control_option variable
3005 local. Simplify some tests.
3006
30072005-05-03 Roland McGrath <roland@redhat.com>
3008
3009 * strip.c (crc32_file): Function removed (now in ../lib).
3010
30112005-05-03 Roland McGrath <roland@redhat.com>
3012
3013 * elflint.c (is_debuginfo): New variable.
3014 (options, parse_opt): New option --debuginfo/-d to set it.
3015 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
3016 (check_note): If is_debuginfo, don't try to get note contents.
3017
30182005-04-24 Ulrich Drepper <drepper@redhat.com>
3019
3020 * readelf.c (print_debug_abbrev_section): Don't print error when end of
3021 section reached.
3022
30232005-04-14 Ulrich Drepper <drepper@redhat.com>
3024
3025 * readelf.c (dwarf_encoding_string): New function.
3026 (dwarf_inline_string): New function.
3027 (dwarf_access_string): New function.
3028 (dwarf_visibility_string): New function.
3029 (dwarf_virtuality_string): New function.
3030 (dwarf_identifier_case_string): New function.
3031 (dwarf_calling_convention_string): New function.
3032 (dwarf_ordering_string): New function.
3033 (dwarf_discr_list_string): New function.
3034 (attr_callback): Decode man more attribute values.
3035
30362005-04-01 Ulrich Drepper <drepper@redhat.com>
3037
3038 * addr2line.c: Finish implementation of -f option.
3039
30402005-03-29 Ulrich Drepper <drepper@redhat.com>
3041
3042 * addr2line.c: New file.
3043 * Makefile.am (bin_PROGRAMS): Add addr2line.
3044 Define addr2line_LDADD.
3045
3046 * findtextrel.c: Use new dwarf_addrdie function.
3047
3048 * findtextrel.c: Fix usage message and re-add accidentally removed
3049 line.
3050
30512005-03-28 Ulrich Drepper <drepper@redhat.com>
3052
3053 * findtextrel.c: New file.
3054 * Makefile: Add rules to build findtextrel.
3055
30562005-02-15 Ulrich Drepper <drepper@redhat.com>
3057
3058 * ldlex.l: Provide ECHO definition to avoid warning.
3059
3060 * elflint.c (check_program_header): Fix typo in RELRO test.
3061
3062 * Makefile.am (AM_CFLAGS): Add more warning options.
3063 * elflint.c: Fix warnings introduced by the new warning options.
3064 * i386_ld.c: Likewise.
3065 * ld.c: Likewise.
3066 * ld.h: Likewise.
3067 * ldgeneric.c: Likewise.
3068 * nm.c: Likewise.
3069 * readelf.c: Likewise.
3070 * sectionhash.c: Likewise.
3071 * size.c: Likewise.
3072 * string.c: Likewise.
3073
30742005-02-05 Ulrich Drepper <drepper@redhat.com>
3075
3076 * Makefile.am: Check for text relocations in constructed DSOs.
3077
3078 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
3079 with -lmudflap.
3080
3081 * ldscript.y: Add as_needed handling.
3082 * ldlex.l: Recognize AS_NEEDED token.
3083 * ld.h (struct filename_list): Add as_needed flag.
3084
30852005-02-04 Ulrich Drepper <drepper@redhat.com>
3086
3087 * elflint.c (check_symtab): Correctly determine size of GOT section.
3088
30892005-01-19 Ulrich Drepper <drepper@redhat.com>
3090
3091 * ld.c: Remove unnecessary more_help function. Print bug report
3092 address using argp.
3093 * strip.c: Likewise.
3094 * size.c: Likewise.
3095 * nm.c: Likewise.
3096 * readelf.c: Likewise.
3097 * elflint.c: Likewise.
3098
3099 * elflint.c (main): Don't check for parameter problems here.
3100 (parse_opt): Do it here, where we get informed about some of them
3101 anyway.
3102
3103 * readelf.c (main): Don't check for parameter problems here.
3104 (parse_opt): Do it here, where we get informed about some of them
3105 anyway.
3106
31072005-01-11 Ulrich Drepper <drepper@redhat.com>
3108
3109 * strip.c: Update copyright year.
3110 * readelf.c: Likewise.
3111 * size.c: Likewise.
3112 * nm.c: Likewise.
3113 * ld.c: Likewise.
3114 * elflint.c: Likewise.
3115
3116 * elflint.c (check_symtab): Don't warn about wrong size for
3117 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
3118
31192004-10-05 Ulrich Drepper <drepper@redhat.com>
3120
3121 * readelf.c (print_phdr): In section mapping, also indicate
3122 sections in read-only segments.
3123
31242004-09-25 Ulrich Drepper <drepper@redhat.com>
3125
3126 * readelf.c: Make compile with gcc 4.0.
3127 * strip.c: Likewise.
3128
31292004-08-16 Ulrich Drepper <drepper@redhat.com>
3130
3131 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
3132 allocate to work around gcc 3.4 bug.
3133
31342004-01-25 Ulrich Drepper <drepper@redhat.com>
3135
3136 * ldlex.l (invalid_char): Better error message.
3137
31382004-01-23 Ulrich Drepper <drepper@redhat.com>
3139
3140 * readelf.c: Print SHT_GNU_LIBLIST sections.
3141
3142 * none_ld.c: New file.
3143
31442004-01-21 Ulrich Drepper <drepper@redhat.com>
3145
3146 * Makefile.am: Enable building of machine specific linker.
3147
31482004-01-20 Ulrich Drepper <drepper@redhat.com>
3149
3150 * Makefile.am: Support building with mudflap.
3151
3152 * i386_ld.c: Fix warnings gcc 3.4 spits out.
3153 * ldgeneric.c: Likewise.
3154 * ldscript.y: Likewise.
3155 * readelf.c: Likewise.
3156 * strip.c: Likewise.
3157
3158 * readelf.c (print_debug_line_section): Determine address size
3159 correctly.
3160
31612004-01-19 Ulrich Drepper <drepper@redhat.com>
3162
3163 * readelf.c (print_phdr): Show which sections are covered by the
3164 PT_GNU_RELRO entry.
3165
3166 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
3167
3168 * readelf.c (print_debug_macinfo_section): Implement.
3169
31702004-01-18 Ulrich Drepper <drepper@redhat.com>
3171
3172 * readelf.c (print_debug_line_section): Implement.
3173
31742004-01-17 Ulrich Drepper <drepper@redhat.com>
3175
3176 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
3177 * src/ld.c: Likewise.
3178 * src/nm.c: Likewise.
3179 * src/readelf.c: Likewise.
3180 * src/size.c: Likewise.
3181 * src/strip.c: Likewise.
3182
3183 * strip.c: Add a few more unlikely. Reduce scope of some variables.
3184
3185 * Makefile.am: Support building with mudflap.
3186
31872004-01-16 Ulrich Drepper <drepper@redhat.com>
3188
3189 * readelf.c (print_debug_info_section): Free dies memory.
3190
3191 * readelf.c: Print .debug_info section content.
3192
31932004-01-13 Ulrich Drepper <drepper@redhat.com>
3194
3195 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
3196
31972004-01-12 Ulrich Drepper <drepper@redhat.com>
3198
3199 * readelf.c (print_debug_aranges): Implement using libdw.
3200
32012004-01-11 Ulrich Drepper <drepper@redhat.com>
3202
3203 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
3204
3205 * readelf.c: Use libdw instead of libdwarf. Not all of the old
3206 behavior is available yet.
3207 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
3208
32092004-01-09 Ulrich Drepper <drepper@redhat.com>
3210
3211 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
3212
3213 * nm.c: Implement getting information about local variables.
3214
32152004-01-07 Ulrich Drepper <drepper@redhat.com>
3216
3217 * nm.c: Read also debug information for local symbols.
3218
32192004-01-05 Ulrich Drepper <drepper@redhat.com>
3220
3221 * nm.c: Shuffle dwarf handling code around so the maximum column
3222 width can be computed ahead of printing. Avoid collection symbols
3223 which are not printed anyway.
3224
3225 * nm.c: Rewrite dwarf handling to use libdw.
3226 * Makefile.am (AM_CFLAGS): Add -std parameter.
3227 (INCLUDES): Find header in libdw subdir.
3228 (nm_LDADD): Replace libdwarf with libdw.
3229
3230 * elflint.c: Update copyright year.
3231 * readelf.c: Likewise.
3232 * size.c: Likewise.
3233 * strip.c: Likewise.
3234 * nm.c: Likewise.
3235
32362003-12-31 Ulrich Drepper <drepper@redhat.com>
3237
3238 * strip.c (process_file): Close file before returning.
3239
32402003-11-19 Ulrich Drepper <drepper@redhat.com>
3241
3242 * readelf.c (handle_dynamic): Make column for tag name wider.
3243
32442003-09-29 Ulrich Drepper <drepper@redhat.com>
3245
3246 * readelf.c (handle_dynamic): Always terminate tag name with a space.
3247
32482003-09-25 Ulrich Drepper <drepper@redhat.com>
3249
3250 * strip.c (process_file): Don't mmap the input file, we modify the
3251 data structures and don't want the change end up on disk.
3252
32532003-09-23 Jakub Jelinek <jakub@redhat.com>
3254
3255 * unaligned.h (union u_2ubyte_unaligned,
3256 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
3257 packed attribute.
3258 (add_2ubyte_unaligned, add_4ubyte_unaligned,
3259 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
3260 Read/store value through _ptr->u instead of *_ptr.
3261
32622003-09-22 Ulrich Drepper <drepper@redhat.com>
3263
3264 * size.c (show_sysv): Change type of maxlen to int.
3265
3266 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
3267 buckets.
3268
3269 * i386_ld.c: Many many fixes and extensions.
3270 * ld.c: Likewise.
3271 * ldgeneric.c: Likewise.
3272
32732003-08-16 Ulrich Drepper <drepper@redhat.com>
3274
3275 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
3276 the reference is from another DSO.
3277
32782003-08-15 Ulrich Drepper <drepper@redhat.com>
3279
3280 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
3281 point is found when creating a DSO.
3282
32832003-08-14 Ulrich Drepper <drepper@redhat.com>
3284
3285 * ld.c (main): Always call FLAG_UNRESOLVED.
3286 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
3287 undefined symbols if not creating DSO or ld_state.nodefs is not set.
3288
32892003-08-13 Ulrich Drepper <drepper@redhat.com>
3290
3291 * Makefile.in: Depend on libebl.a, not libebl.so.
3292
3293 * ld.c (main): Mark stream for linker script as locked by caller.
3294 (read_version_script): Likewise.
3295 * ldlex.c: Define fread and fwrite to _unlocked variant.
3296
3297 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
3298 target_bswap_32.
3299 * unaligned.h: Define target_bswap_16, target_bswap_32, and
3300 target_bswap_64.
3301 (store_2ubyte_unaligned, store_4ubyte_unaligned,
3302 store_8ubyte_unaligned): Define using new macros.
3303
33042003-08-12 Ulrich Drepper <drepper@redhat.com>
3305
3306 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
3307 possibly unaligned memory. Support use of big endian machines.
3308
33092003-08-11 Ulrich Drepper <drepper@redhat.com>
3310
3311 * Moved to CVS archive.