blob: a8453be2e3624e1a1fe6185a0b54059a9d4474f1 [file] [log] [blame]
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080012009-01-21 Ulrich Drepper <drepper@redhat.com>
2
3 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -08004 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08005 (check_exception_data): First sanity test.
6
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080072009-01-17 Ulrich Drepper <drepper@redhat.com>
8
Ulrich Drepper935edde2009-01-17 16:06:42 -08009 * readelf.c (print_debug_exception_table): Show target of ar_disp
10 field.
11
12 * elflint.c (check_program_header): Add most consistency checks for
13 PT_GNU_EH_FRAME entry.
14
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080015 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
16 ARGP_PROGRAM_BUG_ADDRESS_DEF.
17 * ar.c: Likewise.
18 * elfcmp.c: Likewise.
19 * elflint.c: Likewise.
20 * findtextrel.c: Likewise.
21 * ld.c: Likewise.
22 * nm.c: Likewise.
23 * objdump.c: Likewise.
24 * ranlib.c: Likewise.
25 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -080026
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080027 * size.c: Likewise.
28 * strings.c: Likewise.
29 * strip.c: Likewise.
30 * unstrip.c: Likewise.
31
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800322009-01-16 Ulrich Drepper <drepper@redhat.com>
33
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -080034 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
35 matches .eh_frame_hdr section, if it is available. Also check that
36 the segment is allocated, not writable, not executable.
37
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080038 * readelf.c: Add -e option. Dump exception and unwind related
39 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -080040 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -080041 (print_debug_exception_table): Beginning of support.
42 (print_debug): Hook up print_debug_exception_table for
43 .gcc_except_table sections.
44
45 * readelf.c (print_debug_frame_section): Some fixes for last change.
46
Ulrich Drepper351bf202009-01-15 20:18:40 -0800472009-01-15 Ulrich Drepper <drepper@redhat.com>
48
49 * readelf.c (print_encoding): Now a toplevel function.
50 (print_relinfo): Likewise.
51 (print_encoding_base): Broken out of print_debug_frame_section.
52 (print_debug_frame_section): Print different header for .eh_frame
53 sections. Fix recognition of matching CIEs in .debug_frame sections.
54 Print absolute offset for PC-relative FDE locations. Don't print
55 table header for FDEs if the table is empty.
56 (read_encoded): New function.
57 (print_debug_frame_hdr_section): New function.
58 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
59 sections.
60
61 * readelf.c (handle_relocs_rel): Print section number.
62 (print_debug_abbrev_section): Likewise.
63 (print_debug_aranges_section): Likewise.
64 (print_debug_ranges_section): Likewise.
65 (print_debug_info_section): Likewise.
66 (print_debug_line_section): Likewise.
67 (print_debug_loc_section): Likewise.
68 (print_debug_macinfo_section): Likewise.
69 (print_debug_pubnames_section): Likewise.
70 (print_debug_str_section): Likewise.
71
Ulrich Drepper8b394632009-01-10 18:29:56 -0800722009-01-10 Ulrich Drepper <drepper@redhat.com>
73
74 * strings.c (read_block): Fix typo in error message string.
75
Ulrich Drepper87cf5832009-01-07 20:39:21 -0800762009-01-07 Ulrich Drepper <drepper@redhat.com>
77
78 * ld.c (ld_new_searchdir): Fix adding to search path list.
79
Ulrich Drepperac194d02009-01-06 00:30:01 -0800802009-01-06 Ulrich Drepper <drepper@redhat.com>
81
82 * readelf.c: Implement call frame debug section dumping.
83
Ulrich Drepper44173ed2009-01-01 19:00:41 -0800842009-01-01 Ulrich Drepper <drepper@redhat.com>
85
86 * addr2line.c: Update copyright year.
87 * ar.c: Likewise.
88 * elfcmp.c: Likewise.
89 * elflint.c: Likewise.
90 * findtextrel.c: Likewise.
91 * ld.c: Likewise.
92 * nm.c: Likewise.
93 * objdump.c: Likewise.
94 * ranlib.c: Likewise.
95 * readelf.c: Likewise.
96 * size.c: Likewise.
97 * strings.c: Likewise.
98 * strip.c: Likewise.
99 * unstrip.c: Likewise.
100
Roland McGrath468fe4d2008-12-11 21:00:12 -08001012008-12-11 Roland McGrath <roland@redhat.com>
102
103 * nm.c (sym_name): New function.
104 (show_symbols_sysv): Use it in place of elf_strptr.
105 (show_symbols_bsd, show_symbols_posix): Likewise.
106 Fixes RHBZ#476136.
107
108 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
109 elf_strptr fails.
110
Roland McGratha845f682008-12-03 03:41:58 +00001112008-12-02 Roland McGrath <roland@redhat.com>
112
113 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
114 nonzero OFFSET argument to dwfl_getmodules.
115
Roland McGrath1d8bb252008-08-07 08:39:41 +00001162008-08-07 Roland McGrath <roland@redhat.com>
117
118 * addr2line.c (main): Pass string to handle_address.
119 (see_one_module): New function, subroutine of handle_address.
120 (find_symbol): Likewise.
121 (handle_address): Take string argument rather than address.
122 Convert plain number, or handle strings like "(section)+offset"
123 or "symbol+offset".
124
1252008-08-01 Roland McGrath <roland@redhat.com>
126
127 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
128 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
129
130 * readelf.c (convert): Take new argument SIZE.
131 (handle_core_register, handle_core_item): Update callers.
132 (handle_core_item): Take new arg REPEATED_SIZE.
133 (handle_core_items): Special case for a singleton item,
134 let handle_core_item handle repeats if it wants to.
135
136 * readelf.c (handle_core_items): Give abridged output
137 for identical groups repeated more than twice.
138
1392008-07-04 Roland McGrath <roland@redhat.com>
140
141 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
142
Roland McGrath521c47d2008-04-11 07:01:58 +00001432008-04-10 Roland McGrath <roland@redhat.com>
144
145 * strip.c (handle_elf): Don't keep sections that kept symbol tables
146 refer to. Instead, just be sure to preserve the original symbol
147 table in the debug file so those symbols go with their sections and
148 can be elided from the stripped version of the symbol table.
149
150 * strip.c (handle_elf): When a discarded section kept in the debug
151 file refers to a nondiscard section via sh_link/sh_info, preserve
152 that nondiscarded section unmodified in the debug file as well.
153 Skip adjustment of discarded sections symbol table references when
154 that symbol table is copied in this way.
155
156 * elflint.c (check_symtab): Don't crash from missing symbol names
157 after diagnosing bogus strtab.
158
159 * strip.c (handle_elf): Cosmetic cleanup in special section contents
160 adjustment for symtab changes.
161
Roland McGrath13b69602008-04-01 02:30:05 +00001622008-03-31 Roland McGrath <roland@redhat.com>
163
164 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
165 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
166 excuse a special section.
167
1682008-03-27 Roland McGrath <roland@redhat.com>
169
170 * elflint.c (check_sections): Check that executability and writability
171 of sections is reflected in segment p_flags.
172
Roland McGrathd11f9cb2008-03-26 20:51:59 +00001732008-03-26 Roland McGrath <roland@redhat.com>
174
175 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
176 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
177 is valid in RELRO.
178
Roland McGrath47c5c352008-02-29 10:17:16 +00001792008-02-29 Roland McGrath <roland@redhat.com>
180
181 * readelf.c (print_attributes): Add a cast.
182 * elflint.c (check_attributes): Likewise.
183
184 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
185 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
186 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
187
Ulrich Drepper834de6f2008-02-23 06:50:01 +00001882008-02-03 Ulrich Drepper <drepper@redhat.com>
189
190 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
191 when linked into executable.
192 (elf_i386_create_relocations): Likewise.
193
Roland McGrath059c83e2008-02-21 06:19:39 +00001942008-02-20 Roland McGrath <roland@redhat.com>
195
196 * readelf.c (print_attributes): New function.
197 (process_elf_file): Call it under -A.
198
199 * elflint.c (check_attributes): Implement it for real.
200
2012008-02-19 Roland McGrath <roland@redhat.com>
202
203 * elflint.c (special_sections): Handle .gnu.attributes section.
204 (check_sections): Likewise.
205 (check_attributes): New function.
206
2072008-02-10 Roland McGrath <roland@redhat.com>
208
209 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
210 sections and ET_REL files.
211
Ulrich Drepper712d78e2008-02-02 10:01:53 +00002122008-02-02 Ulrich Drepper <drepper@redhat.com>
213
214 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
215 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
216 and R_386_TLS_LE.
217 (elf_i386_create_relocations): Likewise.
218 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
219 elements.
220 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
221 (ld_generic_create_outfile): Add PT_TLS entry to program header.
222 Fix generation of PT_GNU_STACK entry.
223
Ulrich Drepperc54785a2008-02-01 18:05:21 +00002242008-02-01 Ulrich Drepper <drepper@redhat.com>
225
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000226 * ld.c (replace_args): Prevent loop over replacements if the parameter
227 is only two characters long.
228
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000229 * ld.c: Recognize sha1 argument for --build-id parameter.
230 * ldgeneric.c (create_build_id_section): Handle sha1.
231 (compute_hash_sum): New function. Broken out of compute_build_id.
232 Take hash function and context as parameters.
233 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
234 implementation.
235
Ulrich Drepper89759c72008-01-31 19:44:12 +00002362008-01-31 Ulrich Drepper <drepper@redhat.com>
237
238 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
239 * ld.c: Recognize --build-id command line parameter.
240 * ld.h: Define scn_dot_note_gnu_build_id.
241 (struct ld_state): Add build_id and buildidscnidx elements.
242 * ldgeneric.c: Implement --build-id command line parameter.
243 * ldlex.l (ID): Recognize - as valid character after the first one.
244
Ulrich Drepper5530ec52008-01-29 10:42:07 +00002452008-01-29 Ulrich Drepper <drepper@redhat.com>
246
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000247 * ld.c (replace_args): New function.
248 (main): Use it to rewrite old-style parameters.
249
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000250 * elf32-i386.script: Add .gnu.hash section.
251 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
252 (fillin_special_symbol): Initialize st_size.
253 (sortfct_hashval): New function.
254 (create_gnu_hash): New function.
255 (create_hash): New function.
256 (ld_generic_create_outfile): Use the new functions to create the
257 hash tables.
258
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000259 * elflint.c (check_gnu_hash): Fix index value printed in error message.
260
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00002612008-01-24 Ulrich Drepper <drepper@redhat.com>
262
263 * elflint.c (check_group): Check that signature symbol for section
264 group is not an empty string.
265 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
266 section. Start implementation of --hash-style.
267 * i386_ld.c: Likewise.
268 * ld.c: Recognize --hash-style.
269 * ld.h (struct scninfo): Add comdat_group.
270 Add additional parameter to finalize_plt callback.
271
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00002722008-01-22 Ulrich Drepper <drepper@redhat.com>
273
274 * ld.h (struct callbacks): Add initialize_gotplt.
275 (struct scnhead): Add scn_dot_gotplt.
276 (struct ld_state): Add gotpltscnidx.
277 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
278 (elf_i386_initialize_pltrel): Likewise.
279 (elf_i386_initialize_got): There is now a separate .got.plt, so
280 don't do the PLT-related work here. Initialize d_type.
281 (elf_i386_initialize_gotplt): New function.
282 (elf_i386_plt0): Use ud2a after indirect jump.
283 (elf_i386_pic_plt0_entry): Likewise.
284 (elf_i386_finalize_plt): Reference now .got.plt.
285 (elf_i386_count_relocations): For GOT entries which need no relocation
286 don't bump nrel_got.
287 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
288 handling for split .got/.got.plt.
289 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
290 * elf32-i386.script: Sort sections for security. There are no .got
291 input sections. Add .got.plt.
292 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
293 (ld_generic_create_outfile): Initialize .got.plt section.
294 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
295
Ulrich Drepperd9488292008-01-20 16:43:15 +00002962008-01-19 Ulrich Drepper <drepper@redhat.com>
297
298 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
299 symbols are not carried over into statically linked output files.
300 Add dummy entries for more TLS relocations.
301
302 * ld.c (options): Add long names for -( and -).
303
304 * ldgeneric.c (check_definition): For newly found definitions don't
305 mark section as used if symbol is absolute.
306 (extract_from_archive): Only assign archive sequence number the first
307 time the archive is handled. Update ld_state.last_archive_used
308 if any symbol was used. Remove nround variable.
309 (file_process2): When using symbol from an archive, update
310 ld_state.group_start_archive, ld_state.archives, and
311 ld_state.tailarchives.
312 (ld_generic_file_process): If group is not handled anymore, after
313 freeing ELF handles for the archives, clear ld_state.archives and
314 *nextp. Fix wrong logic in recognizing first iteration of group
315 loop. When clearing flags, also clear ld_state.group_start_archive.
316
Ulrich Drepper5eee1222008-01-11 10:12:18 +00003172008-01-11 Ulrich Drepper <drepper@redhat.com>
318
319 * objdump.c (show_disasm): Adjust disassembler format string for
320 removal of %e.
321
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00003222008-01-04 Roland McGrath <roland@redhat.com>
323
Roland McGrath059c83e2008-02-21 06:19:39 +0000324 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
325 a size greater than the items cover means multiple sets of items.
326 (handle_core_note): Update caller.
327
3282008-01-04 Roland McGrath <roland@redhat.com>
329
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000330 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
331
3322008-01-03 Roland McGrath <roland@redhat.com>
333
334 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
335
336 * elflint.c (check_dynamic): Remove duplicate initializer.
337
Ulrich Drepperad024af2008-01-02 17:42:52 +00003382008-01-02 Ulrich Drepper <drepper@redhat.com>
339
340 * addr2line.c: Update copyright year.
341 * ar.c: Likewise.
342 * elfcmp.c: Likewise.
343 * elflint.c: Likewise.
344 * findtextrel.c: Likewise.
345 * ld.c: Likewise.
346 * nm.c: Likewise.
347 * objdump.c: Likewise.
348 * ranlib.c: Likewise.
349 * readelf.c: Likewise.
350 * size.c: Likewise.
351 * strings.c: Likewise.
352 * strip.c: Likewise.
353 * unstrip.c: Likewise.
354
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00003552007-12-30 Ulrich Drepper <drepper@redhat.com>
356
357 * objdump (show_disasm): Use %e after third parameter.
358
3592007-12-21 Ulrich Drepper <drepper@redhat.com>
360
361 * strip.c: Fix wrong parenthesis in a few branch predictions.
362 * strings.c: Likewise.
363
3642007-12-20 Ulrich Drepper <drepper@redhat.com>
365
366 * Makefile.am (DEFS): Add DEBUGPRED.
367 * addr2line.c: Include debugpred.h.
368 * ar.c: Likewise.
369 * elfcmp.c: Likewise.
370 * elflint.c: Likewise.
371 * findtextrel.c: Likewise.
372 * nm.c: Likewise.
373 * objdump.c: Likewise.
374 * ranlib.c: Likewise.
375 * readelf.c: Likewise.
376 * size.c: Likewise.
377 * strings.c: Likewise.
378 * strip.c: Likewise.
379 * unstrip.c: Likewise.
380 * debugpred.h: New file.
381
382 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
383 (handle_relocs_rela): Likewise.
384
385 * readelf.c: Add lots of likely/unlikely.
386
387 * elflint.c: Minor cleanups.
388
Roland McGrath1a2e8f42007-12-15 23:39:34 +00003892007-11-19 Roland McGrath <roland@redhat.com>
390
391 * readelf.c (print_ops): Handle all bad op codes gracefully.
392 Print their numbers instead of just ???.
393
Roland McGrath07a696e2007-11-09 22:44:26 +00003942007-11-09 Roland McGrath <roland@redhat.com>
395
396 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000397 Handle block forms to mean a DWARF expression for DW_AT_allocated,
398 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
399 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
400 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000401
Roland McGrathe4c22ea2007-10-23 13:07:39 +00004022007-10-20 Roland McGrath <roland@redhat.com>
403
404 * unstrip.c (options): Update -R description.
405 (struct symbol): Put symbol details a union with a size_t pointer
406 `duplicate'.
407 (compare_symbols_output): Use null ->name as marker for discard
408 symbols, not zero *->map.
409 (copy_elided_sections): Record forwarding pointers for discarded
410 duplicates and fill SYMNDX_MAP elements through them.
411
412 * readelf.c (process_file): Set offline_next_address to 0 at start.
413 (struct process_dwflmod_args): New type.
414 (process_dwflmod): Take args in it, pass fd to process_elf_file.
415 (process_file): Update caller; dup FD for passing to libdwfl.
416 (process_elf_file): Take new arg FD. For ET_REL file when
417 displaying data affected by libdwfl relocation, open a new Elf handle.
418
4192007-10-17 Roland McGrath <roland@redhat.com>
420
421 * readelf.c (print_debug_line_section): For invalid data inside a
422 unit with plausible length, keep printing at the next unit boundary.
423
424 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
425
4262007-10-16 Roland McGrath <roland@redhat.com>
427
428 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
429
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00004302007-10-15 Roland McGrath <roland@redhat.com>
431
432 * make-debug-archive.in: New file.
433 * Makefile.am (EXTRA_DIST): Add it.
434 (make-debug-archive): New target.
435 (bin_SCRIPTS, CLEANFILES): Add it.
436
4372007-10-10 Roland McGrath <roland@redhat.com>
438
439 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
440 Use it to check MERGE|STRINGS for .debug_str.
441 (check_sections): Handle exact_or_gnuld.
442
4432007-10-08 Roland McGrath <roland@redhat.com>
444
445 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
446 64-bit struct timeval with 32-bit tv_usec.
447
4482007-10-07 Roland McGrath <roland@redhat.com>
449
450 * readelf.c (check_archive_index): New function.
451 (process_file): Call it. Change signature to take only fd and name.
452 Use libdwfl to open the file, then iterate on its modules (multiple
453 for an archive) to print file name and call process_elf_file.
454 (main): Update caller. Let process_file do elf_begin.
455 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
456 (process_elf_file): Take only Dwfl_Module * argument.
457 Don't print the file name here.
458 (print_debug_*_section): Take Dwfl_Module * argument.
459 (print_debug): Likewise. Update caller.
460 (format_dwarf_addr): New function.
461 (print_debug_ranges_section): Use it.
462 (attr_callback): Likewise.
463 (print_debug_line_section, print_debug_loc_section): Likewise.
464
465 * readelf.c (print_debug_ranges_section): Translate all strings.
466 (print_debug_loc_section): Likewise.
467
468 * unstrip.c (copy_elided_sections): Initialize SEC.
469
470 * ar.c (do_oper_insert): Put trailing / on short names.
471
472 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
473
474 * arlib2.c (arlib_add_long_name): Adjust for header size.
475
476 * arlib.c (arlib_finalize): Pad long name table to keep size even.
477
478 * ar.c (do_oper_insert): Use write_retry for padding write.
479
480 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
481 Unconditionally set FOUND[CNT]->elf when setting ->mem.
482 (remember_long_name): New function.
483 (do_oper_insert): Call it. Correctly use length of basename,
484 not original name. Don't store long name twice for new member.
485
4862007-10-06 Roland McGrath <roland@redhat.com>
487
488 * elflint.c (check_note): Skip empty segment.
489 (check_note_section): Skip empty section.
490
491 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
492 (handle_output_dir_module, handle_implicit_modules): Pass it down.
493 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
494 (compare_alloc_sections): Take new arg REL, ignore address if true.
495 (compare_sections): Likewise, pass it down.
496 (compare_sections_rel, compare_sections_nonrel): New functions.
497 (find_alloc_sections_prelink, copy_elided_sections): Use them
498 instead of compare_sections.
499 (sections_match): New function, broken out of ...
500 (find_alloc_section): ... here.
501 (copy_elided_sections): Reorganize section match-up logic.
502 Use sections_match for SHF_ALLOC in ET_REL.
503 For ET_REL, let the nonzero sh_addr from the debug file dominate.
504
505 * unstrip.c (add_new_section_symbols): Take new arg REL.
506 When true, do not update section symbol values.
507 (collect_symbols): Likewise. Update section symbols with address
508 of chosen output section, not original section.
509 (check_symtab_section_symbols, copy_elided_sections): Update callers.
510
511 * unstrip.c (compare_alloc_sections): At the same address, preserve
512 original section order.
513
514 * elflint.c (special_sections): Don't require MERGE|STRINGS for
515 .debug_str, it didn't always have them with older tools.
516
517 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
518
5192007-10-05 Roland McGrath <roland@redhat.com>
520
521 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
522 ET_REL file.
523
524 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
525 SHN_UNDEF as "bad section". Use shndx value in messages.
526
527 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
528 for ".debug" so it matches as a prefix.
529 (IS_KNOWN_SPECIAL): New macro.
530 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
531 type even under -d, for a .debug* or .shstrtab section.
532
533 * readelf.c (print_ops): Use hex for address operand.
534
5352007-10-04 Roland McGrath <roland@redhat.com>
536
537 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
538 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
539 sections mapped to SHN_UNDEF.
540
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00005412007-10-04 Ulrich Drepper <drepper@redhat.com>
542
543 * readelf.c (dump_archive_index): Avoid warning about uninitialized
544 variable with older glibc versions.
545 Add some branch prediction.
546
Roland McGrath59ea7f32007-10-04 08:50:09 +00005472007-10-04 Roland McGrath <roland@redhat.com>
548
549 * readelf.c (print_archive_index): New variable.
550 (options, parse_opt): Accept -c/--archive-index to set it.
551 (dump_archive_index): New function.
552 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
553 Call dump_archive_index on archives if set.
554 (main): Update caller.
555 (any_control_option): Give it file scope, moved out of ...
556 (parse_opt): ... here.
557
5582007-10-03 Roland McGrath <roland@redhat.com>
559
560 * unstrip.c (struct arg_info): Add `list' flag.
561 (options, parse_opt): Grok -n/--list to set it.
562 (list_module): New function.
563 (handle_implicit_modules): Call it under -n.
564
565 * elflint.c (check_note_section): New function.
566 (check_sections): Call it for SHT_NOTE.
567
568 * readelf.c (handle_notes): Use sections when available.
569
570 * elflint.c (check_note_data): New function, broken out of ...
571 (check_note): ... here. Call it and elf_getdata_rawchunk.
572
573 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
574 Use elf_getdata_rawchunk and gelf_getauxv.
575 (handle_notes_data): New function, broken out of ...
576 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
577
Roland McGrath241ac022007-10-01 18:21:46 +00005782007-10-01 Roland McGrath <roland@redhat.com>
579
Roland McGrathac0a16c2007-10-01 18:50:35 +0000580 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
581
Roland McGrath241ac022007-10-01 18:21:46 +0000582 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
583
Roland McGrathc76f0b02007-09-27 07:31:33 +00005842007-09-10 Roland McGrath <roland@redhat.com>
585
586 * readelf.c (options): Give -p optional argument, alias --string-dump.
587 (string_sections, string_sections_tail): New static variables.
588 (parse_opt): Set them when -p has an argument.
589 (print_string_section): New function, broken out of ...
590 (print_strings): ... here. Call it.
591 (dump_data_section): New function, broken out of ...
592 (dump_data): ... here. Call it.
593 (for_each_section_argument): New function, broken out of ...
594 (dump_data): ... here. Call it.
595 (dump_strings): New function.
596
5972007-08-31 Roland McGrath <roland@redhat.com>
598
599 * readelf.c (print_strings): Typo fix.
600
Roland McGrathcb6d8652007-08-23 08:10:54 +00006012007-08-23 Roland McGrath <roland@redhat.com>
602
603 * readelf.c (printf_with_wrap): Function removed.
604 (REGISTER_WRAP_COLUMN): New macro.
605 (handle_core_register): Use print_core_item instead.
606 (struct register_info): New type.
607 (compare_registers, compare_register_sets): New functions.
608 (register_bitpos, compare_sets_by_info): New functions.
609 (handle_core_registers): Use those to segregate and sort registers
610 for display.
611
612 * readelf.c (ITEM_WRAP_COLUMN): New macro.
613 (print_core_item): New function.
614 (handle_core_item): Use it instead of printf_with_wrap.
615 (compare_core_items, compare_core_item_groups): New functions.
616 (handle_core_items): Use them. Sort by group and force line breaks
617 between groups.
618
619 * readelf.c (handle_core_registers, handle_core_items): New functions,
620 broken out of ...
621 (handle_core_note): ... here. Call them.
622
6232007-08-22 Roland McGrath <roland@redhat.com>
624
625 * unstrip.c (new_shstrtab): New function, broken out of ...
626 (copy_elided_sections): ... here.
627
6282007-08-20 Roland McGrath <roland@redhat.com>
629
630 Avoid local function trampolines in nm binary.
631 * nm.c (sort_by_address): Move to a static function instead of local
632 inside show_symbols.
633 (sort_by_name_strtab): New static variable.
634 (sort_by_name): Use it. Move to a static function instead of local
635 inside show_symbols.
636 (show_symbols): Set sort_by_name_strtab.
637
6382007-08-19 Roland McGrath <roland@redhat.com>
639
640 * readelf.c (handle_auxv_note): New function.
641 (handle_notes): Call it.
642
643 * readelf.c (printf_with_wrap, convert): New functions.
644 (handle_core_item, (handle_core_register): New functions.
645 (handle_notes): Call those with details from ebl_core_note.
646
Roland McGrath099dd522007-08-13 22:58:36 +00006472007-08-12 Roland McGrath <roland@redhat.com>
648
649 * elflint.c (check_note): Accept type 0 with name "Linux".
650
651 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
652
653 * elflint.c (section_flags_string): Return "none" for 0, not "".
654
Roland McGrathd8221722007-08-11 21:18:09 +00006552007-08-11 Roland McGrath <roland@redhat.com>
656
657 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
658
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00006592007-08-04 Ulrich Drepper <drepper@redhat.com>
660
661 * readelf.c (hex_dump): Use isprint to determine whether to print
662 character itself or full stop character.
663 (dump_data): No need to check endp for NULL after strtol call.
664
Roland McGrath60fc84c2007-08-03 21:59:15 +00006652007-08-03 Roland McGrath <roland@redhat.com>
666
667 * readelf.c (print_string_sections): New variable.
668 (options, parse_opt): Handle --strings/-p to set it.
669 (print_strings): New function.
670 (process_elf_file): Call it under -p.
671
672 * readelf.c (options): Add hidden aliases --segments, --sections,
673 as taken by binutils readelf.
674
6752007-08-01 Roland McGrath <roland@redhat.com>
676
677 * readelf.c (dump_data_sections, dump_data_sections_tail):
678 New variables.
679 (options, parse_opt): Handle --hex-dump/-x, set them.
680 (hex_dump): New function.
681 (dump_data): New function, call it.
682 (process_elf_file): Call it.
683
6842007-07-25 Roland McGrath <roland@redhat.com>
685
686 * addr2line.c (show_symbols): New variable.
687 (print_addrsym): New function.
688 (handle_address): Call it.
689 (options, parse_opt): Handle -S/--symbols.
690
Ulrich Drepperb0243862007-06-06 00:09:36 +00006912007-06-05 Ulrich Drepper <drepper@redhat.com>
692
693 * addr2line.c: Update for latest autoconf header.
694 * ar.c: Likewise.
695 * elfcmp.c: Likewise.
696 * elflint.c: Likewise.
697 * findtextrel.c: Likewise.
698 * ld.c: Likewise.
699 * ldgeneric.c: Likewise.
700 * nm.c: Likewise.
701 * objdump.c: Likewise.
702 * ranlib.c: Likewise.
703 * readelf.c: Likewise.
704 * size.c: Likewise.
705 * strings.c: Likewise.
706 * strip.c: Likewise.
707 * unstrip.c: Likewise.
708
Roland McGrath9aa8ef72007-05-18 08:59:43 +00007092007-05-18 Roland McGrath <roland@redhat.com>
710
711 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
712 stripped file, so as not to duplicate a section copied in both.
713
714 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
715
7162007-05-17 Roland McGrath <roland@redhat.com>
717
718 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
719
720 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
721
722 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
723 call make_directories here.
724 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
725 (handle_dwfl_module): Likewise.
726 (handle_implicit_modules): Update callers.
727 (handle_output_dir_module): Likewise. Don't do make_directories here.
728
729 * unstrip.c (get_section_name): New function, broken out of ...
730 (copy_elided_sections): here. Update callers.
731 (find_alloc_section): Broken out of ...
732 (copy_elided_sections): ... here. Update caller.
733 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
734 update STT_SECTION symbols' st_value fields as a side effect.
735 (check_symtab_section_symbols): Update caller.
736 (add_new_section_symbols): Set st_value in symbols added.
737 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
738 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
739 from .bss to .dynbss.
740 (find_alloc_sections_prelink): New function. Associate debug file
741 allocated SHT_NOBITS shdrs with stripped moved by prelink via
742 .gnu.prelink_undo information.
743 (copy_elided_sections): Call it when we couldn't find every allocated
744 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
745 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
746 (handle_file): Update callers.
747
748 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
749 named ".comment".
750
751 * elflint.c (check_sections): Fix association of segments with
752 sections when p_memsz > p_filesz.
753
7542007-04-29 Roland McGrath <roland@redhat.com>
755
756 * addr2line.c (options, main): Tweak argp group settings to fix
757 usage output.
758
7592007-04-28 Roland McGrath <roland@redhat.com>
760
761 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
762 sizes to match sections adjusted in the stripped file.
763
Roland McGrath4be15242007-04-25 03:09:33 +00007642007-04-24 Roland McGrath <roland@redhat.com>
765
766 * elfcmp.c (OPT_HASH_INEXACT): New macro.
767 (hash_inexact): New variable.
768 (options, parse_opt): Add --hash-inexact option to set it.
769 (hash_content_equivalent): New function.
770 (main): Call it for differing SHT_HASH sections under --hash-inexact.
771
7722007-04-23 Roland McGrath <roland@redhat.com>
773
774 * unstrip.c: New file.
775 * Makefile.am (bin_PROGRAMS): Add it.
776 (unstrip_LDADD): New variable.
777
778 * strip.c (options): Allow --output for -o.
779
Ulrich Drepper8b383102007-02-16 00:31:57 +00007802007-02-15 Ulrich Drepper <drepper@redhat.com>
781
782 * readelf.c: Remove unused code. Add a few consts.
783
Ulrich Drepper903c1162007-02-15 19:40:37 +00007842007-02-15 Roland McGrath <roland@redhat.com>
785
786 * readelf.c (print_debug): Fix brainos in SHDR test.
787
Roland McGrathf82a1ec2007-02-06 04:47:44 +00007882007-02-05 Roland McGrath <roland@redhat.com>
789
790 * ar.c: Include <limits.h>, since we use LONG_MAX.
791
Ulrich Drepper0fe63532007-02-05 21:05:51 +00007922007-02-05 Ulrich Drepper <drepper@redhat.com>
793
Ulrich Drepper8b383102007-02-16 00:31:57 +0000794 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000795 ignore fchown's return value.
796 (do_oper_insert): Handle error when writing padding.
797 * ranlib.c: Add fchown complain work around.
798
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000799 * arlib.c: Make symtab a global variable. Change all users.
800 * arlib2.c: Likewise.
801 * ranlib.c: Likewise.
802 * ar.c: Likewise.
803 * arlib.h: Declare it.
804
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00008052007-01-11 Roland McGrath <roland@redhat.com>
806
807 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
808 SHF_MASKPROC bits separately from generic sh_flags validation.
809
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00008102007-02-04 Ulrich Drepper <drepper@redhat.com>
811
812 * ar.c: New file.
813 * arlib.c: New file.
814 * arlib2.c: New file.
815 * arlib.h: New file.
816 * Makefile (noinst_LIBRARIES): Add libar.
817 (libar_a_SOURCES): Define.
818 (ar_LDADD): Define.
819 (CFLAGS_ar): Define.
820 * ranlib.c: Change to use arlib.
821
822 * elflint.c (check_symtab): Work around GNU ld bug which omits
823 sections but not symbols in those sections.
824
Ulrich Drepperb770cf92007-01-10 21:02:34 +00008252007-01-10 Ulrich Drepper <drepper@redhat.com>
826
827 * addr2line.c: Update copyright year.
828 * elfcmp.c: Likewise.
829 * elflint.c: Likewise.
830 * findtextrel.c: Likewise.
831 * ld.c: Likewise.
832 * nm.c: Likewise.
833 * objdump.c: Likewise.
834 * ranlib.c: Likewise.
835 * readelf.c: Likewise.
836 * size.c: Likewise.
837 * strings.c: Likewise.
838 * strip.c: Likewise.
839
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00008402006-12-09 Ulrich Drepper <drepper@redhat.com>
841
842 * elflint.c (compare_hash_gnu_hash): New function. Report if the
843 two hash tables have different content (module expected omission
844 of undefined symbols).
845
Roland McGrath8190db62006-12-17 23:56:51 +00008462006-10-31 Roland McGrath <roland@redhat.com>
847
848 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000849 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000850
8512006-09-19 Jakub Jelinek <jakub@redhat.com>
852
853 * strip.c (process_file): Disallow -f on archives.
854
8552006-10-09 Roland McGrath <roland@redhat.com>
856
857 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
858
Roland McGrathc373d852006-10-10 00:25:21 +00008592006-08-29 Roland McGrath <roland@redhat.com>
860
861 * Makefile.am (MAINTAINERCLEANFILES): New variable.
862
863 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
864 Reported by Christian Aichinger <Greek0@gmx.net>.
865
866 * elflint.c (valid_e_machine): Add EM_ALPHA.
867 Reported by Christian Aichinger <Greek0@gmx.net>.
868
Ulrich Drepper231c5902006-08-08 22:00:11 +00008692006-08-08 Ulrich Drepper <drepper@redhat.com>
870
871 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
872 Keep track of which "high DT" entries are present.
873 Check that either old or GNU-style hash table is present.
874 If GNU-style hash table is used a symbol table is mandatory.
875 Check that if any prelink entry is present all of them are.
876 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
877 table if they don't refer to functions.
878
Roland McGrath858b1892006-07-17 08:41:15 +00008792006-07-17 Roland McGrath <roland@redhat.com>
880
881 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
882 (add_version): Likewise for argument.
883 (check_versym): Cast constant to GElf_Versym for comparison.
884
Roland McGrath4ec807e2006-07-13 03:59:46 +00008852006-07-12 Roland McGrath <roland@redhat.com>
886
887 * readelf.c (handle_gnu_hash): Add casts for machines where
888 Elf32_Word != unsigned int.
889
Ulrich Drepperdcf61602006-07-12 19:59:02 +00008902006-07-12 Ulrich Drepper <drepper@redhat.com>
891
892 * elflint.c (check_sysv_hash64): Fix printf format.
893
Ulrich Dreppercc415622006-07-12 19:42:23 +00008942006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000895
Ulrich Dreppercc415622006-07-12 19:42:23 +0000896 * addr2line.c (options): English fix in -f doc string.
897
898 * addr2line.c (use_comp_dir): New variable.
899 (options, parse_opt): Grok -A/--absolute to set it.
900 (handle_address): If set, prepend dwfl_line_comp_dir results to
901 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000902
Ulrich Drepper28ed8952006-07-07 03:43:47 +00009032006-07-06 Ulrich Drepper <drepper@redhat.com>
904
905 * elflint.c: Adjust for latest new hash table format.
906 * readelf.c: Likewise.
907
908 * elflint.c (check_versym): Ignore hidden bit when comparing version
909 numbers.
910
9112006-07-05 Ulrich Drepper <drepper@redhat.com>
912
913 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
914 discarded COMDAT symbols.
915
916 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
917 (elf_i386_create_relocations): Likewise.
918 * ld.h (struct symbol): Add local and hidden bits.
919 * ld.c (create_special_section_symbol): These synthsized symbols
920 are local and hidden.
921 * ldgeneric.c (file_process2): Check whether input file matches
922 the emulation.
923 (fillin_special_symbol): Create symbols as local and/or hidden
924 if requested.
925 (ld_generic_create_outfile): Make local copy of symbol.
926 Don't hide global, defined symbols in dynamic symbol table unless
927 requested. Synthetic symbols have no version information.
928
929 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
930 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
931
9322006-07-04 Ulrich Drepper <drepper@redhat.com>
933
934 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
935 testing.
936
9372006-07-03 Ulrich Drepper <drepper@redhat.com>
938
939 * elflint.c: Add testing of DT_GNU_HASH.
940 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
941
942 * Makefile.am: Add hacks to create dependency files for non-generic
943 linker.
944
Ulrich Drepper6ca46002006-06-12 22:40:23 +00009452006-06-12 Ulrich Drepper <drepper@redhat.com>
946
947 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
948 section if creating a DSO and no interpreter is given.
949 (ld_generic_create_outfile): Don't store reference to symbols in
950 discarded COMDAT groups. Don't create PHDR and INTERP program header
951 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +0000952 (create_verneed_data): Pretty printing.
953
Ulrich Drepper6ca46002006-06-12 22:40:23 +0000954 * ldscript.y (content): If a DSO is created don't set default
955 interpreter from linker script.
956
957 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
958 for symbols in discarded COMDAT groups.
959 (elf_i386_create_relocations): Likewise.
960 * ld.h (struct scninfo): Add unused_comdat.
961 * ldgeneric.c (add_section): Also check group signature when
962 matching COMDAT sections.
963 (add_relocatable_file): Ignore symbols in COMDAT group which are
964 discarded.
965
966 * elflint.c (check_one_reloc): For *_NONE relocs only check type
967 and symbol reference.
968
Ulrich Drepper54f33a72006-06-11 09:07:37 +00009692006-06-11 Ulrich Drepper <drepper@redhat.com>
970
Ulrich Dreppercbb51e52006-06-11 20:25:23 +0000971 * elflint.c (check_dynamic): Fix checking value of tags which are
972 offsets in the string section. Make sure DT_STRTAB points to the
973 section referenced in sh_link.
974
975 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
976
Ulrich Drepper54f33a72006-06-11 09:07:37 +0000977 * ld.c: Recognize --eh-frame-hdr option.
978 * ld.h (struct ld_state): Add eh_frame_hdr field.
979 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
980
981 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
982 SH_FLAGS_COMBINE.
983 (add_relocatable_file): Minor optimization of last change.
984 (match_section): Don't preserve SHF_GROUP flag any longer.
985
Ulrich Drepper2d880282006-06-11 00:20:43 +00009862006-06-10 Ulrich Drepper <drepper@redhat.com>
987
988 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +0000989 Handle record and ignore as position dependent options.
990 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +0000991 * ld.h (struct ld_state): Add execstack field.
992 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
993 sections.
994 (ld_generic_create_outfile): Fix program header creation in native
995 linker. Add PT_GNU_STACK program header.
996
Ulrich Dreppera688a732006-06-10 06:33:00 +00009972006-06-09 Ulrich Drepper <drepper@redhat.com>
998
999 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1000 for PLT entries if there is no local definition.
1001
1002 * ld.c (parse_option): Handle -z ignore like --as-needed and
1003 -z record like --no-as-needed.
1004 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1005 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1006 looping over DSOs. When deciding about adding DT_NEEDED entries
1007 use ->as_needed instead of ignore_unused_dsos.
1008
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000010092006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001010
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001011 * ld.c: Recognize --as-needed and --no-as-needed options.
1012 * ld.h (struct usedfile): Add as_needed field.
1013 (struct ld_state): Likewise.
1014 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1015 the list.
1016 * ldscript.y (filename_id_list): Split to correctly parse all
1017 combinations.
1018 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001019
Ulrich Drepper697f4db2006-06-10 06:50:47 +000010202006-05-28 Ulrich Drepper <drepper@redhat.com>
1021
1022 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1023 and colno.
1024
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000010252006-05-27 Ulrich Drepper <drepper@redhat.com>
1026
1027 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001028 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001029
Ulrich Drepper82c345d2006-04-04 22:07:54 +000010302006-04-04 Ulrich Drepper <drepper@redhat.com>
1031
1032 * addr2line.c: Update copyright year.
1033 * elfcmp.c: Likewise.
1034 * elflint.c: Likewise.
1035 * findtextrel.c: Likewise.
1036 * ld.c: Likewise.
1037 * nm.c: Likewise.
1038 * objdump.c: Likewise.
1039 * ranlib.c: Likewise.
1040 * readelf.c: Likewise.
1041 * size.c: Likewise.
1042 * strings.c: Likewise.
1043 * strip.c: Likewise.
1044
Roland McGrathdd7e22b2006-03-09 23:05:47 +000010452006-03-09 Roland McGrath <roland@redhat.com>
1046
1047 * Makefile.am (AM_LDFLAGS): New variable.
1048
Roland McGrath060fa052006-03-02 07:51:50 +000010492006-03-01 Roland McGrath <roland@redhat.com>
1050
1051 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1052 for dwarf.h changes matching 3.0 spec.
1053 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1054
Ulrich Drepper038129b2005-12-04 16:47:24 +000010552005-12-04 Ulrich Drepper <drepper@redhat.com>
1056
1057 * elflint.c (check_one_reloc): If relocation section is not loaded,
1058 don't check whether the relocations modify read-only sections or
1059 loaded and unloaded sections.
1060
Ulrich Drepper607e0542005-12-04 15:51:06 +000010612005-11-28 Ulrich Drepper <drepper@redhat.com>
1062
1063 * elflint.c (check_one_reloc): Take additional parameters. Use
1064 them to determine whether relocation is valid in this type of
1065 file. DSOs and executables can contain relocation sections in
1066 unloaded sections which just show the relocations the linker
1067 applied. Adjust all callers.
1068 (check_program_header): Check that PT_PHDR is loaded and that offset
1069 matches the one in the ELF header.
1070
Roland McGrath6724c902005-10-28 07:07:19 +000010712005-10-26 Roland McGrath <roland@redhat.com>
1072
1073 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1074
Ulrich Drepperd0449522005-09-03 07:23:52 +000010752005-09-03 Ulrich Drepper <drepper@redhat.com>
1076
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001077 * strip.c (handle_elf): Unify some error messages.
1078 * ld.c (main): Likewise.
1079 * ldgeneric.c (open_elf): Likewise.
1080 * elfcmp.c (main): Likewise.
1081 * elflint.c (check_elf_header): Likewise.
1082
1083 * size.c (process_file): Fix typo in error message.
1084
Ulrich Drepperd0449522005-09-03 07:23:52 +00001085 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1086
Ulrich Dreppera60501e2005-09-02 19:50:17 +000010872005-09-02 Ulrich Drepper <drepper@redhat.com>
1088
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001089 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001090 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001091
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000010922005-08-28 Ulrich Drepper <drepper@redhat.com>
1093
1094 * ranlib.c: Don't define pread_retry and write_retry here.
1095
1096 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1097 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1098
1099 * strings.c (process_chunk): Reorder expressions in conditional
1100 (process_chunk_mb): Likewise.
1101
1102 * strings.c: New file.
1103 * Makefile.am (bin_PROGRAMS): Add strings.
1104 (strings_no_Wstring): Define.
1105 (strings_LDADD): Define.
1106
Roland McGrath71e15a02005-08-27 10:33:26 +000011072005-08-27 Roland McGrath <roland@redhat.com>
1108
1109 * addr2line.c (dwarf_diename_integrate): Function removed.
1110 (print_dwarf_function): Use plain dwarf_diename.
1111
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000011122005-08-24 Ulrich Drepper <drepper@redhat.com>
1113
1114 * elflint.c (check_versym): Versioned symbols should not have
1115 local binding.
1116
Ulrich Drepper5d832292005-08-15 21:36:27 +000011172005-08-15 Ulrich Drepper <drepper@redhat.com>
1118
Ulrich Drepper61655e02005-08-16 04:23:02 +00001119 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1120 undefined.
1121
Ulrich Drepper5d832292005-08-15 21:36:27 +00001122 * Makefile.am: Add rules to build ranlib.
1123 * ranlib.c: New file.
1124
Roland McGrath18e13422005-08-15 08:01:25 +000011252005-08-14 Roland McGrath <roland@redhat.com>
1126
1127 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1128 sh_type it recognizes.
1129
1130 * elflint.c (check_sections): Print unknown flags in hex, don't
1131 truncate high bits. Print section number and name for unknown type.
1132
Roland McGrathf6895042005-08-13 20:56:52 +000011332005-08-13 Roland McGrath <roland@redhat.com>
1134
1135 * elflint.c (check_program_header): Use ebl_segment_type_name and
1136 allow any p_type it recognizes. Include p_type value in error
1137 message for unknown type.
1138
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000011392005-08-13 Ulrich Drepper <drepper@redhat.com>
1140
1141 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1142 to ebl_check_special_symbol.
1143 (check_sections): Pass ehdr to ebl_bss_plt_p.
1144
Roland McGrath653d3762005-08-13 01:59:10 +000011452005-08-12 Roland McGrath <roland@redhat.com>
1146
1147 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1148 refers to the right section if it's not SHN_ABS.
1149 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1150
1151 * elflint.c (check_sections): Don't complain about a non-NOBITS
1152 section taking no segment space, if it's sh_size is 0.
1153
1154 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1155 be PROGBITS or NOBITS.
1156
1157 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1158 standard st_value and st_size checks.
1159
Roland McGrath1c83bf12005-08-11 07:03:55 +000011602005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001161
Roland McGrath1c83bf12005-08-11 07:03:55 +00001162 * addr2line.c (options, parse_opt): Don't handle -e here.
1163 (executable): Variable removed.
1164 (argp_children): New static variable.
1165 (argp): Use it. Make const.
1166 (main): Fill in argp_children from dwfl_standard_argp ().
1167 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1168 (print_dwarf_function): New function. Try to figure out inline chain.
1169 (elf_getname): Function removed, libdwfl does it for us.
1170 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1171 Use dwfl_module_addrname instead of elf_getname.
1172 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1173 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1174
11752005-08-10 Ulrich Drepper <drepper@redhat.com>
1176
1177 * strip.c (parse_opt): STATE parameter is now used.
1178 Various little cleanups.
1179
1180 * readelf.c (print_debug_line_section): Correct fallout of renaming
1181 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001182
Roland McGrath8f31c2c2005-08-09 04:58:05 +000011832005-08-08 Roland McGrath <roland@redhat.com>
1184
1185 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1186 with binutils strip. Likewise -d, -S, as aliases for -g.
1187 Likewise ignore -s/--strip-all.
1188
Roland McGrath095a01b2005-08-08 03:49:35 +000011892005-08-07 Roland McGrath <roland@redhat.com>
1190
1191 * strip.c (process_file): Open read-only when using a different output
1192 file.
1193
Ulrich Drepper47be7952005-08-07 04:41:39 +000011942005-08-06 Ulrich Drepper <drepper@redhat.com>
1195
Ulrich Drepper637963b2005-08-07 05:33:07 +00001196 * elflint.c (in_nobits_scn): New function.
1197 (check_versym): Allow references for defined symbols against versions
1198 of other DSOs also for symbols in nobits sections.
1199 Move a few variables around.
1200
Ulrich Drepper47be7952005-08-07 04:41:39 +00001201 * Makefile.am (AM_CFLAGS): Avoid duplication.
1202 Link with statis libs if BUILD_STATIC.
1203
Ulrich Drepperdbace232005-08-06 01:37:23 +000012042005-08-05 Ulrich Drepper <drepper@redhat.com>
1205
1206 * elflint.c: Many, many more tests. Mostly related to symbol
1207 versioning. Those sections should now be completely checked.
1208
1209 * readelf.c (print_dynamic): Use gelf_offscn.
1210
Ulrich Drepperacb89832005-08-04 07:01:49 +000012112005-08-04 Ulrich Drepper <drepper@redhat.com>
1212
1213 * elflint.c: Add lots more tests: more extension symbol table sanity,
1214 versioning section tests, hash table tests. General cleanup.
1215
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000012162005-08-02 Ulrich Drepper <drepper@redhat.com>
1217
Ulrich Drepper8a687742005-08-03 02:24:12 +00001218 * objdump.c: New file.
1219 * Makefile.am (bin_PROGRAMS): Add objdump.
1220 (objdump_LDADD): Define.
1221
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001222 * elflint.c (check_reloc_shdr): New function split out from check_rela
1223 and check_rel.
1224 (check_one_reloc): New function. Likewise.
1225 (check_rela): Use check_reloc_shdr and check_one_reloc.
1226 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001227 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1228 section.
1229 Add checks that relocations against read-only segments are flagged,
1230 that the text relocation flag is not set unnecessarily, and that
1231 relocations in one section are either against loaded or not-loaded
1232 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001233
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000012342005-08-01 Ulrich Drepper <drepper@redhat.com>
1235
1236 * elfcmp.c (main): Ignore section count and section name string table
1237 section index.
1238
Roland McGrathf9ece8a2005-07-28 07:03:04 +000012392005-07-27 Roland McGrath <roland@redhat.com>
1240
1241 * elfcmp.c: Include <locale.h>.
1242
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000012432005-07-27 Ulrich Drepper <drepper@redhat.com>
1244
1245 * elfcmp.c: Print name and index of differing section.
1246
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000012472005-07-24 Ulrich Drepper <drepper@redhat.com>
1248
1249 * elfcmp.c: Implement comparing gaps between sections.
1250
12512005-07-23 Ulrich Drepper <drepper@redhat.com>
1252
1253 * elflint.c: Include libeblP.h instead of libebl.h.
1254 * nm.c: Likewise.
1255 * readelf.c: Likewise.
1256 * elfcmp.c: Likewise.
1257
1258 * elfcmp.c (main): Compare individual ELF header fields, excluding
1259 e_shoff instead of the whole struct at once.
1260 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1261 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1262
12632005-07-22 Ulrich Drepper <drepper@redhat.com>
1264
1265 * elfcmp.c (main): Take empty section into account when comparing
1266 section content.
1267
1268 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1269 using it.
1270
12712005-07-21 Ulrich Drepper <drepper@redhat.com>
1272
1273 * elfcmp.c: New file.
1274 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1275 (elfcmp_LDADD): Define.
1276
1277 * elflint.c (check_rela): Check that copy relocations only reference
1278 object symbols or symbols with unknown type.
1279 (check_rel): Likewise.
1280
12812005-06-08 Roland McGrath <roland@redhat.com>
1282
1283 * readelf.c (print_ops): Add consts.
1284
12852005-05-31 Roland McGrath <roland@redhat.com>
1286
1287 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1288 abbreviations. Print a header line before each CU section.
1289
1290 * readelf.c (print_debug_loc_section): Fix indentation for larger
1291 address size.
1292
12932005-05-30 Roland McGrath <roland@redhat.com>
1294
1295 * readelf.c (print_debug_line_section): Print section offset of each
1296 CU's table, so they are easy to find from seeing the stmt_list value.
1297
1298 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1299 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1300
1301 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1302 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1303
1304 * readelf.c (print_ops): Take different args for indentation control.
1305 (attr_callback): Caller updated.
1306 Grok several more block-form attributes as being location expressions.
1307 For those same attributes with udata forms, format output differently
1308 for location list offset.
1309 (print_debug_loc_section): Implement it for real.
1310
1311 * readelf.c (options): Mention ranges for --debug-dump.
1312 (enum section_e): Add section_ranges.
1313 (parse_opt): Grok "ranges" for -w/--debug-dump.
1314 (print_debug_ranges_section): New function.
1315 (print_debug): Handle .debug_ranges section.
1316
13172005-05-30 Ulrich Drepper <drepper@redhat.com>
1318
1319 * readelf.c (handle_notes): At least x86-64 need not have the note
1320 section values aligned to 8 bytes.
1321
13222005-05-18 Ulrich Drepper <drepper@redhat.com>
1323
1324 * readelf.c (dwarf_tag_string): Add new tags.
1325
13262005-05-08 Roland McGrath <roland@redhat.com>
1327
1328 * strip.c (handle_elf): Don't translate hash and versym data formats,
1329 elf_getdata already did it for us.
1330
13312005-05-07 Ulrich Drepper <drepper@redhat.com>
1332
1333 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1334 (addr2line_LDADD): Likewise.
1335
13362005-05-03 Roland McGrath <roland@redhat.com>
1337
1338 * strip.c (handle_elf): Apply symbol table fixups to discarded
1339 relocation sections when they are being saved in the debug file.
1340
1341 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1342 and gelf_xlatetof, not the native byte order.
1343
1344 * strip.c (parse_opt): Give error if -f or -o is repeated.
1345 (main): Exit if argp_parse returns nonzero.
1346
1347 * strip.c (debug_fname_embed): New variable.
1348 (options, parse_opt): New option -F to set it.
1349
13502005-05-07 Ulrich Drepper <drepper@redhat.com>
1351
1352 * readelf.c (parse_opt): Make any_control_option variable
1353 local. Simplify some tests.
1354
13552005-05-03 Roland McGrath <roland@redhat.com>
1356
1357 * strip.c (crc32_file): Function removed (now in ../lib).
1358
13592005-05-03 Roland McGrath <roland@redhat.com>
1360
1361 * elflint.c (is_debuginfo): New variable.
1362 (options, parse_opt): New option --debuginfo/-d to set it.
1363 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1364 (check_note): If is_debuginfo, don't try to get note contents.
1365
13662005-04-24 Ulrich Drepper <drepper@redhat.com>
1367
1368 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1369 section reached.
1370
13712005-04-14 Ulrich Drepper <drepper@redhat.com>
1372
1373 * readelf.c (dwarf_encoding_string): New function.
1374 (dwarf_inline_string): New function.
1375 (dwarf_access_string): New function.
1376 (dwarf_visibility_string): New function.
1377 (dwarf_virtuality_string): New function.
1378 (dwarf_identifier_case_string): New function.
1379 (dwarf_calling_convention_string): New function.
1380 (dwarf_ordering_string): New function.
1381 (dwarf_discr_list_string): New function.
1382 (attr_callback): Decode man more attribute values.
1383
13842005-04-01 Ulrich Drepper <drepper@redhat.com>
1385
1386 * addr2line.c: Finish implementation of -f option.
1387
13882005-03-29 Ulrich Drepper <drepper@redhat.com>
1389
1390 * addr2line.c: New file.
1391 * Makefile.am (bin_PROGRAMS): Add addr2line.
1392 Define addr2line_LDADD.
1393
1394 * findtextrel.c: Use new dwarf_addrdie function.
1395
1396 * findtextrel.c: Fix usage message and re-add accidentally removed
1397 line.
1398
13992005-03-28 Ulrich Drepper <drepper@redhat.com>
1400
1401 * findtextrel.c: New file.
1402 * Makefile: Add rules to build findtextrel.
1403
14042005-02-15 Ulrich Drepper <drepper@redhat.com>
1405
1406 * ldlex.l: Provide ECHO definition to avoid warning.
1407
1408 * elflint.c (check_program_header): Fix typo in RELRO test.
1409
1410 * Makefile.am (AM_CFLAGS): Add more warning options.
1411 * elflint.c: Fix warnings introduced by the new warning options.
1412 * i386_ld.c: Likewise.
1413 * ld.c: Likewise.
1414 * ld.h: Likewise.
1415 * ldgeneric.c: Likewise.
1416 * nm.c: Likewise.
1417 * readelf.c: Likewise.
1418 * sectionhash.c: Likewise.
1419 * size.c: Likewise.
1420 * string.c: Likewise.
1421
14222005-02-05 Ulrich Drepper <drepper@redhat.com>
1423
1424 * Makefile.am: Check for text relocations in constructed DSOs.
1425
1426 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1427 with -lmudflap.
1428
1429 * ldscript.y: Add as_needed handling.
1430 * ldlex.l: Recognize AS_NEEDED token.
1431 * ld.h (struct filename_list): Add as_needed flag.
1432
14332005-02-04 Ulrich Drepper <drepper@redhat.com>
1434
1435 * elflint.c (check_symtab): Correctly determine size of GOT section.
1436
14372005-01-19 Ulrich Drepper <drepper@redhat.com>
1438
1439 * ld.c: Remove unnecessary more_help function. Print bug report
1440 address using argp.
1441 * strip.c: Likewise.
1442 * size.c: Likewise.
1443 * nm.c: Likewise.
1444 * readelf.c: Likewise.
1445 * elflint.c: Likewise.
1446
1447 * elflint.c (main): Don't check for parameter problems here.
1448 (parse_opt): Do it here, where we get informed about some of them
1449 anyway.
1450
1451 * readelf.c (main): Don't check for parameter problems here.
1452 (parse_opt): Do it here, where we get informed about some of them
1453 anyway.
1454
14552005-01-11 Ulrich Drepper <drepper@redhat.com>
1456
1457 * strip.c: Update copyright year.
1458 * readelf.c: Likewise.
1459 * size.c: Likewise.
1460 * nm.c: Likewise.
1461 * ld.c: Likewise.
1462 * elflint.c: Likewise.
1463
1464 * elflint.c (check_symtab): Don't warn about wrong size for
1465 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1466
14672004-10-05 Ulrich Drepper <drepper@redhat.com>
1468
1469 * readelf.c (print_phdr): In section mapping, also indicate
1470 sections in read-only segments.
1471
14722004-09-25 Ulrich Drepper <drepper@redhat.com>
1473
1474 * readelf.c: Make compile with gcc 4.0.
1475 * strip.c: Likewise.
1476
14772004-08-16 Ulrich Drepper <drepper@redhat.com>
1478
1479 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1480 allocate to work around gcc 3.4 bug.
1481
14822004-01-25 Ulrich Drepper <drepper@redhat.com>
1483
1484 * ldlex.l (invalid_char): Better error message.
1485
14862004-01-23 Ulrich Drepper <drepper@redhat.com>
1487
1488 * readelf.c: Print SHT_GNU_LIBLIST sections.
1489
1490 * none_ld.c: New file.
1491
14922004-01-21 Ulrich Drepper <drepper@redhat.com>
1493
1494 * Makefile.am: Enable building of machine specific linker.
1495
14962004-01-20 Ulrich Drepper <drepper@redhat.com>
1497
1498 * Makefile.am: Support building with mudflap.
1499
1500 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1501 * ldgeneric.c: Likewise.
1502 * ldscript.y: Likewise.
1503 * readelf.c: Likewise.
1504 * strip.c: Likewise.
1505
1506 * readelf.c (print_debug_line_section): Determine address size
1507 correctly.
1508
15092004-01-19 Ulrich Drepper <drepper@redhat.com>
1510
1511 * readelf.c (print_phdr): Show which sections are covered by the
1512 PT_GNU_RELRO entry.
1513
1514 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1515
1516 * readelf.c (print_debug_macinfo_section): Implement.
1517
15182004-01-18 Ulrich Drepper <drepper@redhat.com>
1519
1520 * readelf.c (print_debug_line_section): Implement.
1521
15222004-01-17 Ulrich Drepper <drepper@redhat.com>
1523
1524 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1525 * src/ld.c: Likewise.
1526 * src/nm.c: Likewise.
1527 * src/readelf.c: Likewise.
1528 * src/size.c: Likewise.
1529 * src/strip.c: Likewise.
1530
1531 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1532
1533 * Makefile.am: Support building with mudflap.
1534
15352004-01-16 Ulrich Drepper <drepper@redhat.com>
1536
1537 * readelf.c (print_debug_info_section): Free dies memory.
1538
1539 * readelf.c: Print .debug_info section content.
1540
15412004-01-13 Ulrich Drepper <drepper@redhat.com>
1542
1543 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1544
15452004-01-12 Ulrich Drepper <drepper@redhat.com>
1546
1547 * readelf.c (print_debug_aranges): Implement using libdw.
1548
15492004-01-11 Ulrich Drepper <drepper@redhat.com>
1550
1551 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1552
1553 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1554 behavior is available yet.
1555 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1556
15572004-01-09 Ulrich Drepper <drepper@redhat.com>
1558
1559 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1560
1561 * nm.c: Implement getting information about local variables.
1562
15632004-01-07 Ulrich Drepper <drepper@redhat.com>
1564
1565 * nm.c: Read also debug information for local symbols.
1566
15672004-01-05 Ulrich Drepper <drepper@redhat.com>
1568
1569 * nm.c: Shuffle dwarf handling code around so the maximum column
1570 width can be computed ahead of printing. Avoid collection symbols
1571 which are not printed anyway.
1572
1573 * nm.c: Rewrite dwarf handling to use libdw.
1574 * Makefile.am (AM_CFLAGS): Add -std parameter.
1575 (INCLUDES): Find header in libdw subdir.
1576 (nm_LDADD): Replace libdwarf with libdw.
1577
1578 * elflint.c: Update copyright year.
1579 * readelf.c: Likewise.
1580 * size.c: Likewise.
1581 * strip.c: Likewise.
1582 * nm.c: Likewise.
1583
15842003-12-31 Ulrich Drepper <drepper@redhat.com>
1585
1586 * strip.c (process_file): Close file before returning.
1587
15882003-11-19 Ulrich Drepper <drepper@redhat.com>
1589
1590 * readelf.c (handle_dynamic): Make column for tag name wider.
1591
15922003-09-29 Ulrich Drepper <drepper@redhat.com>
1593
1594 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1595
15962003-09-25 Ulrich Drepper <drepper@redhat.com>
1597
1598 * strip.c (process_file): Don't mmap the input file, we modify the
1599 data structures and don't want the change end up on disk.
1600
16012003-09-23 Jakub Jelinek <jakub@redhat.com>
1602
1603 * unaligned.h (union u_2ubyte_unaligned,
1604 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1605 packed attribute.
1606 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1607 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1608 Read/store value through _ptr->u instead of *_ptr.
1609
16102003-09-22 Ulrich Drepper <drepper@redhat.com>
1611
1612 * size.c (show_sysv): Change type of maxlen to int.
1613
1614 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1615 buckets.
1616
1617 * i386_ld.c: Many many fixes and extensions.
1618 * ld.c: Likewise.
1619 * ldgeneric.c: Likewise.
1620
16212003-08-16 Ulrich Drepper <drepper@redhat.com>
1622
1623 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1624 the reference is from another DSO.
1625
16262003-08-15 Ulrich Drepper <drepper@redhat.com>
1627
1628 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1629 point is found when creating a DSO.
1630
16312003-08-14 Ulrich Drepper <drepper@redhat.com>
1632
1633 * ld.c (main): Always call FLAG_UNRESOLVED.
1634 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1635 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1636
16372003-08-13 Ulrich Drepper <drepper@redhat.com>
1638
1639 * Makefile.in: Depend on libebl.a, not libebl.so.
1640
1641 * ld.c (main): Mark stream for linker script as locked by caller.
1642 (read_version_script): Likewise.
1643 * ldlex.c: Define fread and fwrite to _unlocked variant.
1644
1645 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1646 target_bswap_32.
1647 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1648 target_bswap_64.
1649 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1650 store_8ubyte_unaligned): Define using new macros.
1651
16522003-08-12 Ulrich Drepper <drepper@redhat.com>
1653
1654 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1655 possibly unaligned memory. Support use of big endian machines.
1656
16572003-08-11 Ulrich Drepper <drepper@redhat.com>
1658
1659 * Moved to CVS archive.