* cache.c (close_one): Remove mtime hack.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
2
3 * cache.c (close_one): Remove mtime hack.
4
5 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
6
7 PR ld/5913
8 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
9 (elfNN_ia64_dtprel_base): Likewise.
10 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
11 tls_sec is NULL before calling elfNN_ia64_tprel_base or
12 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
13
14 2008-03-14 Alan Modra <amodra@bigpond.net.au>
15
16 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
17 common code to..
18 (maybe_needs_stub): ..here, a new function that also omits stubs
19 for .eh_frame, and..
20 (needs_ovl_stub): ..here. Create stubs for labels in code section
21 referenced by switch jump table.
22 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
23 (enum _insn_type): Delete.
24 (enum _stub_type): New.
25 (count_stub, build_stub): Adjust.
26 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
27
28 2008-03-13 Alan Modra <amodra@bigpond.net.au>
29
30 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
31 (_bfd_elf_assign_file_position_for_section): Simplify align.
32 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
33 for sh_addralign.
34 (elf_fake_sections, swap_out_syms): Likewise.
35 * elflink.c (bfd_elf_final_link): Likewise.
36
37 2008-03-13 Alan Modra <amodra@bigpond.net.au>
38
39 * Makefile.am: Run "make dep-am".
40 * Makefile.in: Regenerate.
41 * po/SRC-POTFILES.in: Regenerate.
42
43 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
44
45 From Jie Zhang <jie.zhang@analog.com>
46 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
47 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
48 gotoff, call and sym not bitfields.
49 (bfinfdpic_gc_sweep_hook): New function; update the relocation
50 information for the relocations of the section being removed.
51 (bfinfdpic_check_relocs): Accumulate the number of relocations
52 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
53 fdgoffhilo, gotoff, call and sym fields.
54 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
55
56 2008-03-12 Alan Modra <amodra@bigpond.net.au>
57
58 PR 5900
59 * elf-bfd.h: Include elf/internal.h after elf/external.h.
60 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
61 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
62 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
63 seen in external structs.
64 (valid_section_index_p): Delete.
65 (elf_object_p): Don't increment section numbers over reserved range.
66 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
67 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
68 seen in external structs. Don't increment section numbers over
69 reserved range.
70 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
71 (bfd_section_from_shdr): Likewise.
72 (group_signature): Range check before accessing elf_elfsections.
73 (_bfd_elf_setup_sections): Likewise.
74 (bfd_section_from_shdr): Likewise.
75 (bfd_section_from_shdr): Don't increment section number over
76 reserved sections.
77 (assign_file_positions_for_non_load_sections): Likewise.
78 (assign_file_positions_except_relocs): Likewise.
79 (_bfd_elf_write_object_contents): Likewise.
80 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
81 (prep_headers): Delete unused variable.
82 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
83 for changed SHN_* values.
84 (check_dynsym, elf_link_input_bfd): Likewise.
85 (bfd_elf_final_link): Likewise. Don't skip over reserved section
86 range.
87 (elf_fixup_link_order): Check that sh_link field is valid.
88 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
89 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
90 accesssing elf_elfsections.
91 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
92 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
93 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
94 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
95 SHN_* defines. Test for SHN_BAD return from
96 _bfd_elf_section_from_bfd_section
97
98 2008-03-12 Alan Modra <amodra@bigpond.net.au>
99
100 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
101 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
102 SHN_BAD on error.
103 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
104 _bfd_elf_section_from_bfd_section, not -1.
105 (swap_out_syms): Likewise.
106 * elflink.c (elf_link_add_object_symbols): Likewise.
107 (bfd_elf_get_bfd_needed_list): Likewise.
108 (bfd_elf_match_symbols_in_sections): Likewise.
109 (elf_link_add_object_symbols): Don't bother testing for symbols
110 using normal sections before calling bfd_section_from_elf_index.
111 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
112 (bfd_elf_reloc_symbol_deleted_p): Likewise.
113 * elfcode.h (elf_slurp_symbol_table): Likewise.
114 * elf32-spu.c (get_sym_h): Likewise.
115 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
116 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
117 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
118
119 2008-03-11 Alan Modra <amodra@bigpond.net.au>
120
121 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
122 to those in process_stubs for overlay symbols.
123
124 2008-03-09 Paul Brook <paul@codesourcery.com>
125
126 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
127 Tag_VFP_arch values.
128
129 2008-03-08 Paul Brook <paul@codesourcery.com>
130
131 * elf32-arm.c (insert_thumb_branch): Rewrite.
132 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
133
134 2008-03-07 Paul Brook <paul@codesourcery.com>
135
136 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
137 MOVT relocations.
138 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
139 extension.
140 (elf32_arm_relocate_section): Handle MOVW and MOVT
141 relocations. Improve safety check for other weird relocations.
142 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
143 relocations.
144
145 2008-03-03 Bob Wilson <bob.wilson@acm.org>
146
147 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
148 only compute its value once.
149
150 2008-03-03 Alan Modra <amodra@bigpond.net.au>
151
152 * elf32-spu.c (struct got_entry): Add "addend" field.
153 (count_stub, build_stub): Use a new stub if relocation addend
154 differs from existing stubs for this symbol.
155 (process_stubs): Deal with addends.
156 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
157
158 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
159
160 PR ld/5789
161 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
162 for hidden and local symbols.
163
164 2008-03-03 Alan Modra <amodra@bigpond.net.au>
165
166 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
167 undefined symbols with internal or hidden visibility.
168 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
169 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
170 return immediately on dynamic reloc error.
171
172 2008-03-01 Alan Modra <amodra@bigpond.net.au>
173
174 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
175 if emitrelocations.
176 (get_relocs): New function, split out from..
177 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
178 emitrelocations. Remove indx temp.
179 (ppc_size_one_stub): Count new stub relocs.
180 (ppc64_elf_size_stubs): Count new glink reloc.
181 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
182 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
183 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
184 glink code.
185
186 2008-02-28 Alan Modra <amodra@bigpond.net.au>
187
188 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
189 the "->start" pointer reaches to function origin, so that we
190 can handle functions split over more than two sections.
191 (build_call_tree): Likewise.
192 (pasted_function): Don't attempt to set fun->start back to the
193 function origin, just go back one section.
194
195 2008-02-27 Catherine Moore <clm@codesourcery.com>
196
197 * elf.c ( _bfd_elf_print_private_bfd_data): Call
198 elf_backend_get_target_dtag if defined.
199 * elf32-mips.c (elf_backend_get_target_dtag): Define.
200 * elf64-mips.c: Likewise.
201 * elfn32-mips.c: Likewise.
202 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
203 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
204 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
205 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
206 (elf_backend_data): Add elf_backend_get_target_dtag.
207
208 2008-02-26 Alan Modra <amodra@bigpond.net.au>
209
210 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
211 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
212 and assume branch relocs are not dynamic when non-shared.
213 (readonly_dynrelocs): New function, split out from..
214 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
215 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
216 clear non_got_ref..
217 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
218 Do allow dynamic relocs on undefined symbols.
219 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
220 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
221 check_relocs.
222 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
223 plt symbols needing pointer_equality_needed.
224
225 2008-02-23 Alan Modra <amodra@bigpond.net.au>
226
227 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
228
229 2008-02-23 Alan Modra <amodra@bigpond.net.au>
230
231 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
232 pointer_equality_needed.
233 (ppc_elf_check_relocs): Split out non-branch relocs from others
234 that might emit dynamic relocs. Set pointer_equality_needed
235 for their symbols. Don't set non_got_ref on branch reloc symbols.
236 (ppc_elf_hash_symbol): New function.
237 (elf_backend_hash_symbol): Define.
238 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
239 Error if pointer_equality_needed on weak plt symbol.
240
241 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
242
243 PR ld/5788
244 * elflink.c (elf_create_symbuf): Correct buffer size and
245 position.
246
247 2008-02-22 Nick Clifton <nickc@redhat.com>
248
249 PR 868
250 * dwarf2.c: Revert previous patch. All of the allocate memory is
251 on an obstack which will be freed at some other time.
252
253 2008-02-20 Nick Clifton <nickc@redhat.com>
254
255 PR 868
256 * libbfd.c (bfd_realloc_or_free): New function. Performs like
257 bfd_realloc, but if the (re)allocation fails, the pointer is
258 freed.
259 * libbfd-in.h: Prototype.
260 * libbfd.h: Regenerate.
261 * bfdio.c (bfd_bwrite): Use the new function.
262 (bfd_seek): Likewise.
263 * bfdwin.c:(bfd_get_file_window): Likewise.
264 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
265 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
266 * elf32-xtensa.c (vsprintf_msg): Likewise.
267 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
268 * stabs.c (_bfd_link_seciton_stabs): Likewise.
269 * vms-misc.c (_bfd_vms_get_record): Likewise.
270 * vms-tir.c (check_section): Likewise.
271 * vms.c (vms_new_section_hook): Likewise.
272 * elf32-arm.c (elf32_arm_section_map_add): Check that the
273 allocation of sec_data->map succeeded before using it.
274 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
275 symshndxbuf until it is known that the reallocation succeeded.
276
277 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
278 Nick Clifton <nickc@redhat.com>
279
280 PR 868
281 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
282 out of memory.
283 (decode_line_info): Free the line_info_table before returning a
284 failure result.
285 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
286 Free the line table. Free the function table. Free the variable
287 table.
288
289 2008-02-17 Mark Kettenis <kettenis@gnu.org>
290
291 * elf.c (swap_out_syms): Avoid preprocessing directive within
292 macro arg.
293
294 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
295
296 * elf.c (assign_file_positions_for_load_sections): Set the type of
297 PT_NOTE sections to SHT_NOTE.
298
299 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
300
301 * simple.c (bfd_simple_get_relocated_section_contents): Set
302 link_info.output_bfd.
303
304 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
305
306 * dwarf2.c (find_line): Don't trust debug information after an
307 unparseable compilation unit.
308
309 2008-02-15 Alan Modra <amodra@bigpond.net.au>
310
311 PR 5765
312 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
313 * bfd-in2.h: Regenerate.
314
315 2008-02-15 Alan Modra <amodra@bigpond.net.au>
316
317 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
318 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
319 tdata.
320 * elf32-hppa.c (elf32_hppa_mkobject): New function.
321 (bfd_elf32_mkobject): Define.
322 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
323 (is_ppc_elf): ..this new macro.
324 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
325 (is_ppc64_elf): ..this new macro.
326
327 2008-02-15 Alan Modra <amodra@bigpond.net.au>
328
329 * elflink.c: Replace all accesses to hash->creator field with
330 output_bfd->xvec.
331 * cofflink.c: Likewise.
332 * coff-h8300.c: Likewise.
333 * ecoff.c: Likewise.
334 * elf32-m68hc1x.c: Likewise.
335 * elf32-ppc.c: Likewise.
336 * elf64-alpha.c: Likewise.
337 * elf64-ppc.c: Likewise.
338 * elf64-sparc.c: Likewise.
339 * elfxx-mips.c: Likewise.
340 * i386linux.c: Likewise.
341 * m68klinux.c: Likewise.
342 * sparclinux.c: Likewise.
343 * sunos.c: Likewise.
344 * xcofflink.c: Likewise.
345 * linker.c: Likewise.
346 (_bfd_link_hash_table_init): Don't store creator.
347
348 2008-02-14 Peter Jones <pjones@redhat.com>
349
350 * efi-rtdrv-ia32.c: New file.
351 * efi-bsdrv-ia32.c: New file.
352 * efi-rtdrv-ia64.c: New file.
353 * efi-bsdrv-ia64.c: New file.
354 * efi-rtdrv-x86_64.c: New file.
355 * efi-bsdrv-x86_64.c: New file.
356 * peicode.h (pe_bfd_object_p): Add support for boot service and
357 runtime service drivers.
358 * libpei.h: Add macros for EFI formats, and rename the efi application
359 format macros to disambiguate.
360 * targets.c: Add bfd_target _vec externs.
361 (_bfd_tar): Add EFI _vec entries.
362 * config.bfd: Add EFI vectors into the selection routines.
363 * configure.in: add EFI _vec entries.
364 * configure: Regenerate.
365 * Makefile.am: Add EFI files.
366 * Makefile.in: Regenerate.
367
368 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
369
370 * dwarf1.c (struct dwarf1_debug): Add syms member.
371 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
372 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
373 section contents, check for out of memory.
374
375 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
376 (parse_die): Change data pointers to bfd_byte.
377 (parse_line_table, parse_functions_in_unit): Likewise.
378
379 2008-02-14 Alan Modra <amodra@bigpond.net.au>
380
381 * elflink.c (compute_bucket_count): Warning fixes.
382
383 2008-02-12 DJ Delorie <dj@redhat.com>
384
385 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
386 relocation pointing to local symbol in merged section.
387
388 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
389 (iq2000_elf_relocate_section): Call it.
390
391 2008-02-12 Nick Clifton <nickc@redhat.com>
392
393 PR ld/5692
394 * elf-bfd.h (enum elf_object_id): New enum, used to identify
395 target specific extensions to the elf_obj_tdata structure.
396 (struct elf_obj_tdata): New field 'object_id'.
397 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
398 macros for accessing fields in the elf_obj_tdata structure.
399 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
400 (bfd_elf_allocate_object): New function.
401 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
402 and implement by calling bfd_elf_allocate_object.
403 (bfd_elf_allocate_object): New function: Allocates an
404 elf_obj_tdata structure, possibly with a target specific
405 extension.
406 * elfxx-target.h (bfd_elfNN_mkobject): Use
407 bfd_elf_make_generic_object as the default value.
408 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
409 for consistency with other, similar structures.
410 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
411 ELF bfd.
412 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
413 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
414 the bfd being processed.
415 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
416 (bfd_elf32_arm_set_target_relocs): Likewise.
417 (bfd_elf32_arm_final_link_relocate): Likewise.
418 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
419 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
420 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
421 (bfd_elf32_arm_check_relocs): Likewise.
422 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
423 (bfd_elf32_arm_size_dynamic_sections): Likewise.
424 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
425 (bfd_elf32_arm_init_maps): Likewise.
426 (bfd_elf32_arm_final_link_relocate): Likewise.
427 (bfd_elf32_arm_relocate_section): Likewise.
428 (bfd_elf32_arm_gc_sweep_hook): Likewise.
429 (bfd_elf32_arm_check_relocs): Likewise.
430 (bfd_elf32_arm_size_dynamic_sections): Likewise.
431 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
432 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
433 ELF bfd.
434 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
435 being processed.
436 (elf_i386_size_dynamic_sections): Likewise.
437 (elf_i386_relocate_section): Likewise.
438 (elf_i386_check_relocs): Use elf_symtab_hdr.
439 (elf_i386_gc_sweep_hook): Likewise.
440 (elf_i386_size_dynamic_sections): Likewise.
441 (elf_i386_relocate_section): Likewise.
442 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
443 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
444 verify that the bfd before accessing target specific fields.
445 (ppc_elf_check_relocs): Likewise.
446 (elf_finish_pointer_linker_section): Likewise.
447 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
448 (ppc_elf_check_relocs): Likewise.
449 (ppc_elf_gc_sweep_hook): Likewise.
450 (ppc_elf_tls_optimize): Likewise.
451 (ppc_elf_size_dynamic_sections): Likewise.
452 (ppc_elf_relax_section): Likewise.
453 (ppc_elf_relocate_section): Likewise.
454 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
455 reminding programmers to keep this structure in sync with the one
456 defined in elf64-s390.c.
457 (elf_s390_mkobject): Call bfd_elf_allocate_object.
458 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
459 ELF bfd.
460 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
461 being processed.
462 (elf_s390_size_dynamic_sections): Likewise.
463 (elf_s390_relocate_section): Likewise.
464 (elf_s390_check_relocs): Use elf_symtab_hdr.
465 (elf_s390_gc_sweep_hook): Likewise.
466 (elf_s390_size_dynamic_sections): Likewise.
467 (elf_s390_relocate_section): Likewise.
468 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
469 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
470 ELF bfd.
471 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
472 bfd being processed.
473 (sh_elf_relocate_section): Likewise.
474 (sh_elf_check_relocs): Likewise.
475 (sh_elf_copy_private_data): Likewise.
476 (sh_elf_relax_section): Use elf_symtab_hdr.
477 (sh_elf_size_dynamic_sections): Likewise.
478 (sh_elf_relocate_section): Likewise.
479 (sh_elf_get_relocated_section_contents): Likewise.
480 (sh_elf_gc_sweep_hook): Likewise.
481 (sh_elf_check_relocs): Likewise.
482 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
483 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
484 Alpha ELF bfd.
485 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
486 the bfd being processed.
487 (elf64_alpha_create_dynamic_section): Likewise.
488 (elf64_alpha_check_relocs): Likewise.
489 (elf64_alpha_size_got_sections): Likewise.
490 (elf64_alpha_relax_section): Likewise.
491 (elf64_alpha_relocate_section): Likewise.
492 (elf64_alpha_final_link): Likewise.
493 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
494 (elf64_alpha_relax_section): Likewise.
495 (elf64_alpha_relocate_section_r): Likewise.
496 (elf64_alpha_relocate_section): Likewise.
497 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
498 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
499 being processed.
500 (opd_entry_value): Likewise.
501 (allocate_dynrelocs): Likewise.
502 (ppc64_elf_relocate_section): Likewise.
503 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
504 (opd_entry_value): Likewise.
505 (ppc64_elf_gc_sweep_hook): Likewise.
506 (get_sym_h): Likewise.
507 (ppc64_elf_edit_opd): Likewise.
508 (ppc64_elf_tls_optimize): Likewise.
509 (ppc64_elf_edit_toc): Likewise.
510 (ppc64_elf_size_dynamic_sections): Likewise.
511 (toc_adjusting_stub_needed): Likewise.
512 (ppc64_elf_size_stubs): Likewise.
513 (ppc64_elf_relocate_section): Likewise.
514 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
515 reminding programmers to keep this structure in sync with the one
516 defined in elf32-s390.c.
517 (elf_s390_mkobject): Call bfd_elf_allocate_object.
518 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
519 ELF bfd.
520 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
521 being processed.
522 (elf_s390_size_dynamic_sections): Likewise.
523 (elf_s390_relocate_section): Likewise.
524 (elf_s390_check_relocs): Use elf_symtab_hdr.
525 (elf_s390_gc_sweep_hook): Likewise.
526 (elf_s390_size_dynamic_sections): Likewise.
527 (elf_s390_relocate_section): Likewise.
528 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
529 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
530 x86_64 ELF bfd.
531 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
532 being processed.
533 (elf64_x86_64_size_dynamic_sections): Likewise.
534 (elf64_x86_64_relocate_section): Likewise.
535 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
536 (elf64_x86_64_gc_sweep_hook): Likewise.
537 (elf64_x86_64_size_dynamic_sections): Likewise.
538 (elf64_x86_64_relocate_section): Likewise.
539 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
540 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
541 ELF bfd.
542 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
543 bfd being processed.
544 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
545 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
546 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
547 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
548 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
549 (_bfd_sparc_elf_relocate_section): Likewise.
550
551 2008-02-12 Alan Modra <amodra@bigpond.net.au>
552
553 PR 5303, 5755
554 * arange-set.c: Delete.
555 * arange-set.h: Delete.
556 * dwarf2.c: Revert 2007-09-21 changes.
557 * Makefile.am: Likewise.
558 * Makefile.in: Regenerate.
559 * po/SRC-POTFILES.in: Regenerate.
560
561 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
562
563 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
564 if necessary.
565 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
566 mismatches are detected.
567
568 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
569 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
570
571 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
572
573 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
574 was reached.
575 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
576
577 2008-02-07 Alan Modra <amodra@bigpond.net.au>
578
579 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
580 of _ovly_buf_table size.
581 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
582 Adjust initialisations relating to _ovly_buf_table.
583
584 2008-02-04 Bob Wilson <bob.wilson@acm.org>
585
586 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
587 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
588 relocations against dynamic symbols.
589 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
590 .xt.lit section.
591
592 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
593 H.J. Lu <hongjiu.lu@intel.com>
594
595 PR 5715
596 * warning.m4: Enable -Wno-format by default when using gcc on
597 mingw.
598 * configure: Regenerated.
599
600 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
601
602 * archures.c: Update copyright.
603 (bfd_mach_mips_octeon): New macro.
604 * bfd-in2.h: Regenerate.
605 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
606 (mips_set_isa_flags): Likewise.
607 (mips_mach_extensions): Add Octeon.
608 * cpu-mips.c: Update copyright.
609 (I_mipsocteon): New enum constant.
610 (arch_info_struct): Add Octeon.
611
612 2008-02-04 Alan Modra <amodra@bigpond.net.au>
613
614 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
615 Return error status on unexpected relocation errors.
616
617 2008-02-04 Alan Modra <amodra@bigpond.net.au>
618
619 PR ld/5692
620 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
621 on non-ELF input.
622 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
623 processing on non-ELF input.
624
625 2008-01-31 Marc Gauthier <marc@tensilica.com>
626
627 * config.bfd (xtensa*-*-*): Recognize processor variants.
628
629 2008-01-31 Nick Clifton <nickc@redhat.com>
630
631 PR ld/5692
632 * elf.c (bfd_elf_get_elf_syms): Check the return value of
633 get_elf_backend_data.
634
635 2008-01-28 Fabian Groffen <grobian@gentoo.org>
636
637 * config.bfd (x86_64-*-solaris2): Add support for this target.
638
639 2008-01-28 Alan Modra <amodra@bigpond.net.au>
640
641 Rewrite SPU overlay handling code. Put overlay calls stubs in the
642 overlays where possible. Use a faster call stub, or optionally at
643 compile time, a more compact stub. Double size of _ovly_buf_table
644 so that low bit of _ovly_table.buf can be used as a "present" bit.
645 Reserve an extra _ovly_table entry for index zero.
646 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
647 add new ones.
648 (struct got_entry): New.
649 (struct spu_stub_hash_entry): Delete.
650 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
651 (spu_elf_link_hash_table_create): Adjust for struct changes.
652 (spu_stub_name): Delete.
653 (spu_elf_find_overlays): Don't track sections from overlay regions.
654 Instead set ovl_buf number in spu elf section data. Error if
655 overlays in one region don't start at the same address. Adjust
656 for struct _spu_elf_section_data changes.
657 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
658 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
659 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
660 (enum _insn_type): New.
661 (count_stub, build_stub): New functions.
662 (allocate_spuear_stubs): Use count_stub.
663 (build_spuear_stubs): Use build_stub.
664 (populate_stubs, sort_stubs): Delete.
665 (process_stubs): New function.
666 (write_one_stub): Delete.
667 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
668 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
669 (maybe_insert_function, check_function_ranges): Likewise.
670 (find_function, pasted_function, build_call_tree): Likewise.
671 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
672 (spu_elf_modify_program_headers): Likewise.
673 (interesting_section): Detect stub sections differently. Delete
674 htab param, adjust all callers.
675 (spu_elf_relocate_section): Rewrite stub handling.
676 (spu_elf_output_symbol_hook): Likewise.
677 (bfd_elf32_bfd_link_hash_table_free): Delete.
678 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
679 output-only fields into a union. Add ovl_buf.
680 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
681
682 2008-01-25 DJ Delorie <dj@redhat.com>
683
684 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
685
686 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
687
688 * bfd-in.h: Add mingw I64 support.
689 * bfd-in2.h: Regenerated.
690 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
691
692 2008-01-21 Alan Modra <amodra@bigpond.net.au>
693
694 PR 4453
695 * format.c (bfd_check_format_matches): Don't accept archives as
696 fully matching unless they have a map.
697
698 2008-01-21 Alan Modra <amodra@bigpond.net.au>
699
700 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
701
702 2008-01-21 Alan Modra <amodra@bigpond.net.au>
703
704 * ecoff.c (_bfd_ecoff_archive_p): Delete.
705 * libecoff.h (_bfd_ecoff_archive_p): Delete.
706 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
707 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
708 (ecoff_biglittle_vec): Likewise.
709
710 2008-01-19 Alan Modra <amodra@bigpond.net.au>
711
712 PR 5646
713 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
714 non-NULL before dereferencing.
715
716 2008-01-15 Alan Modra <amodra@bigpond.net.au>
717
718 PR 5604
719 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
720 names from others.
721 (_bfd_elf_gc_keep): Declare.
722 * elfxx-target.h (elf_backend_gc_keep): Define.
723 (elfNN_bed): Init new field.
724 * elflink.c (_bfd_elf_gc_keep): New function.
725 (bfd_elf_gc_sections): Call gc_keep.
726 * elf64-ppc.c (elf_backend_gc_keep): Define.
727 (struct _ppc64_elf_section_data): Move .opd related fields to
728 a struct so they don't occupy the same storage. Adjust accesses
729 throughout file.
730 (ppc64_elf_gc_keep): New function, split out from..
731 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
732 to mark .opd section, just set gc_mark.
733 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
734 unless we are changing .opd. Test non-NULL opd->adjust at all
735 accesses throughout file.
736 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
737
738 2008-01-15 Alan Modra <amodra@bigpond.net.au>
739
740 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
741 * bfd-in2.h: Regenerate.
742
743 2008-01-11 Tristan Gingold <gingold@adacore.com>
744 Eric Botcazou <ebotcazou@adacore.com>
745
746 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
747 relocatable.
748 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
749 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
750 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
751 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
752 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
753 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
754 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
755 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
756 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
757 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
758 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
759 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
760 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
761 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
762 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
763 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
764 or executable output with relocations.
765
766 2008-01-09 Nick Clifton <nickc@redhat.com>
767
768 PR gas/5552
769 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
770 to FALSE for all relocs.
771
772 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
773
774 PR ld/5526
775 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
776 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
777 (eh_frame_sec_info): Add a cies field.
778 (eh_frame_hdr_info): Add a merge_cies field.
779 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
780 union.
781 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
782 of hdr_info->cies.
783 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
784 cie structures in all cases and use it instead of extended_cies.
785 If merging, store the cie array in sec_info->cies and point each
786 CIE's eh_fde_cie at the associated element. Do not try to
787 calculate the value of the personality routine here; record the
788 offset of the relocation instead. Do not merge CIEs here.
789 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
790 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
791 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
792 (find_merged_cie): New function.
793 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
794
795 2008-01-07 Nick Clifton <nickc@redhat.com>
796
797 PR binutils/5535
798 * vms.c (vms_close_and_cleanup): Check for the presence of a
799 vms_private_data_struct before examining any of its fields.
800
801 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
802
803 PR ld/5522
804 * elflink.c (elf_link_input_bfd): Don't write out a section if
805 its output section is marked with SEC_NEVER_LOAD.
806
807 For older changes see ChangeLog-2007
808 \f
809 Local Variables:
810 mode: change-log
811 left-margin: 8
812 fill-column: 74
813 version-control: never
814 End:
This page took 0.046925 seconds and 5 git commands to generate.