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