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