blob: a1078ab6b6502d5be0ec3dd97e34609bf8785fdb [file] [log] [blame]
Roland McGrath5dbccdb2009-06-28 14:48:02 -070012009-06-28 Roland McGrath <roland@redhat.com>
2
3 * readelf.c (print_address_names): New static variable.
4 (options, parse_opt): Grok -N/--numeric-addresses to clear it.
5 (format_dwarf_addr): Don't look up name if !print_address_names.
6
Ulrich Drepperf1894932009-06-13 15:55:42 -070072009-06-13 Ulrich Drepper <drepper@redhat.com>
8
9 * ldgeneric.c: Don't use deprecated libelf functions.
10 * nm.c: Likewise.
11 * objdump.c: Likewise.
12 * readelf.c: Likewise.
13 * size.c: Likewise.
14 * strip.c: Likewise.
15 * unstrip.c: Likewise.
16 * ld.h: Fix up comment.
17
Ulrich Drepperb47d2902009-06-01 07:38:32 -0700182009-06-01 Ulrich Drepper <drepper@redhat.com>
19
20 * readelf.c (print_relocs): Expect ELF header argument and pass on
21 to handle_relocs_rel* functions. Adjust caller.
22 (handle_relocs_rel): Add ELF header argument. Add special case for
23 the IRELATIVE relocations in statically linked executables.
24 (handle_relocs_rela): Likewise.
25
Roland McGrathdb19f0b2009-05-07 18:44:27 -0700262009-04-29 Ulrich Drepper <drepper@redhat.com>
27
28 * elflint.c (check_symtab): Add tests of st_other field.
29
Ulrich Drepperaab90f92009-04-23 07:44:36 -0700302009-04-23 Ulrich Drepper <drepper@redhat.com>
31
32 * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
33
Roland McGrathd86e1832009-04-20 00:49:33 -0700342009-04-20 Roland McGrath <roland@redhat.com>
35
Roland McGrath8a592412009-04-20 01:20:44 -070036 * addr2line.c (print_dwarf_function): Honor -s and -A for file names
37 of inline call sites.
38
Roland McGrathd86e1832009-04-20 00:49:33 -070039 * addr2line.c (just_section): New variable.
40 (adjust_to_section): New function, broken out of ...
41 (handle_address): ... here.
42 (options, parse_opt): Add -j/--section=NAME to set it.
43
Roland McGrath2fb90512009-04-15 14:47:13 -0700442009-04-15 Roland McGrath <roland@redhat.com>
45
46 * readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
47 64-bit format header, DW_CIE_ID_32 in 32-bit format header.
48
Roland McGrath04a14162009-04-14 01:02:17 -0700492009-04-14 Roland McGrath <roland@redhat.com>
50
Roland McGratheb9ba472009-04-14 18:44:45 -070051 * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
52 like SHT_GNU_ATTRIBUTES.
53
Roland McGrath94f43832009-04-14 04:39:32 -070054 * readelf.c (handle_core_registers): Fix error message.
55
Roland McGrath04a14162009-04-14 01:02:17 -070056 * strip.c (handle_elf: check_preserved): Don't note any change when
57 .debug_data is already filled from a previous pass.
58
Ulrich Drepper411cdb22009-02-05 22:04:26 -0800592009-02-05 Ulrich Drepper <drepper@redhat.com>
60
Ulrich Drepper51b3f472009-02-05 22:10:39 -080061 * objdump.c (show_relocs_x): Minor cleanups.
62
Ulrich Drepper411cdb22009-02-05 22:04:26 -080063 * readelf.c (print_cfa_program): Correct a few labels.
Ulrich Drepper973a9c72009-02-05 22:56:39 -080064 Print first DW_CFA_expression and DW_CFA_val_expression parameter
65 as register.
Ulrich Drepper411cdb22009-02-05 22:04:26 -080066
Ulrich Drepper5ee720c2009-02-01 16:18:18 -0800672009-02-01 Ulrich Drepper <drepper@redhat.com>
68
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080069 * objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
70 into ...
71 (show_relocs_x): ...here. New function.
Ulrich Drepperf44f0ce2009-02-01 21:31:26 -080072 (show_relocs): Better spacing in output.
Ulrich Drepper95fa15e2009-02-01 19:06:10 -080073
Ulrich Dreppercbb422e2009-02-01 18:18:55 -080074 * objdump.c (show_relocs_rela): Show offsets as signed values.
75
Ulrich Drepper5ee720c2009-02-01 16:18:18 -080076 * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
77 Improve some error messages.
78 Use program_invocation_short_name instead of AR macro.
79 * Makefile.am (CFLAGS_ar): Remove.
80 * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
81 * objdump.c (parse_opt): Likewise.
82 * readelf.c (parse_opt): Likewise.
83
Roland McGrath51f01282009-01-27 17:08:03 -0800842009-01-27 Roland McGrath <roland@redhat.com>
85
86 * readelf.c (print_ops): Notice short length, don't overrun buffer
87 (still need to fix LEB128).
88
89 * readelf.c (print_ops): Fix DW_OP_call[24] decoding.
90
91 * readelf.c (print_ops): Print (empty)\n when LEN == 0.
92
Ulrich Drepper62c46532009-01-24 17:01:08 -0800932009-01-24 Ulrich Drepper <drepper@redhat.com>
94
95 * readelf.c (print_debug_frame_section): Fix computation of vma_base
96 for PC-relative mode.
97
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800982009-01-23 Ulrich Drepper <drepper@redhat.com>
99
Ulrich Drepperccccab02009-01-23 16:32:21 -0800100 * size.c (process_file): When handling archive, close file descriptor
101 here. For unknown file format also close file descriptor.
102 (handle_ar): Don't close file descriptor here.
103
Ulrich Drepperd7285e12009-01-23 16:10:44 -0800104 * readelf.c (parse_opt): Move code to add to dump_data_sections and
105 string_sections list in local function add_dump_section. Adjust 'x'
106 key handling. For 'a' key add .strtab, .dynstr, and .comment section
107 to string_sections list.
108
Roland McGrathe9de9b42009-01-22 13:05:40 -08001092009-01-22 Roland McGrath <roland@redhat.com>
110
Roland McGrath9a847e12009-01-22 19:55:00 -0800111 * readelf.c (print_phdr): Don't print section mapping when no sections.
112
Roland McGrathd759aa62009-01-22 19:17:07 -0800113 * Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.
114
Roland McGrathcabeeee2009-01-22 13:17:45 -0800115 * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
116 and reset it only for the 'true' cases.
117
118 * Makefile.am (addr2line_no_Wformat): New variable.
119
Roland McGrathe9de9b42009-01-22 13:05:40 -0800120 * readelf.c (print_debug_frame_section): Use t instead of j formats
121 for ptrdiff_t OFFSET.
122
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -08001232009-01-21 Ulrich Drepper <drepper@redhat.com>
124
125 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Ulrich Drepperf93ee8d2009-01-21 15:02:03 -0800126 test. Handle debuginfo files.
Ulrich Drepperdaf0fda2009-01-21 13:05:36 -0800127 (check_exception_data): First sanity test.
128
Ulrich Drepperfdc93e12009-01-17 11:47:10 -08001292009-01-17 Ulrich Drepper <drepper@redhat.com>
130
Ulrich Drepper935edde2009-01-17 16:06:42 -0800131 * readelf.c (print_debug_exception_table): Show target of ar_disp
132 field.
133
134 * elflint.c (check_program_header): Add most consistency checks for
135 PT_GNU_EH_FRAME entry.
136
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800137 * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
138 ARGP_PROGRAM_BUG_ADDRESS_DEF.
139 * ar.c: Likewise.
140 * elfcmp.c: Likewise.
141 * elflint.c: Likewise.
142 * findtextrel.c: Likewise.
143 * ld.c: Likewise.
144 * nm.c: Likewise.
145 * objdump.c: Likewise.
146 * ranlib.c: Likewise.
147 * readelf.c: Likewise.
Ulrich Drepper935edde2009-01-17 16:06:42 -0800148
Ulrich Drepperfdc93e12009-01-17 11:47:10 -0800149 * size.c: Likewise.
150 * strings.c: Likewise.
151 * strip.c: Likewise.
152 * unstrip.c: Likewise.
153
Ulrich Drepperb006fbf2009-01-16 03:08:25 -08001542009-01-16 Ulrich Drepper <drepper@redhat.com>
155
Ulrich Drepper3a52c7a2009-01-16 21:11:49 -0800156 * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
157 matches .eh_frame_hdr section, if it is available. Also check that
158 the segment is allocated, not writable, not executable.
159
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800160 * readelf.c: Add -e option. Dump exception and unwind related
161 sections. Add -e to -a.
Ulrich Drepper05d2b202009-01-16 17:58:54 -0800162 (print_encoding_base): Handle DW_EH_PE_omit.
Ulrich Drepperb006fbf2009-01-16 03:08:25 -0800163 (print_debug_exception_table): Beginning of support.
164 (print_debug): Hook up print_debug_exception_table for
165 .gcc_except_table sections.
166
167 * readelf.c (print_debug_frame_section): Some fixes for last change.
168
Ulrich Drepper351bf202009-01-15 20:18:40 -08001692009-01-15 Ulrich Drepper <drepper@redhat.com>
170
171 * readelf.c (print_encoding): Now a toplevel function.
172 (print_relinfo): Likewise.
173 (print_encoding_base): Broken out of print_debug_frame_section.
174 (print_debug_frame_section): Print different header for .eh_frame
175 sections. Fix recognition of matching CIEs in .debug_frame sections.
176 Print absolute offset for PC-relative FDE locations. Don't print
177 table header for FDEs if the table is empty.
178 (read_encoded): New function.
179 (print_debug_frame_hdr_section): New function.
180 (print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
181 sections.
182
183 * readelf.c (handle_relocs_rel): Print section number.
184 (print_debug_abbrev_section): Likewise.
185 (print_debug_aranges_section): Likewise.
186 (print_debug_ranges_section): Likewise.
187 (print_debug_info_section): Likewise.
188 (print_debug_line_section): Likewise.
189 (print_debug_loc_section): Likewise.
190 (print_debug_macinfo_section): Likewise.
191 (print_debug_pubnames_section): Likewise.
192 (print_debug_str_section): Likewise.
193
Ulrich Drepper8b394632009-01-10 18:29:56 -08001942009-01-10 Ulrich Drepper <drepper@redhat.com>
195
196 * strings.c (read_block): Fix typo in error message string.
197
Ulrich Drepper87cf5832009-01-07 20:39:21 -08001982009-01-07 Ulrich Drepper <drepper@redhat.com>
199
200 * ld.c (ld_new_searchdir): Fix adding to search path list.
201
Ulrich Drepperac194d02009-01-06 00:30:01 -08002022009-01-06 Ulrich Drepper <drepper@redhat.com>
203
204 * readelf.c: Implement call frame debug section dumping.
Roland McGrathe9243e62009-01-21 18:54:20 -0800205
Roland McGrath3614d992009-01-05 18:05:32 -08002062009-01-05 Roland McGrath <roland@redhat.com>
207
208 * elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
209 Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800210
Ulrich Drepper44173ed2009-01-01 19:00:41 -08002112009-01-01 Ulrich Drepper <drepper@redhat.com>
212
213 * addr2line.c: Update copyright year.
214 * ar.c: Likewise.
215 * elfcmp.c: Likewise.
216 * elflint.c: Likewise.
217 * findtextrel.c: Likewise.
218 * ld.c: Likewise.
219 * nm.c: Likewise.
220 * objdump.c: Likewise.
221 * ranlib.c: Likewise.
222 * readelf.c: Likewise.
223 * size.c: Likewise.
224 * strings.c: Likewise.
225 * strip.c: Likewise.
226 * unstrip.c: Likewise.
227
Roland McGrath468fe4d2008-12-11 21:00:12 -08002282008-12-11 Roland McGrath <roland@redhat.com>
229
230 * nm.c (sym_name): New function.
231 (show_symbols_sysv): Use it in place of elf_strptr.
232 (show_symbols_bsd, show_symbols_posix): Likewise.
233 Fixes RHBZ#476136.
234
235 * nm.c (show_symbols_sysv): Use an alloca'd backup section name when
236 elf_strptr fails.
237
Roland McGratha845f682008-12-03 03:41:58 +00002382008-12-02 Roland McGrath <roland@redhat.com>
239
240 * readelf.c (count_dwflmod, process_file): Don't presume encoding of
241 nonzero OFFSET argument to dwfl_getmodules.
242
Roland McGrath1d8bb252008-08-07 08:39:41 +00002432008-08-07 Roland McGrath <roland@redhat.com>
244
245 * addr2line.c (main): Pass string to handle_address.
246 (see_one_module): New function, subroutine of handle_address.
247 (find_symbol): Likewise.
248 (handle_address): Take string argument rather than address.
249 Convert plain number, or handle strings like "(section)+offset"
250 or "symbol+offset".
251
2522008-08-01 Roland McGrath <roland@redhat.com>
253
254 * readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
255 For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.
256
257 * readelf.c (convert): Take new argument SIZE.
258 (handle_core_register, handle_core_item): Update callers.
259 (handle_core_item): Take new arg REPEATED_SIZE.
260 (handle_core_items): Special case for a singleton item,
261 let handle_core_item handle repeats if it wants to.
262
263 * readelf.c (handle_core_items): Give abridged output
264 for identical groups repeated more than twice.
265
2662008-07-04 Roland McGrath <roland@redhat.com>
267
268 * readelf.c (handle_core_items): Handle ELF_T_ADDR.
269
Roland McGrath521c47d2008-04-11 07:01:58 +00002702008-04-10 Roland McGrath <roland@redhat.com>
271
272 * strip.c (handle_elf): Don't keep sections that kept symbol tables
273 refer to. Instead, just be sure to preserve the original symbol
274 table in the debug file so those symbols go with their sections and
275 can be elided from the stripped version of the symbol table.
276
277 * strip.c (handle_elf): When a discarded section kept in the debug
278 file refers to a nondiscard section via sh_link/sh_info, preserve
279 that nondiscarded section unmodified in the debug file as well.
280 Skip adjustment of discarded sections symbol table references when
281 that symbol table is copied in this way.
282
283 * elflint.c (check_symtab): Don't crash from missing symbol names
284 after diagnosing bogus strtab.
285
286 * strip.c (handle_elf): Cosmetic cleanup in special section contents
287 adjustment for symtab changes.
288
Roland McGrath13b69602008-04-01 02:30:05 +00002892008-03-31 Roland McGrath <roland@redhat.com>
290
291 * elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
292 must be SHT_PROGBITS, must not be SHF_WRITE. Let backend hook
293 excuse a special section.
294
2952008-03-27 Roland McGrath <roland@redhat.com>
296
297 * elflint.c (check_sections): Check that executability and writability
298 of sections is reflected in segment p_flags.
299
Roland McGrathd11f9cb2008-03-26 20:51:59 +00003002008-03-26 Roland McGrath <roland@redhat.com>
301
302 * elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
303 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
304 is valid in RELRO.
305
Roland McGrath47c5c352008-02-29 10:17:16 +00003062008-02-29 Roland McGrath <roland@redhat.com>
307
308 * readelf.c (print_attributes): Add a cast.
309 * elflint.c (check_attributes): Likewise.
310
311 * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
312 with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
313 (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
314
Ulrich Drepper834de6f2008-02-23 06:50:01 +00003152008-02-03 Ulrich Drepper <drepper@redhat.com>
316
317 * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
318 when linked into executable.
319 (elf_i386_create_relocations): Likewise.
320
Roland McGrath059c83e2008-02-21 06:19:39 +00003212008-02-20 Roland McGrath <roland@redhat.com>
322
323 * readelf.c (print_attributes): New function.
324 (process_elf_file): Call it under -A.
325
326 * elflint.c (check_attributes): Implement it for real.
327
3282008-02-19 Roland McGrath <roland@redhat.com>
329
330 * elflint.c (special_sections): Handle .gnu.attributes section.
331 (check_sections): Likewise.
332 (check_attributes): New function.
333
3342008-02-10 Roland McGrath <roland@redhat.com>
335
336 * elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
337 sections and ET_REL files.
338
Ulrich Drepper712d78e2008-02-02 10:01:53 +00003392008-02-02 Ulrich Drepper <drepper@redhat.com>
340
341 * elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
342 * i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
343 and R_386_TLS_LE.
344 (elf_i386_create_relocations): Likewise.
345 * ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
346 elements.
347 * ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
348 (ld_generic_create_outfile): Add PT_TLS entry to program header.
349 Fix generation of PT_GNU_STACK entry.
350
Ulrich Drepperc54785a2008-02-01 18:05:21 +00003512008-02-01 Ulrich Drepper <drepper@redhat.com>
352
Ulrich Drepper7cd1bf72008-02-01 23:52:59 +0000353 * ld.c (replace_args): Prevent loop over replacements if the parameter
354 is only two characters long.
355
Ulrich Drepperc54785a2008-02-01 18:05:21 +0000356 * ld.c: Recognize sha1 argument for --build-id parameter.
357 * ldgeneric.c (create_build_id_section): Handle sha1.
358 (compute_hash_sum): New function. Broken out of compute_build_id.
359 Take hash function and context as parameters.
360 (compute_build_id): Use compute_hash_sum for md5 and the new sha1
361 implementation.
362
Ulrich Drepper89759c72008-01-31 19:44:12 +00003632008-01-31 Ulrich Drepper <drepper@redhat.com>
364
365 * elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
366 * ld.c: Recognize --build-id command line parameter.
367 * ld.h: Define scn_dot_note_gnu_build_id.
368 (struct ld_state): Add build_id and buildidscnidx elements.
369 * ldgeneric.c: Implement --build-id command line parameter.
370 * ldlex.l (ID): Recognize - as valid character after the first one.
371
Ulrich Drepper5530ec52008-01-29 10:42:07 +00003722008-01-29 Ulrich Drepper <drepper@redhat.com>
373
Ulrich Drepperb61c4cc2008-01-30 07:16:28 +0000374 * ld.c (replace_args): New function.
375 (main): Use it to rewrite old-style parameters.
376
Ulrich Dreppered9b6cb2008-01-30 06:33:33 +0000377 * elf32-i386.script: Add .gnu.hash section.
378 * ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
379 (fillin_special_symbol): Initialize st_size.
380 (sortfct_hashval): New function.
381 (create_gnu_hash): New function.
382 (create_hash): New function.
383 (ld_generic_create_outfile): Use the new functions to create the
384 hash tables.
385
Ulrich Drepper5530ec52008-01-29 10:42:07 +0000386 * elflint.c (check_gnu_hash): Fix index value printed in error message.
387
Ulrich Drepper0e864dd2008-01-25 00:18:42 +00003882008-01-24 Ulrich Drepper <drepper@redhat.com>
389
390 * elflint.c (check_group): Check that signature symbol for section
391 group is not an empty string.
392 * ldgeneric.c: Remove magic assignment of indeces in the dynsym
393 section. Start implementation of --hash-style.
394 * i386_ld.c: Likewise.
395 * ld.c: Recognize --hash-style.
396 * ld.h (struct scninfo): Add comdat_group.
397 Add additional parameter to finalize_plt callback.
398
Ulrich Drepper5449a6b2008-01-22 15:49:39 +00003992008-01-22 Ulrich Drepper <drepper@redhat.com>
400
401 * ld.h (struct callbacks): Add initialize_gotplt.
402 (struct scnhead): Add scn_dot_gotplt.
403 (struct ld_state): Add gotpltscnidx.
404 * i386_ld.c (elf_i386_initialize_plt): Minor optimization.
405 (elf_i386_initialize_pltrel): Likewise.
406 (elf_i386_initialize_got): There is now a separate .got.plt, so
407 don't do the PLT-related work here. Initialize d_type.
408 (elf_i386_initialize_gotplt): New function.
409 (elf_i386_plt0): Use ud2a after indirect jump.
410 (elf_i386_pic_plt0_entry): Likewise.
411 (elf_i386_finalize_plt): Reference now .got.plt.
412 (elf_i386_count_relocations): For GOT entries which need no relocation
413 don't bump nrel_got.
414 (elf_i386_create_relocations): Also get .got.plt. Rewrite R-386_GOT32
415 handling for split .got/.got.plt.
416 (elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
417 * elf32-i386.script: Sort sections for security. There are no .got
418 input sections. Add .got.plt.
419 * ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
420 (ld_generic_create_outfile): Initialize .got.plt section.
421 Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.
422
Ulrich Drepperd9488292008-01-20 16:43:15 +00004232008-01-19 Ulrich Drepper <drepper@redhat.com>
424
425 * i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
426 symbols are not carried over into statically linked output files.
427 Add dummy entries for more TLS relocations.
428
429 * ld.c (options): Add long names for -( and -).
430
431 * ldgeneric.c (check_definition): For newly found definitions don't
432 mark section as used if symbol is absolute.
433 (extract_from_archive): Only assign archive sequence number the first
434 time the archive is handled. Update ld_state.last_archive_used
435 if any symbol was used. Remove nround variable.
436 (file_process2): When using symbol from an archive, update
437 ld_state.group_start_archive, ld_state.archives, and
438 ld_state.tailarchives.
439 (ld_generic_file_process): If group is not handled anymore, after
440 freeing ELF handles for the archives, clear ld_state.archives and
441 *nextp. Fix wrong logic in recognizing first iteration of group
442 loop. When clearing flags, also clear ld_state.group_start_archive.
443
Ulrich Drepper5eee1222008-01-11 10:12:18 +00004442008-01-11 Ulrich Drepper <drepper@redhat.com>
445
446 * objdump.c (show_disasm): Adjust disassembler format string for
447 removal of %e.
448
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00004492008-01-04 Roland McGrath <roland@redhat.com>
450
Roland McGrath059c83e2008-02-21 06:19:39 +0000451 * readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
452 a size greater than the items cover means multiple sets of items.
453 (handle_core_note): Update caller.
454
4552008-01-04 Roland McGrath <roland@redhat.com>
456
Ulrich Dreppere219f1c2008-01-09 05:49:49 +0000457 * strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.
458
4592008-01-03 Roland McGrath <roland@redhat.com>
460
461 * ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).
462
463 * elflint.c (check_dynamic): Remove duplicate initializer.
464
Ulrich Drepperad024af2008-01-02 17:42:52 +00004652008-01-02 Ulrich Drepper <drepper@redhat.com>
466
467 * addr2line.c: Update copyright year.
468 * ar.c: Likewise.
469 * elfcmp.c: Likewise.
470 * elflint.c: Likewise.
471 * findtextrel.c: Likewise.
472 * ld.c: Likewise.
473 * nm.c: Likewise.
474 * objdump.c: Likewise.
475 * ranlib.c: Likewise.
476 * readelf.c: Likewise.
477 * size.c: Likewise.
478 * strings.c: Likewise.
479 * strip.c: Likewise.
480 * unstrip.c: Likewise.
481
Ulrich Drepper3cbdd382008-01-02 17:44:39 +00004822007-12-30 Ulrich Drepper <drepper@redhat.com>
483
484 * objdump (show_disasm): Use %e after third parameter.
485
4862007-12-21 Ulrich Drepper <drepper@redhat.com>
487
488 * strip.c: Fix wrong parenthesis in a few branch predictions.
489 * strings.c: Likewise.
490
4912007-12-20 Ulrich Drepper <drepper@redhat.com>
492
493 * Makefile.am (DEFS): Add DEBUGPRED.
494 * addr2line.c: Include debugpred.h.
495 * ar.c: Likewise.
496 * elfcmp.c: Likewise.
497 * elflint.c: Likewise.
498 * findtextrel.c: Likewise.
499 * nm.c: Likewise.
500 * objdump.c: Likewise.
501 * ranlib.c: Likewise.
502 * readelf.c: Likewise.
503 * size.c: Likewise.
504 * strings.c: Likewise.
505 * strip.c: Likewise.
506 * unstrip.c: Likewise.
507 * debugpred.h: New file.
508
509 * readelf.c (handle_relocs_rel): Use elf_scnshndx.
510 (handle_relocs_rela): Likewise.
511
512 * readelf.c: Add lots of likely/unlikely.
513
514 * elflint.c: Minor cleanups.
515
Roland McGrath1a2e8f42007-12-15 23:39:34 +00005162007-11-19 Roland McGrath <roland@redhat.com>
517
518 * readelf.c (print_ops): Handle all bad op codes gracefully.
519 Print their numbers instead of just ???.
520
Roland McGrath07a696e2007-11-09 22:44:26 +00005212007-11-09 Roland McGrath <roland@redhat.com>
522
523 * readelf.c (attr_callback): Handle DW_AT_data_location.
Roland McGrath1a2e8f42007-12-15 23:39:34 +0000524 Handle block forms to mean a DWARF expression for DW_AT_allocated,
525 DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
526 DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
527 DW_AT_upper_bound.
Roland McGrath07a696e2007-11-09 22:44:26 +0000528
Roland McGrathe4c22ea2007-10-23 13:07:39 +00005292007-10-20 Roland McGrath <roland@redhat.com>
530
531 * unstrip.c (options): Update -R description.
532 (struct symbol): Put symbol details a union with a size_t pointer
533 `duplicate'.
534 (compare_symbols_output): Use null ->name as marker for discard
535 symbols, not zero *->map.
536 (copy_elided_sections): Record forwarding pointers for discarded
537 duplicates and fill SYMNDX_MAP elements through them.
538
539 * readelf.c (process_file): Set offline_next_address to 0 at start.
540 (struct process_dwflmod_args): New type.
541 (process_dwflmod): Take args in it, pass fd to process_elf_file.
542 (process_file): Update caller; dup FD for passing to libdwfl.
543 (process_elf_file): Take new arg FD. For ET_REL file when
544 displaying data affected by libdwfl relocation, open a new Elf handle.
545
5462007-10-17 Roland McGrath <roland@redhat.com>
547
548 * readelf.c (print_debug_line_section): For invalid data inside a
549 unit with plausible length, keep printing at the next unit boundary.
550
551 * readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.
552
5532007-10-16 Roland McGrath <roland@redhat.com>
554
555 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
556
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00005572007-10-15 Roland McGrath <roland@redhat.com>
558
559 * make-debug-archive.in: New file.
560 * Makefile.am (EXTRA_DIST): Add it.
561 (make-debug-archive): New target.
562 (bin_SCRIPTS, CLEANFILES): Add it.
563
5642007-10-10 Roland McGrath <roland@redhat.com>
565
566 * elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
567 Use it to check MERGE|STRINGS for .debug_str.
568 (check_sections): Handle exact_or_gnuld.
569
5702007-10-08 Roland McGrath <roland@redhat.com>
571
572 * readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
573 64-bit struct timeval with 32-bit tv_usec.
574
5752007-10-07 Roland McGrath <roland@redhat.com>
576
577 * readelf.c (check_archive_index): New function.
578 (process_file): Call it. Change signature to take only fd and name.
579 Use libdwfl to open the file, then iterate on its modules (multiple
580 for an archive) to print file name and call process_elf_file.
581 (main): Update caller. Let process_file do elf_begin.
582 (count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
583 (process_elf_file): Take only Dwfl_Module * argument.
584 Don't print the file name here.
585 (print_debug_*_section): Take Dwfl_Module * argument.
586 (print_debug): Likewise. Update caller.
587 (format_dwarf_addr): New function.
588 (print_debug_ranges_section): Use it.
589 (attr_callback): Likewise.
590 (print_debug_line_section, print_debug_loc_section): Likewise.
591
592 * readelf.c (print_debug_ranges_section): Translate all strings.
593 (print_debug_loc_section): Likewise.
594
595 * unstrip.c (copy_elided_sections): Initialize SEC.
596
597 * ar.c (do_oper_insert): Put trailing / on short names.
598
599 * arlib.h (MAX_AR_NAME_LEN): Decrease by one.
600
601 * arlib2.c (arlib_add_long_name): Adjust for header size.
602
603 * arlib.c (arlib_finalize): Pad long name table to keep size even.
604
605 * ar.c (do_oper_insert): Use write_retry for padding write.
606
607 * ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
608 Unconditionally set FOUND[CNT]->elf when setting ->mem.
609 (remember_long_name): New function.
610 (do_oper_insert): Call it. Correctly use length of basename,
611 not original name. Don't store long name twice for new member.
612
6132007-10-06 Roland McGrath <roland@redhat.com>
614
615 * elflint.c (check_note): Skip empty segment.
616 (check_note_section): Skip empty section.
617
618 * unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
619 (handle_output_dir_module, handle_implicit_modules): Pass it down.
620 (handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
621 (compare_alloc_sections): Take new arg REL, ignore address if true.
622 (compare_sections): Likewise, pass it down.
623 (compare_sections_rel, compare_sections_nonrel): New functions.
624 (find_alloc_sections_prelink, copy_elided_sections): Use them
625 instead of compare_sections.
626 (sections_match): New function, broken out of ...
627 (find_alloc_section): ... here.
628 (copy_elided_sections): Reorganize section match-up logic.
629 Use sections_match for SHF_ALLOC in ET_REL.
630 For ET_REL, let the nonzero sh_addr from the debug file dominate.
631
632 * unstrip.c (add_new_section_symbols): Take new arg REL.
633 When true, do not update section symbol values.
634 (collect_symbols): Likewise. Update section symbols with address
635 of chosen output section, not original section.
636 (check_symtab_section_symbols, copy_elided_sections): Update callers.
637
638 * unstrip.c (compare_alloc_sections): At the same address, preserve
639 original section order.
640
641 * elflint.c (special_sections): Don't require MERGE|STRINGS for
642 .debug_str, it didn't always have them with older tools.
643
644 * elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.
645
6462007-10-05 Roland McGrath <roland@redhat.com>
647
648 * elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
649 ET_REL file.
650
651 * elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
652 SHN_UNDEF as "bad section". Use shndx value in messages.
653
654 * elflint.c (special_sections): Add ".debug_str". Decrement namelen
655 for ".debug" so it matches as a prefix.
656 (IS_KNOWN_SPECIAL): New macro.
657 (check_sections): Use it for ".plt" match. Cite wrong SHT_NOBITS
658 type even under -d, for a .debug* or .shstrtab section.
659
660 * readelf.c (print_ops): Use hex for address operand.
661
6622007-10-04 Roland McGrath <roland@redhat.com>
663
664 * unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
665 .gnu_debuglink section to SHN_UNDEF. Drop STT_SECTION symbols for
666 sections mapped to SHN_UNDEF.
667
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +00006682007-10-04 Ulrich Drepper <drepper@redhat.com>
669
670 * readelf.c (dump_archive_index): Avoid warning about uninitialized
671 variable with older glibc versions.
672 Add some branch prediction.
673
Roland McGrath59ea7f32007-10-04 08:50:09 +00006742007-10-04 Roland McGrath <roland@redhat.com>
675
676 * readelf.c (print_archive_index): New variable.
677 (options, parse_opt): Accept -c/--archive-index to set it.
678 (dump_archive_index): New function.
679 (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
680 Call dump_archive_index on archives if set.
681 (main): Update caller.
682 (any_control_option): Give it file scope, moved out of ...
683 (parse_opt): ... here.
684
6852007-10-03 Roland McGrath <roland@redhat.com>
686
687 * unstrip.c (struct arg_info): Add `list' flag.
688 (options, parse_opt): Grok -n/--list to set it.
689 (list_module): New function.
690 (handle_implicit_modules): Call it under -n.
691
692 * elflint.c (check_note_section): New function.
693 (check_sections): Call it for SHT_NOTE.
694
695 * readelf.c (handle_notes): Use sections when available.
696
697 * elflint.c (check_note_data): New function, broken out of ...
698 (check_note): ... here. Call it and elf_getdata_rawchunk.
699
700 * readelf.c (handle_auxv_note): Take offset as argument, not buffer.
701 Use elf_getdata_rawchunk and gelf_getauxv.
702 (handle_notes_data): New function, broken out of ...
703 (handle_notes): ... here. Call it and elf_getdata_rawchunk.
704
Roland McGrath241ac022007-10-01 18:21:46 +00007052007-10-01 Roland McGrath <roland@redhat.com>
706
Roland McGrathac0a16c2007-10-01 18:50:35 +0000707 * readelf.c (hex_dump): Fix transposed subtraction generating spaces.
708
Roland McGrath241ac022007-10-01 18:21:46 +0000709 * readelf.c (hex_dump): Fix line header to be hex instead of decimal.
710
Roland McGrathc76f0b02007-09-27 07:31:33 +00007112007-09-10 Roland McGrath <roland@redhat.com>
712
713 * readelf.c (options): Give -p optional argument, alias --string-dump.
714 (string_sections, string_sections_tail): New static variables.
715 (parse_opt): Set them when -p has an argument.
716 (print_string_section): New function, broken out of ...
717 (print_strings): ... here. Call it.
718 (dump_data_section): New function, broken out of ...
719 (dump_data): ... here. Call it.
720 (for_each_section_argument): New function, broken out of ...
721 (dump_data): ... here. Call it.
722 (dump_strings): New function.
723
7242007-08-31 Roland McGrath <roland@redhat.com>
725
726 * readelf.c (print_strings): Typo fix.
727
Roland McGrathcb6d8652007-08-23 08:10:54 +00007282007-08-23 Roland McGrath <roland@redhat.com>
729
730 * readelf.c (printf_with_wrap): Function removed.
731 (REGISTER_WRAP_COLUMN): New macro.
732 (handle_core_register): Use print_core_item instead.
733 (struct register_info): New type.
734 (compare_registers, compare_register_sets): New functions.
735 (register_bitpos, compare_sets_by_info): New functions.
736 (handle_core_registers): Use those to segregate and sort registers
737 for display.
738
739 * readelf.c (ITEM_WRAP_COLUMN): New macro.
740 (print_core_item): New function.
741 (handle_core_item): Use it instead of printf_with_wrap.
742 (compare_core_items, compare_core_item_groups): New functions.
743 (handle_core_items): Use them. Sort by group and force line breaks
744 between groups.
745
746 * readelf.c (handle_core_registers, handle_core_items): New functions,
747 broken out of ...
748 (handle_core_note): ... here. Call them.
749
7502007-08-22 Roland McGrath <roland@redhat.com>
751
752 * unstrip.c (new_shstrtab): New function, broken out of ...
753 (copy_elided_sections): ... here.
754
7552007-08-20 Roland McGrath <roland@redhat.com>
756
757 Avoid local function trampolines in nm binary.
758 * nm.c (sort_by_address): Move to a static function instead of local
759 inside show_symbols.
760 (sort_by_name_strtab): New static variable.
761 (sort_by_name): Use it. Move to a static function instead of local
762 inside show_symbols.
763 (show_symbols): Set sort_by_name_strtab.
764
7652007-08-19 Roland McGrath <roland@redhat.com>
766
767 * readelf.c (handle_auxv_note): New function.
768 (handle_notes): Call it.
769
770 * readelf.c (printf_with_wrap, convert): New functions.
771 (handle_core_item, (handle_core_register): New functions.
772 (handle_notes): Call those with details from ebl_core_note.
773
Roland McGrath099dd522007-08-13 22:58:36 +00007742007-08-12 Roland McGrath <roland@redhat.com>
775
776 * elflint.c (check_note): Accept type 0 with name "Linux".
777
778 * elflint.c (special_sections): Accept SHF_ALLOC for ".note".
779
780 * elflint.c (section_flags_string): Return "none" for 0, not "".
781
Roland McGrathd8221722007-08-11 21:18:09 +00007822007-08-11 Roland McGrath <roland@redhat.com>
783
784 * elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.
785
Ulrich Drepperc98bcc72007-08-04 17:06:14 +00007862007-08-04 Ulrich Drepper <drepper@redhat.com>
787
788 * readelf.c (hex_dump): Use isprint to determine whether to print
789 character itself or full stop character.
790 (dump_data): No need to check endp for NULL after strtol call.
791
Roland McGrath60fc84c2007-08-03 21:59:15 +00007922007-08-03 Roland McGrath <roland@redhat.com>
793
794 * readelf.c (print_string_sections): New variable.
795 (options, parse_opt): Handle --strings/-p to set it.
796 (print_strings): New function.
797 (process_elf_file): Call it under -p.
798
799 * readelf.c (options): Add hidden aliases --segments, --sections,
800 as taken by binutils readelf.
801
8022007-08-01 Roland McGrath <roland@redhat.com>
803
804 * readelf.c (dump_data_sections, dump_data_sections_tail):
805 New variables.
806 (options, parse_opt): Handle --hex-dump/-x, set them.
807 (hex_dump): New function.
808 (dump_data): New function, call it.
809 (process_elf_file): Call it.
810
8112007-07-25 Roland McGrath <roland@redhat.com>
812
813 * addr2line.c (show_symbols): New variable.
814 (print_addrsym): New function.
815 (handle_address): Call it.
816 (options, parse_opt): Handle -S/--symbols.
817
Ulrich Drepperb0243862007-06-06 00:09:36 +00008182007-06-05 Ulrich Drepper <drepper@redhat.com>
819
820 * addr2line.c: Update for latest autoconf header.
821 * ar.c: Likewise.
822 * elfcmp.c: Likewise.
823 * elflint.c: Likewise.
824 * findtextrel.c: Likewise.
825 * ld.c: Likewise.
826 * ldgeneric.c: Likewise.
827 * nm.c: Likewise.
828 * objdump.c: Likewise.
829 * ranlib.c: Likewise.
830 * readelf.c: Likewise.
831 * size.c: Likewise.
832 * strings.c: Likewise.
833 * strip.c: Likewise.
834 * unstrip.c: Likewise.
835
Roland McGrath9aa8ef72007-05-18 08:59:43 +00008362007-05-18 Roland McGrath <roland@redhat.com>
837
838 * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
839 stripped file, so as not to duplicate a section copied in both.
840
841 * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
842
8432007-05-17 Roland McGrath <roland@redhat.com>
844
845 * unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.
846
847 * unstrip.c (handle_file): Tweak BIAS != 0 warning.
848
849 * unstrip.c (handle_file): Take new arg CREATE_DIRS. If set,
850 call make_directories here.
851 (handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
852 (handle_dwfl_module): Likewise.
853 (handle_implicit_modules): Update callers.
854 (handle_output_dir_module): Likewise. Don't do make_directories here.
855
856 * unstrip.c (get_section_name): New function, broken out of ...
857 (copy_elided_sections): here. Update callers.
858 (find_alloc_section): Broken out of ...
859 (copy_elided_sections): ... here. Update caller.
860 (symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
861 update STT_SECTION symbols' st_value fields as a side effect.
862 (check_symtab_section_symbols): Update caller.
863 (add_new_section_symbols): Set st_value in symbols added.
864 (collect_symbols): Reset S->value for STT_SECTION symbols recorded.
865 Take new arg SPLIT_BSS. Adjust S->shndx recorded for symbols moved
866 from .bss to .dynbss.
867 (find_alloc_sections_prelink): New function. Associate debug file
868 allocated SHT_NOBITS shdrs with stripped moved by prelink via
869 .gnu.prelink_undo information.
870 (copy_elided_sections): Call it when we couldn't find every allocated
871 section. Don't use a debug file non-NOBITS section if SHF_ALLOC.
872 Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
873 (handle_file): Update callers.
874
875 * unstrip.c (copy_elided_sections): Ignore unfound unallocated section
876 named ".comment".
877
878 * elflint.c (check_sections): Fix association of segments with
879 sections when p_memsz > p_filesz.
880
8812007-04-29 Roland McGrath <roland@redhat.com>
882
883 * addr2line.c (options, main): Tweak argp group settings to fix
884 usage output.
885
8862007-04-28 Roland McGrath <roland@redhat.com>
887
888 * strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
889 sizes to match sections adjusted in the stripped file.
890
Roland McGrath4be15242007-04-25 03:09:33 +00008912007-04-24 Roland McGrath <roland@redhat.com>
892
893 * elfcmp.c (OPT_HASH_INEXACT): New macro.
894 (hash_inexact): New variable.
895 (options, parse_opt): Add --hash-inexact option to set it.
896 (hash_content_equivalent): New function.
897 (main): Call it for differing SHT_HASH sections under --hash-inexact.
898
8992007-04-23 Roland McGrath <roland@redhat.com>
900
901 * unstrip.c: New file.
902 * Makefile.am (bin_PROGRAMS): Add it.
903 (unstrip_LDADD): New variable.
904
905 * strip.c (options): Allow --output for -o.
906
Ulrich Drepper8b383102007-02-16 00:31:57 +00009072007-02-15 Ulrich Drepper <drepper@redhat.com>
908
909 * readelf.c: Remove unused code. Add a few consts.
910
Ulrich Drepper903c1162007-02-15 19:40:37 +00009112007-02-15 Roland McGrath <roland@redhat.com>
912
913 * readelf.c (print_debug): Fix brainos in SHDR test.
914
Roland McGrathf82a1ec2007-02-06 04:47:44 +00009152007-02-05 Roland McGrath <roland@redhat.com>
916
917 * ar.c: Include <limits.h>, since we use LONG_MAX.
918
Ulrich Drepper0fe63532007-02-05 21:05:51 +00009192007-02-05 Ulrich Drepper <drepper@redhat.com>
920
Ulrich Drepper8b383102007-02-16 00:31:57 +0000921 * ar.c: Add ugly hack to work around gcc complaining that we
Ulrich Drepper93ab56f2007-02-05 22:12:41 +0000922 ignore fchown's return value.
923 (do_oper_insert): Handle error when writing padding.
924 * ranlib.c: Add fchown complain work around.
925
Ulrich Drepper0fe63532007-02-05 21:05:51 +0000926 * arlib.c: Make symtab a global variable. Change all users.
927 * arlib2.c: Likewise.
928 * ranlib.c: Likewise.
929 * ar.c: Likewise.
930 * arlib.h: Declare it.
931
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00009322007-01-11 Roland McGrath <roland@redhat.com>
933
934 * elflint.c (check_sections): Use ebl_machine_section_flag_check on
935 SHF_MASKPROC bits separately from generic sh_flags validation.
936
Ulrich Drepperce0bdb62007-02-05 07:13:52 +00009372007-02-04 Ulrich Drepper <drepper@redhat.com>
938
939 * ar.c: New file.
940 * arlib.c: New file.
941 * arlib2.c: New file.
942 * arlib.h: New file.
943 * Makefile (noinst_LIBRARIES): Add libar.
944 (libar_a_SOURCES): Define.
945 (ar_LDADD): Define.
946 (CFLAGS_ar): Define.
947 * ranlib.c: Change to use arlib.
948
949 * elflint.c (check_symtab): Work around GNU ld bug which omits
950 sections but not symbols in those sections.
951
Ulrich Drepperb770cf92007-01-10 21:02:34 +00009522007-01-10 Ulrich Drepper <drepper@redhat.com>
953
954 * addr2line.c: Update copyright year.
955 * elfcmp.c: Likewise.
956 * elflint.c: Likewise.
957 * findtextrel.c: Likewise.
958 * ld.c: Likewise.
959 * nm.c: Likewise.
960 * objdump.c: Likewise.
961 * ranlib.c: Likewise.
962 * readelf.c: Likewise.
963 * size.c: Likewise.
964 * strings.c: Likewise.
965 * strip.c: Likewise.
966
Ulrich Drepper7c0e79f2006-12-09 21:10:19 +00009672006-12-09 Ulrich Drepper <drepper@redhat.com>
968
969 * elflint.c (compare_hash_gnu_hash): New function. Report if the
970 two hash tables have different content (module expected omission
971 of undefined symbols).
972
Roland McGrath8190db62006-12-17 23:56:51 +00009732006-10-31 Roland McGrath <roland@redhat.com>
974
975 * elflint.c (check_program_header): Don't complain about
Ulrich Drepper56bc0b82006-12-18 22:38:08 +0000976 p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.
Roland McGrath8190db62006-12-17 23:56:51 +0000977
9782006-09-19 Jakub Jelinek <jakub@redhat.com>
979
980 * strip.c (process_file): Disallow -f on archives.
981
9822006-10-09 Roland McGrath <roland@redhat.com>
983
984 * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
985
Roland McGrathc373d852006-10-10 00:25:21 +00009862006-08-29 Roland McGrath <roland@redhat.com>
987
988 * Makefile.am (MAINTAINERCLEANFILES): New variable.
989
990 * readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
991 Reported by Christian Aichinger <Greek0@gmx.net>.
992
993 * elflint.c (valid_e_machine): Add EM_ALPHA.
994 Reported by Christian Aichinger <Greek0@gmx.net>.
995
Ulrich Drepper231c5902006-08-08 22:00:11 +00009962006-08-08 Ulrich Drepper <drepper@redhat.com>
997
998 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
999 Keep track of which "high DT" entries are present.
1000 Check that either old or GNU-style hash table is present.
1001 If GNU-style hash table is used a symbol table is mandatory.
1002 Check that if any prelink entry is present all of them are.
1003 (check_gnu_hash): Only fail for undefined symbols in GNU-style hash
1004 table if they don't refer to functions.
1005
Roland McGrath858b1892006-07-17 08:41:15 +000010062006-07-17 Roland McGrath <roland@redhat.com>
1007
1008 * elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
1009 (add_version): Likewise for argument.
1010 (check_versym): Cast constant to GElf_Versym for comparison.
1011
Roland McGrath4ec807e2006-07-13 03:59:46 +000010122006-07-12 Roland McGrath <roland@redhat.com>
1013
1014 * readelf.c (handle_gnu_hash): Add casts for machines where
1015 Elf32_Word != unsigned int.
1016
Ulrich Drepperdcf61602006-07-12 19:59:02 +000010172006-07-12 Ulrich Drepper <drepper@redhat.com>
1018
1019 * elflint.c (check_sysv_hash64): Fix printf format.
1020
Ulrich Dreppercc415622006-07-12 19:42:23 +000010212006-07-11 Roland McGrath <roland@redhat.com>
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001022
Ulrich Dreppercc415622006-07-12 19:42:23 +00001023 * addr2line.c (options): English fix in -f doc string.
1024
1025 * addr2line.c (use_comp_dir): New variable.
1026 (options, parse_opt): Grok -A/--absolute to set it.
1027 (handle_address): If set, prepend dwfl_line_comp_dir results to
1028 relative file names.
Ulrich Drepper8ae58142006-07-12 05:22:32 +00001029
Ulrich Drepper28ed8952006-07-07 03:43:47 +000010302006-07-06 Ulrich Drepper <drepper@redhat.com>
1031
1032 * elflint.c: Adjust for latest new hash table format.
1033 * readelf.c: Likewise.
1034
1035 * elflint.c (check_versym): Ignore hidden bit when comparing version
1036 numbers.
1037
10382006-07-05 Ulrich Drepper <drepper@redhat.com>
1039
1040 * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
1041 discarded COMDAT symbols.
1042
1043 * i386_ld.c (elf_i386_count_relocations): Lot of corrections.
1044 (elf_i386_create_relocations): Likewise.
1045 * ld.h (struct symbol): Add local and hidden bits.
1046 * ld.c (create_special_section_symbol): These synthsized symbols
1047 are local and hidden.
1048 * ldgeneric.c (file_process2): Check whether input file matches
1049 the emulation.
1050 (fillin_special_symbol): Create symbols as local and/or hidden
1051 if requested.
1052 (ld_generic_create_outfile): Make local copy of symbol.
1053 Don't hide global, defined symbols in dynamic symbol table unless
1054 requested. Synthetic symbols have no version information.
1055
1056 * elflint.c: Add support for checking 64-bit SysV-style hash tables.
1057 * readelf.c: Add support for printing 64-bit SysV-style hash tables.
1058
10592006-07-04 Ulrich Drepper <drepper@redhat.com>
1060
1061 * elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
1062 testing.
1063
10642006-07-03 Ulrich Drepper <drepper@redhat.com>
1065
1066 * elflint.c: Add testing of DT_GNU_HASH.
1067 * readelf.c: Implement showing histogram for DT_GNU_HASH section.
1068
1069 * Makefile.am: Add hacks to create dependency files for non-generic
1070 linker.
1071
Ulrich Drepper6ca46002006-06-12 22:40:23 +000010722006-06-12 Ulrich Drepper <drepper@redhat.com>
1073
1074 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1075 section if creating a DSO and no interpreter is given.
1076 (ld_generic_create_outfile): Don't store reference to symbols in
1077 discarded COMDAT groups. Don't create PHDR and INTERP program header
1078 for DSO if no interpreter is specified.
Ulrich Drepper595d0e72006-06-12 23:25:17 +00001079 (create_verneed_data): Pretty printing.
1080
Ulrich Drepper6ca46002006-06-12 22:40:23 +00001081 * ldscript.y (content): If a DSO is created don't set default
1082 interpreter from linker script.
1083
1084 * i386_ld.c (elf_i386_count_relocations): Do not add relocations
1085 for symbols in discarded COMDAT groups.
1086 (elf_i386_create_relocations): Likewise.
1087 * ld.h (struct scninfo): Add unused_comdat.
1088 * ldgeneric.c (add_section): Also check group signature when
1089 matching COMDAT sections.
1090 (add_relocatable_file): Ignore symbols in COMDAT group which are
1091 discarded.
1092
1093 * elflint.c (check_one_reloc): For *_NONE relocs only check type
1094 and symbol reference.
1095
Ulrich Drepper54f33a72006-06-11 09:07:37 +000010962006-06-11 Ulrich Drepper <drepper@redhat.com>
1097
Ulrich Dreppercbb51e52006-06-11 20:25:23 +00001098 * elflint.c (check_dynamic): Fix checking value of tags which are
1099 offsets in the string section. Make sure DT_STRTAB points to the
1100 section referenced in sh_link.
1101
1102 * ld.c (options): Add headers. Add short option 'R' for '--rpath'.
1103
Ulrich Drepper54f33a72006-06-11 09:07:37 +00001104 * ld.c: Recognize --eh-frame-hdr option.
1105 * ld.h (struct ld_state): Add eh_frame_hdr field.
1106 * ldgeneric.c (struct unw_eh_frame_hdr): Define.
1107
1108 * ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
1109 SH_FLAGS_COMBINE.
1110 (add_relocatable_file): Minor optimization of last change.
1111 (match_section): Don't preserve SHF_GROUP flag any longer.
1112
Ulrich Drepper2d880282006-06-11 00:20:43 +000011132006-06-10 Ulrich Drepper <drepper@redhat.com>
1114
1115 * ld.c (parse_z_option): Recognize execstack and noexecstack.
Ulrich Drepper4f0a7a82006-06-11 00:53:45 +00001116 Handle record and ignore as position dependent options.
1117 (parse_z_option_2): Handle ignore and record here.
Ulrich Drepper2d880282006-06-11 00:20:43 +00001118 * ld.h (struct ld_state): Add execstack field.
1119 * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
1120 sections.
1121 (ld_generic_create_outfile): Fix program header creation in native
1122 linker. Add PT_GNU_STACK program header.
1123
Ulrich Dreppera688a732006-06-10 06:33:00 +000011242006-06-09 Ulrich Drepper <drepper@redhat.com>
1125
1126 * i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
1127 for PLT entries if there is no local definition.
1128
1129 * ld.c (parse_option): Handle -z ignore like --as-needed and
1130 -z record like --no-as-needed.
1131 * ld.h (struct ld_state): Remove ignore_unused_dsos field.
1132 * ldgeneric.c (new_generated_scn): Always compute ndt_needed by
1133 looping over DSOs. When deciding about adding DT_NEEDED entries
1134 use ->as_needed instead of ignore_unused_dsos.
1135
Ulrich Drepper8c56fe32006-05-31 15:50:43 +000011362006-05-31 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001137
Ulrich Drepper8c56fe32006-05-31 15:50:43 +00001138 * ld.c: Recognize --as-needed and --no-as-needed options.
1139 * ld.h (struct usedfile): Add as_needed field.
1140 (struct ld_state): Likewise.
1141 * ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
1142 the list.
1143 * ldscript.y (filename_id_list): Split to correctly parse all
1144 combinations.
1145 (mark_as_needed): Fix loop.
Ulrich Drepper11b030e2006-05-28 20:28:19 +00001146
Ulrich Drepper697f4db2006-06-10 06:50:47 +000011472006-05-28 Ulrich Drepper <drepper@redhat.com>
1148
1149 * addr2line.c (print_dwarf_function): Use unsigned type for lineno
1150 and colno.
1151
Ulrich Drepper2cb8e732006-05-27 21:57:27 +000011522006-05-27 Ulrich Drepper <drepper@redhat.com>
1153
1154 * readelf.c (handle_relocs_rela): Better notations for addon value.
Ulrich Drepper41a99082006-05-28 00:01:43 +00001155 (print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.
Ulrich Drepper2cb8e732006-05-27 21:57:27 +00001156
Ulrich Drepper82c345d2006-04-04 22:07:54 +000011572006-04-04 Ulrich Drepper <drepper@redhat.com>
1158
1159 * addr2line.c: Update copyright year.
1160 * elfcmp.c: Likewise.
1161 * elflint.c: Likewise.
1162 * findtextrel.c: Likewise.
1163 * ld.c: Likewise.
1164 * nm.c: Likewise.
1165 * objdump.c: Likewise.
1166 * ranlib.c: Likewise.
1167 * readelf.c: Likewise.
1168 * size.c: Likewise.
1169 * strings.c: Likewise.
1170 * strip.c: Likewise.
1171
Roland McGrathdd7e22b2006-03-09 23:05:47 +000011722006-03-09 Roland McGrath <roland@redhat.com>
1173
1174 * Makefile.am (AM_LDFLAGS): New variable.
1175
Roland McGrath060fa052006-03-02 07:51:50 +000011762006-03-01 Roland McGrath <roland@redhat.com>
1177
1178 * readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
1179 for dwarf.h changes matching 3.0 spec.
1180 (dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.
1181
Ulrich Drepper038129b2005-12-04 16:47:24 +000011822005-12-04 Ulrich Drepper <drepper@redhat.com>
1183
1184 * elflint.c (check_one_reloc): If relocation section is not loaded,
1185 don't check whether the relocations modify read-only sections or
1186 loaded and unloaded sections.
1187
Ulrich Drepper607e0542005-12-04 15:51:06 +000011882005-11-28 Ulrich Drepper <drepper@redhat.com>
1189
1190 * elflint.c (check_one_reloc): Take additional parameters. Use
1191 them to determine whether relocation is valid in this type of
1192 file. DSOs and executables can contain relocation sections in
1193 unloaded sections which just show the relocations the linker
1194 applied. Adjust all callers.
1195 (check_program_header): Check that PT_PHDR is loaded and that offset
1196 matches the one in the ELF header.
1197
Roland McGrath6724c902005-10-28 07:07:19 +000011982005-10-26 Roland McGrath <roland@redhat.com>
1199
1200 * nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.
1201
Ulrich Drepperd0449522005-09-03 07:23:52 +000012022005-09-03 Ulrich Drepper <drepper@redhat.com>
1203
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001204 * strip.c (handle_elf): Unify some error messages.
1205 * ld.c (main): Likewise.
1206 * ldgeneric.c (open_elf): Likewise.
1207 * elfcmp.c (main): Likewise.
1208 * elflint.c (check_elf_header): Likewise.
1209
1210 * size.c (process_file): Fix typo in error message.
1211
Ulrich Drepperd0449522005-09-03 07:23:52 +00001212 * readelf.c: Lots of little cleanups. Use _unlocked functions.
1213
Ulrich Dreppera60501e2005-09-02 19:50:17 +000012142005-09-02 Ulrich Drepper <drepper@redhat.com>
1215
Ulrich Dreppere3f9b7d2005-09-03 16:42:46 +00001216 * strings.c (main): Reset elfmap variable after munmap call.
Ulrich Drepper618795f2005-09-02 20:01:37 +00001217 [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
Ulrich Dreppera60501e2005-09-02 19:50:17 +00001218
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000012192005-08-28 Ulrich Drepper <drepper@redhat.com>
1220
1221 * ranlib.c: Don't define pread_retry and write_retry here.
1222
1223 * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
1224 (CLEANFILES): Add *.gcno *.gcda *.gconv.
1225
1226 * strings.c (process_chunk): Reorder expressions in conditional
1227 (process_chunk_mb): Likewise.
1228
1229 * strings.c: New file.
1230 * Makefile.am (bin_PROGRAMS): Add strings.
1231 (strings_no_Wstring): Define.
1232 (strings_LDADD): Define.
1233
Roland McGrath71e15a02005-08-27 10:33:26 +000012342005-08-27 Roland McGrath <roland@redhat.com>
1235
1236 * addr2line.c (dwarf_diename_integrate): Function removed.
1237 (print_dwarf_function): Use plain dwarf_diename.
1238
Ulrich Drepperc5a06cd2005-08-24 19:50:14 +000012392005-08-24 Ulrich Drepper <drepper@redhat.com>
1240
1241 * elflint.c (check_versym): Versioned symbols should not have
1242 local binding.
1243
Ulrich Drepper5d832292005-08-15 21:36:27 +000012442005-08-15 Ulrich Drepper <drepper@redhat.com>
1245
Ulrich Drepper61655e02005-08-16 04:23:02 +00001246 * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
1247 undefined.
1248
Ulrich Drepper5d832292005-08-15 21:36:27 +00001249 * Makefile.am: Add rules to build ranlib.
1250 * ranlib.c: New file.
1251
Roland McGrath18e13422005-08-15 08:01:25 +000012522005-08-14 Roland McGrath <roland@redhat.com>
1253
1254 * elflint.c (check_sections): Use ebl_section_type_name and allow any
1255 sh_type it recognizes.
1256
1257 * elflint.c (check_sections): Print unknown flags in hex, don't
1258 truncate high bits. Print section number and name for unknown type.
1259
Roland McGrathf6895042005-08-13 20:56:52 +000012602005-08-13 Roland McGrath <roland@redhat.com>
1261
1262 * elflint.c (check_program_header): Use ebl_segment_type_name and
1263 allow any p_type it recognizes. Include p_type value in error
1264 message for unknown type.
1265
Ulrich Drepperc5c33a62005-08-13 17:50:47 +000012662005-08-13 Ulrich Drepper <drepper@redhat.com>
1267
1268 * elflint.c (check_symtab): Simplify last change a bit. Pass ehdr
1269 to ebl_check_special_symbol.
1270 (check_sections): Pass ehdr to ebl_bss_plt_p.
1271
Roland McGrath653d3762005-08-13 01:59:10 +000012722005-08-12 Roland McGrath <roland@redhat.com>
1273
1274 * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
1275 refers to the right section if it's not SHN_ABS.
1276 Let ebl_check_special_symbol override _G_O_T_ value and size checks.
1277
1278 * elflint.c (check_sections): Don't complain about a non-NOBITS
1279 section taking no segment space, if it's sh_size is 0.
1280
1281 * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
1282 be PROGBITS or NOBITS.
1283
1284 * elflint.c (check_symtab): Use ebl_check_special_symbol to override
1285 standard st_value and st_size checks.
1286
Roland McGrath1c83bf12005-08-11 07:03:55 +000012872005-07-28 Roland McGrath <roland@redhat.com>
Ulrich Drepperfaf4d192005-08-11 05:12:05 +00001288
Roland McGrath1c83bf12005-08-11 07:03:55 +00001289 * addr2line.c (options, parse_opt): Don't handle -e here.
1290 (executable): Variable removed.
1291 (argp_children): New static variable.
1292 (argp): Use it. Make const.
1293 (main): Fill in argp_children from dwfl_standard_argp ().
1294 Let libdwfl handle file selection, pass Dwfl handle to handle_address.
1295 (print_dwarf_function): New function. Try to figure out inline chain.
1296 (elf_getname): Function removed, libdwfl does it for us.
1297 (handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
1298 Use dwfl_module_addrname instead of elf_getname.
1299 Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
1300 * Makefile.am (INCLUDES): Add libdwfl directory to path.
1301
13022005-08-10 Ulrich Drepper <drepper@redhat.com>
1303
1304 * strip.c (parse_opt): STATE parameter is now used.
1305 Various little cleanups.
1306
1307 * readelf.c (print_debug_line_section): Correct fallout of renaming
1308 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001309
Roland McGrath8f31c2c2005-08-09 04:58:05 +000013102005-08-08 Roland McGrath <roland@redhat.com>
1311
1312 * strip.c (options, parse_opt): Grok -R .comment for compatibility
1313 with binutils strip. Likewise -d, -S, as aliases for -g.
1314 Likewise ignore -s/--strip-all.
1315
Roland McGrath095a01b2005-08-08 03:49:35 +000013162005-08-07 Roland McGrath <roland@redhat.com>
1317
1318 * strip.c (process_file): Open read-only when using a different output
1319 file.
1320
Ulrich Drepper47be7952005-08-07 04:41:39 +000013212005-08-06 Ulrich Drepper <drepper@redhat.com>
1322
Ulrich Drepper637963b2005-08-07 05:33:07 +00001323 * elflint.c (in_nobits_scn): New function.
1324 (check_versym): Allow references for defined symbols against versions
1325 of other DSOs also for symbols in nobits sections.
1326 Move a few variables around.
1327
Ulrich Drepper47be7952005-08-07 04:41:39 +00001328 * Makefile.am (AM_CFLAGS): Avoid duplication.
1329 Link with statis libs if BUILD_STATIC.
1330
Ulrich Drepperdbace232005-08-06 01:37:23 +000013312005-08-05 Ulrich Drepper <drepper@redhat.com>
1332
1333 * elflint.c: Many, many more tests. Mostly related to symbol
1334 versioning. Those sections should now be completely checked.
1335
1336 * readelf.c (print_dynamic): Use gelf_offscn.
1337
Ulrich Drepperacb89832005-08-04 07:01:49 +000013382005-08-04 Ulrich Drepper <drepper@redhat.com>
1339
1340 * elflint.c: Add lots more tests: more extension symbol table sanity,
1341 versioning section tests, hash table tests. General cleanup.
1342
Ulrich Drepperc911c9e2005-08-02 16:07:42 +000013432005-08-02 Ulrich Drepper <drepper@redhat.com>
1344
Ulrich Drepper8a687742005-08-03 02:24:12 +00001345 * objdump.c: New file.
1346 * Makefile.am (bin_PROGRAMS): Add objdump.
1347 (objdump_LDADD): Define.
1348
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001349 * elflint.c (check_reloc_shdr): New function split out from check_rela
1350 and check_rel.
1351 (check_one_reloc): New function. Likewise.
1352 (check_rela): Use check_reloc_shdr and check_one_reloc.
1353 (check_rel): Likewise.
Ulrich Drepper41de4882005-08-03 00:02:56 +00001354 (check_program_header): Check that PT_DYNAMIC entry matches .dynamic
1355 section.
1356 Add checks that relocations against read-only segments are flagged,
1357 that the text relocation flag is not set unnecessarily, and that
1358 relocations in one section are either against loaded or not-loaded
1359 segments.
Ulrich Drepperc911c9e2005-08-02 16:07:42 +00001360
Ulrich Drepper8533dcf2005-08-01 07:18:47 +000013612005-08-01 Ulrich Drepper <drepper@redhat.com>
1362
1363 * elfcmp.c (main): Ignore section count and section name string table
1364 section index.
1365
Roland McGrathf9ece8a2005-07-28 07:03:04 +000013662005-07-27 Roland McGrath <roland@redhat.com>
1367
1368 * elfcmp.c: Include <locale.h>.
1369
Ulrich Drepper7d48d6a2005-07-27 10:13:23 +000013702005-07-27 Ulrich Drepper <drepper@redhat.com>
1371
1372 * elfcmp.c: Print name and index of differing section.
1373
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000013742005-07-24 Ulrich Drepper <drepper@redhat.com>
1375
1376 * elfcmp.c: Implement comparing gaps between sections.
1377
13782005-07-23 Ulrich Drepper <drepper@redhat.com>
1379
1380 * elflint.c: Include libeblP.h instead of libebl.h.
1381 * nm.c: Likewise.
1382 * readelf.c: Likewise.
1383 * elfcmp.c: Likewise.
1384
1385 * elfcmp.c (main): Compare individual ELF header fields, excluding
1386 e_shoff instead of the whole struct at once.
1387 Use ebl_section_strip_p instead of SECTION_STRIP_P.
1388 * strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.
1389
13902005-07-22 Ulrich Drepper <drepper@redhat.com>
1391
1392 * elfcmp.c (main): Take empty section into account when comparing
1393 section content.
1394
1395 * elflint.c (check_dynamic): Check that d_tag value is >= 0 before
1396 using it.
1397
13982005-07-21 Ulrich Drepper <drepper@redhat.com>
1399
1400 * elfcmp.c: New file.
1401 * Makefile.am (bin_PROGRAMS): Add elfcmp.
1402 (elfcmp_LDADD): Define.
1403
1404 * elflint.c (check_rela): Check that copy relocations only reference
1405 object symbols or symbols with unknown type.
1406 (check_rel): Likewise.
1407
14082005-06-08 Roland McGrath <roland@redhat.com>
1409
1410 * readelf.c (print_ops): Add consts.
1411
14122005-05-31 Roland McGrath <roland@redhat.com>
1413
1414 * readelf.c (print_debug_abbrev_section): Don't bail after first CU's
1415 abbreviations. Print a header line before each CU section.
1416
1417 * readelf.c (print_debug_loc_section): Fix indentation for larger
1418 address size.
1419
14202005-05-30 Roland McGrath <roland@redhat.com>
1421
1422 * readelf.c (print_debug_line_section): Print section offset of each
1423 CU's table, so they are easy to find from seeing the stmt_list value.
1424
1425 * readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
1426 (attr_callback): Grok DW_AT_ranges and print offset in hex.
1427
1428 * readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
1429 (print_debug_ranges_section, print_debug_loc_section): Likewise.
1430
1431 * readelf.c (print_ops): Take different args for indentation control.
1432 (attr_callback): Caller updated.
1433 Grok several more block-form attributes as being location expressions.
1434 For those same attributes with udata forms, format output differently
1435 for location list offset.
1436 (print_debug_loc_section): Implement it for real.
1437
1438 * readelf.c (options): Mention ranges for --debug-dump.
1439 (enum section_e): Add section_ranges.
1440 (parse_opt): Grok "ranges" for -w/--debug-dump.
1441 (print_debug_ranges_section): New function.
1442 (print_debug): Handle .debug_ranges section.
1443
14442005-05-30 Ulrich Drepper <drepper@redhat.com>
1445
1446 * readelf.c (handle_notes): At least x86-64 need not have the note
1447 section values aligned to 8 bytes.
1448
14492005-05-18 Ulrich Drepper <drepper@redhat.com>
1450
1451 * readelf.c (dwarf_tag_string): Add new tags.
1452
14532005-05-08 Roland McGrath <roland@redhat.com>
1454
1455 * strip.c (handle_elf): Don't translate hash and versym data formats,
1456 elf_getdata already did it for us.
1457
14582005-05-07 Ulrich Drepper <drepper@redhat.com>
1459
1460 * Makefile.am (findtextrel_LDADD): Add $(libmudflap).
1461 (addr2line_LDADD): Likewise.
1462
14632005-05-03 Roland McGrath <roland@redhat.com>
1464
1465 * strip.c (handle_elf): Apply symbol table fixups to discarded
1466 relocation sections when they are being saved in the debug file.
1467
1468 * strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
1469 and gelf_xlatetof, not the native byte order.
1470
1471 * strip.c (parse_opt): Give error if -f or -o is repeated.
1472 (main): Exit if argp_parse returns nonzero.
1473
1474 * strip.c (debug_fname_embed): New variable.
1475 (options, parse_opt): New option -F to set it.
1476
14772005-05-07 Ulrich Drepper <drepper@redhat.com>
1478
1479 * readelf.c (parse_opt): Make any_control_option variable
1480 local. Simplify some tests.
1481
14822005-05-03 Roland McGrath <roland@redhat.com>
1483
1484 * strip.c (crc32_file): Function removed (now in ../lib).
1485
14862005-05-03 Roland McGrath <roland@redhat.com>
1487
1488 * elflint.c (is_debuginfo): New variable.
1489 (options, parse_opt): New option --debuginfo/-d to set it.
1490 (check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
1491 (check_note): If is_debuginfo, don't try to get note contents.
1492
14932005-04-24 Ulrich Drepper <drepper@redhat.com>
1494
1495 * readelf.c (print_debug_abbrev_section): Don't print error when end of
1496 section reached.
1497
14982005-04-14 Ulrich Drepper <drepper@redhat.com>
1499
1500 * readelf.c (dwarf_encoding_string): New function.
1501 (dwarf_inline_string): New function.
1502 (dwarf_access_string): New function.
1503 (dwarf_visibility_string): New function.
1504 (dwarf_virtuality_string): New function.
1505 (dwarf_identifier_case_string): New function.
1506 (dwarf_calling_convention_string): New function.
1507 (dwarf_ordering_string): New function.
1508 (dwarf_discr_list_string): New function.
1509 (attr_callback): Decode man more attribute values.
1510
15112005-04-01 Ulrich Drepper <drepper@redhat.com>
1512
1513 * addr2line.c: Finish implementation of -f option.
1514
15152005-03-29 Ulrich Drepper <drepper@redhat.com>
1516
1517 * addr2line.c: New file.
1518 * Makefile.am (bin_PROGRAMS): Add addr2line.
1519 Define addr2line_LDADD.
1520
1521 * findtextrel.c: Use new dwarf_addrdie function.
1522
1523 * findtextrel.c: Fix usage message and re-add accidentally removed
1524 line.
1525
15262005-03-28 Ulrich Drepper <drepper@redhat.com>
1527
1528 * findtextrel.c: New file.
1529 * Makefile: Add rules to build findtextrel.
1530
15312005-02-15 Ulrich Drepper <drepper@redhat.com>
1532
1533 * ldlex.l: Provide ECHO definition to avoid warning.
1534
1535 * elflint.c (check_program_header): Fix typo in RELRO test.
1536
1537 * Makefile.am (AM_CFLAGS): Add more warning options.
1538 * elflint.c: Fix warnings introduced by the new warning options.
1539 * i386_ld.c: Likewise.
1540 * ld.c: Likewise.
1541 * ld.h: Likewise.
1542 * ldgeneric.c: Likewise.
1543 * nm.c: Likewise.
1544 * readelf.c: Likewise.
1545 * sectionhash.c: Likewise.
1546 * size.c: Likewise.
1547 * string.c: Likewise.
1548
15492005-02-05 Ulrich Drepper <drepper@redhat.com>
1550
1551 * Makefile.am: Check for text relocations in constructed DSOs.
1552
1553 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all apps
1554 with -lmudflap.
1555
1556 * ldscript.y: Add as_needed handling.
1557 * ldlex.l: Recognize AS_NEEDED token.
1558 * ld.h (struct filename_list): Add as_needed flag.
1559
15602005-02-04 Ulrich Drepper <drepper@redhat.com>
1561
1562 * elflint.c (check_symtab): Correctly determine size of GOT section.
1563
15642005-01-19 Ulrich Drepper <drepper@redhat.com>
1565
1566 * ld.c: Remove unnecessary more_help function. Print bug report
1567 address using argp.
1568 * strip.c: Likewise.
1569 * size.c: Likewise.
1570 * nm.c: Likewise.
1571 * readelf.c: Likewise.
1572 * elflint.c: Likewise.
1573
1574 * elflint.c (main): Don't check for parameter problems here.
1575 (parse_opt): Do it here, where we get informed about some of them
1576 anyway.
1577
1578 * readelf.c (main): Don't check for parameter problems here.
1579 (parse_opt): Do it here, where we get informed about some of them
1580 anyway.
1581
15822005-01-11 Ulrich Drepper <drepper@redhat.com>
1583
1584 * strip.c: Update copyright year.
1585 * readelf.c: Likewise.
1586 * size.c: Likewise.
1587 * nm.c: Likewise.
1588 * ld.c: Likewise.
1589 * elflint.c: Likewise.
1590
1591 * elflint.c (check_symtab): Don't warn about wrong size for
1592 _DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.
1593
15942004-10-05 Ulrich Drepper <drepper@redhat.com>
1595
1596 * readelf.c (print_phdr): In section mapping, also indicate
1597 sections in read-only segments.
1598
15992004-09-25 Ulrich Drepper <drepper@redhat.com>
1600
1601 * readelf.c: Make compile with gcc 4.0.
1602 * strip.c: Likewise.
1603
16042004-08-16 Ulrich Drepper <drepper@redhat.com>
1605
1606 * strip.c (handle_elf): Rewrite dynamic memory handling to use of
1607 allocate to work around gcc 3.4 bug.
1608
16092004-01-25 Ulrich Drepper <drepper@redhat.com>
1610
1611 * ldlex.l (invalid_char): Better error message.
1612
16132004-01-23 Ulrich Drepper <drepper@redhat.com>
1614
1615 * readelf.c: Print SHT_GNU_LIBLIST sections.
1616
1617 * none_ld.c: New file.
1618
16192004-01-21 Ulrich Drepper <drepper@redhat.com>
1620
1621 * Makefile.am: Enable building of machine specific linker.
1622
16232004-01-20 Ulrich Drepper <drepper@redhat.com>
1624
1625 * Makefile.am: Support building with mudflap.
1626
1627 * i386_ld.c: Fix warnings gcc 3.4 spits out.
1628 * ldgeneric.c: Likewise.
1629 * ldscript.y: Likewise.
1630 * readelf.c: Likewise.
1631 * strip.c: Likewise.
1632
1633 * readelf.c (print_debug_line_section): Determine address size
1634 correctly.
1635
16362004-01-19 Ulrich Drepper <drepper@redhat.com>
1637
1638 * readelf.c (print_phdr): Show which sections are covered by the
1639 PT_GNU_RELRO entry.
1640
1641 * elflint.c (check_program_header): Check PT_GNU_RELRO entry.
1642
1643 * readelf.c (print_debug_macinfo_section): Implement.
1644
16452004-01-18 Ulrich Drepper <drepper@redhat.com>
1646
1647 * readelf.c (print_debug_line_section): Implement.
1648
16492004-01-17 Ulrich Drepper <drepper@redhat.com>
1650
1651 * src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
1652 * src/ld.c: Likewise.
1653 * src/nm.c: Likewise.
1654 * src/readelf.c: Likewise.
1655 * src/size.c: Likewise.
1656 * src/strip.c: Likewise.
1657
1658 * strip.c: Add a few more unlikely. Reduce scope of some variables.
1659
1660 * Makefile.am: Support building with mudflap.
1661
16622004-01-16 Ulrich Drepper <drepper@redhat.com>
1663
1664 * readelf.c (print_debug_info_section): Free dies memory.
1665
1666 * readelf.c: Print .debug_info section content.
1667
16682004-01-13 Ulrich Drepper <drepper@redhat.com>
1669
1670 * readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.
1671
16722004-01-12 Ulrich Drepper <drepper@redhat.com>
1673
1674 * readelf.c (print_debug_aranges): Implement using libdw.
1675
16762004-01-11 Ulrich Drepper <drepper@redhat.com>
1677
1678 * nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.
1679
1680 * readelf.c: Use libdw instead of libdwarf. Not all of the old
1681 behavior is available yet.
1682 * Makefile.am: Link readelf with libdw. Remove libdwarf include path.
1683
16842004-01-09 Ulrich Drepper <drepper@redhat.com>
1685
1686 * nm.c (get_local_names): Adjust call to dwarf_nextcu.
1687
1688 * nm.c: Implement getting information about local variables.
1689
16902004-01-07 Ulrich Drepper <drepper@redhat.com>
1691
1692 * nm.c: Read also debug information for local symbols.
1693
16942004-01-05 Ulrich Drepper <drepper@redhat.com>
1695
1696 * nm.c: Shuffle dwarf handling code around so the maximum column
1697 width can be computed ahead of printing. Avoid collection symbols
1698 which are not printed anyway.
1699
1700 * nm.c: Rewrite dwarf handling to use libdw.
1701 * Makefile.am (AM_CFLAGS): Add -std parameter.
1702 (INCLUDES): Find header in libdw subdir.
1703 (nm_LDADD): Replace libdwarf with libdw.
1704
1705 * elflint.c: Update copyright year.
1706 * readelf.c: Likewise.
1707 * size.c: Likewise.
1708 * strip.c: Likewise.
1709 * nm.c: Likewise.
1710
17112003-12-31 Ulrich Drepper <drepper@redhat.com>
1712
1713 * strip.c (process_file): Close file before returning.
1714
17152003-11-19 Ulrich Drepper <drepper@redhat.com>
1716
1717 * readelf.c (handle_dynamic): Make column for tag name wider.
1718
17192003-09-29 Ulrich Drepper <drepper@redhat.com>
1720
1721 * readelf.c (handle_dynamic): Always terminate tag name with a space.
1722
17232003-09-25 Ulrich Drepper <drepper@redhat.com>
1724
1725 * strip.c (process_file): Don't mmap the input file, we modify the
1726 data structures and don't want the change end up on disk.
1727
17282003-09-23 Jakub Jelinek <jakub@redhat.com>
1729
1730 * unaligned.h (union u_2ubyte_unaligned,
1731 union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
1732 packed attribute.
1733 (add_2ubyte_unaligned, add_4ubyte_unaligned,
1734 add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
1735 Read/store value through _ptr->u instead of *_ptr.
1736
17372003-09-22 Ulrich Drepper <drepper@redhat.com>
1738
1739 * size.c (show_sysv): Change type of maxlen to int.
1740
1741 * strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
1742 buckets.
1743
1744 * i386_ld.c: Many many fixes and extensions.
1745 * ld.c: Likewise.
1746 * ldgeneric.c: Likewise.
1747
17482003-08-16 Ulrich Drepper <drepper@redhat.com>
1749
1750 * ldgeneric.c (check_definition): Don't add symbol on dso_list if
1751 the reference is from another DSO.
1752
17532003-08-15 Ulrich Drepper <drepper@redhat.com>
1754
1755 * ldgeneric.c (find_entry_point): It is no fatal error if no entry
1756 point is found when creating a DSO.
1757
17582003-08-14 Ulrich Drepper <drepper@redhat.com>
1759
1760 * ld.c (main): Always call FLAG_UNRESOLVED.
1761 * ldgeneric.c (ld_generic_flag_unresolved): Only complain about
1762 undefined symbols if not creating DSO or ld_state.nodefs is not set.
1763
17642003-08-13 Ulrich Drepper <drepper@redhat.com>
1765
1766 * Makefile.in: Depend on libebl.a, not libebl.so.
1767
1768 * ld.c (main): Mark stream for linker script as locked by caller.
1769 (read_version_script): Likewise.
1770 * ldlex.c: Define fread and fwrite to _unlocked variant.
1771
1772 * i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
1773 target_bswap_32.
1774 * unaligned.h: Define target_bswap_16, target_bswap_32, and
1775 target_bswap_64.
1776 (store_2ubyte_unaligned, store_4ubyte_unaligned,
1777 store_8ubyte_unaligned): Define using new macros.
1778
17792003-08-12 Ulrich Drepper <drepper@redhat.com>
1780
1781 * i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
1782 possibly unaligned memory. Support use of big endian machines.
1783
17842003-08-11 Ulrich Drepper <drepper@redhat.com>
1785
1786 * Moved to CVS archive.