1 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
3 * coff-x86_64.c (PEI_HEADERS): Protect includes.
4 (bfd_pe_print_pdata): Remove #ifdef PE variation.
5 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
6 include in coff-x86_64.c of headers.
7 (PDATA_ROW_SIZE): New define.
8 (pex_regs[]): New static array.
9 (pex64_get_runtime_function): New static function.
10 (pex64_get_unwind_info): Likewise.
11 (pex64_get_scope_entry): Likewise.
12 (pex64_xdata_print_uwd_codes): Likewise.
13 (pex64_get_section_by_rva): Likewise.
14 (pex64_dump_xdata): Likewise.
15 (pex64_bfd_print_pdata): Likewise.
16 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
17 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
18 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
20 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
21 Alan Modra <amodra@bigpond.net.au>
22 Dave Korn <dave.korn.cygwin@gmail.com>
24 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
25 long names and non-NUL-terminated strings.
27 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
29 * bfd-in2.h: Regenerated.
31 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
33 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
34 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
36 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
39 * coffcode.h (bfd_pei_p): New.
41 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
42 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
43 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
44 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
45 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
46 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
48 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
49 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
50 bfd_efi_rtdrv_x86_64_vec,
51 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
52 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
53 * targets.c: Likewise.
55 * configure: Regenerated.
56 * libcoff.h: Likewise.
57 * Makefile.in: Likewise.
59 * efi-app-ia32.c: Removed.
60 * efi-app-x86_64.c: Likewise.
61 * efi-bsdrv-ia32.c: Likewise.
62 * efi-bsdrv-ia64.c: Likewise.
63 * efi-bsdrv-x86_64.c: Likewise.
64 * efi-rtdrv-ia32.c: Likewise.
65 * efi-rtdrv-ia64.c: Likewise.
66 * efi-rtdrv-x86_64.c: Likewise.
67 * efi-rtdrv-ia32.c: Likewise.
69 * efi-app-ia64.c: Moved to ...
71 (TARGET_SYM): Set to bfd_pei_ia64_vec.
72 (TARGET_NAME): Set to pei-ia64.
74 * libpei.h (bfd_target_pei_p): Removed.
75 (bfd_target_pei_arch): Likewise.
76 (bfd_target_efi_app_p): Likewise.
77 (bfd_target_efi_app_arch): Likewise.
78 (bfd_target_efi_bsdrv_p): Likewise.
79 (bfd_target_efi_bsdrv_arch): Likewise.
80 (bfd_target_efi_rtdrv_p): Likewise.
81 (bfd_target_efi_rtdrv_arch): Likewise.
82 (bfd_pe_executable_p): Likewise.
84 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
85 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
86 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
88 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
89 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
90 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
91 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
92 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
93 efi-rtdrv-x86_64.c. Add pei-ia64.c.
94 (efi-app-ia64.lo): Removed.
95 (efi-bsdrv-ia32.lo): Likewise.
96 (efi-rtdrv-ia32.lo): Likewise.
97 (efi-app-ia64.lo): Likewise.
98 (efi-bsdrv-ia64.lo): Likewise.
99 (efi-rtdrv-ia64.lo): Likewise.
100 (efi-app-x86_64.lo): Likewise.
101 (efi-bsdrv-x86_64.lo): Likewise.
102 (efi-rtdrv-x86_64.lo): Likewise.
105 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
107 (arch_type): Removed.
109 (pe_bfd_object_p): Just return coff_object_p.
111 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
112 bfd_pe_executable_p with bfd_pei_p.
114 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
116 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
117 PLT entries to an undefined symbol when generating a shared
120 2009-04-17 Nick Clifton <nickc@redhat.com>
123 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
125 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
127 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
128 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
129 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
130 * binary.c (binary_bfd_define_common_symbol): Likewise.
131 * bout.c (b_out_bfd_define_common_symbol): Likewise.
132 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
133 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
134 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
135 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
136 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
137 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
138 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
139 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
140 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
141 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
142 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
143 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
144 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
145 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
146 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
147 * som.c (som_bfd_define_common_symbol): Likewise.
148 * srec.c (srec_bfd_define_common_symbol): Likewise.
149 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
150 * versados.c (versados_bfd_define_common_symbol): Likewise.
151 * vms.c (vms_bfd_define_common_symbol): Likewise.
152 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
153 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
154 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
155 (pmac_xcoff_vec): Likewise.
156 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
157 (aix5coff64_vec): Likewise.
158 * linker.c (bfd_generic_define_common_symbol): New function.
159 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
160 (_bfd_define_common_symbol): New field.
161 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
162 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
163 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
165 * bfd-in2.h: Regenerate.
166 * libbfd.h: Likewise.
167 * libcoff.h: Likewise.
169 2009-04-15 Anthony Green <green@moxielogic.com>
171 * targets.c: Add moxie support.
172 * Makefile.am: Ditto.
173 * Makefile.in: Rebuilt.
174 * cpu-moxie.c, elf32-moxie.c: New files.
175 * archures.c: Add moxie support.
176 * configure.in: Add moxie support.
177 * configure: Rebuilt.
178 * config.bfd, archures.c: Add moxie support.
179 * bfd-in2.h: Rebuilt.
181 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
183 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
184 branch to an undef weak symbol into a jump to next instruction if
185 a PLT entry will be created.
187 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
189 * coffgen.c (make_a_section_from_file): Set the backend long
190 section names enable if long section names found on input.
191 * coffcode.h: Extend long section names documentation to match.
193 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
195 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
198 2009-04-07 DJ Delorie <dj@redhat.com>
200 * archures.c: Add bfd_mach_mep_c5.
201 * bfd-in2.h: Likewise.
202 * cpu-mep.c: Add bfd_c5_arch.
203 * elf32-mep.c: Support it.
205 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
207 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
208 info->callbacks->einfo.
209 * linker.c (_bfd_generic_section_already_linked): Likewise.
211 2009-04-06 DJ Delorie <dj@redhat.com>
213 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
215 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
217 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
218 _bfd_pex64_print_pdata only if PE is defined.
220 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
221 (_bfd_pex64_print_pdata): This.
223 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
224 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
227 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
229 * coff-x86_64.c (bfd_pe_print_pdata): Define as
230 _bfd_pep_print_x64_pdata.
231 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
232 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
234 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
236 * elf32-xtensa.c (relax_property_section): Always set r_offset
239 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
241 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
242 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
244 (elf32_arm_stub_type): New enum values for the two new stubs.
245 (arm_type_of_stub): Make use of the two new stubs.
246 (arm_size_one_stub): Handle the two new stubs.
248 2009-04-01 Matt Thomas <matt@netbsd.org>
250 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
251 hidden symbols into the GOT or PLT.GOT.
252 (elf_vax_relocate_section): Do not emit a PCREL reloc
253 into a shared object if it is against a hidden symbol.
255 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
257 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
258 and know_contains_shared_object_p.
259 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
260 Cache the result in the archive_info table.
261 (xcoff_auto_export_p): Add an "info" parameter and update the
262 call to xcoff_archive_contains_shared_object_p.
263 (xcoff_mark_auto_exports): Update accordingly.
264 (xcoff_post_gc_symbol): Likewise.
266 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
268 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
271 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
273 * coff-rs6000.c (member_layout): New structure.
274 (archive_iterator): Likewise.
275 (member_layout_init): New function.
276 (archive_iterator_begin): Likewise.
277 (archive_iterator_next): Likewise.
278 (xcoff_write_armap_old): Use the new iterator functions.
279 (do_shared_object_padding): Delete.
280 (xcoff_write_armap_big): Use the new iterator functions. Simplify
281 handling of arch_info.
282 (xcoff_write_archive_contents_old): Allocate arelt_data in the
283 first loop rather than the second. Allocate a member header if
284 there isn't one, then work out the stat information and length
285 in the first loop too. Use the new iterators for the second loop.
286 (xcoff_write_archive_contents_big): Likewise.
288 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
290 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
291 (bfd_xcoff_set_archive_import_path): Likewise.
292 * bfd-in2.h: Regenerate.
293 * xcofflink.c: Include libiberty.h.
294 (xcoff_archive_info): New structure.
295 (xcoff_archive_info_hash): New function.
296 (xcoff_archive_info_eq): Likewise.
297 (xcoff_get_archive_info): Likewise.
298 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
299 (bfd_xcoff_split_import_path): New function.
300 (bfd_xcoff_set_archive_import_path): Likewise.
301 (xcoff_set_import_path): Move earlier in file.
302 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
303 object to the the directory part of the bfd's filename. Get the
304 import path and filename of an archive object from the archive's
305 xcoff_tdata, initializing it if necessary. Update use of
307 (bfd_link_input_bfd): Update use of import_file_id.
308 (xcoff_write_global_symbol): Likewise.
310 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
312 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
314 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
316 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
317 a .loader section for relocatable links.
318 (xcoff_need_ldrel_p): New function.
319 (xcoff_mark): Use it.
320 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
322 (xcoff_build_ldsym): New function, split out from...
323 (xcoff_build_ldsyms): ...here. Rename to...
324 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
325 call xcoff_build_ldsym, if there's a loader section.
326 (xcoff_build_loader_section): New function, extracted verbatim from...
327 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
328 there's a loader section. Only add an __rtinit loader symbol
329 if there's a loader section. Update after above name change.
330 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
331 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
332 and xcoff_create_ldrel.
333 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
334 (xcoff_reloc_link_order): Likewise, but only call it if there's
335 a loader section. Use xcoff_symbol_section.
336 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
337 if there's a loader section.
339 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
341 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
343 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
345 * elf32-arm.c (group_sections): Rewrite loops for better
348 2009-03-30 DJ Delorie <dj@redhat.com>
350 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
351 relocs when doing a relocatable link.
353 2009-03-28 Mark Mitchell <mark@codesourcery.com>
355 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
356 "ERROR:", in error messages.
357 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
358 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
359 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
360 (elf32_arm_merge_eabi_attributes): Likewise.
361 (elf32_arm_merge_private_bfd_data): Likewise.
363 2009-03-27 Nick Clifton <nickc@redhat.com>
365 * section.c (bfd_get_section_contents): Detect and handle the case
366 where a section has the SEC_IN_MEMORY flag set but no actual
369 2009-03-26 Alan Modra <amodra@bigpond.net.au>
372 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
373 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
374 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
375 if we don't find matching PT_LOAD when copying.
377 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
379 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
380 the reloc descriptions.
382 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
384 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
385 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
386 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
388 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
390 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
391 (bfd_i386_arch_intel_syntax): Likewise.
392 (i8086_arch): Likewise.
393 (bfd_x86_64_arch): Likewise.
395 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
397 * elf32-cris.c (cris_elf_relocate_section): <case
398 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
399 symbols for non-allocated sections. Don't check whether to
400 generate R_CRIS_DTPMOD for non-allocated sections.
401 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
402 handle relocation GC:ing if applied to non-allocated section.
403 (cris_elf_check_relocs): Similar.
405 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
406 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
407 when emitting a known TP offset in the GOT.
409 2009-03-23 Alan Modra <amodra@bigpond.net.au>
411 * elf64-ppc.c (synthetic_opd): Delete.
412 (compare_symbols): Look for .opd name rather than section match.
413 (ppc64_elf_get_synthetic_symtab): Likewise.
415 2009-03-21 Alan Modra <amodra@bigpond.net.au>
417 * elf32-ppc.c (is_pic_glink_stub): Delete.
418 (is_nonpic_glink_stub): New function.
419 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
421 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
423 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
424 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
426 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
427 macros for visibilty and locality checks.
428 (elf_s390_adjust_dynamic_symbol): Likewise.
429 (allocate_dynrelocs): Likewise.
430 (elf_s390_relocate_section): Likewise.
431 (elf_s390_finish_dynamic_symbol): Likewise.
432 * elf64-s390.c (elf_s390_check_relocs): Likewise.
433 (elf_s390_adjust_dynamic_symbol): Likewise.
434 (allocate_dynrelocs): Likewise.
435 (elf_s390_relocate_section): Likewise.
436 (elf_s390_finish_dynamic_symbol): Likewise.
438 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
440 * bfd-in2.h: Regenerated.
441 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
442 for debugging sections and map memory read/write dependent on
444 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
445 without memory read flags set.
446 * section.c: Add SEC_COFF_NOREAD to section flags.
448 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
450 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
453 2009-03-19 Alan Modra <amodra@bigpond.net.au>
455 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
456 "no overlays" return. If there are overlays, create overlay
457 manager entry symbols here, so that..
458 (spu_elf_build_stubs): ..we don't need to set them up here.
459 Simplify entry symbol tests.
460 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
462 2009-03-18 Mark Kettenis <kettenis@gnu.org>
464 * elf.c (elfcore_grok_openbsd_procinfo)
465 (elfcore_grok_openbsd_note): New functions.
466 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
468 2009-03-18 Alan Modra <amodra@bigpond.net.au>
470 * vms-hdr.c: Don't include alloca.h.
471 * elf32-m68hc1x.c: Include alloca-conf.h.
473 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
475 * Makefile.am: Run "make dep-am".
476 * Makefile.in: Regenerate.
478 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
480 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
482 2009-03-17 Alan Modra <amodra@bigpond.net.au>
484 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
486 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
487 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
488 ovly_return fields with ovly_entry[2]. Adjust all users.
489 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
491 (spu_elf_build_stubs): Likewise.
492 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
493 ovly_flavour changes. Update all callers.
494 (ovl_stub_size_log2): New function.
495 (build_stub): Handle compact icache stubs. Use different manager
496 entry point for stubs in non-icache area.
497 (spu_elf_size_stubs): Don't allocate space for indirect branch
499 (spu_elf_build_stubs): And don't built them.
501 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
503 * dwarf2.c (read_section): Always use rawsize, if available.
505 2009-03-16 Alan Modra <amodra@bigpond.net.au>
507 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
508 of rawsize and size for buffer.
510 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
512 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
513 parameter just because fixed sections fit into local store.
514 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
515 generating overlays if fixed sections plus reserved stack
516 and heap space fit into local store.
518 2009-03-15 Alan Modra <amodra@bigpond.net.au>
520 * elf32-spu.c (build_stub): Correct icache set_id.
521 (spu_elf_relocate_section): Likewise.
523 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
525 * xcofflink.c (xcoff_link_check_archive_element): Only free the
526 symbol table if it was created by the current call.
528 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
530 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
531 class XMC_DS rather than XMC_UA.
533 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
535 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
536 bfd_boolean export_defineds parameter with an unsigned int
537 auto_export_flags parameter.
538 * bfd-in2.h: Regenerate.
539 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
540 split out from xcoff_build_ldsyms.
541 (xcoff_covered_by_expall_p): New function.
542 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
543 but with extra code to handle -bexpfull and -bexpall.
544 (xcoff_mark_auto_exports): New function.
545 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
546 a function should be automatically exported.
547 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
548 parameter with an auto_export_flags parameter. Update ldinfo
549 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
552 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
554 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
555 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
556 init and fini functions. Do garbage collection for objects
557 without an entry point too.
559 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
561 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
562 check whether a symbol has csect information.
563 (coff_print_aux): Likewise.
564 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
565 information for C_AIX_WEAKEXT too.
566 (_bfd_xcoff_swap_aux_out): Likewise.
567 (xcoff_reloc_type_br): Handle defweak symbols too.
568 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
569 information for C_AIX_WEAKEXT too.
570 (_bfd_xcoff64_swap_aux_out): Likewise.
571 (xcoff64_reloc_type_br): Handle defweak symbols too.
572 * coffgen.c (coff_print_symbol): Handle auxillary function
573 information for C_AIX_WEAKEXT too.
574 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
575 instead of BSF_GLOBAL if the L_WEAK flag is set.
576 (xcoff_dynamic_definition_p): New function.
577 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
578 defines h. Don't change h if ldsym isn't the definition. Otherwise,
579 always take the symbol class from the ldsym. Use weak bfd symbol
580 types for weak ldsyms.
581 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
582 Fix the check for whether a definition is from a shared object.
583 Allow redefinitions of weak symbols.
584 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
585 (xcoff_keep_symbol_p): Likewise.
586 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
587 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
588 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
589 but mark them as L_WEAK.
590 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
591 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
593 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
595 * xcofflink.c (xcoff_mark): When walking the relocations,
596 only mark the target symbol or the target section, not both.
597 (xcoff_final_definition_p): New function.
598 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
599 symbol is a valid definition of the associated output symbol.
600 Use XCOFF_ALLOCATED to stop the same hash table entry having
602 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
604 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
606 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
608 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
611 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
613 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
614 * libcoff.h: Regenerate.
615 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
616 line-number counts in the bfd's lineno_counts field.
617 Don't keep per-csect line-number counts.
618 (xcoff_sweep): Don't update per-csect line-number counts.
619 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
620 entries in each output section.
621 (xcoff_link_input_bfd): Get the number of line numbers from
622 the bfd's lineno_counts field, rather than recalculating it
623 from scratch. Fix the range check when updating C_BINCL and
625 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
626 here. Don't expect csects to have line-number counts.
628 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
630 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
631 * libcoff.h: Regenerate.
632 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
633 "skip" logic from xcoff_link_input_bfd.
634 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
635 objects in a dynamic link, rather than checking whether csectpp
636 is null. Always allocate debug_index for other objects,
637 and always go through the loop. Update the type of debug_index
638 after the change above. Read the auxillary csect information
639 and use xcoff_keep_symbol_p to decide whether a symbol should
640 be kept. Set its debug_index to -2 if not.
641 (xcoff_link_input_bfd): Update the type of debug_index after
642 the change above and always expect it to be nonnull. Use it to
643 test whether a symbol should be stripped, rather than making the
644 decision here. Postpone all symbol creation to the second pass.
646 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
648 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
649 creating a descriptor.
650 (xcoff_sweep): Don't mark toc_section unless it's needed.
651 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
652 when marking every bfd.
653 (xcoff_link_input_bfd): Skip all TOC anchors.
654 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
655 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
656 to -1; call xcoff_find_tc0 instead.
658 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
660 * libcoff-in.h (xcoff_section_tdata): Update commentary.
661 * libcoff.h: Regenerate.
662 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
663 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
664 the previous symbol's csect. Treat last_symndx as an inclusive value
665 and simplify its handling.
666 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
667 symbols with the right csect. Don't mark rsec when processing
668 relocations against undefined or absolute sections.
669 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
670 of bfd_und_section_ptr.
671 (xcoff_link_input_bfd): Likewise.
673 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
675 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
676 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
677 flag is set. Assert that all undefined symbols are either
678 imported or defined by a dynamic object.
679 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
680 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
681 handling to all relocations. Only set XCOFF_CALLED for function
683 (xcoff_find_function): New function, split out from...
684 (bfd_xcoff_export_symbol) ...here.
685 (xcoff_set_import_path): New function, split out from...
686 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
687 meaning of XCOFF_CALLED.
688 (xcoff_mark_symbol): If we mark an undefined and unimported
689 symbol, find some way of defining it. If the symbol is a function
690 descriptor, fill in its definition automatically. If the symbol
691 is a function, mark its descriptor and allocate room for global
692 linkage code. Otherwise mark the symbol as implicitly imported.
693 Move the code for creating function descriptors from...
694 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
695 check for symbols that were implicitly defined.
696 (xcoff_mark): Don't count any dynamic relocations against
698 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
699 in the xcoff link info.
700 (xcoff_link_input_bfd): Remove handling of undefined and
703 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
705 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
706 if the target is absolute. Fix comment typo.
707 (xcoff_ppc_relocate_section): Remove FIXME.
708 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
709 if the target is absolute.
711 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
713 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
714 R_POS and R_NEG relocations against absolute symbols to the
717 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
719 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
720 to 2 for bfd_mach_ppc_620.
722 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
724 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
725 * configure.in: Likewise.
726 * configure: Regenerate.
728 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
731 * elf.c (assign_section_numbers): Generate symbol table if there
732 is any relocation in output.
733 (_bfd_elf_compute_section_file_positions): Likewise.
735 2009-03-13 Nick Clifton <nickc@redhat.com>
738 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
739 * elflink.c (elf_link_read_relocs_from_section): Use
740 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
741 relocs but no symbol table.
742 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
744 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
747 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
748 to check ___tls_get_addr.
750 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
751 strncmp to check __tls_get_addr.
753 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
755 * dwarf2.c (read_section): Always check the offset, even when the
756 section has been read before.
758 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
760 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
763 2009-03-11 Chris Demetriou <cgd@google.com>
765 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
766 * bfd-in2.h: Regenerate.
767 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
768 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
770 (bsd_write_armap): Likewise.
771 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
772 flag is set, do nothing.
773 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
776 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
778 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
779 used to update stack pointer.
781 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
784 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
785 for unknown symbols in absolute section.
787 2009-03-06 Nick Clifton <nickc@redhat.com>
789 * po/es.po: Updated Spanish translation.
791 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
793 * elf32-arm.c (group_sections): Take next section size into
794 account before accepting to group it.
796 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
798 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
800 (elf32_arm_final_link_relocate): Likewise.
802 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
805 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
807 2009-03-04 Alan Modra <amodra@bigpond.net.au>
809 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
810 * section.c (struct bfd_section): Add has_tls_get_addr_call.
811 (BFD_FAKE_SECTION): Init new flag.
812 * ecoff.c (bfd_debug_section): Likewise.
813 * bfd-in2.h: Regenerate.
814 * libbfd.h: Regenerate.
815 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
816 (ppc_elf_reloc_type_lookup): Handle new relocs.
817 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
818 without marker relocs.
819 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
820 if section has no old-style calls.
821 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
822 Don't try to optimize new-style __tls_get_addr call when handling
823 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
825 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
826 (ppc64_elf_reloc_type_lookup): Handle new relocs.
827 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
828 without marker relocs.
829 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
830 if section has no old-style calls. Set toc_ref for new relocs as
832 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
833 Don't try to optimize new-style __tls_get_addr call when handling
834 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
837 2009-03-04 Alan Modra <amodra@bigpond.net.au>
840 * configure.in: Test for ld --as-needed support. Link shared
842 * configure: Regenerate.
844 2009-03-03 Alan Modra <amodra@bigpond.net.au>
846 * Makefile.am: Run "make dep-am".
847 * Makefile.in: Regenerate.
849 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
851 * elf32-score7.c: New file.
852 * elf32-score.h: New file.
853 * elf32-score.c: Add code to support score 7. Set score7 as the
855 * cpu-score.c: Add score7 architecure.
856 (compatibile): New function.
857 * Makefile.am: Add rules for building elf32-score7 object.
858 * Makefile.in: Regenerate.
859 * configure.in: Add elf32-score7 object to score vectors.
860 * configure: Regenerate.
861 * reloc.c: Add score7 relocs.
862 * archures.c: Add score3 and score7 machine numbers.
863 * bfd-in2.h: Regenerate.
864 * libbfd.h: Regenerate.
866 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
868 * configure: Regenerate.
870 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
872 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
873 (elf32_hppa_check_relocs): Use it.
875 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
877 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
878 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
879 (elf_hppa_is_dynamic_loader_symbol): Likewise.
880 (elf_hppa_record_segment_addrs): Likewise.
881 (elf_hppa_final_link): Likewise.
882 (elf_hppa_relocate_insn): Likewise.
883 (elf_hppa_final_link_relocate): Likewise.
884 (elf64_hppa_relocate_section): Likewise.
885 * elf64-hppa.c: Insert above.
887 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
889 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
890 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
891 (elf_hppa_relocate_section): Likewise.
892 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
893 from struct elf_link_hash_entry. Add count field.
894 (struct elf64_hppa_dyn_hash_table): Delete.
895 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
896 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
897 (hppa_elf_hash_entry, eh_name): Define.
898 (elf64_hppa_new_dyn_hash_entry): Delete.
899 (elf64_hppa_dyn_hash_lookup): Delete.
900 (elf64_hppa_dyn_hash_traverse): Delete.
901 (get_dyn_name): Delete.
902 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
903 of struct elf64_hppa_dyn_hash_entry *.
904 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
905 allocate_global_data_plt, allocate_global_data_stub,
906 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
908 (hppa64_link_hash_newfunc): New.
909 (elf64_hppa_hash_table_create): Rework.
910 (count_dyn_reloc): Likewise.
911 (hppa64_elf_local_refcounts): New.
912 (elf64_hppa_check_relocs): Rework using standard technique for recording
913 local DLT, PLT and OPD reference counts.
914 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
915 elf_link_hash_entry *.
916 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
917 allocate_global_data_plt, allocate_global_data_stub,
918 allocate_global_data_opd, allocate_dynrel_entries,
919 elf64_hppa_adjust_dynamic_symbol,
920 elf64_hppa_mark_milli_and_exported_functions): Likewise.
921 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
922 Use hppa_link_hash_table. Rework.
923 (elf64_hppa_link_output_symbol_hook): Rework.
924 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
925 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
926 elf64_hppa_finish_dynamic_sections): Likewise.
928 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
930 * elf32-arm.c (stub_reloc_type): Removed.
931 (insn_sequence): Renamed reloc_type field to r_type.
932 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
933 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
934 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
935 (elf32_arm_stub_type): Add new enum entries for the new stubs.
936 (arm_stub_is_thumb): Catch new stubs.
937 (arm_type_of_stub): Handle new stubs.
938 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
939 (bfd_elf32_arm_process_before_allocation): Remove useless
942 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
944 * elf.c (elf_find_function): Use is_function_type to check
947 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
949 * xtensa-modules.c: Revert to previous version 1.11 due
950 to inadvertant commit.
952 2009-02-24 Sterling Augustine <sterling@tensilica.com>
954 * elf32-xtensa.c (text_action_add): Separate test for action
955 type. Break if saved action is ta_widen_insn at same offset.
957 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
959 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
960 to elf32_arm_stub_long_branch_any_arm_pic.
961 (elf32_arm_stub_long_branch_any_thumb_pic): New.
962 (enum elf32_arm_stub_type, arm_type_of_stub)
963 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
966 2009-02-24 Joseph Myers <joseph@codesourcery.com>
968 * elf32-arm.c (PREV_SEC): Update comment.
969 (group_sections): Rename argument to stubs_always_after_branch.
970 Reverse the list and place stubs at the end of input sections.
972 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
974 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
976 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
978 (arm_size_one_stub): Remove unnecessary break.
979 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
981 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
983 * elf32-arm.c (stub_insn_type): New type.
984 (stub_reloc_type): Likewise.
985 (insn_sequence): Likewise.
986 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
987 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
988 (elf32_arm_stub_long_branch_thumb_only): Likewise.
989 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
990 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
991 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
992 (elf32_arm_stub_hash_entry): Add new helper fields.
993 (stub_hash_newfunc): Initialize these new fields.
994 (arm_build_one_stub): Encode Arm and Thumb instructions separately
995 to take endianness into account.
996 (arm_size_one_stub): Compute size of stubs using insn_sequence.
997 (arm_map_one_stub): Code is now more generic, thanks to
1000 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1002 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1004 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1005 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1006 BLX is not available. Fix typo in warning message. Add comments
1007 and improve formatting.
1008 (arm_build_one_stub): Adjust to new
1009 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1010 (arm_map_one_stub): Likewise.
1012 2009-02-23 Tristan Gingold <gingold@adacore.com>
1013 Eric Botcazou <ebotcazou@adacore.com>
1014 Douglas B Rupp <rupp@gnat.com>
1016 * vms.h: Update copyright year, fix comments, reorder declarations.
1017 (_bfd_save_vms_section): Remove the prototype.
1018 (EGPS_S_V_NO_SHIFT): New constant.
1019 (bfd_vms_set_section_flags): New prototype.
1020 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1022 (EGSY_S_W_FLAGS): Ditto.
1023 (EGSY_S_V_QUAD_VAL): Ditto.
1024 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1025 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1026 EGST_S_B_NAMLNG): Ditto.
1027 (ESRF_S_B_NAMLNG): Ditto.
1028 (ETIR_S_C_HEADER_SIZE): Ditto.
1029 (EGPS_S_V_ALLOC_64BIT): Ditto.
1030 (DST_S_C_EPILOG): Ditto.
1031 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1032 (DST_S_C_SRC_INCRLNUM_B): Ditto.
1033 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1034 (DST_S_L_PCLINE_UNSLONG): Ditto.
1035 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1036 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1037 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1038 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1039 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1040 (DST_S_B_SRC_UNSBYTE): Ditto.
1041 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1043 (vms_section, vms_reloc): Remove types.
1044 (hdr_struc): Replaced by ...
1045 (hdr_struct): ... new type.
1046 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1047 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1048 (EMH_DATE_LENGTH): Ditto.
1049 (eom_struc): Replaced by ...
1050 (eom_struct): ... new type.
1051 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1052 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1053 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1054 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1055 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1056 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1057 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1058 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1059 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1060 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1061 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1062 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1063 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1064 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1065 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1066 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1067 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1068 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1069 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1070 (enum file_type_enum): New type.
1071 (struct location_struct): Removed.
1072 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1073 (struct funcinfo, struct module): Ditto.
1074 (struct vms_private_data_struct): Update fields.
1075 (struct vms_section_data_struct): New type.
1077 * vms.c: Update copyright year, fix comments,
1078 Fix includes for DECC, add prototypes.
1079 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1081 Use flavour to set is_vax, location_stack is removed.
1082 (struct pair): Declare.
1083 (fill_section_ptr): Initialize variables at declaration.
1084 Add guard to set SECTION_SYM flag, handlde und section.
1085 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1086 (_bfd_vms_slurp_object_records): New function, replaces previous
1088 (vms_slurp_module): New function.
1089 (vms_slurp_image): Ditto.
1090 (vms_object_p): Complete rewrite.
1091 (vms_mkobject): Use is_vax field to slect architecture.
1092 (free_reloc_stream): New function.
1093 (vms_convert_to_var): Ditto.
1094 (vms_convert_to_var_1): Ditto.
1095 (vms_convert_to_var_unix_filename): Ditto.
1096 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1098 (vms_new_section_hook): Set alignment to 0, allocate private data.
1099 (vms_get_section_contents): Load content.
1100 (vms_get_symbol_info): Handle undefined section.
1101 (vms_find_nearest_line): Handle.
1102 (alloc_reloc_stream): New function.
1103 (vms_slurp_reloc_table): Ditto.
1104 (vms_get_reloc_upper_bound): Make it real.
1105 (vms_canonicalize_reloc): Do the real work.
1106 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1108 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1109 (vms_set_arch_mach): Check arch.
1110 (vms_set_section_contents): Copy the content after allocation.
1111 (vms_alpha_vec): Update object flags.
1113 * vms-tir.c: Update copyright year, fix comments,
1114 add prototypes for new functions.
1115 (dst_define_location): New function.
1116 (dst_restore_location): New function.
1117 (dst_retrieve_location): New function.
1118 (dst_check_allocation): New function.
1119 (image_dump): Call dst_check_allocation.
1120 (image_write_b): Ditto.
1121 (image_write_w): Ditto.
1122 (image_write_l): Ditto.
1123 (image_write_q): Ditto.
1124 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1125 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1127 Call error handler instead of abort if name is not known.
1128 (etir_sta): Add quarter_relocs argument and set it.
1131 (etir_opr): Ditto, return FALSE in case of error.
1132 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1133 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1134 (etir_stc): Add quarter_relocs argument and set it, fix cast.
1135 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1136 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1137 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1138 Return FALSE in case of error.
1139 (tir_sta): Change sign of psect.
1141 (tir_cmd): Fix cast. Makes tir_table static const.
1142 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1143 add argument to explain.
1144 (analyze_etir): Initialize maxptr, add quarter_relocs
1145 declaration, move some declarations into inner scopes.
1146 Handle quarter_relocs and STO_IMM.
1147 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1148 (_bfd_vms_slurp_relocs): New function.
1149 (_bfd_vms_decode_relocs): New function.
1150 (sto_imm): Rewritten.
1151 (start_first_etbt_record): New function.
1152 (start_another_etbt_record): Ditto.
1153 (etir_output_check): Ditto.
1154 (defer_reloc_p): Ditto.
1155 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1156 a for-loop. Correctly deals with contents, deals with .vmsdebug,
1157 rewritte relocations handling.
1158 (_bfd_vms_write_tbt): Removed.
1159 (_bfd_vms_write_dbg): Ditto.
1161 * vms-misc.c: Update copyright year, Fix comments.
1162 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1163 (maybe_adjust_record_pointer_for_object): New function.
1164 (_bfd_vms_get_first_record): New function, replaces ...
1165 (_bfd_vms_get_record): .. removed.
1166 (_bfd_vms_get_object_record): New function.
1167 (_bfd_vms_get_object_record): New function.
1168 (vms_get_remaining_object_record): New function, replaces ...
1169 (_bfd_vms_get_next_record): ... removed.
1170 (add_new_contents): Removed.
1171 (_bfd_save_vms_section): Removed.
1172 (_bfd_get_vms_section): Removed.
1173 (_bfd_vms_output_flush): Write in VAR format.
1174 (new_symbol): Don't make UND section.
1176 * vms-hdr.c: Update copyright year, update list of record handled.
1177 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1178 (_bfd_vms_write_hdr): Strip vms and unix patches,
1179 add comments, truncate module name at 31 characters,
1180 use constants instead of hard-coded value,
1181 write BFD version instead of a fixed string.
1182 (_bfd_vms_slurp_ihd): New function.
1183 (_bfd_vms_slurp_isd): Ditto.
1184 (_bfd_vms_slurp_ihs): Ditto.
1185 (new_module): Ditto.
1186 (parse_module): Ditto
1187 (build_module_list): Ditto.
1188 (module_find_nearest_line): Ditto.
1189 (_bfd_vms_find_nearest_dst_line): Ditto.
1190 (vms_slurp_debug): Ditto.
1191 (_bfd_vms_slurp_dbg): Ditto.
1192 (_bfd_vms_slurp_tbt): Ditto.
1193 (_bfd_vms_write_dbg): Ditto.
1194 (_bfd_vms_write_tbt): Ditto.
1196 * vms-gsd.c: Update copyright year, update list of records handled.
1197 (EVAX_LITERALS_NAME): New macro.
1198 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1199 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1200 (register_universal_symbol): New function and prototype.
1201 (_bfd_vms_slurp_gsd): Fix indentations and casts,
1202 improve debug messages,
1203 use constants instead of hard-coded value,
1204 fix missing endianness conversion,
1205 handle global symbol (SYMG).
1206 (bfd_vms_set_section_flags): New function.
1207 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1208 handle section literals,
1210 handle section bfd and vms flags,
1211 don't output LIB$INITIALIZE symbol,
1212 fix handling of weak symbols,
1213 fix evax vs vax procedure descriptor,
1214 handle absolute symbols.
1216 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1217 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1219 * makefile.vms (DEFS): Fix flags for VMS.
1221 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1223 * bfd-in2.h: Regenerated.
1224 * libbfd.h: Regenerated.
1226 2009-02-20 Cary Coutant <ccoutant@google.com>
1228 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1231 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1234 * coffcode.h (coff_write_object_contents): Don't let the string
1235 table offset overflow the s_name field when using long section names.
1237 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1239 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
1240 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1241 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1242 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
1243 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1244 (bfd_pmac_xcoff_backend_data): Likewise.
1245 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
1246 (bfd_xcoff_aix5_backend_data): Likewise.
1247 (xcoff64_write_object_contents): Delete unused long_section_names
1249 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
1250 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1252 * coffcode.h (documentation): Update to describe long section names.
1253 (COFFLONGSECTIONCATHELPER): New helper macro.
1254 (BLANKOR1TOODD): Likewise.
1255 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
1256 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
1257 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
1258 (bfd_coff_set_long_section_names_allowed): New function.
1259 (bfd_coff_set_long_section_names_disallowed): Likewise.
1260 (struct bfd_coff_backend_data): Add new backend hook function
1261 pointer _bfd_coff_set_long_section_names.
1262 (bfd_coff_set_long_section_names): New backend hook.
1263 (coff_write_object_contents): Only generate long section names if
1264 bfd_coff_long_section_names() indicates they are currently enabled.
1265 (bfd_coff_std_swap_table): Make non-const, and initialise long
1266 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1267 (ticoff0_swap_table): Likewise to both.
1268 (ticoff1_swap_table): Again, likewise to both.
1269 * coffgen.c (make_a_section_from_file): Allow long section names
1270 as inputs even if not currently allowed for outputs.
1271 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
1272 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
1273 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1274 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1275 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1276 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1277 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1278 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1279 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1280 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1281 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
1282 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
1283 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
1284 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
1285 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
1286 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
1287 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1288 * libcoff-in.h: Update copyright year to cause updated copyright
1289 year in generated libcoff.h, and fix typo.
1290 * libcoff.h: Regenerated.
1291 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
1292 (_bfd_ecoff_no_long_sections): Add prototype.
1293 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
1294 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
1295 defined by an including .c file.
1296 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
1297 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1298 (ticoff1_swap_table): Likewise to both.
1300 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
1302 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
1303 stub. Catch default case error.
1304 (arm_map_one_stub): Add missing Thumb mapping symbol.
1306 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
1309 * elf32-avr.c: Handle case where no local symbos exist correctly.
1311 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
1314 * elf32-arm.c (arm_long_branch_stub,
1315 arm_thumb_v4t_long_branch_stub,
1316 arm_thumb_thumb_long_branch_stub,
1317 arm_thumb_arm_v4t_long_branch_stub,
1318 arm_thumb_arm_v4t_short_branch_stub,
1319 arm_pic_long_branch_stub):
1320 Renamed to elf32_arm_stub_long_branch_any_any,
1321 elf32_arm_stub_long_branch_v4t_arm_thumb,
1322 elf32_arm_stub_long_branch_thumb_only,
1323 elf32_arm_stub_long_branch_v4t_thumb_arm,
1324 elf32_arm_stub_short_branch_v4t_thumb_arm,
1325 elf32_arm_stub_long_branch_any_any_pic.
1326 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
1327 arm_thumb_thumb_stub_long_branch,
1328 arm_thumb_arm_v4t_stub_long_branch,
1329 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
1330 Renamed to arm_stub_long_branch_any_any,
1331 arm_stub_long_branch_v4t_arm_thumb,
1332 arm_stub_long_branch_thumb_only,
1333 arm_stub_long_branch_v4t_thumb_arm,
1334 arm_stub_short_branch_v4t_thumb_arm,
1335 arm_stub_long_branch_any_any_pic.
1337 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1339 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
1340 in branch offset check.
1342 2009-02-15 Alan Modra <amodra@bigpond.net.au>
1344 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
1345 add toc.symndx and toc.add.
1346 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
1348 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
1350 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
1351 (branch_reloc_hash_match): New function, extracted from..
1352 (ppc64_elf_tls_optimize): ..here.
1353 (ppc64_elf_relocate_section): Properly set addends when optimizing
1354 tls sequences. Avoid unnecessary reading and writing of insns.
1355 Only redo reloc when symbol changed. Bypass symbol checks when
1357 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
1358 (branch_reloc_hash_match): New function, extracted from..
1359 (ppc_elf_tls_optimize): ..here.
1360 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
1361 Don't clear addend on zapped __tls_get_addr reloc.
1363 2009-02-12 Nick Clifton <nickc@redhat.com>
1366 * elflink.c (bfd_elf_final_link): When counting the relocations,
1367 if the header size has not been set yet then assume that it will
1368 match the output section's reloc type.
1370 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
1372 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
1375 2009-02-09 Alan Modra <amodra@bigpond.net.au>
1377 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
1378 (find_function): Likewise.
1379 (pasted_function): Don't error if no prior function found.
1380 (discover_functions): Revert 2008-12-10 change. Extend first
1381 function range to start of section.
1383 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1385 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
1387 * elf64-hppa.h: Likewise.
1389 2009-02-06 Joseph Myers <joseph@codesourcery.com>
1391 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1394 2009-02-04 Alan Modra <amodra@bigpond.net.au>
1396 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
1397 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
1399 2009-02-03 Sandip Matte <sandip@rmicorp.com>
1401 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
1402 * archures.c (bfd_mach_mips_xlr): Define.
1403 * bfd-in2.h: Regenerate.
1404 * cpu-mips.c (I_xlr): Define.
1405 (arch_info_struct): Add XLR entry.
1406 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
1407 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
1408 (mips_mach_extensions): Add XLR entry.
1410 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
1412 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
1414 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
1416 * configure.in: AC_SUBST pdfdir.
1417 * Makefile.am: Add install-pdf, install-pdf-am
1418 and install-pdf-recursive targets. Define pdfdir.
1419 * doc/Makefile.am: Define pdf__strip_dir. Add
1420 install-pdf and install-pdf-am targets.
1421 * po/Make-in: Add install-pdf target.
1422 * configure: Regenerate.
1423 * Makefile.in: Regenerate
1424 * doc/Makefile.in: Regenerate.
1426 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
1428 * bfd-in2.h: Regenerate.
1429 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
1430 fields from n_entries to n_slots where appropriate, update comments.
1431 (HOWTO): Add TLS relocations.
1432 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
1433 (enum elf_m68k_got_offset_size): New enum.
1434 (struct elf_m68k_got_entry.type): Move field to ...
1435 (struct elf_m68k_got_entry_key): ... here. Update all uses.
1436 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
1438 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
1440 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
1441 fields into n_entries array. Update comments.
1442 (elf_m68k_init_got): Simplify, update all uses.
1443 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
1444 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
1445 GOT entries; update name, update all uses.
1446 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
1447 (elf_m68k_get_got_entry): Update.
1448 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
1450 (elf_m68k_remove_got_entry_type): Simplify.
1451 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
1452 (elf_m68k_can_merge_gots): Update.
1453 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
1454 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
1455 GOT entries, simplify.
1456 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
1457 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
1458 field, remove obsoleted local_n_entries field.
1459 (elf_m68k_partition_multi_got_2): New static function.
1460 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
1462 (elf_m68k_remove_got_entry_type): Update.
1463 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1464 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
1465 update of sgot->size and srelgot->size.
1466 (elf_m68k_gc_sweep_hook): Update.
1467 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1468 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
1470 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
1471 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
1473 2009-02-02 DJ Delorie <dj@redhat.com>
1475 * elf32-mep.c (config_names): Regenerate configuration.
1477 2009-02-02 Alan Modra <amodra@bigpond.net.au>
1479 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
1480 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
1481 * elf.c (bfd_elf_get_str_section): Make static.
1482 (bfd_elf_find_section): Delete.
1483 * libbfd.h: Regenerate.
1485 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1487 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
1488 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
1490 2009-01-31 Alan Modra <amodra@bigpond.net.au>
1492 * elflink.c (on_needed_list): New function.
1493 (elf_link_add_object_symbols): Link in --as-needed libs if they
1494 satisfy undefined symbols in other libs.
1496 2009-01-30 Julian Brown <julian@codesourcery.com>
1498 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
1499 EXEC_P or DYNAMIC flags, and skip sections which are being linked
1500 with --just-symbols (-R).
1502 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
1504 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
1505 high_pc in order to properly sign-extend VMAs.
1507 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1508 Mark Shinwell <shinwell@codesourcery.com>
1509 Catherine Moore <clm@codesourcery.com>
1511 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
1513 2009-01-28 Catherine Moore <clm@codesourcery.com>
1515 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
1516 SEC_LOAD for dynamic relocation sections.
1518 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1520 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
1521 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
1522 the size of local TLS data.
1524 2009-01-27 Andreas Schwab <schwab@suse.de>
1526 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
1527 architectures in the archive.
1529 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1531 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
1532 <R_CRIS_32_DTPREL>: Correct relocation value.
1534 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
1535 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
1536 symbols with non-default visibility.
1538 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
1540 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
1541 describing the trampolines.
1542 (ppc_elf_relocate_section): Update relocs to describe the
1545 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1547 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
1548 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
1549 and R_PARISC_PCREL12F relocations.
1551 2009-01-24 Alan Modra <amodra@bigpond.net.au>
1554 * elflink.c (find_version_for_sym): New function split out from,
1555 but without export_dynamic test, ..
1556 (_bfd_elf_link_assign_sym_version): ..here.
1557 (_bfd_elf_export_symbol): Use it.
1559 2009-01-23 Alan Modra <amodra@bigpond.net.au>
1561 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
1562 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
1563 * elflink.c: ..here, somewhat modified.
1564 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
1565 _bfd_elf_link_find_version_dependencies,
1566 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
1567 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1568 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
1570 * elflink.c: ..and make static here.
1571 (_bfd_elf_link_find_version_dependencies): Adjust for removal
1572 of output_bfd from struct elf_find_verdep_info.
1573 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
1574 struct elf_info_failed.
1575 (bfd_elf_size_dynamic_sections): Adjust.
1577 2009-01-22 Alan Modra <amodra@bigpond.net.au>
1580 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
1581 after comp_unit_find_line call.
1583 2009-01-21 Nick Clifton <nickc@redhat.com>
1586 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
1587 tm_gmtoff field in struct tm.
1589 2009-01-21 Alan Modra <amodra@bigpond.net.au>
1591 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
1592 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
1593 sections in soft-icache lines unless non_ia_text. Don't add
1594 rodata if doing so would exceed line size.
1596 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
1598 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
1599 types than bfd_link_hash_indirect, before early return, call
1600 _bfd_elf_link_hash_copy_indirect.
1602 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1604 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
1605 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
1606 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
1607 (elf_backend_obj_attrs_order): New define.
1608 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
1609 (elfNN_bed): Add elf_backend_obj_attrs_order.
1611 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1613 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
1614 (obj_attr_size): Likewise.
1615 (write_obj_attribute): Likewise.
1616 (_bfd_elf_copy_obj_attributes): Likewise.
1617 (_bfd_elf_parse_attributes): Likewise.
1618 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
1619 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
1620 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
1621 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
1622 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
1625 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1627 * elf-attrs.c (is_default_attr): Support defaultless attributes.
1628 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
1629 (bfd_elf_add_obj_attr_string): Likewise.
1630 (bfd_elf_add_obj_attr_int_string): Likewise.
1631 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
1632 * elf-bfd.h (struct obj_attribute): Document new flag bit.
1633 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
1634 Tag_nodefaults has no default value.
1635 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
1636 comment to reflect the new state.
1638 2009-01-19 Alan Modra <amodra@bigpond.net.au>
1641 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
1642 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
1643 (adjust_z_magix): Delete dead code handling QMAGIC.
1645 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
1647 * coffcode.h (styp_to_sec_flags): Correct interpretation of
1648 IMAGE_SCN_MEM_DISCARDABLE.
1650 2009-01-16 Alan Modra <amodra@bigpond.net.au>
1652 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
1653 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
1654 * configure.in (commonbfdlib): Delete.
1655 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
1656 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
1657 is available, not just for linux.
1658 * po/SRC-POTFILES.in: Regenerate.
1659 * Makefile.in: Regenerate.
1660 * configure: Regenerate.
1662 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1663 Julian Brown <julian@codesourcery.com>
1665 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
1666 ARM attributes in ABI 2.07.
1667 * elf32-arm.c (get_secondary_compatible_arch): New function.
1668 (set_secondary_compatible_arch): New function.
1669 (tag_cpu_arch_combine): New function.
1670 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
1671 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
1672 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
1673 make it fit with order_01243.
1674 Add support for Tag_also_compatible_with,
1675 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
1676 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
1677 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
1678 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
1679 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
1680 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
1681 Rework the way unknown attributes are handled.
1682 Defer errors until all attributes have been processed.
1684 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1686 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
1687 bfd_elf_add_obj_attr_int_string.
1688 Read Tag_compatibility from its new location in the attribute array,
1689 rather than the attribute list.
1690 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
1691 bfd_elf_add_obj_attr_int_string.
1692 (_bfd_elf_parse_attributes): Likewise.
1693 (_bfd_elf_merge_object_attributes): There's now only one
1694 Tag_compatibility, and it's in the array, not the list.
1695 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
1697 (bfd_elf_add_obj_attr_compat): Rename to
1698 bfd_elf_add_obj_attr_int_string.
1699 (bfd_elf_add_proc_attr_compat): Rename to
1700 bfd_elf_add_proc_attr_int_string.
1701 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
1704 2009-01-15 Douglas B Rupp <rupp@gnat.com>
1706 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
1707 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
1708 (vmsutil.lo): Add dependency rule.
1709 * Makefile.in: Regenerate.
1710 * config.bfd (ia64*-*-*vms*): Add case.
1711 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
1712 * configure: Regenerate.
1713 * vmsutil.c: New file.
1714 * vmsutil.h: New file.
1715 * elf-bfd.h (struct bfd_elf_special_section): Change type of
1717 * elfxx-ia64.c (elfNN_vms_post_process_headers,
1718 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
1719 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
1720 elfNN_vms_object_p): New functions
1721 * targets.c (bfd_elf64_ia64_vms_vec): New target.
1723 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
1726 * elflink.c (elf_gc_sweep): Exclude the group section if the
1727 first member of the section group is excluded.
1729 2009-01-14 Alan Modra <amodra@bigpond.net.au>
1732 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
1733 saved filename, use bfd_alloc rather than bfd_malloc for it.
1735 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1737 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
1739 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1741 * elf32-spu.c (remove_cycles): Always set call->max_depth.
1743 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1745 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
1747 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1749 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
1751 (struct got_entry): Add br_addr.
1752 (struct call_info): Add priority.
1753 (struct function_info): Add lr_store and sp_adjust.
1754 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
1755 (spu_elf_find_overlays): For soft-icache, mark any section within cache
1756 area as an overlay, and check that no other overlays exist. Look up
1757 icache overlay manager entry sym.
1758 (BRA_STUBS, BRA, BRASL): Define.
1759 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
1760 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
1762 (count_stub, build_stub): Support soft-icache.
1763 (build_spuear_stubs, process_stubs): Adjust build_stub call.
1764 (spu_elf_size_stubs): Size soft-icache stubs.
1765 (overlay_index): New function.
1766 (spu_elf_build_stubs): Make static. Support soft-icache.
1767 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
1768 (find_function_stack_adjust): Save lr store and stack adjust insn
1770 (maybe_insert_function): Adjust find_function_stack_adjust call.
1771 (mark_functions_via_relocs): Retrieve priority.
1772 (remove_cycles): Only warn about pruned arcs when stack_analysis.
1773 (sort_calls): Sort by priority first.
1774 (mark_overlay_section): Ignore .ovl.init.
1775 (sum_stack): Only print when stack_analysis.
1776 (print_one_overlay_section): New function, extracted from..
1777 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
1778 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
1779 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
1780 analysis. Call spu_elf_build_stubs.
1781 (spu_elf_relocate_section): For soft-icache encode overlay index
1783 (spu_elf_output_symbol_hook): Support soft-icache.
1784 (spu_elf_modify_program_headers: Likewise.
1786 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
1787 num_regions to num_lines. Add line_size and max_branch.
1788 (enum _ovly_flavour): Add ovly_soft_icache.
1789 (spu_elf_build_stubs): Delete.
1791 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1793 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
1794 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
1796 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
1798 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1799 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
1800 the program, the known offset starts at the negative size of the
1802 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
1805 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
1807 * config.bfd: Add lm32-*-rtems*.
1809 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
1811 * coff-ppc.c: Add 2009 to Copyright.
1812 * elf32-cris.c: Likewise.
1813 * elflink.c: Likewise.
1815 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
1817 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
1818 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
1820 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
1823 * elflink.c (elf_merge_st_other): New.
1824 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
1825 hide them if needed.
1826 (elf_link_add_object_symbols): Updated.
1828 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
1831 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
1832 ref_dynamic and dynamic_def fields when setting def_regular
1835 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
1838 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
1841 For older changes see ChangeLog-2008
1847 version-control: never