blob: 69f9a655f9f16664b31dec02d63d3aeb5762010c [file] [log] [blame]
Ulrich Drepper96d950e2009-07-14 10:42:01 -070012009-07-14 Ulrich Drepper <drepper@redhat.com>
2
3 * elflint.c (check_elf_header): Allow Linux ABI.
4 (check_symtab): Handle STB_GNU_UNIQUE.
5
Mark Wielaardf735db12009-07-08 19:18:53 +020062009-07-08 Mark Wielaard <mjw@redhat.com>
7
8 * readelf.c (attr_callback): Handle DW_Form constants for
9 DW_AT_data_member_location.
10
Roland McGrathdffc33d2009-07-06 16:06:41 -0700112009-07-06 Roland McGrath <roland@redhat.com>
12
13 * readelf.c (register_info): New function. Handle unknown register #s.
14 (print_cfa_program): Use it.
15 (handle_core_register, handle_core_registers): Likewise.
16
Roland McGrath5dbccdb2009-06-28 14:48:02 -0700172009-06-28 Roland McGrath <roland@redhat.com>
18
19 * readelf.c (print_address_names): New static variable.
20 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
21 (format_dwarf_addr): Don't look up name if !print_address_names.
22
Ulrich Drepperf1894932009-06-13 15:55:42 -0700232009-06-13 Ulrich Drepper <drepper@redhat.com>
24
25 * ldgeneric.c: Don't use deprecated libelf functions.
26 * nm.c: Likewise.
27 * objdump.c: Likewise.
28 * readelf.c: Likewise.
29 * size.c: Likewise.
30 * strip.c: Likewise.
31 * unstrip.c: Likewise.
32 * ld.h: Fix up comment.
33
Ulrich Drepperb47d2902009-06-01 07:38:32 -0700342009-06-01 Ulrich Drepper <drepper@redhat.com>
35
36 * readelf.c (print_relocs): Expect ELF header argument and pass on
37 to handle_relocs_rel* functions. Adjust caller.
38 (handle_relocs_rel): Add ELF header argument. Add special case for
39 the IRELATIVE relocations in statically linked executables.
40 (handle_relocs_rela): Likewise.
41
Roland McGrathdb19f0b2009-05-07 18:44:27 -0700422009-04-29 Ulrich Drepper <drepper@redhat.com>
43
44 * elflint.c (check_symtab): Add tests of st_other field.
45
Ulrich Drepperaab90f92009-04-23 07:44:36 -0700462009-04-23 Ulrich Drepper <drepper@redhat.com>
47
48 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
49
Roland McGrathd86e1832009-04-20 00:49:33 -0700502009-04-20 Roland McGrath <roland@redhat.com>
51
Roland McGrath8a592412009-04-20 01:20:44 -070052 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
53 of inline call sites.
54
Roland McGrathd86e1832009-04-20 00:49:33 -070055 * addr2line.c (just_section): New variable.
56 (adjust_to_section): New function, broken out of ...
57 (handle_address): ... here.
58 (options, parse_opt): Add -j/--section=NAME to set it.
59
Roland McGrath2fb90512009-04-15 14:47:13 -0700602009-04-15 Roland McGrath <roland@redhat.com>
61
62 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
63 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
64
Roland McGrath04a14162009-04-14 01:02:17 -0700652009-04-14 Roland McGrath <roland@redhat.com>
66
Roland McGratheb9ba472009-04-14 18:44:45 -070067 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
68 like SHT_GNU_ATTRIBUTES.
69
Roland McGrath94f43832009-04-14 04:39:32 -070070 * readelf.c (handle_core_registers): Fix error message.
71
Roland McGrath04a14162009-04-14 01:02:17 -070072 * strip.c (handle_elf: check_preserved): Don't note any change when
73 .debug_data is already filled from a previous pass.
74
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800752009-02-05 Ulrich Drepper <drepper@redhat.com>
76
Ulrich Drepper51b3f472009-02-05 22:10:39 -080077 * objdump.c (show_relocs_x): Minor cleanups.
78
Ulrich Drepper411cdb22009-02-05 22:04:26 -080079 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -080080 Print first DW_CFA_expression and DW_CFA_val_expression parameter
81 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -080082
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800832009-02-01 Ulrich Drepper <drepper@redhat.com>
84
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080085 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
86 into ...
87 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -080088 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080089
Ulrich Dreppercbb422e2009-02-01 18:18:55 -080090 * objdump.c (show_relocs_rela): Show offsets as signed values.
91
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080092 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
93 Improve some error messages.
94 Use program_invocation_short_name instead of AR macro.
95 * Makefile.am (CFLAGS_ar): Remove.
96 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
97 * objdump.c (parse_opt): Likewise.
98 * readelf.c (parse_opt): Likewise.
99
Roland McGrath51f01282009-01-27 17:08:03 -08001002009-01-27 Roland McGrath <roland@redhat.com>
101
102 * readelf.c (print_ops): Notice short length, don't overrun buffer
103 (still need to fix LEB128).
104
105 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
106
107 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
108
Ulrich Drepper62c46532009-01-24 17:01:08 -08001092009-01-24 Ulrich Drepper <drepper@redhat.com>
110
111 * readelf.c (print_debug_frame_section): Fix computation of vma_base
112 for PC-relative mode.
113
Ulrich Drepperd7285e12009-01-23 16:10:44 -08001142009-01-23 Ulrich Drepper <drepper@redhat.com>
115
Ulrich Drepperccccab02009-01-23 16:32:21 -0800116 * size.c (process_file): When handling archive, close file descriptor
117 here. For unknown file format also close file descriptor.
118 (handle_ar): Don't close file descriptor here.
119
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800120 * readelf.c (parse_opt): Move code to add to dump_data_sections and
121 string_sections list in local function add_dump_section. Adjust 'x'
122 key handling. For 'a' key add .strtab, .dynstr, and .comment section
123 to string_sections list.
124
Roland McGrathe9de9b42009-01-22 13:05:40 -08001252009-01-22 Roland McGrath <roland@redhat.com>
126
Roland McGrath9a847e12009-01-22 19:55:00 -0800127 * readelf.c (print_phdr): Don't print section mapping when no sections.
128
Roland McGrathd759aa62009-01-22 19:17:07 -0800129 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
130
Roland McGrathcabeeee2009-01-22 13:17:45 -0800131 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
132 and reset it only for the 'true' cases.
133
134 * Makefile.am (addr2line_no_Wformat): New variable.
135
Roland McGrathe9de9b42009-01-22 13:05:40 -0800136 * readelf.c (print_debug_frame_section): Use t instead of j formats
137 for ptrdiff_t OFFSET.
138
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001392009-01-21 Ulrich Drepper <drepper@redhat.com>
140
141 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800142 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800143 (check_exception_data): First sanity test.
144
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001452009-01-17 Ulrich Drepper <drepper@redhat.com>
146
Ulrich Drepper935edde2009-01-17 16:06:42 -0800147 * readelf.c (print_debug_exception_table): Show target of ar_disp
148 field.
149
150 * elflint.c (check_program_header): Add most consistency checks for
151 PT_GNU_EH_FRAME entry.
152
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800153 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
154 ARGP_PROGRAM_BUG_ADDRESS_DEF.
155 * ar.c: Likewise.
156 * elfcmp.c: Likewise.
157 * elflint.c: Likewise.
158 * findtextrel.c: Likewise.
159 * ld.c: Likewise.
160 * nm.c: Likewise.
161 * objdump.c: Likewise.
162 * ranlib.c: Likewise.
163 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800164
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800165 * size.c: Likewise.
166 * strings.c: Likewise.
167 * strip.c: Likewise.
168 * unstrip.c: Likewise.
169
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001702009-01-16 Ulrich Drepper <drepper@redhat.com>
171
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800172 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
173 matches .eh_frame_hdr section, if it is available. Also check that
174 the segment is allocated, not writable, not executable.
175
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800176 * readelf.c: Add -e option. Dump exception and unwind related
177 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800178 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800179 (print_debug_exception_table): Beginning of support.
180 (print_debug): Hook up print_debug_exception_table for
181 .gcc_except_table sections.
182
183 * readelf.c (print_debug_frame_section): Some fixes for last change.
184
Ulrich Drepper351bf202009-01-15 20:18:40 -08001852009-01-15 Ulrich Drepper <drepper@redhat.com>
186
187 * readelf.c (print_encoding): Now a toplevel function.
188 (print_relinfo): Likewise.
189 (print_encoding_base): Broken out of print_debug_frame_section.
190 (print_debug_frame_section): Print different header for .eh_frame
191 sections. Fix recognition of matching CIEs in .debug_frame sections.
192 Print absolute offset for PC-relative FDE locations. Don't print
193 table header for FDEs if the table is empty.
194 (read_encoded): New function.
195 (print_debug_frame_hdr_section): New function.
196 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
197 sections.
198
199 * readelf.c (handle_relocs_rel): Print section number.
200 (print_debug_abbrev_section): Likewise.
201 (print_debug_aranges_section): Likewise.
202 (print_debug_ranges_section): Likewise.
203 (print_debug_info_section): Likewise.
204 (print_debug_line_section): Likewise.
205 (print_debug_loc_section): Likewise.
206 (print_debug_macinfo_section): Likewise.
207 (print_debug_pubnames_section): Likewise.
208 (print_debug_str_section): Likewise.
209
Ulrich Drepper8b394632009-01-10 18:29:56 -08002102009-01-10 Ulrich Drepper <drepper@redhat.com>
211
212 * strings.c (read_block): Fix typo in error message string.
213
Ulrich Drepper87cf5832009-01-07 20:39:21 -08002142009-01-07 Ulrich Drepper <drepper@redhat.com>
215
216 * ld.c (ld_new_searchdir): Fix adding to search path list.
217
Ulrich Drepperac194d02009-01-06 00:30:01 -08002182009-01-06 Ulrich Drepper <drepper@redhat.com>
219
220 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800221
Roland McGrath3614d992009-01-05 18:05:32 -08002222009-01-05 Roland McGrath <roland@redhat.com>
223
224 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
225 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800226
Ulrich Drepper44173ed2009-01-01 19:00:41 -08002272009-01-01 Ulrich Drepper <drepper@redhat.com>
228
229 * addr2line.c: Update copyright year.
230 * ar.c: Likewise.
231 * elfcmp.c: Likewise.
232 * elflint.c: Likewise.
233 * findtextrel.c: Likewise.
234 * ld.c: Likewise.
235 * nm.c: Likewise.
236 * objdump.c: Likewise.
237 * ranlib.c: Likewise.
238 * readelf.c: Likewise.
239 * size.c: Likewise.
240 * strings.c: Likewise.
241 * strip.c: Likewise.
242 * unstrip.c: Likewise.
243
Roland McGrath468fe4d2008-12-11 21:00:12 -08002442008-12-11 Roland McGrath <roland@redhat.com>
245
246 * nm.c (sym_name): New function.
247 (show_symbols_sysv): Use it in place of elf_strptr.
248 (show_symbols_bsd, show_symbols_posix): Likewise.
249 Fixes RHBZ#476136.
250
251 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
252 elf_strptr fails.
253
Roland McGratha845f682008-12-03 03:41:58 +00002542008-12-02 Roland McGrath <roland@redhat.com>
255
256 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
257 nonzero OFFSET argument to dwfl_getmodules.
258
Roland McGrath1d8bb252008-08-07 08:39:41 +00002592008-08-07 Roland McGrath <roland@redhat.com>
260
261 * addr2line.c (main): Pass string to handle_address.
262 (see_one_module): New function, subroutine of handle_address.
263 (find_symbol): Likewise.
264 (handle_address): Take string argument rather than address.
265 Convert plain number, or handle strings like "(section)+offset"
266 or "symbol+offset".
267
2682008-08-01 Roland McGrath <roland@redhat.com>
269
270 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
271 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
272
273 * readelf.c (convert): Take new argument SIZE.
274 (handle_core_register, handle_core_item): Update callers.
275 (handle_core_item): Take new arg REPEATED_SIZE.
276 (handle_core_items): Special case for a singleton item,
277 let handle_core_item handle repeats if it wants to.
278
279 * readelf.c (handle_core_items): Give abridged output
280 for identical groups repeated more than twice.
281
2822008-07-04 Roland McGrath <roland@redhat.com>
283
284 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
285
Roland McGrath521c47d2008-04-11 07:01:58 +00002862008-04-10 Roland McGrath <roland@redhat.com>
287
288 * strip.c (handle_elf): Don't keep sections that kept symbol tables
289 refer to. Instead, just be sure to preserve the original symbol
290 table in the debug file so those symbols go with their sections and
291 can be elided from the stripped version of the symbol table.
292
293 * strip.c (handle_elf): When a discarded section kept in the debug
294 file refers to a nondiscard section via sh_link/sh_info, preserve
295 that nondiscarded section unmodified in the debug file as well.
296 Skip adjustment of discarded sections symbol table references when
297 that symbol table is copied in this way.
298
299 * elflint.c (check_symtab): Don't crash from missing symbol names
300 after diagnosing bogus strtab.
301
302 * strip.c (handle_elf): Cosmetic cleanup in special section contents
303 adjustment for symtab changes.
304
Roland McGrath13b69602008-04-01 02:30:05 +00003052008-03-31 Roland McGrath <roland@redhat.com>
306
307 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
308 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
309 excuse a special section.
310
3112008-03-27 Roland McGrath <roland@redhat.com>
312
313 * elflint.c (check_sections): Check that executability and writability
314 of sections is reflected in segment p_flags.
315
Roland McGrathd11f9cb2008-03-26 20:51:59 +00003162008-03-26 Roland McGrath <roland@redhat.com>
317
318 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
319 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
320 is valid in RELRO.
321
Roland McGrath47c5c352008-02-29 10:17:16 +00003222008-02-29 Roland McGrath <roland@redhat.com>
323
324 * readelf.c (print_attributes): Add a cast.
325 * elflint.c (check_attributes): Likewise.
326
327 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
328 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
329 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
330
Ulrich Drepper834de6f2008-02-23 06:50:01 +00003312008-02-03 Ulrich Drepper <drepper@redhat.com>
332
333 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
334 when linked into executable.
335 (elf_i386_create_relocations): Likewise.
336
Roland McGrath059c83e2008-02-21 06:19:39 +00003372008-02-20 Roland McGrath <roland@redhat.com>
338
339 * readelf.c (print_attributes): New function.
340 (process_elf_file): Call it under -A.
341
342 * elflint.c (check_attributes): Implement it for real.
343
3442008-02-19 Roland McGrath <roland@redhat.com>
345
346 * elflint.c (special_sections): Handle .gnu.attributes section.
347 (check_sections): Likewise.
348 (check_attributes): New function.
349
3502008-02-10 Roland McGrath <roland@redhat.com>
351
352 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
353 sections and ET_REL files.
354
Ulrich Drepper712d78e2008-02-02 10:01:53 +00003552008-02-02 Ulrich Drepper <drepper@redhat.com>
356
357 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
358 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
359 and R_386_TLS_LE.
360 (elf_i386_create_relocations): Likewise.
361 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
362 elements.
363 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
364 (ld_generic_create_outfile): Add PT_TLS entry to program header.
365 Fix generation of PT_GNU_STACK entry.
366
Ulrich Drepperc54785a2008-02-01 18:05:21 +00003672008-02-01 Ulrich Drepper <drepper@redhat.com>
368
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000369 * ld.c (replace_args): Prevent loop over replacements if the parameter
370 is only two characters long.
371
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000372 * ld.c: Recognize sha1 argument for --build-id parameter.
373 * ldgeneric.c (create_build_id_section): Handle sha1.
374 (compute_hash_sum): New function. Broken out of compute_build_id.
375 Take hash function and context as parameters.
376 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
377 implementation.
378
Ulrich Drepper89759c72008-01-31 19:44:12 +00003792008-01-31 Ulrich Drepper <drepper@redhat.com>
380
381 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
382 * ld.c: Recognize --build-id command line parameter.
383 * ld.h: Define scn_dot_note_gnu_build_id.
384 (struct ld_state): Add build_id and buildidscnidx elements.
385 * ldgeneric.c: Implement --build-id command line parameter.
386 * ldlex.l (ID): Recognize - as valid character after the first one.
387
Ulrich Drepper5530ec52008-01-29 10:42:07 +00003882008-01-29 Ulrich Drepper <drepper@redhat.com>
389
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000390 * ld.c (replace_args): New function.
391 (main): Use it to rewrite old-style parameters.
392
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000393 * elf32-i386.script: Add .gnu.hash section.
394 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
395 (fillin_special_symbol): Initialize st_size.
396 (sortfct_hashval): New function.
397 (create_gnu_hash): New function.
398 (create_hash): New function.
399 (ld_generic_create_outfile): Use the new functions to create the
400 hash tables.
401
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000402 * elflint.c (check_gnu_hash): Fix index value printed in error message.
403
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00004042008-01-24 Ulrich Drepper <drepper@redhat.com>
405
406 * elflint.c (check_group): Check that signature symbol for section
407 group is not an empty string.
408 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
409 section. Start implementation of --hash-style.
410 * i386_ld.c: Likewise.
411 * ld.c: Recognize --hash-style.
412 * ld.h (struct scninfo): Add comdat_group.
413 Add additional parameter to finalize_plt callback.
414
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00004152008-01-22 Ulrich Drepper <drepper@redhat.com>
416
417 * ld.h (struct callbacks): Add initialize_gotplt.
418 (struct scnhead): Add scn_dot_gotplt.
419 (struct ld_state): Add gotpltscnidx.
420 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
421 (elf_i386_initialize_pltrel): Likewise.
422 (elf_i386_initialize_got): There is now a separate .got.plt, so
423 don't do the PLT-related work here. Initialize d_type.
424 (elf_i386_initialize_gotplt): New function.
425 (elf_i386_plt0): Use ud2a after indirect jump.
426 (elf_i386_pic_plt0_entry): Likewise.
427 (elf_i386_finalize_plt): Reference now .got.plt.
428 (elf_i386_count_relocations): For GOT entries which need no relocation
429 don't bump nrel_got.
430 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
431 handling for split .got/.got.plt.
432 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
433 * elf32-i386.script: Sort sections for security. There are no .got
434 input sections. Add .got.plt.
435 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
436 (ld_generic_create_outfile): Initialize .got.plt section.
437 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
438
Ulrich Drepperd9488292008-01-20 16:43:15 +00004392008-01-19 Ulrich Drepper <drepper@redhat.com>
440
441 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
442 symbols are not carried over into statically linked output files.
443 Add dummy entries for more TLS relocations.
444
445 * ld.c (options): Add long names for -( and -).
446
447 * ldgeneric.c (check_definition): For newly found definitions don't
448 mark section as used if symbol is absolute.
449 (extract_from_archive): Only assign archive sequence number the first
450 time the archive is handled. Update ld_state.last_archive_used
451 if any symbol was used. Remove nround variable.
452 (file_process2): When using symbol from an archive, update
453 ld_state.group_start_archive, ld_state.archives, and
454 ld_state.tailarchives.
455 (ld_generic_file_process): If group is not handled anymore, after
456 freeing ELF handles for the archives, clear ld_state.archives and
457 *nextp. Fix wrong logic in recognizing first iteration of group
458 loop. When clearing flags, also clear ld_state.group_start_archive.
459
Ulrich Drepper5eee1222008-01-11 10:12:18 +00004602008-01-11 Ulrich Drepper <drepper@redhat.com>
461
462 * objdump.c (show_disasm): Adjust disassembler format string for
463 removal of %e.
464
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00004652008-01-04 Roland McGrath <roland@redhat.com>
466
Roland McGrath059c83e2008-02-21 06:19:39 +0000467 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
468 a size greater than the items cover means multiple sets of items.
469 (handle_core_note): Update caller.
470
4712008-01-04 Roland McGrath <roland@redhat.com>
472
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000473 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
474
4752008-01-03 Roland McGrath <roland@redhat.com>
476
477 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
478
479 * elflint.c (check_dynamic): Remove duplicate initializer.
480
Ulrich Drepperad024af2008-01-02 17:42:52 +00004812008-01-02 Ulrich Drepper <drepper@redhat.com>
482
483 * addr2line.c: Update copyright year.
484 * ar.c: Likewise.
485 * elfcmp.c: Likewise.
486 * elflint.c: Likewise.
487 * findtextrel.c: Likewise.
488 * ld.c: Likewise.
489 * nm.c: Likewise.
490 * objdump.c: Likewise.
491 * ranlib.c: Likewise.
492 * readelf.c: Likewise.
493 * size.c: Likewise.
494 * strings.c: Likewise.
495 * strip.c: Likewise.
496 * unstrip.c: Likewise.
497
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00004982007-12-30 Ulrich Drepper <drepper@redhat.com>
499
500 * objdump (show_disasm): Use %e after third parameter.
501
5022007-12-21 Ulrich Drepper <drepper@redhat.com>
503
504 * strip.c: Fix wrong parenthesis in a few branch predictions.
505 * strings.c: Likewise.
506
5072007-12-20 Ulrich Drepper <drepper@redhat.com>
508
509 * Makefile.am (DEFS): Add DEBUGPRED.
510 * addr2line.c: Include debugpred.h.
511 * ar.c: Likewise.
512 * elfcmp.c: Likewise.
513 * elflint.c: Likewise.
514 * findtextrel.c: Likewise.
515 * nm.c: Likewise.
516 * objdump.c: Likewise.
517 * ranlib.c: Likewise.
518 * readelf.c: Likewise.
519 * size.c: Likewise.
520 * strings.c: Likewise.
521 * strip.c: Likewise.
522 * unstrip.c: Likewise.
523 * debugpred.h: New file.
524
525 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
526 (handle_relocs_rela): Likewise.
527
528 * readelf.c: Add lots of likely/unlikely.
529
530 * elflint.c: Minor cleanups.
531
Roland McGrath1a2e8f42007-12-15 23:39:34 +00005322007-11-19 Roland McGrath <roland@redhat.com>
533
534 * readelf.c (print_ops): Handle all bad op codes gracefully.
535 Print their numbers instead of just ???.
536
Roland McGrath07a696e2007-11-09 22:44:26 +00005372007-11-09 Roland McGrath <roland@redhat.com>
538
539 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000540 Handle block forms to mean a DWARF expression for DW_AT_allocated,
541 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
542 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
543 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000544
Roland McGrathe4c22ea2007-10-23 13:07:39 +00005452007-10-20 Roland McGrath <roland@redhat.com>
546
547 * unstrip.c (options): Update -R description.
548 (struct symbol): Put symbol details a union with a size_t pointer
549 `duplicate'.
550 (compare_symbols_output): Use null ->name as marker for discard
551 symbols, not zero *->map.
552 (copy_elided_sections): Record forwarding pointers for discarded
553 duplicates and fill SYMNDX_MAP elements through them.
554
555 * readelf.c (process_file): Set offline_next_address to 0 at start.
556 (struct process_dwflmod_args): New type.
557 (process_dwflmod): Take args in it, pass fd to process_elf_file.
558 (process_file): Update caller; dup FD for passing to libdwfl.
559 (process_elf_file): Take new arg FD. For ET_REL file when
560 displaying data affected by libdwfl relocation, open a new Elf handle.
561
5622007-10-17 Roland McGrath <roland@redhat.com>
563
564 * readelf.c (print_debug_line_section): For invalid data inside a
565 unit with plausible length, keep printing at the next unit boundary.
566
567 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
568
5692007-10-16 Roland McGrath <roland@redhat.com>
570
571 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
572
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00005732007-10-15 Roland McGrath <roland@redhat.com>
574
575 * make-debug-archive.in: New file.
576 * Makefile.am (EXTRA_DIST): Add it.
577 (make-debug-archive): New target.
578 (bin_SCRIPTS, CLEANFILES): Add it.
579
5802007-10-10 Roland McGrath <roland@redhat.com>
581
582 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
583 Use it to check MERGE|STRINGS for .debug_str.
584 (check_sections): Handle exact_or_gnuld.
585
5862007-10-08 Roland McGrath <roland@redhat.com>
587
588 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
589 64-bit struct timeval with 32-bit tv_usec.
590
5912007-10-07 Roland McGrath <roland@redhat.com>
592
593 * readelf.c (check_archive_index): New function.
594 (process_file): Call it. Change signature to take only fd and name.
595 Use libdwfl to open the file, then iterate on its modules (multiple
596 for an archive) to print file name and call process_elf_file.
597 (main): Update caller. Let process_file do elf_begin.
598 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
599 (process_elf_file): Take only Dwfl_Module * argument.
600 Don't print the file name here.
601 (print_debug_*_section): Take Dwfl_Module * argument.
602 (print_debug): Likewise. Update caller.
603 (format_dwarf_addr): New function.
604 (print_debug_ranges_section): Use it.
605 (attr_callback): Likewise.
606 (print_debug_line_section, print_debug_loc_section): Likewise.
607
608 * readelf.c (print_debug_ranges_section): Translate all strings.
609 (print_debug_loc_section): Likewise.
610
611 * unstrip.c (copy_elided_sections): Initialize SEC.
612
613 * ar.c (do_oper_insert): Put trailing / on short names.
614
615 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
616
617 * arlib2.c (arlib_add_long_name): Adjust for header size.
618
619 * arlib.c (arlib_finalize): Pad long name table to keep size even.
620
621 * ar.c (do_oper_insert): Use write_retry for padding write.
622
623 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
624 Unconditionally set FOUND[CNT]->elf when setting ->mem.
625 (remember_long_name): New function.
626 (do_oper_insert): Call it. Correctly use length of basename,
627 not original name. Don't store long name twice for new member.
628
6292007-10-06 Roland McGrath <roland@redhat.com>
630
631 * elflint.c (check_note): Skip empty segment.
632 (check_note_section): Skip empty section.
633
634 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
635 (handle_output_dir_module, handle_implicit_modules): Pass it down.
636 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
637 (compare_alloc_sections): Take new arg REL, ignore address if true.
638 (compare_sections): Likewise, pass it down.
639 (compare_sections_rel, compare_sections_nonrel): New functions.
640 (find_alloc_sections_prelink, copy_elided_sections): Use them
641 instead of compare_sections.
642 (sections_match): New function, broken out of ...
643 (find_alloc_section): ... here.
644 (copy_elided_sections): Reorganize section match-up logic.
645 Use sections_match for SHF_ALLOC in ET_REL.
646 For ET_REL, let the nonzero sh_addr from the debug file dominate.
647
648 * unstrip.c (add_new_section_symbols): Take new arg REL.
649 When true, do not update section symbol values.
650 (collect_symbols): Likewise. Update section symbols with address
651 of chosen output section, not original section.
652 (check_symtab_section_symbols, copy_elided_sections): Update callers.
653
654 * unstrip.c (compare_alloc_sections): At the same address, preserve
655 original section order.
656
657 * elflint.c (special_sections): Don't require MERGE|STRINGS for
658 .debug_str, it didn't always have them with older tools.
659
660 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
661
6622007-10-05 Roland McGrath <roland@redhat.com>
663
664 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
665 ET_REL file.
666
667 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
668 SHN_UNDEF as "bad section". Use shndx value in messages.
669
670 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
671 for ".debug" so it matches as a prefix.
672 (IS_KNOWN_SPECIAL): New macro.
673 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
674 type even under -d, for a .debug* or .shstrtab section.
675
676 * readelf.c (print_ops): Use hex for address operand.
677
6782007-10-04 Roland McGrath <roland@redhat.com>
679
680 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
681 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
682 sections mapped to SHN_UNDEF.
683
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00006842007-10-04 Ulrich Drepper <drepper@redhat.com>
685
686 * readelf.c (dump_archive_index): Avoid warning about uninitialized
687 variable with older glibc versions.
688 Add some branch prediction.
689
Roland McGrath59ea7f32007-10-04 08:50:09 +00006902007-10-04 Roland McGrath <roland@redhat.com>
691
692 * readelf.c (print_archive_index): New variable.
693 (options, parse_opt): Accept -c/--archive-index to set it.
694 (dump_archive_index): New function.
695 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
696 Call dump_archive_index on archives if set.
697 (main): Update caller.
698 (any_control_option): Give it file scope, moved out of ...
699 (parse_opt): ... here.
700
7012007-10-03 Roland McGrath <roland@redhat.com>
702
703 * unstrip.c (struct arg_info): Add `list' flag.
704 (options, parse_opt): Grok -n/--list to set it.
705 (list_module): New function.
706 (handle_implicit_modules): Call it under -n.
707
708 * elflint.c (check_note_section): New function.
709 (check_sections): Call it for SHT_NOTE.
710
711 * readelf.c (handle_notes): Use sections when available.
712
713 * elflint.c (check_note_data): New function, broken out of ...
714 (check_note): ... here. Call it and elf_getdata_rawchunk.
715
716 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
717 Use elf_getdata_rawchunk and gelf_getauxv.
718 (handle_notes_data): New function, broken out of ...
719 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
720
Roland McGrath241ac022007-10-01 18:21:46 +00007212007-10-01 Roland McGrath <roland@redhat.com>
722
Roland McGrathac0a16c2007-10-01 18:50:35 +0000723 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
724
Roland McGrath241ac022007-10-01 18:21:46 +0000725 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
726
Roland McGrathc76f0b02007-09-27 07:31:33 +00007272007-09-10 Roland McGrath <roland@redhat.com>
728
729 * readelf.c (options): Give -p optional argument, alias --string-dump.
730 (string_sections, string_sections_tail): New static variables.
731 (parse_opt): Set them when -p has an argument.
732 (print_string_section): New function, broken out of ...
733 (print_strings): ... here. Call it.
734 (dump_data_section): New function, broken out of ...
735 (dump_data): ... here. Call it.
736 (for_each_section_argument): New function, broken out of ...
737 (dump_data): ... here. Call it.
738 (dump_strings): New function.
739
7402007-08-31 Roland McGrath <roland@redhat.com>
741
742 * readelf.c (print_strings): Typo fix.
743
Roland McGrathcb6d8652007-08-23 08:10:54 +00007442007-08-23 Roland McGrath <roland@redhat.com>
745
746 * readelf.c (printf_with_wrap): Function removed.
747 (REGISTER_WRAP_COLUMN): New macro.
748 (handle_core_register): Use print_core_item instead.
749 (struct register_info): New type.
750 (compare_registers, compare_register_sets): New functions.
751 (register_bitpos, compare_sets_by_info): New functions.
752 (handle_core_registers): Use those to segregate and sort registers
753 for display.
754
755 * readelf.c (ITEM_WRAP_COLUMN): New macro.
756 (print_core_item): New function.
757 (handle_core_item): Use it instead of printf_with_wrap.
758 (compare_core_items, compare_core_item_groups): New functions.
759 (handle_core_items): Use them. Sort by group and force line breaks
760 between groups.
761
762 * readelf.c (handle_core_registers, handle_core_items): New functions,
763 broken out of ...
764 (handle_core_note): ... here. Call them.
765
7662007-08-22 Roland McGrath <roland@redhat.com>
767
768 * unstrip.c (new_shstrtab): New function, broken out of ...
769 (copy_elided_sections): ... here.
770
7712007-08-20 Roland McGrath <roland@redhat.com>
772
773 Avoid local function trampolines in nm binary.
774 * nm.c (sort_by_address): Move to a static function instead of local
775 inside show_symbols.
776 (sort_by_name_strtab): New static variable.
777 (sort_by_name): Use it. Move to a static function instead of local
778 inside show_symbols.
779 (show_symbols): Set sort_by_name_strtab.
780
7812007-08-19 Roland McGrath <roland@redhat.com>
782
783 * readelf.c (handle_auxv_note): New function.
784 (handle_notes): Call it.
785
786 * readelf.c (printf_with_wrap, convert): New functions.
787 (handle_core_item, (handle_core_register): New functions.
788 (handle_notes): Call those with details from ebl_core_note.
789
Roland McGrath099dd522007-08-13 22:58:36 +00007902007-08-12 Roland McGrath <roland@redhat.com>
791
792 * elflint.c (check_note): Accept type 0 with name "Linux".
793
794 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
795
796 * elflint.c (section_flags_string): Return "none" for 0, not "".
797
Roland McGrathd8221722007-08-11 21:18:09 +00007982007-08-11 Roland McGrath <roland@redhat.com>
799
800 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
801
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00008022007-08-04 Ulrich Drepper <drepper@redhat.com>
803
804 * readelf.c (hex_dump): Use isprint to determine whether to print
805 character itself or full stop character.
806 (dump_data): No need to check endp for NULL after strtol call.
807
Roland McGrath60fc84c2007-08-03 21:59:15 +00008082007-08-03 Roland McGrath <roland@redhat.com>
809
810 * readelf.c (print_string_sections): New variable.
811 (options, parse_opt): Handle --strings/-p to set it.
812 (print_strings): New function.
813 (process_elf_file): Call it under -p.
814
815 * readelf.c (options): Add hidden aliases --segments, --sections,
816 as taken by binutils readelf.
817
8182007-08-01 Roland McGrath <roland@redhat.com>
819
820 * readelf.c (dump_data_sections, dump_data_sections_tail):
821 New variables.
822 (options, parse_opt): Handle --hex-dump/-x, set them.
823 (hex_dump): New function.
824 (dump_data): New function, call it.
825 (process_elf_file): Call it.
826
8272007-07-25 Roland McGrath <roland@redhat.com>
828
829 * addr2line.c (show_symbols): New variable.
830 (print_addrsym): New function.
831 (handle_address): Call it.
832 (options, parse_opt): Handle -S/--symbols.
833
Ulrich Drepperb0243862007-06-06 00:09:36 +00008342007-06-05 Ulrich Drepper <drepper@redhat.com>
835
836 * addr2line.c: Update for latest autoconf header.
837 * ar.c: Likewise.
838 * elfcmp.c: Likewise.
839 * elflint.c: Likewise.
840 * findtextrel.c: Likewise.
841 * ld.c: Likewise.
842 * ldgeneric.c: Likewise.
843 * nm.c: Likewise.
844 * objdump.c: Likewise.
845 * ranlib.c: Likewise.
846 * readelf.c: Likewise.
847 * size.c: Likewise.
848 * strings.c: Likewise.
849 * strip.c: Likewise.
850 * unstrip.c: Likewise.
851
Roland McGrath9aa8ef72007-05-18 08:59:43 +00008522007-05-18 Roland McGrath <roland@redhat.com>
853
854 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
855 stripped file, so as not to duplicate a section copied in both.
856
857 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
858
8592007-05-17 Roland McGrath <roland@redhat.com>
860
861 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
862
863 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
864
865 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
866 call make_directories here.
867 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
868 (handle_dwfl_module): Likewise.
869 (handle_implicit_modules): Update callers.
870 (handle_output_dir_module): Likewise. Don't do make_directories here.
871
872 * unstrip.c (get_section_name): New function, broken out of ...
873 (copy_elided_sections): here. Update callers.
874 (find_alloc_section): Broken out of ...
875 (copy_elided_sections): ... here. Update caller.
876 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
877 update STT_SECTION symbols' st_value fields as a side effect.
878 (check_symtab_section_symbols): Update caller.
879 (add_new_section_symbols): Set st_value in symbols added.
880 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
881 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
882 from .bss to .dynbss.
883 (find_alloc_sections_prelink): New function. Associate debug file
884 allocated SHT_NOBITS shdrs with stripped moved by prelink via
885 .gnu.prelink_undo information.
886 (copy_elided_sections): Call it when we couldn't find every allocated
887 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
888 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
889 (handle_file): Update callers.
890
891 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
892 named ".comment".
893
894 * elflint.c (check_sections): Fix association of segments with
895 sections when p_memsz > p_filesz.
896
8972007-04-29 Roland McGrath <roland@redhat.com>
898
899 * addr2line.c (options, main): Tweak argp group settings to fix
900 usage output.
901
9022007-04-28 Roland McGrath <roland@redhat.com>
903
904 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
905 sizes to match sections adjusted in the stripped file.
906
Roland McGrath4be15242007-04-25 03:09:33 +00009072007-04-24 Roland McGrath <roland@redhat.com>
908
909 * elfcmp.c (OPT_HASH_INEXACT): New macro.
910 (hash_inexact): New variable.
911 (options, parse_opt): Add --hash-inexact option to set it.
912 (hash_content_equivalent): New function.
913 (main): Call it for differing SHT_HASH sections under --hash-inexact.
914
9152007-04-23 Roland McGrath <roland@redhat.com>
916
917 * unstrip.c: New file.
918 * Makefile.am (bin_PROGRAMS): Add it.
919 (unstrip_LDADD): New variable.
920
921 * strip.c (options): Allow --output for -o.
922
Ulrich Drepper8b383102007-02-16 00:31:57 +00009232007-02-15 Ulrich Drepper <drepper@redhat.com>
924
925 * readelf.c: Remove unused code. Add a few consts.
926
Ulrich Drepper903c1162007-02-15 19:40:37 +00009272007-02-15 Roland McGrath <roland@redhat.com>
928
929 * readelf.c (print_debug): Fix brainos in SHDR test.
930
Roland McGrathf82a1ec2007-02-06 04:47:44 +00009312007-02-05 Roland McGrath <roland@redhat.com>
932
933 * ar.c: Include <limits.h>, since we use LONG_MAX.
934
Ulrich Drepper0fe63532007-02-05 21:05:51 +00009352007-02-05 Ulrich Drepper <drepper@redhat.com>
936
Ulrich Drepper8b383102007-02-16 00:31:57 +0000937 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000938 ignore fchown's return value.
939 (do_oper_insert): Handle error when writing padding.
940 * ranlib.c: Add fchown complain work around.
941
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000942 * arlib.c: Make symtab a global variable. Change all users.
943 * arlib2.c: Likewise.
944 * ranlib.c: Likewise.
945 * ar.c: Likewise.
946 * arlib.h: Declare it.
947
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00009482007-01-11 Roland McGrath <roland@redhat.com>
949
950 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
951 SHF_MASKPROC bits separately from generic sh_flags validation.
952
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00009532007-02-04 Ulrich Drepper <drepper@redhat.com>
954
955 * ar.c: New file.
956 * arlib.c: New file.
957 * arlib2.c: New file.
958 * arlib.h: New file.
959 * Makefile (noinst_LIBRARIES): Add libar.
960 (libar_a_SOURCES): Define.
961 (ar_LDADD): Define.
962 (CFLAGS_ar): Define.
963 * ranlib.c: Change to use arlib.
964
965 * elflint.c (check_symtab): Work around GNU ld bug which omits
966 sections but not symbols in those sections.
967
Ulrich Drepperb770cf92007-01-10 21:02:34 +00009682007-01-10 Ulrich Drepper <drepper@redhat.com>
969
970 * addr2line.c: Update copyright year.
971 * elfcmp.c: Likewise.
972 * elflint.c: Likewise.
973 * findtextrel.c: Likewise.
974 * ld.c: Likewise.
975 * nm.c: Likewise.
976 * objdump.c: Likewise.
977 * ranlib.c: Likewise.
978 * readelf.c: Likewise.
979 * size.c: Likewise.
980 * strings.c: Likewise.
981 * strip.c: Likewise.
982
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00009832006-12-09 Ulrich Drepper <drepper@redhat.com>
984
985 * elflint.c (compare_hash_gnu_hash): New function. Report if the
986 two hash tables have different content (module expected omission
987 of undefined symbols).
988
Roland McGrath8190db62006-12-17 23:56:51 +00009892006-10-31 Roland McGrath <roland@redhat.com>
990
991 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000992 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000993
9942006-09-19 Jakub Jelinek <jakub@redhat.com>
995
996 * strip.c (process_file): Disallow -f on archives.
997
9982006-10-09 Roland McGrath <roland@redhat.com>
999
1000 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
1001
Roland McGrathc373d852006-10-10 00:25:21 +000010022006-08-29 Roland McGrath <roland@redhat.com>
1003
1004 * Makefile.am (MAINTAINERCLEANFILES): New variable.
1005
1006 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
1007 Reported by Christian Aichinger <Greek0@gmx.net>.
1008
1009 * elflint.c (valid_e_machine): Add EM_ALPHA.
1010 Reported by Christian Aichinger <Greek0@gmx.net>.
1011
Ulrich Drepper231c5902006-08-08 22:00:11 +000010122006-08-08 Ulrich Drepper <drepper@redhat.com>
1013
1014 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1015 Keep track of which "high DT" entries are present.
1016 Check that either old or GNU-style hash table is present.
1017 If GNU-style hash table is used a symbol table is mandatory.
1018 Check that if any prelink entry is present all of them are.
1019 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1020 table if they don't refer to functions.
1021
Roland McGrath858b1892006-07-17 08:41:15 +000010222006-07-17 Roland McGrath <roland@redhat.com>
1023
1024 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1025 (add_version): Likewise for argument.
1026 (check_versym): Cast constant to GElf_Versym for comparison.
1027
Roland McGrath4ec807e2006-07-13 03:59:46 +000010282006-07-12 Roland McGrath <roland@redhat.com>
1029
1030 * readelf.c (handle_gnu_hash): Add casts for machines where
1031 Elf32_Word != unsigned int.
1032
Ulrich Drepperdcf61602006-07-12 19:59:02 +000010332006-07-12 Ulrich Drepper <drepper@redhat.com>
1034
1035 * elflint.c (check_sysv_hash64): Fix printf format.
1036
Ulrich Dreppercc415622006-07-12 19:42:23 +000010372006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001038
Ulrich Dreppercc415622006-07-12 19:42:23 +00001039 * addr2line.c (options): English fix in -f doc string.
1040
1041 * addr2line.c (use_comp_dir): New variable.
1042 (options, parse_opt): Grok -A/--absolute to set it.
1043 (handle_address): If set, prepend dwfl_line_comp_dir results to
1044 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001045
Ulrich Drepper28ed8952006-07-07 03:43:47 +000010462006-07-06 Ulrich Drepper <drepper@redhat.com>
1047
1048 * elflint.c: Adjust for latest new hash table format.
1049 * readelf.c: Likewise.
1050
1051 * elflint.c (check_versym): Ignore hidden bit when comparing version
1052 numbers.
1053
10542006-07-05 Ulrich Drepper <drepper@redhat.com>
1055
1056 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1057 discarded COMDAT symbols.
1058
1059 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1060 (elf_i386_create_relocations): Likewise.
1061 * ld.h (struct symbol): Add local and hidden bits.
1062 * ld.c (create_special_section_symbol): These synthsized symbols
1063 are local and hidden.
1064 * ldgeneric.c (file_process2): Check whether input file matches
1065 the emulation.
1066 (fillin_special_symbol): Create symbols as local and/or hidden
1067 if requested.
1068 (ld_generic_create_outfile): Make local copy of symbol.
1069 Don't hide global, defined symbols in dynamic symbol table unless
1070 requested. Synthetic symbols have no version information.
1071
1072 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1073 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1074
10752006-07-04 Ulrich Drepper <drepper@redhat.com>
1076
1077 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1078 testing.
1079
10802006-07-03 Ulrich Drepper <drepper@redhat.com>
1081
1082 * elflint.c: Add testing of DT_GNU_HASH.
1083 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1084
1085 * Makefile.am: Add hacks to create dependency files for non-generic
1086 linker.
1087
Ulrich Drepper6ca46002006-06-12 22:40:23 +000010882006-06-12 Ulrich Drepper <drepper@redhat.com>
1089
1090 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1091 section if creating a DSO and no interpreter is given.
1092 (ld_generic_create_outfile): Don't store reference to symbols in
1093 discarded COMDAT groups. Don't create PHDR and INTERP program header
1094 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001095 (create_verneed_data): Pretty printing.
1096
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001097 * ldscript.y (content): If a DSO is created don't set default
1098 interpreter from linker script.
1099
1100 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1101 for symbols in discarded COMDAT groups.
1102 (elf_i386_create_relocations): Likewise.
1103 * ld.h (struct scninfo): Add unused_comdat.
1104 * ldgeneric.c (add_section): Also check group signature when
1105 matching COMDAT sections.
1106 (add_relocatable_file): Ignore symbols in COMDAT group which are
1107 discarded.
1108
1109 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1110 and symbol reference.
1111
Ulrich Drepper54f33a72006-06-11 09:07:37 +000011122006-06-11 Ulrich Drepper <drepper@redhat.com>
1113
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001114 * elflint.c (check_dynamic): Fix checking value of tags which are
1115 offsets in the string section. Make sure DT_STRTAB points to the
1116 section referenced in sh_link.
1117
1118 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1119
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001120 * ld.c: Recognize --eh-frame-hdr option.
1121 * ld.h (struct ld_state): Add eh_frame_hdr field.
1122 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1123
1124 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1125 SH_FLAGS_COMBINE.
1126 (add_relocatable_file): Minor optimization of last change.
1127 (match_section): Don't preserve SHF_GROUP flag any longer.
1128
Ulrich Drepper2d880282006-06-11 00:20:43 +000011292006-06-10 Ulrich Drepper <drepper@redhat.com>
1130
1131 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001132 Handle record and ignore as position dependent options.
1133 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001134 * ld.h (struct ld_state): Add execstack field.
1135 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1136 sections.
1137 (ld_generic_create_outfile): Fix program header creation in native
1138 linker. Add PT_GNU_STACK program header.
1139
Ulrich Dreppera688a732006-06-10 06:33:00 +000011402006-06-09 Ulrich Drepper <drepper@redhat.com>
1141
1142 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1143 for PLT entries if there is no local definition.
1144
1145 * ld.c (parse_option): Handle -z ignore like --as-needed and
1146 -z record like --no-as-needed.
1147 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1148 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1149 looping over DSOs. When deciding about adding DT_NEEDED entries
1150 use ->as_needed instead of ignore_unused_dsos.
1151
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000011522006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001153
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001154 * ld.c: Recognize --as-needed and --no-as-needed options.
1155 * ld.h (struct usedfile): Add as_needed field.
1156 (struct ld_state): Likewise.
1157 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1158 the list.
1159 * ldscript.y (filename_id_list): Split to correctly parse all
1160 combinations.
1161 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001162
Ulrich Drepper697f4db2006-06-10 06:50:47 +000011632006-05-28 Ulrich Drepper <drepper@redhat.com>
1164
1165 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1166 and colno.
1167
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000011682006-05-27 Ulrich Drepper <drepper@redhat.com>
1169
1170 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001171 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001172
Ulrich Drepper82c345d2006-04-04 22:07:54 +000011732006-04-04 Ulrich Drepper <drepper@redhat.com>
1174
1175 * addr2line.c: Update copyright year.
1176 * elfcmp.c: Likewise.
1177 * elflint.c: Likewise.
1178 * findtextrel.c: Likewise.
1179 * ld.c: Likewise.
1180 * nm.c: Likewise.
1181 * objdump.c: Likewise.
1182 * ranlib.c: Likewise.
1183 * readelf.c: Likewise.
1184 * size.c: Likewise.
1185 * strings.c: Likewise.
1186 * strip.c: Likewise.
1187
Roland McGrathdd7e22b2006-03-09 23:05:47 +000011882006-03-09 Roland McGrath <roland@redhat.com>
1189
1190 * Makefile.am (AM_LDFLAGS): New variable.
1191
Roland McGrath060fa052006-03-02 07:51:50 +000011922006-03-01 Roland McGrath <roland@redhat.com>
1193
1194 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1195 for dwarf.h changes matching 3.0 spec.
1196 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1197
Ulrich Drepper038129b2005-12-04 16:47:24 +000011982005-12-04 Ulrich Drepper <drepper@redhat.com>
1199
1200 * elflint.c (check_one_reloc): If relocation section is not loaded,
1201 don't check whether the relocations modify read-only sections or
1202 loaded and unloaded sections.
1203
Ulrich Drepper607e0542005-12-04 15:51:06 +000012042005-11-28 Ulrich Drepper <drepper@redhat.com>
1205
1206 * elflint.c (check_one_reloc): Take additional parameters. Use
1207 them to determine whether relocation is valid in this type of
1208 file. DSOs and executables can contain relocation sections in
1209 unloaded sections which just show the relocations the linker
1210 applied. Adjust all callers.
1211 (check_program_header): Check that PT_PHDR is loaded and that offset
1212 matches the one in the ELF header.
1213
Roland McGrath6724c902005-10-28 07:07:19 +000012142005-10-26 Roland McGrath <roland@redhat.com>
1215
1216 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1217
Ulrich Drepperd0449522005-09-03 07:23:52 +000012182005-09-03 Ulrich Drepper <drepper@redhat.com>
1219
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001220 * strip.c (handle_elf): Unify some error messages.
1221 * ld.c (main): Likewise.
1222 * ldgeneric.c (open_elf): Likewise.
1223 * elfcmp.c (main): Likewise.
1224 * elflint.c (check_elf_header): Likewise.
1225
1226 * size.c (process_file): Fix typo in error message.
1227
Ulrich Drepperd0449522005-09-03 07:23:52 +00001228 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1229
Ulrich Dreppera60501e2005-09-02 19:50:17 +000012302005-09-02 Ulrich Drepper <drepper@redhat.com>
1231
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001232 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001233 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001234
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000012352005-08-28 Ulrich Drepper <drepper@redhat.com>
1236
1237 * ranlib.c: Don't define pread_retry and write_retry here.
1238
1239 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1240 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1241
1242 * strings.c (process_chunk): Reorder expressions in conditional
1243 (process_chunk_mb): Likewise.
1244
1245 * strings.c: New file.
1246 * Makefile.am (bin_PROGRAMS): Add strings.
1247 (strings_no_Wstring): Define.
1248 (strings_LDADD): Define.
1249
Roland McGrath71e15a02005-08-27 10:33:26 +000012502005-08-27 Roland McGrath <roland@redhat.com>
1251
1252 * addr2line.c (dwarf_diename_integrate): Function removed.
1253 (print_dwarf_function): Use plain dwarf_diename.
1254
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000012552005-08-24 Ulrich Drepper <drepper@redhat.com>
1256
1257 * elflint.c (check_versym): Versioned symbols should not have
1258 local binding.
1259
Ulrich Drepper5d832292005-08-15 21:36:27 +000012602005-08-15 Ulrich Drepper <drepper@redhat.com>
1261
Ulrich Drepper61655e02005-08-16 04:23:02 +00001262 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1263 undefined.
1264
Ulrich Drepper5d832292005-08-15 21:36:27 +00001265 * Makefile.am: Add rules to build ranlib.
1266 * ranlib.c: New file.
1267
Roland McGrath18e13422005-08-15 08:01:25 +000012682005-08-14 Roland McGrath <roland@redhat.com>
1269
1270 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1271 sh_type it recognizes.
1272
1273 * elflint.c (check_sections): Print unknown flags in hex, don't
1274 truncate high bits. Print section number and name for unknown type.
1275
Roland McGrathf6895042005-08-13 20:56:52 +000012762005-08-13 Roland McGrath <roland@redhat.com>
1277
1278 * elflint.c (check_program_header): Use ebl_segment_type_name and
1279 allow any p_type it recognizes. Include p_type value in error
1280 message for unknown type.
1281
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000012822005-08-13 Ulrich Drepper <drepper@redhat.com>
1283
1284 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1285 to ebl_check_special_symbol.
1286 (check_sections): Pass ehdr to ebl_bss_plt_p.
1287
Roland McGrath653d3762005-08-13 01:59:10 +000012882005-08-12 Roland McGrath <roland@redhat.com>
1289
1290 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1291 refers to the right section if it's not SHN_ABS.
1292 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1293
1294 * elflint.c (check_sections): Don't complain about a non-NOBITS
1295 section taking no segment space, if it's sh_size is 0.
1296
1297 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1298 be PROGBITS or NOBITS.
1299
1300 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1301 standard st_value and st_size checks.
1302
Roland McGrath1c83bf12005-08-11 07:03:55 +000013032005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001304
Roland McGrath1c83bf12005-08-11 07:03:55 +00001305 * addr2line.c (options, parse_opt): Don't handle -e here.
1306 (executable): Variable removed.
1307 (argp_children): New static variable.
1308 (argp): Use it. Make const.
1309 (main): Fill in argp_children from dwfl_standard_argp ().
1310 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1311 (print_dwarf_function): New function. Try to figure out inline chain.
1312 (elf_getname): Function removed, libdwfl does it for us.
1313 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1314 Use dwfl_module_addrname instead of elf_getname.
1315 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1316 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1317
13182005-08-10 Ulrich Drepper <drepper@redhat.com>
1319
1320 * strip.c (parse_opt): STATE parameter is now used.
1321 Various little cleanups.
1322
1323 * readelf.c (print_debug_line_section): Correct fallout of renaming
1324 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001325
Roland McGrath8f31c2c2005-08-09 04:58:05 +000013262005-08-08 Roland McGrath <roland@redhat.com>
1327
1328 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1329 with binutils strip. Likewise -d, -S, as aliases for -g.
1330 Likewise ignore -s/--strip-all.
1331
Roland McGrath095a01b2005-08-08 03:49:35 +000013322005-08-07 Roland McGrath <roland@redhat.com>
1333
1334 * strip.c (process_file): Open read-only when using a different output
1335 file.
1336
Ulrich Drepper47be7952005-08-07 04:41:39 +000013372005-08-06 Ulrich Drepper <drepper@redhat.com>
1338
Ulrich Drepper637963b2005-08-07 05:33:07 +00001339 * elflint.c (in_nobits_scn): New function.
1340 (check_versym): Allow references for defined symbols against versions
1341 of other DSOs also for symbols in nobits sections.
1342 Move a few variables around.
1343
Ulrich Drepper47be7952005-08-07 04:41:39 +00001344 * Makefile.am (AM_CFLAGS): Avoid duplication.
1345 Link with statis libs if BUILD_STATIC.
1346
Ulrich Drepperdbace232005-08-06 01:37:23 +000013472005-08-05 Ulrich Drepper <drepper@redhat.com>
1348
1349 * elflint.c: Many, many more tests. Mostly related to symbol
1350 versioning. Those sections should now be completely checked.
1351
1352 * readelf.c (print_dynamic): Use gelf_offscn.
1353
Ulrich Drepperacb89832005-08-04 07:01:49 +000013542005-08-04 Ulrich Drepper <drepper@redhat.com>
1355
1356 * elflint.c: Add lots more tests: more extension symbol table sanity,
1357 versioning section tests, hash table tests. General cleanup.
1358
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000013592005-08-02 Ulrich Drepper <drepper@redhat.com>
1360
Ulrich Drepper8a687742005-08-03 02:24:12 +00001361 * objdump.c: New file.
1362 * Makefile.am (bin_PROGRAMS): Add objdump.
1363 (objdump_LDADD): Define.
1364
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001365 * elflint.c (check_reloc_shdr): New function split out from check_rela
1366 and check_rel.
1367 (check_one_reloc): New function. Likewise.
1368 (check_rela): Use check_reloc_shdr and check_one_reloc.
1369 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001370 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1371 section.
1372 Add checks that relocations against read-only segments are flagged,
1373 that the text relocation flag is not set unnecessarily, and that
1374 relocations in one section are either against loaded or not-loaded
1375 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001376
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000013772005-08-01 Ulrich Drepper <drepper@redhat.com>
1378
1379 * elfcmp.c (main): Ignore section count and section name string table
1380 section index.
1381
Roland McGrathf9ece8a2005-07-28 07:03:04 +000013822005-07-27 Roland McGrath <roland@redhat.com>
1383
1384 * elfcmp.c: Include <locale.h>.
1385
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000013862005-07-27 Ulrich Drepper <drepper@redhat.com>
1387
1388 * elfcmp.c: Print name and index of differing section.
1389
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000013902005-07-24 Ulrich Drepper <drepper@redhat.com>
1391
1392 * elfcmp.c: Implement comparing gaps between sections.
1393
13942005-07-23 Ulrich Drepper <drepper@redhat.com>
1395
1396 * elflint.c: Include libeblP.h instead of libebl.h.
1397 * nm.c: Likewise.
1398 * readelf.c: Likewise.
1399 * elfcmp.c: Likewise.
1400
1401 * elfcmp.c (main): Compare individual ELF header fields, excluding
1402 e_shoff instead of the whole struct at once.
1403 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1404 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1405
14062005-07-22 Ulrich Drepper <drepper@redhat.com>
1407
1408 * elfcmp.c (main): Take empty section into account when comparing
1409 section content.
1410
1411 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1412 using it.
1413
14142005-07-21 Ulrich Drepper <drepper@redhat.com>
1415
1416 * elfcmp.c: New file.
1417 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1418 (elfcmp_LDADD): Define.
1419
1420 * elflint.c (check_rela): Check that copy relocations only reference
1421 object symbols or symbols with unknown type.
1422 (check_rel): Likewise.
1423
14242005-06-08 Roland McGrath <roland@redhat.com>
1425
1426 * readelf.c (print_ops): Add consts.
1427
14282005-05-31 Roland McGrath <roland@redhat.com>
1429
1430 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1431 abbreviations. Print a header line before each CU section.
1432
1433 * readelf.c (print_debug_loc_section): Fix indentation for larger
1434 address size.
1435
14362005-05-30 Roland McGrath <roland@redhat.com>
1437
1438 * readelf.c (print_debug_line_section): Print section offset of each
1439 CU's table, so they are easy to find from seeing the stmt_list value.
1440
1441 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1442 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1443
1444 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1445 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1446
1447 * readelf.c (print_ops): Take different args for indentation control.
1448 (attr_callback): Caller updated.
1449 Grok several more block-form attributes as being location expressions.
1450 For those same attributes with udata forms, format output differently
1451 for location list offset.
1452 (print_debug_loc_section): Implement it for real.
1453
1454 * readelf.c (options): Mention ranges for --debug-dump.
1455 (enum section_e): Add section_ranges.
1456 (parse_opt): Grok "ranges" for -w/--debug-dump.
1457 (print_debug_ranges_section): New function.
1458 (print_debug): Handle .debug_ranges section.
1459
14602005-05-30 Ulrich Drepper <drepper@redhat.com>
1461
1462 * readelf.c (handle_notes): At least x86-64 need not have the note
1463 section values aligned to 8 bytes.
1464
14652005-05-18 Ulrich Drepper <drepper@redhat.com>
1466
1467 * readelf.c (dwarf_tag_string): Add new tags.
1468
14692005-05-08 Roland McGrath <roland@redhat.com>
1470
1471 * strip.c (handle_elf): Don't translate hash and versym data formats,
1472 elf_getdata already did it for us.
1473
14742005-05-07 Ulrich Drepper <drepper@redhat.com>
1475
1476 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1477 (addr2line_LDADD): Likewise.
1478
14792005-05-03 Roland McGrath <roland@redhat.com>
1480
1481 * strip.c (handle_elf): Apply symbol table fixups to discarded
1482 relocation sections when they are being saved in the debug file.
1483
1484 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1485 and gelf_xlatetof, not the native byte order.
1486
1487 * strip.c (parse_opt): Give error if -f or -o is repeated.
1488 (main): Exit if argp_parse returns nonzero.
1489
1490 * strip.c (debug_fname_embed): New variable.
1491 (options, parse_opt): New option -F to set it.
1492
14932005-05-07 Ulrich Drepper <drepper@redhat.com>
1494
1495 * readelf.c (parse_opt): Make any_control_option variable
1496 local. Simplify some tests.
1497
14982005-05-03 Roland McGrath <roland@redhat.com>
1499
1500 * strip.c (crc32_file): Function removed (now in ../lib).
1501
15022005-05-03 Roland McGrath <roland@redhat.com>
1503
1504 * elflint.c (is_debuginfo): New variable.
1505 (options, parse_opt): New option --debuginfo/-d to set it.
1506 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1507 (check_note): If is_debuginfo, don't try to get note contents.
1508
15092005-04-24 Ulrich Drepper <drepper@redhat.com>
1510
1511 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1512 section reached.
1513
15142005-04-14 Ulrich Drepper <drepper@redhat.com>
1515
1516 * readelf.c (dwarf_encoding_string): New function.
1517 (dwarf_inline_string): New function.
1518 (dwarf_access_string): New function.
1519 (dwarf_visibility_string): New function.
1520 (dwarf_virtuality_string): New function.
1521 (dwarf_identifier_case_string): New function.
1522 (dwarf_calling_convention_string): New function.
1523 (dwarf_ordering_string): New function.
1524 (dwarf_discr_list_string): New function.
1525 (attr_callback): Decode man more attribute values.
1526
15272005-04-01 Ulrich Drepper <drepper@redhat.com>
1528
1529 * addr2line.c: Finish implementation of -f option.
1530
15312005-03-29 Ulrich Drepper <drepper@redhat.com>
1532
1533 * addr2line.c: New file.
1534 * Makefile.am (bin_PROGRAMS): Add addr2line.
1535 Define addr2line_LDADD.
1536
1537 * findtextrel.c: Use new dwarf_addrdie function.
1538
1539 * findtextrel.c: Fix usage message and re-add accidentally removed
1540 line.
1541
15422005-03-28 Ulrich Drepper <drepper@redhat.com>
1543
1544 * findtextrel.c: New file.
1545 * Makefile: Add rules to build findtextrel.
1546
15472005-02-15 Ulrich Drepper <drepper@redhat.com>
1548
1549 * ldlex.l: Provide ECHO definition to avoid warning.
1550
1551 * elflint.c (check_program_header): Fix typo in RELRO test.
1552
1553 * Makefile.am (AM_CFLAGS): Add more warning options.
1554 * elflint.c: Fix warnings introduced by the new warning options.
1555 * i386_ld.c: Likewise.
1556 * ld.c: Likewise.
1557 * ld.h: Likewise.
1558 * ldgeneric.c: Likewise.
1559 * nm.c: Likewise.
1560 * readelf.c: Likewise.
1561 * sectionhash.c: Likewise.
1562 * size.c: Likewise.
1563 * string.c: Likewise.
1564
15652005-02-05 Ulrich Drepper <drepper@redhat.com>
1566
1567 * Makefile.am: Check for text relocations in constructed DSOs.
1568
1569 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1570 with -lmudflap.
1571
1572 * ldscript.y: Add as_needed handling.
1573 * ldlex.l: Recognize AS_NEEDED token.
1574 * ld.h (struct filename_list): Add as_needed flag.
1575
15762005-02-04 Ulrich Drepper <drepper@redhat.com>
1577
1578 * elflint.c (check_symtab): Correctly determine size of GOT section.
1579
15802005-01-19 Ulrich Drepper <drepper@redhat.com>
1581
1582 * ld.c: Remove unnecessary more_help function. Print bug report
1583 address using argp.
1584 * strip.c: Likewise.
1585 * size.c: Likewise.
1586 * nm.c: Likewise.
1587 * readelf.c: Likewise.
1588 * elflint.c: Likewise.
1589
1590 * elflint.c (main): Don't check for parameter problems here.
1591 (parse_opt): Do it here, where we get informed about some of them
1592 anyway.
1593
1594 * readelf.c (main): Don't check for parameter problems here.
1595 (parse_opt): Do it here, where we get informed about some of them
1596 anyway.
1597
15982005-01-11 Ulrich Drepper <drepper@redhat.com>
1599
1600 * strip.c: Update copyright year.
1601 * readelf.c: Likewise.
1602 * size.c: Likewise.
1603 * nm.c: Likewise.
1604 * ld.c: Likewise.
1605 * elflint.c: Likewise.
1606
1607 * elflint.c (check_symtab): Don't warn about wrong size for
1608 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1609
16102004-10-05 Ulrich Drepper <drepper@redhat.com>
1611
1612 * readelf.c (print_phdr): In section mapping, also indicate
1613 sections in read-only segments.
1614
16152004-09-25 Ulrich Drepper <drepper@redhat.com>
1616
1617 * readelf.c: Make compile with gcc 4.0.
1618 * strip.c: Likewise.
1619
16202004-08-16 Ulrich Drepper <drepper@redhat.com>
1621
1622 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1623 allocate to work around gcc 3.4 bug.
1624
16252004-01-25 Ulrich Drepper <drepper@redhat.com>
1626
1627 * ldlex.l (invalid_char): Better error message.
1628
16292004-01-23 Ulrich Drepper <drepper@redhat.com>
1630
1631 * readelf.c: Print SHT_GNU_LIBLIST sections.
1632
1633 * none_ld.c: New file.
1634
16352004-01-21 Ulrich Drepper <drepper@redhat.com>
1636
1637 * Makefile.am: Enable building of machine specific linker.
1638
16392004-01-20 Ulrich Drepper <drepper@redhat.com>
1640
1641 * Makefile.am: Support building with mudflap.
1642
1643 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1644 * ldgeneric.c: Likewise.
1645 * ldscript.y: Likewise.
1646 * readelf.c: Likewise.
1647 * strip.c: Likewise.
1648
1649 * readelf.c (print_debug_line_section): Determine address size
1650 correctly.
1651
16522004-01-19 Ulrich Drepper <drepper@redhat.com>
1653
1654 * readelf.c (print_phdr): Show which sections are covered by the
1655 PT_GNU_RELRO entry.
1656
1657 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1658
1659 * readelf.c (print_debug_macinfo_section): Implement.
1660
16612004-01-18 Ulrich Drepper <drepper@redhat.com>
1662
1663 * readelf.c (print_debug_line_section): Implement.
1664
16652004-01-17 Ulrich Drepper <drepper@redhat.com>
1666
1667 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1668 * src/ld.c: Likewise.
1669 * src/nm.c: Likewise.
1670 * src/readelf.c: Likewise.
1671 * src/size.c: Likewise.
1672 * src/strip.c: Likewise.
1673
1674 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1675
1676 * Makefile.am: Support building with mudflap.
1677
16782004-01-16 Ulrich Drepper <drepper@redhat.com>
1679
1680 * readelf.c (print_debug_info_section): Free dies memory.
1681
1682 * readelf.c: Print .debug_info section content.
1683
16842004-01-13 Ulrich Drepper <drepper@redhat.com>
1685
1686 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1687
16882004-01-12 Ulrich Drepper <drepper@redhat.com>
1689
1690 * readelf.c (print_debug_aranges): Implement using libdw.
1691
16922004-01-11 Ulrich Drepper <drepper@redhat.com>
1693
1694 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1695
1696 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1697 behavior is available yet.
1698 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1699
17002004-01-09 Ulrich Drepper <drepper@redhat.com>
1701
1702 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1703
1704 * nm.c: Implement getting information about local variables.
1705
17062004-01-07 Ulrich Drepper <drepper@redhat.com>
1707
1708 * nm.c: Read also debug information for local symbols.
1709
17102004-01-05 Ulrich Drepper <drepper@redhat.com>
1711
1712 * nm.c: Shuffle dwarf handling code around so the maximum column
1713 width can be computed ahead of printing. Avoid collection symbols
1714 which are not printed anyway.
1715
1716 * nm.c: Rewrite dwarf handling to use libdw.
1717 * Makefile.am (AM_CFLAGS): Add -std parameter.
1718 (INCLUDES): Find header in libdw subdir.
1719 (nm_LDADD): Replace libdwarf with libdw.
1720
1721 * elflint.c: Update copyright year.
1722 * readelf.c: Likewise.
1723 * size.c: Likewise.
1724 * strip.c: Likewise.
1725 * nm.c: Likewise.
1726
17272003-12-31 Ulrich Drepper <drepper@redhat.com>
1728
1729 * strip.c (process_file): Close file before returning.
1730
17312003-11-19 Ulrich Drepper <drepper@redhat.com>
1732
1733 * readelf.c (handle_dynamic): Make column for tag name wider.
1734
17352003-09-29 Ulrich Drepper <drepper@redhat.com>
1736
1737 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1738
17392003-09-25 Ulrich Drepper <drepper@redhat.com>
1740
1741 * strip.c (process_file): Don't mmap the input file, we modify the
1742 data structures and don't want the change end up on disk.
1743
17442003-09-23 Jakub Jelinek <jakub@redhat.com>
1745
1746 * unaligned.h (union u_2ubyte_unaligned,
1747 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1748 packed attribute.
1749 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1750 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1751 Read/store value through _ptr->u instead of *_ptr.
1752
17532003-09-22 Ulrich Drepper <drepper@redhat.com>
1754
1755 * size.c (show_sysv): Change type of maxlen to int.
1756
1757 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1758 buckets.
1759
1760 * i386_ld.c: Many many fixes and extensions.
1761 * ld.c: Likewise.
1762 * ldgeneric.c: Likewise.
1763
17642003-08-16 Ulrich Drepper <drepper@redhat.com>
1765
1766 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1767 the reference is from another DSO.
1768
17692003-08-15 Ulrich Drepper <drepper@redhat.com>
1770
1771 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1772 point is found when creating a DSO.
1773
17742003-08-14 Ulrich Drepper <drepper@redhat.com>
1775
1776 * ld.c (main): Always call FLAG_UNRESOLVED.
1777 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1778 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1779
17802003-08-13 Ulrich Drepper <drepper@redhat.com>
1781
1782 * Makefile.in: Depend on libebl.a, not libebl.so.
1783
1784 * ld.c (main): Mark stream for linker script as locked by caller.
1785 (read_version_script): Likewise.
1786 * ldlex.c: Define fread and fwrite to _unlocked variant.
1787
1788 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1789 target_bswap_32.
1790 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1791 target_bswap_64.
1792 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1793 store_8ubyte_unaligned): Define using new macros.
1794
17952003-08-12 Ulrich Drepper <drepper@redhat.com>
1796
1797 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1798 possibly unaligned memory. Support use of big endian machines.
1799
18002003-08-11 Ulrich Drepper <drepper@redhat.com>
1801
1802 * Moved to CVS archive.