3 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
4 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
5 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
6 call branches. Correct undefined weak destination.
7 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8 .sfpr, and correct case where either only savef* or restf* is
11 Long branch stubs, multiple stub sections.
12 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
13 (ppc64_elf_next_input_section): Declare.
14 * elf64-ppc.c: Move linker-only prototypes.
15 (STUB_SUFFIX): Define.
16 (enum ppc_stub_type): New.
17 (struct ppc_stub_hash_entry): New.
18 (struct ppc_branch_hash_entry): New.
19 (struct ppc_link_hash_entry): Add stub_cache, oh.
20 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
21 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
22 Rename plt_overflow to stub_error.
23 (ppc_stub_hash_lookup): Define.
24 (ppc_branch_hash_lookup): Define.
25 (stub_hash_newfunc): New function.
26 (branch_hash_newfunc): New function.
27 (link_hash_newfunc): Init new fields.
28 (ppc64_elf_link_hash_table_create): Likewise.
29 (ppc64_elf_link_hash_table_free): New function.
30 (ppc_stub_name): New function.
31 (ppc_get_stub_entry): New function.
32 (ppc_add_stub): New function.
33 (create_linkage_sections): Use bfd_make_section_anyway. Create
34 .branch_lt and .rela.branch_lt sections. Don't create .stub.
35 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
36 and set up for plt call stubs. Link func and func desc syms.
37 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
38 (func_desc_adjust): Avoid hash lookup when func desc sym available
39 via shortcut, and set links when processing.
40 (ppc64_elf_hide_symbol): Likewise.
41 (allocate_dynrelocs): Don't allocate stub section here.
42 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
44 (ppc_type_of_stub): New function.
45 (build_one_stub): Delete.
46 (ppc_build_one_stub): New function.
47 (ppc_size_one_stub): New function.
48 (ppc64_elf_setup_section_lists): New function.
49 (ppc64_elf_next_input_section): New function.
50 (group_sections): New function.
51 (get_local_syms): New function.
52 (ppc64_elf_size_stubs): Rewrite.
53 (ppc64_elf_build_stubs): Rewrite.
54 (ppc64_elf_relocate_section): Look up stub entry for REL24
55 relocs. Don't propagate REL14* to dynamic objects. Look for long
56 branch stubs if REL14* or REL24 relocs won't reach.
57 (bfd_elf64_bfd_link_hash_table_free): Define.
61 * bfd/config.bfd: Add support for powerpc-*-windiss.
65 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
66 symbol names into the hash table.
70 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
71 calulating relocations.
72 (xcoff_complain_overflow) : Function table for relocation errors.
73 (xcoff_ppc_relocate_section): Use relocation and complain function
75 (xcoff_complain_overflow_unsigned_func): New complain function.
76 (xcoff_complain_overflow_signed_func): Same.
77 (xcoff_complain_overflow_bitfield_func): Same.
78 (xcoff_complain_overflow_dont_func): Same.
79 (xcoff_reloc_type_crel): New recot function.
80 (xcoff_reloc_type_br): Same.
81 (xcoff_reloc_type_ba): Same.
82 (xcoff_reloc_type_toc): Same.
83 (xcoff_reloc_type_rel): Same.
84 (xcoff_reloc_type_neg): Same.
85 (xcoff_reloc_type_pos): Same.
86 (xcoff_reloc_type_fail): Same.
87 (xcoff_reloc_type_noop): Same.
88 * libxcoff.h : Declare common parts for xcoff64.
89 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
90 and complain function tables.
94 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
95 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
99 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
100 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
102 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
103 same as the output before calling elf_link_input_bfd.
105 * coffcode.h (coff_compute_section_file_positions): Set
106 section_tail after shuffling section list.
110 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
111 addresses are 23bit with a special layout, not plain 32bit
112 values. Prevent relocation of immediate values.
116 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
117 MIPS-16 ASE flags are set, print something to indicate that.
121 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
122 under which a plt call stub is used.
123 (final_link_relocate): Similarly.
124 (allocate_plt_static): Clear h-plabel except when plt entry is
125 exclusively used for a plabel.
126 (allocate_dynrelocs): Use the above to simplify plt sizing.
127 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
128 (elf32_hppa_link_hash_table_create): Init.
130 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
131 (elf32_hppa_check_relocs): Set has_22bit_branch.
133 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
134 (final_link_relocate): Likewise.
138 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
139 search table if some FDE is DW_EH_PE_aligned encoded either.
140 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
145 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
146 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
148 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
153 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
157 * archures.c (bfd_lookup_arch): Move the list order comment..
158 (struct bfd_arch_info): ..to where it belongs.
159 * bfd-in2.h: Regenerate.
161 * archures.c (bfd_lookup_arch): Add comment on list order.
162 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
163 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
164 is always at head of list.
168 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
169 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
170 definition of these functions for ARM_WINCE builds as they are
172 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
173 for ARM_WINCE builds.
177 * coff-arm.c (bfd_arm_process_before_allocation):
181 * cpu-sh.c (scan_mach): Delete.
182 (arch_info_struct): Replace scan_mach with bfd_default_scan.
183 (bfd_sh_arch): Likewise.
187 * ihex.c (ihex_write_object_contents): Fix check for records
188 crossing 64K boundaries.
192 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
193 type rather than just assuming entries are ELF.
194 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
195 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
196 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
197 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
198 rather than elf_link_hash_entry.
202 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
207 * opncls.c (bfd_close): Write contents if writeable.
208 Minor formatting tidy-ups.
212 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
216 * bfd-in.h (bfd_get_section_lma): New access macro.
217 Minor white-space fix-up.
221 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
226 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
230 * coffcode.h (coff_read_word): New.
231 (coff_compute_checksum): New.
232 (coff_apply_checksum): New.
233 (coff_write_object_contents): Call coff_apply_checksum () to
234 apply checksum to PE image.
238 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
239 (elf32_hppa_final_link): Split out sorting logic to..
240 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
241 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
245 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
247 * configure: Re-generate.
251 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
252 is greater or equal to 4.3.3.
253 * configure: Regenerate.
258 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
259 R_CRIS_32_PCREL>: Fix typo in name.
260 (cris_elf_check_relocs): Always create .rela.got here when
261 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
262 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
267 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
268 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
270 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
271 * bfd.c (bfd_link_hash_table_free): Define.
272 * binary.c (binary_bfd_link_hash_table_free): Define.
273 * bout.c (b_out_bfd_link_hash_table_free): Define.
274 * coff-rs6000.c (rs6000coff_vec): Include
275 _bfd_generic_link_hash_table_free.
276 (pmac_xcoff_vec): Likewise.
277 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
278 (aix5coff64_vec): Likewise.
279 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
280 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
281 (bfd_elf32_bfd_link_hash_table_free): Define.
282 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
283 (bfd_elf32_bfd_link_hash_table_free): Define.
284 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
286 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
287 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
288 * ieee.c (ieee_bfd_link_hash_table_free): Define.
289 * ihex.c (ihex_bfd_link_hash_table_free): Define.
290 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
291 (_bfd_generic_link_hash_table_free): Add prototype.
292 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
293 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
294 * linker.c (_bfd_generic_link_hash_table_free): New function.
295 * mmo.c (mmo_bfd_link_hash_table_free): Define.
296 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
297 * oasys.c (oasys_bfd_link_hash_table_free): Define.
298 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
299 * som.c (som_bfd_link_hash_table_free): Define.
300 * srec.c (srec_bfd_link_hash_table_free): Define.
301 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
302 * versados.c (versados_bfd_link_hash_table_free): Define.
303 * vms.c (vms_bfd_link_hash_table_free): New function.
304 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
306 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
307 instead of bfd_alloc.
308 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
309 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
310 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
311 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
312 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
313 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
314 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
315 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
316 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
317 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
318 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
319 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
320 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
321 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
322 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
323 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
324 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
325 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
326 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
327 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
328 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
329 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
330 * m68klinux.c (linux_link_hash_table_create): Likewise.
331 * sparclinux.c (linux_link_hash_table_create): Likewise.
332 * sunos.c (sunos_link_hash_table_create): Likewise.
333 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
335 * targets.c: Add _bfd_link_hash_table_free to xvec.
337 * bfd-in2.h: Regenerate.
338 * libbfd.h: Regenerate.
339 * libcoff.h: Regenerate.
343 * dep-in.sed: Cope with absolute paths.
344 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
346 * Makefile.in: Regenerate.
347 * coff-arm.c: Fix copyright date.
348 * cpu-h8300.c: Likewise.
349 * cpu-i370.c: Likewise.
350 * cpu-s390.c: Likewise.
351 * cpu-mips.c: Likewise.
352 * po/SRC-POTFILES.in: Regenerate.
356 * Makefile.am: Add elfxx-mips.c to the known backends.
357 (elf32-mips.lo): remove dependency to coff/external.h.
358 * Makefile.in: Regenerate.
359 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
360 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
362 * configure: Regenerate.
363 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
364 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
365 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
366 MIPS specific backend functions.
367 * elf32-mips.c: Moved most code to elfxx-mips.c.
368 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
370 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
371 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
372 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
373 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
374 interface to allow selection of the right REL or RELA howto table.
375 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
376 static. Let it refuse n32 objects.
377 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
378 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
379 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
380 (elf32_mips_ignore_discarded_relocs): Rename from
381 _bfd_elf32_mips_ignore_discarded_relocs.
382 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
383 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
384 (elf_mips_howto_table_rela): Remove.
385 * elf64-mips.c: Moved most code to elfxx-mips.c.
386 (bfd_elf64_bfd_reloc_type_lookup): Make static.
387 (mips_elf64_rtype_to_howto): New function.
388 (mips_elf64_object_p): Likewise.
389 (elf64_mips_irix_compat): Likewise.
390 * elfxx-mips.c: New file containing common code merged together from
391 elf32-mips.c and elf64-mips.c.
392 * elfxx-mips.h: New file containing MIPS specific prototypes from
394 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
395 elf_backend_mips_rtype_to_howto.
399 * srec.c (MAXCHUNK, Chunk): Revise comments.
400 (srec_write_record): Correct buffer size.
401 (srec_write_header): Do without intermediate buffer.
402 (srec_write_section): Validate Chunk.
403 (srec_write_terminator): Pass NULL instead of dummy buffer.
404 (srec_write_symbols): Pass file and symbol names directly to
405 bfd_bwrite so sprintf won't overflow buffer.
409 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
410 PC relative relocs against hidden symbols.
411 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
415 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
416 LMAs, loop over segments until p_vaddr and p_memsz specify an
417 extent enclosing the section.
421 * ihex.c (ihex_write_object_contents): Do not allow records to
422 cross a 64K boundary - wrap if necessary.
426 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
427 which caused the returned LWP ID to always be 0.
431 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
432 (elf32_sparc_relocate_section): Use it to figure out when to
433 initialize .got entries.
434 * elf64-sparc.c: Similarly.
438 * linker.c (link_action): Ignore duplicate warning syms.
439 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
440 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
441 (elf_adjust_dynamic_symbol): Likewise.
442 (elf_export_symbol): Likewise.
443 (elf_link_find_version_dependencies): Likewise.
444 (elf_link_assign_sym_version): Likewise.
445 (elf_link_sec_merge_syms): Likewise.
446 (elf_link_output_extsym): Likewise.
447 (elf_gc_sweep_symbol): Likewise.
448 (elf_gc_propagate_vtable_entries_used): Likewise.
449 (elf_gc_smash_unused_vtentry_relocs): Likewise.
450 (elf_gc_allocate_got_offsets): Likewise.
451 (elf_collect_hash_codes): Likewise.
452 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
453 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
454 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
455 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
456 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
457 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
458 (elf_cris_discard_excess_dso_dynamics): Likewise.
459 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
460 (mark_PIC_calls): Likewise.
461 (allocate_plt_static): Likewise.
462 (allocate_dynrelocs): Likewise.
463 (readonly_dynrelocs): Likewise.
464 * elf32-i386.c (allocate_dynrelocs): Likewise.
465 (readonly_dynrelocs): Likewise.
466 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
467 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
468 * elf32-mips.c (mips_elf_output_extsym): Likewise.
469 (mips_elf_sort_hash_table_f): Likewise.
470 (mips_elf_check_mips16_stubs): Likewise.
471 * elf32-s390.c (allocate_dynrelocs): Likewise.
472 (readonly_dynrelocs): Likewise.
473 * elf32-sh.c (sh_elf_discard_copies): Likewise.
474 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
475 (xstormy16_relax_plt_realloc): Likewise.
476 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
477 (elf64_alpha_output_extsym): Likewise.
478 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
479 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
480 (mips_elf64_check_mips16_stubs): Likewise.
481 (mips_elf64_output_extsym): Likewise.
482 * elf64-ppc.c (func_desc_adjust): Likewise.
483 (allocate_dynrelocs): Likewise.
484 (readonly_dynrelocs): Likewise.
485 * elf64-s390.c (allocate_dynrelocs): Likewise.
486 (readonly_dynrelocs): Likewise.
487 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
488 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
489 (readonly_dynrelocs): Likewise.
490 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
491 * aoutx.h (aout_link_write_other_symbol): Likewise.
492 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
493 (_bfd_coff_write_global_sym): Likewise.
494 * i386linux.c (linux_tally_symbols): Likewise.
495 * m68klinux.c (linux_tally_symbols): Likewise.
496 * sparclinux.c (linux_tally_symbols): Likewise.
497 * pdp11.c (aout_link_write_other_symbol): Likewise.
498 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
499 * xcofflink.c (xcoff_build_ldsyms): Likewise.
500 (xcoff_write_global_symbol): Likewise.
502 * cofflink.c (_bfd_coff_final_link): Formatting.
503 * cpu-mips.c (mips_compatible): Make static, prototype.
504 * elf32-i386.c (elf_i386_check_relocs): Formatting.
505 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
506 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
507 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
508 (mips_elf64_final_link): Likewise.
509 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
514 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
515 (SWAP_OUT_RELOC_OFFSET): Define.
519 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
520 terminating NULL if empty symbol table.
521 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
525 * elflink.h (elf_link_input_bfd): Revert the last change since
526 the gcc exception handling isn't fixed yet.
530 * elflink.h (elf_link_input_bfd): Complain about relocations
531 against local symbols in discarded sections.
535 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
539 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
540 section file offset for !SEC_LOAD sections.
544 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
545 <case R_ARM_GOT>): Handle relocations to Thumb functions.
549 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
551 * archive.c: Update copyright date.
552 * bfd-in2.h: Regenerate.
553 * libbfd.h: Regenerate.
554 * Makefile.am: Run "make dep-am"
555 * Makefile.in: Regenerate.
556 * po/SRC-POTFILES.in: Regenerate.
560 * dwarf2.c (struct funcinfo): Move up.
561 (lookup_address_in_function_table): New argument function_ptr.
563 (lookup_address_in_line_table): New argument function. If function
564 is non-NULL, use it to handle ``addr'' before the first line note of
566 (comp_unit_find_nearest_line): Update and swap calls to
567 lookup_address_in_function_table and lookup_address_in_line_table.
568 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
569 N_SLINE encountered if we see an N_FUN before any N_SLINE.
573 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
574 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
575 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
579 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
580 dynamic objects in archives.
584 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
585 STT_NOTYPE symbols to STT_OBJECT.
589 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
593 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
594 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
595 * coff-rs6000 (do_pad) : New function for archive padding.
596 (do_copy) : New function for object file copying in archives.
597 (do_shared_object_padding) : New function for padding shared
598 objects to their text section alignment in archives.
599 (bfd_xcoff_ar_achive_set_magic) : Stub.
600 (xcoff_write_armap_big) : Use do_copy and do_pad.
601 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
603 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
604 bfd_xcoff_magic_number.
605 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
607 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
608 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
609 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
610 * rs6000-core.c : Update copyright date.
611 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
613 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
614 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
615 (coff_set_flags) : Use bfd_xcoff_magic_number.
616 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
617 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
618 * Makefile.am : Same.
621 * configure : Regnerate.
622 * Makefile.in : Same.
627 * po/fr.po: Updated version.
631 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
632 * libbfd.h: Regenerate.
633 * archive.c (coff_write_armap): Pass on failures from
634 bfd_write_bigendian_4byte_int.
638 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
639 error to bfd_error_nonrepresentable_section for reinit_array
644 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
645 OR it in rather than replacing previously selected flags.
647 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
648 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
652 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
654 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
655 ensure reloc size matches before calling elf_link_input_bfd.
656 Add an assert to check reloc size when counting output relocs.
660 * mmo.c (mmo_get_loc): Return NULL rather than false.
664 * po/fr.po: Updated version.
668 * archures.c (bfd_default_compatible): Test bits_per_word.
669 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
670 bfd_default_compatible.
671 * cpu-i370.c (i370_compatible): Likewise.
672 * cpu-sparc.c (sparc_compatible): Likewise.
673 * cpu-h8300.c (compatible): Test in->arch == out->arch.
675 * elflink.h: Formatting fixes.
676 (elf_link_output_extsym): Merge undefined and undef weak cases.
678 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
679 when word size of input matches output word size.
683 * cpu-i386.c (i386_compatible): New. Use it instead of
684 bfd_default_compatible.
688 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
689 as the type for bfd_reloc_val.
693 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
694 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
695 (elf_hppa_final_link_relocate): Correct relocations for indirect
696 references to local data through the DLT. Fix .opd creation for
697 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
698 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
699 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
700 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
701 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
702 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
703 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
707 * merge.c (_bfd_merge_sections): Don't segfault if there
708 is nothing to merge due to GC.
712 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
713 symbols that have been forced local.
715 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
716 to output forced local syms for non-shared link.
717 (elf_link_output_extsym): Tweak condition for calling backend
718 adjust_dynamic_symbol so that previous behaviour is kept.
719 Whitespace changes throughout file.
723 * elf.c (bfd_section_from_shdr): Handle special sections,
724 .init_array, .fini_array and .preinit_array.
725 (elf_fake_sections): Likewise.
727 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
728 DT entry only if the section is in output for .init_array,
729 .fini_array and .preinit_array. Complain about .preinit_array
731 (elf_bfd_final_link): Warn zero size for .init_array,
732 .fini_array and .preinit_array sections.
734 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
735 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
736 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
741 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
742 * configure: Regenerate.
746 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
748 * coff-rs6000.c (xcoff_howto_table): Same.
752 * elflink.h (size_dynamic_sections): If section named
753 ".preinit_array" exists, create DT_PREINIT_ARRAY and
754 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
755 ".init_array" and ".fini_array".
756 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
757 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
762 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
767 * elf64-hppa.h: Update copyright date.
769 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
770 (ppc64_elf_relocate_section): Don't generate power4 style branch
771 hints for *_BRTAKEN and *_BRNTAKEN relocs.
775 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
777 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
781 * elf64-x86-64.c: Major rework that introduces all recent changes
782 to the x86-64 backend. Get a closer match to elf32-i386.
783 (struct elf64_x86_64_dyn_relocs): Rename from
784 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
786 (struct elf64_x86_64_link_hash_table): Add short cuts to some
788 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
789 remove casts, initialize new hash members.
790 (create_got_section): New.
791 (elf64_x86_64_create_dynamic_sections): New.
792 (elf64_x86_64_copy_indirect_symbol): New.
793 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
794 relocs, .got or .relgot here but do it in allocate_dynrelocs.
795 Reference count possible .plt and .got entries. Don't test input
796 section SEC_READONLY here to try to avoid copy relocs, and keep
797 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
798 DF_TEXTREL here. Delay setting of variables until needed. Cache
799 pointer to "sreloc" section in elf_section_data. Tweak condition
800 under which .got created. Report files with bad relocation
802 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
803 Reference count possible .plt entries. Don't deallocate .got and
805 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
806 do copy reloc processing for weakdefs. Remove redundant casts and
807 aborts. Delay setting of vars until needed. Move creation of
808 dynamic symbols and allocation of .plt and .rela.plt to
809 allocate_dynrelocs. Replace BFD_ASSERT with abort.
810 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
811 (allocate_dynrelocs): New.
812 (readonly_dynrelocs): New.
813 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
814 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
815 Zero out the dynamic allocated content space.
816 (elf64_x86_64_discard_copies): Removed.
817 (elf64_x86_64_relocate_section): Make use of dynamic section
818 short-cuts. Localise vars, and delay setting. Better error
819 reporting, replace BFD_ASSERT with abort. Check
820 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
821 regular object file and tread the weak definition as the normal
822 one. Don't discard relocs for undefweak or undefined symbols and
823 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
825 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
826 symbols that have been forced local. Use same test to decide if
827 we can use a relative reloc for got as relocate_section. Expand
828 SHN_UNDEF comment. Move expressions out of function calls.
829 Replace BFD_ASSERT with abort.
830 (bfd_elf64_bfd_final_link): Removed.
831 (elf_backend_copy_indirect_symbol): Define.
835 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
836 (_bfd_xcoff_reloc_type_lookup): Use it.
837 * coff64-rs6000.c (xcoff64_howto_table): Same.
838 (xcoff64_reloc_type_lookup): Same.
842 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
847 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
848 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
849 * bfd-in2.h: Regenerate.
850 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
851 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
853 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
854 (elf_s390_reloc_type_lookup): Likewise.
855 (elf_s390_check_relocs): Likewise.
856 (elf_s390_gc_sweep_hook): Likewise.
857 (elf_s390_relocate_section): Likewise.
858 (elf_s390_object_p): Use renamed architecture define.
859 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
863 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
867 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
868 absptr -> pcrel optimization for shared libs.
869 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
870 library cannot be converted to pcrel.
871 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
873 * elf32-i386.c (elf_i386_relocate_section): If
874 _bfd_elf_section_offset returned -2, skip, but make sure the
875 relocation is installed.
876 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
877 * elf32-cris.c (cris_elf_relocate_section): Likewise.
878 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
879 * elf32-i370.c (i370_elf_relocate_section): Likewise.
880 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
881 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
882 * elf32-s390.c (elf_s390_relocate_section): Likewise.
883 * elf32-sh.c (sh_elf_relocate_section): Likewise.
884 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
885 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
886 * elf64-s390.c (elf_s390_relocate_section): Likewise.
887 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
888 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
889 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
890 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
891 _bfd_elf_section_offset returning -2 the same way as -1.
892 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
893 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
895 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
899 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
900 (bfd_xcoff_size_dynamic_sections): Same.
901 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
902 (bfd_xcoff_size_dynamic_sections): Same.
903 * coff-rs6000.c (xcoff_generate_rtinit): Same.
904 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
905 * libxcoff.h (struct xcoff_backend_data_rec): Same.
906 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
907 * bfd-in2.h: Regenerate.
911 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
912 (struct ppc_link_hash_table): Add sfpr.
913 (ppc64_elf_link_hash_table_create): Init it.
914 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
916 (create_linkage_sections): ..here. Make .sfpr too.
917 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
919 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
920 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
921 ._restf* functions, and create as needed.
922 (func_desc_adjust): Only force_local for shared libs.
926 * configure.in: Bump version number post 2.12 branching.
927 * configure: Regenerate.
931 * mmo.c: Correct and improve comments.
932 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
933 zero-pad. Use input to fill up non-empty bfd buffer.
934 (mmo_flush_chunk): New function.
935 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
936 changed. Don't emit location specifier if VMA is same as
937 *LAST_VMAP after omitting leading zero contents. Call
938 mmo_flush_chunk before emitting location specifier.
939 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
940 with mmo_write_loc_chunk calls.
941 (mmo_internal_write_section): Call mmo_flush_chunk after
943 (mmo_write_symbols_and_terminator): Move :Main to first position
944 in symbol array. Add faked one if it does not exist if there are
945 other symbols. Don't add it if there are no symbols at all. Move
946 out test for value of :Main from symbol loop. Rename table
947 fakemain to maintable and variable mainsym to fakemain.
951 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
952 section with no got matches any got. Simplify error generaion.
956 Support arbitrary length fill patterns.
957 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
958 (_bfd_default_link_order): Remove bfd_fill_link_order code.
959 Call default_data_link_order.
960 (default_fill_link_order): Delete.
961 (default_data_link_order): New function.
962 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
963 of bfd_fill_link_order with bfd_data_link_order.
964 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
965 * elf64-mips.c (mips_elf64_final_link): Likewise.
967 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
968 Correct value returned in "end" for "0x<non-hex>".
972 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
973 (scan): Test against 'mach' field in info structure.
977 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
981 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
986 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
987 non-zero physical addresses when adjusting the LMAs of new
992 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
993 from _bfd_elf_hppa_gen_reloc_type.
994 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
995 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
996 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
997 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
1001 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
1002 loading its contents if there's nothing to do in it.
1006 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
1009 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
1010 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
1011 (ppc64_elf_finish_dynamic_sections): Set values for them.
1015 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
1016 * elf.c (elfcore_grok_pstatus): Add prototype.
1017 (elfcore_grok_lwpstatus): Add prototype.
1018 (elfcore_write_lwpstatus): New function.
1019 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
1023 * elf32-sh.c: Added missing prototypes.
1024 * elf32-sh64.c: Likewise.
1025 (sh_elf_align_loads): Mark unused args as such.
1026 * elf64-sh64.c: Added missing prototypes.
1027 (struct elf_sh64_link_hash_entry): Fix typo.
1028 (sh_elf64_relocate_section): Fix info argument passed to
1029 _bfd_elf_section_offset.
1033 * Makefile.am: "make dep-am".
1034 * Makefile.in: Regenerate.
1035 * aclocal.m4: Regenerate.
1036 * config.in: Regenerate.
1037 * configure: Regenerate.
1041 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
1043 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
1045 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
1046 cast warnings for the common case.
1050 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
1052 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
1057 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
1058 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
1059 (elf64_alpha_relocate_section): Likewise.
1060 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
1061 * bfd-in2.h, libbfd.h: Rebuild.
1065 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
1066 that base-plus-offset reloc accounting is consistent.
1067 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
1068 up to date for undefined symbols.
1074 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
1075 sections for the O32 ABI.
1079 * elf32-arm.h: Fix formatting of _("...").
1080 * elf32-d10v.c: Likewise.
1081 * elf32-m68k.c: Likewise.
1082 * elf32-mips.c: Likewise.
1086 * coff-or32.c: Fix compile time warning messages.
1090 Contribute sh64-elf.
1092 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
1093 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
1094 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
1095 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
1096 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
1097 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
1098 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
1099 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
1100 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
1102 * libbfd.h, bfd-in2.h: Rebuilt.
1103 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
1104 (sh_reloc_map): Map them.
1105 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1106 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
1107 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
1108 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1109 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
1110 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
1111 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
1112 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
1113 datalabel_got_offset.
1114 (sh_elf_link_hash_newfunc): Initialize it.
1115 (sh_elf_relocate_section): Augment the scope of
1116 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
1117 GOT and GOTOFF handling to new SHmedia relocation types. Support
1119 (sh_elf_check_relocs): Likewise.
1120 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
1121 PLT entries using movi_shori_putval. Support GOT_BIAS.
1122 (sh_elf_finish_dynamic_sections): Likewise.
1123 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
1124 relocation, it's now done by the caller.
1126 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
1127 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
1128 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
1129 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
1130 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
1131 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
1132 sh64_elf64_hash_table): New.
1133 (sh_elf64_howto_table): Introduce new relocs.
1134 (sh_elf64_info_to_howto): Accept new PIC relocs.
1135 (sh_elf64_relocate_section): Augment the scope of
1136 seen_stt_datalabel. Support new PIC relocs.
1137 (sh_elf64_check_relocs): Support new PIC relocs.
1138 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
1139 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
1140 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
1141 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
1142 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
1143 movi_shori_putval, movi_3shori_putval,
1144 sh64_elf64_create_dynamic_sections,
1145 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
1146 sh64_elf64_size_dynamic_sections,
1147 sh64_elf64_finish_dynamic_symbol,
1148 sh64_elf64_finish_dynamic_sections): New.
1149 (elf_backend_create_dynamic-sections,
1150 bfd_elf64_bfd_link_hash_table_create,
1151 elf_backend_adjust_dynamic_symbol,
1152 elf_backend_size_dynamic_sections,
1153 elf_backend_finish_dynamic_symbol,
1154 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1155 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1156 elf_backend_got_header_size, elf_backend_plt_header_size):
1159 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
1160 match official numbers and names; moved unmaching ones to the
1162 * elf32-sh64.c, elf64-sh64.c: Likewise.
1164 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
1167 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
1169 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
1171 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
1172 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
1173 .cranges section with SEC_SORT_ENTRIES set.
1174 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
1175 incoming sorted .cranges section.
1176 (sh64_bfd_elf_copy_private_section_data): New.
1177 (sh64_elf_final_write_processing): Only sort .cranges and modify
1178 start address if called by linker.
1180 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
1181 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
1182 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
1184 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
1185 line. Add comments before all entries.
1186 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
1188 (sh_elf64_reloc): Correct head comment.
1189 (sh_elf64_relocate_section): Correct spacing.
1190 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
1191 instead call reloc_dangerous callback.
1192 <case R_SH_SHMEDIA_CODE>: New case.
1193 (sh_elf64_gc_mark_hook): Correct spacing.
1194 (sh_elf64_check_relocs): Ditto.
1195 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
1197 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
1199 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
1200 clarify describing comment. Add comments before all entries.
1201 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
1202 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
1204 Sort .cranges section in final link. Prepare to set bit 0 on
1206 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
1207 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
1208 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
1210 (sh64_backend_section_from_shdr): New, to recognize
1211 SHT_SH5_CR_SORTED on incoming .cranges section.
1212 (elf_backend_section_from_shdr): Define.
1213 (sh64_elf_final_write_processing): Sort outgoing .cranges
1214 section. (New, temporarily disabled:) Set bit 0 on entry address
1215 according to ISA type.
1216 (sh64_find_section_for_address): New.
1217 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
1218 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
1219 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
1220 bfd_malloc, not xmalloc.
1221 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
1223 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
1224 temporarily disabled) setting bit 0 on entry address.
1225 (elf_backend_final_write_processing): Define.
1227 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
1228 be a proper relocation for PTA and PTB rather than a marker.
1229 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
1230 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
1231 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
1232 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
1233 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
1235 * elf64-sh64.c: Ditto.
1236 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
1237 * elf32-sh64.c: Include opcodes/sh64-opc.h
1238 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
1239 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
1240 parameters. No unused parameters. Caller changed.
1241 <case R_SH_PT_16>: New case.
1242 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
1243 * Makefile.in: Regenerate.
1245 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
1247 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1248 (sh64_elf_merge_private_data): Ditto.
1249 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
1250 to access stored section flags.
1251 (sh64_elf_final_write_processing): Return immediately unless
1252 called by linker. Use sh64_elf_section_data (cranges) to get size
1253 of linker-generated cranges entries.
1254 (sh64_elf_copy_private_data): Add missing "return true".
1255 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1256 (sh_elf64_merge_private_data): Ditto.
1258 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
1259 elf64-sh64.c:sh64_elf_fake_sections.
1260 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
1262 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
1263 (sh64_elf_final_write_processing): New.
1264 (elf_backend_final_write_processing): Define.
1265 (sh64_elf_fake_sections): Get header flags from tdata field.
1266 (sh64_elf_copy_private_data): Do not call
1267 sh64_elf_copy_private_data_internal, just copy e_flags field.
1268 (sh64_elf_merge_private_data): Do not call
1269 sh64_elf_copy_private_data_internal.
1271 Remove EF_SH64_ABI64, let ELF size make difference.
1272 Remove SH64-specific BFD section flag.
1273 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
1274 containing SHmedia through elf_section_data (asect)->tdata
1275 non-zero, not using a BFD section flag.
1276 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
1277 (sh64_elf_merge_private_data): Similar.
1278 (elf_backend_section_flags): Don't define.
1279 (sh64_elf_backend_section_flags): Delete.
1280 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
1282 (sh_elf64_merge_private_data): Similar.
1283 * section.c (Section flags definitions): Don't define
1285 (bfd-in2.h): Regenerate.
1287 Make DataLabel references work with partial linking.
1288 * elf32-sh64.c: Fix formatting.
1289 (sh64_elf_link_output_symbol_hook): New.
1290 (elf_backend_link_output_symbol_hook): Define to
1291 sh64_elf_link_output_symbol_hook.
1292 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
1293 undefined if partial linking. Adjust sanity check.
1294 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
1295 (elf_backend_link_output_symbol_hook): Define to
1296 sh64_elf64_link_output_symbol_hook.
1297 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
1298 undefined if partial linking. Adjust sanity check.
1300 Implement semantics for inter-file DataLabel references.
1301 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
1302 (sh64_elf64_add_symbol_hook): New.
1303 (sh_elf64_relocate_section): If passing an indirect symbol with
1304 st_type STT_DATALABEL on the way to a symbol with st_other
1305 STO_SH5_ISA32, do not bitor 1 to the relocation.
1306 (elf_backend_add_symbol_hook): Define to
1307 sh64_elf64_add_symbol_hook.
1308 * elf64-sh32.c: Tweak comments.
1309 (DATALABEL_SUFFIX): Define.
1310 (sh64_elf_add_symbol_hook): New.
1311 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
1312 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
1313 symbol with st_type STT_DATALABEL on the way to a symbol with
1314 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
1316 Pass through STT_DATALABEL.
1317 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
1318 (elf_backend_get_symbol_type): Define.
1319 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
1320 (elf_backend_get_symbol_type): Define.
1322 * elf32-sh64.c: Tweak comments.
1323 (sh64_elf_copy_private_data_internal): Add prototype.
1324 (bfd_elf32_bfd_set_private_flags): Define.
1325 (sh64_elf_copy_private_data_internal): Compare machine name, not
1326 textual BFD target name, to check whether to copy section flag
1328 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
1329 Tweak section-contents-type-mismatch message.
1330 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
1331 Validize reloc-types.
1332 * elf64-sh64.c: New file.
1333 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
1334 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
1335 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
1336 Regenerate dependencies.
1337 * Makefile.in: Regenerate.
1338 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
1339 bfd_elf64_sh64l_vec.
1340 * configure.in: Handle bfd_elf64_sh64_vec and
1341 bfd_elf64_sh64l_vec.
1342 * configure: Regenerate.
1343 * po/POTFILES.in: Regenerate.
1344 * po/bfd.pot: Regenerate.
1346 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
1347 anything else but EF_SH64 and EF_SH64_ABI64.
1348 (sh64_elf_merge_private_data): Emit error for anything else but
1349 EF_SH64 and EF_SH64_ABI64.
1350 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
1352 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
1353 bfd_elf32_sh64l_vec as a temporary measure.
1354 * configure: Regenerate.
1356 * cpu-sh.c (arch_info_struct): Include sh5 item
1358 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
1359 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
1360 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
1361 * elf32-sh64.c: Tweak comments.
1362 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
1363 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
1364 (sh64_elf_copy_private_data_internal): Wrap long line.
1365 (sh64_elf_merge_private_data): Rewrite to allow objects from
1366 SH64 subsets to be linked together.
1367 (INCLUDE_SHMEDIA): Define.
1368 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
1369 Parenthesize plus-expression inside or-expression.
1370 <global symbol>: Ditto.
1371 (sh_elf_set_mach_from_flags): Remove code refusing
1372 deleted EF_SH64_32BIT_ABI flag.
1374 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
1375 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
1376 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
1377 (sh_elf_relocate_section) <local symbol>: Or 1 in
1378 calculation of relocation if sym->st_other & STO_SH5_ISA32.
1379 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
1380 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
1383 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
1384 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
1385 Regenerate dependencies.
1386 * Makefile.in: Regenerate.
1387 * archures.c: Add bfd_mach_sh5.
1388 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
1389 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
1390 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
1391 * configure: Regenerate.
1392 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
1393 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
1394 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
1395 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
1396 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
1397 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
1398 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
1399 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
1400 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
1401 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
1403 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
1405 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
1406 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
1407 shmedia_prepare_reloc, goto final_link_relocate if it returns
1408 non-zero, else fail as before.
1409 (sh_elf_set_mach_from_flags): Provide function only if not defined
1410 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
1411 (sh_elf_set_private_flags): Provide function only if not defined
1413 (sh_elf_copy_private_data): Similar.
1414 (sh_elf_merge_private_data): Similar.
1415 * section.c (SEC_SH_ISA_SHMEDIA): New.
1416 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
1417 * elf32-sh64.c: New file.
1418 * libbfd.h: Regenerate.
1419 * bfd-in2.h: Regenerate.
1420 * po/POTFILES.in: Regenerate.
1421 * po/bfd.pot: Regenerate.
1422 * bfd-in2.h: Regenerate.
1423 * libbfd.h: Regenerate.
1427 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
1428 been included, not drag it in.
1429 * bfd-in2.h: Regenerate.
1433 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
1434 the mach and ISA fields if necessary.
1438 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
1439 ARM architecture when an F_ARM_5 flag is detected, since we cannot
1440 be sure exactly which architecture this represents.
1444 * po/tr.po: Updated translation.
1449 * archures (bfd_mach_ppc64): Define.
1450 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
1451 (bfd_powerpc_arch): Define.
1452 * bfd-in2.h: Regenerate.
1453 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
1454 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
1455 (bfd_powerpc_archs): Add default powerpc64 arch.
1459 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
1460 against section syms in readonly sections. Don't do the global
1461 sym check if we find one.
1462 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1463 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1464 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1465 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1466 (elf_s390_grok_prstatus): Add missing prototype.
1470 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
1471 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
1472 Call bfd_get_section_by_name only once. Initialize
1473 bpodata->n_bpo_relocs_this_section.
1474 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
1476 (bpo_reloc_request_sort_fn): Don't use difference of values as
1479 2002-02-02 David O'Brien <obrien@FreeBSD>
1481 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
1482 version 4.5 and later the same as 5-CURRENT.
1483 * configure: Re-generate.
1487 * config.bfd (hppa*-*-netbsd*): New target.
1491 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
1492 to front of message. Unify messages with elf32-arm.h. Use
1493 commas where neccessary.
1494 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
1495 ERROR in messages. Unify messages with coff-arm.c. Correct
1496 VFP/FPA error message.
1497 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
1498 APCS-32 for translation.
1502 Perform on-demand global register allocation from
1503 R_MMIX_BASE_PLUS_OFFSET relocs.
1504 * elf64-mmix.c (struct bpo_reloc_section_info, struct
1505 bpo_reloc_request, struct bpo_greg_section_info): New.
1506 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
1507 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
1508 _bfd_mmix_check_all_relocs,
1509 _bfd_mmix_prepare_linker_allocated_gregs,
1510 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
1511 (elf_mmix_howto_table): Correct src_mask for most relocs.
1512 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
1514 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
1515 case. Fix typo in comment. New label do_mmix_reloc.
1516 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
1517 store first object file with a base-plus-offset reloc. Call
1518 mmix_elf_check_common_relocs for the part common with mmo.
1519 (mmix_elf_final_link): Write out linker-allocated register
1521 (elf_backend_gc_sweep_hook): Define.
1522 (bfd_elf64_bfd_relax_section): Define.
1524 * mmo.c: Don't include <ctype.h>
1525 (mmo_init): Correct init-once logic.
1529 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
1533 * Makefile.am: Run "make dep-am"
1534 * Makefile.in: Regenerate.
1536 2002-01-31 David O'Brien <obrien@FreeBSD>
1538 * configure.in: Recognize the differences in core files from FreeBSD
1539 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
1541 * configure: Regenerate.
1545 * coff-or32.c: New file.
1546 * cpu-or32.c: New file.
1547 * elf32-or32.c: New file.
1548 * archures.c: Add support for or32.
1549 * targets.c: Add support for or32.
1550 * bfd-in2.h: Regenerate.
1551 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
1552 coff_write_object_contents): Add support for or32.
1553 * config.bfd: Add target.
1554 * configure.in: Add support for or32.
1555 * configure: Regenerate.
1556 * Makefile.am: Add support for or32.
1557 * Makefile.in: Regenerate.
1558 * po/SRC-POTFILES.in: Add or32 files.
1559 * po/bfd.pot: Regenerate.
1564 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
1565 false' with a return of a bfd_reloc_ error code.
1569 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1570 unexport unreferenced symbols when --export-dynamic. Call
1571 _bfd_elf_strtab_delref when unexporting.
1575 * bfd-in.h: Include <stdbool.h> if it is available.
1576 * bfd-in2.h: Regenerated.
1580 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
1585 * archures.c: Tidy up formatting of embedded comments.
1586 * bfd.c: Tidy up formatting of embedded comments.
1587 * bfd-in.h: Fix formatting of comments.
1588 * reloc.c: Tidy up formatting of ordinary & embedded comments.
1589 * section.c: Tidy up formatting of embedded comments.
1590 * syms.c: Tidy up formatting of embedded comments.
1591 * targets.c: Tidy up formatting of embedded comments.
1593 * bfd-in2.h: Regenerate.
1597 * vms-tir.c (cmd_name): New function.
1598 (tir_cmd_name): New function.
1599 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
1600 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
1603 * peXXigen.c (pe_print_idata): Rearrange message to aid in
1605 (pe_print_pdata): Rearrange message to aid in translation.
1607 * libbfd.c (warn_deprecated): Rearrange error message to aid in
1610 * ihex.c (ihex_write_object_contents): Fix spelling typo.
1612 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
1614 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
1615 message to aid in translation.
1617 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
1618 to aid in translation.
1620 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
1624 * coff-arm.c, elf32-elf.h: Unify messages.
1628 * po/sv.po: Updated translation.
1632 * dwarf2.c (read_abbrev): Use full section name in error message.
1633 (decode_line_info): Likewise.
1635 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
1640 * elf64-ppc.c (func_desc_adjust): Only provide missing function
1641 descriptor symbols for undefined function code syms. Clear
1642 ELF_LINK_NON_ELF so that they can stay weak.
1647 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
1648 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
1649 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
1651 * bfd-in2.h: Regenerate.
1655 * elf32-mips.c: Add additional comments about HI16 relocation
1657 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
1658 pc-relative relocations. (Reverts change made on 2001-10-31.)
1659 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
1660 for pc-relative relocations.
1661 (mips_elf_calculate_relocation): Add a comment about a kludge
1662 in the R_MIPS_GNU_REL_HI16 handling.
1663 (_bfd_mips_elf_relocate_section): Implement that kludge;
1664 adjust pc-relative HI16 relocation for difference in HI16 and
1665 LO16 addresses, since it can't easily be done in
1666 mips_elf_calculate_relocation.
1670 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
1671 relocations with PC32 relocations for undefined or weak symbols.
1672 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
1673 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
1677 * elfcore.h (elf_core_file_p): Improve comment for last change.
1681 * configure: Regenerated.
1685 * elfcore.h (elf_core_file_p): Set the machine architecture
1686 before processing the program headers.
1690 * configure.in <64-bit configuration>: If using gcc, check and
1691 emit error for egcs-1.1.2.
1692 * configure: Regenerate.
1696 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
1697 as possible to avoid stack corruption.
1701 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
1702 for non-allocated sections.
1706 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
1707 prstat.pr_reg even if it is a struct.
1711 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
1715 * coffgen.c (coff_print_symbol): Don't mark info message
1720 * po/fr.po: Updated translation.
1721 * po/es.po: Updated translation.
1725 * coff-alpha.c (alpha_relocate_section): Unify warning message
1726 for GP relative relocations without GP defined.
1727 * coff-mips.c (mips_relocate_section): Likewise.
1731 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
1732 unsigned overflow when new_offset < old_offset.
1736 * bfd.c (_bfd_abort): Fix typo.
1740 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
1741 plt entries for undefweak symbols.
1745 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
1747 (bfd_elf64_ia64_hpux_big_vec): Ditto.
1748 (bfd_elf32_h8300_vec): Ditto.
1752 * elf64-ppc.c: Remove stale part of ABI comment.
1753 (NO_OPD_RELOCS): Define.
1754 (ppc64_elf_check_relocs): Use it.
1755 (ppc64_elf_relocate_section): Here too.
1756 (build_one_stub): Don't point function syms at the stub. Instead,
1758 (ppc64_elf_relocate_section): Check whether REL24 relocs should
1759 really go to the stub. Make all dynamic relocs in opd against
1761 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
1766 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
1770 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
1771 TOC_BASE_OFF adjustment.
1773 * Makefile.am: Run "make dep-am".
1774 * Makefile.in: Regenerate.
1775 * po/SRC-POTFILES.in: Regenerate.
1779 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
1784 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
1785 Check for and emit error if sgot is NULL at this point.
1789 * config.bfd (ia64*-*-netbsd*): New target.
1793 * som.c (som_write_space_strings): Comment typo fix.
1797 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
1798 is_func_descriptor fields.
1799 (link_hash_newfunc): Init them.
1800 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
1801 dot are candidates for plt entries. When processing .opd relocs,
1802 set function descriptor strings to point inside function code
1803 string, and set new ppc_link_hash_entry fields.
1804 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
1805 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
1806 function descriptors. It's now done in..
1807 (func_desc_adjust): New.
1808 (ppc64_elf_func_desc_adjust): New.
1809 (define elf_backend_always_size_sections): Define.
1810 (ppc64_elf_hide_symbol): New.
1811 (define elf_backend_hide_symbol): Define.
1812 (allocate_dynrelocs): Remove code looking up function descriptors
1813 as that has been done earlier.
1814 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
1816 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
1817 up function descriptor.
1818 (build_one_stub): Look up the function code sym. Check for
1819 invalid plt offsets.
1820 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
1821 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
1823 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
1825 (_bfd_elf_link_hash_hide_symbol): Likewise.
1826 * elflink.h (elf_link_add_object_symbols): Adjust call to
1827 elf_backend_hide_symbol.
1828 (elf_fix_symbol_flags): Likewise.
1829 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
1831 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
1832 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
1833 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1834 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
1835 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
1837 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
1838 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
1839 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1843 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
1844 dynamic function descriptor symbol, not the associated function
1849 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
1853 * po/bfd.pot: Regenerate.
1854 * po/fr.po: Regenerate.
1858 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
1859 Remove "Elf_Internal_Shdr *" param.
1860 (_bfd_mips_elf_section_from_bfd_section): Ditto.
1861 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
1862 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
1863 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
1864 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
1865 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
1866 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
1867 function to override special sections. Remove hdr arg from
1868 backend call, and don't loop.
1872 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
1873 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
1874 relocations requiring gp0 and gp.
1878 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
1880 (elf32_arm_print_private_bfd_data): Likewise.
1884 * po/tr.po: Import new version.
1888 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
1889 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
1890 (ORI_R0_R0_0): Correct.
1894 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
1895 when plt_not_loaded.
1896 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
1897 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
1898 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
1899 (ppc64_elf_glink_code): Delete.
1900 (PPC64_ELF_GLINK_SIZE): Delete.
1901 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
1902 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
1903 ORI_R0_R0_0): Define.
1904 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
1905 (struct ppc_link_hash_table): Add sstub and plt_overflow.
1906 (ppc64_elf_link_hash_table_create): Init them.
1907 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
1908 Don't copy to shared lib.
1909 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
1910 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
1911 (allocate_dynrelocs <plt>): Don't change function sym here. Make
1912 room for .stub and .glink code.
1913 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
1915 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
1916 bfd_elf64_bfd_final_link.
1917 (bfd_elf64_bfd_final_link): Don't define.
1918 (ppc64_elf_size_stubs): New.
1919 (build_plt_stub): New.
1920 (build_one_stub): New.
1921 (ppc64_elf_build_stubs): New.
1922 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
1923 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
1924 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
1925 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
1926 case output sections not separate. Adjust DT_RELASZ to not
1927 include plt relocs. Set reserved got entry. Set got and plt
1929 (elf_backend_got_header_size): Set to 8.
1930 * elf64-ppc.h: New file.
1934 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
1935 sections, use bfd_section_list_remove.
1936 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1937 * elflink.h (elf_link_add_object_symbols): When removing all
1938 sections, use bfd_section_list_clear.
1942 * po/sv.po: New file: Swedish translation.
1943 * configure.in (ALL_LINGUAS): Add sv.
1944 * configure: Regenerate.
1948 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
1949 * elf.c (merge_sections_remove_hook): New function.
1950 (_bfd_elf_merge_sections): Pass it as 3rd argument to
1951 _bfd_merge_sections.
1952 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
1953 * libbfd.h: Rebuilt.
1954 * merge.c (_bfd_merge_sections): Add remove_hook argument.
1955 Call remove_hook if a SEC_EXCLUDE section is encountered.
1959 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
1960 (xstormy16_reloc_map): Initialise new field with correct howto
1962 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
1967 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
1968 (elfcore_write_pstatus): Use long instead of pid_t;
1969 * elf-bfd.h: Change prototypes to use long instead of pid_t;
1973 * elf.c: Update copyright years.
1974 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
1975 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
1979 Add capability to write corefile note sections, for gdb.
1980 * elf.c (elfcore_write_note): New function.
1981 (elfcore_write_prpsinfo): New function.
1982 (elfcore_write_prstatus): New function.
1983 (elfcore_write_pstatus): New function.
1984 (elfcore_write_prfpreg): New function.
1985 (elfcore_write_prxfpreg): New function.
1986 * elf-bfd.h: Add prototypes for above functions.
1990 * elf.c (elf_fake_sections): Propagate errors from
1991 elf_backend_fake_section.
1995 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
1996 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
1997 (elf32-sh-nbsd.lo): New rule.
1998 * Makefile.in: Regenerate.
1999 * config.bfd (sh*le-*-netbsdelf*): New target.
2000 (sh*-*-netbsdelf*): New target.
2001 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
2002 (bfd_elf32_shnbsd_vec): New vector.
2003 (bfd_elf32_shlnbsd_vec): New vector.
2004 * configure: Regenerate.
2005 * elf32-sh-nbsd.c: New file.
2006 * targets.c: Update copyright years.
2007 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
2008 bfd_elf32_shnbsd_vec.
2012 * coff-rs6000.c (READ20): Use bfd_scan_vma.
2016 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
2017 of a symbol in a section that will be deleted.
2021 * po/es.po: New file: Spanish translation.
2022 * configure.in (ALL_LINGUAS): Add es.
2023 * configure: Regenerate.
2027 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
2028 argument so we can handle HP-UX specially.
2029 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
2030 (elfNN_hpux_backend_section_from_bfd_section): New for support
2031 of SHN_IA_64_ANSI_COMMON.
2032 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
2033 (is_unwind_section_name): Add special HP-UX support.
2034 (elfNN_ia64_section_from_shdr): Add support for more sections.
2035 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
2036 add support for more sections.
2037 (elfNN_ia64_additional_program_headers): Modify
2038 is_unwind_section_name call.
2039 (elfNN_ia64_modify_segment_map): Remove assumption that there is
2040 only one unwind section in segment.
2044 * syms.c (_bfd_generic_make_empty_symbol): New function.
2045 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
2046 _bfd_generic_make_empty_symbol.
2047 * libbfd.h: Regenerate.
2048 * bfd-in2.h: Regenerate.
2049 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
2050 (hppabsd_core_get_symtab_upper_bound): Don't define.
2051 (hppabsd_core_get_symtab): Likewise.
2052 (hppabsd_core_print_symbol): Likewise.
2053 (hppabsd_core_get_symbol_info): Likewise.
2054 (hppabsd_core_bfd_is_local_label_name): Likewise.
2055 (hppabsd_core_get_lineno): Likewise.
2056 (hppabsd_core_find_nearest_line): Likewise.
2057 (hppabsd_core_bfd_make_debug_symbol): Likewise.
2058 (hppabsd_core_read_minisymbols): Likewise.
2059 (hppabsd_core_minisymbol_to_symbol): Likewise.
2060 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
2062 * hpux-core.c: Similarly.
2063 * irix-core.c: Similarly.
2064 * osf-core.c: Similarly.
2065 * sco5-core.c: Similarly.
2066 * binary.c (binary_make_empty_symbol): Remove function, define as
2067 _bfd_generic_make_empty_symbol.
2068 * ihex.c (ihex_make_empty_symbol): Likewise.
2069 * mmo.c (mmo_make_empty_symbol): Likewise.
2070 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
2071 * srec.c (srec_make_empty_symbol): Likewise.
2072 * versados.c (versados_make_empty_symbol): Likewise.
2073 * vms.c (_bfd_vms_make_empty_symbol): Remove.
2074 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
2075 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
2076 rather than _bfd_vms_make_empty_symbol.
2077 * vms-misc.c (new_symbol): Likewise.
2081 * section.c (bfd_section_init): Remove unnecessary initialisations.
2082 (bfd_section_list_clear): New function.
2083 (bfd_section_list_remove, bfd_section_list_insert): New macros.
2084 (_bfd_strip_section_from_output): Use them.
2085 * coffcode.h (coff_set_alignment_hook): Likewise.
2086 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
2087 * elf64-mips.c (mips_elf64_final_link): Likewise.
2088 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2089 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2090 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2091 * bfd-in2.h: Regenerate.
2093 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
2094 rather than doing our own section handling. Clean up after errors
2095 with bfd_release and bfd_section_list_clear. Handle unexpected
2097 * aoutf1.h (sunos4_core_file_p): Likewise.
2098 * aix386-core.c (aix386_core_file_p): Likewise.
2099 * cisco-core.c (cisco_core_file_validate): Likewise.
2100 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2101 * trad-core.c (trad_unix_core_file_p): Likewise.
2103 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
2104 with bfd_release and bfd_section_list_clear.
2105 * hpux-core.c (hpux_core_core_file_p): Likewise.
2106 * irix-core.c (irix_core_core_file_p): Likewise.
2107 * lynx-core.c (lynx_core_file_p): Likewise.
2108 * osf-core.c (osf_core_core_file_p): Likewise.
2109 * rs6000-core.c (rs6000coff_core_p): Likewise.
2110 * sco5-core.c (sco5_core_file_p): Likewise.
2112 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
2113 sign extension adjustments without conditionals.
2117 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
2118 CIE at .eh_frame start is removed due to no FDEs referencing it.
2122 * config.bfd (x86_64-*-netbsd*): New target.
2123 * configure.in (x86_64-*-netbsd*): Set COREFILE
2125 * configure: Regenerated.
2129 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
2130 for recent bfd_make_section_anyway change.
2134 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2135 R_ARM_THM_PC11 reloc.
2139 * configure.in (LINGUAS): Add ja.
2140 * configure: Regenerate.
2141 * po/ja.po: Import from translation project's web site.
2145 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
2146 messages to ease translation into other languages.
2148 For older changes see ChangeLog-0001
2154 version-control: never