blob: 16673f14e358a31422e779223f85d29b11519778 [file] [log] [blame]
Roland McGrath04a14162009-04-14 01:02:17 -070012009-04-14 Roland McGrath <roland@redhat.com>
2
Roland McGratheb9ba472009-04-14 18:44:45 -07003 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
4 like SHT_GNU_ATTRIBUTES.
5
Roland McGrath94f43832009-04-14 04:39:32 -07006 * readelf.c (handle_core_registers): Fix error message.
7
Roland McGrath04a14162009-04-14 01:02:17 -07008 * strip.c (handle_elf: check_preserved): Don't note any change when
9 .debug_data is already filled from a previous pass.
10
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800112009-02-05 Ulrich Drepper <drepper@redhat.com>
12
Ulrich Drepper51b3f472009-02-05 22:10:39 -080013 * objdump.c (show_relocs_x): Minor cleanups.
14
Ulrich Drepper411cdb22009-02-05 22:04:26 -080015 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -080016 Print first DW_CFA_expression and DW_CFA_val_expression parameter
17 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -080018
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800192009-02-01 Ulrich Drepper <drepper@redhat.com>
20
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080021 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
22 into ...
23 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -080024 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080025
Ulrich Dreppercbb422e2009-02-01 18:18:55 -080026 * objdump.c (show_relocs_rela): Show offsets as signed values.
27
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080028 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
29 Improve some error messages.
30 Use program_invocation_short_name instead of AR macro.
31 * Makefile.am (CFLAGS_ar): Remove.
32 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
33 * objdump.c (parse_opt): Likewise.
34 * readelf.c (parse_opt): Likewise.
35
Roland McGrath51f01282009-01-27 17:08:03 -0800362009-01-27 Roland McGrath <roland@redhat.com>
37
38 * readelf.c (print_ops): Notice short length, don't overrun buffer
39 (still need to fix LEB128).
40
41 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
42
43 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
44
Ulrich Drepper62c46532009-01-24 17:01:08 -0800452009-01-24 Ulrich Drepper <drepper@redhat.com>
46
47 * readelf.c (print_debug_frame_section): Fix computation of vma_base
48 for PC-relative mode.
49
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800502009-01-23 Ulrich Drepper <drepper@redhat.com>
51
Ulrich Drepperccccab02009-01-23 16:32:21 -080052 * size.c (process_file): When handling archive, close file descriptor
53 here. For unknown file format also close file descriptor.
54 (handle_ar): Don't close file descriptor here.
55
Ulrich Drepperd7285e12009-01-23 16:10:44 -080056 * readelf.c (parse_opt): Move code to add to dump_data_sections and
57 string_sections list in local function add_dump_section. Adjust 'x'
58 key handling. For 'a' key add .strtab, .dynstr, and .comment section
59 to string_sections list.
60
Roland McGrathe9de9b42009-01-22 13:05:40 -0800612009-01-22 Roland McGrath <roland@redhat.com>
62
Roland McGrath9a847e12009-01-22 19:55:00 -080063 * readelf.c (print_phdr): Don't print section mapping when no sections.
64
Roland McGrathd759aa62009-01-22 19:17:07 -080065 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
66
Roland McGrathcabeeee2009-01-22 13:17:45 -080067 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
68 and reset it only for the 'true' cases.
69
70 * Makefile.am (addr2line_no_Wformat): New variable.
71
Roland McGrathe9de9b42009-01-22 13:05:40 -080072 * readelf.c (print_debug_frame_section): Use t instead of j formats
73 for ptrdiff_t OFFSET.
74
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800752009-01-21 Ulrich Drepper <drepper@redhat.com>
76
77 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -080078 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080079 (check_exception_data): First sanity test.
80
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800812009-01-17 Ulrich Drepper <drepper@redhat.com>
82
Ulrich Drepper935edde2009-01-17 16:06:42 -080083 * readelf.c (print_debug_exception_table): Show target of ar_disp
84 field.
85
86 * elflint.c (check_program_header): Add most consistency checks for
87 PT_GNU_EH_FRAME entry.
88
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080089 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
90 ARGP_PROGRAM_BUG_ADDRESS_DEF.
91 * ar.c: Likewise.
92 * elfcmp.c: Likewise.
93 * elflint.c: Likewise.
94 * findtextrel.c: Likewise.
95 * ld.c: Likewise.
96 * nm.c: Likewise.
97 * objdump.c: Likewise.
98 * ranlib.c: Likewise.
99 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800100
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800101 * size.c: Likewise.
102 * strings.c: Likewise.
103 * strip.c: Likewise.
104 * unstrip.c: Likewise.
105
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001062009-01-16 Ulrich Drepper <drepper@redhat.com>
107
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800108 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
109 matches .eh_frame_hdr section, if it is available. Also check that
110 the segment is allocated, not writable, not executable.
111
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800112 * readelf.c: Add -e option. Dump exception and unwind related
113 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800114 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800115 (print_debug_exception_table): Beginning of support.
116 (print_debug): Hook up print_debug_exception_table for
117 .gcc_except_table sections.
118
119 * readelf.c (print_debug_frame_section): Some fixes for last change.
120
Ulrich Drepper351bf202009-01-15 20:18:40 -08001212009-01-15 Ulrich Drepper <drepper@redhat.com>
122
123 * readelf.c (print_encoding): Now a toplevel function.
124 (print_relinfo): Likewise.
125 (print_encoding_base): Broken out of print_debug_frame_section.
126 (print_debug_frame_section): Print different header for .eh_frame
127 sections. Fix recognition of matching CIEs in .debug_frame sections.
128 Print absolute offset for PC-relative FDE locations. Don't print
129 table header for FDEs if the table is empty.
130 (read_encoded): New function.
131 (print_debug_frame_hdr_section): New function.
132 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
133 sections.
134
135 * readelf.c (handle_relocs_rel): Print section number.
136 (print_debug_abbrev_section): Likewise.
137 (print_debug_aranges_section): Likewise.
138 (print_debug_ranges_section): Likewise.
139 (print_debug_info_section): Likewise.
140 (print_debug_line_section): Likewise.
141 (print_debug_loc_section): Likewise.
142 (print_debug_macinfo_section): Likewise.
143 (print_debug_pubnames_section): Likewise.
144 (print_debug_str_section): Likewise.
145
Ulrich Drepper8b394632009-01-10 18:29:56 -08001462009-01-10 Ulrich Drepper <drepper@redhat.com>
147
148 * strings.c (read_block): Fix typo in error message string.
149
Ulrich Drepper87cf5832009-01-07 20:39:21 -08001502009-01-07 Ulrich Drepper <drepper@redhat.com>
151
152 * ld.c (ld_new_searchdir): Fix adding to search path list.
153
Ulrich Drepperac194d02009-01-06 00:30:01 -08001542009-01-06 Ulrich Drepper <drepper@redhat.com>
155
156 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800157
Roland McGrath3614d992009-01-05 18:05:32 -08001582009-01-05 Roland McGrath <roland@redhat.com>
159
160 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
161 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800162
Ulrich Drepper44173ed2009-01-01 19:00:41 -08001632009-01-01 Ulrich Drepper <drepper@redhat.com>
164
165 * addr2line.c: Update copyright year.
166 * ar.c: Likewise.
167 * elfcmp.c: Likewise.
168 * elflint.c: Likewise.
169 * findtextrel.c: Likewise.
170 * ld.c: Likewise.
171 * nm.c: Likewise.
172 * objdump.c: Likewise.
173 * ranlib.c: Likewise.
174 * readelf.c: Likewise.
175 * size.c: Likewise.
176 * strings.c: Likewise.
177 * strip.c: Likewise.
178 * unstrip.c: Likewise.
179
Roland McGrath468fe4d2008-12-11 21:00:12 -08001802008-12-11 Roland McGrath <roland@redhat.com>
181
182 * nm.c (sym_name): New function.
183 (show_symbols_sysv): Use it in place of elf_strptr.
184 (show_symbols_bsd, show_symbols_posix): Likewise.
185 Fixes RHBZ#476136.
186
187 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
188 elf_strptr fails.
189
Roland McGratha845f682008-12-03 03:41:58 +00001902008-12-02 Roland McGrath <roland@redhat.com>
191
192 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
193 nonzero OFFSET argument to dwfl_getmodules.
194
Roland McGrath1d8bb252008-08-07 08:39:41 +00001952008-08-07 Roland McGrath <roland@redhat.com>
196
197 * addr2line.c (main): Pass string to handle_address.
198 (see_one_module): New function, subroutine of handle_address.
199 (find_symbol): Likewise.
200 (handle_address): Take string argument rather than address.
201 Convert plain number, or handle strings like "(section)+offset"
202 or "symbol+offset".
203
2042008-08-01 Roland McGrath <roland@redhat.com>
205
206 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
207 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
208
209 * readelf.c (convert): Take new argument SIZE.
210 (handle_core_register, handle_core_item): Update callers.
211 (handle_core_item): Take new arg REPEATED_SIZE.
212 (handle_core_items): Special case for a singleton item,
213 let handle_core_item handle repeats if it wants to.
214
215 * readelf.c (handle_core_items): Give abridged output
216 for identical groups repeated more than twice.
217
2182008-07-04 Roland McGrath <roland@redhat.com>
219
220 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
221
Roland McGrath521c47d2008-04-11 07:01:58 +00002222008-04-10 Roland McGrath <roland@redhat.com>
223
224 * strip.c (handle_elf): Don't keep sections that kept symbol tables
225 refer to. Instead, just be sure to preserve the original symbol
226 table in the debug file so those symbols go with their sections and
227 can be elided from the stripped version of the symbol table.
228
229 * strip.c (handle_elf): When a discarded section kept in the debug
230 file refers to a nondiscard section via sh_link/sh_info, preserve
231 that nondiscarded section unmodified in the debug file as well.
232 Skip adjustment of discarded sections symbol table references when
233 that symbol table is copied in this way.
234
235 * elflint.c (check_symtab): Don't crash from missing symbol names
236 after diagnosing bogus strtab.
237
238 * strip.c (handle_elf): Cosmetic cleanup in special section contents
239 adjustment for symtab changes.
240
Roland McGrath13b69602008-04-01 02:30:05 +00002412008-03-31 Roland McGrath <roland@redhat.com>
242
243 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
244 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
245 excuse a special section.
246
2472008-03-27 Roland McGrath <roland@redhat.com>
248
249 * elflint.c (check_sections): Check that executability and writability
250 of sections is reflected in segment p_flags.
251
Roland McGrathd11f9cb2008-03-26 20:51:59 +00002522008-03-26 Roland McGrath <roland@redhat.com>
253
254 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
255 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
256 is valid in RELRO.
257
Roland McGrath47c5c352008-02-29 10:17:16 +00002582008-02-29 Roland McGrath <roland@redhat.com>
259
260 * readelf.c (print_attributes): Add a cast.
261 * elflint.c (check_attributes): Likewise.
262
263 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
264 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
265 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
266
Ulrich Drepper834de6f2008-02-23 06:50:01 +00002672008-02-03 Ulrich Drepper <drepper@redhat.com>
268
269 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
270 when linked into executable.
271 (elf_i386_create_relocations): Likewise.
272
Roland McGrath059c83e2008-02-21 06:19:39 +00002732008-02-20 Roland McGrath <roland@redhat.com>
274
275 * readelf.c (print_attributes): New function.
276 (process_elf_file): Call it under -A.
277
278 * elflint.c (check_attributes): Implement it for real.
279
2802008-02-19 Roland McGrath <roland@redhat.com>
281
282 * elflint.c (special_sections): Handle .gnu.attributes section.
283 (check_sections): Likewise.
284 (check_attributes): New function.
285
2862008-02-10 Roland McGrath <roland@redhat.com>
287
288 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
289 sections and ET_REL files.
290
Ulrich Drepper712d78e2008-02-02 10:01:53 +00002912008-02-02 Ulrich Drepper <drepper@redhat.com>
292
293 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
294 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
295 and R_386_TLS_LE.
296 (elf_i386_create_relocations): Likewise.
297 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
298 elements.
299 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
300 (ld_generic_create_outfile): Add PT_TLS entry to program header.
301 Fix generation of PT_GNU_STACK entry.
302
Ulrich Drepperc54785a2008-02-01 18:05:21 +00003032008-02-01 Ulrich Drepper <drepper@redhat.com>
304
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000305 * ld.c (replace_args): Prevent loop over replacements if the parameter
306 is only two characters long.
307
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000308 * ld.c: Recognize sha1 argument for --build-id parameter.
309 * ldgeneric.c (create_build_id_section): Handle sha1.
310 (compute_hash_sum): New function. Broken out of compute_build_id.
311 Take hash function and context as parameters.
312 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
313 implementation.
314
Ulrich Drepper89759c72008-01-31 19:44:12 +00003152008-01-31 Ulrich Drepper <drepper@redhat.com>
316
317 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
318 * ld.c: Recognize --build-id command line parameter.
319 * ld.h: Define scn_dot_note_gnu_build_id.
320 (struct ld_state): Add build_id and buildidscnidx elements.
321 * ldgeneric.c: Implement --build-id command line parameter.
322 * ldlex.l (ID): Recognize - as valid character after the first one.
323
Ulrich Drepper5530ec52008-01-29 10:42:07 +00003242008-01-29 Ulrich Drepper <drepper@redhat.com>
325
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000326 * ld.c (replace_args): New function.
327 (main): Use it to rewrite old-style parameters.
328
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000329 * elf32-i386.script: Add .gnu.hash section.
330 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
331 (fillin_special_symbol): Initialize st_size.
332 (sortfct_hashval): New function.
333 (create_gnu_hash): New function.
334 (create_hash): New function.
335 (ld_generic_create_outfile): Use the new functions to create the
336 hash tables.
337
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000338 * elflint.c (check_gnu_hash): Fix index value printed in error message.
339
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00003402008-01-24 Ulrich Drepper <drepper@redhat.com>
341
342 * elflint.c (check_group): Check that signature symbol for section
343 group is not an empty string.
344 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
345 section. Start implementation of --hash-style.
346 * i386_ld.c: Likewise.
347 * ld.c: Recognize --hash-style.
348 * ld.h (struct scninfo): Add comdat_group.
349 Add additional parameter to finalize_plt callback.
350
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00003512008-01-22 Ulrich Drepper <drepper@redhat.com>
352
353 * ld.h (struct callbacks): Add initialize_gotplt.
354 (struct scnhead): Add scn_dot_gotplt.
355 (struct ld_state): Add gotpltscnidx.
356 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
357 (elf_i386_initialize_pltrel): Likewise.
358 (elf_i386_initialize_got): There is now a separate .got.plt, so
359 don't do the PLT-related work here. Initialize d_type.
360 (elf_i386_initialize_gotplt): New function.
361 (elf_i386_plt0): Use ud2a after indirect jump.
362 (elf_i386_pic_plt0_entry): Likewise.
363 (elf_i386_finalize_plt): Reference now .got.plt.
364 (elf_i386_count_relocations): For GOT entries which need no relocation
365 don't bump nrel_got.
366 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
367 handling for split .got/.got.plt.
368 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
369 * elf32-i386.script: Sort sections for security. There are no .got
370 input sections. Add .got.plt.
371 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
372 (ld_generic_create_outfile): Initialize .got.plt section.
373 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
374
Ulrich Drepperd9488292008-01-20 16:43:15 +00003752008-01-19 Ulrich Drepper <drepper@redhat.com>
376
377 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
378 symbols are not carried over into statically linked output files.
379 Add dummy entries for more TLS relocations.
380
381 * ld.c (options): Add long names for -( and -).
382
383 * ldgeneric.c (check_definition): For newly found definitions don't
384 mark section as used if symbol is absolute.
385 (extract_from_archive): Only assign archive sequence number the first
386 time the archive is handled. Update ld_state.last_archive_used
387 if any symbol was used. Remove nround variable.
388 (file_process2): When using symbol from an archive, update
389 ld_state.group_start_archive, ld_state.archives, and
390 ld_state.tailarchives.
391 (ld_generic_file_process): If group is not handled anymore, after
392 freeing ELF handles for the archives, clear ld_state.archives and
393 *nextp. Fix wrong logic in recognizing first iteration of group
394 loop. When clearing flags, also clear ld_state.group_start_archive.
395
Ulrich Drepper5eee1222008-01-11 10:12:18 +00003962008-01-11 Ulrich Drepper <drepper@redhat.com>
397
398 * objdump.c (show_disasm): Adjust disassembler format string for
399 removal of %e.
400
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00004012008-01-04 Roland McGrath <roland@redhat.com>
402
Roland McGrath059c83e2008-02-21 06:19:39 +0000403 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
404 a size greater than the items cover means multiple sets of items.
405 (handle_core_note): Update caller.
406
4072008-01-04 Roland McGrath <roland@redhat.com>
408
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000409 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
410
4112008-01-03 Roland McGrath <roland@redhat.com>
412
413 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
414
415 * elflint.c (check_dynamic): Remove duplicate initializer.
416
Ulrich Drepperad024af2008-01-02 17:42:52 +00004172008-01-02 Ulrich Drepper <drepper@redhat.com>
418
419 * addr2line.c: Update copyright year.
420 * ar.c: Likewise.
421 * elfcmp.c: Likewise.
422 * elflint.c: Likewise.
423 * findtextrel.c: Likewise.
424 * ld.c: Likewise.
425 * nm.c: Likewise.
426 * objdump.c: Likewise.
427 * ranlib.c: Likewise.
428 * readelf.c: Likewise.
429 * size.c: Likewise.
430 * strings.c: Likewise.
431 * strip.c: Likewise.
432 * unstrip.c: Likewise.
433
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00004342007-12-30 Ulrich Drepper <drepper@redhat.com>
435
436 * objdump (show_disasm): Use %e after third parameter.
437
4382007-12-21 Ulrich Drepper <drepper@redhat.com>
439
440 * strip.c: Fix wrong parenthesis in a few branch predictions.
441 * strings.c: Likewise.
442
4432007-12-20 Ulrich Drepper <drepper@redhat.com>
444
445 * Makefile.am (DEFS): Add DEBUGPRED.
446 * addr2line.c: Include debugpred.h.
447 * ar.c: Likewise.
448 * elfcmp.c: Likewise.
449 * elflint.c: Likewise.
450 * findtextrel.c: Likewise.
451 * nm.c: Likewise.
452 * objdump.c: Likewise.
453 * ranlib.c: Likewise.
454 * readelf.c: Likewise.
455 * size.c: Likewise.
456 * strings.c: Likewise.
457 * strip.c: Likewise.
458 * unstrip.c: Likewise.
459 * debugpred.h: New file.
460
461 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
462 (handle_relocs_rela): Likewise.
463
464 * readelf.c: Add lots of likely/unlikely.
465
466 * elflint.c: Minor cleanups.
467
Roland McGrath1a2e8f42007-12-15 23:39:34 +00004682007-11-19 Roland McGrath <roland@redhat.com>
469
470 * readelf.c (print_ops): Handle all bad op codes gracefully.
471 Print their numbers instead of just ???.
472
Roland McGrath07a696e2007-11-09 22:44:26 +00004732007-11-09 Roland McGrath <roland@redhat.com>
474
475 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000476 Handle block forms to mean a DWARF expression for DW_AT_allocated,
477 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
478 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
479 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000480
Roland McGrathe4c22ea2007-10-23 13:07:39 +00004812007-10-20 Roland McGrath <roland@redhat.com>
482
483 * unstrip.c (options): Update -R description.
484 (struct symbol): Put symbol details a union with a size_t pointer
485 `duplicate'.
486 (compare_symbols_output): Use null ->name as marker for discard
487 symbols, not zero *->map.
488 (copy_elided_sections): Record forwarding pointers for discarded
489 duplicates and fill SYMNDX_MAP elements through them.
490
491 * readelf.c (process_file): Set offline_next_address to 0 at start.
492 (struct process_dwflmod_args): New type.
493 (process_dwflmod): Take args in it, pass fd to process_elf_file.
494 (process_file): Update caller; dup FD for passing to libdwfl.
495 (process_elf_file): Take new arg FD. For ET_REL file when
496 displaying data affected by libdwfl relocation, open a new Elf handle.
497
4982007-10-17 Roland McGrath <roland@redhat.com>
499
500 * readelf.c (print_debug_line_section): For invalid data inside a
501 unit with plausible length, keep printing at the next unit boundary.
502
503 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
504
5052007-10-16 Roland McGrath <roland@redhat.com>
506
507 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
508
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00005092007-10-15 Roland McGrath <roland@redhat.com>
510
511 * make-debug-archive.in: New file.
512 * Makefile.am (EXTRA_DIST): Add it.
513 (make-debug-archive): New target.
514 (bin_SCRIPTS, CLEANFILES): Add it.
515
5162007-10-10 Roland McGrath <roland@redhat.com>
517
518 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
519 Use it to check MERGE|STRINGS for .debug_str.
520 (check_sections): Handle exact_or_gnuld.
521
5222007-10-08 Roland McGrath <roland@redhat.com>
523
524 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
525 64-bit struct timeval with 32-bit tv_usec.
526
5272007-10-07 Roland McGrath <roland@redhat.com>
528
529 * readelf.c (check_archive_index): New function.
530 (process_file): Call it. Change signature to take only fd and name.
531 Use libdwfl to open the file, then iterate on its modules (multiple
532 for an archive) to print file name and call process_elf_file.
533 (main): Update caller. Let process_file do elf_begin.
534 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
535 (process_elf_file): Take only Dwfl_Module * argument.
536 Don't print the file name here.
537 (print_debug_*_section): Take Dwfl_Module * argument.
538 (print_debug): Likewise. Update caller.
539 (format_dwarf_addr): New function.
540 (print_debug_ranges_section): Use it.
541 (attr_callback): Likewise.
542 (print_debug_line_section, print_debug_loc_section): Likewise.
543
544 * readelf.c (print_debug_ranges_section): Translate all strings.
545 (print_debug_loc_section): Likewise.
546
547 * unstrip.c (copy_elided_sections): Initialize SEC.
548
549 * ar.c (do_oper_insert): Put trailing / on short names.
550
551 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
552
553 * arlib2.c (arlib_add_long_name): Adjust for header size.
554
555 * arlib.c (arlib_finalize): Pad long name table to keep size even.
556
557 * ar.c (do_oper_insert): Use write_retry for padding write.
558
559 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
560 Unconditionally set FOUND[CNT]->elf when setting ->mem.
561 (remember_long_name): New function.
562 (do_oper_insert): Call it. Correctly use length of basename,
563 not original name. Don't store long name twice for new member.
564
5652007-10-06 Roland McGrath <roland@redhat.com>
566
567 * elflint.c (check_note): Skip empty segment.
568 (check_note_section): Skip empty section.
569
570 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
571 (handle_output_dir_module, handle_implicit_modules): Pass it down.
572 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
573 (compare_alloc_sections): Take new arg REL, ignore address if true.
574 (compare_sections): Likewise, pass it down.
575 (compare_sections_rel, compare_sections_nonrel): New functions.
576 (find_alloc_sections_prelink, copy_elided_sections): Use them
577 instead of compare_sections.
578 (sections_match): New function, broken out of ...
579 (find_alloc_section): ... here.
580 (copy_elided_sections): Reorganize section match-up logic.
581 Use sections_match for SHF_ALLOC in ET_REL.
582 For ET_REL, let the nonzero sh_addr from the debug file dominate.
583
584 * unstrip.c (add_new_section_symbols): Take new arg REL.
585 When true, do not update section symbol values.
586 (collect_symbols): Likewise. Update section symbols with address
587 of chosen output section, not original section.
588 (check_symtab_section_symbols, copy_elided_sections): Update callers.
589
590 * unstrip.c (compare_alloc_sections): At the same address, preserve
591 original section order.
592
593 * elflint.c (special_sections): Don't require MERGE|STRINGS for
594 .debug_str, it didn't always have them with older tools.
595
596 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
597
5982007-10-05 Roland McGrath <roland@redhat.com>
599
600 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
601 ET_REL file.
602
603 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
604 SHN_UNDEF as "bad section". Use shndx value in messages.
605
606 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
607 for ".debug" so it matches as a prefix.
608 (IS_KNOWN_SPECIAL): New macro.
609 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
610 type even under -d, for a .debug* or .shstrtab section.
611
612 * readelf.c (print_ops): Use hex for address operand.
613
6142007-10-04 Roland McGrath <roland@redhat.com>
615
616 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
617 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
618 sections mapped to SHN_UNDEF.
619
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00006202007-10-04 Ulrich Drepper <drepper@redhat.com>
621
622 * readelf.c (dump_archive_index): Avoid warning about uninitialized
623 variable with older glibc versions.
624 Add some branch prediction.
625
Roland McGrath59ea7f32007-10-04 08:50:09 +00006262007-10-04 Roland McGrath <roland@redhat.com>
627
628 * readelf.c (print_archive_index): New variable.
629 (options, parse_opt): Accept -c/--archive-index to set it.
630 (dump_archive_index): New function.
631 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
632 Call dump_archive_index on archives if set.
633 (main): Update caller.
634 (any_control_option): Give it file scope, moved out of ...
635 (parse_opt): ... here.
636
6372007-10-03 Roland McGrath <roland@redhat.com>
638
639 * unstrip.c (struct arg_info): Add `list' flag.
640 (options, parse_opt): Grok -n/--list to set it.
641 (list_module): New function.
642 (handle_implicit_modules): Call it under -n.
643
644 * elflint.c (check_note_section): New function.
645 (check_sections): Call it for SHT_NOTE.
646
647 * readelf.c (handle_notes): Use sections when available.
648
649 * elflint.c (check_note_data): New function, broken out of ...
650 (check_note): ... here. Call it and elf_getdata_rawchunk.
651
652 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
653 Use elf_getdata_rawchunk and gelf_getauxv.
654 (handle_notes_data): New function, broken out of ...
655 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
656
Roland McGrath241ac022007-10-01 18:21:46 +00006572007-10-01 Roland McGrath <roland@redhat.com>
658
Roland McGrathac0a16c2007-10-01 18:50:35 +0000659 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
660
Roland McGrath241ac022007-10-01 18:21:46 +0000661 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
662
Roland McGrathc76f0b02007-09-27 07:31:33 +00006632007-09-10 Roland McGrath <roland@redhat.com>
664
665 * readelf.c (options): Give -p optional argument, alias --string-dump.
666 (string_sections, string_sections_tail): New static variables.
667 (parse_opt): Set them when -p has an argument.
668 (print_string_section): New function, broken out of ...
669 (print_strings): ... here. Call it.
670 (dump_data_section): New function, broken out of ...
671 (dump_data): ... here. Call it.
672 (for_each_section_argument): New function, broken out of ...
673 (dump_data): ... here. Call it.
674 (dump_strings): New function.
675
6762007-08-31 Roland McGrath <roland@redhat.com>
677
678 * readelf.c (print_strings): Typo fix.
679
Roland McGrathcb6d8652007-08-23 08:10:54 +00006802007-08-23 Roland McGrath <roland@redhat.com>
681
682 * readelf.c (printf_with_wrap): Function removed.
683 (REGISTER_WRAP_COLUMN): New macro.
684 (handle_core_register): Use print_core_item instead.
685 (struct register_info): New type.
686 (compare_registers, compare_register_sets): New functions.
687 (register_bitpos, compare_sets_by_info): New functions.
688 (handle_core_registers): Use those to segregate and sort registers
689 for display.
690
691 * readelf.c (ITEM_WRAP_COLUMN): New macro.
692 (print_core_item): New function.
693 (handle_core_item): Use it instead of printf_with_wrap.
694 (compare_core_items, compare_core_item_groups): New functions.
695 (handle_core_items): Use them. Sort by group and force line breaks
696 between groups.
697
698 * readelf.c (handle_core_registers, handle_core_items): New functions,
699 broken out of ...
700 (handle_core_note): ... here. Call them.
701
7022007-08-22 Roland McGrath <roland@redhat.com>
703
704 * unstrip.c (new_shstrtab): New function, broken out of ...
705 (copy_elided_sections): ... here.
706
7072007-08-20 Roland McGrath <roland@redhat.com>
708
709 Avoid local function trampolines in nm binary.
710 * nm.c (sort_by_address): Move to a static function instead of local
711 inside show_symbols.
712 (sort_by_name_strtab): New static variable.
713 (sort_by_name): Use it. Move to a static function instead of local
714 inside show_symbols.
715 (show_symbols): Set sort_by_name_strtab.
716
7172007-08-19 Roland McGrath <roland@redhat.com>
718
719 * readelf.c (handle_auxv_note): New function.
720 (handle_notes): Call it.
721
722 * readelf.c (printf_with_wrap, convert): New functions.
723 (handle_core_item, (handle_core_register): New functions.
724 (handle_notes): Call those with details from ebl_core_note.
725
Roland McGrath099dd522007-08-13 22:58:36 +00007262007-08-12 Roland McGrath <roland@redhat.com>
727
728 * elflint.c (check_note): Accept type 0 with name "Linux".
729
730 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
731
732 * elflint.c (section_flags_string): Return "none" for 0, not "".
733
Roland McGrathd8221722007-08-11 21:18:09 +00007342007-08-11 Roland McGrath <roland@redhat.com>
735
736 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
737
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00007382007-08-04 Ulrich Drepper <drepper@redhat.com>
739
740 * readelf.c (hex_dump): Use isprint to determine whether to print
741 character itself or full stop character.
742 (dump_data): No need to check endp for NULL after strtol call.
743
Roland McGrath60fc84c2007-08-03 21:59:15 +00007442007-08-03 Roland McGrath <roland@redhat.com>
745
746 * readelf.c (print_string_sections): New variable.
747 (options, parse_opt): Handle --strings/-p to set it.
748 (print_strings): New function.
749 (process_elf_file): Call it under -p.
750
751 * readelf.c (options): Add hidden aliases --segments, --sections,
752 as taken by binutils readelf.
753
7542007-08-01 Roland McGrath <roland@redhat.com>
755
756 * readelf.c (dump_data_sections, dump_data_sections_tail):
757 New variables.
758 (options, parse_opt): Handle --hex-dump/-x, set them.
759 (hex_dump): New function.
760 (dump_data): New function, call it.
761 (process_elf_file): Call it.
762
7632007-07-25 Roland McGrath <roland@redhat.com>
764
765 * addr2line.c (show_symbols): New variable.
766 (print_addrsym): New function.
767 (handle_address): Call it.
768 (options, parse_opt): Handle -S/--symbols.
769
Ulrich Drepperb0243862007-06-06 00:09:36 +00007702007-06-05 Ulrich Drepper <drepper@redhat.com>
771
772 * addr2line.c: Update for latest autoconf header.
773 * ar.c: Likewise.
774 * elfcmp.c: Likewise.
775 * elflint.c: Likewise.
776 * findtextrel.c: Likewise.
777 * ld.c: Likewise.
778 * ldgeneric.c: Likewise.
779 * nm.c: Likewise.
780 * objdump.c: Likewise.
781 * ranlib.c: Likewise.
782 * readelf.c: Likewise.
783 * size.c: Likewise.
784 * strings.c: Likewise.
785 * strip.c: Likewise.
786 * unstrip.c: Likewise.
787
Roland McGrath9aa8ef72007-05-18 08:59:43 +00007882007-05-18 Roland McGrath <roland@redhat.com>
789
790 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
791 stripped file, so as not to duplicate a section copied in both.
792
793 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
794
7952007-05-17 Roland McGrath <roland@redhat.com>
796
797 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
798
799 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
800
801 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
802 call make_directories here.
803 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
804 (handle_dwfl_module): Likewise.
805 (handle_implicit_modules): Update callers.
806 (handle_output_dir_module): Likewise. Don't do make_directories here.
807
808 * unstrip.c (get_section_name): New function, broken out of ...
809 (copy_elided_sections): here. Update callers.
810 (find_alloc_section): Broken out of ...
811 (copy_elided_sections): ... here. Update caller.
812 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
813 update STT_SECTION symbols' st_value fields as a side effect.
814 (check_symtab_section_symbols): Update caller.
815 (add_new_section_symbols): Set st_value in symbols added.
816 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
817 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
818 from .bss to .dynbss.
819 (find_alloc_sections_prelink): New function. Associate debug file
820 allocated SHT_NOBITS shdrs with stripped moved by prelink via
821 .gnu.prelink_undo information.
822 (copy_elided_sections): Call it when we couldn't find every allocated
823 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
824 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
825 (handle_file): Update callers.
826
827 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
828 named ".comment".
829
830 * elflint.c (check_sections): Fix association of segments with
831 sections when p_memsz > p_filesz.
832
8332007-04-29 Roland McGrath <roland@redhat.com>
834
835 * addr2line.c (options, main): Tweak argp group settings to fix
836 usage output.
837
8382007-04-28 Roland McGrath <roland@redhat.com>
839
840 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
841 sizes to match sections adjusted in the stripped file.
842
Roland McGrath4be15242007-04-25 03:09:33 +00008432007-04-24 Roland McGrath <roland@redhat.com>
844
845 * elfcmp.c (OPT_HASH_INEXACT): New macro.
846 (hash_inexact): New variable.
847 (options, parse_opt): Add --hash-inexact option to set it.
848 (hash_content_equivalent): New function.
849 (main): Call it for differing SHT_HASH sections under --hash-inexact.
850
8512007-04-23 Roland McGrath <roland@redhat.com>
852
853 * unstrip.c: New file.
854 * Makefile.am (bin_PROGRAMS): Add it.
855 (unstrip_LDADD): New variable.
856
857 * strip.c (options): Allow --output for -o.
858
Ulrich Drepper8b383102007-02-16 00:31:57 +00008592007-02-15 Ulrich Drepper <drepper@redhat.com>
860
861 * readelf.c: Remove unused code. Add a few consts.
862
Ulrich Drepper903c1162007-02-15 19:40:37 +00008632007-02-15 Roland McGrath <roland@redhat.com>
864
865 * readelf.c (print_debug): Fix brainos in SHDR test.
866
Roland McGrathf82a1ec2007-02-06 04:47:44 +00008672007-02-05 Roland McGrath <roland@redhat.com>
868
869 * ar.c: Include <limits.h>, since we use LONG_MAX.
870
Ulrich Drepper0fe63532007-02-05 21:05:51 +00008712007-02-05 Ulrich Drepper <drepper@redhat.com>
872
Ulrich Drepper8b383102007-02-16 00:31:57 +0000873 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000874 ignore fchown's return value.
875 (do_oper_insert): Handle error when writing padding.
876 * ranlib.c: Add fchown complain work around.
877
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000878 * arlib.c: Make symtab a global variable. Change all users.
879 * arlib2.c: Likewise.
880 * ranlib.c: Likewise.
881 * ar.c: Likewise.
882 * arlib.h: Declare it.
883
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00008842007-01-11 Roland McGrath <roland@redhat.com>
885
886 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
887 SHF_MASKPROC bits separately from generic sh_flags validation.
888
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00008892007-02-04 Ulrich Drepper <drepper@redhat.com>
890
891 * ar.c: New file.
892 * arlib.c: New file.
893 * arlib2.c: New file.
894 * arlib.h: New file.
895 * Makefile (noinst_LIBRARIES): Add libar.
896 (libar_a_SOURCES): Define.
897 (ar_LDADD): Define.
898 (CFLAGS_ar): Define.
899 * ranlib.c: Change to use arlib.
900
901 * elflint.c (check_symtab): Work around GNU ld bug which omits
902 sections but not symbols in those sections.
903
Ulrich Drepperb770cf92007-01-10 21:02:34 +00009042007-01-10 Ulrich Drepper <drepper@redhat.com>
905
906 * addr2line.c: Update copyright year.
907 * elfcmp.c: Likewise.
908 * elflint.c: Likewise.
909 * findtextrel.c: Likewise.
910 * ld.c: Likewise.
911 * nm.c: Likewise.
912 * objdump.c: Likewise.
913 * ranlib.c: Likewise.
914 * readelf.c: Likewise.
915 * size.c: Likewise.
916 * strings.c: Likewise.
917 * strip.c: Likewise.
918
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00009192006-12-09 Ulrich Drepper <drepper@redhat.com>
920
921 * elflint.c (compare_hash_gnu_hash): New function. Report if the
922 two hash tables have different content (module expected omission
923 of undefined symbols).
924
Roland McGrath8190db62006-12-17 23:56:51 +00009252006-10-31 Roland McGrath <roland@redhat.com>
926
927 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000928 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000929
9302006-09-19 Jakub Jelinek <jakub@redhat.com>
931
932 * strip.c (process_file): Disallow -f on archives.
933
9342006-10-09 Roland McGrath <roland@redhat.com>
935
936 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
937
Roland McGrathc373d852006-10-10 00:25:21 +00009382006-08-29 Roland McGrath <roland@redhat.com>
939
940 * Makefile.am (MAINTAINERCLEANFILES): New variable.
941
942 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
943 Reported by Christian Aichinger <Greek0@gmx.net>.
944
945 * elflint.c (valid_e_machine): Add EM_ALPHA.
946 Reported by Christian Aichinger <Greek0@gmx.net>.
947
Ulrich Drepper231c5902006-08-08 22:00:11 +00009482006-08-08 Ulrich Drepper <drepper@redhat.com>
949
950 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
951 Keep track of which "high DT" entries are present.
952 Check that either old or GNU-style hash table is present.
953 If GNU-style hash table is used a symbol table is mandatory.
954 Check that if any prelink entry is present all of them are.
955 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
956 table if they don't refer to functions.
957
Roland McGrath858b1892006-07-17 08:41:15 +00009582006-07-17 Roland McGrath <roland@redhat.com>
959
960 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
961 (add_version): Likewise for argument.
962 (check_versym): Cast constant to GElf_Versym for comparison.
963
Roland McGrath4ec807e2006-07-13 03:59:46 +00009642006-07-12 Roland McGrath <roland@redhat.com>
965
966 * readelf.c (handle_gnu_hash): Add casts for machines where
967 Elf32_Word != unsigned int.
968
Ulrich Drepperdcf61602006-07-12 19:59:02 +00009692006-07-12 Ulrich Drepper <drepper@redhat.com>
970
971 * elflint.c (check_sysv_hash64): Fix printf format.
972
Ulrich Dreppercc415622006-07-12 19:42:23 +00009732006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000974
Ulrich Dreppercc415622006-07-12 19:42:23 +0000975 * addr2line.c (options): English fix in -f doc string.
976
977 * addr2line.c (use_comp_dir): New variable.
978 (options, parse_opt): Grok -A/--absolute to set it.
979 (handle_address): If set, prepend dwfl_line_comp_dir results to
980 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000981
Ulrich Drepper28ed8952006-07-07 03:43:47 +00009822006-07-06 Ulrich Drepper <drepper@redhat.com>
983
984 * elflint.c: Adjust for latest new hash table format.
985 * readelf.c: Likewise.
986
987 * elflint.c (check_versym): Ignore hidden bit when comparing version
988 numbers.
989
9902006-07-05 Ulrich Drepper <drepper@redhat.com>
991
992 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
993 discarded COMDAT symbols.
994
995 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
996 (elf_i386_create_relocations): Likewise.
997 * ld.h (struct symbol): Add local and hidden bits.
998 * ld.c (create_special_section_symbol): These synthsized symbols
999 are local and hidden.
1000 * ldgeneric.c (file_process2): Check whether input file matches
1001 the emulation.
1002 (fillin_special_symbol): Create symbols as local and/or hidden
1003 if requested.
1004 (ld_generic_create_outfile): Make local copy of symbol.
1005 Don't hide global, defined symbols in dynamic symbol table unless
1006 requested. Synthetic symbols have no version information.
1007
1008 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1009 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1010
10112006-07-04 Ulrich Drepper <drepper@redhat.com>
1012
1013 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1014 testing.
1015
10162006-07-03 Ulrich Drepper <drepper@redhat.com>
1017
1018 * elflint.c: Add testing of DT_GNU_HASH.
1019 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1020
1021 * Makefile.am: Add hacks to create dependency files for non-generic
1022 linker.
1023
Ulrich Drepper6ca46002006-06-12 22:40:23 +000010242006-06-12 Ulrich Drepper <drepper@redhat.com>
1025
1026 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1027 section if creating a DSO and no interpreter is given.
1028 (ld_generic_create_outfile): Don't store reference to symbols in
1029 discarded COMDAT groups. Don't create PHDR and INTERP program header
1030 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001031 (create_verneed_data): Pretty printing.
1032
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001033 * ldscript.y (content): If a DSO is created don't set default
1034 interpreter from linker script.
1035
1036 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1037 for symbols in discarded COMDAT groups.
1038 (elf_i386_create_relocations): Likewise.
1039 * ld.h (struct scninfo): Add unused_comdat.
1040 * ldgeneric.c (add_section): Also check group signature when
1041 matching COMDAT sections.
1042 (add_relocatable_file): Ignore symbols in COMDAT group which are
1043 discarded.
1044
1045 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1046 and symbol reference.
1047
Ulrich Drepper54f33a72006-06-11 09:07:37 +000010482006-06-11 Ulrich Drepper <drepper@redhat.com>
1049
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001050 * elflint.c (check_dynamic): Fix checking value of tags which are
1051 offsets in the string section. Make sure DT_STRTAB points to the
1052 section referenced in sh_link.
1053
1054 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1055
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001056 * ld.c: Recognize --eh-frame-hdr option.
1057 * ld.h (struct ld_state): Add eh_frame_hdr field.
1058 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1059
1060 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1061 SH_FLAGS_COMBINE.
1062 (add_relocatable_file): Minor optimization of last change.
1063 (match_section): Don't preserve SHF_GROUP flag any longer.
1064
Ulrich Drepper2d880282006-06-11 00:20:43 +000010652006-06-10 Ulrich Drepper <drepper@redhat.com>
1066
1067 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001068 Handle record and ignore as position dependent options.
1069 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001070 * ld.h (struct ld_state): Add execstack field.
1071 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1072 sections.
1073 (ld_generic_create_outfile): Fix program header creation in native
1074 linker. Add PT_GNU_STACK program header.
1075
Ulrich Dreppera688a732006-06-10 06:33:00 +000010762006-06-09 Ulrich Drepper <drepper@redhat.com>
1077
1078 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1079 for PLT entries if there is no local definition.
1080
1081 * ld.c (parse_option): Handle -z ignore like --as-needed and
1082 -z record like --no-as-needed.
1083 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1084 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1085 looping over DSOs. When deciding about adding DT_NEEDED entries
1086 use ->as_needed instead of ignore_unused_dsos.
1087
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000010882006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001089
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001090 * ld.c: Recognize --as-needed and --no-as-needed options.
1091 * ld.h (struct usedfile): Add as_needed field.
1092 (struct ld_state): Likewise.
1093 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1094 the list.
1095 * ldscript.y (filename_id_list): Split to correctly parse all
1096 combinations.
1097 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001098
Ulrich Drepper697f4db2006-06-10 06:50:47 +000010992006-05-28 Ulrich Drepper <drepper@redhat.com>
1100
1101 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1102 and colno.
1103
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000011042006-05-27 Ulrich Drepper <drepper@redhat.com>
1105
1106 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001107 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001108
Ulrich Drepper82c345d2006-04-04 22:07:54 +000011092006-04-04 Ulrich Drepper <drepper@redhat.com>
1110
1111 * addr2line.c: Update copyright year.
1112 * elfcmp.c: Likewise.
1113 * elflint.c: Likewise.
1114 * findtextrel.c: Likewise.
1115 * ld.c: Likewise.
1116 * nm.c: Likewise.
1117 * objdump.c: Likewise.
1118 * ranlib.c: Likewise.
1119 * readelf.c: Likewise.
1120 * size.c: Likewise.
1121 * strings.c: Likewise.
1122 * strip.c: Likewise.
1123
Roland McGrathdd7e22b2006-03-09 23:05:47 +000011242006-03-09 Roland McGrath <roland@redhat.com>
1125
1126 * Makefile.am (AM_LDFLAGS): New variable.
1127
Roland McGrath060fa052006-03-02 07:51:50 +000011282006-03-01 Roland McGrath <roland@redhat.com>
1129
1130 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1131 for dwarf.h changes matching 3.0 spec.
1132 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1133
Ulrich Drepper038129b2005-12-04 16:47:24 +000011342005-12-04 Ulrich Drepper <drepper@redhat.com>
1135
1136 * elflint.c (check_one_reloc): If relocation section is not loaded,
1137 don't check whether the relocations modify read-only sections or
1138 loaded and unloaded sections.
1139
Ulrich Drepper607e0542005-12-04 15:51:06 +000011402005-11-28 Ulrich Drepper <drepper@redhat.com>
1141
1142 * elflint.c (check_one_reloc): Take additional parameters. Use
1143 them to determine whether relocation is valid in this type of
1144 file. DSOs and executables can contain relocation sections in
1145 unloaded sections which just show the relocations the linker
1146 applied. Adjust all callers.
1147 (check_program_header): Check that PT_PHDR is loaded and that offset
1148 matches the one in the ELF header.
1149
Roland McGrath6724c902005-10-28 07:07:19 +000011502005-10-26 Roland McGrath <roland@redhat.com>
1151
1152 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1153
Ulrich Drepperd0449522005-09-03 07:23:52 +000011542005-09-03 Ulrich Drepper <drepper@redhat.com>
1155
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001156 * strip.c (handle_elf): Unify some error messages.
1157 * ld.c (main): Likewise.
1158 * ldgeneric.c (open_elf): Likewise.
1159 * elfcmp.c (main): Likewise.
1160 * elflint.c (check_elf_header): Likewise.
1161
1162 * size.c (process_file): Fix typo in error message.
1163
Ulrich Drepperd0449522005-09-03 07:23:52 +00001164 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1165
Ulrich Dreppera60501e2005-09-02 19:50:17 +000011662005-09-02 Ulrich Drepper <drepper@redhat.com>
1167
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001168 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001169 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001170
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000011712005-08-28 Ulrich Drepper <drepper@redhat.com>
1172
1173 * ranlib.c: Don't define pread_retry and write_retry here.
1174
1175 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1176 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1177
1178 * strings.c (process_chunk): Reorder expressions in conditional
1179 (process_chunk_mb): Likewise.
1180
1181 * strings.c: New file.
1182 * Makefile.am (bin_PROGRAMS): Add strings.
1183 (strings_no_Wstring): Define.
1184 (strings_LDADD): Define.
1185
Roland McGrath71e15a02005-08-27 10:33:26 +000011862005-08-27 Roland McGrath <roland@redhat.com>
1187
1188 * addr2line.c (dwarf_diename_integrate): Function removed.
1189 (print_dwarf_function): Use plain dwarf_diename.
1190
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000011912005-08-24 Ulrich Drepper <drepper@redhat.com>
1192
1193 * elflint.c (check_versym): Versioned symbols should not have
1194 local binding.
1195
Ulrich Drepper5d832292005-08-15 21:36:27 +000011962005-08-15 Ulrich Drepper <drepper@redhat.com>
1197
Ulrich Drepper61655e02005-08-16 04:23:02 +00001198 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1199 undefined.
1200
Ulrich Drepper5d832292005-08-15 21:36:27 +00001201 * Makefile.am: Add rules to build ranlib.
1202 * ranlib.c: New file.
1203
Roland McGrath18e13422005-08-15 08:01:25 +000012042005-08-14 Roland McGrath <roland@redhat.com>
1205
1206 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1207 sh_type it recognizes.
1208
1209 * elflint.c (check_sections): Print unknown flags in hex, don't
1210 truncate high bits. Print section number and name for unknown type.
1211
Roland McGrathf6895042005-08-13 20:56:52 +000012122005-08-13 Roland McGrath <roland@redhat.com>
1213
1214 * elflint.c (check_program_header): Use ebl_segment_type_name and
1215 allow any p_type it recognizes. Include p_type value in error
1216 message for unknown type.
1217
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000012182005-08-13 Ulrich Drepper <drepper@redhat.com>
1219
1220 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1221 to ebl_check_special_symbol.
1222 (check_sections): Pass ehdr to ebl_bss_plt_p.
1223
Roland McGrath653d3762005-08-13 01:59:10 +000012242005-08-12 Roland McGrath <roland@redhat.com>
1225
1226 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1227 refers to the right section if it's not SHN_ABS.
1228 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1229
1230 * elflint.c (check_sections): Don't complain about a non-NOBITS
1231 section taking no segment space, if it's sh_size is 0.
1232
1233 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1234 be PROGBITS or NOBITS.
1235
1236 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1237 standard st_value and st_size checks.
1238
Roland McGrath1c83bf12005-08-11 07:03:55 +000012392005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001240
Roland McGrath1c83bf12005-08-11 07:03:55 +00001241 * addr2line.c (options, parse_opt): Don't handle -e here.
1242 (executable): Variable removed.
1243 (argp_children): New static variable.
1244 (argp): Use it. Make const.
1245 (main): Fill in argp_children from dwfl_standard_argp ().
1246 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1247 (print_dwarf_function): New function. Try to figure out inline chain.
1248 (elf_getname): Function removed, libdwfl does it for us.
1249 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1250 Use dwfl_module_addrname instead of elf_getname.
1251 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1252 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1253
12542005-08-10 Ulrich Drepper <drepper@redhat.com>
1255
1256 * strip.c (parse_opt): STATE parameter is now used.
1257 Various little cleanups.
1258
1259 * readelf.c (print_debug_line_section): Correct fallout of renaming
1260 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001261
Roland McGrath8f31c2c2005-08-09 04:58:05 +000012622005-08-08 Roland McGrath <roland@redhat.com>
1263
1264 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1265 with binutils strip. Likewise -d, -S, as aliases for -g.
1266 Likewise ignore -s/--strip-all.
1267
Roland McGrath095a01b2005-08-08 03:49:35 +000012682005-08-07 Roland McGrath <roland@redhat.com>
1269
1270 * strip.c (process_file): Open read-only when using a different output
1271 file.
1272
Ulrich Drepper47be7952005-08-07 04:41:39 +000012732005-08-06 Ulrich Drepper <drepper@redhat.com>
1274
Ulrich Drepper637963b2005-08-07 05:33:07 +00001275 * elflint.c (in_nobits_scn): New function.
1276 (check_versym): Allow references for defined symbols against versions
1277 of other DSOs also for symbols in nobits sections.
1278 Move a few variables around.
1279
Ulrich Drepper47be7952005-08-07 04:41:39 +00001280 * Makefile.am (AM_CFLAGS): Avoid duplication.
1281 Link with statis libs if BUILD_STATIC.
1282
Ulrich Drepperdbace232005-08-06 01:37:23 +000012832005-08-05 Ulrich Drepper <drepper@redhat.com>
1284
1285 * elflint.c: Many, many more tests. Mostly related to symbol
1286 versioning. Those sections should now be completely checked.
1287
1288 * readelf.c (print_dynamic): Use gelf_offscn.
1289
Ulrich Drepperacb89832005-08-04 07:01:49 +000012902005-08-04 Ulrich Drepper <drepper@redhat.com>
1291
1292 * elflint.c: Add lots more tests: more extension symbol table sanity,
1293 versioning section tests, hash table tests. General cleanup.
1294
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000012952005-08-02 Ulrich Drepper <drepper@redhat.com>
1296
Ulrich Drepper8a687742005-08-03 02:24:12 +00001297 * objdump.c: New file.
1298 * Makefile.am (bin_PROGRAMS): Add objdump.
1299 (objdump_LDADD): Define.
1300
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001301 * elflint.c (check_reloc_shdr): New function split out from check_rela
1302 and check_rel.
1303 (check_one_reloc): New function. Likewise.
1304 (check_rela): Use check_reloc_shdr and check_one_reloc.
1305 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001306 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1307 section.
1308 Add checks that relocations against read-only segments are flagged,
1309 that the text relocation flag is not set unnecessarily, and that
1310 relocations in one section are either against loaded or not-loaded
1311 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001312
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000013132005-08-01 Ulrich Drepper <drepper@redhat.com>
1314
1315 * elfcmp.c (main): Ignore section count and section name string table
1316 section index.
1317
Roland McGrathf9ece8a2005-07-28 07:03:04 +000013182005-07-27 Roland McGrath <roland@redhat.com>
1319
1320 * elfcmp.c: Include <locale.h>.
1321
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000013222005-07-27 Ulrich Drepper <drepper@redhat.com>
1323
1324 * elfcmp.c: Print name and index of differing section.
1325
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000013262005-07-24 Ulrich Drepper <drepper@redhat.com>
1327
1328 * elfcmp.c: Implement comparing gaps between sections.
1329
13302005-07-23 Ulrich Drepper <drepper@redhat.com>
1331
1332 * elflint.c: Include libeblP.h instead of libebl.h.
1333 * nm.c: Likewise.
1334 * readelf.c: Likewise.
1335 * elfcmp.c: Likewise.
1336
1337 * elfcmp.c (main): Compare individual ELF header fields, excluding
1338 e_shoff instead of the whole struct at once.
1339 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1340 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1341
13422005-07-22 Ulrich Drepper <drepper@redhat.com>
1343
1344 * elfcmp.c (main): Take empty section into account when comparing
1345 section content.
1346
1347 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1348 using it.
1349
13502005-07-21 Ulrich Drepper <drepper@redhat.com>
1351
1352 * elfcmp.c: New file.
1353 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1354 (elfcmp_LDADD): Define.
1355
1356 * elflint.c (check_rela): Check that copy relocations only reference
1357 object symbols or symbols with unknown type.
1358 (check_rel): Likewise.
1359
13602005-06-08 Roland McGrath <roland@redhat.com>
1361
1362 * readelf.c (print_ops): Add consts.
1363
13642005-05-31 Roland McGrath <roland@redhat.com>
1365
1366 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1367 abbreviations. Print a header line before each CU section.
1368
1369 * readelf.c (print_debug_loc_section): Fix indentation for larger
1370 address size.
1371
13722005-05-30 Roland McGrath <roland@redhat.com>
1373
1374 * readelf.c (print_debug_line_section): Print section offset of each
1375 CU's table, so they are easy to find from seeing the stmt_list value.
1376
1377 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1378 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1379
1380 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1381 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1382
1383 * readelf.c (print_ops): Take different args for indentation control.
1384 (attr_callback): Caller updated.
1385 Grok several more block-form attributes as being location expressions.
1386 For those same attributes with udata forms, format output differently
1387 for location list offset.
1388 (print_debug_loc_section): Implement it for real.
1389
1390 * readelf.c (options): Mention ranges for --debug-dump.
1391 (enum section_e): Add section_ranges.
1392 (parse_opt): Grok "ranges" for -w/--debug-dump.
1393 (print_debug_ranges_section): New function.
1394 (print_debug): Handle .debug_ranges section.
1395
13962005-05-30 Ulrich Drepper <drepper@redhat.com>
1397
1398 * readelf.c (handle_notes): At least x86-64 need not have the note
1399 section values aligned to 8 bytes.
1400
14012005-05-18 Ulrich Drepper <drepper@redhat.com>
1402
1403 * readelf.c (dwarf_tag_string): Add new tags.
1404
14052005-05-08 Roland McGrath <roland@redhat.com>
1406
1407 * strip.c (handle_elf): Don't translate hash and versym data formats,
1408 elf_getdata already did it for us.
1409
14102005-05-07 Ulrich Drepper <drepper@redhat.com>
1411
1412 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1413 (addr2line_LDADD): Likewise.
1414
14152005-05-03 Roland McGrath <roland@redhat.com>
1416
1417 * strip.c (handle_elf): Apply symbol table fixups to discarded
1418 relocation sections when they are being saved in the debug file.
1419
1420 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1421 and gelf_xlatetof, not the native byte order.
1422
1423 * strip.c (parse_opt): Give error if -f or -o is repeated.
1424 (main): Exit if argp_parse returns nonzero.
1425
1426 * strip.c (debug_fname_embed): New variable.
1427 (options, parse_opt): New option -F to set it.
1428
14292005-05-07 Ulrich Drepper <drepper@redhat.com>
1430
1431 * readelf.c (parse_opt): Make any_control_option variable
1432 local. Simplify some tests.
1433
14342005-05-03 Roland McGrath <roland@redhat.com>
1435
1436 * strip.c (crc32_file): Function removed (now in ../lib).
1437
14382005-05-03 Roland McGrath <roland@redhat.com>
1439
1440 * elflint.c (is_debuginfo): New variable.
1441 (options, parse_opt): New option --debuginfo/-d to set it.
1442 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1443 (check_note): If is_debuginfo, don't try to get note contents.
1444
14452005-04-24 Ulrich Drepper <drepper@redhat.com>
1446
1447 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1448 section reached.
1449
14502005-04-14 Ulrich Drepper <drepper@redhat.com>
1451
1452 * readelf.c (dwarf_encoding_string): New function.
1453 (dwarf_inline_string): New function.
1454 (dwarf_access_string): New function.
1455 (dwarf_visibility_string): New function.
1456 (dwarf_virtuality_string): New function.
1457 (dwarf_identifier_case_string): New function.
1458 (dwarf_calling_convention_string): New function.
1459 (dwarf_ordering_string): New function.
1460 (dwarf_discr_list_string): New function.
1461 (attr_callback): Decode man more attribute values.
1462
14632005-04-01 Ulrich Drepper <drepper@redhat.com>
1464
1465 * addr2line.c: Finish implementation of -f option.
1466
14672005-03-29 Ulrich Drepper <drepper@redhat.com>
1468
1469 * addr2line.c: New file.
1470 * Makefile.am (bin_PROGRAMS): Add addr2line.
1471 Define addr2line_LDADD.
1472
1473 * findtextrel.c: Use new dwarf_addrdie function.
1474
1475 * findtextrel.c: Fix usage message and re-add accidentally removed
1476 line.
1477
14782005-03-28 Ulrich Drepper <drepper@redhat.com>
1479
1480 * findtextrel.c: New file.
1481 * Makefile: Add rules to build findtextrel.
1482
14832005-02-15 Ulrich Drepper <drepper@redhat.com>
1484
1485 * ldlex.l: Provide ECHO definition to avoid warning.
1486
1487 * elflint.c (check_program_header): Fix typo in RELRO test.
1488
1489 * Makefile.am (AM_CFLAGS): Add more warning options.
1490 * elflint.c: Fix warnings introduced by the new warning options.
1491 * i386_ld.c: Likewise.
1492 * ld.c: Likewise.
1493 * ld.h: Likewise.
1494 * ldgeneric.c: Likewise.
1495 * nm.c: Likewise.
1496 * readelf.c: Likewise.
1497 * sectionhash.c: Likewise.
1498 * size.c: Likewise.
1499 * string.c: Likewise.
1500
15012005-02-05 Ulrich Drepper <drepper@redhat.com>
1502
1503 * Makefile.am: Check for text relocations in constructed DSOs.
1504
1505 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1506 with -lmudflap.
1507
1508 * ldscript.y: Add as_needed handling.
1509 * ldlex.l: Recognize AS_NEEDED token.
1510 * ld.h (struct filename_list): Add as_needed flag.
1511
15122005-02-04 Ulrich Drepper <drepper@redhat.com>
1513
1514 * elflint.c (check_symtab): Correctly determine size of GOT section.
1515
15162005-01-19 Ulrich Drepper <drepper@redhat.com>
1517
1518 * ld.c: Remove unnecessary more_help function. Print bug report
1519 address using argp.
1520 * strip.c: Likewise.
1521 * size.c: Likewise.
1522 * nm.c: Likewise.
1523 * readelf.c: Likewise.
1524 * elflint.c: Likewise.
1525
1526 * elflint.c (main): Don't check for parameter problems here.
1527 (parse_opt): Do it here, where we get informed about some of them
1528 anyway.
1529
1530 * readelf.c (main): Don't check for parameter problems here.
1531 (parse_opt): Do it here, where we get informed about some of them
1532 anyway.
1533
15342005-01-11 Ulrich Drepper <drepper@redhat.com>
1535
1536 * strip.c: Update copyright year.
1537 * readelf.c: Likewise.
1538 * size.c: Likewise.
1539 * nm.c: Likewise.
1540 * ld.c: Likewise.
1541 * elflint.c: Likewise.
1542
1543 * elflint.c (check_symtab): Don't warn about wrong size for
1544 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1545
15462004-10-05 Ulrich Drepper <drepper@redhat.com>
1547
1548 * readelf.c (print_phdr): In section mapping, also indicate
1549 sections in read-only segments.
1550
15512004-09-25 Ulrich Drepper <drepper@redhat.com>
1552
1553 * readelf.c: Make compile with gcc 4.0.
1554 * strip.c: Likewise.
1555
15562004-08-16 Ulrich Drepper <drepper@redhat.com>
1557
1558 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1559 allocate to work around gcc 3.4 bug.
1560
15612004-01-25 Ulrich Drepper <drepper@redhat.com>
1562
1563 * ldlex.l (invalid_char): Better error message.
1564
15652004-01-23 Ulrich Drepper <drepper@redhat.com>
1566
1567 * readelf.c: Print SHT_GNU_LIBLIST sections.
1568
1569 * none_ld.c: New file.
1570
15712004-01-21 Ulrich Drepper <drepper@redhat.com>
1572
1573 * Makefile.am: Enable building of machine specific linker.
1574
15752004-01-20 Ulrich Drepper <drepper@redhat.com>
1576
1577 * Makefile.am: Support building with mudflap.
1578
1579 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1580 * ldgeneric.c: Likewise.
1581 * ldscript.y: Likewise.
1582 * readelf.c: Likewise.
1583 * strip.c: Likewise.
1584
1585 * readelf.c (print_debug_line_section): Determine address size
1586 correctly.
1587
15882004-01-19 Ulrich Drepper <drepper@redhat.com>
1589
1590 * readelf.c (print_phdr): Show which sections are covered by the
1591 PT_GNU_RELRO entry.
1592
1593 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1594
1595 * readelf.c (print_debug_macinfo_section): Implement.
1596
15972004-01-18 Ulrich Drepper <drepper@redhat.com>
1598
1599 * readelf.c (print_debug_line_section): Implement.
1600
16012004-01-17 Ulrich Drepper <drepper@redhat.com>
1602
1603 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1604 * src/ld.c: Likewise.
1605 * src/nm.c: Likewise.
1606 * src/readelf.c: Likewise.
1607 * src/size.c: Likewise.
1608 * src/strip.c: Likewise.
1609
1610 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1611
1612 * Makefile.am: Support building with mudflap.
1613
16142004-01-16 Ulrich Drepper <drepper@redhat.com>
1615
1616 * readelf.c (print_debug_info_section): Free dies memory.
1617
1618 * readelf.c: Print .debug_info section content.
1619
16202004-01-13 Ulrich Drepper <drepper@redhat.com>
1621
1622 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1623
16242004-01-12 Ulrich Drepper <drepper@redhat.com>
1625
1626 * readelf.c (print_debug_aranges): Implement using libdw.
1627
16282004-01-11 Ulrich Drepper <drepper@redhat.com>
1629
1630 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1631
1632 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1633 behavior is available yet.
1634 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1635
16362004-01-09 Ulrich Drepper <drepper@redhat.com>
1637
1638 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1639
1640 * nm.c: Implement getting information about local variables.
1641
16422004-01-07 Ulrich Drepper <drepper@redhat.com>
1643
1644 * nm.c: Read also debug information for local symbols.
1645
16462004-01-05 Ulrich Drepper <drepper@redhat.com>
1647
1648 * nm.c: Shuffle dwarf handling code around so the maximum column
1649 width can be computed ahead of printing. Avoid collection symbols
1650 which are not printed anyway.
1651
1652 * nm.c: Rewrite dwarf handling to use libdw.
1653 * Makefile.am (AM_CFLAGS): Add -std parameter.
1654 (INCLUDES): Find header in libdw subdir.
1655 (nm_LDADD): Replace libdwarf with libdw.
1656
1657 * elflint.c: Update copyright year.
1658 * readelf.c: Likewise.
1659 * size.c: Likewise.
1660 * strip.c: Likewise.
1661 * nm.c: Likewise.
1662
16632003-12-31 Ulrich Drepper <drepper@redhat.com>
1664
1665 * strip.c (process_file): Close file before returning.
1666
16672003-11-19 Ulrich Drepper <drepper@redhat.com>
1668
1669 * readelf.c (handle_dynamic): Make column for tag name wider.
1670
16712003-09-29 Ulrich Drepper <drepper@redhat.com>
1672
1673 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1674
16752003-09-25 Ulrich Drepper <drepper@redhat.com>
1676
1677 * strip.c (process_file): Don't mmap the input file, we modify the
1678 data structures and don't want the change end up on disk.
1679
16802003-09-23 Jakub Jelinek <jakub@redhat.com>
1681
1682 * unaligned.h (union u_2ubyte_unaligned,
1683 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1684 packed attribute.
1685 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1686 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1687 Read/store value through _ptr->u instead of *_ptr.
1688
16892003-09-22 Ulrich Drepper <drepper@redhat.com>
1690
1691 * size.c (show_sysv): Change type of maxlen to int.
1692
1693 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1694 buckets.
1695
1696 * i386_ld.c: Many many fixes and extensions.
1697 * ld.c: Likewise.
1698 * ldgeneric.c: Likewise.
1699
17002003-08-16 Ulrich Drepper <drepper@redhat.com>
1701
1702 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1703 the reference is from another DSO.
1704
17052003-08-15 Ulrich Drepper <drepper@redhat.com>
1706
1707 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1708 point is found when creating a DSO.
1709
17102003-08-14 Ulrich Drepper <drepper@redhat.com>
1711
1712 * ld.c (main): Always call FLAG_UNRESOLVED.
1713 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1714 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1715
17162003-08-13 Ulrich Drepper <drepper@redhat.com>
1717
1718 * Makefile.in: Depend on libebl.a, not libebl.so.
1719
1720 * ld.c (main): Mark stream for linker script as locked by caller.
1721 (read_version_script): Likewise.
1722 * ldlex.c: Define fread and fwrite to _unlocked variant.
1723
1724 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1725 target_bswap_32.
1726 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1727 target_bswap_64.
1728 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1729 store_8ubyte_unaligned): Define using new macros.
1730
17312003-08-12 Ulrich Drepper <drepper@redhat.com>
1732
1733 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1734 possibly unaligned memory. Support use of big endian machines.
1735
17362003-08-11 Ulrich Drepper <drepper@redhat.com>
1737
1738 * Moved to CVS archive.