3 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
4 calculation of DT_RELSZ to occur after all dynamic relocations
9 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
10 * config.in, configure: Regenerate.
15 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
16 stop processing of options if one of invalid size is
18 (_bfd_mips_elf_section_from_shdr): Likewise.
19 (_bfd_mips_elf_fake_sections): Reset the type of empty special
24 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
25 plt_old_section, plt_old_value.
26 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
27 (elf64_alpha_size_plt_section_1): Don't use it.
31 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
32 first shdr has sh_size == 0. Fail if e_shnum is large to cause
33 arithmetic overflow when allocating the i_shdr array.
34 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
38 * elf64-alpha.c: Update all function definitions to ISO C. Remove
39 all function prototypes; rearrange functions into def-use order.
43 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
44 in the presence of deleting elements.
45 (elf64_alpha_size_got_sections): Zero dead got section size.
49 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
50 (struct funcinfo): Add caller_func, caller_file, caller_line.
51 tag, and nesting_level members.
52 (lookup_address_in_function_table): Change first passed parameter
53 from "struct funcinfo *" to "struct comp_unit *".
54 (lookup_address_in_function_table): Dereference unit to find function
56 (lookup_address_in_function_table): Traverse the function list to
57 create a chain of inlined functions back to the first non inlined
59 (scan_unit_for_functions): Remember tag and nesting level. Handle
60 DW_AT_call_file and DW_AT_call_line.
61 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
62 call to pass unit pointer instead of function table pointer. For
63 inlined functions, save pointer to the inliner chain.
64 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
65 (_bfd_dwarf2_find_inliner_info): New function that returns information
66 from the inliner chain after a call to bfd_find_nearest_line.
68 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
69 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
70 NAME##_find_inliner_info.
71 (bfd_target): Add _bfd_find_inliner_info.
72 * bfd-in2.h: Regenerate.
74 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
75 macro that always returns bfd_false.
76 (_bfd_dwarf2_find_inliner_info): Declare.
77 * libbfd.h: Regenerate.
79 * elf32-arm.c (elf32_arm_find_inliner_info): New function
80 that calls _bfd_dwarf2_find_inliner_info.
81 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
83 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
84 that calls _bfd_dwarf2_find_inliner_info.
85 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
86 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
87 _bfd_mips_elf_find_inliner_info.
88 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
89 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
91 * elf.c (_bfd_elf_find_inliner_info): New function that calls
92 _bfd_dwarf2_find_inliner_info.
93 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
94 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
95 _bfd_elf_find_inliner_info.
97 * coffgen.c (coff_find_inliner_info): New function that
98 calls _bfd_dwarf2_find_inliner_info.
99 * libcoff-in.h (coff_find_inliner_info): Declare.
100 * libcoff.h: Regenerate.
101 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
102 (pmac_xcoff_vec) Ditto.
103 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
104 (aix5coff64_vec): Ditto.
106 * aout-target.h (MY_find_inliner_info): Define as
107 _bfd_nosymbols_find_inliner_info.
108 * aout-tic30.c (MY_find_inliner_info): Ditto.
109 * binary.c (binary_find_inliner_info): Ditto.
110 * i386msdos.c (msdos_find_inliner_info): Ditto.
111 * ihex.c (ihex_find_inliner_info): Ditto.
112 * libaout.h (aout_32_find_inliner_info): Ditto.
113 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
114 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
115 * mmo.c (mmo_find_inliner_info): Ditto.
116 * nlm-target.h (nlm_find_inliner_info): Ditto.
117 * pef.c (bfd_pef_find_inliner_info): Ditto.
118 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
119 * srec.c (srec_find_inliner_info): Ditto.
120 * tekhex.c (tekhex_find_inliner_info): Ditto.
121 * versados.c (versados_find_inliner_info): Ditto.
122 * xsym.c (bfd_sym_find_inliner_info): Ditto.
124 * ieee.c (ieee_find_inliner_info): New function that always
126 * oasys.c (oasys_find_inliner_info): Ditto.
127 * vms.c (vms_find_inliner_info): Ditto.
131 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
132 force old plt layout.
136 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
138 (elf64_alpha_check_relocs): Likewise.
139 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
140 non-allocated sections.
144 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
145 undefweak to use zero register. Call elf64_alpha_relax_got_load
146 if not all uses removed.
147 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
148 (elf64_alpha_relax_section): Handle undefweak symbols.
149 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
150 (elf64_alpha_size_rela_got_1): Likewise.
151 (elf64_alpha_relocate_section): Likewise.
155 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
156 on SEC_CODE sections.
160 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
162 (som_write_space_strings): Change type of tmp_space and p to char *.
163 (som_write_symbol_strings): Likewise. Also change type of comp to
165 (som_begin_writing): Change type of strings_size to unsigned int.
166 (som_finish_writing): Likewise.
167 (som_slurp_reloc_table): Change type of external_relocs to unsigned
169 * som.h (struct som_section_data_struct): Change type of reloc_stream
170 field to unsigned char *.
174 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
175 copy relocations for VxWorks.
179 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
181 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
182 (ppc_elf_check_relocs): Set has_sda_refs.
183 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
184 copy relocations. Use has_sda_refs to place variables in .sbss.
185 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
190 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
191 xtensa_default_isa is initialized.
195 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
196 for second and subsequent list entries. Only allocate multiple
197 glink stubs when shared or pie.
198 (ppc_elf_finish_dynamic_symbol): Break out early when only one
199 glink stub is needed.
203 * Makefile.am: Have 'all' depend on 'info'.
204 * Makefile.in: Regenerate.
208 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
209 init_offset. Add init_got_refcount, init_plt_refcount,
210 init_got_offset and init_plt_offset.
211 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
212 (_bfd_elf_link_hash_hide_symbol): Likewise.
213 (_bfd_elf_link_hash_table_init): Likewise.
214 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
215 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
216 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
217 (bfd_elf_size_dynamic_sections): Likewise.
218 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
219 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
220 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
221 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
222 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
223 (struct plt_entry): New.
224 (ppc_elf_link_hash_table_create): Set new init_plt fields.
225 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
226 use _bfd_elf_link_hash_copy_indirect.
227 (update_plt_info, find_plt_ent): New functions.
228 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
229 and adjust for use of plt list rather than refcount.
230 (ppc_elf_gc_sweep_hook): Likewise.
231 (ppc_elf_tls_optimize): Likewise.
232 (ppc_elf_adjust_dynamic_symbol): Likewise.
233 (allocate_dynrelocs): Likewise.
234 (ppc_elf_relax_section): Likewise.
235 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
236 when performing a relocatable link.
237 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
238 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
243 * elf.c (assign_file_positions_for_segments): Use maximum of
244 maxpagesize and section alignment when adjusting initial
245 segment offset and section offsets.
249 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
254 * elf.c (group_signature): Undo the last change. Check if the
255 symbol table section is correct.
259 * elf32-arm.c: Wherever possible, use official reloc names
261 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
262 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
263 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
264 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
265 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
266 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
267 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
268 Add many new relocations from AAELF.
269 (elf32_arm_howto_from_type): Update to match.
270 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
271 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
272 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
273 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
274 (elf32_arm_final_link_relocate): Add support for
275 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
276 case entries redundant with default.
278 * reloc.c: Reorganize ARM relocations. Add Thumb
279 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
280 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
281 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
282 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
283 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
284 * bfd-in2.h, libbfd.h: Regenerate.
288 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
290 * format.c (bfd_check_format_matches): Set output_has_begun
292 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
293 special case for both_direction.
297 * elf.c (group_signature): Check for a group section which is
298 actually a (corrupt) symbol table section in disguise and prevent
299 an infinite loop from occurring.
303 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
308 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
309 predicate on slot 0 only if slot 0 isn't br.
314 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
315 empty sdynbss section.
316 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
320 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
325 * elf32-ppc.c (LIS_11. LIS_12): Define.
326 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
327 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
328 for --data-plt when building non-pie executables.
332 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
333 the situation where a symbols's section is not known but a section
334 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
337 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
338 the presence of a symbol table to just before the symbol table is
344 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
345 (elfNN_ia64_relax_section): Use it.
349 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
354 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
356 (ppc_elf_finish_dynamic_sections): Likewise.
360 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
365 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
366 periods in linkonce_kind values.
370 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
371 against protected function when building executable.
375 * elf32-ppc.c (LWZU_0_X_11): Delete.
376 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
377 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
378 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
380 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
382 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
383 Generate .glink branch table and updated stubs.
387 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
388 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
389 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
390 (CROR_151515, CROR_313131): Delete.
391 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
392 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
393 LWZU_0_X_11): Define.
394 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
395 and R_PPC_REL16_HA entries.
396 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
397 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
398 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
399 new_plt, and old_plt.
400 (ppc_elf_create_dynamic_sections): Create .glink section.
401 (ppc_elf_check_relocs): Set new_plt and old_plt.
402 (ppc_elf_select_plt_layout): New function.
403 (ppc_elf_tls_setup): Set plt output section elf type and flags.
404 (allocate_got): Handle differences between old and new got layout.
405 (allocate_dynrelocs): Likewise for plt.
406 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
407 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
408 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
409 destination of R_PPC_PLTREL24 relocs.
410 (ppc_elf_relocate_section): Handle new relocs and changed destination
412 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
413 differences in layout.
414 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
415 put a blrl in new got. Write glink contents.
416 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
417 * libbfd.h: Regenerate.
418 * bfd-in2.h: Regenerate.
422 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
427 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
428 section if SEC_ALLOC isn't set.
432 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
433 * acinclude.m4: Don't sinclude accross.m4.
434 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
438 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
439 (ppc64_elf_add_symbol_hook): Set has_dotsym.
440 (ppc64_elf_check_directives): Only process syms when has_dotsym.
441 (func_desc_adjust): Hide fake function descriptors when function
442 code entry is defined.
443 (adjust_opd_syms): Adjust for deleted_section becoming union field.
447 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
451 * coff-tic80.c: Undefine _CONST after system headers to prevent
452 clash with tic80-specific definition in include/coff/tic80.h
457 * elflink.c (elf_link_output_extsym): Use output_bfd if
458 h->root.u.def.section is bfd_abs_section_ptr when reporting
463 * elf-bfd.h (elf_backend_data): Update special_sections to
464 array of pointer to bfd_elf_special_section.
465 * elf.c (special_sections): Likewise.
466 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
467 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
468 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
469 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
470 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
471 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
472 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
473 * elf32-v850.c (v850_elf_special_sections): Likewise.
474 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
475 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
476 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
477 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
478 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
479 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
480 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
481 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
483 * elf.c (get_special_section): Updated.
487 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
488 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
489 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
491 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
492 * elf32-frv.c (_frv_create_got_section): Likewise.
493 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
494 (elf_backend_got_symbol_offset): Don't define.
495 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
496 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
498 (ppc_elf_create_got): Tidy.
499 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
500 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
501 (ppc_elf_gc_sweep_hook): Likewise.
502 (ppc_elf_relocate_section): Likewise.
503 (ppc_elf_finish_dynamic_symbol): Likewise.
504 (allocate_got): New function.
505 (allocate_dynrelocs): Use allocate_got.
506 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
507 so that local got can refcount it. Set got_header_size.
508 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
510 (ppc_elf_finish_dynamic_sections): Likewise.
511 (elf_backend_got_symbol_offset): Don't define.
512 (elf_backend_got_header_size): Ditto.
516 * configure.in (ACX_HEADER_STRING): New.
517 * configure: Regenerate.
518 * config.in: Regenerate.
519 * sysdep.h (STRING_WITH_STRINGS): Use.
523 * elf.c (_bfd_elf_close_and_cleanup): Only call
524 _bfd_dwarf2_cleanup_debug_info on bfd_object.
528 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
529 "__bss_start" instead of "_edata" as fallback.
533 * bfd-in2.h: Regenerated.
537 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
538 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
540 * configure: Regenerate.
541 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
542 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
543 (elf32-i386.lo): Depend on elf-vxworks.h.
544 (elf-vxworks.lo): New rule.
545 * Makefile.in: Regenerate.
546 * elf-bfd.h (elf_backend_data): Update type of
547 elf_backend_emit_relocs.
548 (_bfd_elf_link_output_relocs): Update prototype.
549 * elflink.c (_bfd_elf_link_output_relocs): Always use
550 bed->elf_backend_emit_relocs when outputting relocations.
551 * elfxx-target.h (elf_backend_emit_relocs): Default to
552 _bfd_elf_link_output_relocs.
553 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
554 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
555 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
556 (elf_i386_plt0_entry): Remove padding.
557 (elf_i386_pic_plt0_entry): Ditto.
558 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
559 (PLT_NON_JUMP_SLOT_RELOCS): Define.
560 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
561 plt0_pad_byte fields.
562 (elf_i386_link_hash_table_create): Zero them.
563 (elf_i386_create_dynamic_sections): Create static relocation section.
564 (allocate_dynrelocs): Allocate space for static PLT relocations.
565 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
566 symbols. Give PLT symbols function type. Don't strip PLT sections
567 if we have exported symbols from them.
568 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
569 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
571 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
572 Add relocation for GOT location. Fill in PLT static relocations.
573 (elf_i386_vxworks_link_hash_table_create): New function.
574 (elf_i386_vxworks_link_output_symbol_hook): New function.
575 * elf-vxworks.h: New file.
579 * section.c (bfd_make_section_anyway_with_flags): New.
580 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
581 (bfd_make_section_with_flags): New.
582 (bfd_make_section): Call bfd_make_section_with_flags.
584 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
585 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
586 instead of bfd_make_section/bfd_make_section and don't call
587 bfd_set_section_flags.
588 (mn10300_elf_check_relocs): Likewise.
589 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
590 * elf32-arm.c (create_got_section): Likewise.
591 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
592 (elf32_arm_check_relocs): Likewise.
593 * elf32-cris.c (cris_elf_check_relocs): Likewise.
594 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
595 (_frv_create_got_section): Likewise.
596 (elf32_frvfdpic_create_dynamic_sections): Likewise.
597 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
598 (elf32_hppa_check_relocs): Likewise.
599 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
600 (i370_elf_check_relocs): Likewise.
601 * elf32-i386.c (create_got_section): Likewise.
602 (elf_i386_check_relocs): Likewise.
603 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
604 (create_got_section): Likewise.
605 (m32r_elf_create_dynamic_sections): Likewise.
606 (m32r_elf_check_relocs): Likewise.
607 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
608 * elf32-ppc.c (ppc_elf_create_got): Likewise.
609 (ppc_elf_create_dynamic_sections): Likewise.
610 (ppc_elf_add_symbol_hook): Likewise.
611 (ppc_elf_check_relocs): Likewise.
612 * elf32-s390.c (create_got_section): Likewise.
613 (elf_s390_check_relocs): Likewise.
614 * elf32-sh.c (create_got_section): Likewise.
615 (sh_elf_create_dynamic_sections): Likewise.
616 (sh_elf_check_relocs): Likewise.
617 * elf32-vax.c (elf_vax_check_relocs): Likewise.
618 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
619 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
620 (add_extra_plt_sections): Likewise.
621 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
622 (elf64_alpha_create_got_section): Likewise.
623 (elf64_alpha_create_dynamic_sections): Likewise.
624 (elf64_alpha_check_relocs): Likewise.
625 * elf64-hppa.c (get_reloc_section): Likewise.
629 (get_stub): Likewise.
630 (elf64_hppa_create_dynamic_sectionso): Likewise.
631 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
632 * elf64-ppc.c (create_linkage_sections): Likewise.
633 (ppc64_elf_check_relocs): Likewise.
634 * elf64-s390.c (create_got_section): Likewise.
635 (elf_s390_check_relocs): Likewise.
636 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
637 (sh64_elf64_create_dynamic_sections): Likewise.
638 * elf64-x86-64.c (create_got_section): Likewise.
639 (elf64_x86_64_check_relocs): Likewise.
640 * elflink.c (_bfd_elf_create_got_section): Likewise.
641 (_bfd_elf_link_create_dynamic_sections): Likewise.
642 (elf_link_add_object_symbols): Likewise.
643 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
644 (elfNN_ia64_create_dynamic_sections): Likewise.
645 (get_fptr): Likewise.
646 (get_pltoff): Likewise.
647 (get_reloc_section): Likewise.
648 (elfNN_ia64_object_p): Likewise.
649 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
650 (mips_elf_create_compact_rel_section): Likewise.
651 (mips_elf_create_got_section): Likewise.
652 (_bfd_mips_elf_create_dynamic_sections): Likewise.
653 * elfxx-sparc.c (create_got_section): Likewise.
654 (_bfd_sparc_elf_check_relocs): Likewise.
656 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
657 on linker created sections.
662 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
663 script on executable.
667 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
668 allocated memory before returning.
669 (decode_line_info): Likewise.
670 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
671 allocated by functions in this file.
672 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
673 * elf.c (_bfd_elf_close_and_cleanup): Call
674 _bfd_dwarf2_cleanup_debug_info.
678 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
679 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
680 * configure, config.in, Makefile.in: Regenerate.
681 * sysdep.h (stpcpy): Revert last change.
685 * sysdep.h (stpcpy): Wrap declaration in parentheses.
689 * elfxx-ia64.c (ARCH_SIZE): New.
690 (LOG_SECTION_ALIGN): Likewise.
691 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
692 align relocation sections.
693 (get_fptr): Likewise.
694 (get_reloc_section): Likewise.
695 (elfNN_ia64_tprel_base): Likewise.
696 (elfNN_ia64_check_relocs): Support 32bit relocations.
697 (allocate_global_fptr_got): Likewise.
698 (allocate_dynrel_entries): Likewise.
699 (set_got_entry): Likewise.
700 (set_pltoff_entry): Likewise.
701 (elfNN_ia64_relocate_section): Likewise.
705 * configure.in: Add AC_CHECK_DECLS(stpcpy).
706 * configure: Regenerate.
707 * config.in: Likewise.
709 * sysdep.h (stpcpy): New.
713 * Update the address and phone number of the FSF organization in
714 the GPL notices in the following files:
715 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
716 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
717 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
718 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
719 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
720 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
721 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
722 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
723 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
724 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
725 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
726 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
727 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
728 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
729 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
730 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
731 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
732 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
733 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
734 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
735 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
736 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
737 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
738 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
739 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
740 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
741 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
742 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
743 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
744 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
745 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
746 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
747 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
748 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
749 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
750 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
751 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
752 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
753 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
754 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
755 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
756 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
757 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
758 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
759 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
760 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
761 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
762 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
763 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
764 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
765 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
766 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
767 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
768 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
769 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
770 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
771 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
772 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
773 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
774 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
775 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
776 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
777 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
778 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
779 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
780 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
781 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
782 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
783 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
784 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
789 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
790 * bfd-in2.h: Regenerated.
792 * elflink.c (bfd_elf_set_symbol): New.
793 (_bfd_elf_provide_symbol): Call it.
794 (_bfd_elf_provide_section_bound_symbols): New.
798 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
799 at the end, if a strong definition has already been seen.
803 * section.c (struct bfd_section): Replace link_order_head and
804 link_order_tail with map_head and map_tail union.
805 (STD_SECTION): Update.
806 (_bfd_strip_section_from_output): Delete.
807 * aoutx.h: Update throughout for above changes.
808 * coff-ppc.c: Likewise.
809 * cofflink.c: Likewise.
811 * elf-eh-frame.c: Likewise.
812 * elf-m10300.c: Likewise.
814 * elf32-arm.c: Likewise.
815 * elf32-cris.c: Likewise.
816 * elf32-hppa.c: Likewise.
817 * elf32-i386.c: Likewise.
818 * elf32-m32r.c: Likewise.
819 * elf32-m68hc1x.c: Likewise.
820 * elf32-m68k.c: Likewise.
821 * elf32-ppc.c: Likewise.
822 * elf32-s390.c: Likewise.
823 * elf32-sh.c: Likewise.
824 * elf32-vax.c: Likewise.
825 * elf32-xtensa.c: Likewise.
826 * elf64-alpha.c: Likewise.
827 * elf64-hppa.c: Likewise.
828 * elf64-ppc.c: Likewise.
829 * elf64-s390.c: Likewise.
830 * elf64-sh64.c: Likewise.
831 * elf64-x86-64.c: Likewise.
832 * elflink.c: Likewise.
833 * elfxx-ia64.c: Likewise.
834 * elfxx-mips.c: Likewise.
835 * elfxx-sparc.c: Likewise.
836 * linker.c: Likewise.
839 * xcofflink.c: Likewise.
840 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
841 out from bfd_elf_size_dynamic_sections.
842 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
843 * bfd-in2.h: Regenerate.
847 * section.c (bfd_section_list_remove): Don't clear s->next.
848 (bfd_section_list_append): Always init s->prev.
849 (bfd_section_list_prepend): Define.
850 (bfd_section_list_insert_after): Minor optimization.
851 (bfd_section_removed_from_list): Rewrite.
852 * elf.c (assign_section_numbers): Simplify list traversal now that
853 bfd_section_list_remove doesn't destroy removed section next ptr.
854 * sunos.c (sunos_add_dynamic_symbols): Likewise.
855 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
856 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
857 * bfd-in2.h: Regenerate.
861 * bfd.c (bfd): Remove section_tail and add section_last.
862 (bfd_preserve): Likewise.
863 (bfd_preserve_save): Likewise.
864 (bfd_preserve_restore): Likewise.
865 * opncls.c (_bfd_new_bfd): Likewise.
867 * coffcode.h (coff_compute_section_file_positions): Updated.
868 (coff_compute_section_file_positions): Likewise.
869 * elf.c (assign_section_numbers): Likewise.
870 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
871 * elf64-mmix.c (mmix_elf_final_link): Likewise.
872 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
873 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
874 * sunos.c (sunos_add_dynamic_symbols): Likewise.
875 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
877 * ecoff.c (bfd_debug_section): Initialize prev.
879 * section.c (bfd_section): Add prev.
880 (bfd_section_list_remove): Updated.
881 (bfd_section_list_append): New.
882 (bfd_section_list_insert_after): New.
883 (bfd_section_list_insert_before): New.
884 (bfd_section_list_insert): Removed.
885 (bfd_section_removed_from_list): Updated.
886 (STD_SECTION): Initialize prev.
887 (bfd_section_init): Updated.
888 (bfd_section_list_clear): Updated.
890 * bfd-in2.h: Regenerated.
894 * elf.c (_bfd_elf_new_section_hook): Don't call
895 _bfd_elf_get_sec_type_attr on sections from input files.
899 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
900 hash table size 16699 instead of bfd_hash_table_init.
904 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
905 definition has already been seen.
909 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
910 R_ARM_PLT32 the same as R_ARM_PC24.
911 (arm_add_to_rel): Ditto.
915 * config.bfd: Add h8300*-*-rtemscoff.
916 Switch h8300*-*-rtems* to elf.
920 * aclocal.m4, Makefile.in: Regnerated.
924 Merge changes only applied to Makefile.in.
925 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
926 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
927 (elfxx-sparc.lo): New rule.
928 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
929 (elf64-sparc.lo): Likewise.
933 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
938 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
940 * elf.c (bfd_elf_sym_name): Updated.
941 (group_signature): Likewise.
942 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
943 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
944 (ppc64_elf_edit_toc): Likewise.
945 (ppc64_elf_relocate_section): Likewise.
946 * elfcode.h (elf_slurp_symbol_table): Likewise.
947 * elflink.c (elf_link_input_bfd): Likewise.
949 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
950 bfd_elf_sym_name to get local symbol name when reporting errors.
954 * elflink.c (elf_link_input_bfd): Handle the case where a badly
955 formatted input file results in a reloc which has no associated
960 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
964 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
965 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
966 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
972 * elflink.c (elf_link_input_bfd): Make non-debugging reference
973 to discarded section an error.
977 * configure.in: Replace BFD_NEED_DECLARATION checks by the
978 corresponding AC_CHECK_DECLS.
979 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
981 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
982 * configure: Regenerate.
987 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
988 unsigned from type of dynamic_interpreter.
989 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
992 * elf.c (assign_section_numbers): Fix comment.
996 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
997 for struct som_exec_auxhdr fields.
1001 * aout-adobe.c: Convert to ISO C and fix formatting.
1002 * aout-arm.c: Convert to ISO C and fix formatting.
1003 * aout-cris.c: Convert to ISO C and fix formatting.
1004 * aout-ns32k.c: Convert to ISO C and fix formatting.
1005 * aout-tic30.c: Convert to ISO C and fix formatting.
1006 * coffcode.h: Convert to ISO C and fix formatting.
1007 * coffswap.h: Convert to ISO C and fix formatting.
1008 * i386aout.c: Convert to ISO C and fix formatting.
1009 * libaout.h: Convert to ISO C and fix formatting.
1010 * libcoff-in.h: Convert to ISO C and fix formatting.
1011 * libcoff.h: Convert to ISO C and fix formatting.
1012 * libecoff.h: Convert to ISO C and fix formatting.
1013 * libnlm.h: Convert to ISO C and fix formatting.
1014 * libpei.h: Convert to ISO C and fix formatting.
1015 * libxcoff.h: Convert to ISO C and fix formatting.
1016 * nlm-target.h: Convert to ISO C and fix formatting.
1017 * nlm.c: Convert to ISO C and fix formatting.
1018 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1019 * nlm32-i386.c: Convert to ISO C and fix formatting.
1020 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1021 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1022 * nlmcode.h: Convert to ISO C and fix formatting.
1023 * nlmswap.h: Convert to ISO C and fix formatting.
1024 * pe-mips.c: Convert to ISO C and fix formatting.
1025 * peXXigen.c: Convert to ISO C and fix formatting.
1026 * peicode.h: Convert to ISO C and fix formatting.
1027 * vms-gsd.c: Convert to ISO C and fix formatting.
1028 * vms-hdr.c: Convert to ISO C and fix formatting.
1029 * vms-misc.c: Convert to ISO C and fix formatting.
1030 * vms-tir.c: Convert to ISO C and fix formatting.
1031 * vms.c: Convert to ISO C and fix formatting.
1032 * vms.h: Convert to ISO C and fix formatting.
1034 * coffgen.c (coff_print_symbol): Restore correct formatting of
1039 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1040 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1041 (allocate_dynrelocs): Likewise.
1045 * configure.in: Fix the check for basename declaration. Add check
1046 for declarations of ftello, ftello64, fseeko, fseeko64.
1047 * configure: Regenerate.
1049 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1053 * elfxx-sparc.c: New file.
1054 * elfxx-sparc.h: New file.
1055 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1056 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1057 (elfxx-sparc.lo): New rule.
1058 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1059 (elf64-sparc.lo): Likewise.
1060 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1061 (bfd_elf64_sparc_vec): Likewise.
1062 * configure: Regenerate.
1063 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1064 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1065 which is more consistent with elf32-sparc.c
1069 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1070 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1074 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1075 dynamic relocs in non-SEC_ALLOC sections.
1076 (ppc_elf_gc_sweep_hook): Likewise.
1077 (ppc_elf_relax_section): Likewise.
1078 (ppc_elf_relocate_section): Likewise.
1082 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1083 assigning a value to return_value.
1088 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1094 * elf.c (setup_group): Properly handle zero group count.
1098 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1099 (som_is_subspace, compare_subspaces, som_compute_checksum)
1100 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1102 (hppa_som_reloc, compare_syms, compare_subspaces)
1103 (som_print_symbol, som_get_section_contents)
1104 (som_set_section_contents): Remove space after 'void *'.
1105 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1106 (som_bfd_merge_private_bfd_data)
1107 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1112 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1113 * bfd-in2.h: Regenerate.
1114 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1115 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1116 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1117 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1118 relocations if requested to.
1119 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1120 use_blx rather than symbian_p.
1121 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1122 use_blx is in effect.
1123 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1128 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1134 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1135 used as a list pointer.
1139 * Makefile.am (NO_WERROR): Define.
1140 * warning.m4: New file
1141 * acinclude.m4: Include warning.m4.
1142 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1143 * Makefile.in: Regenerate.
1144 * configure: Regenerate.
1148 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1149 Write trailing padding.
1151 * merge.c (merge_strings): Round up section size for alignment.
1155 Add TLS support for 64-bit Sparc ELF.
1156 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1157 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1158 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1159 sparc64_elf_hash_entry, sparc64_elf_tdata,
1160 sparc64_elf_local_got_tls_type): New defines.
1161 (sparc64_elf_mkobject): New function.
1162 (sparc64_elf_link_hash_table): Add members for dynamic linker
1163 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1164 uion to track TLS GOT references. Add sym_sec to cache
1165 mappings from local sym to section.
1166 (link_hash_newfunc): New function.
1167 (sparc64_elf_bfd_link_hash_table_create): Rename to
1168 sparc64_elf_link_hash_table_create for consistency.
1169 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1170 (sparc64_elf_create_dynamic_sections): Initialize new section
1171 members of sparc64_elf_link_hash_table. Only init srelbss
1173 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1175 (SPARC_NOP): Define.
1176 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1177 sparc64_elf_plt_ptr_offset): Delete.
1178 (sparc64_plt_entry_build): New function to build PLT entries
1179 gradually instread of all at once at the end of linking.
1180 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1181 local vars. Get them from sparc64_elf_hash_table instead.
1182 Check early on if r_symndx is in bounds. Handle TLS transitions.
1183 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1184 For TLS relocs, record the tls_type in either
1185 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1186 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1187 to the __tls_get_addr symbol. For PLT relocs, track references
1188 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1189 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1190 symbol references, count the number of relocations needed for
1191 that symbol. For default switch case, don't error, this lets
1192 the TLS relocs not explicitly handled by this function get
1194 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1195 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1196 it from sparc64_elf_hash_table. Store the real PLT offset
1197 in h->plt.offset, and build PLT entries one at a time. Also
1198 get .dynbss section pointer from htab.
1199 (allocate_dynrelocs, readonly_dynrelocs,
1200 sparc64_omit_section_dynsym): New functions.
1201 (sparc64_elf_omit_section_dynsym): Use these new functions as
1203 (dtpoff_base, tpoff): New functions.
1204 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1205 locals, get them from sparc64_elf_hash_table. Handle TLS
1206 relocations and refcounting in main relocation loop.
1207 (sparc64_elf_finish_dynamic_symbol): Use
1208 sparc64_elf_link_hash_table. Build PLT entries as we see
1209 them. Handle TLS GOT relocations.
1210 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1211 from sparc64_elf_hash_table. Initialize only PLT header
1212 not all entries since we not build PLT entries one by one.
1213 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1214 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1215 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1219 * elflink.c (elf_link_input_bfd): Update check for removed
1224 * Makefile.am: Run "make dep-am".
1225 * Makefile.in: Regenerate.
1226 * aclocal.m4: Regenerate.
1227 * libcoff.h: Regenerate.
1231 * linker.c (_bfd_generic_link_output_symbols): Also check if
1232 the output section of an input section has been removed from
1235 * section.c (bfd_section_list_remove): Clear the next field
1236 of the removed section.
1237 (bfd_section_removed_from_list): New.
1238 * bfd-in2.h: Regenerated.
1242 * elf32-sparc.c (elf32_sparc_relocate_section,
1243 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1244 R_SPARC_TLS_LE_{HIX22,LOX10}.
1245 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1246 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1247 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1248 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1252 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1256 * aout-target.h: Convert to ISO C.
1257 * aoutf1.h: Convert to ISO C.
1258 * aoutx.h: Convert to ISO C.
1259 * bout.c: Convert to ISO C.
1260 * dwarf1.c: Convert to ISO C.
1261 * ecoffswap.h: Convert to ISO C.
1262 * freebsd.h: Convert to ISO C.
1263 * genlink.h: Convert to ISO C.
1264 * ieee.c: Convert to ISO C.
1265 * ihex.c: Convert to ISO C.
1266 * libcoff-in.h: Convert to ISO C.
1267 * mach-o.c: Convert to ISO C.
1268 * mach-o.h: Convert to ISO C.
1269 * netbsd.h: Convert to ISO C.
1270 * ns32k.h: Convert to ISO C.
1271 * ns32knetbsd.c: Convert to ISO C.
1272 * oasys.c: Convert to ISO C.
1273 * pdp11.c: Convert to ISO C.
1274 * pef-traceback.h: Convert to ISO C.
1275 * pef.c: Convert to ISO C.
1276 * pef.h: Convert to ISO C.
1277 * riscix.c: Convert to ISO C.
1278 * som.c: Convert to ISO C.
1279 * som.h: Convert to ISO C.
1280 * srec.c: Convert to ISO C.
1281 * stabs.c: Convert to ISO C.
1282 * sunos.c: Convert to ISO C.
1283 * tekhex.c: Convert to ISO C.
1284 * versados.c: Convert to ISO C.
1285 * version.h: Convert to ISO C.
1286 * xcoff-target.h: Convert to ISO C.
1287 * xcofflink.c: Convert to ISO C.
1288 * xsym.c: Convert to ISO C.
1289 * xsym.h: Convert to ISO C.
1293 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1294 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1295 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1296 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1297 (elf32_arm_to_thumb_stub): Create PIC stubs.
1298 (record_arm_to_thumb_glue): Use different stub size for relocatable
1303 * elf64-ppc.c (dec_dynrel_count): New function split out from
1304 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1305 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1306 (ppc64_elf_tls_optimize): Likewise.
1310 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1311 CORE_WCOOKIE_OFFSET.
1312 (SPARC64_WCOOKIE_OFFSET): New.
1313 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1317 * po/rw.po: New translation: Kinyarwanda
1318 * configure.in (ALL_LINGUAS): Add rw
1319 * configure: Regenerate.
1323 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1324 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1325 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1327 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1328 to check for SHT_MIPS_OPTIONS sections.
1329 (_bfd_mips_elf_set_section_contents): Likewise.
1333 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1334 Clean up gp handling code.
1338 * elf.c (bfd_elf_set_group_contents): Ignore linker created
1340 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1341 sections for relocatable files only. Remove the linker created
1343 (_bfd_elf_compute_section_file_positions): Pass link_info to
1344 assign_section_numbers.
1346 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1347 (elf_backend_object_p): Defined.
1351 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1355 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1356 dwarf_ranges_size members.
1357 (struct comp_unit): Add base_address member.
1358 (struct funcinfo): Replace low/high members with an arange.
1359 (arange_add): Replace incoming "unit" parameter with "abfd" and
1360 "first_arange" pointers. Reorganize/rewrite function body.
1361 (decode_line_info): Change arange_add call to pass bfd and arange
1363 (lookup_address_in_line_info_table): Use arange list instead of
1364 individual low/high members. Walk function's arange list to find
1365 lowest PC in list, to test for overlapping functions.
1366 (read_debug_ranges): New function, reads the debug_ranges section.
1367 (lookup_address_in_function_table): Use arange list instead of
1368 individual low/high members. Rewrite to find smallest range that
1370 (read_rangelist): Read a given rangelist from debug_ranges.
1371 (scan_unit_for_functions): Use arange list instead of individual
1372 low/high members. Handle a DW_AT_ranges attribute.
1373 (parse_comp_unit): Use arange list instead of individual low/high
1374 members. Save comp unit base address. Handle a DW_AT_ranges
1379 * elf.c (assign_section_numbers): Really use the kept section.
1383 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1385 * elf.c (assign_section_numbers): When sh_link points to a
1386 discarded section, call _bfd_elf_check_kept_section to see if
1387 the kept section can be used. Otherwise reject sh_link
1388 pointing to discarded section.
1390 * elflink.c (_bfd_elf_check_kept_section): New.
1391 (elf_link_input_bfd): Use it.
1395 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1396 that we no longer need.
1400 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1402 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
1406 * elf.c (assign_section_numbers): Fix a typo.
1410 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1412 (_bfd_elf_section_already_linked): Likewise.
1416 * config.in: Regenerate.
1420 * config.in (HAVE_DECL_BASENAME): New configure macro.
1421 * configure.in: Check for basename.
1422 * configure: Regenerate.
1426 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1427 bfd_elf32_is_arm_mapping_symbol_name.
1428 * bfd-in2.h: Regenerate.
1429 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1430 bfd_elf32_is_arm_mapping_symbol_name.
1431 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1432 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1433 (arm_elf_find_function): Likewise.
1434 (elf32_arm_output_symbol_hook): Likewise.
1438 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1439 * bfd-in2.h: Regenerate.
1440 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1441 bfd_elf32_is_arm_mapping_symbol_name.
1442 (elf32_arm_output_symbol_hook): Likewise.
1443 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1445 (is_arm_mapping_symbol_name): Function moved from here...
1446 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1451 * configure.in: Check for ffs decl and alphabetize.
1452 * config.in: Regenerate.
1453 * configure: Regenerate.
1454 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
1458 * dwarf2.c (struct comp_unit): Fix typo.
1459 (scan_unit_for_functions): Remove unused local variable "name"
1460 and dead code that set it.
1465 * bfd-in2.h, libbfd.h: Regenerated.
1466 * reloc.c: Add ARM TLS relocations.
1467 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1469 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1470 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1471 (elf32_arm_tls_ie32_howto): New.
1472 (elf32_arm_howto_from_type): Support TLS relocations.
1473 (elf32_arm_reloc_map): Likewise.
1474 (elf32_arm_reloc_type_lookup): Likewise.
1476 (struct elf32_arm_obj_tdata): New.
1477 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1478 (elf32_arm_mkobject): New function.
1479 (struct elf32_arm_relocs_copied): Add pc_count.
1480 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1481 (GOT_TLS_IE): Define.
1482 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1483 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1484 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1485 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1486 (dtpoff_base, tpoff): New functions.
1487 (elf32_arm_final_link_relocate): Handle TLS relocations.
1488 (IS_ARM_TLS_RELOC): Define.
1489 (elf32_arm_relocate_section): Warn about TLS mismatches.
1490 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1491 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1492 TLS relocations and pc_count.
1493 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1494 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1496 (elf32_arm_size_dynamic_sections): Handle TLS.
1497 (elf32_arm_finish_dynamic_symbol): Likewise.
1498 (bfd_elf32_mkobject): Define.
1502 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1503 relocation types. Don't count relocations which will use a PLT.
1507 * elf.c (elfcore_grok_nto_status): Print tid as long.
1508 (elfcore_grok_nto_regs): Likewise.
1512 * irix-core.c: Remove some unnecessary prototypes.
1516 * irix-core.c: Convert to ISO C.
1520 * irix-core.c (do_sections): Replace + by | in expression.
1521 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1522 to unused parameters to avoid a compiler warning.
1526 * netbsd-core.c: Convert to ISO C. Fix formatting.
1530 * elfxx-mips.c: Revert previous patch.
1534 * targets.c (_bfd_target_vector): Only include the
1535 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1536 all targets enabled.
1540 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1541 (BFD64_BACKENDS): Add elf32-ia64.lo.
1542 * Makefile.in: Regenerate.
1546 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1547 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1548 after emitting relocation.
1549 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1550 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1556 * config.bfd: Accept any C library to accompany a GNU Linux
1557 implementation, not just the GNU C library.
1558 * configure.in: Likewise.
1559 * configure: Regenerate.
1563 * bfd-in.h (_bfd_elf_provide_symbol): New.
1564 * bfd-in2.h: Regenerated.
1566 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1567 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1570 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1575 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1579 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1580 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1581 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1582 (xtensa_opcode_decode): Rearrange code.
1586 * binary.c: Convert to ISO C90 formatting.
1587 * coff-arm.c: Convert to ISO C90 formatting.
1588 * coffgen.c: Convert to ISO C90 formatting.
1589 * elf32-gen.c: Convert to ISO C90 formatting.
1590 * elf64-gen.c: Convert to ISO C90 formatting.
1591 * hash.c: Convert to ISO C90 formatting.
1592 * ieee.c: Convert to ISO C90 formatting.
1596 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1597 unresolved symbols in R_ARM_NONE relocations.
1601 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1602 UNRESOLVED_RELOC_P argument. Set it appropriately.
1603 (elf32_arm_relocate_section): Update call to
1604 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1605 unresolved_reloc instead.
1609 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1610 .gnu.warning.* sections.
1614 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1616 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1617 (elf_create_pointer_linker_section): Delete info parm. Don't make
1618 h dynamic. Don't set written_address_p.
1619 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1620 (bfd_put_ptr): Delete.
1621 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1622 Always write section contents. Assert global sym is def_regular.
1623 Use offset bottom bit as a written flag.
1624 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1629 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1630 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1635 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1637 (t2a1_bx_pc_insn): Likewise.
1638 (t2a2_noop_insn): Likewise.
1639 (t2a3_b_insn): Likewise.
1640 (t2a1_push_insn): Likewise.
1641 (t2a2_ldr_insn): Likewise.
1642 (t2a3_mov_insn): Likewise.
1643 (t2a4_bx_insn): Likewise.
1644 (t2a5_pop_insn): Likewise.
1645 (t2a6_bx_insn): Likewise.
1646 (coff_arm_relocate_section): Only declare the high_address
1647 variable for non WINCE targets.
1651 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1652 SEC_LINKER_CREATED. Attach to dynobj.
1653 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1657 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1658 sym_offset. Add name, bss_name, sym_name, sym_val.
1659 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1660 Add sdata array of elf_linker_section_t.
1661 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1662 (enum elf_linker_section_enum): Delete.
1663 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1664 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1665 the special sections are needed. Adjust htab->sdata refs.
1666 Ensure dynobj is set in sreloc code.
1667 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1668 (ppc_elf_set_sdata_syms): New function.
1669 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1670 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1671 sym_val instead of sym_hash.
1672 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1676 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1677 (ppc_elf_merge_private_bfd_data): Likewise.
1681 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1682 (ppc_elf_create_linker_section): Don't create rel_section.
1683 (elf_create_pointer_linker_section): Don't size relocs.
1684 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1685 Don't generate relocs.
1686 (ppc_elf_relocate_section): Adjust calls to
1687 elf_finish_pointer_linker_section.
1691 * elf32-ppc.c (is_ppc_elf_target): New function.
1692 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1693 for bfd_target_elf_flavour. Do this test before endian check.
1694 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1695 (ppc_elf_size_dynamic_sections): Likewise.
1699 * elf-bfd.h (elf_backend_data): Add int to
1700 elf_backend_section_from_shdr.
1701 (bfd_elf_section_data): Update comment for this_idx.
1702 (_bfd_elf_make_section_from_shdr): Add int.
1703 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1705 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1706 and use it to set this_idx in bfd_elf_section_data.
1707 (bfd_section_from_shdr): Pass shindex to
1708 _bfd_elf_make_section_from_shdr.
1709 (_bfd_elf_section_from_bfd_section): Use this_idx in
1710 bfd_elf_section_data to find section index.
1712 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1713 index and pass it to _bfd_elf_make_section_from_shdr.
1714 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1715 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1716 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1717 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1718 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1719 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1720 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1721 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1722 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1727 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1728 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1733 * elflink.c (elf_mark_used_section): Remove check for special
1738 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1739 from bfd_vma to ia64_insn, remove broken cast.
1743 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
1744 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1745 elf_m68k_finish_dynamic_sections): Use it.
1751 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1752 (elf32_arm_additional_program_headers): Likewise.
1753 (elf_backend_modify_segment_map): Define.
1754 (elf_backend_additional_program_headers): Likewise.
1755 (elf32_arm_symbian_modify_segment_map): Use
1756 elf32_arm_modify_segment_map.
1760 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1761 for special sections.
1765 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1766 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1767 section_sym_count param, and return number of section symbols.
1768 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1769 .dynsym contents. Don't bother calling swap_symbol_out on the
1770 first all-zero dynsym.
1771 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1772 special sections like bfd_abs_section.
1773 (bfd_elf_gc_sections): Spelling fix.
1778 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1779 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1783 * elflink.c (elf_mark_used_section): New.
1784 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1785 non-relocatable link if we don't do GC.
1790 * configure.in (werror): New switch: Add -Werror to the
1791 compiler command line. Enabled by default. Disable via
1793 * configure: Regenerate.
1797 * ecoff.c: Convert to ISO C90 formatting.
1801 * elf32-ppc.c: Divide file into general and linker specific
1802 functions. Sort linker functions into roughly the order in which
1803 they are called by the ELF linker code.
1807 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1808 on section. Correct comment, and add FIXME.
1809 (ppc_elf_additional_program_headers): Don't bump header count for
1810 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1811 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1812 do allocate memory if they need it.
1816 * config.bfd (x86_64-elf): Add target.
1820 * po/es.po: Commit new Spanish translation.
1824 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1825 for global symbol when reporting overflow.
1829 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1830 * libbfd.h: Rebuilt.
1831 * archive.c (_bfd_ar_spacepad): New function.
1832 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1833 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1834 coff_write_armap): Use it.
1835 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1837 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1841 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1842 has_table to the start of the function.
1846 * archive.c: Include hashtab.h.
1847 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1848 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1849 (hash_file_ptr): New function.
1850 (eq_file_ptr): Likewise.
1851 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1852 * libbfd-in.h: Include hashtab.h.
1853 (struct artdata): Change `cache' member type to htab_t.
1854 * libbfd.h: Rebuild.
1858 * configure.in: Bump version to 2.16.90.
1859 * configure: Regenerated.
1863 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1864 close is a function like macro in system headers.
1869 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1870 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1874 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1878 * po/bfd.pot: Regenerate.
1882 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1884 (func_desc_adjust): Force dot-syms local in executables as well
1889 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1890 '__gnu_local_gp' symbol used by gas -mno-shared.
1894 * elf-bfd.h (elf_backend_data): Add "const char *" to
1895 elf_backend_section_from_phdr.
1897 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1898 elf_backend_section_from_phdr hook.
1903 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1904 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1906 (struct mips_elf_got_per_bfd_arg): Add global_count.
1907 (struct mips_elf_count_tls_arg): New.
1908 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1909 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1910 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1911 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1912 (TLS_RELOC_P): Define.
1913 (TP_OFFSET, DTP_OFFSET): Define.
1914 (dtprel_base, tprel_base): New functions.
1915 (mips_elf_link_hash_newfunc): Initialize tls_type.
1916 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1917 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1919 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1920 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1921 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1922 (mips_tls_got_index): New functions.
1923 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1924 arguments. Pass them to mips_elf_create_local_got_entry. Use
1926 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1928 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1929 mips_elf_create_local_got_entry.
1930 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1931 arguments. Handle TLS entries.
1932 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1933 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1935 (mips_elf_record_global_got_symbol): Likewise.
1936 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1938 (mips_elf_merge_gots): Handle TLS entries when merging.
1939 (mips_elf_initialize_tls_index): New function.
1940 (mips_elf_set_global_got_offset): Handle TLS entries.
1941 (mips_elf_adjust_gp): Handle TLS.
1942 (mips_elf_multi_got): Remove redundant call to
1943 mips_elf_resolve_final_got_entries. Initialize global_count.
1944 Correct a comment. Initialize new TLS members of mips_got_info.
1945 Assign TLS GOT indexes for new GOTs.
1946 (mips_elf_create_got_section): Initialize new TLS members of
1948 (mips_elf_calculate_relocation): Handle TLS relocs.
1949 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1951 (_bfd_mips_elf_always_size_sections): Handle TLS.
1952 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1953 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1955 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1956 (_bfd_mips_elf_hide_symbol): Handle TLS.
1957 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1958 (mips_reloc_map): Add TLS relocs.
1959 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1960 * elf64-mips.c (mips_elf64_howto_table_rel)
1961 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1962 * reloc.c: Define new MIPS TLS relocations.
1963 * libbfd.h, bfd-in2.h: Regenerated.
1967 * Makefile.am: Add dependency of cache.o on libiberty.h.
1968 * cache.c: Include libiberty.h.
1969 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1973 * elf.c (bfd_section_from_shdr <default case>): Call
1974 elf_backend_section_from_shdr hook unconditionally, and return
1976 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1977 * elfxx-target.h (elf_backend_section_from_shdr)
1978 (elf_backend_section_from_phdr): Default to
1979 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1984 * targets.h: Typo fix.
1985 * bfd-in2.h: Regenerate.
1987 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1988 structs to size on-disk structures.
1989 (b_out_set_section_contents): Size the external struct, not the
1990 internal one for on-disk size.
1991 (b_out_sizeof_headers): Likewise.
1995 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1996 entry points with the func descriptor as well as undefweak.
2000 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2001 present when IMPORT_NAME_UNDOECRATE is used.
2006 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2009 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2010 to _bfd_elf_merge_symbol.
2012 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2013 unsigned int to return the alignment of the old common symbol
2014 in the dynamic object.
2015 (_bfd_elf_add_default_symbol): Pass NULL to
2016 _bfd_elf_merge_symbol.
2017 (elf_link_add_object_symbols): Pass &old_alignment to
2018 _bfd_elf_merge_symbol. Get the alignment of the new common
2019 symbol in the dynamic object.
2023 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2024 * format.c (bfd_check_format_matches): Likewise.
2025 * archive.c (BFD_GNU960_ARMAG): Likewise.
2026 (bfd_generic_archive_p): Likewise.
2027 (_bfd_write_archive_contents): Likewise.
2031 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2032 * configure: Regenerate.
2036 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2037 COMDAT group sections to have default visibility.
2041 * coffcode.h (coff_print_aux): Warning fix.
2042 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2043 instead of section pointer to identify.
2044 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2045 the correct size buffer for local sym mangling too.
2046 (h8300_bfd_link_add_symbols): Likewise.
2047 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2049 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2050 * elf32-xtensa.c (literal_value_hash): Warning fix.
2051 * versados.c (process_otr): Warning fix.
2052 (versados_canonicalize_reloc): Likewise.
2053 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2054 * vms.c (fill_section_ptr): Warning fix.
2058 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2059 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2063 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2064 the relvaddr field of the Elf32_crinfo structure.
2066 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2067 variables that are passed by reference to
2068 m68hc11_get_relocation_value in case that function does not
2071 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2072 return statements and replace with a single return at the end of
2073 the function. This helps pacify the flow analysis code in gcc 4.0.
2075 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2076 strtab to avoid compile time warning.
2080 * opncls.c (bfd_zalloc): Document this function.
2084 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2085 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2086 Replace SEC_SHARED with SEC_COFF_SHARED.
2087 (styp_to_sec_flags): Likewise.
2089 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2090 (TARGET_LITTLE_SYM): Likewise.
2092 * section.c (SEC_ARCH_BIT_0): Removed.
2093 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2094 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2095 (SEC_SHARED): Renamed to ...
2096 (SEC_COFF_SHARED): This.
2097 (SEC_BLOCK): Renamed to ...
2098 (SEC_TIC54X_BLOCK): This.
2099 (SEC_CLINK): Renamed to ...
2100 (SEC_TIC54X_CLINK): This.
2101 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2102 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2104 * bfd-in2.h: Regenerated.
2108 * dwarf2.c (find_abstract_instance_name): Call recursively
2109 to handle a DW_AT_specification.
2113 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2114 mips_elf_create_dynamic_relocation,
2115 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2116 Remove #if 0'd code.
2120 * Makefile.am: Run "make dep-am"
2121 * Makefile.in: Regenerate.
2125 * coffgen.c (bfd_coff_get_comdat_section): Check that
2126 coff_section_data isn't NULL.
2130 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2131 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2132 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2133 useless assignments.
2134 (xcoff_write_archive_contents_big): Likewise.
2135 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2136 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2137 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2138 * cofflink.c (process_embedded_commands): Warning fixes.
2139 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2141 * dwarf2.c: Warning fixes.
2142 * elf-bfd.h: Likewise.
2143 * elf-eh-frame.c: Likewise.
2144 * elf-strtab.c: Likewise.
2146 * elf32-m68k.c: Likewise.
2147 * elf32-ppc.c: Likewise.
2148 * elf32-sh-symbian.c: Likewise.
2149 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2150 * elf64-sh64.c: Likewise.
2151 * peicode.h: Likewise.
2152 * elf64-mmix.c: Warning fixes.
2153 * elfcode.h: Likewise.
2154 * elfxx-mips.c: Likewise.
2155 * libbfd-in.h: Likewise.
2156 * libbfd.c: Likewise.
2157 * mach-o.c: Likewise.
2158 * merge.c: Likewise.
2160 * opncls.c: Likewise.
2163 * vms-hdr.c: Likewise.
2164 * vms-tir.c: Likewise.
2165 * xtensa-isa.c: Likewise.
2166 * xtensa-modules.c: Likewise.
2168 (pstrcmp): Use correct choice of string lengths. Fix return value.
2169 (bfd_sym_module_name): Correct string length.
2170 * bfd-in2.h: Regenerate.
2171 * libbfd.h: Regenerate.
2175 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2176 uninitialized check_segment[1] in TLSMOFF case.
2177 Reported by Alan Modra.
2178 (elf32_frv_relocate_section): Improve errors and warnings.
2182 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2186 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2187 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2188 * pef.c (bfd_pef_scan): Don't ignore return value of
2189 bfd_pef_scan_start_address.
2190 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2191 bfd_mach_o_scan_start_address.
2192 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2193 * elfxx-mips.c: Remove unnecessary prototypes.
2194 (sort_dynamic_relocs_64): Abort if not BFD64.
2198 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2199 Skip toc reloc adjust if reloc_count is zero.
2204 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2205 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2206 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2207 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2208 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2210 (mips16_gprel_reloc): Remove bit shuffling; call
2211 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2212 and _bfd_mips16_elf_reloc_shuffle() instead.
2213 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2214 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2216 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2217 elf_mips16_howto_table_rel.
2218 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2219 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2220 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2221 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2222 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2224 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2225 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2226 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2228 (mips16_gprel_reloc): Remove bit shuffling; call
2229 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2230 and _bfd_mips16_elf_reloc_shuffle() instead.
2231 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2232 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2234 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2235 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2236 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2237 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2238 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2239 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2240 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2242 (mips16_gprel_reloc): Remove bit shuffling; call
2243 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2244 and _bfd_mips16_elf_reloc_shuffle() instead.
2245 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2246 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2248 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2249 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2250 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2251 handle bit shuffling for MIPS16 relocs.
2252 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2253 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2254 and _bfd_mips16_elf_reloc_shuffle().
2255 (_bfd_mips_elf_generic_reloc): Likewise.
2256 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2258 (mips_elf_obtain_contents): Remove bit shuffling.
2259 (mips_elf_perform_relocation): Likewise; call
2260 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2262 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2264 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2265 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2266 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2267 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2268 (BFD_RELOC_MIPS16_LO16): Likewise.
2269 * bfd-in2.h: Regenerate.
2270 * libbfd.h: Regenerate.
2274 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2275 R_IA64_DTPMOD64[LM]SB.
2279 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2280 backward branch in the same section.
2281 (elfNN_ia64_relocate_section): Inform users that the input
2282 section is too big to relax br instruction when overflow
2283 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2284 and R_IA64_PCREL21F.
2288 * elfcore.h (elf_core_file_p): Move the call to
2289 elf_backend_object_p to allow the correct machine to be set before
2290 processing the program headers.
2295 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2296 aware flag from the input bfd to the output bfd.
2300 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2301 R_MIPS_LITERAL relocations for external symbols.
2302 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2303 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2307 * bfd-in2.h: Rebuilt.
2311 * elf-bfd.h (struct elf_link_hash_table): Add
2312 is_relocatable_executable.
2313 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2314 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2315 symbols in relocatable executables.
2316 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2317 relocatable executables.
2318 (_bfd_elf_link_renumber_dynsyms): Ditto.
2319 (bfd_elf_final_link): Ditto.
2320 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2321 relocations into relocatable executables.
2322 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2323 executables. Also copy absolute relocations.
2324 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2325 in relocatable executables.
2326 (allocate_dynrelocs): Copy relocations for relocatable executables.
2327 Output dynamic symbols for symbols defined in linker scripts.
2331 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2332 to avoid a compile time warning.
2334 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2337 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2338 inclusion of coffcode.h so that it is actually picked up.
2340 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2341 case it is not used.
2343 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2344 structure and macro.
2346 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2349 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2350 to protect the declaration of this array.
2352 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2353 Avoid call to memcpy with a size of 0.
2357 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2358 old-style branches to undefined dot-symbols which will be
2359 satisfied by a plt call.
2363 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2364 (ppc64_elf_copy_indirect_symbol): ..here.
2365 (func_desc_adjust): Use move_plt_plist.
2369 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2373 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2375 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2376 (elf_link_renumber_local_hash_table_dynsyms): New function.
2377 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2381 * bfd-in.h (BFD_LINKER_CREATED): Define.
2382 * bfd-in2.h: Rebuilt.
2383 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2384 BFD_LINKER_CREATED bfds when determining input bfds without
2385 .note.GNU-stack section.
2389 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2390 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2391 relocations against external symbols unchanged.
2395 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2400 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2405 * elf64-mips.c: Fix formatting throughout.
2409 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2413 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2414 *ABS*/*UND* sections.
2415 (elf32_frv_relocate_section): Move zero-addend-required error...
2416 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2417 missing needed TLS section.
2421 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2422 being the last symbol.
2423 (aout_link_add_symbols): Just return TRUE if a warning
2428 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2429 R_MIPS_GPREL32 relocations against external symbols.
2430 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2435 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2436 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2437 elf_string_from_elf_strtab.
2438 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2439 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2440 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2441 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2442 looking at cached symtab info first, before iterating over headers.
2443 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2444 * elfcode.h (elf_object_p): Don't load section header stringtab
2449 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2450 against protected function when building shared library.
2453 * elf64-x86-64.c (is_32bit_relative_branch): New.
2454 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2455 protected function symbol when building shared library for
2456 32bit relative branch instruction.
2460 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2461 syms when doing a relocatable link.
2462 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2464 (ppc64_elf_tls_setup): Likewise.
2465 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2469 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2470 (link_hash_newfunc): Clear all locals using memset.
2471 (make_fdh): Remove flags param. Always create fake func desc
2472 weak. Link the descriptor with the code entry sym.
2473 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2474 (add_symbol_adjust): Adjust make_fdh call.
2475 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2476 descriptor to strong undefined if code entry is strong.
2480 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2481 lookup here. Set to new before calling bfd_link_repair_undef_list.
2482 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2486 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2490 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2491 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2492 before the as-needed lib was loaded. Abort on unexpected refs.
2496 * elflink.c (elf_smash_syms): Expand comments.
2497 (elf_link_add_object_symbols): Only call elf_smash_syms for
2498 as-needed dynamic objects.
2500 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2501 everything, just the field specific to ia64.
2502 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
2506 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2507 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2509 (struct add_symbol_adjust_data): New.
2510 (add_symbol_adjust): Make an undefweak func desc for old ABI
2511 objects to link with --as-needed shared libs. Return fail status.
2512 Don't adjust old ABI func entry sym to weak if func desc syms
2514 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2519 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2524 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2525 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2526 remove anything but new and undefweak.
2527 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2529 (_bfd_elf_create_dynamic_sections): Formatting.
2530 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2531 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2532 (struct elf_smash_data): New.
2533 (elf_smash_syms): New function.
2534 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2535 unneeded dynamic objects to loaded list.
2536 (elf_link_output_extsym): Don't handle as-needed here. Strip
2537 bfd_link_hash_new symbols.
2538 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2539 delref when dynindx is already -1.
2540 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2542 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2546 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2550 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2551 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2552 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2553 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2554 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2555 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2556 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2557 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2558 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2559 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2560 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
2561 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
2562 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2563 throughout. Similarly, collapse #if 1'd code.
2567 * elf-bfd.h (bfd_elf_discard_group): Remove.
2568 * elf.c (bfd_elf_discard_group): Likewise.
2569 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2573 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2574 (_bfd_elf_eh_frame_address_size): Declare.
2575 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2576 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2577 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2578 (elf_backend_eh_frame_address_size): Define.
2579 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2580 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2581 size from the new backend hook.
2582 (_bfd_elf_write_section_eh_frame): Likewise.
2583 (_bfd_elf_eh_frame_address_size): New function.
2587 * configure: Regenerate to track ../gettext.m4.
2591 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2592 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2596 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2597 sparc-lynxos, vax-vms) be obsolete.
2601 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2602 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2603 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2604 * elfcode.h (elf_object_p): Use minpagesize instead of
2606 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2607 (elfNN_bed): Include ELF_MINPAGESIZE.
2611 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2612 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2613 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2614 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
2615 passing flag value from ld. Set flag value in global hash table entry.
2616 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
2621 * configure: Regenerate to track ../gettext.m4 change.
2625 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
2631 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2633 * reloc.c: Add R_FRV_TLSMOFF.
2634 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2635 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2636 (elf32_frv_relocate_section): Handle it.
2637 (elf32_frv_check_relocs): Likewise.
2638 * libbfd.h, bfd-in2.h: Rebuilt.
2640 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2641 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2642 such that they return the constant in gr9.
2643 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2645 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2646 too, such that they shrink on relaxation.
2647 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2648 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2649 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2650 if we can guarantee the use of 16-bit constants.
2652 Introduce TLS support for FR-V FDPIC.
2653 * reloc.c: Add TLS relocations.
2654 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2655 (elf32_frv_rel_tlsdesc_value_howto): New.
2656 (elf32_frv_rel_tlsoff_howto): New.
2657 (frv_reloc_map): Add new mappings.
2658 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2660 (frvfdpic_dynamic_got_plt_info): New.
2661 (frvfdpic_plt_tls_ret_offset): New.
2662 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2663 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2664 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2665 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2667 (struct frvfdpic_relocs_info): Add TLS fields.
2668 (frvfdpic_relocs_info_hash): Warning clean up.
2669 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2670 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2671 (FRVFDPIC_TLS_BIAS): Define.
2672 (tls_biased_base): New.
2673 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2675 (frv_reloc_type_lookup): Likewise.
2676 (frvfdpic_info_to_howto_rel): Likewise.
2677 (elf32_frv_relocate_section): Likewise.
2678 (_frv_create_got_section): Create the PLT section here.
2679 (elf32_frvfdpic_create_dynamic_sections): Not here.
2680 (_frvfdpic_count_nontls_entries): Move out of...
2681 (_frvfdpic_count_got_plt_entries): ... here.
2682 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2683 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2685 (_frvfdpic_relax_tls_entries): New.
2686 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2687 (_frvfdpic_get_tlsdesc_entry): New.
2688 (_frvfdpic_assign_got_entries): Add TLS support.
2689 (_frvfdpic_assign_plt_entries): Likewise.
2690 (_frvfdpic_reset_got_plt_entries): New.
2691 (_frvfdpic_size_got_plt): Move out of...
2692 (elf32_frvfdpic_size_dynamic_sections): ... here.
2693 (_frvfdpic_relax_got_plt_entries): New.
2694 (elf32_frvfdpic_relax_section): New.
2695 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2696 (elf32_frv_check_relocs): Add TLS support.
2697 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2698 * libbfd.h, bfd-in2.h: Rebuilt.
2702 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2703 loadable reloc sections.
2704 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2705 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2709 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2710 sections immediately when linking shared libs. Instead, wait until
2711 we know a lib is needed.
2712 (_bfd_elf_link_create_dynstrtab): Extract from..
2713 (_bfd_elf_link_create_dynamic_sections_): ..here.
2714 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2715 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2716 for non-existent .dynamic.
2717 (elf_link_output_extsym): Don't complain about undefined symbols
2718 in as-needed dynamic libs that aren't actually linked.
2722 * configure: Regenerate, ../gettext.m4 was updated.
2726 * aout-encap.c: Remove unused file.
2731 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2732 non-function symbols are local.
2733 (_bfd_elf_symbol_refs_local_p): Likewise.
2737 * bfd.c (bfd_link_just_syms): Add abfd param.
2738 * bfd-in2.h: Regenerate.
2742 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2743 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2744 instructions. If the amount of padding is known, reduce the size
2745 of the CIE or FDE by that amount.
2749 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2750 augmentation_size. Use bfd_signed_vmas for data_align.
2751 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2752 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2753 functions. Don't read past the end of the enclosing CIE or FDE.
2754 (skip_bytes): New utility function.
2755 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2757 (_bfd_elf_write_section_eh_frame): Use new functions.
2761 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2762 assert-style REQUIRE() macro to handle sanity checks.
2766 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2768 (read_unsigned_leb128): Removed.
2769 (read_signed_leb128): Removed.
2770 (find_abstract_instance_name): Updated.
2771 (parse_comp_unit): Accept info_ptr_unit.
2772 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2773 comp unit and pass it to parse_comp_unit.
2775 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2776 (read_signed_leb128): Moved to ...
2779 * libbfd-in.h (read_unsigned_leb128): New prototype.
2780 (read_signed_leb128): Likewise.
2781 * libbfd.h: Regenerated.
2786 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2787 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2788 arch_sh4a_nofpu_up in order to match the external names and make the
2789 testsuite's job easier.
2790 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2792 * bfd-in2.h: Regenerate.
2797 * acinclude.m4: Move BFD_NEED_DECLARATION,
2798 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2799 the new file bfd.m4. Include ../bfd/bfd.m4.
2800 * configure: Re-generate.
2804 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2805 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2807 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2808 R_PPC_RELAX32PC_PLT.
2812 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2814 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2815 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2816 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2817 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2818 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2819 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2820 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2821 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2822 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2823 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2824 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2825 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2826 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2827 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2831 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2836 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2837 * bfd-in2.h: Regenerate.
2838 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2839 to support these new machine values.
2840 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2842 (bfd_maxq_arch): Update values for the maxq20.
2846 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2847 non-shared object, do not reserve space in .plt and .rela.plt for
2848 regular symbols neither defined nor referenced in shared objects.
2852 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2853 to zero the structure.
2854 (create_got_section): Use BFD_ASSERT instead of abort.
2855 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2857 (create_got_section): New function.
2858 (sparc64_elf_create_dynamic_sections): Likewise.
2859 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2860 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2861 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2862 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2863 (sparc64_elf_finish_dynamic_symbol): Likewise.
2864 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2865 (elf_backend_create_dynamic_sections): Define to
2866 sparc64_elf_create_dynamic_sections.
2870 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2871 (elf_backend_omit_section_dynsym): Define to it.
2872 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2873 (elf_backend_omit_section_dynsym): Define to it.
2877 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2878 PT_DYNAMIC segment, unless .dynamic.
2882 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2883 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2884 * configure: Regenerate.
2885 * elf32-arm.c: Add VxWorks target bfd.
2887 (elf32_arm_link_hash_table): Add use_rel.
2888 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2889 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2890 Correct offset calculation for RELA case.
2891 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2892 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2893 (elf32_arm_vxworks_link_hash_table_create): New function.
2894 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2895 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2896 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2900 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2902 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2903 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2904 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2905 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2906 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2907 (toc_adjusting_stub_needed): Rewrite.
2908 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2909 toc tests. Adjust for toc_adjusting_stub_needed changes.
2910 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2911 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2912 * section.c: Expand comment on backend bits.
2913 * bfd-in2.h: Regenerate.
2914 * libbfd.h: Regenerate.
2918 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2919 toc adjusting stub, do not test source section flags.
2923 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2924 from STABS debugging sections again.
2928 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2929 (find_abstract_instance_name): New function.
2930 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2931 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2932 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2936 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2940 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2941 Commit missing changes from 2004-12-22.
2942 * bfd-in2.h: Regenerate.
2946 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2950 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2951 Add 'base' argument for constructing register sections. Reformat.
2952 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2953 gp and fp regs. Reformat.
2957 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2958 * bfd-in2.h: Regenerate.
2959 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2960 (avr_reloc_map): Likewise.
2961 (avr_final_link_relocate): Likewise.
2965 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2966 as-needed dynamic libs as undefined.
2967 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2968 libs when finding they are needed.
2972 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2973 (opd_entry_value): Use opd_relocs if available.
2974 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2975 copy .opd relocations to opd_relocs.
2976 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2980 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2981 * elf32-v850.c (v850_elf_howto_table): Add entry for
2982 R_V850_LO16_SPLIT_OFFSET.
2983 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2984 (v850_elf_perform_lo16_relocation): New function, extracted from...
2985 (v850_elf_perform_relocation): ...here. Use it to handle
2986 R_V850_LO16_SPLIT_OFFSET.
2987 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2988 R_V850_LO16_SPLIT_OFFSET.
2989 * libbfd.h, bfd-in2.h: Regenerate.
2993 * config.bfd: Add s390x-ibm-tpf support.
2997 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2998 to prototype, to make hash info available.
2999 Prevent wrapped symbols from being adjusted twice.
3003 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3004 overflow for calls to undefined weak symbols.
3008 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3009 canonical sections syms have a name.
3013 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3014 have been adjusted for output.
3015 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3019 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3020 add symtab_hdr param.
3021 (group_signature): Update calls.
3022 * elf-bfd.h (bfd_elf_sym_name): Update.
3023 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3024 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3025 (ppc64_elf_relocate_section): Update.
3026 * elflink.c (elf_link_input_bfd): Update.
3030 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3031 st_shndx on STT_SECTION sections.
3035 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3036 ELF section symbols.
3040 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3041 return a real value, unless it is a PLT symbol.
3042 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3045 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3046 R_MIPS_JALR entry to 0.
3048 * archures.c: Define bfd_mach_mips9000.
3049 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3050 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3051 * cpu-mips.c (I_mips9000): Define.
3052 (arch_info_struct): Add case for bfd_mach_mips9000.
3053 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3054 * bfd-in2.h: Regenerate.
3058 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3063 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3068 * simple.c (simple_dummy_multiple_definition): New function.
3069 (bfd_simple_get_relocated_section_contents): Use it.
3073 * elf.c (elf_find_function): Don't use the last file symbol ever,
3074 seen, but the last one seen prior to the symbol being reported.
3075 Don't report a filename at all for global symbols when that might
3080 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3081 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3086 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3091 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3092 no_pipeline_knowledge
3093 (elf32_arm_link_hash_table_create): Ditto.
3094 (bfd_elf32_arm_process_before_allocation): Ditto.
3095 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3097 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3099 * bfd-in2.h: Regenerate.
3103 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3104 (elf32_hppa_grok_psinfo): New function.
3105 (elf_backend_grok_prstatus): Define.
3106 (elf_backend_grok_psinfo): Define.
3111 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3115 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3119 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3120 (elf32_arm_swap_symbol_out): New function.
3121 (elf32_arm_size_info): Add.
3122 (elf_backend_size_info): Define.
3126 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3131 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3132 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3133 * nlmcode.h (nlm_write_object_contents): Warning fix.
3137 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3141 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3142 (elf32_arm_plt_thumb_stub): New.
3143 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3145 (elf32_arm_link_hash_traverse): Fix typo.
3146 (elf32_arm_link_hash_table): Add obfd.
3147 (elf32_arm_link_hash_newfunc): Initialize new fields.
3148 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3149 (elf32_arm_link_hash_table_create): Initialize obfd.
3150 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3151 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3152 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3153 interworking BFD is not dynamic.
3154 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3155 not emit glue for PLT references.
3156 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3157 emit glue for PLT references. Support the Thumb PLT prefix.
3158 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3160 (elf32_arm_check_relocs): Likewise.
3161 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3163 (allocate_dynrelocs): Handle Thumb PLT references.
3164 (elf32_arm_finish_dynamic_symbol): Likewise.
3165 (elf32_arm_symbol_processing): New function.
3166 (elf_backend_symbol_processing): Define.
3170 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3171 add_fde_encoding. Remove need_relative.
3172 * elf-eh-frame.c (extra_augmentation_string_bytes)
3173 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3174 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3175 in cases where the CIE has no existing 'R' augmentation. Use
3176 size_of_output_cie_fde when assigning offsets. Use the final offset
3177 as the new section size.
3178 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3179 Account for any extra augmentation bytes in the returned offset.
3180 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3181 moved before being modified. Pad growing entries with DW_CFA_nops.
3182 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3183 and add_fde_encoding.
3187 * elf32-arm.c (elf32_arm_relocate_section): Use
3188 arm_real_reloc_type.
3192 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3193 for discard relocations; don't add an R_MIPS_NONE to the main body
3198 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3199 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3200 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3201 default version definition for unversioned symbols.
3202 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3203 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3204 _bfd_elf_slurp_version_tables. Set default version for unversioned
3209 * elflink.c (elf_link_add_object_symbols): Don't assume version
3210 indices are consecutive.
3214 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3215 composite relocations against the personality data.
3219 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3220 R_ARM_PREL31 relocations to PLT entries.
3221 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3222 (elf32_arm_check_relocs): Ditto.
3226 * xtensa-isa.c (xtensa_interface_class_id): New.
3230 * elf32-xtensa.c (property_table_compare): Remove assertion about
3231 entries with the same address and non-zero size.
3232 (xtensa_read_table_entries): Report such entries as errors.
3236 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3237 R_ARM_RELATIVE on Symbian OS.
3241 * som.c (som_bfd_print_private_bfd_data): New function.
3242 (som_object_setup): Save the auxiliary header. Don't assume that
3243 zero is an invalid entry point for a shared library.
3244 (som_object_p): Allocate the auxiliary header on the heap.
3246 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3248 (elf32_arm_symbian_modify_segment_map): Likewise.
3253 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3254 (elf32_arm_size_dynamic_sections): Call it.
3258 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3259 (ALL_MACHINES_CFILES): Fix typo.
3260 * Makefile.in: Regenerate.
3261 * po/SRC-POTFILES.in: Regenerate.
3265 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3266 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3267 symbol in the relocation.
3272 * coff-maxq.c: New File.
3273 * cpu-maxq.c: New File.
3274 * coffcode.h: Likewise.
3275 * config.bfd: Likewise.
3276 * configure.in (maxqcoff_vec): New target vector.
3277 * Makefile.am: Add support for maxq target.
3278 * configure.in: Likewise.
3279 * archures.c:. Likewise.
3280 * targets.c: Likewise.
3281 * bfd_in2.h : Regenerated.
3282 * Makefile.in: Regenerated.
3283 * configure: Regenerated.
3284 * doc/Makefile.in: Regenerated.
3288 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3289 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3290 C_NT_WEAK aux entries.
3291 (_bfd_coff_generic_relocate_section): Handle undefined
3296 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3297 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3298 non-default visibility.
3302 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3304 (elf32_arm_symbian_modify_segment_map): Don't
3305 reset includes_filehdr and includes_phdrs here.
3309 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3310 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3311 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3313 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3314 to a new removed list. Remove normal configuration stanzas.
3315 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3316 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3317 elfarm-nabi.lo with elf32-arm.lo.
3318 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3319 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3320 * elf32-arm.h: Remove.
3321 * elfarm-oabi.c: Remove.
3322 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3323 and bfd_elf32_littlearm_oabi_vec.
3324 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3328 * config.bfd: Support crisv32-*-* like cris-*-*.
3329 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3330 (bfd_mach_cris_v10_v32): New macros.
3331 * cpu-cris.c: Tweak formatting.
3332 (get_compatible): New function.
3334 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3335 bfd_arch_info_type:s.
3336 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3337 get_compatible for member compatible and link bfd_cris_arch_v32 as
3339 * elf32-cris.c (cris_elf_pcrel_reloc)
3340 (cris_elf_set_mach_from_flags): New functions.
3341 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3342 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3343 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3344 numbers for bfd_mach_cris_v32.
3345 (PLT_ENTRY_SIZE_V32): New macro.
3346 (elf_cris_plt0_entry): Drop last comma in initializer.
3347 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3348 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3350 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3352 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3353 (elf_cris_finish_dynamic_sections): Similar.
3354 (elf_cris_adjust_dynamic_symbol): Similar.
3355 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3357 <switch with PIC relocs>: Emit error and return FALSE for
3358 bfd_mach_cris_v10_v32.
3359 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3360 Emit warning when generating textrel reloc.
3361 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3362 (cris_elf_final_write_processing): Set flags according to mach.
3363 (cris_elf_print_private_bfd_data): Display
3364 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3365 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3366 new_flags. Don't call cris_elf_final_write_processing. Don't
3367 look at the actual elf header flags at all; use
3368 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3369 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3371 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3372 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3373 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3374 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3375 * bfd-in2.h, libbfd.h: Regenerate.
3379 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3380 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3382 (struct adjust_toc_info): New.
3383 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3387 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3388 if there are no segments.
3392 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3396 * elf32-iq2000.c: Convert to ISO C90 formatting.
3400 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
3404 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3405 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3406 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3410 * elf32-sh.c (tpoff): Take alignment into account.
3414 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
3415 performing a relocatable link.
3416 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3417 for MIPS ports under Irix.
3421 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3422 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3423 (elf32_arm_final_link_relocate): Ditto.
3424 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3425 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3426 (elf32_arm_adjust_dynamic_symbol): Ditto.
3427 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3428 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3429 (elf32_arm_r_howto): ... To here.
3430 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3435 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3436 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3437 and R_IA64_SECREL64LSB.
3441 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3442 (bfd_elf_size_dynamic_sections): Create default version definition.
3443 (elf_link_output_extsym): Adjust for default symbol version.
3447 * mmo.c: Adjust to ISO C.
3449 * mmo.c (mmo_write_section_description): New function broken out
3450 of mmo_internal_write_section.
3451 (mmo_internal_write_section): For each of .text and .data, call
3452 mmo_write_section_description before outputting contents if it has
3453 nontrivially deducible vma or contents.
3454 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3455 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3456 symbols if found within the .data address range.
3460 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3464 * mmo.c (File Layout): Correct place of misplaced blurb about
3469 * config.bfd: Add mips64*-*-openbsd.
3473 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3478 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3479 * configure: Regenerate.
3484 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3485 to linker reloc_overflow callback.
3486 (aout_link_input_section_ext): Likewise.
3487 (aout_link_reloc_link_order): Likewise.
3488 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3489 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3491 (alpha_relocate_section): Likewise.
3492 * coff-arm.c (coff_arm_relocate_section): Likewise.
3493 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3494 * coff-h8500.c (extra_case): Likewise.
3495 * coff-i960.c (coff_i960_relocate_section): Likewise.
3496 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3497 * coff-mips.c (mips_relocate_section): Likewise.
3498 * coff-or32.c (coff_or32_relocate_section): Likewise.
3499 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3500 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3501 * coff-sh.c (sh_relocate_section): Likewise.
3502 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3503 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3504 * coff-z8k.c (extra_case): Likewise.
3505 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3506 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3507 (_bfd_coff_generic_relocate_section): Likewise.
3508 * ecoff.c (ecoff_reloc_link_order): Likewise.
3509 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3510 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3511 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3512 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3513 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3514 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3515 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3516 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3517 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3518 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3519 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3520 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3521 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3522 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3523 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3524 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3525 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3526 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3527 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3528 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3529 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3530 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3531 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3532 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3533 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3534 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3535 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3536 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3537 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3538 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3539 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3540 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3541 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3542 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3543 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3544 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3545 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3546 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3547 * elflink.c (elf_reloc_link_order): Likewise.
3548 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3549 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3550 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3551 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3552 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3553 (aout_link_reloc_link_order): Likewise.
3554 * reloc.c (bfd_generic_get_relocated_section_contents):
3556 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3557 * simple.c (simple_dummy_reloc_overflow): Updated.
3561 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3562 (elf_backend_plt_sym_val): Define.
3566 * config.bfd: Set targ_underscore=yes for PE COFF targets
3570 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3571 (ppc64_elf_edit_opd): Likewise.
3575 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3576 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3577 set SEC_ALLOC and SEC_LOAD.
3581 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3582 'name' for relocs against both local and global symbols.
3586 * bfd-in2.h: Regenerate.
3587 * bfd.c (struct bfd): Add no_export.
3588 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3592 * config.bfd: Whitespace cleanup.
3593 * Makefile.am: Run "make dep-am"
3594 * Makefile.in: Regenerate.
3598 * elflink.c (struct already_linked_section): Removed.
3599 (try_match_symbols_in_sections, already_linked): Removed.
3600 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3601 prefix of section names when finding already_linked_table
3602 chain. Compare section names. Instead of calling already_linked,
3603 do it inline and only for sections in the same already_linked_list.
3607 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3608 parameter. If called after _bfd_elf_write_section_eh_frame,
3609 don't allow a -2 return unless need_* bit is already set, and
3610 handle offsets adjusted for output_offset.
3611 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3612 * elf.c (_bfd_elf_section_offset): Update call.
3617 * coffcode.h (coff_compute_section_file_positions): Cast to
3618 bfd_vma when computing page alignment.
3622 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3623 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3627 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3628 relocations use a virtual address, not a section offset.
3632 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3633 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3634 xtensa_format_encode.
3635 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3636 (ebb_add_proposed_action): Delete.
3640 * elf32-xtensa.c: Use ISO C90 formatting.
3644 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3649 * elf32-arm.h: Support EABI version 4 objects.
3654 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3655 Don't mark as default.
3656 (bfd_x86_64_arch): Don't mark as default.
3660 * elflink.c (enum action_discarded): New.
3661 (elf_section_complain_discarded): Delete.
3662 (elf_action_discarded): New function subsuming the above and also
3663 controlling reloc behaviour.
3664 (elf_link_input_bfd): Use it.
3668 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3669 (special_sections): Add .gnu.liblist and .gnu.conflict.
3670 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3675 * elflink.c (elf_link_input_bfd): Try harder to support
3676 relocations against symbols in removed linkonce sections.
3680 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3683 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3684 sections do not reference symbols in non-SEC_ALLOC sections.
3689 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3690 (_bfd_elf_link_omit_section_dynsym): Formatting.
3694 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3695 * libbfd.h: Regnerate.
3696 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3697 * elf32-frv.c: Likewise.
3698 * elf32-m32r.c: Likewise.
3699 * elf32-ppc.c: Likewise.
3700 * elf64-hppa.c: Likewise.
3701 * elfxx-ia64.c: Likewise.
3702 * opncls.c: Likewise.
3706 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3707 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3708 offsets stored in struct eh_cie_fde entries before doing other
3711 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3712 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3713 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3714 setting offsets for removed CIEs. Don't set "sec", instead set
3715 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3716 CIE in hdr_info. Only set make_relative and make_lsda_relative
3717 for CIEs. Use pointers rather than array indices.
3718 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3719 make_lsda_relative, need_* on cie_inf for FDEs.
3720 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3721 section output_offset. Delete cie_offset, instead use cie_inf
3722 pointer to CIE entry. Use need_relative and need_lsda_relative on
3723 CIE entry for FDEs. Use pointers rather than array indices.
3727 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3728 bfd_is_target_special_symbol.
3729 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3730 * som.c (som_bfd_is_target_special_symbol): Define.
3734 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3735 * configure: Regenerate.
3736 * bfd-in2.h: Regenerate.
3737 * syms.c (bfd_is_target_special_symbol): New interface function.
3738 Returns true when a symbol should be considered to be special.
3739 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3740 the symbol jump table.
3741 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3742 Return true iff the symbol is a mapping symbol.
3743 (bfd_elf32_bfd_is_target_special_symbol): Define.
3744 * elfxx-target.h: Provide a default definition for
3745 bfd_is_target_special_symbol.
3746 * aout-target.h: Likewise.
3747 * aout-tic30.c: Likewise.
3748 * binary.c: Likewise.
3749 * coffcode.h: Likewise.
3750 * i386msdos.c: Likewise.
3753 * libaout.h: Likewise.
3754 * libbfd-in.h: Likewise
3755 * libecoff.h: Likewise.
3756 * mach-o.c: Likewise.
3758 * nlm-target.h: Likewise.
3759 * oasys.c: Likewise.
3761 * ppcboot.c: Likewise.
3763 * tekhex.c: Likewise.
3764 * versados.c: Likewise.
3766 * xcoff-target.h: Likewise.
3768 * libbfd.h: Regenerate.
3772 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3773 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3774 (elf_backend_section_from_shdr): Define.
3778 * syms.c (bfd_is_local_label): Return false for file symbols.
3783 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3784 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3785 (elf32xtensa_no_literal_movement): New global variable.
3786 (elf_howto_table): Add entries for new relocations.
3787 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3788 (property_table_compare): When addresses are equal, compare sizes and
3789 various property flags.
3790 (property_table_matches): New.
3791 (xtensa_read_table_entries): Extend to read new property tables. Add
3792 output_addr parameter to indicate that output addresses should be used.
3793 Use bfd_get_section_limit.
3794 (elf_xtensa_find_property_entry): New.
3795 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3796 (elf_xtensa_check_relocs): Handle new relocations.
3797 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3798 relocations. Use new xtensa-isa.h functions.
3799 (build_encoding_error_message): Remove encode_result parameter. Add
3800 new target_address parameter used to detect alignment errors.
3801 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3802 error handling. Use new is_operand_relocation function.
3803 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3804 Use underbar macro for error messages. Formatting.
3805 (get_const16_opcode): New.
3806 (get_l32r_opcode): Add a separate flag for initialization.
3807 (get_relocation_opnd): Operand number is no longer explicit in the
3808 relocation. Change to decode the opcode and analyze its operands.
3809 (get_relocation_slot): New.
3810 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3811 Use new xtensa-isa.h functions to handle multislot instructions.
3812 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3813 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3814 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3815 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3816 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3817 get_single_format, init_op_single_format_table): New.
3818 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3819 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3820 (contract_asm_expansion): Add error_message parameter and pass it to
3821 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3822 with R_XTENSA_SLOT0_OP.
3823 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3824 instructions. Use new xtensa-isa.h functions.
3825 (r_reloc struct): Add new virtual_offset field.
3826 (r_reloc_init): Add contents and content_length parameters. Set
3827 virtual_offset field to zero. Add contents to target_offset field for
3828 partial_inplace relocations.
3829 (r_reloc_is_defined): Check for null.
3830 (print_r_reloc): New debug function.
3831 (source_reloc struct): Replace xtensa_operand field with pair of the
3832 opcode and the operand position. Add is_abs_literal field.
3833 (init_source_reloc): Specify operand by opcode/position pair. Set
3834 is_abs_literal field.
3835 (source_reloc_compare): When target_offsets are equal, compare other
3836 fields to make sorting predictable.
3837 (literal_value struct): Add is_abs_literal field.
3838 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3839 (init_literal_value): New.
3840 (is_same_value): Replace with ...
3841 (literal_value_equal): ... this function. Add comparisons of
3842 virtual_offset and is_abs_literal fields.
3843 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3844 failure. Initialize has_last_loc field.
3845 (value_map_hash_table_delete): New.
3846 (hash_literal_value): Rename to ...
3847 (literal_value_hash): ... this. Include is_abs_literal flag and
3848 virtual_offset field in the hash value.
3849 (get_cached_value): Rename to ...
3850 (value_map_get_cached_value): ... this. Update calls to
3851 literal_value_hash and literal_value_equal.
3852 (add_value_map): Check for allocation failure. Update calls to
3853 value_map_get_cached_value and literal_value_hash.
3854 (text_action, text_action_list, text_action_t): New types.
3855 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3856 text_action_add, text_action_add_literal, offset_with_removed_text,
3857 offset_with_removed_text_before_fill, find_insn_action,
3858 print_action_list, print_removed_literals): New.
3859 (offset_with_removed_literals): Delete.
3860 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3861 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3862 allocated_relocs_count fields.
3863 (init_xtensa_relax_info): Initialize new fields.
3864 (reloc_bfd_fix struct): Add new translated field.
3865 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3867 (fix_compare, cache_fix_array): New.
3868 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3869 section via get_xtensa_relax_info. Use cache_fix_array to set up
3870 sorted fix_array and use bsearch instead of linear search.
3871 (section_cache_t): New struct.
3872 (init_section_cache, section_cache_section, clear_section_cache): New.
3873 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3874 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3875 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3876 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3878 (retrieve_contents): Use bfd_get_section_limit.
3879 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3880 to compute_removed_literals. Free value_map_hash_table when no longer
3882 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3883 compute_text_actions for all sections.
3884 (find_relaxable_sections): Mark sections as relaxable if they contain
3885 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3886 call. Increment relax_info src_count field only for appropriate
3887 relocation types. Remove is_literal_section check.
3888 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3889 r_reloc_init and find_associated_l32r_irel. Check
3890 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3891 literals. Pass is_abs_literal flag to init_source_reloc.
3892 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3893 CONST16 instructions. Adjust calls to r_reloc_init and
3894 pcrel_reloc_fits. Handle weak symbols conservatively.
3895 (find_associated_l32r_irel): Add bfd parameter and pass it to
3897 (compute_text_actions, compute_ebb_proposed_actions,
3898 compute_ebb_actions, check_section_ebb_pcrels_fit,
3899 check_section_ebb_reduces, text_action_add_proposed,
3900 compute_fill_extra_space): New.
3901 (remove_literals): Replace with ...
3902 (compute_removed_literals): ... this function. Call
3903 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3904 Call xtensa_read_table_entries to get the property table. Skip
3905 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3906 is_removable_literal, remove_dead_literal, and
3907 identify_literal_placement functions.
3908 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3909 instead of linear search.
3910 (is_removable_literal, remove_dead_literal,
3911 identify_literal_placement): New.
3912 (relocations_reach): Update check for literal not referenced by any
3913 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3914 (coalesce_shared_literal, move_shared_literal): New.
3915 (relax_section): Use bfd_get_section_limit. Call
3916 translate_section_fixes. Update calls to r_reloc_init and
3917 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3918 Add call to pin_internal_relocs. Add special handling for
3919 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3920 info to calculate new addend_displacement variable. Replace code for
3921 deleting literals with more general code to perform the actions
3922 determined by the action_list for the section.
3923 (translate_section_fixes, translate_reloc_bfd_fix): New.
3924 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3925 find_removed_literal only if is_operand_relocation. Update call to
3926 offset_with_removed_text. Use new target_offset and removed_bytes
3928 (move_literal): New.
3929 (relax_property_section): Use bfd_get_section_limit. Set new
3930 is_full_prop_section flag and handle new property tables. Update calls
3931 to r_reloc_init and offset_with_removed_text. Check
3932 is_relaxable_asm_section flag. Handle expansion of zero-sized
3933 unreachable entries, with use of offset_with_removed_text_before_fill.
3934 For relocatable links, combine entries only for literal tables.
3935 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3936 calls to offset_with_removed_text. Translate st_size field for
3938 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3939 failure. Add contents parameter. Update call to get_bfd_fix. Update
3940 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3941 R_XTENSA_ASM_EXPAND relocs.
3942 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3943 call to get_bfd_fix. Include offset from contents for partial_inplace
3945 (is_reloc_sym_weak): New.
3946 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3947 (prop_sec_len): New.
3948 (xtensa_is_property_section): Handle new property sections.
3949 (is_literal_section): Delete.
3950 (internal_reloc_compare): When r_offset matches, compare r_info and
3951 r_addend to make sorting predictable.
3952 (internal_reloc_matches): New.
3953 (xtensa_get_property_section_name): Handle new property sections.
3954 (xtensa_get_property_predef_flags): New.
3955 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3956 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3957 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3958 (xtisa_errno, xtisa_error_msg): New variables.
3959 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3960 (xtensa_insnbuf_alloc): Add error handling.
3961 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3962 use xtensa_format_decode. Add error handling.
3963 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3964 instruction length to find the number of bytes to copy.
3965 (xtensa_isa_init): Add error handling. Replace calls to
3966 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3967 tables in the xtensa_modules structure.
3968 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3969 xtensa_extend_isa): Delete.
3970 (xtensa_isa_free): Change to only free lookup tables.
3971 (opname_lookup_compare): Replace with ...
3972 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3973 (xtensa_insn_maxlength): Rename to ...
3974 (xtensa_isa_maxlength): ... this.
3975 (xtensa_insn_length): Delete.
3976 (xtensa_insn_length_from_first_byte): Replace with ...
3977 (xtensa_isa_length_from_chars): ... this function.
3978 (xtensa_num_opcodes): Rename to ...
3979 (xtensa_isa_num_opcodes): ... this.
3980 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3981 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3982 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3983 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3984 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3985 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3986 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3987 (xtensa_opcode_lookup): Add error handling.
3988 (xtensa_decode_insn): Replace with ...
3989 (xtensa_opcode_decode): ... this function, with new format and
3990 slot parameters. Add error handling.
3991 (xtensa_encode_insn): Replace with ...
3992 (xtensa_opcode_encode): ... this function, which does the encoding via
3993 one of the entries in the "encode_fns" array. Add error handling.
3994 (xtensa_opcode_name): Add error handling.
3995 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3996 xtensa_opcode_is_call): New.
3997 (xtensa_num_operands): Replace with ...
3998 (xtensa_opcode_num_operands): ... this function. Add error handling.
3999 (xtensa_opcode_num_stateOperands,
4000 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4001 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4002 xtensa_operand_is_visible): New.
4003 (xtensa_get_operand, xtensa_operand_kind): Delete.
4004 (xtensa_operand_inout): Add error handling and special-case for
4006 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4007 operate on one slot of an instruction. Added error handling.
4008 (xtensa_operand_encode): Handle default operands with no encoding
4009 functions. Check for success by comparing against decoded value.
4011 (xtensa_operand_decode): Handle default operands. Return decoded value
4012 through argument pointer. Add error handling.
4013 (xtensa_operand_is_register, xtensa_operand_regfile,
4014 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4015 (xtensa_operand_isPCRelative): Rename to ...
4016 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4017 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4018 through argument pointer. Add error handling.
4019 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4020 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4021 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4022 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4023 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4024 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4025 xtensa_state_is_exported, xtensa_sysreg_lookup,
4026 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4027 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4028 xtensa_interface_num_bits, xtensa_interface_inout,
4029 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4030 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4031 * xtensa-modules.c: Rewrite to use new data structures.
4032 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4033 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4034 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4035 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4036 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4037 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4038 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4039 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4040 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4041 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4042 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4043 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4044 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4045 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4046 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4047 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4048 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4049 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4050 * Makefile.in: Regenerate.
4051 * bfd-in2.h: Likewise.
4052 * libbfd.h: Likewise.
4056 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4057 against the absolute section.
4058 (mips_elf64_write_rela): Likewise.
4062 * elf.c (elf_find_function): Don't generally check for matching
4063 section, just for non-file symbols. Remove redunant comparison
4065 * elf32-arm.h (arm_elf_find_function): Likewise.
4069 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4070 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4075 * hash.c (bfd_hash_set_default_size): Use const for table.
4076 Use size_t instead of int for variable compared to sizeof results.
4081 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4085 * elf32-arm.h (elf32_arm_fake_sections,
4086 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4088 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4092 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4094 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4095 need_relative or need_lsda_relative if we are processing an
4096 offset for a reloc on a FDE initial loc or LSDA field
4098 (_bfd_elf_write_section_eh_frame): Test need_relative and
4099 need_lsda_relative in place of corresponding make_* field
4100 when deciding to use pc-relative encodings.
4104 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4105 target2 relocation type.
4110 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4114 * reloc.c: Add BFD_RELOC_ARM_SMI.
4115 * bfd-in2.h: Regenerate.
4120 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4121 vma and output offset to address.
4122 * simple.c (simple_save_output_info): Only set output section
4123 and offset for debug sections, or those not already set up by
4125 (bfd_simple_get_relocated_section_contents): Update comment.
4129 * elf.c (IS_LOADED): Delete.
4130 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4131 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4137 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4138 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4139 redundant assignment of EM_SPARC.
4143 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4144 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4146 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4150 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4151 (elf_backend_modify_segment_map): Don't define.
4155 * elf.c (IS_LOADED): Define.
4156 (assign_file_positions_for_segments): Don't round up file offset of
4157 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4158 Delete code handling link script adjustment of lma. Do the adjust
4159 in later code handling similar ajustments. Remove dead code error
4160 check. Warn if section lma would require a negative offset
4161 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4162 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4163 update voff in section loop. Change voff in segment loop to be an
4164 adjustment on top of "off". Set sec->filepos and update "off" later.
4165 Test for loadable sections consistently using IS_LOADED. Similarly,
4166 test for alloc-only sections other than .tbss consistently.
4167 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4168 Tidy PT_NOTE handling. Use %B and %A in error messages.
4169 (assign_file_positions_except_relocs): Use %B in error message.
4173 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4174 (CONFIG_STATUS_DEPENDENCIES): New.
4175 (Makefile): Removed.
4176 (config.status): Likewise.
4177 * Makefile.in: Regenerated.
4181 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4182 (bfd_elf32_arm_process_before_allocation): Update prototype.
4183 * bfd-in2.h: Regenerate.
4184 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4185 (elf32_arm_link_hash_table_create): Set it.
4186 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4187 (bfd_elf32_arm_set_target_relocs): New function.
4188 (arm_real_reloc_type): New function.
4189 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4190 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4191 (elf32_arm_gc_sweep_hook): Ditto.
4192 (elf32_arm_check_relocs): Ditto.
4193 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4194 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4196 (elf32_arm_got_prel): New variable.
4197 (elf32_arm_howto_from_type): New function.
4198 (elf32_arm_info_to_howto): Use it.
4199 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4200 BFD_RELOC_ARM_TARGET2.
4201 * libbfd.h: Regenerate.
4202 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4206 * ecoff.c: Update u.undef.next refs.
4207 * elf64-ppc.c: Likewise.
4208 * elflink.c: Likewise.
4209 * linker.c: Likewise.
4210 * xcofflink.c: Likewise.
4212 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4213 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4214 fields to indirect struct.
4215 * elf-m10300.c: Update u.weakdef refs.
4216 * elf32-arm.h: Likewise.
4217 * elf32-cris.c: Likewise.
4218 * elf32-frv.c: Likewise.
4219 * elf32-hppa.c: Likewise.
4220 * elf32-i370.c: Likewise.
4221 * elf32-i386.c: Likewise.
4222 * elf32-m32r.c: Likewise.
4223 * elf32-m68k.c: Likewise.
4224 * elf32-ppc.c: Likewise.
4225 * elf32-s390.c: Likewise.
4226 * elf32-sh.c: Likewise.
4227 * elf32-sparc.c: Likewise.
4228 * elf32-vax.c: Likewise.
4229 * elf32-xtensa.c: Likewise.
4230 * elf64-alpha.c: Likewise.
4231 * elf64-hppa.c: Likewise.
4232 * elf64-ppc.c: Likewise.
4233 * elf64-s390.c: Likewise.
4234 * elf64-sh64.c: Likewise.
4235 * elf64-sparc.c: Likewise.
4236 * elf64-x86-64.c: Likewise.
4237 * elfxx-ia64.c: Likewise.
4238 * elfxx-mips.c: Likewise.
4239 * elflink.c: Likewise. Also u.elf_hash_value.
4240 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4242 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4243 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4244 (bfd_elf_gc_record_vtentry): Likewise.
4245 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4249 * Makefile.am: Run "make dep-am".
4250 * Makefile.in: Regenerate.
4251 * bfd-in2.h: Regenerate.
4252 * po/SRC-POTFILES.in: Regenerate.
4253 * po/bfd.pot: Regenerate.
4257 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4258 with bitfields. Make "type" and "other" bitfields too.
4259 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4260 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4261 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4262 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4263 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4264 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4265 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4266 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4267 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4268 * elf-m10300.c: Likewise.
4270 * elf32-arm.h: Likewise.
4271 * elf32-cris.c: Likewise.
4272 * elf32-frv.c: Likewise.
4273 * elf32-hppa.c: Likewise.
4274 * elf32-i370.c: Likewise.
4275 * elf32-i386.c: Likewise.
4276 * elf32-m32r.c: Likewise.
4277 * elf32-m68k.c: Likewise.
4278 * elf32-ppc.c: Likewise.
4279 * elf32-s390.c: Likewise.
4280 * elf32-sh-symbian.c: Likewise.
4281 * elf32-sh.c: Likewise.
4282 * elf32-sh64.c: Likewise.
4283 * elf32-sparc.c: Likewise.
4284 * elf32-vax.c: Likewise.
4285 * elf32-xtensa.c: Likewise.
4286 * elf64-alpha.c: Likewise.
4287 * elf64-hppa.c: Likewise.
4288 * elf64-ppc.c: Likewise.
4289 * elf64-s390.c: Likewise.
4290 * elf64-sh64.c: Likewise.
4291 * elf64-sparc.c: Likewise.
4292 * elf64-x86-64.c: Likewise.
4293 * elflink.c: Likewise.
4294 * elfxx-ia64.c: Likewise.
4295 * elfxx-mips.c: Likewise.
4296 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4297 * configure: Regenerate.
4298 * aclocal.m4: Regenerate.
4302 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4303 around uses of R_ARM_TARGET1.
4304 (elf32_arm_check_relocs): Likewise.
4308 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4310 * bfd-in2.h: Regenerate.
4311 * libbfd.h: Regenerate.
4312 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4313 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4314 (bfd_elf32_arm_process_before_allocation): Ditto.
4315 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4316 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4317 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4322 * hpux-core.c (thread_section_p): New function.
4323 (hpux_core_core_file_p): Fix computation of offset in call
4324 to bfd_seek. Create a ".reg" section from an arbitrary
4325 ".reg/<id>" section if none was created after having read
4330 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4331 * aclocal.m4: Rebuild.
4332 * configure: Rebuild.
4336 * section.c (bfd_sections_find_if): Fix parameter name in
4337 comment to match code.
4341 * elf.c (assign_file_positions_except_relocs): Assign relocs
4342 stored in a bfd section.
4346 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4347 h->gotplt_refcount to 0, not -1.
4351 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4352 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4354 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4355 handle symbol visibility here.
4359 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4360 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4362 (ppc_stub_name): Remove trailing "+0" on stub name.
4363 (create_linkage_sections): Create relocations for
4364 branch lookup table when --emit-relocs as well as when --shared.
4365 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4366 relbrlt test. For --emit-stub-syms, always output a sym even when
4367 one already exists on a plt call stub. Put stub type in the stub
4369 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4371 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4372 reloc_count in stub sections. Adjust relbrlt test.
4373 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4374 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4375 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4376 for relocs against discarded symbols. Fix comments.
4380 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4381 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4383 (map_sections_to_segments): ... here. Use it. Assign a file
4384 position to the .dynamic section if it is not loadable, but part
4385 of the PT_DYNAMIC segment.
4386 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4387 offsets, not VMAs, for the BPABI. Do not fill in the header in
4388 the .got.plt section for the BPABI.
4389 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4391 (elf_backend_want_got_plt): Define to zero for Symbian OS.
4395 * elflink.c (elf_link_add_object_symbols): Set the error code to
4396 bfd_error_wrong_format when the input format does not match the
4401 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4402 (ppc64_elf_check_directives): ..here.
4403 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4404 before accessing ppc64_elf_tdata.
4405 (ppc64_elf_finish_dynamic_sections): And here too.
4409 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4413 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4414 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4415 (bfd_elf32_littlearm_symbian_vec): Likewise.
4416 * configure: Regenerated.
4417 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4418 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4419 (PLT_ENTRY_SIZE): Likewise.
4420 (bfd_vma_elf32_arm_symbian_plt_entry): New
4422 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4424 (create_got_section): Don't create sections when generating BPABI
4426 (elf32_arm_create_dynamic_sections): Tidy.
4427 (elf32_arm_link_hash_table_create): Set plt_header_size,
4428 plt_entry_size, and symbian_p.
4429 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4430 generating BPABI objects.
4431 (allocate_dynrelocs): Use htab->plt_header_size, not
4432 PLT_HEADER_SIZE. Do not add to .got.plt when
4433 generating BPABI objects.
4434 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4435 * elfarm-nabi.c: Add SymbianOS target vectors.
4436 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4437 (_bfd_elf_link_create_dynamic_sections): Likewise.
4438 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4439 (elfNN_bed): Use it.
4440 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4441 (bfd_elf32_littlearm_symbian_vec): Likewise.
4442 (_bfd_target_vector): Add them.
4447 * coffcode.h (handle_COMDAT): Replace abort with an warning
4448 message and allow the scan to continue.
4452 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4453 in when reading relocs, not our sorted syms. Remove unnecessary
4458 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4462 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4463 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4464 replace uses of *_alias with *_noncanonical.
4465 * aclocal.m4: Rebuild with aclocal 1.4p6.
4466 * Makefile.in: Rebuild with automake 1.4p6.
4467 * doc/Makefile.in: Rebuild with automake 1.4p6.
4468 * configure.in: Autoupdate with autoupdate 2.59.
4469 * config.in: Regenerate with autoheader 2.59.
4470 * configure: Regnerate with autoconf 2.59.
4474 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4475 symbol pointer arrays before modifying.
4479 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
4480 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4481 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4482 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
4483 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4484 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4485 Use both symbol tables on non-relocatable objects. Use a common
4486 error exit. Fix "mid" warning.
4487 * libbfd.h: Regenerate.
4488 * bfd-in2.h: Regenerate.
4492 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4494 (struct sfpr_def_parms): Save some space.
4495 (sfpr_define): Here too.
4497 * elf64-ppc.c (compare_symbols): Put section syms first.
4498 (sym_exists_at): New function.
4499 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4500 points only for relocatable files. Use .opd section contents
4501 otherwise. Generally clean up the code.
4505 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4506 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4507 (struct sfpr_def_parms): New.
4508 (sfpr_define): New function.
4509 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4510 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4511 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4512 (savefpr1_tail, restfpr1_tail): New functions.
4513 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4514 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4515 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4516 code. Define all ABI mandated _save and _rest functions.
4520 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
4524 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4529 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4530 that pcrel correction is applied for R_386_PC32.
4534 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4535 for R_386_32 and R_386_PC32 relocs against symbols defined in
4540 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4541 Add new relocations.
4542 * bfd-in2.h: Regenerate.
4543 * libbfd.h: Regenerate.
4544 * elf32-msp430.c: Clean-up code.
4545 (elf_msp430_howto_table): Add new relocation entries.
4546 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4547 (msp430_elf_relax_section): New function.
4548 (msp430_elf_relax_delete_bytes): New function.
4549 (msp430_elf_symbol_address_p): New function.
4553 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4554 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4558 * elflink.c (_bfd_elf_section_already_linked): Handle
4559 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4563 * config.bfd (arm*-*-symbianelf*): New target.
4564 (arm*-*-eabi*): Likewise.
4568 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4569 "struct ppc_link_hash_entry *".
4570 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4571 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4575 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4576 entries (where fd_aux overlaps next entry's fd_func).
4577 Add non_overlapping argument, use it.
4578 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4579 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4580 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4581 as indexes into opd_sym_map/opd_adjust array.
4582 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4586 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4587 if we can look up their function descriptor in a regular file.
4592 * cofflink.c (coff_link_add_symbols): Check that the comdat
4593 pointer in the coff_section_data structure has been initialised
4599 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4600 changing bfd_link_hash_undefined to bfd_link_hash_new.
4604 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4606 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4607 (synthetic_opd, synthetic_relocatable): New variables.
4608 (compare_symbols, compare_relocs): New helper routines.
4609 (ppc64_elf_get_synthetic_symtab): New function.
4610 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4612 * bfd-in2.h: Regenerated.
4613 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4614 to relsyms. Return 0 if abfd is relocatable.
4618 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4622 * (is_arm_mapping_symbol_name): New function - return true
4623 when a symbol name matches the requirements for an ARM mapping
4625 (arm_elf_find_function): New function based on
4626 elf_find_function in elf.c but skipping ARM mapping symbols
4627 and including thumb function symbols.
4628 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4629 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4633 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4634 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4635 (ppc64_elf_brtaken_reloc): Here too.
4639 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4641 (ppc64_elf_check_directives): Check that we have the right hash
4642 table before proceeding.
4646 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4647 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4648 the sections that will be discarded.
4652 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4656 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4657 free space available.
4661 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
4662 occurrences with bfd_byte * thoughout file.
4664 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4665 (xcoff_write_armap_big): Likewise.
4666 (xcoff_write_archive_contents_old): Likewise.
4667 (xcoff_write_archive_contents_big): Likewise.
4669 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4673 * elf32-arm.h: Convert to ISO C90.
4678 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4683 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4684 (bfd_archive_filename, bfd_get_section_ident): Delete.
4685 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4686 bfd_archive_filename.
4687 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4688 to warn about symbols in discarded sections. Use _bfd_error_handler.
4689 * aout-adobe.c (aout_adobe_callback): See below.
4690 * aout-cris.c (swap_ext_reloc_in): ..
4691 * coff-arm.c (find_thumb_glue, find_arm_glue,
4692 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4693 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4694 coff_arm_copy_private_bfd_data): ..
4695 * coff-i860.c (i860_reloc_processing): ..
4696 * coff-mcore.c (mcore_coff_unsupported_reloc,
4697 coff_mcore_relocate_section): ..
4698 * coff-ppc.c (coff_ppc_relocate_section): ..
4699 * coff-rs6000.c (xcoff_create_csect_from_smclas
4700 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4701 sh_swap_insns, sh_relocate_section): ..
4702 * coff-tic54x.c (tic54x_reloc_processing): ..
4703 * coff-tic80.c (coff_tic80_relocate_section): ..
4704 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4705 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4706 coff_slurp_symbol_table, coff_classify_symbol,
4707 coff_slurp_reloc_table): ..
4708 * coffgen.c (_bfd_coff_read_string_table): ..
4709 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4710 _bfd_coff_generic_relocate_section): ..
4711 * cpu-arm.c (bfd_arm_merge_machines): ..
4712 * cpu-sh.c (sh_merge_bfd_arch): ..
4713 * elf-hppa.h (elf_hppa_relocate_section): ..
4714 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4715 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4716 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4717 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4718 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4719 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4720 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4721 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4722 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4723 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4724 cris_elf_merge_private_bfd_data
4725 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4726 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4727 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4728 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4729 elf32_hppa_relocate_section): ..
4730 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4731 i370_elf_check_relocs, i370_elf_relocate_section): ..
4732 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4733 elf_i386_relocate_section): ..
4734 * elf32-m32r.c (m32r_elf_relocate_section,
4735 m32r_elf_merge_private_bfd_data): ..
4736 * elf32-m68hc1x.c (m68hc12_add_stub,
4737 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4738 * elf32-m68k.c (elf_m68k_relocate_section): ..
4739 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4740 mcore_elf_relocate_section): ..
4741 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4742 ppc_elf_check_relocs, ppc_elf_relocate_section,
4743 ppc_elf_begin_write_processing): ..
4744 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4745 elf_s390_relocate_section): ..
4746 * elf32-sh-symbian.c (sh_symbian_import_as,
4747 sh_symbian_process_embedded_commands,
4748 sh_symbian_relocate_section): ..
4749 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4750 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4751 sh_elf_merge_private_data): ..
4752 * elf32-sparc.c (elf32_sparc_check_relocs,
4753 elf32_sparc_relocate_section,
4754 elf32_sparc_merge_private_bfd_data): ..
4755 * elf32-v850.c (v850_elf_check_relocs,
4756 v850_elf_merge_private_bfd_data): ..
4757 * elf32-xtensa.c (elf_xtensa_check_relocs,
4758 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4759 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4760 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4761 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4762 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4763 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4764 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4765 ppc64_elf_relocate_section): ..
4766 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4767 elf_s390_relocate_section): ..
4768 * elf64-sh64.c (sh_elf64_relocate_section): ..
4769 * elf64-sparc.c (sparc64_elf_check_relocs,
4770 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4771 sparc64_elf_merge_private_bfd_data): ..
4772 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4773 elf64_x86_64_relocate_section): ..
4774 * elflink.c (_bfd_elf_add_default_symbol,
4775 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4776 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4777 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4778 elf_get_linked_section_vma, elf_fixup_link_order,
4779 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4780 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4781 * elfxx-ia64.c (elfNN_ia64_relax_section,
4782 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4783 * elfxx-mips.c (mips_elf_perform_relocation,
4784 _bfd_mips_elf_check_relocs,
4785 _bfd_mips_elf_merge_private_bfd_data): ..
4786 * ieee.c (ieee_slurp_external_symbols): ..
4787 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4788 * libbfd.c (_bfd_generic_verify_endian_match): ..
4789 * linker.c (_bfd_generic_link_add_one_symbol,
4790 _bfd_generic_section_already_linked): ..
4791 * pdp11.c (translate_to_native_sym_flags): ..
4792 * pe-mips.c (coff_pe_mips_relocate_section): ..
4793 * peicode.h (pe_ILF_build_a_bfd): ..
4794 * srec.c (srec_bad_byte): ..
4795 * stabs.c (_bfd_link_section_stabs): ..
4796 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4797 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4798 with corresponding %B and %A in _bfd_error_handler format string.
4799 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4800 calls to use %A and %B. Fix "against symbol .. from section" and
4801 similar error messages. Combine multiple _bfd_error_handler calls
4802 where they were separated due to bfd_archive_filename deficiencies.
4803 * bfd-in2.h: Regenerate.
4807 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4812 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4813 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4814 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4816 (link_hash_newfunc): Init was_undefined.
4817 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4818 Use undefweak instead.
4819 (ppc64_elf_check_directives): Fix undefs chain.
4820 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4822 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4823 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4824 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4828 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4829 error, test input_section flags rather than sec.
4833 * elf-bfd.h (struct elf_backend_data): Add
4834 elf_backend_archive_symbol_lookup.
4835 (_bfd_elf_archive_symbol_lookup): Declare.
4836 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4837 (elf_link_add_archive_symbols): ..extracted from here. Call the
4839 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4840 (elfNN_bed): Init new field.
4841 * elf64-ppc.c (elf_backend_check_directives): Define.
4842 (elf_backend_archive_symbol_lookup): Define.
4843 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4844 a ppc_link_hash_entry pointer.
4846 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4847 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4848 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4849 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4850 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4851 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4852 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4857 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4858 (ppc64_elf_add_symbol_hook): Test for NULL section.
4859 (get_sym_h): Formatting.
4860 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4863 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4864 long branch stubs with code handling plt and r2off branch stubs.
4868 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4869 * elflink.c (elf_link_input_bfd): Formatting.
4870 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4872 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4873 (link_hash_newfunc): Don't set it.
4874 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4875 (ppc64_elf_mark_entry_syms): Delete.
4876 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4877 sections. Use get_opd_info.
4878 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4882 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4884 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4885 (func_desc_adjust): Don't set have_undefweak.
4886 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4887 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4889 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4890 "struct ppc_link_hash_entry *". Adjust all references.
4891 (ppc64_elf_hide_symbol): Correct a comment.
4893 * elf64-ppc.c (get_opd_info): New function.
4894 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4895 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4896 before calling get_fdh. Test fdh rather than h before dereferencing
4897 fdh. Mark removed symbols in opd_adjust.
4898 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4899 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4901 (ppc64_elf_output_symbol_hook): Likewise.
4905 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4906 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4907 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4908 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4909 and BFD_RELOC_ARM_SBREL32.
4910 * bfd-in2.h, bbfd.h: Regenerate.
4914 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4915 the dynamic link symbol actually in use.
4919 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4924 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4925 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4931 * bfd.c (_bfd_default_error_handler): Make it global.
4933 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4935 * elf.c (assign_section_numbers): Cope gracefully with sections
4936 which have SHF_LINK_ORDER set but no sh_link set up.
4937 * elflink.c (elf_get_linked_section_vma): Likewise.
4939 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4942 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4943 Set it to _bfd_default_error_handler.
4944 (elfNN_bed): Add elf_backend_link_order_error_handler.
4946 * libbfd-in.h (_bfd_default_error_handler): New.
4948 * libbfd.h: Regenerated.
4952 * archures.c (bfd_mach_sparc_64bit_p): Define.
4953 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4954 * bfd-in2.h: Rebuilt.
4958 Introduce SH2a support.
4960 * archures.c (bfd_mach_sh2a_nofpu): New.
4961 * bfd-in2.h: Rebuilt.
4962 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4963 (arch_info_struct): Add sh2a_nofpu.
4964 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4966 * reloc.c: Add relocs for sh2a.
4967 * bfd-in2.h: Regenerate.
4968 * libbfd.hh: Regenerate.
4970 * archures.c (bfd_mach_sh2a): New.
4971 * bfd-in2.h: Rebuilt.
4972 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4974 (arch_info_struct): Add sh2a.
4975 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4981 * som.c (setup_sections): Improve estimation of space sizes in
4982 relocatable objects.
4985 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4986 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4988 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4989 * configure: Regenerate.
4990 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4991 case that accepts OSABI=NetBSD and OSABI=SysV.
4992 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4993 the base of .got or .data (if .got does not exist).
4994 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4996 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4997 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4998 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4999 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5004 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5005 (elf_sec_group): Defined.
5006 (bfd_elf_match_symbols_in_sections): New prototype.
5007 (_bfd_elf_setup_group_pointers): Likewise.
5009 * elf.c (bfd_elf_discard_group): Abort.
5010 (bfd_elf_set_group_contents): Also include relocation sections.
5011 Remove zero-fill for ld -r.
5012 (_bfd_elf_setup_group_pointers): New function.
5013 (elf_sort_elf_symbol): Likewise.
5014 (elf_sym_name_compare): Likewise.
5015 (bfd_elf_match_symbols_in_sections): Likewise.
5017 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5019 * elflink.c (match_group_member): New.
5020 (elf_link_input_bfd): Check group member for discarded section.
5021 (try_match_symbols_in_sections): New function.
5022 (already_linked): Likewise.
5023 (_bfd_elf_section_already_linked): Support mixing comdat group
5024 and linkonce section.
5026 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5027 * linker.c (bfd_section_already_linked_table_traverse): New.
5029 * libbfd.h: Regenerated.
5033 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5034 BFD_RELOC_CRX_SWITCH32.
5035 * bfd-in2.h: Regenerate.
5036 * libbfd.h: Regenerate.
5037 * elf32-crx.c: Support relocation/relaxation of
5038 BFD_RELOC_CRX_SWITCH* types.
5042 * elf64-ppc.c: Correct "Linker stubs" comment.
5046 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5048 (elf_linked_to_section): New.
5050 * elf.c (assign_section_numbers): Set up sh_link for
5053 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5054 to sh_link for SHT_IA_64_UNWIND sections.
5058 * elflink.c (elf_fixup_link_order): Add _() to error message.
5062 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5067 * aout-adobe.c (aout_32_section_already_linked): Defined.
5068 * aout-target.h (MY_section_already_linked): Likewise.
5069 * aout-tic30.c (MY_section_already_linked): Likewise.
5070 * binary.c (binary_section_already_linked): Likewise.
5071 * bout.c (b_out_section_already_linked): Likewise.
5072 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5073 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5074 * coffcode.h (coff_section_already_linked): Likewise.
5075 * i386msdos.c (msdos_section_already_linked): Likewise.
5076 * i386os9k.c (os9k_section_already_linked): Likewise.
5077 * ieee.c (ieee_section_already_linked): Likewise.
5078 * ihex.c (ihex_section_already_linked): Likewise.
5079 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5080 * mmo.c (mmo_section_already_linked): Likewise.
5081 * nlm-target.h (nlm_section_already_linked): Likewise.
5082 * oasys.c (oasys_section_already_linked): Likewise.
5083 * pef.c (bfd_pef_section_already_linked): Likewise.
5084 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5085 * som.c (som_bfd_discard_group): Likewise.
5086 * srec.c (srec_section_already_linked): Likewise.
5087 * tekhex.c (tekhex_section_already_linked): Likewise.
5088 * versados.c (versados_section_already_linked): Likewise.
5089 * vms.c (vms_section_already_linked): Likewise.
5090 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5091 * xsym.c (bfd_sym_section_already_linked): Likewise.
5093 * bfd-in.h (bfd_section_already_linked_table_init): New.
5094 (bfd_section_already_linked_table_free): Likewise.
5096 * coff-rs6000.c (rs6000coff_vec): Add
5097 _bfd_generic_section_already_linked.
5098 (pmac_xcoff_vec): Likewise.
5099 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5100 (aix5coff64_vec): Likewise.
5102 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5103 * elflink.c (_bfd_elf_section_already_linked): New function.
5105 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5107 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5108 (_bfd_generic_section_already_linked): New.
5109 (bfd_section_already_linked_hash_entry): Likewise.
5110 (bfd_section_already_linked): Likewise.
5111 (bfd_section_already_linked_table_lookup): Likewise.
5112 (bfd_section_already_linked_table_insert): Likewise.
5114 * linker.c (bfd_section_already_linked): New.
5115 (_bfd_section_already_linked_table): Likewise.
5116 (bfd_section_already_linked_table_lookup): Likewise.
5117 (bfd_section_already_linked_table_insert): Likewise.
5118 (already_linked_newfunc): Likewise.
5119 (bfd_section_already_linked_table_init): Likewise.
5120 (bfd_section_already_linked_table_free): Likewise.
5121 (_bfd_generic_section_already_linked): Likewise.
5123 * section.c (bfd_section): Remove comdat.
5124 (bfd_comdat_info): Moved to ...
5125 * bfd-in.h (coff_comdat_info): Here.
5126 (bfd_coff_get_comdat_section): New.
5127 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5128 * libcoff-in.h (coff_section_tdata): Add comdat.
5129 * coffcode.h (handle_COMDAT): Updated.
5130 * cofflink.c (coff_link_add_symbols): Likewise.
5131 * ecoff.c (bfd_debug_section): Likewise.
5133 * targets.c (bfd_target): Add _section_already_linked.
5134 (BFD_JUMP_TABLE_LINK): Updated.
5136 * bfd-in2.h: Regenerated.
5137 * libbfd.h: Likewise.
5138 * libcoff.h: Likewise.
5142 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5143 elf_fixup_link_order): New functions.
5144 (bfd_elf_final_link): Call elf_fixup_link_order.
5148 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5149 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5151 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5152 _bfd_elf_symbol_refs_local_p.
5153 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5158 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5160 (bfd_elf_get_dyn_lib_class): New prototype.
5161 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5163 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5164 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5165 entry is needed. Issue an error if a DT_NEEDED entry is needed
5166 for a file marked DYN_NO_NEEDED.
5167 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5170 * bfd-in2.h: Regenerated.
5174 * elflink.c (elf_section_complain_discarded): Don't complain in
5179 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5180 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5181 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5182 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5184 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5185 bfd_put_64 to bfd_putl64.
5186 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5191 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5192 .init/.fini sections when trying to relax it.
5196 * elf.c (assign_file_positions_for_segments): Make sure the
5197 .dynamic section is the first section in the PT_DYNAMIC segment.
5201 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5202 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5203 sh_elf_get_flags_from_mach functions so that they do not conflict
5204 when this target is built with other sh-elf targets.
5205 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5206 suppression of this function.
5207 (sh_elf_find_flags): Likewise.
5211 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5212 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5213 (BFD32_BACKENDS): Add elf32-crx.lo.
5214 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5215 (cpu-crx.lo): New target.
5216 (elf32-crx.lo): New target.
5217 * Makefile.in: Regenerate.
5218 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5219 (bfd_archures_list): Add bfd_crx_arch.
5220 * bfd-in2.h: Regenerate.
5221 * config.bfd: Handle crx-*-elf*, crx*.
5222 * configure.in: Handle bfd_elf32_crx_vec.
5223 * configure: Regenerate.
5224 * cpu-crx.c: New file.
5225 * elf32-crx.c: Likewise.
5226 * libbfd.h: Regenerate.
5227 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5228 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5229 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5230 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5231 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5232 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5233 * targets.c (bfd_elf32_crx_vec): Declare.
5234 (bfd_target_vector): Add bfd_elf32_crx_vec.
5238 * config.bfd: Add sh-symbian-elf target.
5239 * configure.in: Add bfd_elf32_shl_symbian_vec.
5240 * configure: Regenerate.
5241 * elf-bfd.h (struct elf_backend_data): Add new field
5243 * elflink.c (elf_link_add_object_symbols): Invoke the
5244 check_directives function, if defined.
5245 * elfxx-target.h: Provide a default, NULL definition for
5247 * targets.c: Add bfd_elf32_shl_symbian_vec.
5248 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5250 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5251 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5252 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5253 not already been defined.
5254 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5255 * sh-symbian.c: New file. Provide functions to support the
5256 * sh-symbian-elf target.
5257 * Makefile.am: Add elf32-sh-symbian.c
5258 * Makefile.in: Regenerate.
5262 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5263 * Makefile.am: Ran make dep-am.
5264 * Makefile.in: Ran make dep-in.
5268 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5273 * config.bfd: Add want64 to configuration target s390-*-linux*.
5277 * bfd.c (bfd_get_section_ident): New.
5279 * elflink.c (elf_link_read_relocs_from_section): Call
5280 bfd_get_section_ident to identify the section when reporting
5282 (_bfd_elf_link_output_relocs): Likewise.
5283 (elf_link_output_extsym): Likewise.
5284 (elf_link_input_bfd): Likewise.
5285 (bfd_elf_gc_record_vtinherit): Likewise.
5287 * bfd-in2.h: Regenerated.
5293 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5294 of section symbols to mips_elf_sort_hash_table ().
5298 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5300 (elf_section_complain_discarded): New function. Handle
5301 .gcc_except_table too.
5302 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5303 in discarded sections.
5304 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5308 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5309 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5314 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5315 local references to discarded sections and report their
5320 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5321 sec_info_type, test section name instead.
5326 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5327 in .init/.fini sections.
5331 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5332 bfd_get_section_limit.
5336 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5337 output section size.
5341 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5343 (mmix_elf_perform_relocation): Adjust for above change.
5344 (mmix_elf_relocate_section): Likewise.
5345 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5346 (mmix_elf_get_section_contents): Delete.
5347 (bfd_elf64_get_section_contents): Delete.
5348 (mmix_elf_relocate_section): Zero stub area.
5349 * linker.c (default_indirect_link_order): Alloc max of section size
5351 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5352 * section.c (bfd_malloc_and_get_section): Likewise.
5353 (struct bfd_section): Update rawsize comment.
5354 * bfd-in2.h: Regenerate.
5356 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5360 * bfd-in.h (bfd_get_section_limit): Define.
5361 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5362 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5363 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5364 * coff-arm.c (coff_arm_relocate_section): Likewise.
5365 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5366 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5367 (bfd_ns32k_final_link_relocate): Likewise.
5368 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5369 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5370 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5371 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5372 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5373 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5374 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5375 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5376 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5377 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5378 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5379 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5380 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5381 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5382 * elf32-v850.c (v850_elf_reloc): Likewise.
5383 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5384 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5385 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5386 * elf64-mips.c (mips_elf64_gprel32_reloc)
5387 (mips16_gprel_reloc): Likewise.
5388 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5389 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5390 * elf64-sparc.c (init_insn_reloc): Likewise.
5391 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5392 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5393 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
5394 (_bfd_mips_elf_generic_reloc): Likewise.
5395 * bfd-in2.h: Regenerate.
5399 * bfd-in.h (struct stab_info): Move from stabs.c.
5400 * stabs.c (struct stab_link_includes_table): Delete.
5401 (stab_link_includes_lookup): Delete.
5402 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5403 level of indirection from sinfo parm.
5404 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5405 stabstr section. Adjust hash table accesses.
5406 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5407 alloc. Adjust stab_info test.
5408 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5409 (_bfd_coff_final_link): Adjust stab_info test.
5410 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5411 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5413 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5414 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5415 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5416 stabstr section. Adjust stab_info test.
5417 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5418 (_bfd_write_stab_strings): Adjust prototypes.
5419 * libbfd.h: Regenerate.
5420 * libcoff.h: Regenerate.
5421 * bfd-in2.h: Regenerate.
5426 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5430 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5431 (struct elf32_mn10300_link_hash_entry): Remove
5432 pcrel_relocs_copied.
5433 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5434 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5435 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5436 and gotoff relocations if the symbol doesn't bind locally. Use
5437 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5438 relocation for PCREL32.
5439 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5440 to test whether a symbol binds locally.
5441 (elf32_mn10300_link_hash_newfunc): Don't initialize
5442 pcrel_relocs_copied.
5443 (_bfd_mn10300_elf_discard_copies): Delete.
5444 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5448 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5452 * som.c (som_set_reloc_info): Correct small typo.
5456 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5457 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5458 (m32r_elf_gcsweep_hook): Likewise.
5459 (m32r_elf_check_relocs): Likewise.
5460 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5461 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5462 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5463 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
5464 * bfd-in2.h: Regenerated.
5465 * libbfd.h: Regenerated.
5469 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5471 (elf64_x86_64_relocate_section): Issue an error for
5472 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5473 against global symbols when building shared library.
5477 * section.c (struct sec): Rename "_cooked_size" to "size".
5478 Rename "_raw_size" to "rawsize".
5479 (STD_SECTION): Adjust comments.
5480 (bfd_set_section_size, bfd_get_section_contents): Use size.
5481 (bfd_malloc_and_get_section): New function.
5482 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5483 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5484 Correctly free reloc and contents memory.
5485 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5486 and fake CIE now that we can shink section size to zero.
5487 (_bfd_elf_write_section_eh_frame): Likewise..
5488 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5489 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5490 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5491 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5492 unneeded indirection.
5493 * elf.c (_bfd_elf_section_offset): .. and update call.
5494 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5495 * libbfd.h: Regenerate.
5496 * bfd-in2.h: Regenerate.
5498 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5499 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5500 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5501 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5502 Similarly use "rawsize", if non-zero, in reloc functions to validate
5503 reloc addresses. Use new bfd_malloc_and_get_section in most places
5504 where bfd_get_section_contents was called. Expand all occurrences of
5505 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5506 grok_prstatus and similar functions to "size".
5507 * aix386-core.c (aix386_core_file_p): ..
5508 * aix5ppc-core.c (xcoff64_core_p): ..
5509 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5510 aout_adobe_set_section_contents): ..
5511 * aout-target.h (callback): ..
5512 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5513 MY_bfd_final_link): ..
5514 * aoutf1.h (sunos4_core_file_p): ..
5515 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5516 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5517 final_link, aout_link_input_section): ..
5518 * binary.c (binary_object_p, binary_canonicalize_symtab,
5519 binary_set_section_contents): ..
5520 * bout.c (b_out_callback, b_out_write_object_contents,
5521 b_out_set_section_contents, b_out_bfd_relax_section,
5522 b_out_bfd_get_relocated_section_contents): ..
5523 * cisco-core.c (cisco_core_file_validate): ..
5524 * coff-alpha.c (alpha_ecoff_object_p,
5525 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5526 * coff-arm.c (coff_arm_relocate_section,
5527 bfd_arm_allocate_interworking_sections): ..
5528 * coff-h8300.c (h8300_reloc16_extra_cases,
5529 h8300_bfd_link_add_symbols): ..
5530 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5531 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5532 ppc_bfd_coff_final_link): ..
5533 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5534 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5535 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5536 * coff64-rs6000.c (xcoff64_write_object_contents,
5537 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5538 * coffcode.h (coff_compute_section_file_positions,
5539 coff_write_object_contents): ..
5540 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5541 coff_section_symbol, build_debug_section): ..
5542 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5543 process_embedded_commands, _bfd_coff_link_input_bfd,
5544 _bfd_coff_write_global_sym): ..
5545 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5546 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5547 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5548 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5549 _bfd_dwarf2_find_nearest_line): ..
5550 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5551 ecoff_compute_section_file_positions,
5552 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5553 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5554 _bfd_elf_discard_section_eh_frame_hdr,
5555 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5556 _bfd_elf_write_section_eh_frame,
5557 _bfd_elf_write_section_eh_frame_hdr): ..
5558 * elf-hppa.h (elf_hppa_sort_unwind): ..
5559 * elf-m10200.c (mn10200_elf_relax_section,
5560 mn10200_elf_relax_delete_bytes,
5561 mn10200_elf_get_relocated_section_contents): ..
5562 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5563 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5564 mn10300_elf_relax_delete_bytes,
5565 mn10300_elf_get_relocated_section_contents,
5566 _bfd_mn10300_elf_adjust_dynamic_symbol,
5567 _bfd_mn10300_elf_discard_copies,
5568 _bfd_mn10300_elf_size_dynamic_sections,
5569 _bfd_mn10300_elf_finish_dynamic_sections): ..
5570 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5571 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5572 bfd_elf_set_group_contents, map_sections_to_segments,
5573 elf_sort_sections, assign_file_positions_for_segments,
5574 SECTION_SIZE, copy_private_bfd_data,
5575 _bfd_elf_get_dynamic_reloc_upper_bound,
5576 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5577 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5578 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5579 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5580 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5581 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5582 bfd_elf32_arm_process_before_allocation,
5583 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5584 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5585 elf32_arm_write_section): ..
5586 * elf32-cris.c (cris_elf_grok_prstatus,
5587 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5588 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5589 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5590 elf_cris_discard_excess_dso_dynamics,
5591 elf_cris_discard_excess_program_dynamics): ..
5592 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5593 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5594 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5595 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5596 elf32_frvfdpic_size_dynamic_sections,
5597 elf32_frvfdpic_modify_segment_map,
5598 elf32_frvfdpic_finish_dynamic_sections): ..
5599 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5600 elf32_h8_get_relocated_section_contents): ..
5601 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5602 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5603 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5604 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5605 elf32_hppa_finish_dynamic_sections): ..
5606 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5607 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5608 i370_elf_finish_dynamic_sections): ..
5609 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5610 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5611 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5612 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5613 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5614 * elf32-ip2k.c (ip2k_is_switch_table_128,
5615 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5616 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5617 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5618 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5619 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5620 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5621 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5622 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5623 m32r_elf_get_relocated_section_contents): ..
5624 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5625 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5626 m68hc11_elf_relax_delete_bytes): ..
5627 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5628 m68hc12_elf_size_one_stub): ..
5629 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5630 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5631 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5632 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5633 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5634 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5635 elf32_mips_grok_prstatus): ..
5636 * elf32-or32.c (or32_elf_consth_reloc): ..
5637 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5638 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5639 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5640 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5641 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5642 ppc_elf_final_write_processing): ..
5643 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5644 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5645 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5646 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5647 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5648 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5649 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5650 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5651 * elf32-sh64-com.c (sh64_address_in_cranges,
5652 sh64_get_contents_type): ..
5653 * elf32-sh64.c (sh64_find_section_for_address,
5654 sh64_elf_final_write_processing): ..
5655 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5656 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5657 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5658 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5659 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5660 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5661 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5662 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5663 elf_vax_finish_dynamic_sections): ..
5664 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5665 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5666 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5667 xstormy16_elf_finish_dynamic_sections): ..
5668 * elf32-xtensa.c (xtensa_read_table_entries,
5669 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5670 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5671 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5672 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5673 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5674 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5675 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5676 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5677 xtensa_callback_required_dependence): ..
5678 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5679 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5680 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5681 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5682 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5683 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5684 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5685 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5686 * elf64-hppa.c (allocate_dynrel_entries,
5687 elf64_hppa_size_dynamic_sections,
5688 elf64_hppa_finish_dynamic_sections): ..
5689 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5690 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5691 elf64_mips_grok_prstatus): ..
5692 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5693 mmix_elf_relocate_section, mmix_elf_final_link,
5694 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5695 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5696 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5697 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5698 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5699 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5700 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5701 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5702 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5703 ppc64_elf_finish_dynamic_sections): ..
5704 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5705 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5706 elf_s390_finish_dynamic_sections): ..
5707 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5708 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5709 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5710 sh64_elf64_finish_dynamic_sections): ..
5711 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5712 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5713 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5714 sparc64_elf_finish_dynamic_symbol,
5715 sparc64_elf_finish_dynamic_sections): ..
5716 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5717 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5718 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5719 elf64_x86_64_finish_dynamic_sections): ..
5720 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5721 * elfcode.h (elf_slurp_reloc_table): ..
5722 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5723 elf_finalize_dynstr, elf_link_add_object_symbols,
5724 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5725 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5726 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5727 elf32_mips_grok_prstatus): ..
5728 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5729 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5730 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5731 elfNN_ia64_finish_dynamic_sections): ..
5732 * elfxx-mips.c (mips_elf_create_procedure_table,
5733 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5734 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5735 mips_elf_global_got_index, mips_elf_multi_got,
5736 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5737 mips_elf_allocate_dynamic_relocations,
5738 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5739 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5740 _bfd_mips_elf_always_size_sections,
5741 _bfd_mips_elf_size_dynamic_sections,
5742 _bfd_mips_elf_finish_dynamic_symbol,
5743 _bfd_mips_elf_finish_dynamic_sections,
5744 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5745 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5746 _bfd_elf_mips_get_relocated_section_contents,
5747 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5748 * hp300hpux.c (callback): ..
5749 * hppabsd-core.c (make_bfd_asection): ..
5750 * hpux-core.c (make_bfd_asection): ..
5751 * i386linux.c (linux_link_create_dynamic_sections,
5752 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5753 * i386msdos.c (msdos_write_object_contents): ..
5754 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5755 os9k_set_section_contents): ..
5756 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5757 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5758 ieee_write_section_part, do_with_relocs, do_as_repeat,
5759 do_without_relocs, ieee_write_debug_part, init_for_output,
5760 ieee_set_section_contents): ..
5761 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5762 * irix-core.c (do_sections, make_bfd_asection): ..
5763 * libaout.h (aout_section_merge_with_text_p): ..
5764 * libbfd.c (_bfd_generic_get_section_contents,
5765 _bfd_generic_get_section_contents_in_window): ..
5766 * linker.c (default_indirect_link_order): ..
5767 * lynx-core.c (make_bfd_asection): ..
5768 * m68klinux.c (linux_link_create_dynamic_sections,
5769 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5770 * mach-o.c (bfd_mach_o_make_bfd_section,
5771 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5772 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5773 bfd_mach_o_scan_read_segment): ..
5774 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5775 _bfd_merge_sections): ..
5776 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5777 mmo_map_set_sizes, mmo_canonicalize_symtab,
5778 mmo_internal_write_section, mmo_write_object_contents): ..
5779 * netbsd-core.c (netbsd_core_file_p): ..
5780 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5781 nlm_alpha_set_public_section): ..
5782 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5783 * nlm32-sparc.c (nlm_sparc_write_import): ..
5784 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5785 nlm_compute_section_file_positions): ..
5786 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5787 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5788 * opncls.c (get_debug_link_info): ..
5789 * osf-core.c (make_bfd_asection): ..
5790 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5791 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5792 final_link, aout_link_input_section): ..
5793 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5794 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5795 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5796 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5797 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5798 * ptrace-core.c (ptrace_unix_core_file_p): ..
5799 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5800 _bfd_final_link_relocate, bfd_generic_relax_section,
5801 bfd_generic_get_relocated_section_contents): ..
5802 * reloc16.c (bfd_coff_reloc16_relax_section,
5803 bfd_coff_reloc16_get_relocated_section_c): ..
5804 * riscix.c (riscix_some_aout_object_p): ..
5805 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5806 * sco5-core.c (make_bfd_asection): ..
5807 * simple.c (bfd_simple_get_relocated_section_contents): ..
5808 * som.c (som_object_setup, setup_sections, som_prep_headers,
5809 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5810 som_set_reloc_info, som_get_section_contents,
5811 som_bfd_link_split_section): ..
5812 * sparclinux.c (linux_link_create_dynamic_sections,
5813 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5814 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5815 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5816 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5817 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5818 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5819 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5820 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5821 sunos_finish_dynamic_link): ..
5822 * syms.c (_bfd_stab_section_find_nearest_line): ..
5823 * tekhex.c (first_phase, tekhex_set_section_contents,
5824 tekhex_write_object_contents): ..
5825 * trad-core.c (trad_unix_core_file_p): ..
5826 * versados.c (process_esd, process_otr, process_otr): ..
5827 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5828 * vms-misc.c (add_new_contents): ..
5829 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5830 * vms.c (vms_set_section_contents): ..
5831 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5832 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5833 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5834 * xsym.c (bfd_sym_scan): .. See above.
5838 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5839 calling _bfd_merged_section_offset only for section symbols.
5843 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5844 for handling SEC_MERGE symbols in relax_section.
5849 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5850 linked together. Mark the result as h8300sx code.
5854 * elf-bfd.h (struct elf_backend_data): Added
5855 elf_backend_omit_section_dynsym.
5856 (_bfd_elf_link_omit_section_dynsym): Declare.
5857 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5858 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5859 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5860 (_bfd_elf_link_renumber_dynsyms): ... this function.
5861 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5862 _bfd_elf_link_omit_section_dynsym).
5863 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5867 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5872 * bfd-in.h (bfd_cache_close_all): New function declaration.
5873 * bfd-in2.h: Regenerate.
5874 * cache.c (bfd_cache_close_all): New function definition.
5878 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5880 * configure: Regenerate.
5884 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5885 the pre-existing section.
5889 * section.c (struct sec): Remove usused flags. Reorganize a little.
5890 (bfd_get_section_size_before_reloc): Delete.
5891 (bfd_get_section_size_after_reloc): Delete.
5892 (STD_SECTION): Update.
5893 (bfd_get_section_size_now): Delete.
5894 (bfd_set_section_contents): Don't referece reloc_done.
5895 (bfd_get_section_contents): Remove reloc_done comment.
5896 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5898 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5899 * ecoff.c (bfd_debug_section): Update initializer.
5900 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5901 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5902 * bfd-in.h (bfd_section_size): Expand.
5903 (bfd_get_section_size): New macro.
5904 * bfd-in2.h: Regenerate.
5905 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5906 bfd_get_section_size_before_reloc with bfd_get_section_size.
5907 * coffcode.h (coff_write_object_contents): Likewise.
5908 * coffgen.c (build_debug_section): Likewise.
5909 * dwarf1.c (parse_line_table): Likewise.
5910 (_bfd_dwarf1_find_nearest_line): Likewise.
5911 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5912 * i386msdos.c (msdos_write_object_contents): Likewise.
5913 * pdp11.c (squirt_out_relocs): Likewise.
5914 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5915 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5919 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5920 removal) with updated comment.
5921 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5923 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5924 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5928 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5929 overflow on branches to undefweaks.
5933 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5934 as ecoff_section_data() does not return a valid lvalue.
5938 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5939 (elf_link_add_object_symbols): Likewise.
5941 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5942 (elf_backend_reloc_type_class): New.
5946 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5948 * configure: Regenerate.
5953 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5958 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5963 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5964 for linking, but otherwise adjust reloc for merged sections.
5968 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5969 _bfd_merged_section_offset for local symbols.
5973 * Makefile.am: Regenerate dependencies.
5974 * Makefile.in: Regenerate.
5975 * archures.c: Add bfd_mach_sh3_nommu .
5976 * bfd-in2.h: Regenerate.
5977 * cpu-sh.c: Add sh3-nommu architecture.
5978 (bfd_to_arch_table): Create new table.
5979 (sh_get_arch_from_bfd_mach): Create new function.
5980 (sh_get_arch_up_from_bfd_mach): Create new function.
5981 (sh_merge_bfd_arch): Create new function.
5982 * elf32-sh.c (sh_ef_bfd_table): Add table.
5983 (sh_elf_check_relocs): Replace switch statement with
5984 use of sh_ef_bfd_table .
5985 (sh_elf_get_flags_from_mach): Add new function.
5986 (sh_find_elf_flags): Likewise.
5987 (sh_elf_copy_private_data): Replace most of non-elf contents
5988 with a call to sh_merge_bfd_arch() .
5992 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5993 * Makefile.in: Regenerate.
5997 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5998 custom calling conventions for dynamic symbols.
5999 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6000 symbol if it's an alias to a global one.
6004 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6009 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6014 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6015 for SHT_GROUP sections.
6019 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6021 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6022 * merge.c: Formatting. Remove unnecessary casts. Expand
6023 bfd_get_section_alignment macro.
6024 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6025 use throughout file.
6026 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6027 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6028 section name to determine sinfo group, instead test output section
6030 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6031 _bfd_strip_section_from_output rather than just twiddling flags.
6032 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6033 (_bfd_merge_sections): Update prototype.
6034 * libbfd.h: Regenerate.
6038 * netbsd-core.c: Correctly indent section that sets architecture
6042 * m88kopenbsd.c: New file.
6043 * targets.c (m88k_openbsd_vec): New.
6044 * config.bfd: Add m88k-*-openbsd*.
6045 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6046 (m88kopenbsd_vec): New.
6047 * configure: Regenerate.
6048 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6049 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6051 * Makefile.in: Regenerate.
6052 * po/SRC-POTFILES.in: Regenerate.
6056 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6057 introduced by hash table size patch.
6061 * configure.in (is_release): Remove.
6062 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6063 (AC_OUTPUT): Don't output bfdver.h from version.h.
6064 * configure: Regenerate.
6065 * Makefile.am (RELEASE): New variable.
6066 (bfdver.h): New target.
6067 * Makefile.in: Regenerate.
6068 * doc/Makefile.in: Likewise.
6072 * Makefile.am (config.status): Don't depend on version.h.
6073 * Makefile.in: Regenerate.
6077 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6078 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6079 * libbfd.h: Regenerate.
6080 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6081 (_bfd_elf_rel_local_sym): Likewise.
6082 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6083 (elf_link_input_bfd): Likewise.
6084 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6085 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6086 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6087 (elfNN_ia64_relocate_section): Likewise.
6091 * hash.c (bfd_default_hash_table_size): New variable.
6092 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6093 (bfd_hash_set_default_size): New function. Set the default size
6094 to a selected prime number close to the argument. Document new
6096 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6097 * bfd-in2.h: Regenerate.
6098 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6099 * Makefile.in: Regenerate.
6103 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6104 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6105 arm, m68k, m88k and hppa core files.
6109 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6110 (bfd_bwrite): Likewise.
6111 (bfd_tell): Likewise.
6112 (bfd_flush): Likewise.
6113 (bfd_stat): Likewise.
6114 (bfd_seek): Likewise.
6115 (bfd_get_mtime): Likewise.
6116 (bfd_get_size): Likewise.
6120 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6124 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6125 (bfd_generic_openr_next_archived_file): Likewise.
6129 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6130 section names by inserting a new substring after .gnu.linkonce, except
6131 for .gnu.linkonce.t.* where the "t." is replaced.
6135 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6136 (m68-*-lynxos* case): Likewise.
6137 (powerpc-*-lyxnos* case): New case.
6138 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6142 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6143 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6144 * bfd.c (bfd_copy_private_header_data): Define.
6145 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6147 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6148 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6149 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6150 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6151 segments by calling copy_private_bfd_data.
6152 (_bfd_elf_copy_private_header_data): Define.
6153 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6154 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6155 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6156 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6157 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6158 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6159 * som.c (som_bfd_copy_private_header_data): Define.
6160 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6161 * vms.c (vms_bfd_copy_private_header_data): Define.
6162 * bfd-in2.h: Regenerate.
6163 * libbfd.h: Regenerate.
6167 * elfxx-mips.c (MINUS_TWO): Define.
6168 (mips_elf_higher, mips_elf_highest,
6169 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6170 some bfd_vma values.
6171 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6175 * som.c (log2): Rename to exact_log2. Adjust all callers.
6179 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6180 dwarf3 format CIE entries. Remove comment about the size of the
6181 ra_column field. It is now correctly deduced.
6185 * config.bfd (or32-*-rtems*): Switch to elf.
6189 * po/fr.po: Updated French translation.
6193 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6194 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6195 Adjust counting of last_local.
6196 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6197 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6198 created by the linker nor !SHF_ALLOC.
6200 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6201 DT_PLTGOT to the start of the .got.plt section instead of the
6202 .got output section. Set sh_entsize for .got section in addition
6204 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6205 is at sgot->output_section->vma.
6206 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6207 DT_PLTGOT to the start of the .got.plt section instead of the
6208 .got output section.
6209 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6210 is at sgot->output_section->vma. Set sh_entsize for .got section
6211 in addition to .got.plt.
6212 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6213 (bfd_section_from_phdr): Likewise.
6214 (map_sections_to_segments): Likewise.
6215 (assign_file_positions_for_segments): Likewise.
6216 (get_program_header_size): Likewise.
6217 * elflink.c (bfd_elf_size_dynamic_sections): Set
6218 elf_tdata (output_bfd)->relro from info->relro.
6219 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6223 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6224 a zero symndx for which we hadn't accounted a dynamic relocation.
6225 (_frvfdpic_add_rofixup): Likewise.
6230 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6231 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6232 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6233 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6237 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6238 immediately if there's no link info.
6239 (elf32_frvfdpic_copy_private_bfd_data): New.
6240 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6244 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6245 filename argument is null; do not call strlen on a null pointer.
6249 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6254 * configure.in (bfd_elf32_frvfdpic_vec): New.
6255 * configure: Rebuilt.
6256 * targets.c (bfd_elf32_frvfdpic_vec): New.
6257 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6259 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6260 frvfdpic instead of frv. Rearrange elf-target macros such that
6261 the FDPIC-specific ones are only defined for this new target
6263 (bfd_elf32_frvfdpic_vec): Declare.
6265 (elf32_frv_relocate_section): Use it to enable segment checking
6266 and to control rofixup emission. Add output section vma to
6267 applied relocation in non-LOAD non-ALLOC sections. Use
6268 _bfd_error_handler for errors.
6269 (_frv_create_got_section): Create .rel.got and .rofixup only in
6270 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6272 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6273 (elf32_frvfdpic_modify_segment_map): Likewise.
6274 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6275 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6276 error message if we miscompute the rofixup size.
6277 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6278 (frvfdpic_elf_encode_eh_address): Likewise.
6279 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6280 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6281 relocs. Reject unknown relocation types.
6282 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6283 (frv_elf_merge_private_bfd_data): Likewise.
6284 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6285 0x4000 for newly-added elf32-frvfdpic.
6290 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6291 returning NULL as most users of this function do not check its
6293 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6294 of bfd_cache_lookup().
6295 * sco5-core.c (sco5_core_file_p): Likewise.
6296 * trad-core.c (trad_unix_core_file_p): Likewise.
6300 * cache.c (bfd_cache_lookup): Improve formatting.
6301 * archive.c: Fix formatting.
6305 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6306 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6307 * bfd-in2.h(bfd_architecture): Regenerate.
6311 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6313 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6314 those against discarded link-once and SEC_MERGE section symbols.
6318 * section.c (bfd_get_section_by_name_if): New.
6319 * bfd-in2.h: Regenerated.
6323 * som.c (som_bfd_is_group_section): Define.
6327 * section.c (bfd_make_section_anyway): Copy the whole
6328 bfd_hash_entry, not just "next" from existing entry.
6332 * elf.c (bfd_section_from_shdr): Maintain the section order in
6334 (special_sections): Add ".note.GNU-stack".
6335 (elf_fake_sections): Handle section group for relocatable
6340 * section.c (bfd_sections_find_if): New.
6341 * bfd-in2.h: Regenerated.
6345 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6347 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6348 * elf.c (bfd_elf_is_group_section): New function.
6349 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6350 * section.c (bfd_generic_is_group_section): New function.
6351 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6352 (BFD_JUMP_TABLE_LINK): Adjust.
6353 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6354 * aout-target.h (MY_bfd_is_group_section): Define.
6355 * aout-tic30.c (MY_bfd_is_group_section): Define.
6356 * bfd.c (bfd_is_group_section): Define.
6357 * binary.c (binary_bfd_is_group_section): Define.
6358 * bout.c (b_out_bfd_is_group_section): Define.
6359 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6360 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6361 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6362 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6363 * coffcode.h (coff_bfd_is_group_section): Define.
6364 * i386msdos.c (msdos_bfd_is_group_section): Define.
6365 * i386os9k.c (os9k_bfd_is_group_section): Define.
6366 * ieee.c (ieee_bfd_is_group_section): Define.
6367 * ihex.c (ihex_bfd_is_group_section): Define.
6368 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6369 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6370 * mmo.c (mmo_bfd_is_group_section): Define.
6371 * nlm-target.h (nlm_bfd_is_group_section): Define.
6372 * oasys.c (oasys_bfd_is_group_section): Define.
6373 * pef.c (bfd_pef_bfd_is_group_section): Define.
6374 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6375 * srec.c (srec_bfd_is_group_section): Define.
6376 * tekhex.c (tekhex_bfd_is_group_section): Define.
6377 * versados.c (versados_bfd_is_group_section): Define.
6378 * vms.c (vms_bfd_is_group_section): Define.
6379 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6380 * bfd-in2.h: Regenerate.
6381 * libbfd.h: Regenerate.
6385 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6389 * configure.in: Update version to 2.15.91.
6390 * configure: Regenerate.
6394 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6395 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6396 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6397 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6398 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6399 .gnu.linkonce.wi. sections.
6400 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6401 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6403 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6404 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6408 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6409 * bfd-in2.h: Regenerate.
6410 * libbfd.h: Likewise.
6414 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6416 (setup_sections): Use som_subspace_dictionary_record struct instead
6417 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6418 is_comdat, is_common or dup_common.
6419 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6420 is_comdat, is_common and dup_common in section subspace_dict from
6422 (som_begin_writing): Use som_subspace_dictionary_record struct.
6423 (som_finish_writing): Likewise.
6424 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6425 is_common and dup_common flags in info for symbol. Add comment
6426 regarding linker support for these fields. Slightly reorganize
6428 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6429 dup_common fields in symbol table from symbol info.
6430 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6431 arguments. Set corresponding fields in copy_data. Change all callers.
6432 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6434 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6435 * som.h (som_subspace_dictionary_record): Define.
6436 (som_copyable_section_data_struct): Add is_comdat, is_common and
6438 (som_section_data_struct): Use som_subspace_dictionary_record struct
6439 instead of subspace_dictionary_record.
6440 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6444 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6445 if set. Check reloc_done flag before applying relocations. Use
6446 output addresses, both when applying relocations and when comparing
6447 against the specified section.
6448 (elf_xtensa_relocate_section): Use output address to check if dynamic
6449 reloc is in a literal pool. Set section's reloc_done flag.
6453 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6454 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6456 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6461 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6462 structure field removed in 2004-04-24 patch.
6463 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6465 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6467 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6468 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6469 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6470 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6471 field before calling elf_backend_section_flags.
6475 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6476 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6477 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6478 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6479 and BFD_RELOC_32_PCREL.
6480 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6481 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6482 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6483 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6484 (mips_elf_next_relocation): Move comment about matching HI/LO
6486 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6487 R_MIPS_GNU_REL_HI16.
6491 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6492 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6493 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6494 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6495 and update comments to reflect current usage.
6496 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6497 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6499 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6500 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6501 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6502 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6503 type number to be MIPS_R_PCREL16.
6504 (mips_relocate_section): Remove support for link-time relaxation
6505 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6506 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6507 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6508 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6509 relaxation of branches used by embedded-PIC.
6510 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6511 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6512 related members, update comment.
6513 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6514 code related to embedded-PIC.
6515 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6516 initialization of now-removed 'adjust' member of
6517 'struct ecoff_debug_info'.
6521 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6525 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6526 relocs for locally defined symbols during -shared final link.
6527 (elf32_arm_final_link_relocate): Likewise.
6531 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6532 ELF_LINK_POINTER_EQUALITY_NEEDED.
6533 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6534 if r_type is not R_X86_64_PC32.
6535 (elf64_x86_64_finish_dynamic_symbol): If
6536 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6541 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6542 (elf_backend_plt_sym_val): Define.
6546 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6550 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
6552 * som.c (som_set_section_contents): Constantify second argument.
6553 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6554 (som_object_setup): Rework to avoid warning.
6555 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6560 * cache.c (bfd_cache_close): Check for a previously closed file.
6564 * bfd.c (bfd_get_synthetic_symtab): Define.
6565 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6566 NAME##_get_synthetic_symtab.
6567 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6568 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6569 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6571 (_bfd_elf_get_synthetic_symtab): New prototype.
6572 * elfcode.h (elf_get_synthetic_symtab): Define.
6573 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6574 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6575 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6576 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6577 * bfd-in2.h: Rebuilt.
6578 * libbfd.h: Rebuilt.
6579 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6580 (elf_backend_plt_sym_val): Define.
6581 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6582 (elf_backend_plt_sym_val): Define.
6583 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6584 (elf_backend_plt_sym_val): Define.
6585 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6586 (elf_backend_plt_sym_val): Define.
6587 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6588 (elf_backend_plt_sym_val): Define.
6589 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6590 (elf_backend_plt_sym_val): Define.
6591 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6592 (elf_backend_plt_sym_val): Define.
6593 * aout-target.h (MY_get_synthetic_symtab): Define.
6594 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6595 * coff-rs6000.c (rs6000coff_vec): Add
6596 _bfd_nodynamic_get_synthetic_symtab.
6597 (pmac_xcoff_vec): Likewise.
6598 * coff64-rs6000.c (rs6000coff64_vec): Add
6599 _bfd_nodynamic_get_synthetic_symtab.
6600 (aix5coff64_vec): Likewise.
6601 * sunos.c (MY_get_synthetic_symtab): Define.
6602 * vms.c (vms_get_synthetic_symtab): Define.
6606 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6610 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6611 * bfd2-in.h: Regenerate.
6612 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6616 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6617 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6618 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6619 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6620 * bfd-in2.h: Regenerate.
6624 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6625 require relocations against a weak symbol to reference the same
6626 symbol hash entry if not a final, static link.
6627 (get_cached_value, add_value_map): Add final_static_link argument.
6628 (remove_literals): Pass final_static_link argument as needed.
6632 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6633 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6634 (opncls_bwrite, opncls_bclose, opncls_bflush)
6635 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6636 bfd iovec that uses function callbacks.
6637 (bfd_close): Use the iovec's bclose.
6638 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6639 (cache_bclose, cache_bflush, cache_bstat)
6640 (cache_iovec): New functions and global variable, implement a
6641 cache "iovec", where applicable set bfd_error.
6642 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6643 * bfdio.c (struct bfd_iovec): Define.
6644 (real_read): Delete function.
6645 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6646 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6647 assume that bread and bwrite set bfd_error.
6648 * bfd.c (struct bfd): Add "iovec", update comments.
6649 * bfd-in2.h, libbfd.h: Re-generate.
6653 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6657 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6658 (bfd_elf_gc_sections): Fail if a shared object is being created.
6659 Do not fail if dynamic sections have been created. Instead call
6660 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6661 dynamically referenced symbols. Do not mark the whole graph
6662 rooted at .eh_frame, only the section proper.
6666 * reloc.c: Add BFD_RELOC_32_SECREL.
6667 * bfd-in2.h: Regenerate.
6668 * libbfd.h: Likewise.
6669 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6670 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6671 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6675 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6676 relocs against hidden/protected undefweak symbols properly.
6677 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6681 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6682 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6687 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6688 filepos for the SizeOfHeaders field.
6689 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6691 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6695 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6696 change reloc_done. Set and restore _cooked_size.
6701 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6706 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6710 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6714 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6715 when it is a definition.
6719 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6720 when statically linking PIC code.
6721 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6725 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6726 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6727 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6728 * configure: Regenerate.
6732 * elflink.c: Include libiberty.h.
6733 * Makefile.am (elflink.lo): Depend on libiberty.h.
6734 * Makefile.in: Regenerate.
6738 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6743 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6744 reserve the memory for dynamic linker
6748 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6749 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6753 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6754 RELOC_FOR_GLOBAL_SYMBOL.
6755 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6759 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6760 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6764 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6765 * elf32-arm.h (struct elf32_elf_section_map): New.
6766 (struct _arm_elf_section_data): New.
6767 (elf32_arm_section_data): Define.
6768 (struct elf32_arm_link_hash_table): Add byteswap_code.
6769 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6770 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6771 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6772 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6773 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6774 (bfd_elf32_new_section_hook, elf_backend_write_section,
6775 elf_backend_link_output_symbol_hook): Define.
6779 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6780 that keeps the characters in a B_INCL..B_EINCL range.
6781 (_bfd_link_section_stabs): When computing the sum of the
6782 characters in a B_INCL..B_EINCL range also keep a copy of those
6783 characters. Use this information to distinguish between
6784 include sections that have the same sum and the same length
6785 but which are nevertheless unique.
6789 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6790 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6794 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6795 to 'sum_chars' and add field 'num_chars'.
6796 (_bfd_link_section_stabs): When computing the sum of the
6797 characters in a B_INCL..B_EINCL range also keep a count of the
6798 number of characters. Use this information to help distinguish
6799 between include sections when have the same sum but which
6800 nevertheless are still unique.
6804 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6809 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6810 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6811 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6812 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6813 (cpu-cr16c.lo): New target.
6814 (elf32-cr16c.lo): Likewise.
6815 * Makefile.in: Regenerate.
6816 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6817 (bfd_archures_list): Add bfd_cr16c_arch.
6818 * config.bfd: Handle cr16c-*-elf*.
6819 * configure.in: Handle bfd_elf32_cr16c_vec.
6820 * configure: Regenerate.
6821 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6822 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6823 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6824 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6825 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6826 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6827 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6828 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6829 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6830 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6831 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6832 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6833 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6834 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6835 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6836 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6837 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6838 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6839 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6840 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6841 * targets.c (bfd_elf32_cr16c_vec): Declare.
6842 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6843 * cpu-cr16c.c: New file.
6844 * elf32-cr16c.c: Likewise.
6845 * libbfd.h: Regenerate.
6846 * bfd-in2.h: Likewise.
6850 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6854 * Makefile.am: Remove all mention of elflink.h.
6855 * Makefile.in: Regenerate.
6856 * bfd-in.h (bfd_elf_discard_info): Declare.
6857 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6858 * bfd-in2.h: Regenerate.
6859 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6860 bfd_elf32_link_record_dynamic_symbol,
6861 bfd_elf64_link_record_dynamic_symbol,
6862 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6863 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6864 _bfd_elf32_link_record_local_dynamic_symbol,
6865 _bfd_elf64_link_record_local_dynamic_symbol,
6866 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6867 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6868 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6869 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6870 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6871 _bfd_elf32_reloc_symbol_deleted_p,
6872 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6873 (bfd_elf_link_record_dynamic_symbol,
6874 bfd_elf_link_record_local_dynamic_symbol,
6875 bfd_elf_final_link, bfd_elf_gc_sections,
6876 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6877 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6878 bfd_elf_reloc_symbol_deleted_p): Declare.
6879 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6880 * elf32-arm.h: Update for changed function names. Remove local
6881 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6882 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6883 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6884 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6885 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6886 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6887 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6888 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6889 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6890 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6891 (bfd_elfNN_print_symbol): Define.
6892 * elfcode.h: Don't include elflink.h.
6893 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6894 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6895 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6896 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6897 elf_link_record_local_dynamic_symbol): Don't define.
6898 * elflink.c: Update for changed function names. Move elflink.h
6900 * elflink.h: Delete file.
6901 * po/SRC-POTFILES.in: Regenerate.
6902 * po/bfd.pot: Regenerate.
6906 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6907 "name" for global syms accidentally removed in 2004-03-20 change.
6911 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6912 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6913 where Elf_External_* is different for 64 and 32 bit, with
6914 corresponding elf_size_info field.
6915 (struct elf_final_link_info): Use "bfd_byte *" instead
6916 of "Elf_External_Sym *" for external_syms and symbuf.
6917 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6918 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6919 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6920 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6921 (elf_link_sort_cmp2): Adjust.
6922 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6923 using ELF_R_SYM macro. Set u.sym_mask.
6924 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6925 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6926 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6927 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6928 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6929 swap_syn_out functions. Rearrange dyn swap in/out switch.
6930 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6931 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6932 (elf_link_flush_output_syms): Add elf_backend_data arg.
6933 (elf_link_check_versioned_symbol): Likewise.
6934 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6935 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6936 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6937 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6938 ELF_R_TYPE and ELF_R_INFO macros.
6939 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6940 based on size rather than using ELF_R_INFO.
6941 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6943 (struct alloc_got_off_arg): New.
6944 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6945 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6946 (elf_gc_allocate_got_offsets): Adjust.
6947 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6948 ELF_R_SYM. Use bfd_section_from_elf_index.
6949 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6950 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6951 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6955 Remove MPW support, no longer used.
6956 * config.bfd (powerpc-*-mpw*): Remove configuration.
6957 * mpw-config.in, mpw-make.sed: Remove files.
6958 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6962 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6963 (ppc64_elf_add_symbol_hook): New function.
6964 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6965 const from Elf_Internal_Sym param.
6966 * elflink.c (elf_link_add_object_symbols): Adjust.
6967 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6968 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6969 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6970 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6971 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6972 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6973 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6974 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6975 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6976 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6977 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6978 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6979 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6980 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6981 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6982 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6986 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6987 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6988 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6989 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6990 (bfd_elf64_bfd_link_add_symbols): Delete.
6991 (bfd_elf_link_add_symbols): Declare.
6992 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6993 * elflink.c: Include safe-ctype.h.
6994 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6996 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6997 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6999 (elf_link_add_archive_symbols): Rename from
7000 _bfd_elf_link_add_archive_symbols, make static.
7001 (elf_link_add_object_symbols): New function. Corresponding
7002 elflink.h function converted to use elf_size_info.
7003 (bfd_elf_link_add_symbols): Likewise.
7004 (bfd_elf_size_dynamic_sections): Adjust.
7005 * elflink.h (elf_bfd_link_add_symbols): Delete.
7006 (elf_link_add_object_symbols): Delete.
7007 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7008 bfd_elf_link_add_symbols.
7009 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7013 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7014 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7016 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7017 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7018 (_bfd_elf_add_dt_needed_tag): Declare.
7019 (_bfd_elf_sort_symbol): Declare.
7020 (_bfd_elf_finalize_dynstr): Declare.
7021 (RELOC_FOR_GLOBAL_SYM): Formatting.
7022 * elfcode.h (elf_add_dynamic_entry): Delete.
7023 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7024 elflink.h function converted to use elf_size_info.
7025 (_bfd_elf_add_dt_needed_tag): Likewise.
7026 (_bfd_elf_sort_symbol): Likewise.
7027 (_bfd_elf_finalize_dynstr): Likewise.
7028 (compute_bucket_count): Likewise.
7029 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7030 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7031 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7032 * elflink.h: ..here.
7033 (sort_symbol, add_dt_needed_tag): Delete.
7034 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7035 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7037 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7038 * elf32-cris.c (add_dynamic_entry): Likewise.
7039 * elf32-hppa.c (add_dynamic_entry): Likewise.
7040 * elf32-i370.c (add_dynamic_entry): Likewise.
7041 * elf32-i386.c (add_dynamic_entry): Likewise.
7042 * elf32-m32r.c (add_dynamic_entry): Likewise.
7043 * elf32-m68k.c (add_dynamic_entry): Likewise.
7044 * elf32-ppc.c (add_dynamic_entry): Likewise.
7045 * elf32-s390.c (add_dynamic_entry): Likewise.
7046 * elf32-sh.c (add_dynamic_entry): Likewise.
7047 * elf32-sparc.c (add_dynamic_entry): Likewise.
7048 * elf32-vax.c (add_dynamic_entry): Likewise.
7049 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7050 * elf64-alpha.c (add_dynamic_entry): Likewise.
7051 * elf64-hppa.c (add_dynamic_entry): Likewise.
7052 * elf64-ppc.c (add_dynamic_entry): Likewise.
7053 * elf64-s390.c (add_dynamic_entry): Likewise.
7054 * elf64-sparc.c (add_dynamic_entry): Likewise.
7055 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7056 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7057 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7058 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7059 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7060 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7064 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7068 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7069 literal tables and check for relocs outside of literal pools.
7070 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7071 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7073 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7074 (elf_xtensa_relocate_section): Read literal tables and check for
7075 dynamic relocations in read-only sections and not in literal pools.
7080 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7084 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7085 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7086 not defined by the executable, or defined in a DSO.
7087 <eliding run-time relocation of .got>: Initialize GOT entry for a
7088 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7090 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7091 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7092 a PLT reloc to GOT for an executable.
7093 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7094 .got for a DSO and explain why.
7095 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7096 and unreferenced symbols for which a PLT is defined. Adjust
7097 dynamic-symbol pruning correspondingly, to make sure we don't lose
7098 a dynamic symbol also defined by a DSO.
7102 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7103 and rel args. Group input and output args. Wrap to 80 columns.
7104 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7105 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7106 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7107 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7108 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7109 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7110 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7111 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7112 RELOC_FOR_GLOBAL_SYMBOL invocation.
7116 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7117 unresolved symbols in objects aren't allowed.
7119 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7121 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7122 (elf_hppa_unmark_useless_dynamic_symbols):
7123 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7124 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7125 (elf32_hppa_relocate_section): Likewise.
7126 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7127 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7128 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7129 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7130 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7132 * elf-m10200.c (mn10200_elf_relocate_section): Use
7133 RELOC_FOR_GLOBAL_SYMBOL.
7134 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7135 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7136 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7137 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7138 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7139 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7140 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7141 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7142 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7143 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7144 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7145 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7149 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7150 (final_link_relocate): Likewise.
7151 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7152 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7156 * Makefile.am: Run "make dep-am".
7157 * Makefile.in: Regenerate.
7158 * aclocal.m4: Regenerate.
7159 * config.in: Regenerate.
7160 * po/bfd.pot: Regenerate.
7165 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7166 type and size change code to where it was previously. Remove
7167 dt_needed param. Treat old weak syms as strong if new sym is
7168 from a shared lib, even when old sym is from another shared
7169 lib. Remove unnecessary tests of oldweak and newweak. Correct
7171 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7172 _bfd_elf_merge_symbol calls.
7173 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7174 dt_needed local var. Update comments.
7175 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7176 (_bfd_elf_add_default_symbol): Likewise.
7178 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7179 strong syms in one shared object overriding weak syms in another.
7183 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7184 dyn_lib_class field. Rearrange for better packing.
7185 (elf_dt_soname): Delete.
7186 (elf_dyn_lib_class): Define.
7187 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7188 (bfd_elf_set_dt_needed_soname): Delete.
7189 (bfd_elf_set_dyn_lib_class): New function.
7190 * elflink.h (add_dt_needed_tag): New function. Split out from..
7191 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7192 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7193 initialization of soname.
7194 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7196 * bfd-in.h (enum dynamic_lib_link_class): New.
7197 (bfd_elf_set_dt_needed_soname): Delete.
7198 (bfd_elf_set_dyn_lib_class): Declare.
7199 * bfd-in2.h: Regenerate.
7201 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7202 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7203 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7204 symbol loop. Instead use add_needed to flag tag as written.
7208 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7209 logic for null_input_bfd detection.
7213 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7217 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7222 * elflink.c (elf_link_read_relocs_from_section): Don't use
7223 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7224 (_bfd_elf_link_read_relocs): ..to here.
7225 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7229 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7230 values selected in configure.host. Require both to be defined
7231 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7232 corresponding BFD_HOST vars with quotes.
7233 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7234 Always require BFD_HOST_64_BIT_DEFINED.
7235 <file_ptr type>: Find off_t size before emitting message. Combine
7236 off_t and ftello64 conditional.
7237 * configure: Regenerate.
7241 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7242 aliasing warning. Remove trailing whitespace throughout file.
7246 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7247 input_section in calls to get_dyn_name.
7248 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
7250 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7254 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7255 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7256 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7257 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7258 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7259 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7260 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7262 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7263 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7264 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7265 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7266 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7267 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7268 (read_8_bytes, read_indirect_string, read_address): Likewise.
7269 (read_abbrevs, parse_comp_unit): Likewise.
7270 * targets.c (struct bfd_target): Likewise.
7271 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7272 * hppabsd-core.c: Likewise. Formatting.
7273 * hpux-core.c: Likewise.
7274 * irix-core.c: Likewise.
7275 * netbsd-core.c: Likewise.
7276 * osf-core.c: Likewise.
7277 * ptrace-core.c: Likewise.
7278 * sco5-core.c: Likewise.
7279 * trad-core.c: Likewise.
7280 * configure: Regenerate.
7281 * bfd-in2.h: Regenerate.
7285 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7286 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7287 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7288 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7289 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7290 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7291 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7292 * libbfd.c: Likewise in function definitions.
7293 (bfd_put_8): Mask with 0xff rather than casting to char.
7294 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7295 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7296 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7297 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7298 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7299 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7300 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7301 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7302 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7303 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7304 * archive.c (do_slurp_coff_armap): Update swap prototype.
7305 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7306 (tic54x_getl_signed_32): Likewise.
7307 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7308 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7309 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7310 (bfd_getp_signed_32, bfd_putp32): Likewise.
7311 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7312 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7313 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7314 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7315 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7316 bfd_h_getx_signed_16, bfd_h_putx16.
7317 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7318 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7319 * hpux-core.c: Likewise.
7320 * irix-core.c: Likewise.
7321 * netbsd-core.c: Likewise.
7322 * osf-core.c: Likewise.
7323 * ptrace-core.c: Likewise.
7324 * sco5-core.c: Likewise.
7325 * trad-core.c: Likewise.
7326 * bfd-in2.h: Regenerate.
7330 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7335 * config.bfd: Add x86_64-*-openbsd*.
7336 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7338 * configure: Regenerate.
7343 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7344 if the input bfd does not contain any code.
7348 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7352 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7353 mips16 symbols to be even rather than testing first for even/odd.
7354 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7358 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7363 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7364 undefined symbols as hash_new.
7368 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7370 * elf32-sh.c: Ditto.
7371 * bfd-in2.h: Regenerate.
7375 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7377 (_frv_count_got_plt_entries): Initialize them.
7378 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7380 (frv_pic_relocs_info_for_global): Likewise.
7381 (frv_pic_relocs_info_for_local): Likewise.
7382 (frv_pic_merge_early_relocs_info): New.
7383 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7385 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7386 Check that we don't exceed the allocated count for entry.
7387 (_frv_add_rofixup): Likewise.
7388 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7389 (elf32_frv_finish_dynamic_sections): Improve error message in case
7390 we emit too few rofixup entries.
7394 * archures.c (bfd_mach_fr450): New.
7395 * bfd-in2.h: Regenerate.
7396 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7397 (arch_info_500): Link to it.
7398 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7399 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7400 (frv_elf_arch_extension_p): New function.
7401 (frv_elf_merge_private_bfd_data): Use it.
7405 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7407 * elflink.h (is_global_data_symbol_definition): Moved to
7409 (elf_link_is_defined_archive_symbol): Likewise.
7410 (elf_link_add_archive_symbols): Likewise. Renamed to
7411 _bfd_elf_link_add_archive_symbols.
7413 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7414 of ELF symbol table entry from backend.
7415 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7416 instead of elf_link_add_object_symbols.
7420 * elf-bfd.h (struct elf_backend_data): Added
7421 elf_backend_can_make_relative_eh_frame,
7422 elf_backend_can_make_lsda_relative_eh_frame and
7423 elf_backend_encode_eh_address.
7424 (_bfd_elf_encode_eh_address): Declare.
7425 (_bfd_elf_can_make_relative): Declare.
7426 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7427 hooks to decide whether to attempt to make_relative and
7429 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7430 (_bfd_elf_can_make_relative): New.
7431 (_bfd_elf_encode_eh_address): New.
7432 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7433 (frv_elf_encode_eh_address): New.
7434 (elf_backend_can_make_relative_eh_frame): Define.
7435 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7436 (elf_backend_encode_eh_address): Define.
7438 (elf_backend_can_make_relative_eh_frame): Define.
7439 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7440 (elf_backend_encode_eh_address): Define.
7441 (elfNN_bed): Add them.
7445 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7446 complain_on_overflow to signed.
7450 * elflink.h (sort_symbol): New.
7451 (elf_link_add_object_symbols): Use a sorted symbol array for
7456 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7457 for pc relative relocs.
7458 (elf_s390_relocate_section): Likewise.
7459 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7460 for pc relative relocs.
7461 (elf_s390_relocate_section): Likewise.
7465 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7470 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7471 field to track if a relocation is against readonly section.
7472 (count_dyn_reloc): Take a new argument for rent->reltext.
7473 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7474 (get_reloc_section): Don't set ia64_info->reltext here.
7475 (allocate_dynrel_entries): Set ia64_info->reltext here.
7479 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7480 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7481 function's descriptor to symbol+offset, and map local undefweak
7482 symbol to NULL function descriptor.
7483 (elf32_frv_relocate_section): Likewise.
7487 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7489 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7490 (netbsd_core_file_p): Set architecture from machine ID for
7495 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7496 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7500 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7501 symbols with non-default visibility.
7505 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7506 IMAGE_SCN_MEM_WRITE on known sections only.
7510 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7511 symbols used in PIE relocs.
7515 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7520 * configure.in: Update version to 2.15.90.
7521 * configure: Regenerate.
7526 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7527 _bfd_elf_symbol_refs_local_p to decide whether to decay
7528 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7529 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7530 relocs if the symbol wasn't defined by a regular object file.
7531 Don't check the symbol's dynindx.
7535 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7537 * bfd-in2.h: Re-generate.
7541 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7542 _LARGEFILE64_SOURCE.
7546 * elf.c (vma_page_aligned_bias): New function.
7547 (assign_file_positions_except_relocs)
7548 (assign_file_positions_for_segments): Replace broken modulo
7549 arithmetic with call to vma_page_aligned_bias.
7553 * bfd-in.h: Update copyright.
7554 (bfd_tell): Change return type to file_ptr.
7555 * bfd-in2.h: Re-generate.
7556 * cache.c: Update copyright.
7557 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7559 (close_one): Use real_ftell.
7560 * bfdio.c: Update copyright.
7561 (real_ftell, real_fseek): New functions.
7562 (bfd_tell): Use real_fseek and real_ftell, change return type to
7564 (bfd_seek): Use real_ftell and real_fseek, change type of
7565 file_position to a file_ptr.
7566 * libbfd-in.h: Update copyright.
7567 (real_ftell, real_fseek): Declare.
7568 * libbfd.h: Re-generate.
7570 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7571 fseeko and fseeko64. Determine bfd_file_ptr.
7572 * configure: Re-generate.
7573 * config.in: Re-generate.
7577 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7578 * elf32-h8300.c: Likewise.
7583 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7584 GOT entries with no associated GOT subsection.
7588 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7589 * elf.c (swap_out_syms): Use it to decide whether local section
7590 symbols should be named.
7591 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7592 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7593 (elf_backend_name_local_section_symbols): Define.
7594 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7598 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7599 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7604 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7605 to bfd_link_hash_entry passed by reference to
7606 _bfd_generic_link_add_one_symbol.
7610 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7611 relocations against dynamic symbols.
7615 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7620 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7621 * bfd-in2.h, libbfd.h: Rebuilt.
7625 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7626 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7627 flag has been cleared.
7631 * coff-h8300.c: Add and adjust comments about relaxation.
7632 * elf32-h8300.c: Likewise.
7636 * coff-h8300.c: Fix comment typos.
7637 * elf32-h8300.c: Likewise.
7641 * coff-h8300.c: Add comments about relaxation.
7642 * elf32-h8300.c: Likewise.
7646 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7648 * aclocal.m4: Regenerate.
7649 * configure: Regenerate.
7653 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7654 mips_elf64_rtype_to_howto instead of using howto_table.
7658 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7660 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7661 relocs which would not use the PLT.
7665 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7666 (ppc64_elf_gc_sweep_hook): Likewise.
7667 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7671 Adds linker relaxation support for bit manipulation insns like
7672 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
7674 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
7675 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
7676 * coff-h8300.c: Opcode for bit manipulation insn is checked in
7677 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7681 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7685 * elf32-h8300.c: Fix formatting.
7689 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7690 dynamic object is present. Declare r_symndx and h in an inner
7692 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7696 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7697 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7698 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7699 identically. Do not emit PC24 relocations for shared libraries.
7700 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7701 identically. Don't adjust pc_count.
7702 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7703 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7704 adjust count for branch relocations.
7705 (allocate_dynrelocs): Correct typo in call to
7706 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7707 PC24 or PLT32 relocs when linking.
7711 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7712 relocation howto with ARM_26 one for consistency.
7713 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7714 that will be converted to ARM_26D ones, since we always want 'done'
7715 relocations to be reflected in section's data.
7716 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7718 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7723 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7724 are not partial_inplace during a relocatable link.
7728 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
7729 if no dynamic object is present. Declare r_symndx and h in an
7734 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7735 trampoline if it is known out of range.
7740 * elf32-frv.c (_frv_osec_readonly_p): New.
7741 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7743 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7744 (elf32_frv_relocate_section): Likewise. Error out if attempting
7745 to emit rofixups or dynamic relocs in read-only segments. Use
7746 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7747 dynamic relocations.
7749 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7750 relocations or fixups involving merged sections correctly. Avoid
7751 crash when undefined symbol is referenced by R_FRV_32 or
7752 R_FRV_FUNCDESC_VALUE.
7754 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7755 input section holding local symbol to addend of R_FRV_32 or
7756 R_FRV_FUNCDESC_VALUE dynamic relocation.
7758 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7759 (elf32_frv_always_size_sections): Don't store pointer to
7760 __stacksize symbol in sec_info.
7761 (elf32_frv_modify_segment_map): Look it up here.
7763 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7764 of the lazy PLT entry, not only its offset, as the low word of a
7765 function descriptor.
7767 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7768 if a hash table entry already exists but is not a definition.
7770 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7771 (_frv_add_rofixup): Don't inline.
7772 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7773 for undefweak symbols.
7774 (elf32_frv_relocate_section): Avoid crash while computing
7775 relocation when linking with shared library. Only emit rofixups
7776 and dynamic relocations for alloc&load sections. Mark binaries
7777 with inter-segment relocations for relocation as a unit.
7778 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7779 (DEFAULT_STACK_SIZE): New.
7780 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7781 emit rofixups or dynamic relocs when linking dynamic non-PIE
7783 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7784 shared libs too. Reserve the last entry for the GOT pointer.
7785 (elf32_frv_finish_dynamic_sections): Emit it.
7786 (elf32_frv_always_size_sections): New.
7787 (elf32_frv_modify_segment_map): New.
7788 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7790 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7791 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7792 (elf_backend_always_size_sections): New.
7793 (elf_backend_modify_segment_map): New.
7795 * config.bfd: Added frv-*-*linux*.
7796 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7797 ABS section, instead of crashing.
7798 (elf32_frv_relocate_section): Don't crash before warning about
7799 different segments in non-PIC relocation.
7801 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7802 relocs to undefweak symbols.
7803 (elf32_frv_relocate_section): Ditto for undefined symbols.
7805 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7806 gotfixup section was created.
7808 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7809 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7810 complain_overflow_signed.
7811 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7812 have not been allocated.
7813 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7814 privfd only if dynamic sections were created.
7815 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7816 for GPREL relocs. When linking relocatable FDPIC executables,
7817 emit warnings for relocations that would be illegal on PIE or
7818 shared libraries. Emit rofixup for R_FRV_32 only if input object
7820 (_frv_create_got_section): Define _gp symbol in the rofixup
7822 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7823 dynamic sections missing, error out requesting -melf32frvfd.
7825 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7826 computation of addends from section and global or local symbol
7827 value. Change return type to bfd_boolean, and return a failure if
7828 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7829 nonzero addend is required.
7830 (elf32_frv_relocate_section): Likewise. Print error for
7831 unsupported nonzero addends.
7833 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7834 force everything local.
7835 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7836 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7837 (frv_gotfixup_section): New.
7838 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7839 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7841 (_frv_add_rofixup): New.
7842 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7843 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7844 improve some ugly conditions.
7845 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7846 relocations in fdpic.
7847 (_frv_create_got_section): Create .rofixup.got section.
7848 (struct _frv_dynamic_got_info): Added fixups.
7849 (_frv_count_got_plt_entries): Account in-GOT relocations into
7850 relocs32, relocsfd and relocsfdv. Account them into relocs or
7851 fixups, as appropriate.
7852 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7854 (elf32_frv_finish_dynamic_sections): Verify that the right number
7855 of relocations and fixups was generated.
7856 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7858 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7859 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7860 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7861 descriptor of a (formerly-)global symbol is local.
7862 (struct frv_pic_relocs_info): Adjust comments.
7863 (_frv_emit_got_relocs_plt_entries): Adjust.
7864 (elf32_frv_relocate_section): Likewise.
7865 (_frv_count_got_plt_entries): Likewise.
7866 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7867 symbol's value to addend in the common preamble. Decay dynamic
7868 symbols to section+offset if they bind or call locally, for GOT
7869 and FUNCDESC_VALUE, respectively.
7870 (elf32_frv_relocate_section): Likewise.
7871 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7872 internal or hidden visibility.
7874 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7875 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7876 (elf32_frv_relocate_section): Pass relocation addend in. Use
7877 original relocation addend to look up the got relocs/plt entries
7878 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7879 processing relocations that reference .scommon symbols.
7881 Introduce support for dynamic linking.
7882 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7883 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7884 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7885 (frv_reloc_type_lookup): Return REL howtos for executables and
7887 (frv_info_to_howto_rel): New.
7888 (struct frv_elf_link_hash_table): New.
7889 (frv_hash_table, frv_got_section, frv_gotrel_section,
7890 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7891 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7892 (frv_elf_link_hash_table_create): New.
7893 (struct frv_pic_relocs_info): New.
7894 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7895 (frv_pic_relocs_info_find): New.
7896 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7898 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7899 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7900 (_frv_emit_got_relocs_plt_entries): New.
7901 (elf32_frv_relocate_section): Add support for dynamic linking.
7902 Handle new relocations.
7903 (_frv_create_got_section): New.
7904 (elf32_frv_create_dynamic_sections): New.
7905 (ELF_DYNAMIC_INTERPRETER): New.
7906 (struct _frv_dynamic_got_info): New.
7907 (_frv_count_got_plt_entries): New.
7908 (struct _frv_dynamic_got_plt_info): New.
7909 (_frv_compute_got_alloc_data): New.
7910 (_frv_get_got_entry, _frv_get_fd_entry): New.
7911 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7912 (_frv_resolve_final_relocs_info): New.
7913 (elf32_frv_size_dynamic_sections): New.
7914 (elf32_frv_finish_dynamic_sections): New.
7915 (elf32_frv_adjust_dynamic_symbol): New.
7916 (elf32_frv_finish_dynamic_symbol): New.
7917 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7919 (elf_info_to_howto_rel): Define.
7920 (bfd_elf32_bfd_link_hash_table_create): Define.
7921 (elf_backend_create_dynamic_sections): Define.
7922 (elf_backend_adjust_dynamic_symbol): Define.
7923 (elf_backend_size_dynamic_sections): Define.
7924 (elf_backend_finish_dynamic_symbol): Define.
7925 (elf_backend_finish_dynamic_sections): Define.
7926 (elf_backend_want_got_sym): Define.
7927 (elf_backend_got_header_size): Define.
7928 (elf_backend_want_got_plt): Define.
7929 (elf_backend_plt_readonly): Define.
7930 (elf_backend_want_plt_sym): Define.
7931 (elf_backend_plt_header_size): Define.
7932 (elf_backend_may_use_rel_p): Define.
7933 (elf_backend_may_use_rela_p): Define.
7934 (elf_backend_default_use_rela_p): Define.
7936 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7937 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7938 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7939 (frv_reloc_map): Map the corresponding BFD relocs to them.
7940 (frv_reloc_type_lookup): ... and back to BFD relocs.
7941 * reloc.c: New relocs.
7942 * bfd-in2.h, libbfd.h: Rebuilt.
7944 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7945 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7946 R_FRV_FUNCDESC_GOTLO): New.
7947 (frv_reloc_map): Map the corresponding BFD relocs to them.
7948 (frv_reloc_type_lookup): ... and back to BFD relocs.
7949 * reloc.c: New relocs.
7950 * bfd-in2.h, libbfd.h: Rebuilt.
7954 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7955 targets to support pages of up to 64kB.
7956 (elf32_bed): Redefine to get a separate backend data structure for
7957 traditional targets.
7958 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7959 targets to support pages of up to 64kB.
7960 (elf64_bed): Redefine to get a separate backend data structure for
7961 traditional targets.
7962 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7963 targets to support pages of up to 64kB.
7964 (elf32_bed): Redefine to get a separate backend data structure for
7965 traditional targets.
7969 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7973 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7974 (elf_i386_grok_psinfo): Likewise.
7978 * config.bfd: Add m68k-uClinux target.
7982 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7983 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7984 (elf32_h8_gc_sweep_hook): New function.
7985 (elf_backend_gc_mark_hook): Define.
7986 (elf_backend_gc_sweep_hook): Define.
7987 (elf_backend_can_gc_sections): Define.
7989 For older changes see ChangeLog-0203
7995 version-control: never