blob: f74b31d571859c09a172840548730a2632db166b [file] [log] [blame]
Ulrich Drepperf1894932009-06-13 15:55:42 -070012009-06-13 Ulrich Drepper <drepper@redhat.com>
2
3 * ldgeneric.c: Don't use deprecated libelf functions.
4 * nm.c: Likewise.
5 * objdump.c: Likewise.
6 * readelf.c: Likewise.
7 * size.c: Likewise.
8 * strip.c: Likewise.
9 * unstrip.c: Likewise.
10 * ld.h: Fix up comment.
11
Ulrich Drepperb47d2902009-06-01 07:38:32 -0700122009-06-01 Ulrich Drepper <drepper@redhat.com>
13
14 * readelf.c (print_relocs): Expect ELF header argument and pass on
15 to handle_relocs_rel* functions. Adjust caller.
16 (handle_relocs_rel): Add ELF header argument. Add special case for
17 the IRELATIVE relocations in statically linked executables.
18 (handle_relocs_rela): Likewise.
19
Roland McGrathdb19f0b2009-05-07 18:44:27 -0700202009-04-29 Ulrich Drepper <drepper@redhat.com>
21
22 * elflint.c (check_symtab): Add tests of st_other field.
23
Ulrich Drepperaab90f92009-04-23 07:44:36 -0700242009-04-23 Ulrich Drepper <drepper@redhat.com>
25
26 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
27
Roland McGrathd86e1832009-04-20 00:49:33 -0700282009-04-20 Roland McGrath <roland@redhat.com>
29
Roland McGrath8a592412009-04-20 01:20:44 -070030 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
31 of inline call sites.
32
Roland McGrathd86e1832009-04-20 00:49:33 -070033 * addr2line.c (just_section): New variable.
34 (adjust_to_section): New function, broken out of ...
35 (handle_address): ... here.
36 (options, parse_opt): Add -j/--section=NAME to set it.
37
Roland McGrath2fb90512009-04-15 14:47:13 -0700382009-04-15 Roland McGrath <roland@redhat.com>
39
40 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
41 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
42
Roland McGrath04a14162009-04-14 01:02:17 -0700432009-04-14 Roland McGrath <roland@redhat.com>
44
Roland McGratheb9ba472009-04-14 18:44:45 -070045 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
46 like SHT_GNU_ATTRIBUTES.
47
Roland McGrath94f43832009-04-14 04:39:32 -070048 * readelf.c (handle_core_registers): Fix error message.
49
Roland McGrath04a14162009-04-14 01:02:17 -070050 * strip.c (handle_elf: check_preserved): Don't note any change when
51 .debug_data is already filled from a previous pass.
52
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800532009-02-05 Ulrich Drepper <drepper@redhat.com>
54
Ulrich Drepper51b3f472009-02-05 22:10:39 -080055 * objdump.c (show_relocs_x): Minor cleanups.
56
Ulrich Drepper411cdb22009-02-05 22:04:26 -080057 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -080058 Print first DW_CFA_expression and DW_CFA_val_expression parameter
59 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -080060
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800612009-02-01 Ulrich Drepper <drepper@redhat.com>
62
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080063 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
64 into ...
65 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -080066 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080067
Ulrich Dreppercbb422e2009-02-01 18:18:55 -080068 * objdump.c (show_relocs_rela): Show offsets as signed values.
69
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080070 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
71 Improve some error messages.
72 Use program_invocation_short_name instead of AR macro.
73 * Makefile.am (CFLAGS_ar): Remove.
74 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
75 * objdump.c (parse_opt): Likewise.
76 * readelf.c (parse_opt): Likewise.
77
Roland McGrath51f01282009-01-27 17:08:03 -0800782009-01-27 Roland McGrath <roland@redhat.com>
79
80 * readelf.c (print_ops): Notice short length, don't overrun buffer
81 (still need to fix LEB128).
82
83 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
84
85 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
86
Ulrich Drepper62c46532009-01-24 17:01:08 -0800872009-01-24 Ulrich Drepper <drepper@redhat.com>
88
89 * readelf.c (print_debug_frame_section): Fix computation of vma_base
90 for PC-relative mode.
91
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800922009-01-23 Ulrich Drepper <drepper@redhat.com>
93
Ulrich Drepperccccab02009-01-23 16:32:21 -080094 * size.c (process_file): When handling archive, close file descriptor
95 here. For unknown file format also close file descriptor.
96 (handle_ar): Don't close file descriptor here.
97
Ulrich Drepperd7285e12009-01-23 16:10:44 -080098 * readelf.c (parse_opt): Move code to add to dump_data_sections and
99 string_sections list in local function add_dump_section. Adjust 'x'
100 key handling. For 'a' key add .strtab, .dynstr, and .comment section
101 to string_sections list.
102
Roland McGrathe9de9b42009-01-22 13:05:40 -08001032009-01-22 Roland McGrath <roland@redhat.com>
104
Roland McGrath9a847e12009-01-22 19:55:00 -0800105 * readelf.c (print_phdr): Don't print section mapping when no sections.
106
Roland McGrathd759aa62009-01-22 19:17:07 -0800107 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
108
Roland McGrathcabeeee2009-01-22 13:17:45 -0800109 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
110 and reset it only for the 'true' cases.
111
112 * Makefile.am (addr2line_no_Wformat): New variable.
113
Roland McGrathe9de9b42009-01-22 13:05:40 -0800114 * readelf.c (print_debug_frame_section): Use t instead of j formats
115 for ptrdiff_t OFFSET.
116
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001172009-01-21 Ulrich Drepper <drepper@redhat.com>
118
119 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800120 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800121 (check_exception_data): First sanity test.
122
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001232009-01-17 Ulrich Drepper <drepper@redhat.com>
124
Ulrich Drepper935edde2009-01-17 16:06:42 -0800125 * readelf.c (print_debug_exception_table): Show target of ar_disp
126 field.
127
128 * elflint.c (check_program_header): Add most consistency checks for
129 PT_GNU_EH_FRAME entry.
130
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800131 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
132 ARGP_PROGRAM_BUG_ADDRESS_DEF.
133 * ar.c: Likewise.
134 * elfcmp.c: Likewise.
135 * elflint.c: Likewise.
136 * findtextrel.c: Likewise.
137 * ld.c: Likewise.
138 * nm.c: Likewise.
139 * objdump.c: Likewise.
140 * ranlib.c: Likewise.
141 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800142
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800143 * size.c: Likewise.
144 * strings.c: Likewise.
145 * strip.c: Likewise.
146 * unstrip.c: Likewise.
147
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001482009-01-16 Ulrich Drepper <drepper@redhat.com>
149
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800150 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
151 matches .eh_frame_hdr section, if it is available. Also check that
152 the segment is allocated, not writable, not executable.
153
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800154 * readelf.c: Add -e option. Dump exception and unwind related
155 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800156 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800157 (print_debug_exception_table): Beginning of support.
158 (print_debug): Hook up print_debug_exception_table for
159 .gcc_except_table sections.
160
161 * readelf.c (print_debug_frame_section): Some fixes for last change.
162
Ulrich Drepper351bf202009-01-15 20:18:40 -08001632009-01-15 Ulrich Drepper <drepper@redhat.com>
164
165 * readelf.c (print_encoding): Now a toplevel function.
166 (print_relinfo): Likewise.
167 (print_encoding_base): Broken out of print_debug_frame_section.
168 (print_debug_frame_section): Print different header for .eh_frame
169 sections. Fix recognition of matching CIEs in .debug_frame sections.
170 Print absolute offset for PC-relative FDE locations. Don't print
171 table header for FDEs if the table is empty.
172 (read_encoded): New function.
173 (print_debug_frame_hdr_section): New function.
174 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
175 sections.
176
177 * readelf.c (handle_relocs_rel): Print section number.
178 (print_debug_abbrev_section): Likewise.
179 (print_debug_aranges_section): Likewise.
180 (print_debug_ranges_section): Likewise.
181 (print_debug_info_section): Likewise.
182 (print_debug_line_section): Likewise.
183 (print_debug_loc_section): Likewise.
184 (print_debug_macinfo_section): Likewise.
185 (print_debug_pubnames_section): Likewise.
186 (print_debug_str_section): Likewise.
187
Ulrich Drepper8b394632009-01-10 18:29:56 -08001882009-01-10 Ulrich Drepper <drepper@redhat.com>
189
190 * strings.c (read_block): Fix typo in error message string.
191
Ulrich Drepper87cf5832009-01-07 20:39:21 -08001922009-01-07 Ulrich Drepper <drepper@redhat.com>
193
194 * ld.c (ld_new_searchdir): Fix adding to search path list.
195
Ulrich Drepperac194d02009-01-06 00:30:01 -08001962009-01-06 Ulrich Drepper <drepper@redhat.com>
197
198 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800199
Roland McGrath3614d992009-01-05 18:05:32 -08002002009-01-05 Roland McGrath <roland@redhat.com>
201
202 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
203 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800204
Ulrich Drepper44173ed2009-01-01 19:00:41 -08002052009-01-01 Ulrich Drepper <drepper@redhat.com>
206
207 * addr2line.c: Update copyright year.
208 * ar.c: Likewise.
209 * elfcmp.c: Likewise.
210 * elflint.c: Likewise.
211 * findtextrel.c: Likewise.
212 * ld.c: Likewise.
213 * nm.c: Likewise.
214 * objdump.c: Likewise.
215 * ranlib.c: Likewise.
216 * readelf.c: Likewise.
217 * size.c: Likewise.
218 * strings.c: Likewise.
219 * strip.c: Likewise.
220 * unstrip.c: Likewise.
221
Roland McGrath468fe4d2008-12-11 21:00:12 -08002222008-12-11 Roland McGrath <roland@redhat.com>
223
224 * nm.c (sym_name): New function.
225 (show_symbols_sysv): Use it in place of elf_strptr.
226 (show_symbols_bsd, show_symbols_posix): Likewise.
227 Fixes RHBZ#476136.
228
229 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
230 elf_strptr fails.
231
Roland McGratha845f682008-12-03 03:41:58 +00002322008-12-02 Roland McGrath <roland@redhat.com>
233
234 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
235 nonzero OFFSET argument to dwfl_getmodules.
236
Roland McGrath1d8bb252008-08-07 08:39:41 +00002372008-08-07 Roland McGrath <roland@redhat.com>
238
239 * addr2line.c (main): Pass string to handle_address.
240 (see_one_module): New function, subroutine of handle_address.
241 (find_symbol): Likewise.
242 (handle_address): Take string argument rather than address.
243 Convert plain number, or handle strings like "(section)+offset"
244 or "symbol+offset".
245
2462008-08-01 Roland McGrath <roland@redhat.com>
247
248 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
249 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
250
251 * readelf.c (convert): Take new argument SIZE.
252 (handle_core_register, handle_core_item): Update callers.
253 (handle_core_item): Take new arg REPEATED_SIZE.
254 (handle_core_items): Special case for a singleton item,
255 let handle_core_item handle repeats if it wants to.
256
257 * readelf.c (handle_core_items): Give abridged output
258 for identical groups repeated more than twice.
259
2602008-07-04 Roland McGrath <roland@redhat.com>
261
262 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
263
Roland McGrath521c47d2008-04-11 07:01:58 +00002642008-04-10 Roland McGrath <roland@redhat.com>
265
266 * strip.c (handle_elf): Don't keep sections that kept symbol tables
267 refer to. Instead, just be sure to preserve the original symbol
268 table in the debug file so those symbols go with their sections and
269 can be elided from the stripped version of the symbol table.
270
271 * strip.c (handle_elf): When a discarded section kept in the debug
272 file refers to a nondiscard section via sh_link/sh_info, preserve
273 that nondiscarded section unmodified in the debug file as well.
274 Skip adjustment of discarded sections symbol table references when
275 that symbol table is copied in this way.
276
277 * elflint.c (check_symtab): Don't crash from missing symbol names
278 after diagnosing bogus strtab.
279
280 * strip.c (handle_elf): Cosmetic cleanup in special section contents
281 adjustment for symtab changes.
282
Roland McGrath13b69602008-04-01 02:30:05 +00002832008-03-31 Roland McGrath <roland@redhat.com>
284
285 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
286 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
287 excuse a special section.
288
2892008-03-27 Roland McGrath <roland@redhat.com>
290
291 * elflint.c (check_sections): Check that executability and writability
292 of sections is reflected in segment p_flags.
293
Roland McGrathd11f9cb2008-03-26 20:51:59 +00002942008-03-26 Roland McGrath <roland@redhat.com>
295
296 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
297 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
298 is valid in RELRO.
299
Roland McGrath47c5c352008-02-29 10:17:16 +00003002008-02-29 Roland McGrath <roland@redhat.com>
301
302 * readelf.c (print_attributes): Add a cast.
303 * elflint.c (check_attributes): Likewise.
304
305 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
306 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
307 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
308
Ulrich Drepper834de6f2008-02-23 06:50:01 +00003092008-02-03 Ulrich Drepper <drepper@redhat.com>
310
311 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
312 when linked into executable.
313 (elf_i386_create_relocations): Likewise.
314
Roland McGrath059c83e2008-02-21 06:19:39 +00003152008-02-20 Roland McGrath <roland@redhat.com>
316
317 * readelf.c (print_attributes): New function.
318 (process_elf_file): Call it under -A.
319
320 * elflint.c (check_attributes): Implement it for real.
321
3222008-02-19 Roland McGrath <roland@redhat.com>
323
324 * elflint.c (special_sections): Handle .gnu.attributes section.
325 (check_sections): Likewise.
326 (check_attributes): New function.
327
3282008-02-10 Roland McGrath <roland@redhat.com>
329
330 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
331 sections and ET_REL files.
332
Ulrich Drepper712d78e2008-02-02 10:01:53 +00003332008-02-02 Ulrich Drepper <drepper@redhat.com>
334
335 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
336 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
337 and R_386_TLS_LE.
338 (elf_i386_create_relocations): Likewise.
339 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
340 elements.
341 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
342 (ld_generic_create_outfile): Add PT_TLS entry to program header.
343 Fix generation of PT_GNU_STACK entry.
344
Ulrich Drepperc54785a2008-02-01 18:05:21 +00003452008-02-01 Ulrich Drepper <drepper@redhat.com>
346
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000347 * ld.c (replace_args): Prevent loop over replacements if the parameter
348 is only two characters long.
349
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000350 * ld.c: Recognize sha1 argument for --build-id parameter.
351 * ldgeneric.c (create_build_id_section): Handle sha1.
352 (compute_hash_sum): New function. Broken out of compute_build_id.
353 Take hash function and context as parameters.
354 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
355 implementation.
356
Ulrich Drepper89759c72008-01-31 19:44:12 +00003572008-01-31 Ulrich Drepper <drepper@redhat.com>
358
359 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
360 * ld.c: Recognize --build-id command line parameter.
361 * ld.h: Define scn_dot_note_gnu_build_id.
362 (struct ld_state): Add build_id and buildidscnidx elements.
363 * ldgeneric.c: Implement --build-id command line parameter.
364 * ldlex.l (ID): Recognize - as valid character after the first one.
365
Ulrich Drepper5530ec52008-01-29 10:42:07 +00003662008-01-29 Ulrich Drepper <drepper@redhat.com>
367
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000368 * ld.c (replace_args): New function.
369 (main): Use it to rewrite old-style parameters.
370
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000371 * elf32-i386.script: Add .gnu.hash section.
372 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
373 (fillin_special_symbol): Initialize st_size.
374 (sortfct_hashval): New function.
375 (create_gnu_hash): New function.
376 (create_hash): New function.
377 (ld_generic_create_outfile): Use the new functions to create the
378 hash tables.
379
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000380 * elflint.c (check_gnu_hash): Fix index value printed in error message.
381
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00003822008-01-24 Ulrich Drepper <drepper@redhat.com>
383
384 * elflint.c (check_group): Check that signature symbol for section
385 group is not an empty string.
386 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
387 section. Start implementation of --hash-style.
388 * i386_ld.c: Likewise.
389 * ld.c: Recognize --hash-style.
390 * ld.h (struct scninfo): Add comdat_group.
391 Add additional parameter to finalize_plt callback.
392
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00003932008-01-22 Ulrich Drepper <drepper@redhat.com>
394
395 * ld.h (struct callbacks): Add initialize_gotplt.
396 (struct scnhead): Add scn_dot_gotplt.
397 (struct ld_state): Add gotpltscnidx.
398 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
399 (elf_i386_initialize_pltrel): Likewise.
400 (elf_i386_initialize_got): There is now a separate .got.plt, so
401 don't do the PLT-related work here. Initialize d_type.
402 (elf_i386_initialize_gotplt): New function.
403 (elf_i386_plt0): Use ud2a after indirect jump.
404 (elf_i386_pic_plt0_entry): Likewise.
405 (elf_i386_finalize_plt): Reference now .got.plt.
406 (elf_i386_count_relocations): For GOT entries which need no relocation
407 don't bump nrel_got.
408 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
409 handling for split .got/.got.plt.
410 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
411 * elf32-i386.script: Sort sections for security. There are no .got
412 input sections. Add .got.plt.
413 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
414 (ld_generic_create_outfile): Initialize .got.plt section.
415 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
416
Ulrich Drepperd9488292008-01-20 16:43:15 +00004172008-01-19 Ulrich Drepper <drepper@redhat.com>
418
419 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
420 symbols are not carried over into statically linked output files.
421 Add dummy entries for more TLS relocations.
422
423 * ld.c (options): Add long names for -( and -).
424
425 * ldgeneric.c (check_definition): For newly found definitions don't
426 mark section as used if symbol is absolute.
427 (extract_from_archive): Only assign archive sequence number the first
428 time the archive is handled. Update ld_state.last_archive_used
429 if any symbol was used. Remove nround variable.
430 (file_process2): When using symbol from an archive, update
431 ld_state.group_start_archive, ld_state.archives, and
432 ld_state.tailarchives.
433 (ld_generic_file_process): If group is not handled anymore, after
434 freeing ELF handles for the archives, clear ld_state.archives and
435 *nextp. Fix wrong logic in recognizing first iteration of group
436 loop. When clearing flags, also clear ld_state.group_start_archive.
437
Ulrich Drepper5eee1222008-01-11 10:12:18 +00004382008-01-11 Ulrich Drepper <drepper@redhat.com>
439
440 * objdump.c (show_disasm): Adjust disassembler format string for
441 removal of %e.
442
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00004432008-01-04 Roland McGrath <roland@redhat.com>
444
Roland McGrath059c83e2008-02-21 06:19:39 +0000445 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
446 a size greater than the items cover means multiple sets of items.
447 (handle_core_note): Update caller.
448
4492008-01-04 Roland McGrath <roland@redhat.com>
450
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000451 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
452
4532008-01-03 Roland McGrath <roland@redhat.com>
454
455 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
456
457 * elflint.c (check_dynamic): Remove duplicate initializer.
458
Ulrich Drepperad024af2008-01-02 17:42:52 +00004592008-01-02 Ulrich Drepper <drepper@redhat.com>
460
461 * addr2line.c: Update copyright year.
462 * ar.c: Likewise.
463 * elfcmp.c: Likewise.
464 * elflint.c: Likewise.
465 * findtextrel.c: Likewise.
466 * ld.c: Likewise.
467 * nm.c: Likewise.
468 * objdump.c: Likewise.
469 * ranlib.c: Likewise.
470 * readelf.c: Likewise.
471 * size.c: Likewise.
472 * strings.c: Likewise.
473 * strip.c: Likewise.
474 * unstrip.c: Likewise.
475
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00004762007-12-30 Ulrich Drepper <drepper@redhat.com>
477
478 * objdump (show_disasm): Use %e after third parameter.
479
4802007-12-21 Ulrich Drepper <drepper@redhat.com>
481
482 * strip.c: Fix wrong parenthesis in a few branch predictions.
483 * strings.c: Likewise.
484
4852007-12-20 Ulrich Drepper <drepper@redhat.com>
486
487 * Makefile.am (DEFS): Add DEBUGPRED.
488 * addr2line.c: Include debugpred.h.
489 * ar.c: Likewise.
490 * elfcmp.c: Likewise.
491 * elflint.c: Likewise.
492 * findtextrel.c: Likewise.
493 * nm.c: Likewise.
494 * objdump.c: Likewise.
495 * ranlib.c: Likewise.
496 * readelf.c: Likewise.
497 * size.c: Likewise.
498 * strings.c: Likewise.
499 * strip.c: Likewise.
500 * unstrip.c: Likewise.
501 * debugpred.h: New file.
502
503 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
504 (handle_relocs_rela): Likewise.
505
506 * readelf.c: Add lots of likely/unlikely.
507
508 * elflint.c: Minor cleanups.
509
Roland McGrath1a2e8f42007-12-15 23:39:34 +00005102007-11-19 Roland McGrath <roland@redhat.com>
511
512 * readelf.c (print_ops): Handle all bad op codes gracefully.
513 Print their numbers instead of just ???.
514
Roland McGrath07a696e2007-11-09 22:44:26 +00005152007-11-09 Roland McGrath <roland@redhat.com>
516
517 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000518 Handle block forms to mean a DWARF expression for DW_AT_allocated,
519 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
520 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
521 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000522
Roland McGrathe4c22ea2007-10-23 13:07:39 +00005232007-10-20 Roland McGrath <roland@redhat.com>
524
525 * unstrip.c (options): Update -R description.
526 (struct symbol): Put symbol details a union with a size_t pointer
527 `duplicate'.
528 (compare_symbols_output): Use null ->name as marker for discard
529 symbols, not zero *->map.
530 (copy_elided_sections): Record forwarding pointers for discarded
531 duplicates and fill SYMNDX_MAP elements through them.
532
533 * readelf.c (process_file): Set offline_next_address to 0 at start.
534 (struct process_dwflmod_args): New type.
535 (process_dwflmod): Take args in it, pass fd to process_elf_file.
536 (process_file): Update caller; dup FD for passing to libdwfl.
537 (process_elf_file): Take new arg FD. For ET_REL file when
538 displaying data affected by libdwfl relocation, open a new Elf handle.
539
5402007-10-17 Roland McGrath <roland@redhat.com>
541
542 * readelf.c (print_debug_line_section): For invalid data inside a
543 unit with plausible length, keep printing at the next unit boundary.
544
545 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
546
5472007-10-16 Roland McGrath <roland@redhat.com>
548
549 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
550
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00005512007-10-15 Roland McGrath <roland@redhat.com>
552
553 * make-debug-archive.in: New file.
554 * Makefile.am (EXTRA_DIST): Add it.
555 (make-debug-archive): New target.
556 (bin_SCRIPTS, CLEANFILES): Add it.
557
5582007-10-10 Roland McGrath <roland@redhat.com>
559
560 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
561 Use it to check MERGE|STRINGS for .debug_str.
562 (check_sections): Handle exact_or_gnuld.
563
5642007-10-08 Roland McGrath <roland@redhat.com>
565
566 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
567 64-bit struct timeval with 32-bit tv_usec.
568
5692007-10-07 Roland McGrath <roland@redhat.com>
570
571 * readelf.c (check_archive_index): New function.
572 (process_file): Call it. Change signature to take only fd and name.
573 Use libdwfl to open the file, then iterate on its modules (multiple
574 for an archive) to print file name and call process_elf_file.
575 (main): Update caller. Let process_file do elf_begin.
576 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
577 (process_elf_file): Take only Dwfl_Module * argument.
578 Don't print the file name here.
579 (print_debug_*_section): Take Dwfl_Module * argument.
580 (print_debug): Likewise. Update caller.
581 (format_dwarf_addr): New function.
582 (print_debug_ranges_section): Use it.
583 (attr_callback): Likewise.
584 (print_debug_line_section, print_debug_loc_section): Likewise.
585
586 * readelf.c (print_debug_ranges_section): Translate all strings.
587 (print_debug_loc_section): Likewise.
588
589 * unstrip.c (copy_elided_sections): Initialize SEC.
590
591 * ar.c (do_oper_insert): Put trailing / on short names.
592
593 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
594
595 * arlib2.c (arlib_add_long_name): Adjust for header size.
596
597 * arlib.c (arlib_finalize): Pad long name table to keep size even.
598
599 * ar.c (do_oper_insert): Use write_retry for padding write.
600
601 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
602 Unconditionally set FOUND[CNT]->elf when setting ->mem.
603 (remember_long_name): New function.
604 (do_oper_insert): Call it. Correctly use length of basename,
605 not original name. Don't store long name twice for new member.
606
6072007-10-06 Roland McGrath <roland@redhat.com>
608
609 * elflint.c (check_note): Skip empty segment.
610 (check_note_section): Skip empty section.
611
612 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
613 (handle_output_dir_module, handle_implicit_modules): Pass it down.
614 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
615 (compare_alloc_sections): Take new arg REL, ignore address if true.
616 (compare_sections): Likewise, pass it down.
617 (compare_sections_rel, compare_sections_nonrel): New functions.
618 (find_alloc_sections_prelink, copy_elided_sections): Use them
619 instead of compare_sections.
620 (sections_match): New function, broken out of ...
621 (find_alloc_section): ... here.
622 (copy_elided_sections): Reorganize section match-up logic.
623 Use sections_match for SHF_ALLOC in ET_REL.
624 For ET_REL, let the nonzero sh_addr from the debug file dominate.
625
626 * unstrip.c (add_new_section_symbols): Take new arg REL.
627 When true, do not update section symbol values.
628 (collect_symbols): Likewise. Update section symbols with address
629 of chosen output section, not original section.
630 (check_symtab_section_symbols, copy_elided_sections): Update callers.
631
632 * unstrip.c (compare_alloc_sections): At the same address, preserve
633 original section order.
634
635 * elflint.c (special_sections): Don't require MERGE|STRINGS for
636 .debug_str, it didn't always have them with older tools.
637
638 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
639
6402007-10-05 Roland McGrath <roland@redhat.com>
641
642 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
643 ET_REL file.
644
645 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
646 SHN_UNDEF as "bad section". Use shndx value in messages.
647
648 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
649 for ".debug" so it matches as a prefix.
650 (IS_KNOWN_SPECIAL): New macro.
651 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
652 type even under -d, for a .debug* or .shstrtab section.
653
654 * readelf.c (print_ops): Use hex for address operand.
655
6562007-10-04 Roland McGrath <roland@redhat.com>
657
658 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
659 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
660 sections mapped to SHN_UNDEF.
661
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00006622007-10-04 Ulrich Drepper <drepper@redhat.com>
663
664 * readelf.c (dump_archive_index): Avoid warning about uninitialized
665 variable with older glibc versions.
666 Add some branch prediction.
667
Roland McGrath59ea7f32007-10-04 08:50:09 +00006682007-10-04 Roland McGrath <roland@redhat.com>
669
670 * readelf.c (print_archive_index): New variable.
671 (options, parse_opt): Accept -c/--archive-index to set it.
672 (dump_archive_index): New function.
673 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
674 Call dump_archive_index on archives if set.
675 (main): Update caller.
676 (any_control_option): Give it file scope, moved out of ...
677 (parse_opt): ... here.
678
6792007-10-03 Roland McGrath <roland@redhat.com>
680
681 * unstrip.c (struct arg_info): Add `list' flag.
682 (options, parse_opt): Grok -n/--list to set it.
683 (list_module): New function.
684 (handle_implicit_modules): Call it under -n.
685
686 * elflint.c (check_note_section): New function.
687 (check_sections): Call it for SHT_NOTE.
688
689 * readelf.c (handle_notes): Use sections when available.
690
691 * elflint.c (check_note_data): New function, broken out of ...
692 (check_note): ... here. Call it and elf_getdata_rawchunk.
693
694 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
695 Use elf_getdata_rawchunk and gelf_getauxv.
696 (handle_notes_data): New function, broken out of ...
697 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
698
Roland McGrath241ac022007-10-01 18:21:46 +00006992007-10-01 Roland McGrath <roland@redhat.com>
700
Roland McGrathac0a16c2007-10-01 18:50:35 +0000701 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
702
Roland McGrath241ac022007-10-01 18:21:46 +0000703 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
704
Roland McGrathc76f0b02007-09-27 07:31:33 +00007052007-09-10 Roland McGrath <roland@redhat.com>
706
707 * readelf.c (options): Give -p optional argument, alias --string-dump.
708 (string_sections, string_sections_tail): New static variables.
709 (parse_opt): Set them when -p has an argument.
710 (print_string_section): New function, broken out of ...
711 (print_strings): ... here. Call it.
712 (dump_data_section): New function, broken out of ...
713 (dump_data): ... here. Call it.
714 (for_each_section_argument): New function, broken out of ...
715 (dump_data): ... here. Call it.
716 (dump_strings): New function.
717
7182007-08-31 Roland McGrath <roland@redhat.com>
719
720 * readelf.c (print_strings): Typo fix.
721
Roland McGrathcb6d8652007-08-23 08:10:54 +00007222007-08-23 Roland McGrath <roland@redhat.com>
723
724 * readelf.c (printf_with_wrap): Function removed.
725 (REGISTER_WRAP_COLUMN): New macro.
726 (handle_core_register): Use print_core_item instead.
727 (struct register_info): New type.
728 (compare_registers, compare_register_sets): New functions.
729 (register_bitpos, compare_sets_by_info): New functions.
730 (handle_core_registers): Use those to segregate and sort registers
731 for display.
732
733 * readelf.c (ITEM_WRAP_COLUMN): New macro.
734 (print_core_item): New function.
735 (handle_core_item): Use it instead of printf_with_wrap.
736 (compare_core_items, compare_core_item_groups): New functions.
737 (handle_core_items): Use them. Sort by group and force line breaks
738 between groups.
739
740 * readelf.c (handle_core_registers, handle_core_items): New functions,
741 broken out of ...
742 (handle_core_note): ... here. Call them.
743
7442007-08-22 Roland McGrath <roland@redhat.com>
745
746 * unstrip.c (new_shstrtab): New function, broken out of ...
747 (copy_elided_sections): ... here.
748
7492007-08-20 Roland McGrath <roland@redhat.com>
750
751 Avoid local function trampolines in nm binary.
752 * nm.c (sort_by_address): Move to a static function instead of local
753 inside show_symbols.
754 (sort_by_name_strtab): New static variable.
755 (sort_by_name): Use it. Move to a static function instead of local
756 inside show_symbols.
757 (show_symbols): Set sort_by_name_strtab.
758
7592007-08-19 Roland McGrath <roland@redhat.com>
760
761 * readelf.c (handle_auxv_note): New function.
762 (handle_notes): Call it.
763
764 * readelf.c (printf_with_wrap, convert): New functions.
765 (handle_core_item, (handle_core_register): New functions.
766 (handle_notes): Call those with details from ebl_core_note.
767
Roland McGrath099dd522007-08-13 22:58:36 +00007682007-08-12 Roland McGrath <roland@redhat.com>
769
770 * elflint.c (check_note): Accept type 0 with name "Linux".
771
772 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
773
774 * elflint.c (section_flags_string): Return "none" for 0, not "".
775
Roland McGrathd8221722007-08-11 21:18:09 +00007762007-08-11 Roland McGrath <roland@redhat.com>
777
778 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
779
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00007802007-08-04 Ulrich Drepper <drepper@redhat.com>
781
782 * readelf.c (hex_dump): Use isprint to determine whether to print
783 character itself or full stop character.
784 (dump_data): No need to check endp for NULL after strtol call.
785
Roland McGrath60fc84c2007-08-03 21:59:15 +00007862007-08-03 Roland McGrath <roland@redhat.com>
787
788 * readelf.c (print_string_sections): New variable.
789 (options, parse_opt): Handle --strings/-p to set it.
790 (print_strings): New function.
791 (process_elf_file): Call it under -p.
792
793 * readelf.c (options): Add hidden aliases --segments, --sections,
794 as taken by binutils readelf.
795
7962007-08-01 Roland McGrath <roland@redhat.com>
797
798 * readelf.c (dump_data_sections, dump_data_sections_tail):
799 New variables.
800 (options, parse_opt): Handle --hex-dump/-x, set them.
801 (hex_dump): New function.
802 (dump_data): New function, call it.
803 (process_elf_file): Call it.
804
8052007-07-25 Roland McGrath <roland@redhat.com>
806
807 * addr2line.c (show_symbols): New variable.
808 (print_addrsym): New function.
809 (handle_address): Call it.
810 (options, parse_opt): Handle -S/--symbols.
811
Ulrich Drepperb0243862007-06-06 00:09:36 +00008122007-06-05 Ulrich Drepper <drepper@redhat.com>
813
814 * addr2line.c: Update for latest autoconf header.
815 * ar.c: Likewise.
816 * elfcmp.c: Likewise.
817 * elflint.c: Likewise.
818 * findtextrel.c: Likewise.
819 * ld.c: Likewise.
820 * ldgeneric.c: Likewise.
821 * nm.c: Likewise.
822 * objdump.c: Likewise.
823 * ranlib.c: Likewise.
824 * readelf.c: Likewise.
825 * size.c: Likewise.
826 * strings.c: Likewise.
827 * strip.c: Likewise.
828 * unstrip.c: Likewise.
829
Roland McGrath9aa8ef72007-05-18 08:59:43 +00008302007-05-18 Roland McGrath <roland@redhat.com>
831
832 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
833 stripped file, so as not to duplicate a section copied in both.
834
835 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
836
8372007-05-17 Roland McGrath <roland@redhat.com>
838
839 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
840
841 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
842
843 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
844 call make_directories here.
845 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
846 (handle_dwfl_module): Likewise.
847 (handle_implicit_modules): Update callers.
848 (handle_output_dir_module): Likewise. Don't do make_directories here.
849
850 * unstrip.c (get_section_name): New function, broken out of ...
851 (copy_elided_sections): here. Update callers.
852 (find_alloc_section): Broken out of ...
853 (copy_elided_sections): ... here. Update caller.
854 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
855 update STT_SECTION symbols' st_value fields as a side effect.
856 (check_symtab_section_symbols): Update caller.
857 (add_new_section_symbols): Set st_value in symbols added.
858 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
859 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
860 from .bss to .dynbss.
861 (find_alloc_sections_prelink): New function. Associate debug file
862 allocated SHT_NOBITS shdrs with stripped moved by prelink via
863 .gnu.prelink_undo information.
864 (copy_elided_sections): Call it when we couldn't find every allocated
865 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
866 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
867 (handle_file): Update callers.
868
869 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
870 named ".comment".
871
872 * elflint.c (check_sections): Fix association of segments with
873 sections when p_memsz > p_filesz.
874
8752007-04-29 Roland McGrath <roland@redhat.com>
876
877 * addr2line.c (options, main): Tweak argp group settings to fix
878 usage output.
879
8802007-04-28 Roland McGrath <roland@redhat.com>
881
882 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
883 sizes to match sections adjusted in the stripped file.
884
Roland McGrath4be15242007-04-25 03:09:33 +00008852007-04-24 Roland McGrath <roland@redhat.com>
886
887 * elfcmp.c (OPT_HASH_INEXACT): New macro.
888 (hash_inexact): New variable.
889 (options, parse_opt): Add --hash-inexact option to set it.
890 (hash_content_equivalent): New function.
891 (main): Call it for differing SHT_HASH sections under --hash-inexact.
892
8932007-04-23 Roland McGrath <roland@redhat.com>
894
895 * unstrip.c: New file.
896 * Makefile.am (bin_PROGRAMS): Add it.
897 (unstrip_LDADD): New variable.
898
899 * strip.c (options): Allow --output for -o.
900
Ulrich Drepper8b383102007-02-16 00:31:57 +00009012007-02-15 Ulrich Drepper <drepper@redhat.com>
902
903 * readelf.c: Remove unused code. Add a few consts.
904
Ulrich Drepper903c1162007-02-15 19:40:37 +00009052007-02-15 Roland McGrath <roland@redhat.com>
906
907 * readelf.c (print_debug): Fix brainos in SHDR test.
908
Roland McGrathf82a1ec2007-02-06 04:47:44 +00009092007-02-05 Roland McGrath <roland@redhat.com>
910
911 * ar.c: Include <limits.h>, since we use LONG_MAX.
912
Ulrich Drepper0fe63532007-02-05 21:05:51 +00009132007-02-05 Ulrich Drepper <drepper@redhat.com>
914
Ulrich Drepper8b383102007-02-16 00:31:57 +0000915 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000916 ignore fchown's return value.
917 (do_oper_insert): Handle error when writing padding.
918 * ranlib.c: Add fchown complain work around.
919
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000920 * arlib.c: Make symtab a global variable. Change all users.
921 * arlib2.c: Likewise.
922 * ranlib.c: Likewise.
923 * ar.c: Likewise.
924 * arlib.h: Declare it.
925
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00009262007-01-11 Roland McGrath <roland@redhat.com>
927
928 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
929 SHF_MASKPROC bits separately from generic sh_flags validation.
930
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00009312007-02-04 Ulrich Drepper <drepper@redhat.com>
932
933 * ar.c: New file.
934 * arlib.c: New file.
935 * arlib2.c: New file.
936 * arlib.h: New file.
937 * Makefile (noinst_LIBRARIES): Add libar.
938 (libar_a_SOURCES): Define.
939 (ar_LDADD): Define.
940 (CFLAGS_ar): Define.
941 * ranlib.c: Change to use arlib.
942
943 * elflint.c (check_symtab): Work around GNU ld bug which omits
944 sections but not symbols in those sections.
945
Ulrich Drepperb770cf92007-01-10 21:02:34 +00009462007-01-10 Ulrich Drepper <drepper@redhat.com>
947
948 * addr2line.c: Update copyright year.
949 * elfcmp.c: Likewise.
950 * elflint.c: Likewise.
951 * findtextrel.c: Likewise.
952 * ld.c: Likewise.
953 * nm.c: Likewise.
954 * objdump.c: Likewise.
955 * ranlib.c: Likewise.
956 * readelf.c: Likewise.
957 * size.c: Likewise.
958 * strings.c: Likewise.
959 * strip.c: Likewise.
960
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00009612006-12-09 Ulrich Drepper <drepper@redhat.com>
962
963 * elflint.c (compare_hash_gnu_hash): New function. Report if the
964 two hash tables have different content (module expected omission
965 of undefined symbols).
966
Roland McGrath8190db62006-12-17 23:56:51 +00009672006-10-31 Roland McGrath <roland@redhat.com>
968
969 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000970 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000971
9722006-09-19 Jakub Jelinek <jakub@redhat.com>
973
974 * strip.c (process_file): Disallow -f on archives.
975
9762006-10-09 Roland McGrath <roland@redhat.com>
977
978 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
979
Roland McGrathc373d852006-10-10 00:25:21 +00009802006-08-29 Roland McGrath <roland@redhat.com>
981
982 * Makefile.am (MAINTAINERCLEANFILES): New variable.
983
984 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
985 Reported by Christian Aichinger <Greek0@gmx.net>.
986
987 * elflint.c (valid_e_machine): Add EM_ALPHA.
988 Reported by Christian Aichinger <Greek0@gmx.net>.
989
Ulrich Drepper231c5902006-08-08 22:00:11 +00009902006-08-08 Ulrich Drepper <drepper@redhat.com>
991
992 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
993 Keep track of which "high DT" entries are present.
994 Check that either old or GNU-style hash table is present.
995 If GNU-style hash table is used a symbol table is mandatory.
996 Check that if any prelink entry is present all of them are.
997 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
998 table if they don't refer to functions.
999
Roland McGrath858b1892006-07-17 08:41:15 +000010002006-07-17 Roland McGrath <roland@redhat.com>
1001
1002 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1003 (add_version): Likewise for argument.
1004 (check_versym): Cast constant to GElf_Versym for comparison.
1005
Roland McGrath4ec807e2006-07-13 03:59:46 +000010062006-07-12 Roland McGrath <roland@redhat.com>
1007
1008 * readelf.c (handle_gnu_hash): Add casts for machines where
1009 Elf32_Word != unsigned int.
1010
Ulrich Drepperdcf61602006-07-12 19:59:02 +000010112006-07-12 Ulrich Drepper <drepper@redhat.com>
1012
1013 * elflint.c (check_sysv_hash64): Fix printf format.
1014
Ulrich Dreppercc415622006-07-12 19:42:23 +000010152006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001016
Ulrich Dreppercc415622006-07-12 19:42:23 +00001017 * addr2line.c (options): English fix in -f doc string.
1018
1019 * addr2line.c (use_comp_dir): New variable.
1020 (options, parse_opt): Grok -A/--absolute to set it.
1021 (handle_address): If set, prepend dwfl_line_comp_dir results to
1022 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001023
Ulrich Drepper28ed8952006-07-07 03:43:47 +000010242006-07-06 Ulrich Drepper <drepper@redhat.com>
1025
1026 * elflint.c: Adjust for latest new hash table format.
1027 * readelf.c: Likewise.
1028
1029 * elflint.c (check_versym): Ignore hidden bit when comparing version
1030 numbers.
1031
10322006-07-05 Ulrich Drepper <drepper@redhat.com>
1033
1034 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1035 discarded COMDAT symbols.
1036
1037 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1038 (elf_i386_create_relocations): Likewise.
1039 * ld.h (struct symbol): Add local and hidden bits.
1040 * ld.c (create_special_section_symbol): These synthsized symbols
1041 are local and hidden.
1042 * ldgeneric.c (file_process2): Check whether input file matches
1043 the emulation.
1044 (fillin_special_symbol): Create symbols as local and/or hidden
1045 if requested.
1046 (ld_generic_create_outfile): Make local copy of symbol.
1047 Don't hide global, defined symbols in dynamic symbol table unless
1048 requested. Synthetic symbols have no version information.
1049
1050 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1051 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1052
10532006-07-04 Ulrich Drepper <drepper@redhat.com>
1054
1055 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1056 testing.
1057
10582006-07-03 Ulrich Drepper <drepper@redhat.com>
1059
1060 * elflint.c: Add testing of DT_GNU_HASH.
1061 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1062
1063 * Makefile.am: Add hacks to create dependency files for non-generic
1064 linker.
1065
Ulrich Drepper6ca46002006-06-12 22:40:23 +000010662006-06-12 Ulrich Drepper <drepper@redhat.com>
1067
1068 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1069 section if creating a DSO and no interpreter is given.
1070 (ld_generic_create_outfile): Don't store reference to symbols in
1071 discarded COMDAT groups. Don't create PHDR and INTERP program header
1072 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001073 (create_verneed_data): Pretty printing.
1074
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001075 * ldscript.y (content): If a DSO is created don't set default
1076 interpreter from linker script.
1077
1078 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1079 for symbols in discarded COMDAT groups.
1080 (elf_i386_create_relocations): Likewise.
1081 * ld.h (struct scninfo): Add unused_comdat.
1082 * ldgeneric.c (add_section): Also check group signature when
1083 matching COMDAT sections.
1084 (add_relocatable_file): Ignore symbols in COMDAT group which are
1085 discarded.
1086
1087 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1088 and symbol reference.
1089
Ulrich Drepper54f33a72006-06-11 09:07:37 +000010902006-06-11 Ulrich Drepper <drepper@redhat.com>
1091
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001092 * elflint.c (check_dynamic): Fix checking value of tags which are
1093 offsets in the string section. Make sure DT_STRTAB points to the
1094 section referenced in sh_link.
1095
1096 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1097
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001098 * ld.c: Recognize --eh-frame-hdr option.
1099 * ld.h (struct ld_state): Add eh_frame_hdr field.
1100 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1101
1102 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1103 SH_FLAGS_COMBINE.
1104 (add_relocatable_file): Minor optimization of last change.
1105 (match_section): Don't preserve SHF_GROUP flag any longer.
1106
Ulrich Drepper2d880282006-06-11 00:20:43 +000011072006-06-10 Ulrich Drepper <drepper@redhat.com>
1108
1109 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001110 Handle record and ignore as position dependent options.
1111 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001112 * ld.h (struct ld_state): Add execstack field.
1113 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1114 sections.
1115 (ld_generic_create_outfile): Fix program header creation in native
1116 linker. Add PT_GNU_STACK program header.
1117
Ulrich Dreppera688a732006-06-10 06:33:00 +000011182006-06-09 Ulrich Drepper <drepper@redhat.com>
1119
1120 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1121 for PLT entries if there is no local definition.
1122
1123 * ld.c (parse_option): Handle -z ignore like --as-needed and
1124 -z record like --no-as-needed.
1125 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1126 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1127 looping over DSOs. When deciding about adding DT_NEEDED entries
1128 use ->as_needed instead of ignore_unused_dsos.
1129
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000011302006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001131
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001132 * ld.c: Recognize --as-needed and --no-as-needed options.
1133 * ld.h (struct usedfile): Add as_needed field.
1134 (struct ld_state): Likewise.
1135 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1136 the list.
1137 * ldscript.y (filename_id_list): Split to correctly parse all
1138 combinations.
1139 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001140
Ulrich Drepper697f4db2006-06-10 06:50:47 +000011412006-05-28 Ulrich Drepper <drepper@redhat.com>
1142
1143 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1144 and colno.
1145
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000011462006-05-27 Ulrich Drepper <drepper@redhat.com>
1147
1148 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001149 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001150
Ulrich Drepper82c345d2006-04-04 22:07:54 +000011512006-04-04 Ulrich Drepper <drepper@redhat.com>
1152
1153 * addr2line.c: Update copyright year.
1154 * elfcmp.c: Likewise.
1155 * elflint.c: Likewise.
1156 * findtextrel.c: Likewise.
1157 * ld.c: Likewise.
1158 * nm.c: Likewise.
1159 * objdump.c: Likewise.
1160 * ranlib.c: Likewise.
1161 * readelf.c: Likewise.
1162 * size.c: Likewise.
1163 * strings.c: Likewise.
1164 * strip.c: Likewise.
1165
Roland McGrathdd7e22b2006-03-09 23:05:47 +000011662006-03-09 Roland McGrath <roland@redhat.com>
1167
1168 * Makefile.am (AM_LDFLAGS): New variable.
1169
Roland McGrath060fa052006-03-02 07:51:50 +000011702006-03-01 Roland McGrath <roland@redhat.com>
1171
1172 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1173 for dwarf.h changes matching 3.0 spec.
1174 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1175
Ulrich Drepper038129b2005-12-04 16:47:24 +000011762005-12-04 Ulrich Drepper <drepper@redhat.com>
1177
1178 * elflint.c (check_one_reloc): If relocation section is not loaded,
1179 don't check whether the relocations modify read-only sections or
1180 loaded and unloaded sections.
1181
Ulrich Drepper607e0542005-12-04 15:51:06 +000011822005-11-28 Ulrich Drepper <drepper@redhat.com>
1183
1184 * elflint.c (check_one_reloc): Take additional parameters. Use
1185 them to determine whether relocation is valid in this type of
1186 file. DSOs and executables can contain relocation sections in
1187 unloaded sections which just show the relocations the linker
1188 applied. Adjust all callers.
1189 (check_program_header): Check that PT_PHDR is loaded and that offset
1190 matches the one in the ELF header.
1191
Roland McGrath6724c902005-10-28 07:07:19 +000011922005-10-26 Roland McGrath <roland@redhat.com>
1193
1194 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1195
Ulrich Drepperd0449522005-09-03 07:23:52 +000011962005-09-03 Ulrich Drepper <drepper@redhat.com>
1197
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001198 * strip.c (handle_elf): Unify some error messages.
1199 * ld.c (main): Likewise.
1200 * ldgeneric.c (open_elf): Likewise.
1201 * elfcmp.c (main): Likewise.
1202 * elflint.c (check_elf_header): Likewise.
1203
1204 * size.c (process_file): Fix typo in error message.
1205
Ulrich Drepperd0449522005-09-03 07:23:52 +00001206 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1207
Ulrich Dreppera60501e2005-09-02 19:50:17 +000012082005-09-02 Ulrich Drepper <drepper@redhat.com>
1209
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001210 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001211 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001212
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000012132005-08-28 Ulrich Drepper <drepper@redhat.com>
1214
1215 * ranlib.c: Don't define pread_retry and write_retry here.
1216
1217 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1218 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1219
1220 * strings.c (process_chunk): Reorder expressions in conditional
1221 (process_chunk_mb): Likewise.
1222
1223 * strings.c: New file.
1224 * Makefile.am (bin_PROGRAMS): Add strings.
1225 (strings_no_Wstring): Define.
1226 (strings_LDADD): Define.
1227
Roland McGrath71e15a02005-08-27 10:33:26 +000012282005-08-27 Roland McGrath <roland@redhat.com>
1229
1230 * addr2line.c (dwarf_diename_integrate): Function removed.
1231 (print_dwarf_function): Use plain dwarf_diename.
1232
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000012332005-08-24 Ulrich Drepper <drepper@redhat.com>
1234
1235 * elflint.c (check_versym): Versioned symbols should not have
1236 local binding.
1237
Ulrich Drepper5d832292005-08-15 21:36:27 +000012382005-08-15 Ulrich Drepper <drepper@redhat.com>
1239
Ulrich Drepper61655e02005-08-16 04:23:02 +00001240 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1241 undefined.
1242
Ulrich Drepper5d832292005-08-15 21:36:27 +00001243 * Makefile.am: Add rules to build ranlib.
1244 * ranlib.c: New file.
1245
Roland McGrath18e13422005-08-15 08:01:25 +000012462005-08-14 Roland McGrath <roland@redhat.com>
1247
1248 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1249 sh_type it recognizes.
1250
1251 * elflint.c (check_sections): Print unknown flags in hex, don't
1252 truncate high bits. Print section number and name for unknown type.
1253
Roland McGrathf6895042005-08-13 20:56:52 +000012542005-08-13 Roland McGrath <roland@redhat.com>
1255
1256 * elflint.c (check_program_header): Use ebl_segment_type_name and
1257 allow any p_type it recognizes. Include p_type value in error
1258 message for unknown type.
1259
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000012602005-08-13 Ulrich Drepper <drepper@redhat.com>
1261
1262 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1263 to ebl_check_special_symbol.
1264 (check_sections): Pass ehdr to ebl_bss_plt_p.
1265
Roland McGrath653d3762005-08-13 01:59:10 +000012662005-08-12 Roland McGrath <roland@redhat.com>
1267
1268 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1269 refers to the right section if it's not SHN_ABS.
1270 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1271
1272 * elflint.c (check_sections): Don't complain about a non-NOBITS
1273 section taking no segment space, if it's sh_size is 0.
1274
1275 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1276 be PROGBITS or NOBITS.
1277
1278 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1279 standard st_value and st_size checks.
1280
Roland McGrath1c83bf12005-08-11 07:03:55 +000012812005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001282
Roland McGrath1c83bf12005-08-11 07:03:55 +00001283 * addr2line.c (options, parse_opt): Don't handle -e here.
1284 (executable): Variable removed.
1285 (argp_children): New static variable.
1286 (argp): Use it. Make const.
1287 (main): Fill in argp_children from dwfl_standard_argp ().
1288 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1289 (print_dwarf_function): New function. Try to figure out inline chain.
1290 (elf_getname): Function removed, libdwfl does it for us.
1291 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1292 Use dwfl_module_addrname instead of elf_getname.
1293 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1294 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1295
12962005-08-10 Ulrich Drepper <drepper@redhat.com>
1297
1298 * strip.c (parse_opt): STATE parameter is now used.
1299 Various little cleanups.
1300
1301 * readelf.c (print_debug_line_section): Correct fallout of renaming
1302 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001303
Roland McGrath8f31c2c2005-08-09 04:58:05 +000013042005-08-08 Roland McGrath <roland@redhat.com>
1305
1306 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1307 with binutils strip. Likewise -d, -S, as aliases for -g.
1308 Likewise ignore -s/--strip-all.
1309
Roland McGrath095a01b2005-08-08 03:49:35 +000013102005-08-07 Roland McGrath <roland@redhat.com>
1311
1312 * strip.c (process_file): Open read-only when using a different output
1313 file.
1314
Ulrich Drepper47be7952005-08-07 04:41:39 +000013152005-08-06 Ulrich Drepper <drepper@redhat.com>
1316
Ulrich Drepper637963b2005-08-07 05:33:07 +00001317 * elflint.c (in_nobits_scn): New function.
1318 (check_versym): Allow references for defined symbols against versions
1319 of other DSOs also for symbols in nobits sections.
1320 Move a few variables around.
1321
Ulrich Drepper47be7952005-08-07 04:41:39 +00001322 * Makefile.am (AM_CFLAGS): Avoid duplication.
1323 Link with statis libs if BUILD_STATIC.
1324
Ulrich Drepperdbace232005-08-06 01:37:23 +000013252005-08-05 Ulrich Drepper <drepper@redhat.com>
1326
1327 * elflint.c: Many, many more tests. Mostly related to symbol
1328 versioning. Those sections should now be completely checked.
1329
1330 * readelf.c (print_dynamic): Use gelf_offscn.
1331
Ulrich Drepperacb89832005-08-04 07:01:49 +000013322005-08-04 Ulrich Drepper <drepper@redhat.com>
1333
1334 * elflint.c: Add lots more tests: more extension symbol table sanity,
1335 versioning section tests, hash table tests. General cleanup.
1336
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000013372005-08-02 Ulrich Drepper <drepper@redhat.com>
1338
Ulrich Drepper8a687742005-08-03 02:24:12 +00001339 * objdump.c: New file.
1340 * Makefile.am (bin_PROGRAMS): Add objdump.
1341 (objdump_LDADD): Define.
1342
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001343 * elflint.c (check_reloc_shdr): New function split out from check_rela
1344 and check_rel.
1345 (check_one_reloc): New function. Likewise.
1346 (check_rela): Use check_reloc_shdr and check_one_reloc.
1347 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001348 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1349 section.
1350 Add checks that relocations against read-only segments are flagged,
1351 that the text relocation flag is not set unnecessarily, and that
1352 relocations in one section are either against loaded or not-loaded
1353 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001354
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000013552005-08-01 Ulrich Drepper <drepper@redhat.com>
1356
1357 * elfcmp.c (main): Ignore section count and section name string table
1358 section index.
1359
Roland McGrathf9ece8a2005-07-28 07:03:04 +000013602005-07-27 Roland McGrath <roland@redhat.com>
1361
1362 * elfcmp.c: Include <locale.h>.
1363
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000013642005-07-27 Ulrich Drepper <drepper@redhat.com>
1365
1366 * elfcmp.c: Print name and index of differing section.
1367
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000013682005-07-24 Ulrich Drepper <drepper@redhat.com>
1369
1370 * elfcmp.c: Implement comparing gaps between sections.
1371
13722005-07-23 Ulrich Drepper <drepper@redhat.com>
1373
1374 * elflint.c: Include libeblP.h instead of libebl.h.
1375 * nm.c: Likewise.
1376 * readelf.c: Likewise.
1377 * elfcmp.c: Likewise.
1378
1379 * elfcmp.c (main): Compare individual ELF header fields, excluding
1380 e_shoff instead of the whole struct at once.
1381 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1382 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1383
13842005-07-22 Ulrich Drepper <drepper@redhat.com>
1385
1386 * elfcmp.c (main): Take empty section into account when comparing
1387 section content.
1388
1389 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1390 using it.
1391
13922005-07-21 Ulrich Drepper <drepper@redhat.com>
1393
1394 * elfcmp.c: New file.
1395 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1396 (elfcmp_LDADD): Define.
1397
1398 * elflint.c (check_rela): Check that copy relocations only reference
1399 object symbols or symbols with unknown type.
1400 (check_rel): Likewise.
1401
14022005-06-08 Roland McGrath <roland@redhat.com>
1403
1404 * readelf.c (print_ops): Add consts.
1405
14062005-05-31 Roland McGrath <roland@redhat.com>
1407
1408 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1409 abbreviations. Print a header line before each CU section.
1410
1411 * readelf.c (print_debug_loc_section): Fix indentation for larger
1412 address size.
1413
14142005-05-30 Roland McGrath <roland@redhat.com>
1415
1416 * readelf.c (print_debug_line_section): Print section offset of each
1417 CU's table, so they are easy to find from seeing the stmt_list value.
1418
1419 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1420 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1421
1422 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1423 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1424
1425 * readelf.c (print_ops): Take different args for indentation control.
1426 (attr_callback): Caller updated.
1427 Grok several more block-form attributes as being location expressions.
1428 For those same attributes with udata forms, format output differently
1429 for location list offset.
1430 (print_debug_loc_section): Implement it for real.
1431
1432 * readelf.c (options): Mention ranges for --debug-dump.
1433 (enum section_e): Add section_ranges.
1434 (parse_opt): Grok "ranges" for -w/--debug-dump.
1435 (print_debug_ranges_section): New function.
1436 (print_debug): Handle .debug_ranges section.
1437
14382005-05-30 Ulrich Drepper <drepper@redhat.com>
1439
1440 * readelf.c (handle_notes): At least x86-64 need not have the note
1441 section values aligned to 8 bytes.
1442
14432005-05-18 Ulrich Drepper <drepper@redhat.com>
1444
1445 * readelf.c (dwarf_tag_string): Add new tags.
1446
14472005-05-08 Roland McGrath <roland@redhat.com>
1448
1449 * strip.c (handle_elf): Don't translate hash and versym data formats,
1450 elf_getdata already did it for us.
1451
14522005-05-07 Ulrich Drepper <drepper@redhat.com>
1453
1454 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1455 (addr2line_LDADD): Likewise.
1456
14572005-05-03 Roland McGrath <roland@redhat.com>
1458
1459 * strip.c (handle_elf): Apply symbol table fixups to discarded
1460 relocation sections when they are being saved in the debug file.
1461
1462 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1463 and gelf_xlatetof, not the native byte order.
1464
1465 * strip.c (parse_opt): Give error if -f or -o is repeated.
1466 (main): Exit if argp_parse returns nonzero.
1467
1468 * strip.c (debug_fname_embed): New variable.
1469 (options, parse_opt): New option -F to set it.
1470
14712005-05-07 Ulrich Drepper <drepper@redhat.com>
1472
1473 * readelf.c (parse_opt): Make any_control_option variable
1474 local. Simplify some tests.
1475
14762005-05-03 Roland McGrath <roland@redhat.com>
1477
1478 * strip.c (crc32_file): Function removed (now in ../lib).
1479
14802005-05-03 Roland McGrath <roland@redhat.com>
1481
1482 * elflint.c (is_debuginfo): New variable.
1483 (options, parse_opt): New option --debuginfo/-d to set it.
1484 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1485 (check_note): If is_debuginfo, don't try to get note contents.
1486
14872005-04-24 Ulrich Drepper <drepper@redhat.com>
1488
1489 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1490 section reached.
1491
14922005-04-14 Ulrich Drepper <drepper@redhat.com>
1493
1494 * readelf.c (dwarf_encoding_string): New function.
1495 (dwarf_inline_string): New function.
1496 (dwarf_access_string): New function.
1497 (dwarf_visibility_string): New function.
1498 (dwarf_virtuality_string): New function.
1499 (dwarf_identifier_case_string): New function.
1500 (dwarf_calling_convention_string): New function.
1501 (dwarf_ordering_string): New function.
1502 (dwarf_discr_list_string): New function.
1503 (attr_callback): Decode man more attribute values.
1504
15052005-04-01 Ulrich Drepper <drepper@redhat.com>
1506
1507 * addr2line.c: Finish implementation of -f option.
1508
15092005-03-29 Ulrich Drepper <drepper@redhat.com>
1510
1511 * addr2line.c: New file.
1512 * Makefile.am (bin_PROGRAMS): Add addr2line.
1513 Define addr2line_LDADD.
1514
1515 * findtextrel.c: Use new dwarf_addrdie function.
1516
1517 * findtextrel.c: Fix usage message and re-add accidentally removed
1518 line.
1519
15202005-03-28 Ulrich Drepper <drepper@redhat.com>
1521
1522 * findtextrel.c: New file.
1523 * Makefile: Add rules to build findtextrel.
1524
15252005-02-15 Ulrich Drepper <drepper@redhat.com>
1526
1527 * ldlex.l: Provide ECHO definition to avoid warning.
1528
1529 * elflint.c (check_program_header): Fix typo in RELRO test.
1530
1531 * Makefile.am (AM_CFLAGS): Add more warning options.
1532 * elflint.c: Fix warnings introduced by the new warning options.
1533 * i386_ld.c: Likewise.
1534 * ld.c: Likewise.
1535 * ld.h: Likewise.
1536 * ldgeneric.c: Likewise.
1537 * nm.c: Likewise.
1538 * readelf.c: Likewise.
1539 * sectionhash.c: Likewise.
1540 * size.c: Likewise.
1541 * string.c: Likewise.
1542
15432005-02-05 Ulrich Drepper <drepper@redhat.com>
1544
1545 * Makefile.am: Check for text relocations in constructed DSOs.
1546
1547 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1548 with -lmudflap.
1549
1550 * ldscript.y: Add as_needed handling.
1551 * ldlex.l: Recognize AS_NEEDED token.
1552 * ld.h (struct filename_list): Add as_needed flag.
1553
15542005-02-04 Ulrich Drepper <drepper@redhat.com>
1555
1556 * elflint.c (check_symtab): Correctly determine size of GOT section.
1557
15582005-01-19 Ulrich Drepper <drepper@redhat.com>
1559
1560 * ld.c: Remove unnecessary more_help function. Print bug report
1561 address using argp.
1562 * strip.c: Likewise.
1563 * size.c: Likewise.
1564 * nm.c: Likewise.
1565 * readelf.c: Likewise.
1566 * elflint.c: Likewise.
1567
1568 * elflint.c (main): Don't check for parameter problems here.
1569 (parse_opt): Do it here, where we get informed about some of them
1570 anyway.
1571
1572 * readelf.c (main): Don't check for parameter problems here.
1573 (parse_opt): Do it here, where we get informed about some of them
1574 anyway.
1575
15762005-01-11 Ulrich Drepper <drepper@redhat.com>
1577
1578 * strip.c: Update copyright year.
1579 * readelf.c: Likewise.
1580 * size.c: Likewise.
1581 * nm.c: Likewise.
1582 * ld.c: Likewise.
1583 * elflint.c: Likewise.
1584
1585 * elflint.c (check_symtab): Don't warn about wrong size for
1586 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1587
15882004-10-05 Ulrich Drepper <drepper@redhat.com>
1589
1590 * readelf.c (print_phdr): In section mapping, also indicate
1591 sections in read-only segments.
1592
15932004-09-25 Ulrich Drepper <drepper@redhat.com>
1594
1595 * readelf.c: Make compile with gcc 4.0.
1596 * strip.c: Likewise.
1597
15982004-08-16 Ulrich Drepper <drepper@redhat.com>
1599
1600 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1601 allocate to work around gcc 3.4 bug.
1602
16032004-01-25 Ulrich Drepper <drepper@redhat.com>
1604
1605 * ldlex.l (invalid_char): Better error message.
1606
16072004-01-23 Ulrich Drepper <drepper@redhat.com>
1608
1609 * readelf.c: Print SHT_GNU_LIBLIST sections.
1610
1611 * none_ld.c: New file.
1612
16132004-01-21 Ulrich Drepper <drepper@redhat.com>
1614
1615 * Makefile.am: Enable building of machine specific linker.
1616
16172004-01-20 Ulrich Drepper <drepper@redhat.com>
1618
1619 * Makefile.am: Support building with mudflap.
1620
1621 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1622 * ldgeneric.c: Likewise.
1623 * ldscript.y: Likewise.
1624 * readelf.c: Likewise.
1625 * strip.c: Likewise.
1626
1627 * readelf.c (print_debug_line_section): Determine address size
1628 correctly.
1629
16302004-01-19 Ulrich Drepper <drepper@redhat.com>
1631
1632 * readelf.c (print_phdr): Show which sections are covered by the
1633 PT_GNU_RELRO entry.
1634
1635 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1636
1637 * readelf.c (print_debug_macinfo_section): Implement.
1638
16392004-01-18 Ulrich Drepper <drepper@redhat.com>
1640
1641 * readelf.c (print_debug_line_section): Implement.
1642
16432004-01-17 Ulrich Drepper <drepper@redhat.com>
1644
1645 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1646 * src/ld.c: Likewise.
1647 * src/nm.c: Likewise.
1648 * src/readelf.c: Likewise.
1649 * src/size.c: Likewise.
1650 * src/strip.c: Likewise.
1651
1652 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1653
1654 * Makefile.am: Support building with mudflap.
1655
16562004-01-16 Ulrich Drepper <drepper@redhat.com>
1657
1658 * readelf.c (print_debug_info_section): Free dies memory.
1659
1660 * readelf.c: Print .debug_info section content.
1661
16622004-01-13 Ulrich Drepper <drepper@redhat.com>
1663
1664 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1665
16662004-01-12 Ulrich Drepper <drepper@redhat.com>
1667
1668 * readelf.c (print_debug_aranges): Implement using libdw.
1669
16702004-01-11 Ulrich Drepper <drepper@redhat.com>
1671
1672 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1673
1674 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1675 behavior is available yet.
1676 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1677
16782004-01-09 Ulrich Drepper <drepper@redhat.com>
1679
1680 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1681
1682 * nm.c: Implement getting information about local variables.
1683
16842004-01-07 Ulrich Drepper <drepper@redhat.com>
1685
1686 * nm.c: Read also debug information for local symbols.
1687
16882004-01-05 Ulrich Drepper <drepper@redhat.com>
1689
1690 * nm.c: Shuffle dwarf handling code around so the maximum column
1691 width can be computed ahead of printing. Avoid collection symbols
1692 which are not printed anyway.
1693
1694 * nm.c: Rewrite dwarf handling to use libdw.
1695 * Makefile.am (AM_CFLAGS): Add -std parameter.
1696 (INCLUDES): Find header in libdw subdir.
1697 (nm_LDADD): Replace libdwarf with libdw.
1698
1699 * elflint.c: Update copyright year.
1700 * readelf.c: Likewise.
1701 * size.c: Likewise.
1702 * strip.c: Likewise.
1703 * nm.c: Likewise.
1704
17052003-12-31 Ulrich Drepper <drepper@redhat.com>
1706
1707 * strip.c (process_file): Close file before returning.
1708
17092003-11-19 Ulrich Drepper <drepper@redhat.com>
1710
1711 * readelf.c (handle_dynamic): Make column for tag name wider.
1712
17132003-09-29 Ulrich Drepper <drepper@redhat.com>
1714
1715 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1716
17172003-09-25 Ulrich Drepper <drepper@redhat.com>
1718
1719 * strip.c (process_file): Don't mmap the input file, we modify the
1720 data structures and don't want the change end up on disk.
1721
17222003-09-23 Jakub Jelinek <jakub@redhat.com>
1723
1724 * unaligned.h (union u_2ubyte_unaligned,
1725 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1726 packed attribute.
1727 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1728 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1729 Read/store value through _ptr->u instead of *_ptr.
1730
17312003-09-22 Ulrich Drepper <drepper@redhat.com>
1732
1733 * size.c (show_sysv): Change type of maxlen to int.
1734
1735 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1736 buckets.
1737
1738 * i386_ld.c: Many many fixes and extensions.
1739 * ld.c: Likewise.
1740 * ldgeneric.c: Likewise.
1741
17422003-08-16 Ulrich Drepper <drepper@redhat.com>
1743
1744 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1745 the reference is from another DSO.
1746
17472003-08-15 Ulrich Drepper <drepper@redhat.com>
1748
1749 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1750 point is found when creating a DSO.
1751
17522003-08-14 Ulrich Drepper <drepper@redhat.com>
1753
1754 * ld.c (main): Always call FLAG_UNRESOLVED.
1755 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1756 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1757
17582003-08-13 Ulrich Drepper <drepper@redhat.com>
1759
1760 * Makefile.in: Depend on libebl.a, not libebl.so.
1761
1762 * ld.c (main): Mark stream for linker script as locked by caller.
1763 (read_version_script): Likewise.
1764 * ldlex.c: Define fread and fwrite to _unlocked variant.
1765
1766 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1767 target_bswap_32.
1768 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1769 target_bswap_64.
1770 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1771 store_8ubyte_unaligned): Define using new macros.
1772
17732003-08-12 Ulrich Drepper <drepper@redhat.com>
1774
1775 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1776 possibly unaligned memory. Support use of big endian machines.
1777
17782003-08-11 Ulrich Drepper <drepper@redhat.com>
1779
1780 * Moved to CVS archive.