blob: 1bbc075a3417a35941193c059348e82d6e59382b [file] [log] [blame]
Roland McGrath04a14162009-04-14 01:02:17 -070012009-04-14 Roland McGrath <roland@redhat.com>
2
Roland McGrath94f43832009-04-14 04:39:32 -07003 * readelf.c (handle_core_registers): Fix error message.
4
Roland McGrath04a14162009-04-14 01:02:17 -07005 * strip.c (handle_elf: check_preserved): Don't note any change when
6 .debug_data is already filled from a previous pass.
7
Ulrich Drepper411cdb22009-02-05 22:04:26 -080082009-02-05 Ulrich Drepper <drepper@redhat.com>
9
Ulrich Drepper51b3f472009-02-05 22:10:39 -080010 * objdump.c (show_relocs_x): Minor cleanups.
11
Ulrich Drepper411cdb22009-02-05 22:04:26 -080012 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -080013 Print first DW_CFA_expression and DW_CFA_val_expression parameter
14 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -080015
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800162009-02-01 Ulrich Drepper <drepper@redhat.com>
17
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080018 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
19 into ...
20 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -080021 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080022
Ulrich Dreppercbb422e2009-02-01 18:18:55 -080023 * objdump.c (show_relocs_rela): Show offsets as signed values.
24
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080025 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
26 Improve some error messages.
27 Use program_invocation_short_name instead of AR macro.
28 * Makefile.am (CFLAGS_ar): Remove.
29 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
30 * objdump.c (parse_opt): Likewise.
31 * readelf.c (parse_opt): Likewise.
32
Roland McGrath51f01282009-01-27 17:08:03 -0800332009-01-27 Roland McGrath <roland@redhat.com>
34
35 * readelf.c (print_ops): Notice short length, don't overrun buffer
36 (still need to fix LEB128).
37
38 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
39
40 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
41
Ulrich Drepper62c46532009-01-24 17:01:08 -0800422009-01-24 Ulrich Drepper <drepper@redhat.com>
43
44 * readelf.c (print_debug_frame_section): Fix computation of vma_base
45 for PC-relative mode.
46
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800472009-01-23 Ulrich Drepper <drepper@redhat.com>
48
Ulrich Drepperccccab02009-01-23 16:32:21 -080049 * size.c (process_file): When handling archive, close file descriptor
50 here. For unknown file format also close file descriptor.
51 (handle_ar): Don't close file descriptor here.
52
Ulrich Drepperd7285e12009-01-23 16:10:44 -080053 * readelf.c (parse_opt): Move code to add to dump_data_sections and
54 string_sections list in local function add_dump_section. Adjust 'x'
55 key handling. For 'a' key add .strtab, .dynstr, and .comment section
56 to string_sections list.
57
Roland McGrathe9de9b42009-01-22 13:05:40 -0800582009-01-22 Roland McGrath <roland@redhat.com>
59
Roland McGrath9a847e12009-01-22 19:55:00 -080060 * readelf.c (print_phdr): Don't print section mapping when no sections.
61
Roland McGrathd759aa62009-01-22 19:17:07 -080062 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
63
Roland McGrathcabeeee2009-01-22 13:17:45 -080064 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
65 and reset it only for the 'true' cases.
66
67 * Makefile.am (addr2line_no_Wformat): New variable.
68
Roland McGrathe9de9b42009-01-22 13:05:40 -080069 * readelf.c (print_debug_frame_section): Use t instead of j formats
70 for ptrdiff_t OFFSET.
71
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800722009-01-21 Ulrich Drepper <drepper@redhat.com>
73
74 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -080075 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -080076 (check_exception_data): First sanity test.
77
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800782009-01-17 Ulrich Drepper <drepper@redhat.com>
79
Ulrich Drepper935edde2009-01-17 16:06:42 -080080 * readelf.c (print_debug_exception_table): Show target of ar_disp
81 field.
82
83 * elflint.c (check_program_header): Add most consistency checks for
84 PT_GNU_EH_FRAME entry.
85
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080086 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
87 ARGP_PROGRAM_BUG_ADDRESS_DEF.
88 * ar.c: Likewise.
89 * elfcmp.c: Likewise.
90 * elflint.c: Likewise.
91 * findtextrel.c: Likewise.
92 * ld.c: Likewise.
93 * nm.c: Likewise.
94 * objdump.c: Likewise.
95 * ranlib.c: Likewise.
96 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -080097
Ulrich Drepperfdc93e12009-01-17 11:47:10 -080098 * size.c: Likewise.
99 * strings.c: Likewise.
100 * strip.c: Likewise.
101 * unstrip.c: Likewise.
102
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001032009-01-16 Ulrich Drepper <drepper@redhat.com>
104
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800105 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
106 matches .eh_frame_hdr section, if it is available. Also check that
107 the segment is allocated, not writable, not executable.
108
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800109 * readelf.c: Add -e option. Dump exception and unwind related
110 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800111 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800112 (print_debug_exception_table): Beginning of support.
113 (print_debug): Hook up print_debug_exception_table for
114 .gcc_except_table sections.
115
116 * readelf.c (print_debug_frame_section): Some fixes for last change.
117
Ulrich Drepper351bf202009-01-15 20:18:40 -08001182009-01-15 Ulrich Drepper <drepper@redhat.com>
119
120 * readelf.c (print_encoding): Now a toplevel function.
121 (print_relinfo): Likewise.
122 (print_encoding_base): Broken out of print_debug_frame_section.
123 (print_debug_frame_section): Print different header for .eh_frame
124 sections. Fix recognition of matching CIEs in .debug_frame sections.
125 Print absolute offset for PC-relative FDE locations. Don't print
126 table header for FDEs if the table is empty.
127 (read_encoded): New function.
128 (print_debug_frame_hdr_section): New function.
129 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
130 sections.
131
132 * readelf.c (handle_relocs_rel): Print section number.
133 (print_debug_abbrev_section): Likewise.
134 (print_debug_aranges_section): Likewise.
135 (print_debug_ranges_section): Likewise.
136 (print_debug_info_section): Likewise.
137 (print_debug_line_section): Likewise.
138 (print_debug_loc_section): Likewise.
139 (print_debug_macinfo_section): Likewise.
140 (print_debug_pubnames_section): Likewise.
141 (print_debug_str_section): Likewise.
142
Ulrich Drepper8b394632009-01-10 18:29:56 -08001432009-01-10 Ulrich Drepper <drepper@redhat.com>
144
145 * strings.c (read_block): Fix typo in error message string.
146
Ulrich Drepper87cf5832009-01-07 20:39:21 -08001472009-01-07 Ulrich Drepper <drepper@redhat.com>
148
149 * ld.c (ld_new_searchdir): Fix adding to search path list.
150
Ulrich Drepperac194d02009-01-06 00:30:01 -08001512009-01-06 Ulrich Drepper <drepper@redhat.com>
152
153 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800154
Roland McGrath3614d992009-01-05 18:05:32 -08001552009-01-05 Roland McGrath <roland@redhat.com>
156
157 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
158 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800159
Ulrich Drepper44173ed2009-01-01 19:00:41 -08001602009-01-01 Ulrich Drepper <drepper@redhat.com>
161
162 * addr2line.c: Update copyright year.
163 * ar.c: Likewise.
164 * elfcmp.c: Likewise.
165 * elflint.c: Likewise.
166 * findtextrel.c: Likewise.
167 * ld.c: Likewise.
168 * nm.c: Likewise.
169 * objdump.c: Likewise.
170 * ranlib.c: Likewise.
171 * readelf.c: Likewise.
172 * size.c: Likewise.
173 * strings.c: Likewise.
174 * strip.c: Likewise.
175 * unstrip.c: Likewise.
176
Roland McGrath468fe4d2008-12-11 21:00:12 -08001772008-12-11 Roland McGrath <roland@redhat.com>
178
179 * nm.c (sym_name): New function.
180 (show_symbols_sysv): Use it in place of elf_strptr.
181 (show_symbols_bsd, show_symbols_posix): Likewise.
182 Fixes RHBZ#476136.
183
184 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
185 elf_strptr fails.
186
Roland McGratha845f682008-12-03 03:41:58 +00001872008-12-02 Roland McGrath <roland@redhat.com>
188
189 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
190 nonzero OFFSET argument to dwfl_getmodules.
191
Roland McGrath1d8bb252008-08-07 08:39:41 +00001922008-08-07 Roland McGrath <roland@redhat.com>
193
194 * addr2line.c (main): Pass string to handle_address.
195 (see_one_module): New function, subroutine of handle_address.
196 (find_symbol): Likewise.
197 (handle_address): Take string argument rather than address.
198 Convert plain number, or handle strings like "(section)+offset"
199 or "symbol+offset".
200
2012008-08-01 Roland McGrath <roland@redhat.com>
202
203 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
204 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
205
206 * readelf.c (convert): Take new argument SIZE.
207 (handle_core_register, handle_core_item): Update callers.
208 (handle_core_item): Take new arg REPEATED_SIZE.
209 (handle_core_items): Special case for a singleton item,
210 let handle_core_item handle repeats if it wants to.
211
212 * readelf.c (handle_core_items): Give abridged output
213 for identical groups repeated more than twice.
214
2152008-07-04 Roland McGrath <roland@redhat.com>
216
217 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
218
Roland McGrath521c47d2008-04-11 07:01:58 +00002192008-04-10 Roland McGrath <roland@redhat.com>
220
221 * strip.c (handle_elf): Don't keep sections that kept symbol tables
222 refer to. Instead, just be sure to preserve the original symbol
223 table in the debug file so those symbols go with their sections and
224 can be elided from the stripped version of the symbol table.
225
226 * strip.c (handle_elf): When a discarded section kept in the debug
227 file refers to a nondiscard section via sh_link/sh_info, preserve
228 that nondiscarded section unmodified in the debug file as well.
229 Skip adjustment of discarded sections symbol table references when
230 that symbol table is copied in this way.
231
232 * elflint.c (check_symtab): Don't crash from missing symbol names
233 after diagnosing bogus strtab.
234
235 * strip.c (handle_elf): Cosmetic cleanup in special section contents
236 adjustment for symtab changes.
237
Roland McGrath13b69602008-04-01 02:30:05 +00002382008-03-31 Roland McGrath <roland@redhat.com>
239
240 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
241 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
242 excuse a special section.
243
2442008-03-27 Roland McGrath <roland@redhat.com>
245
246 * elflint.c (check_sections): Check that executability and writability
247 of sections is reflected in segment p_flags.
248
Roland McGrathd11f9cb2008-03-26 20:51:59 +00002492008-03-26 Roland McGrath <roland@redhat.com>
250
251 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
252 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
253 is valid in RELRO.
254
Roland McGrath47c5c352008-02-29 10:17:16 +00002552008-02-29 Roland McGrath <roland@redhat.com>
256
257 * readelf.c (print_attributes): Add a cast.
258 * elflint.c (check_attributes): Likewise.
259
260 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
261 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
262 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
263
Ulrich Drepper834de6f2008-02-23 06:50:01 +00002642008-02-03 Ulrich Drepper <drepper@redhat.com>
265
266 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
267 when linked into executable.
268 (elf_i386_create_relocations): Likewise.
269
Roland McGrath059c83e2008-02-21 06:19:39 +00002702008-02-20 Roland McGrath <roland@redhat.com>
271
272 * readelf.c (print_attributes): New function.
273 (process_elf_file): Call it under -A.
274
275 * elflint.c (check_attributes): Implement it for real.
276
2772008-02-19 Roland McGrath <roland@redhat.com>
278
279 * elflint.c (special_sections): Handle .gnu.attributes section.
280 (check_sections): Likewise.
281 (check_attributes): New function.
282
2832008-02-10 Roland McGrath <roland@redhat.com>
284
285 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
286 sections and ET_REL files.
287
Ulrich Drepper712d78e2008-02-02 10:01:53 +00002882008-02-02 Ulrich Drepper <drepper@redhat.com>
289
290 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
291 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
292 and R_386_TLS_LE.
293 (elf_i386_create_relocations): Likewise.
294 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
295 elements.
296 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
297 (ld_generic_create_outfile): Add PT_TLS entry to program header.
298 Fix generation of PT_GNU_STACK entry.
299
Ulrich Drepperc54785a2008-02-01 18:05:21 +00003002008-02-01 Ulrich Drepper <drepper@redhat.com>
301
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000302 * ld.c (replace_args): Prevent loop over replacements if the parameter
303 is only two characters long.
304
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000305 * ld.c: Recognize sha1 argument for --build-id parameter.
306 * ldgeneric.c (create_build_id_section): Handle sha1.
307 (compute_hash_sum): New function. Broken out of compute_build_id.
308 Take hash function and context as parameters.
309 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
310 implementation.
311
Ulrich Drepper89759c72008-01-31 19:44:12 +00003122008-01-31 Ulrich Drepper <drepper@redhat.com>
313
314 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
315 * ld.c: Recognize --build-id command line parameter.
316 * ld.h: Define scn_dot_note_gnu_build_id.
317 (struct ld_state): Add build_id and buildidscnidx elements.
318 * ldgeneric.c: Implement --build-id command line parameter.
319 * ldlex.l (ID): Recognize - as valid character after the first one.
320
Ulrich Drepper5530ec52008-01-29 10:42:07 +00003212008-01-29 Ulrich Drepper <drepper@redhat.com>
322
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000323 * ld.c (replace_args): New function.
324 (main): Use it to rewrite old-style parameters.
325
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000326 * elf32-i386.script: Add .gnu.hash section.
327 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
328 (fillin_special_symbol): Initialize st_size.
329 (sortfct_hashval): New function.
330 (create_gnu_hash): New function.
331 (create_hash): New function.
332 (ld_generic_create_outfile): Use the new functions to create the
333 hash tables.
334
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000335 * elflint.c (check_gnu_hash): Fix index value printed in error message.
336
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00003372008-01-24 Ulrich Drepper <drepper@redhat.com>
338
339 * elflint.c (check_group): Check that signature symbol for section
340 group is not an empty string.
341 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
342 section. Start implementation of --hash-style.
343 * i386_ld.c: Likewise.
344 * ld.c: Recognize --hash-style.
345 * ld.h (struct scninfo): Add comdat_group.
346 Add additional parameter to finalize_plt callback.
347
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00003482008-01-22 Ulrich Drepper <drepper@redhat.com>
349
350 * ld.h (struct callbacks): Add initialize_gotplt.
351 (struct scnhead): Add scn_dot_gotplt.
352 (struct ld_state): Add gotpltscnidx.
353 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
354 (elf_i386_initialize_pltrel): Likewise.
355 (elf_i386_initialize_got): There is now a separate .got.plt, so
356 don't do the PLT-related work here. Initialize d_type.
357 (elf_i386_initialize_gotplt): New function.
358 (elf_i386_plt0): Use ud2a after indirect jump.
359 (elf_i386_pic_plt0_entry): Likewise.
360 (elf_i386_finalize_plt): Reference now .got.plt.
361 (elf_i386_count_relocations): For GOT entries which need no relocation
362 don't bump nrel_got.
363 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
364 handling for split .got/.got.plt.
365 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
366 * elf32-i386.script: Sort sections for security. There are no .got
367 input sections. Add .got.plt.
368 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
369 (ld_generic_create_outfile): Initialize .got.plt section.
370 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
371
Ulrich Drepperd9488292008-01-20 16:43:15 +00003722008-01-19 Ulrich Drepper <drepper@redhat.com>
373
374 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
375 symbols are not carried over into statically linked output files.
376 Add dummy entries for more TLS relocations.
377
378 * ld.c (options): Add long names for -( and -).
379
380 * ldgeneric.c (check_definition): For newly found definitions don't
381 mark section as used if symbol is absolute.
382 (extract_from_archive): Only assign archive sequence number the first
383 time the archive is handled. Update ld_state.last_archive_used
384 if any symbol was used. Remove nround variable.
385 (file_process2): When using symbol from an archive, update
386 ld_state.group_start_archive, ld_state.archives, and
387 ld_state.tailarchives.
388 (ld_generic_file_process): If group is not handled anymore, after
389 freeing ELF handles for the archives, clear ld_state.archives and
390 *nextp. Fix wrong logic in recognizing first iteration of group
391 loop. When clearing flags, also clear ld_state.group_start_archive.
392
Ulrich Drepper5eee1222008-01-11 10:12:18 +00003932008-01-11 Ulrich Drepper <drepper@redhat.com>
394
395 * objdump.c (show_disasm): Adjust disassembler format string for
396 removal of %e.
397
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00003982008-01-04 Roland McGrath <roland@redhat.com>
399
Roland McGrath059c83e2008-02-21 06:19:39 +0000400 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
401 a size greater than the items cover means multiple sets of items.
402 (handle_core_note): Update caller.
403
4042008-01-04 Roland McGrath <roland@redhat.com>
405
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000406 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
407
4082008-01-03 Roland McGrath <roland@redhat.com>
409
410 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
411
412 * elflint.c (check_dynamic): Remove duplicate initializer.
413
Ulrich Drepperad024af2008-01-02 17:42:52 +00004142008-01-02 Ulrich Drepper <drepper@redhat.com>
415
416 * addr2line.c: Update copyright year.
417 * ar.c: Likewise.
418 * elfcmp.c: Likewise.
419 * elflint.c: Likewise.
420 * findtextrel.c: Likewise.
421 * ld.c: Likewise.
422 * nm.c: Likewise.
423 * objdump.c: Likewise.
424 * ranlib.c: Likewise.
425 * readelf.c: Likewise.
426 * size.c: Likewise.
427 * strings.c: Likewise.
428 * strip.c: Likewise.
429 * unstrip.c: Likewise.
430
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00004312007-12-30 Ulrich Drepper <drepper@redhat.com>
432
433 * objdump (show_disasm): Use %e after third parameter.
434
4352007-12-21 Ulrich Drepper <drepper@redhat.com>
436
437 * strip.c: Fix wrong parenthesis in a few branch predictions.
438 * strings.c: Likewise.
439
4402007-12-20 Ulrich Drepper <drepper@redhat.com>
441
442 * Makefile.am (DEFS): Add DEBUGPRED.
443 * addr2line.c: Include debugpred.h.
444 * ar.c: Likewise.
445 * elfcmp.c: Likewise.
446 * elflint.c: Likewise.
447 * findtextrel.c: Likewise.
448 * nm.c: Likewise.
449 * objdump.c: Likewise.
450 * ranlib.c: Likewise.
451 * readelf.c: Likewise.
452 * size.c: Likewise.
453 * strings.c: Likewise.
454 * strip.c: Likewise.
455 * unstrip.c: Likewise.
456 * debugpred.h: New file.
457
458 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
459 (handle_relocs_rela): Likewise.
460
461 * readelf.c: Add lots of likely/unlikely.
462
463 * elflint.c: Minor cleanups.
464
Roland McGrath1a2e8f42007-12-15 23:39:34 +00004652007-11-19 Roland McGrath <roland@redhat.com>
466
467 * readelf.c (print_ops): Handle all bad op codes gracefully.
468 Print their numbers instead of just ???.
469
Roland McGrath07a696e2007-11-09 22:44:26 +00004702007-11-09 Roland McGrath <roland@redhat.com>
471
472 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000473 Handle block forms to mean a DWARF expression for DW_AT_allocated,
474 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
475 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
476 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000477
Roland McGrathe4c22ea2007-10-23 13:07:39 +00004782007-10-20 Roland McGrath <roland@redhat.com>
479
480 * unstrip.c (options): Update -R description.
481 (struct symbol): Put symbol details a union with a size_t pointer
482 `duplicate'.
483 (compare_symbols_output): Use null ->name as marker for discard
484 symbols, not zero *->map.
485 (copy_elided_sections): Record forwarding pointers for discarded
486 duplicates and fill SYMNDX_MAP elements through them.
487
488 * readelf.c (process_file): Set offline_next_address to 0 at start.
489 (struct process_dwflmod_args): New type.
490 (process_dwflmod): Take args in it, pass fd to process_elf_file.
491 (process_file): Update caller; dup FD for passing to libdwfl.
492 (process_elf_file): Take new arg FD. For ET_REL file when
493 displaying data affected by libdwfl relocation, open a new Elf handle.
494
4952007-10-17 Roland McGrath <roland@redhat.com>
496
497 * readelf.c (print_debug_line_section): For invalid data inside a
498 unit with plausible length, keep printing at the next unit boundary.
499
500 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
501
5022007-10-16 Roland McGrath <roland@redhat.com>
503
504 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
505
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00005062007-10-15 Roland McGrath <roland@redhat.com>
507
508 * make-debug-archive.in: New file.
509 * Makefile.am (EXTRA_DIST): Add it.
510 (make-debug-archive): New target.
511 (bin_SCRIPTS, CLEANFILES): Add it.
512
5132007-10-10 Roland McGrath <roland@redhat.com>
514
515 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
516 Use it to check MERGE|STRINGS for .debug_str.
517 (check_sections): Handle exact_or_gnuld.
518
5192007-10-08 Roland McGrath <roland@redhat.com>
520
521 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
522 64-bit struct timeval with 32-bit tv_usec.
523
5242007-10-07 Roland McGrath <roland@redhat.com>
525
526 * readelf.c (check_archive_index): New function.
527 (process_file): Call it. Change signature to take only fd and name.
528 Use libdwfl to open the file, then iterate on its modules (multiple
529 for an archive) to print file name and call process_elf_file.
530 (main): Update caller. Let process_file do elf_begin.
531 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
532 (process_elf_file): Take only Dwfl_Module * argument.
533 Don't print the file name here.
534 (print_debug_*_section): Take Dwfl_Module * argument.
535 (print_debug): Likewise. Update caller.
536 (format_dwarf_addr): New function.
537 (print_debug_ranges_section): Use it.
538 (attr_callback): Likewise.
539 (print_debug_line_section, print_debug_loc_section): Likewise.
540
541 * readelf.c (print_debug_ranges_section): Translate all strings.
542 (print_debug_loc_section): Likewise.
543
544 * unstrip.c (copy_elided_sections): Initialize SEC.
545
546 * ar.c (do_oper_insert): Put trailing / on short names.
547
548 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
549
550 * arlib2.c (arlib_add_long_name): Adjust for header size.
551
552 * arlib.c (arlib_finalize): Pad long name table to keep size even.
553
554 * ar.c (do_oper_insert): Use write_retry for padding write.
555
556 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
557 Unconditionally set FOUND[CNT]->elf when setting ->mem.
558 (remember_long_name): New function.
559 (do_oper_insert): Call it. Correctly use length of basename,
560 not original name. Don't store long name twice for new member.
561
5622007-10-06 Roland McGrath <roland@redhat.com>
563
564 * elflint.c (check_note): Skip empty segment.
565 (check_note_section): Skip empty section.
566
567 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
568 (handle_output_dir_module, handle_implicit_modules): Pass it down.
569 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
570 (compare_alloc_sections): Take new arg REL, ignore address if true.
571 (compare_sections): Likewise, pass it down.
572 (compare_sections_rel, compare_sections_nonrel): New functions.
573 (find_alloc_sections_prelink, copy_elided_sections): Use them
574 instead of compare_sections.
575 (sections_match): New function, broken out of ...
576 (find_alloc_section): ... here.
577 (copy_elided_sections): Reorganize section match-up logic.
578 Use sections_match for SHF_ALLOC in ET_REL.
579 For ET_REL, let the nonzero sh_addr from the debug file dominate.
580
581 * unstrip.c (add_new_section_symbols): Take new arg REL.
582 When true, do not update section symbol values.
583 (collect_symbols): Likewise. Update section symbols with address
584 of chosen output section, not original section.
585 (check_symtab_section_symbols, copy_elided_sections): Update callers.
586
587 * unstrip.c (compare_alloc_sections): At the same address, preserve
588 original section order.
589
590 * elflint.c (special_sections): Don't require MERGE|STRINGS for
591 .debug_str, it didn't always have them with older tools.
592
593 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
594
5952007-10-05 Roland McGrath <roland@redhat.com>
596
597 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
598 ET_REL file.
599
600 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
601 SHN_UNDEF as "bad section". Use shndx value in messages.
602
603 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
604 for ".debug" so it matches as a prefix.
605 (IS_KNOWN_SPECIAL): New macro.
606 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
607 type even under -d, for a .debug* or .shstrtab section.
608
609 * readelf.c (print_ops): Use hex for address operand.
610
6112007-10-04 Roland McGrath <roland@redhat.com>
612
613 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
614 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
615 sections mapped to SHN_UNDEF.
616
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00006172007-10-04 Ulrich Drepper <drepper@redhat.com>
618
619 * readelf.c (dump_archive_index): Avoid warning about uninitialized
620 variable with older glibc versions.
621 Add some branch prediction.
622
Roland McGrath59ea7f32007-10-04 08:50:09 +00006232007-10-04 Roland McGrath <roland@redhat.com>
624
625 * readelf.c (print_archive_index): New variable.
626 (options, parse_opt): Accept -c/--archive-index to set it.
627 (dump_archive_index): New function.
628 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
629 Call dump_archive_index on archives if set.
630 (main): Update caller.
631 (any_control_option): Give it file scope, moved out of ...
632 (parse_opt): ... here.
633
6342007-10-03 Roland McGrath <roland@redhat.com>
635
636 * unstrip.c (struct arg_info): Add `list' flag.
637 (options, parse_opt): Grok -n/--list to set it.
638 (list_module): New function.
639 (handle_implicit_modules): Call it under -n.
640
641 * elflint.c (check_note_section): New function.
642 (check_sections): Call it for SHT_NOTE.
643
644 * readelf.c (handle_notes): Use sections when available.
645
646 * elflint.c (check_note_data): New function, broken out of ...
647 (check_note): ... here. Call it and elf_getdata_rawchunk.
648
649 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
650 Use elf_getdata_rawchunk and gelf_getauxv.
651 (handle_notes_data): New function, broken out of ...
652 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
653
Roland McGrath241ac022007-10-01 18:21:46 +00006542007-10-01 Roland McGrath <roland@redhat.com>
655
Roland McGrathac0a16c2007-10-01 18:50:35 +0000656 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
657
Roland McGrath241ac022007-10-01 18:21:46 +0000658 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
659
Roland McGrathc76f0b02007-09-27 07:31:33 +00006602007-09-10 Roland McGrath <roland@redhat.com>
661
662 * readelf.c (options): Give -p optional argument, alias --string-dump.
663 (string_sections, string_sections_tail): New static variables.
664 (parse_opt): Set them when -p has an argument.
665 (print_string_section): New function, broken out of ...
666 (print_strings): ... here. Call it.
667 (dump_data_section): New function, broken out of ...
668 (dump_data): ... here. Call it.
669 (for_each_section_argument): New function, broken out of ...
670 (dump_data): ... here. Call it.
671 (dump_strings): New function.
672
6732007-08-31 Roland McGrath <roland@redhat.com>
674
675 * readelf.c (print_strings): Typo fix.
676
Roland McGrathcb6d8652007-08-23 08:10:54 +00006772007-08-23 Roland McGrath <roland@redhat.com>
678
679 * readelf.c (printf_with_wrap): Function removed.
680 (REGISTER_WRAP_COLUMN): New macro.
681 (handle_core_register): Use print_core_item instead.
682 (struct register_info): New type.
683 (compare_registers, compare_register_sets): New functions.
684 (register_bitpos, compare_sets_by_info): New functions.
685 (handle_core_registers): Use those to segregate and sort registers
686 for display.
687
688 * readelf.c (ITEM_WRAP_COLUMN): New macro.
689 (print_core_item): New function.
690 (handle_core_item): Use it instead of printf_with_wrap.
691 (compare_core_items, compare_core_item_groups): New functions.
692 (handle_core_items): Use them. Sort by group and force line breaks
693 between groups.
694
695 * readelf.c (handle_core_registers, handle_core_items): New functions,
696 broken out of ...
697 (handle_core_note): ... here. Call them.
698
6992007-08-22 Roland McGrath <roland@redhat.com>
700
701 * unstrip.c (new_shstrtab): New function, broken out of ...
702 (copy_elided_sections): ... here.
703
7042007-08-20 Roland McGrath <roland@redhat.com>
705
706 Avoid local function trampolines in nm binary.
707 * nm.c (sort_by_address): Move to a static function instead of local
708 inside show_symbols.
709 (sort_by_name_strtab): New static variable.
710 (sort_by_name): Use it. Move to a static function instead of local
711 inside show_symbols.
712 (show_symbols): Set sort_by_name_strtab.
713
7142007-08-19 Roland McGrath <roland@redhat.com>
715
716 * readelf.c (handle_auxv_note): New function.
717 (handle_notes): Call it.
718
719 * readelf.c (printf_with_wrap, convert): New functions.
720 (handle_core_item, (handle_core_register): New functions.
721 (handle_notes): Call those with details from ebl_core_note.
722
Roland McGrath099dd522007-08-13 22:58:36 +00007232007-08-12 Roland McGrath <roland@redhat.com>
724
725 * elflint.c (check_note): Accept type 0 with name "Linux".
726
727 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
728
729 * elflint.c (section_flags_string): Return "none" for 0, not "".
730
Roland McGrathd8221722007-08-11 21:18:09 +00007312007-08-11 Roland McGrath <roland@redhat.com>
732
733 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
734
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00007352007-08-04 Ulrich Drepper <drepper@redhat.com>
736
737 * readelf.c (hex_dump): Use isprint to determine whether to print
738 character itself or full stop character.
739 (dump_data): No need to check endp for NULL after strtol call.
740
Roland McGrath60fc84c2007-08-03 21:59:15 +00007412007-08-03 Roland McGrath <roland@redhat.com>
742
743 * readelf.c (print_string_sections): New variable.
744 (options, parse_opt): Handle --strings/-p to set it.
745 (print_strings): New function.
746 (process_elf_file): Call it under -p.
747
748 * readelf.c (options): Add hidden aliases --segments, --sections,
749 as taken by binutils readelf.
750
7512007-08-01 Roland McGrath <roland@redhat.com>
752
753 * readelf.c (dump_data_sections, dump_data_sections_tail):
754 New variables.
755 (options, parse_opt): Handle --hex-dump/-x, set them.
756 (hex_dump): New function.
757 (dump_data): New function, call it.
758 (process_elf_file): Call it.
759
7602007-07-25 Roland McGrath <roland@redhat.com>
761
762 * addr2line.c (show_symbols): New variable.
763 (print_addrsym): New function.
764 (handle_address): Call it.
765 (options, parse_opt): Handle -S/--symbols.
766
Ulrich Drepperb0243862007-06-06 00:09:36 +00007672007-06-05 Ulrich Drepper <drepper@redhat.com>
768
769 * addr2line.c: Update for latest autoconf header.
770 * ar.c: Likewise.
771 * elfcmp.c: Likewise.
772 * elflint.c: Likewise.
773 * findtextrel.c: Likewise.
774 * ld.c: Likewise.
775 * ldgeneric.c: Likewise.
776 * nm.c: Likewise.
777 * objdump.c: Likewise.
778 * ranlib.c: Likewise.
779 * readelf.c: Likewise.
780 * size.c: Likewise.
781 * strings.c: Likewise.
782 * strip.c: Likewise.
783 * unstrip.c: Likewise.
784
Roland McGrath9aa8ef72007-05-18 08:59:43 +00007852007-05-18 Roland McGrath <roland@redhat.com>
786
787 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
788 stripped file, so as not to duplicate a section copied in both.
789
790 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
791
7922007-05-17 Roland McGrath <roland@redhat.com>
793
794 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
795
796 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
797
798 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
799 call make_directories here.
800 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
801 (handle_dwfl_module): Likewise.
802 (handle_implicit_modules): Update callers.
803 (handle_output_dir_module): Likewise. Don't do make_directories here.
804
805 * unstrip.c (get_section_name): New function, broken out of ...
806 (copy_elided_sections): here. Update callers.
807 (find_alloc_section): Broken out of ...
808 (copy_elided_sections): ... here. Update caller.
809 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
810 update STT_SECTION symbols' st_value fields as a side effect.
811 (check_symtab_section_symbols): Update caller.
812 (add_new_section_symbols): Set st_value in symbols added.
813 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
814 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
815 from .bss to .dynbss.
816 (find_alloc_sections_prelink): New function. Associate debug file
817 allocated SHT_NOBITS shdrs with stripped moved by prelink via
818 .gnu.prelink_undo information.
819 (copy_elided_sections): Call it when we couldn't find every allocated
820 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
821 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
822 (handle_file): Update callers.
823
824 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
825 named ".comment".
826
827 * elflint.c (check_sections): Fix association of segments with
828 sections when p_memsz > p_filesz.
829
8302007-04-29 Roland McGrath <roland@redhat.com>
831
832 * addr2line.c (options, main): Tweak argp group settings to fix
833 usage output.
834
8352007-04-28 Roland McGrath <roland@redhat.com>
836
837 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
838 sizes to match sections adjusted in the stripped file.
839
Roland McGrath4be15242007-04-25 03:09:33 +00008402007-04-24 Roland McGrath <roland@redhat.com>
841
842 * elfcmp.c (OPT_HASH_INEXACT): New macro.
843 (hash_inexact): New variable.
844 (options, parse_opt): Add --hash-inexact option to set it.
845 (hash_content_equivalent): New function.
846 (main): Call it for differing SHT_HASH sections under --hash-inexact.
847
8482007-04-23 Roland McGrath <roland@redhat.com>
849
850 * unstrip.c: New file.
851 * Makefile.am (bin_PROGRAMS): Add it.
852 (unstrip_LDADD): New variable.
853
854 * strip.c (options): Allow --output for -o.
855
Ulrich Drepper8b383102007-02-16 00:31:57 +00008562007-02-15 Ulrich Drepper <drepper@redhat.com>
857
858 * readelf.c: Remove unused code. Add a few consts.
859
Ulrich Drepper903c1162007-02-15 19:40:37 +00008602007-02-15 Roland McGrath <roland@redhat.com>
861
862 * readelf.c (print_debug): Fix brainos in SHDR test.
863
Roland McGrathf82a1ec2007-02-06 04:47:44 +00008642007-02-05 Roland McGrath <roland@redhat.com>
865
866 * ar.c: Include <limits.h>, since we use LONG_MAX.
867
Ulrich Drepper0fe63532007-02-05 21:05:51 +00008682007-02-05 Ulrich Drepper <drepper@redhat.com>
869
Ulrich Drepper8b383102007-02-16 00:31:57 +0000870 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000871 ignore fchown's return value.
872 (do_oper_insert): Handle error when writing padding.
873 * ranlib.c: Add fchown complain work around.
874
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000875 * arlib.c: Make symtab a global variable. Change all users.
876 * arlib2.c: Likewise.
877 * ranlib.c: Likewise.
878 * ar.c: Likewise.
879 * arlib.h: Declare it.
880
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00008812007-01-11 Roland McGrath <roland@redhat.com>
882
883 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
884 SHF_MASKPROC bits separately from generic sh_flags validation.
885
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00008862007-02-04 Ulrich Drepper <drepper@redhat.com>
887
888 * ar.c: New file.
889 * arlib.c: New file.
890 * arlib2.c: New file.
891 * arlib.h: New file.
892 * Makefile (noinst_LIBRARIES): Add libar.
893 (libar_a_SOURCES): Define.
894 (ar_LDADD): Define.
895 (CFLAGS_ar): Define.
896 * ranlib.c: Change to use arlib.
897
898 * elflint.c (check_symtab): Work around GNU ld bug which omits
899 sections but not symbols in those sections.
900
Ulrich Drepperb770cf92007-01-10 21:02:34 +00009012007-01-10 Ulrich Drepper <drepper@redhat.com>
902
903 * addr2line.c: Update copyright year.
904 * elfcmp.c: Likewise.
905 * elflint.c: Likewise.
906 * findtextrel.c: Likewise.
907 * ld.c: Likewise.
908 * nm.c: Likewise.
909 * objdump.c: Likewise.
910 * ranlib.c: Likewise.
911 * readelf.c: Likewise.
912 * size.c: Likewise.
913 * strings.c: Likewise.
914 * strip.c: Likewise.
915
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00009162006-12-09 Ulrich Drepper <drepper@redhat.com>
917
918 * elflint.c (compare_hash_gnu_hash): New function. Report if the
919 two hash tables have different content (module expected omission
920 of undefined symbols).
921
Roland McGrath8190db62006-12-17 23:56:51 +00009222006-10-31 Roland McGrath <roland@redhat.com>
923
924 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000925 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000926
9272006-09-19 Jakub Jelinek <jakub@redhat.com>
928
929 * strip.c (process_file): Disallow -f on archives.
930
9312006-10-09 Roland McGrath <roland@redhat.com>
932
933 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
934
Roland McGrathc373d852006-10-10 00:25:21 +00009352006-08-29 Roland McGrath <roland@redhat.com>
936
937 * Makefile.am (MAINTAINERCLEANFILES): New variable.
938
939 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
940 Reported by Christian Aichinger <Greek0@gmx.net>.
941
942 * elflint.c (valid_e_machine): Add EM_ALPHA.
943 Reported by Christian Aichinger <Greek0@gmx.net>.
944
Ulrich Drepper231c5902006-08-08 22:00:11 +00009452006-08-08 Ulrich Drepper <drepper@redhat.com>
946
947 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
948 Keep track of which "high DT" entries are present.
949 Check that either old or GNU-style hash table is present.
950 If GNU-style hash table is used a symbol table is mandatory.
951 Check that if any prelink entry is present all of them are.
952 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
953 table if they don't refer to functions.
954
Roland McGrath858b1892006-07-17 08:41:15 +00009552006-07-17 Roland McGrath <roland@redhat.com>
956
957 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
958 (add_version): Likewise for argument.
959 (check_versym): Cast constant to GElf_Versym for comparison.
960
Roland McGrath4ec807e2006-07-13 03:59:46 +00009612006-07-12 Roland McGrath <roland@redhat.com>
962
963 * readelf.c (handle_gnu_hash): Add casts for machines where
964 Elf32_Word != unsigned int.
965
Ulrich Drepperdcf61602006-07-12 19:59:02 +00009662006-07-12 Ulrich Drepper <drepper@redhat.com>
967
968 * elflint.c (check_sysv_hash64): Fix printf format.
969
Ulrich Dreppercc415622006-07-12 19:42:23 +00009702006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000971
Ulrich Dreppercc415622006-07-12 19:42:23 +0000972 * addr2line.c (options): English fix in -f doc string.
973
974 * addr2line.c (use_comp_dir): New variable.
975 (options, parse_opt): Grok -A/--absolute to set it.
976 (handle_address): If set, prepend dwfl_line_comp_dir results to
977 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +0000978
Ulrich Drepper28ed8952006-07-07 03:43:47 +00009792006-07-06 Ulrich Drepper <drepper@redhat.com>
980
981 * elflint.c: Adjust for latest new hash table format.
982 * readelf.c: Likewise.
983
984 * elflint.c (check_versym): Ignore hidden bit when comparing version
985 numbers.
986
9872006-07-05 Ulrich Drepper <drepper@redhat.com>
988
989 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
990 discarded COMDAT symbols.
991
992 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
993 (elf_i386_create_relocations): Likewise.
994 * ld.h (struct symbol): Add local and hidden bits.
995 * ld.c (create_special_section_symbol): These synthsized symbols
996 are local and hidden.
997 * ldgeneric.c (file_process2): Check whether input file matches
998 the emulation.
999 (fillin_special_symbol): Create symbols as local and/or hidden
1000 if requested.
1001 (ld_generic_create_outfile): Make local copy of symbol.
1002 Don't hide global, defined symbols in dynamic symbol table unless
1003 requested. Synthetic symbols have no version information.
1004
1005 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1006 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1007
10082006-07-04 Ulrich Drepper <drepper@redhat.com>
1009
1010 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1011 testing.
1012
10132006-07-03 Ulrich Drepper <drepper@redhat.com>
1014
1015 * elflint.c: Add testing of DT_GNU_HASH.
1016 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1017
1018 * Makefile.am: Add hacks to create dependency files for non-generic
1019 linker.
1020
Ulrich Drepper6ca46002006-06-12 22:40:23 +000010212006-06-12 Ulrich Drepper <drepper@redhat.com>
1022
1023 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1024 section if creating a DSO and no interpreter is given.
1025 (ld_generic_create_outfile): Don't store reference to symbols in
1026 discarded COMDAT groups. Don't create PHDR and INTERP program header
1027 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001028 (create_verneed_data): Pretty printing.
1029
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001030 * ldscript.y (content): If a DSO is created don't set default
1031 interpreter from linker script.
1032
1033 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1034 for symbols in discarded COMDAT groups.
1035 (elf_i386_create_relocations): Likewise.
1036 * ld.h (struct scninfo): Add unused_comdat.
1037 * ldgeneric.c (add_section): Also check group signature when
1038 matching COMDAT sections.
1039 (add_relocatable_file): Ignore symbols in COMDAT group which are
1040 discarded.
1041
1042 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1043 and symbol reference.
1044
Ulrich Drepper54f33a72006-06-11 09:07:37 +000010452006-06-11 Ulrich Drepper <drepper@redhat.com>
1046
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001047 * elflint.c (check_dynamic): Fix checking value of tags which are
1048 offsets in the string section. Make sure DT_STRTAB points to the
1049 section referenced in sh_link.
1050
1051 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1052
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001053 * ld.c: Recognize --eh-frame-hdr option.
1054 * ld.h (struct ld_state): Add eh_frame_hdr field.
1055 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1056
1057 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1058 SH_FLAGS_COMBINE.
1059 (add_relocatable_file): Minor optimization of last change.
1060 (match_section): Don't preserve SHF_GROUP flag any longer.
1061
Ulrich Drepper2d880282006-06-11 00:20:43 +000010622006-06-10 Ulrich Drepper <drepper@redhat.com>
1063
1064 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001065 Handle record and ignore as position dependent options.
1066 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001067 * ld.h (struct ld_state): Add execstack field.
1068 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1069 sections.
1070 (ld_generic_create_outfile): Fix program header creation in native
1071 linker. Add PT_GNU_STACK program header.
1072
Ulrich Dreppera688a732006-06-10 06:33:00 +000010732006-06-09 Ulrich Drepper <drepper@redhat.com>
1074
1075 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1076 for PLT entries if there is no local definition.
1077
1078 * ld.c (parse_option): Handle -z ignore like --as-needed and
1079 -z record like --no-as-needed.
1080 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1081 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1082 looping over DSOs. When deciding about adding DT_NEEDED entries
1083 use ->as_needed instead of ignore_unused_dsos.
1084
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000010852006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001086
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001087 * ld.c: Recognize --as-needed and --no-as-needed options.
1088 * ld.h (struct usedfile): Add as_needed field.
1089 (struct ld_state): Likewise.
1090 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1091 the list.
1092 * ldscript.y (filename_id_list): Split to correctly parse all
1093 combinations.
1094 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001095
Ulrich Drepper697f4db2006-06-10 06:50:47 +000010962006-05-28 Ulrich Drepper <drepper@redhat.com>
1097
1098 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1099 and colno.
1100
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000011012006-05-27 Ulrich Drepper <drepper@redhat.com>
1102
1103 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001104 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001105
Ulrich Drepper82c345d2006-04-04 22:07:54 +000011062006-04-04 Ulrich Drepper <drepper@redhat.com>
1107
1108 * addr2line.c: Update copyright year.
1109 * elfcmp.c: Likewise.
1110 * elflint.c: Likewise.
1111 * findtextrel.c: Likewise.
1112 * ld.c: Likewise.
1113 * nm.c: Likewise.
1114 * objdump.c: Likewise.
1115 * ranlib.c: Likewise.
1116 * readelf.c: Likewise.
1117 * size.c: Likewise.
1118 * strings.c: Likewise.
1119 * strip.c: Likewise.
1120
Roland McGrathdd7e22b2006-03-09 23:05:47 +000011212006-03-09 Roland McGrath <roland@redhat.com>
1122
1123 * Makefile.am (AM_LDFLAGS): New variable.
1124
Roland McGrath060fa052006-03-02 07:51:50 +000011252006-03-01 Roland McGrath <roland@redhat.com>
1126
1127 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1128 for dwarf.h changes matching 3.0 spec.
1129 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1130
Ulrich Drepper038129b2005-12-04 16:47:24 +000011312005-12-04 Ulrich Drepper <drepper@redhat.com>
1132
1133 * elflint.c (check_one_reloc): If relocation section is not loaded,
1134 don't check whether the relocations modify read-only sections or
1135 loaded and unloaded sections.
1136
Ulrich Drepper607e0542005-12-04 15:51:06 +000011372005-11-28 Ulrich Drepper <drepper@redhat.com>
1138
1139 * elflint.c (check_one_reloc): Take additional parameters. Use
1140 them to determine whether relocation is valid in this type of
1141 file. DSOs and executables can contain relocation sections in
1142 unloaded sections which just show the relocations the linker
1143 applied. Adjust all callers.
1144 (check_program_header): Check that PT_PHDR is loaded and that offset
1145 matches the one in the ELF header.
1146
Roland McGrath6724c902005-10-28 07:07:19 +000011472005-10-26 Roland McGrath <roland@redhat.com>
1148
1149 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1150
Ulrich Drepperd0449522005-09-03 07:23:52 +000011512005-09-03 Ulrich Drepper <drepper@redhat.com>
1152
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001153 * strip.c (handle_elf): Unify some error messages.
1154 * ld.c (main): Likewise.
1155 * ldgeneric.c (open_elf): Likewise.
1156 * elfcmp.c (main): Likewise.
1157 * elflint.c (check_elf_header): Likewise.
1158
1159 * size.c (process_file): Fix typo in error message.
1160
Ulrich Drepperd0449522005-09-03 07:23:52 +00001161 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1162
Ulrich Dreppera60501e2005-09-02 19:50:17 +000011632005-09-02 Ulrich Drepper <drepper@redhat.com>
1164
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001165 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001166 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001167
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000011682005-08-28 Ulrich Drepper <drepper@redhat.com>
1169
1170 * ranlib.c: Don't define pread_retry and write_retry here.
1171
1172 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1173 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1174
1175 * strings.c (process_chunk): Reorder expressions in conditional
1176 (process_chunk_mb): Likewise.
1177
1178 * strings.c: New file.
1179 * Makefile.am (bin_PROGRAMS): Add strings.
1180 (strings_no_Wstring): Define.
1181 (strings_LDADD): Define.
1182
Roland McGrath71e15a02005-08-27 10:33:26 +000011832005-08-27 Roland McGrath <roland@redhat.com>
1184
1185 * addr2line.c (dwarf_diename_integrate): Function removed.
1186 (print_dwarf_function): Use plain dwarf_diename.
1187
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000011882005-08-24 Ulrich Drepper <drepper@redhat.com>
1189
1190 * elflint.c (check_versym): Versioned symbols should not have
1191 local binding.
1192
Ulrich Drepper5d832292005-08-15 21:36:27 +000011932005-08-15 Ulrich Drepper <drepper@redhat.com>
1194
Ulrich Drepper61655e02005-08-16 04:23:02 +00001195 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1196 undefined.
1197
Ulrich Drepper5d832292005-08-15 21:36:27 +00001198 * Makefile.am: Add rules to build ranlib.
1199 * ranlib.c: New file.
1200
Roland McGrath18e13422005-08-15 08:01:25 +000012012005-08-14 Roland McGrath <roland@redhat.com>
1202
1203 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1204 sh_type it recognizes.
1205
1206 * elflint.c (check_sections): Print unknown flags in hex, don't
1207 truncate high bits. Print section number and name for unknown type.
1208
Roland McGrathf6895042005-08-13 20:56:52 +000012092005-08-13 Roland McGrath <roland@redhat.com>
1210
1211 * elflint.c (check_program_header): Use ebl_segment_type_name and
1212 allow any p_type it recognizes. Include p_type value in error
1213 message for unknown type.
1214
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000012152005-08-13 Ulrich Drepper <drepper@redhat.com>
1216
1217 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1218 to ebl_check_special_symbol.
1219 (check_sections): Pass ehdr to ebl_bss_plt_p.
1220
Roland McGrath653d3762005-08-13 01:59:10 +000012212005-08-12 Roland McGrath <roland@redhat.com>
1222
1223 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1224 refers to the right section if it's not SHN_ABS.
1225 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1226
1227 * elflint.c (check_sections): Don't complain about a non-NOBITS
1228 section taking no segment space, if it's sh_size is 0.
1229
1230 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1231 be PROGBITS or NOBITS.
1232
1233 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1234 standard st_value and st_size checks.
1235
Roland McGrath1c83bf12005-08-11 07:03:55 +000012362005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001237
Roland McGrath1c83bf12005-08-11 07:03:55 +00001238 * addr2line.c (options, parse_opt): Don't handle -e here.
1239 (executable): Variable removed.
1240 (argp_children): New static variable.
1241 (argp): Use it. Make const.
1242 (main): Fill in argp_children from dwfl_standard_argp ().
1243 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1244 (print_dwarf_function): New function. Try to figure out inline chain.
1245 (elf_getname): Function removed, libdwfl does it for us.
1246 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1247 Use dwfl_module_addrname instead of elf_getname.
1248 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1249 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1250
12512005-08-10 Ulrich Drepper <drepper@redhat.com>
1252
1253 * strip.c (parse_opt): STATE parameter is now used.
1254 Various little cleanups.
1255
1256 * readelf.c (print_debug_line_section): Correct fallout of renaming
1257 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001258
Roland McGrath8f31c2c2005-08-09 04:58:05 +000012592005-08-08 Roland McGrath <roland@redhat.com>
1260
1261 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1262 with binutils strip. Likewise -d, -S, as aliases for -g.
1263 Likewise ignore -s/--strip-all.
1264
Roland McGrath095a01b2005-08-08 03:49:35 +000012652005-08-07 Roland McGrath <roland@redhat.com>
1266
1267 * strip.c (process_file): Open read-only when using a different output
1268 file.
1269
Ulrich Drepper47be7952005-08-07 04:41:39 +000012702005-08-06 Ulrich Drepper <drepper@redhat.com>
1271
Ulrich Drepper637963b2005-08-07 05:33:07 +00001272 * elflint.c (in_nobits_scn): New function.
1273 (check_versym): Allow references for defined symbols against versions
1274 of other DSOs also for symbols in nobits sections.
1275 Move a few variables around.
1276
Ulrich Drepper47be7952005-08-07 04:41:39 +00001277 * Makefile.am (AM_CFLAGS): Avoid duplication.
1278 Link with statis libs if BUILD_STATIC.
1279
Ulrich Drepperdbace232005-08-06 01:37:23 +000012802005-08-05 Ulrich Drepper <drepper@redhat.com>
1281
1282 * elflint.c: Many, many more tests. Mostly related to symbol
1283 versioning. Those sections should now be completely checked.
1284
1285 * readelf.c (print_dynamic): Use gelf_offscn.
1286
Ulrich Drepperacb89832005-08-04 07:01:49 +000012872005-08-04 Ulrich Drepper <drepper@redhat.com>
1288
1289 * elflint.c: Add lots more tests: more extension symbol table sanity,
1290 versioning section tests, hash table tests. General cleanup.
1291
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000012922005-08-02 Ulrich Drepper <drepper@redhat.com>
1293
Ulrich Drepper8a687742005-08-03 02:24:12 +00001294 * objdump.c: New file.
1295 * Makefile.am (bin_PROGRAMS): Add objdump.
1296 (objdump_LDADD): Define.
1297
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001298 * elflint.c (check_reloc_shdr): New function split out from check_rela
1299 and check_rel.
1300 (check_one_reloc): New function. Likewise.
1301 (check_rela): Use check_reloc_shdr and check_one_reloc.
1302 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001303 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1304 section.
1305 Add checks that relocations against read-only segments are flagged,
1306 that the text relocation flag is not set unnecessarily, and that
1307 relocations in one section are either against loaded or not-loaded
1308 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001309
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000013102005-08-01 Ulrich Drepper <drepper@redhat.com>
1311
1312 * elfcmp.c (main): Ignore section count and section name string table
1313 section index.
1314
Roland McGrathf9ece8a2005-07-28 07:03:04 +000013152005-07-27 Roland McGrath <roland@redhat.com>
1316
1317 * elfcmp.c: Include <locale.h>.
1318
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000013192005-07-27 Ulrich Drepper <drepper@redhat.com>
1320
1321 * elfcmp.c: Print name and index of differing section.
1322
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000013232005-07-24 Ulrich Drepper <drepper@redhat.com>
1324
1325 * elfcmp.c: Implement comparing gaps between sections.
1326
13272005-07-23 Ulrich Drepper <drepper@redhat.com>
1328
1329 * elflint.c: Include libeblP.h instead of libebl.h.
1330 * nm.c: Likewise.
1331 * readelf.c: Likewise.
1332 * elfcmp.c: Likewise.
1333
1334 * elfcmp.c (main): Compare individual ELF header fields, excluding
1335 e_shoff instead of the whole struct at once.
1336 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1337 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1338
13392005-07-22 Ulrich Drepper <drepper@redhat.com>
1340
1341 * elfcmp.c (main): Take empty section into account when comparing
1342 section content.
1343
1344 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1345 using it.
1346
13472005-07-21 Ulrich Drepper <drepper@redhat.com>
1348
1349 * elfcmp.c: New file.
1350 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1351 (elfcmp_LDADD): Define.
1352
1353 * elflint.c (check_rela): Check that copy relocations only reference
1354 object symbols or symbols with unknown type.
1355 (check_rel): Likewise.
1356
13572005-06-08 Roland McGrath <roland@redhat.com>
1358
1359 * readelf.c (print_ops): Add consts.
1360
13612005-05-31 Roland McGrath <roland@redhat.com>
1362
1363 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1364 abbreviations. Print a header line before each CU section.
1365
1366 * readelf.c (print_debug_loc_section): Fix indentation for larger
1367 address size.
1368
13692005-05-30 Roland McGrath <roland@redhat.com>
1370
1371 * readelf.c (print_debug_line_section): Print section offset of each
1372 CU's table, so they are easy to find from seeing the stmt_list value.
1373
1374 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1375 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1376
1377 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1378 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1379
1380 * readelf.c (print_ops): Take different args for indentation control.
1381 (attr_callback): Caller updated.
1382 Grok several more block-form attributes as being location expressions.
1383 For those same attributes with udata forms, format output differently
1384 for location list offset.
1385 (print_debug_loc_section): Implement it for real.
1386
1387 * readelf.c (options): Mention ranges for --debug-dump.
1388 (enum section_e): Add section_ranges.
1389 (parse_opt): Grok "ranges" for -w/--debug-dump.
1390 (print_debug_ranges_section): New function.
1391 (print_debug): Handle .debug_ranges section.
1392
13932005-05-30 Ulrich Drepper <drepper@redhat.com>
1394
1395 * readelf.c (handle_notes): At least x86-64 need not have the note
1396 section values aligned to 8 bytes.
1397
13982005-05-18 Ulrich Drepper <drepper@redhat.com>
1399
1400 * readelf.c (dwarf_tag_string): Add new tags.
1401
14022005-05-08 Roland McGrath <roland@redhat.com>
1403
1404 * strip.c (handle_elf): Don't translate hash and versym data formats,
1405 elf_getdata already did it for us.
1406
14072005-05-07 Ulrich Drepper <drepper@redhat.com>
1408
1409 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1410 (addr2line_LDADD): Likewise.
1411
14122005-05-03 Roland McGrath <roland@redhat.com>
1413
1414 * strip.c (handle_elf): Apply symbol table fixups to discarded
1415 relocation sections when they are being saved in the debug file.
1416
1417 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1418 and gelf_xlatetof, not the native byte order.
1419
1420 * strip.c (parse_opt): Give error if -f or -o is repeated.
1421 (main): Exit if argp_parse returns nonzero.
1422
1423 * strip.c (debug_fname_embed): New variable.
1424 (options, parse_opt): New option -F to set it.
1425
14262005-05-07 Ulrich Drepper <drepper@redhat.com>
1427
1428 * readelf.c (parse_opt): Make any_control_option variable
1429 local. Simplify some tests.
1430
14312005-05-03 Roland McGrath <roland@redhat.com>
1432
1433 * strip.c (crc32_file): Function removed (now in ../lib).
1434
14352005-05-03 Roland McGrath <roland@redhat.com>
1436
1437 * elflint.c (is_debuginfo): New variable.
1438 (options, parse_opt): New option --debuginfo/-d to set it.
1439 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1440 (check_note): If is_debuginfo, don't try to get note contents.
1441
14422005-04-24 Ulrich Drepper <drepper@redhat.com>
1443
1444 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1445 section reached.
1446
14472005-04-14 Ulrich Drepper <drepper@redhat.com>
1448
1449 * readelf.c (dwarf_encoding_string): New function.
1450 (dwarf_inline_string): New function.
1451 (dwarf_access_string): New function.
1452 (dwarf_visibility_string): New function.
1453 (dwarf_virtuality_string): New function.
1454 (dwarf_identifier_case_string): New function.
1455 (dwarf_calling_convention_string): New function.
1456 (dwarf_ordering_string): New function.
1457 (dwarf_discr_list_string): New function.
1458 (attr_callback): Decode man more attribute values.
1459
14602005-04-01 Ulrich Drepper <drepper@redhat.com>
1461
1462 * addr2line.c: Finish implementation of -f option.
1463
14642005-03-29 Ulrich Drepper <drepper@redhat.com>
1465
1466 * addr2line.c: New file.
1467 * Makefile.am (bin_PROGRAMS): Add addr2line.
1468 Define addr2line_LDADD.
1469
1470 * findtextrel.c: Use new dwarf_addrdie function.
1471
1472 * findtextrel.c: Fix usage message and re-add accidentally removed
1473 line.
1474
14752005-03-28 Ulrich Drepper <drepper@redhat.com>
1476
1477 * findtextrel.c: New file.
1478 * Makefile: Add rules to build findtextrel.
1479
14802005-02-15 Ulrich Drepper <drepper@redhat.com>
1481
1482 * ldlex.l: Provide ECHO definition to avoid warning.
1483
1484 * elflint.c (check_program_header): Fix typo in RELRO test.
1485
1486 * Makefile.am (AM_CFLAGS): Add more warning options.
1487 * elflint.c: Fix warnings introduced by the new warning options.
1488 * i386_ld.c: Likewise.
1489 * ld.c: Likewise.
1490 * ld.h: Likewise.
1491 * ldgeneric.c: Likewise.
1492 * nm.c: Likewise.
1493 * readelf.c: Likewise.
1494 * sectionhash.c: Likewise.
1495 * size.c: Likewise.
1496 * string.c: Likewise.
1497
14982005-02-05 Ulrich Drepper <drepper@redhat.com>
1499
1500 * Makefile.am: Check for text relocations in constructed DSOs.
1501
1502 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1503 with -lmudflap.
1504
1505 * ldscript.y: Add as_needed handling.
1506 * ldlex.l: Recognize AS_NEEDED token.
1507 * ld.h (struct filename_list): Add as_needed flag.
1508
15092005-02-04 Ulrich Drepper <drepper@redhat.com>
1510
1511 * elflint.c (check_symtab): Correctly determine size of GOT section.
1512
15132005-01-19 Ulrich Drepper <drepper@redhat.com>
1514
1515 * ld.c: Remove unnecessary more_help function. Print bug report
1516 address using argp.
1517 * strip.c: Likewise.
1518 * size.c: Likewise.
1519 * nm.c: Likewise.
1520 * readelf.c: Likewise.
1521 * elflint.c: Likewise.
1522
1523 * elflint.c (main): Don't check for parameter problems here.
1524 (parse_opt): Do it here, where we get informed about some of them
1525 anyway.
1526
1527 * readelf.c (main): Don't check for parameter problems here.
1528 (parse_opt): Do it here, where we get informed about some of them
1529 anyway.
1530
15312005-01-11 Ulrich Drepper <drepper@redhat.com>
1532
1533 * strip.c: Update copyright year.
1534 * readelf.c: Likewise.
1535 * size.c: Likewise.
1536 * nm.c: Likewise.
1537 * ld.c: Likewise.
1538 * elflint.c: Likewise.
1539
1540 * elflint.c (check_symtab): Don't warn about wrong size for
1541 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1542
15432004-10-05 Ulrich Drepper <drepper@redhat.com>
1544
1545 * readelf.c (print_phdr): In section mapping, also indicate
1546 sections in read-only segments.
1547
15482004-09-25 Ulrich Drepper <drepper@redhat.com>
1549
1550 * readelf.c: Make compile with gcc 4.0.
1551 * strip.c: Likewise.
1552
15532004-08-16 Ulrich Drepper <drepper@redhat.com>
1554
1555 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1556 allocate to work around gcc 3.4 bug.
1557
15582004-01-25 Ulrich Drepper <drepper@redhat.com>
1559
1560 * ldlex.l (invalid_char): Better error message.
1561
15622004-01-23 Ulrich Drepper <drepper@redhat.com>
1563
1564 * readelf.c: Print SHT_GNU_LIBLIST sections.
1565
1566 * none_ld.c: New file.
1567
15682004-01-21 Ulrich Drepper <drepper@redhat.com>
1569
1570 * Makefile.am: Enable building of machine specific linker.
1571
15722004-01-20 Ulrich Drepper <drepper@redhat.com>
1573
1574 * Makefile.am: Support building with mudflap.
1575
1576 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1577 * ldgeneric.c: Likewise.
1578 * ldscript.y: Likewise.
1579 * readelf.c: Likewise.
1580 * strip.c: Likewise.
1581
1582 * readelf.c (print_debug_line_section): Determine address size
1583 correctly.
1584
15852004-01-19 Ulrich Drepper <drepper@redhat.com>
1586
1587 * readelf.c (print_phdr): Show which sections are covered by the
1588 PT_GNU_RELRO entry.
1589
1590 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1591
1592 * readelf.c (print_debug_macinfo_section): Implement.
1593
15942004-01-18 Ulrich Drepper <drepper@redhat.com>
1595
1596 * readelf.c (print_debug_line_section): Implement.
1597
15982004-01-17 Ulrich Drepper <drepper@redhat.com>
1599
1600 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1601 * src/ld.c: Likewise.
1602 * src/nm.c: Likewise.
1603 * src/readelf.c: Likewise.
1604 * src/size.c: Likewise.
1605 * src/strip.c: Likewise.
1606
1607 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1608
1609 * Makefile.am: Support building with mudflap.
1610
16112004-01-16 Ulrich Drepper <drepper@redhat.com>
1612
1613 * readelf.c (print_debug_info_section): Free dies memory.
1614
1615 * readelf.c: Print .debug_info section content.
1616
16172004-01-13 Ulrich Drepper <drepper@redhat.com>
1618
1619 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1620
16212004-01-12 Ulrich Drepper <drepper@redhat.com>
1622
1623 * readelf.c (print_debug_aranges): Implement using libdw.
1624
16252004-01-11 Ulrich Drepper <drepper@redhat.com>
1626
1627 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1628
1629 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1630 behavior is available yet.
1631 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1632
16332004-01-09 Ulrich Drepper <drepper@redhat.com>
1634
1635 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1636
1637 * nm.c: Implement getting information about local variables.
1638
16392004-01-07 Ulrich Drepper <drepper@redhat.com>
1640
1641 * nm.c: Read also debug information for local symbols.
1642
16432004-01-05 Ulrich Drepper <drepper@redhat.com>
1644
1645 * nm.c: Shuffle dwarf handling code around so the maximum column
1646 width can be computed ahead of printing. Avoid collection symbols
1647 which are not printed anyway.
1648
1649 * nm.c: Rewrite dwarf handling to use libdw.
1650 * Makefile.am (AM_CFLAGS): Add -std parameter.
1651 (INCLUDES): Find header in libdw subdir.
1652 (nm_LDADD): Replace libdwarf with libdw.
1653
1654 * elflint.c: Update copyright year.
1655 * readelf.c: Likewise.
1656 * size.c: Likewise.
1657 * strip.c: Likewise.
1658 * nm.c: Likewise.
1659
16602003-12-31 Ulrich Drepper <drepper@redhat.com>
1661
1662 * strip.c (process_file): Close file before returning.
1663
16642003-11-19 Ulrich Drepper <drepper@redhat.com>
1665
1666 * readelf.c (handle_dynamic): Make column for tag name wider.
1667
16682003-09-29 Ulrich Drepper <drepper@redhat.com>
1669
1670 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1671
16722003-09-25 Ulrich Drepper <drepper@redhat.com>
1673
1674 * strip.c (process_file): Don't mmap the input file, we modify the
1675 data structures and don't want the change end up on disk.
1676
16772003-09-23 Jakub Jelinek <jakub@redhat.com>
1678
1679 * unaligned.h (union u_2ubyte_unaligned,
1680 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1681 packed attribute.
1682 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1683 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1684 Read/store value through _ptr->u instead of *_ptr.
1685
16862003-09-22 Ulrich Drepper <drepper@redhat.com>
1687
1688 * size.c (show_sysv): Change type of maxlen to int.
1689
1690 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1691 buckets.
1692
1693 * i386_ld.c: Many many fixes and extensions.
1694 * ld.c: Likewise.
1695 * ldgeneric.c: Likewise.
1696
16972003-08-16 Ulrich Drepper <drepper@redhat.com>
1698
1699 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1700 the reference is from another DSO.
1701
17022003-08-15 Ulrich Drepper <drepper@redhat.com>
1703
1704 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1705 point is found when creating a DSO.
1706
17072003-08-14 Ulrich Drepper <drepper@redhat.com>
1708
1709 * ld.c (main): Always call FLAG_UNRESOLVED.
1710 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1711 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1712
17132003-08-13 Ulrich Drepper <drepper@redhat.com>
1714
1715 * Makefile.in: Depend on libebl.a, not libebl.so.
1716
1717 * ld.c (main): Mark stream for linker script as locked by caller.
1718 (read_version_script): Likewise.
1719 * ldlex.c: Define fread and fwrite to _unlocked variant.
1720
1721 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1722 target_bswap_32.
1723 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1724 target_bswap_64.
1725 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1726 store_8ubyte_unaligned): Define using new macros.
1727
17282003-08-12 Ulrich Drepper <drepper@redhat.com>
1729
1730 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1731 possibly unaligned memory. Support use of big endian machines.
1732
17332003-08-11 Ulrich Drepper <drepper@redhat.com>
1734
1735 * Moved to CVS archive.