3 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
4 the alignment of dwarf2 linkonce sections to 0.
5 * coff-sto32.c: Likewise.
9 * coff-sparc.c: Add missing prototypes.
10 * elf32-s390.c: Likewise.
11 * elf32-i960.c: Likewise.
12 * aout-target.h: Likewise.
16 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
17 (elf_num_section_syms): New for num_section_syms.
19 * elf.c (elf_map_symbols): Set num_section_syms.
20 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
21 the section symbol index.
25 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
26 select the generic has table creator. All elf backends need elf
27 specific fields in the hash table.
31 * archive.c (offsetof): Remove define.
34 * sysdep.h (offsetof): Define.
38 * bfd.c (bfd_get_gp_size): Return an unsigned int.
39 (bfd_set_gp_size): Make param unsigned.
40 * bfd-in2.h: Regenerate.
41 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
42 than calling bfd_get_gp_size.
43 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
44 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
48 * linker.c (default_fill_link_order): Handle four byte fill value.
52 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
54 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
56 * elf64-mips.c (UNUSED_RELOC): Define.
57 (mips_elf64_howto_table_rel): Use it.
58 (mips_elf64_howto_table_rela): Here too.
59 (mips_elf64_write_relocs): Fix signed/unsigned warning.
61 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
63 * coffgen.c (coff_print_symbol): Fix warnings.
64 (coff_find_nearest_line): Likewise.
65 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
66 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
67 * format.c (bfd_check_format_matches): Likewise.
68 (bfd_set_format): Likewise.
69 * coff-ia64.c: Add missing prototypes.
70 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
71 signed to silence warnings.
72 (elf64_alpha_relocate_section): Likewise.
73 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
74 (elf64_alpha_add_symbol_hook): Likewise.
75 (elf64_alpha_final_link): Likewise.
76 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
77 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
78 (elf64_alpha_size_got_sections): Likewise.
79 * elfxx-ia64.c: Add missing prototypes.
80 (elfNN_ia64_relocate_section): Fix warning.
81 (elfNN_ia64_unwind_entry_compare): Make params const.
85 * config.bfd (targ64_selvecs): New.
86 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
88 * bfd-in.h (BFD_VERSION): Remove wrong comment.
89 (BFD_DEFAULT_TARGET_SIZE): New.
90 (BFD_ARCH_SIZE): Comment.
91 * configure.in (target_size): New. Set instead of target64 in
92 selvecs case statement. Set target64 from it.
93 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
94 * bfd-in2.h: Regenerate.
95 * configure: Regenerate.
99 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
100 (bfd_errmsgs): Add corresponding message.
101 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
102 finding an archive that contains different format object files.
103 Return bfd_error_wrong_object_format for this case.
104 * format.c: Formatting fixes. s/CONST/const/.
105 (bfd_check_format_matches): Accept archives that give
106 bfd_error_wrong_object_format if no full match is found. Tidy
107 code handling matching_vector. Don't return a pointer to freed
108 memory in `matching'. Handle ambiguous matches as for partial
110 * bfd-in2.h: Regenerate.
114 * libieee.h (common_header_type): Add last_byte field.
116 * ieee.c: Add missing prototypes. Some format fixes.
117 (struct output_buffer_struct): Move for availability to prototypes.
118 (ieee_part_after): New function.
119 (ieee_slurp_debug): Use it here.
120 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
121 ieee_part_after to set last_byte to one past end of current part.
123 (ieee_pos): Pass in ieee_data_struct rather than bfd.
125 (parse_expression): Don't go beyond the end of the current part.
126 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
127 (ieee_get_symtab_upper_bound, ieee_get_symtab,
128 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
129 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
130 ieee_set_section_contents, ieee_write_object_contents,
131 ieee_make_empty_symbol): Make static.
132 (ieee_archive_p): Correct comments regarding bfd_read.
133 (ieee_object_p): Similarly.
134 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
135 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
136 input_bfd, output_bfd, output_buffer.
137 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
138 do_with_relocs, ie. as a symbol for relocatable files.
139 (ieee_vec): Add comments showing functions referenced by macros.
143 * aout-tic30.c: Add missing prototypes. Fix formatting.
144 * aout-ns32k.c: Add missing prototypes. Fix formatting.
145 * peXXigen.c: Add missining prototypes. Fix formatting.
146 * aout-adobe.c: Add missining prototypes. Fix formatting.
150 * elf32-v850.c: Add missing function prototypes.
153 * cpu-v850.c: Add missing function prototype.
158 * elf-bfd.h (struct elf_backend_data): Add new fields
159 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
160 (bfd_elf_sprintf_vma): Rename function prototype to
161 '_bfd_elf_sprintf_vma'.
162 (bfd_elf_fprintf_vma): Rename function prototype to
163 '_bfd_elf_fprintf_vma'.
164 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
165 directly, instead indirect via the elf_backend_data structure.
166 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
167 instead indirect via the elf_backend_data structure.
168 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
169 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
170 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
172 (elf_backend_fprintf_vma): Initialise if not already defined.
173 (struct elf_backend_data): Initialise the
174 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
178 * elf64-sparc.c: Add missing prototypes.
179 * elf32-cris.c: Likewise.
180 * elf32-i370.c: Likewise.
181 * elf64-hppa.c: Likewise.
182 * elf64-s390.c: Likewise.
186 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
187 Add prototypes where needed.
191 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
192 (bfd_fprintf_vma): Likewise.
196 * bfd.c (bfd_sprintf_vma): Don't return void.
197 (bfd_fprintf_vma): Likewise.
201 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
203 * configure: Regenerate.
207 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
208 warning if not BFD64. Add braces so emacs auto format works.
209 (bfd_elf_fprintf_vma): Likewise.
211 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
213 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
214 param to agree with libxcoff.h.
215 (xcoff_swap_ldhdr_out): Likewise.
216 (xcoff_swap_ldsym_in): Likewise.
217 (xcoff_swap_ldsym_out): Likewise.
218 (xcoff_swap_ldrel_in): Likewise.
219 (xcoff_swap_ldrel_out): Likewise.
220 (xcoff_create_csect_from_smclas): Likewise.
221 * coff64-rs6000.c: Add missing prototypes.
222 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
224 (xcoff64_swap_ldhdr_out): Likewise.
225 (xcoff64_swap_ldsym_in): Likewise.
226 (xcoff64_swap_ldsym_out): Likewise.
227 (xcoff64_swap_ldrel_in): Likewise.
228 (xcoff64_swap_ldrel_out): Likewise.
229 (xcoff64_ppc_relocate_section): Make static.
230 (xcoff64_slurp_armap): Likewise.
231 (xcoff64_archive_p): Likewise.
232 (xcoff64_openr_next_archived_file): Likewise.
233 (xcoff64_sizeof_headers): Likewise.
234 (xcoff64_is_lineno_count_overflow): Likewise.
235 (xcoff64_is_reloc_count_overflow): Likewise.
236 (xcoff64_loader_symbol_offset): Likewise.
237 (xcoff64_loader_reloc_offset): Likewise.
238 * elf64-gen.c: Add missing prototypes.
242 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
243 (bfd_elf_fprintf_vma): Likewise.
247 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
250 * bfd-in2.h: Regenerated.
254 * bfd-in.h (bfd_sprintf_vma): New prototype.
255 (bfd_fprintf_vma): Likewise.
256 (bfd_elf_sprintf_vma): Likewise.
257 (bfd_elf_fprintf_vma): Likewise.
258 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
259 * bfd-in2.h: Regenerated.
261 * bfd.c (bfd_sprintf_vma): New. Defined.
262 (bfd_fprintf_vma): Likewise.
264 * elf.c (bfd_elf_sprintf_vma): New. Defined.
265 (bfd_elf_fprintf_vma): Likewise.
269 * coff-rs6000.c: Add missing prototypes.
270 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
271 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
272 xcoff_loader_reloc_offset): Make static.
273 * dwarf1.c: Add missing prototypes.
274 * dwarf2.c: Add missing prototypes.
275 (struct abbrev_info): Move definition.
276 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
277 * elf.c: Add missing prototypes.
278 * elf32-gen.c: Likewise.
279 * elf32-i386.c: Likewise.
280 * elf32-ppc.c: Likewise.
281 (ppc_elf_sort_rela): Use PTR instead of "void *".
282 * elflink.h: Add missing prototypes. Formatting fixes.
283 * merge.c: Add missing prototypes.
284 (last4_eq): Use PTR instead of "void *".
286 * syms.c: Add missing prototypes.
290 * bfd.c: Fix formatting.
291 * bfd-in2.h: Regenerate.
295 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
296 true (this target uses REL relocations) and 'pcrel_offset' to
297 false (the PC is implied, not stored in the offset).
302 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
303 * elfxx-target.h (elf_backend_want_got_sym): Define.
304 (elfNN_bed): Add elf_backend_want_got_sym.
305 * elflink.c (_bfd_elf_create_got_section): Define
306 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
310 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
311 (find_rela_addend): New function.
312 (parse_comp_unit): Call it to find the abbrev offset addend.
313 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
314 members of dwarf2_debug as debugging information is read.
318 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
319 targets as well as sh-pe.
323 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
324 reloc from start of section when computing value for R_ARM_REL32
330 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
331 keep relocs for undefined syms if there are no dynamic sections in
333 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
337 * cofflink.c (coff_link_check_ar_symbols): also search for
338 __imp__symbol as well as _symbol.
339 * linker.c (_bfd_generic_link_add_archive_symbols): also
340 search for __imp__symbol as well as _symbol.
344 * elf.c (elf_sort_sections): Return zero only as the last step.
348 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
350 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
351 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
356 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
357 to match corresponding bfd_coff_backend data member.
361 * Makefile.am: Update dependencies with "make dep-am".
362 * Makefile.in: Regenerate
366 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
367 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
368 * Makefile.in: Regenerate.
372 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
373 flags when creating the reloc section if the ALLOC flag in the
374 source section is set.
378 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
379 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
380 * bfd-in2.h: Regenerate.
381 * libbfd.h: Regenerate.
382 * elfxx-ia64.c (ia64_howto_table): Define how to handle
384 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
385 (elfNN_ia64_check_relocs): Likewise.
386 (elfNN_ia64_install_value): Likewise.
387 (elfNN_ia64_relocate_section): Likewise.
391 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
393 (elf32_sparc_check_relocs): Likewise.
394 Only create .rela section for alloced sections in shared libraries.
395 (elf32_sparc_relocate_section): Likewise.
396 Remove redundant check.
397 Optimize unaligned reloc usage.
398 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
403 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
404 ALLOC|LOAD flags as the source section for debugging sections
405 when creating the reloc section.
409 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
410 the section of the bigger symbol.
412 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
416 * peicode.h (coff_swap_scnhdr_in): For sections containing
417 uninitialised data, only set their size to s_paddr if this does
418 not reset their size to zero. MS's latest compilers will set
423 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
424 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
429 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
431 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
432 sections being discarded.
436 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
437 instead of _bfd_elfcore_section_from_phdr.
438 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
439 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
440 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
441 (elfcore_grok_prstatus): Likewise.
442 (elfcore_grok_lwpstatus): Likewise.
443 (bfd_get_elf_phdr_upper_bound): Likewise.
444 (elfcore_make_note_pseudosection): Formatting.
445 (_bfd_elfcore_strndup): Formatting.
446 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
447 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
451 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
452 and _bfd_elfcore_strndup.
453 (struct elf_backend_data): Add elf_backend_grok_prstatus
454 and elf_backend_grok_psinfo.
455 * elf.c (_bfd_elfcore_make_pseudosection): New function.
456 (elfcore_grok_prstatus): Use it.
457 (elfcore_make_note_pseudosection): Likewise.
458 (elfcore_strndup): Rename to...
459 (_bfd_elfcore_strndup): Here, and make global.
460 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
461 (elfcore_grok_note): Call elf_backend_grok_prstatus
462 and elf_backend_grok_psinfo if available.
463 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
464 (_bfd_elf32_mips_grok_psinfo): New function.
465 (elf_backend_grok_prstatus): Define.
466 (elf_backend_grok_psinfo): Define.
467 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
468 (elf_backend_grok_psinfo): Likewise.
469 (elfNN_bed): Include elf_backend_grok_prstatus and
470 elf_backend_grok_psinfo.
474 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
475 hplink->sgot is NULL before filling GOT. Check if hplink->splt
476 is NULL before filling PLT.
480 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
484 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
486 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
487 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
490 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
491 (IS_ABSOLUTE_RELOC): Define.
492 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
493 (hppa_link_hash_newfunc): Always init it.
494 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
495 create COPY relocs only when the reloc is in a read-only section.
496 Instead, allocate space for a dynamic reloc to reference the
497 library symbol directly. Keep track of space we allocate using
499 (hppa_discard_copies): Delete, and move code to..
500 (allocate_plt_and_got): ..here. Rename to
501 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
502 relocs for non-shared link.
503 (elf32_hppa_size_dynamic_sections): Update calls to above.
504 (elf32_hppa_relocate_section): Write out the dynamic relocs used
505 in lieu of COPY relocs.
507 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
509 (elf_i386_adjust_dynamic_symbol): ..nor here..
510 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
512 (elf_i386_size_dynamic_sections): Fix a comment.
513 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
514 involved in writing reloc out.
518 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
519 Ensure syms are dynamic if we might be emitting a reloc.
520 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
521 for undefweak or undefined syms..
522 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
524 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
525 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
526 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
527 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
531 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
532 strncasecmp/strcasecmp instead of strncmp/strcmp.
536 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
537 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
538 in the regular object file and treat the weak definition as
543 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
544 unresolved_reloc test to exclude cases where we use "relocation"
545 before setting it to point into the .got. Reinstate fudge for
546 unresolved relocs in debugging sections.
548 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
549 complicated tests for unresolvable relocs with a simple direct
550 scheme using "unresolved_reloc" var.
552 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
553 elf_i386_dyn_relocs. Update comment.
554 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
556 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
558 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
560 (elf_i386_size_dynamic_sections): Likewise.
561 (elf_i386_finish_dynamic_symbol): Likewise.
562 (elf_i386_finish_dynamic_sections): Likewise.
563 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
566 Avoid creating COPY relocs if possible.
567 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
568 which .got created. Mark symbols used by R_386_32 and R_386_PC32
569 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
570 reloc is in a read-only section. Instead, allocate space for a
571 dynamic reloc to reference the library symbol directly. Keep
572 track of space we allocate using pcrel_relocs_copied.
573 (discard_copies): Delete, and move code to ..
574 (allocate_plt_and_got): ..here. Rename to
575 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
576 relocs for non-shared link.
577 (elf_i386_size_dynamic_sections): Update calls to above functions.
578 (elf_i386_relocate_section): Write out the dynamic relocs. Add
579 more ugly logic to avoid "unresolvable relocation" error. Use
580 htab shortcut in place of elf_hash_table macro.
581 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
582 not always be created now.
586 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
591 * configure.host (mips64-*-linux): Reformat.
595 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
596 allocate local .got space. Use shortcuts from hash table for .got
597 and .plt rather than comparing section names.
598 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
599 adjusting index into local_got_refcounts to document what we are
601 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
602 Tidy .got and .plt error checking.
606 * elf-bfd.h (struct elf_backend_data):
607 elf_backend_emit_relocs: New field: Function for emitting
609 elf_backend_count_relocs: New field: Function for determining
610 the number of relocs to be emitted.
611 * elfxx-target.h: Provide default (NULL) values for
612 elf_backend_emit_relocs and elf_backend_count_relocs.
613 * elflink.h (elf_link_size_reloc_section): Make the hash table
614 big enough to hold the relocs counted by either reloc_count or
616 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
617 should be emitted, either because of a command line option
618 stored in the info structure or because the target provides a
619 special reloc emitting function.
620 If the target provides a reloc counting function use it,
621 unless performing a relocatable link or emitting all relocs.
622 Also set the SEC_RELOC flag on any output section which will
624 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
625 should be emitted, either because of a command line option
626 stored in the info structure or because the target provides a
627 special reloc emitting function.
628 If the target provides a reloc emitting function, use it,
629 unless performing a relocatable link or emitting all relocs.
633 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
634 allocate local .got space.
638 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
643 * elflink.h (struct elf_assign_sym_version_info): Remove member
644 export_dynamic. All users changed to use info member.
645 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
646 export_dynamic, instead use member in parameter info.
647 * bfd-in.h (bfd_elf32_size_dynamic_sections,
648 bfd_elf64_size_dynamic_sections): Update prototype.
649 * bfd-in2.h: Regenerate.
653 * elflink.h (elf_info_failed): Add a new field, verdefs.
654 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
656 (elf_export_symbol): Check eif->verdefs to decide if a symbol
661 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
662 readonly_reloc, to record if a relocation in the .rel.dyn
663 section is against a read-only section.
664 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
666 (_bfd_mips_elf_check_relocs): Record if there is a relocation
667 in the .rel.dyn section against a read-only section by setting
668 DF_TEXTREL or readonly_reloc.
669 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
671 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
672 there is a relocation in the .rel.dyn section against a
674 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
679 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
680 function. Move flagword result into parameter list. Remove
681 comment about setting bfd_error_handler to intercept failure
683 * coffgen.c (make_a_section_from_file): Examine result of
684 calling bfd_coff_styp_to_sec_flags and pass a failure back to
686 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
687 function. Move flagword result into parameter list.
688 * libcoff.h: Regenerate.
689 * libecoff.h: Regenerate.
693 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
694 section is going to follow it.
698 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
699 with the file_align entry from elf_backend_data.
700 (elf_gc_smash_unused_vtentry_relocs): Likewise.
701 (elf_gc_record_vtentry): Likewise.
705 * elflink.h: Whitespace changes.
706 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
707 rather than "unsigned char".
708 (elf_link_output_relocs): Likewise.
709 (elf_link_input_bfd): Likewise.
710 (elf_reloc_link_order): LIkewise.
711 * elf.c: s/CONST/const/. Whitespace changes.
712 * elf32-mips.c: Formatting fix.
714 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
715 * Makefile.in: Regenerate.
716 * po/Make-in: Remove trailing tab.
720 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
722 (elf32_arm_plt_entry): Likewise.
726 * elf.c (swap_out_syms): Keep names for global section symbols.
730 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
731 MIPS-based machines need it.
735 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
738 * config.bfd: Remove ecoff from Linux/mips.
742 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
744 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
745 alignment of 8 for .rela sections; handle further relocations.
749 * coff-z8k.c: Fix formatting.
750 Fix howtos: howto->size was always 1.
754 * configure.host (mips64*-*-linux*): Define.
758 * elf32-i386.c (elf_i386_discard_copies): Rename to
759 discard_copies, and use elf_link_hash_entry arg rather than
760 elf_i386_link_hash_entry.
761 (elf_i386_link_hash_traverse): Delete.
762 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
763 Tidy sizing of dynamic sections.
764 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
765 possible .plt entries.
766 (elf_i386_gc_sweep_hook): Likewise.
767 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
768 everything with plt.refcount <= 0.
770 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
772 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
773 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
775 (allocate_plt_and_got): ..instead do it all here. New function.
776 (elf_i386_size_dynamic_sections): Allocate local .got space and
777 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
778 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
779 rather than gc variety).
780 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
781 (elf_i386_relocate_section): Use it here and correct handling of
782 R_386_GOT32. Provide section and offset for "unresolvable
783 relocation" error message.
784 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
786 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
787 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
788 (elf_i386_link_hash_table_create): Init them.
789 (create_got_section): New function.
790 (elf_i386_create_dynamic_sections): New function.
791 (elf_backend_create_dynamic_sections): Set to above.
792 (elf_i386_check_relocs): Use shortcuts from hash table rather than
793 calling bfd_get_section_by_name.
794 (elf_i386_gc_sweep_hook): Likewise.
795 (elf_i386_adjust_dynamic_symbol): Likewise.
796 (elf_i386_size_dynamic_sections): Likewise.
797 (elf_i386_relocate_section): Likewise.
798 (elf_i386_finish_dynamic_sections): Likewise.
800 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
804 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
806 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
810 * aout-cris.c (MACHTYPE_OK): New. Defined.
814 * section.c (_bfd_strip_section_from_output): Handle NULL
819 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
820 rs6000coff64_vec only if BFD64 is defined.
821 (powerpc64-*-aix*): Enable only if BFD64 is defined.
825 * coff-ia64.c (ia64coff_object_p): Rewrite with
826 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
830 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
831 relocation, small reformatting.
835 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
836 (elf64_x86_64_relocate_section): Likewise.
840 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
841 millicode. Don't allocate .got and .rela.got space here..
842 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
843 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
845 (hppa_handle_PIC_calls): ..nor here..
846 (allocate_plt_and_got): ..instead do it all here. New function.
847 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
848 call allocate_plt_and_got. No need to zap .got if not dynamic.
849 (elf32_hppa_final_link): Call regular bfd_final_link instead of
850 gc_common_final_link.
851 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
852 (elf32_hppa_relocate_section): Use it here.
853 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
854 dynamic_sections_created.
855 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
859 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
860 generic version since we want a hashsize of 4.
861 (elf_backend_size_info): Likewise.
865 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
867 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
868 (elf_link_input_bfd): Likewise.
869 (elf_reloc_link_order): Likewise.
870 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
871 relocations correctly.
875 * elf32-arm.h: fix PLT generation for big endian ARM
879 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
880 for symbols forced local that need plabels.
881 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
882 .plt.rela for local syms if non-shared.
883 (hppa_build_one_stub): Mask lsb of plt.offset.
884 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
885 (clobber_millicode_symbols): Correct comment.
886 (elf32_hppa_relocate_section): Likewise.
887 (elf32_hppa_finish_dynamic_symbol): Likewise.
891 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
892 * bfd-in2.h: Regenerate.
893 * libbfd.h: Regenerate.
894 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
895 and BFD_RELOC_SPARC_UA64 mapping
896 * elf64-sparc.c: Likewise.
900 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
901 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
902 (coff-rs6000.lo): Remove the old dependency.
903 * Makefile.in: Rebuild.
905 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
910 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
911 rs6000coff_core_file_matches_executable_p,
912 rs6000coff_core_file_failing_command and
913 rs6000coff_core_file_failing_signal only if AIX_CORE is
915 (pmac_xcoff_vec): Likewise.
916 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
920 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
921 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
925 * bfd-in2.h: Regenerated.
926 * libcoff.h: Likewise.
930 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
931 undefined millicode syms in shared libs.
932 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
933 (elf32_hppa_check_relocs): Likewise.
934 (elf32_hppa_adjust_dynamic_symbol): Likewise.
935 (elf32_hppa_size_dynamic_sections): Likewise.
936 (elf32_hppa_relocate_section): Likewise.
937 (elf32_hppa_finish_dynamic_symbol): Likewise.
938 (elf32_hppa_finish_dynamic_sections): Likewise.
942 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
943 xcoff-target.h not used to define rs6000 or ppc bfd.
946 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
949 * coff-rs6000.c : Many changes for 64 bit support. Move common
950 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
953 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
954 linker now supported. Explictly define the rs6000coff64_vec.
956 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
957 (coff_print_aux) same
958 (coff_write_object_contents) same
959 (coff_slurp_line_table) same
961 * coffgen.c : (coff_fix_symbol_name) formatting
962 (coff_mangle_symbols) xcoff 64 bit support
963 (coff_write_symbol) same
964 (coff_write_alien_symbol) same
965 (coff_write_native_symbol) same
966 (coff_write_symbols) same
967 (coff_get_symbol_info) same
968 (bfd_coff_get_syment) same
969 (coff_print_symbol) same
971 * config.bfd : add powerpc64-*-aix* target
973 * libcoff-in.h : formatting
975 * libcoff.h : move xcoff extern declarations to libxcoff.h
977 * libxcoff.h : New file
979 * xcofflink.c : Many changes for xcoff64 support. Move common
980 structures to include/coff/xcoff.h. Move specific structure to
981 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
982 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
984 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
987 (xcoff_build_ldsyms) : handle special __rtinit symbol.
991 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
996 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
997 * libbfd.h: Regenerate.
998 * bfd-in2.h: Regenerate.
1000 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
1001 * archures.c (bfd_mach_mips12000): Define.
1002 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
1003 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
1005 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
1006 * bfd-in2.h: Regenerate.
1007 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
1011 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
1012 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
1013 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
1014 that is used by GCC.
1018 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
1019 of entries in a structured section.
1020 * elf.c: Use new macro.
1021 * elf32-i386.c: Use new macro.
1022 * elf32-mips.c: Use new macro.
1023 * elf64-alpha.c: Use new macro.
1024 * elf64-sparc.c: Use new macro.
1025 * elfcode.h: Use new macro.
1026 * elflink.h: Use new macro.
1030 * bfdint.texi: Replace -oformat with --oformat.
1034 * dwarf2.c (decode_line_info): Fix error message.
1035 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
1036 adjust error message.
1040 * elflink.h (elf_link_add_object_symbols): Revert the last
1045 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
1046 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
1047 (hppa_build_one_stub): Add an assert to check plt.offset.
1051 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
1052 version definition to basename of the output filename.
1056 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
1057 basename of the bfd filename.
1061 * section.c (asection): Add linker_has_input field.
1062 (STD_SECTION): Adjust initialization to suit.
1063 * ecoff.c (bfd_debug_section): Likewise.
1064 * bfd-in2.h: Regenerate.
1068 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
1069 negative 32-bit operands to 16 operands when the operand is
1070 going to be zero-extended by the modified opcode.
1074 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
1075 name for 'arc5' core versions.
1076 (bfd_arc_arch): Make bfd_mach_arc_6 default.
1078 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
1080 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
1084 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
1086 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
1087 to .gnu.linkonce.t.FOO text section.
1091 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
1092 fields, change sec into secinfo.
1093 (struct sec_merge_info): Add chain, remove last fields.
1094 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
1095 (sec_merge_hash_lookup): If lookup could not use a string only
1096 because it has bad alignment, mark the old string for deletion.
1097 (sec_merge_add): Add secinfo argument. Don't compute entry's
1098 position, instead record the section.
1099 (sec_merge_emit): Update for the sec into secinfo change in
1100 struct sec_merge_hash_entry.
1101 (_bfd_merge_section): Only record the section for merging, defer
1102 putting strings into the hash table.
1103 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
1104 _bfd_merge_sections): New functions.
1105 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
1107 * libbfd-in.h (_bfd_merge_sections): Add prototype.
1108 (_bfd_nolink_bfd_merge_sections): Define.
1109 * libbfd.h: Likewise.
1110 (bfd_generic_merge_sections): Add prototype.
1111 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
1112 (struct bfd_target): Likewise.
1113 * bfd.c (bfd_merge_sections): Define.
1114 * bfd-in2.h: Rebuilt.
1115 * elf.c (_bfd_elf_merge_sections): New function.
1116 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
1117 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
1118 * reloc.c (bfd_generic_merge_sections): New function.
1119 * vms.c (vms_bfd_merge_sections): New function.
1120 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
1121 * aout-target.h (MY_bfd_merge_sections): Define.
1122 * aout-tic30.c (MY_bfd_merge_sections): Define.
1123 * binary.c (binary_bfd_merge_sections): Define.
1124 * bout.c (b_out_bfd_merge_sections): Define.
1125 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
1126 * coffcode.c (coff_bfd_merge_sections): Define.
1127 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
1128 * i386msdos.c (msdos_bfd_merge_sections): Define.
1129 * i386os9k.c (os9k_bfd_merge_sections): Define.
1130 * ieee.c (ieee_bfd_merge_sections): Define.
1131 * ihex.c (ihex_bfd_merge_sections): Define.
1132 * nlm-target.h (nlm_bfd_merge_sections): Define.
1133 * oasys.c (oasys_bfd_merge_sections): Define.
1134 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
1135 * som.c (som_bfd_merge_sections): Define.
1136 * srec.c (srec_bfd_merge_sections): Define.
1137 * tekhex.c (tekhex_bfd_merge_sections): Define.
1138 * versados.c (versados_bfd_merge_sections): Define.
1139 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
1143 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
1144 to be unsigned long, in order to match its use.
1148 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
1153 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
1154 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
1155 Remove the unused veriable `dynver'.
1159 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
1160 NULL or is not COFF.
1161 (coff_i386_rtype_to_howto): Don't dump core if output section
1166 * ecoff.c (bfd_debug_section): Fix initialization.
1167 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
1168 is always a positive integer. Cast away sign mismatch.
1169 * elf32-mips.c: Fix misleading comment and typo.
1170 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
1172 * elflink.c: Fix typo.
1173 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
1174 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
1178 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
1182 * elf32-arm.h (elf32_arm_final_link_relocate): Set
1183 EF_ARM_HASENTRY if the start address is set.
1187 * targets.c (_bfd_target_vector_entries): Compute value based on
1188 the size of the _bfd_target_vector and not bfd_target_vector.
1192 * elfcode.h: Include "libiberty.h".
1194 * elflink.h (elf_link_add_object_symbols): Set
1195 elf_dt_name (abfd) to basename of the bfd filename.
1196 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
1197 of the bfd filename.
1201 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
1202 (elf_generic_info_to_howto_rel): Likewise.
1203 * coff-alpha.c (reloc_nil): Likewise.
1204 (alpha_ecoff_bad_format_hook): Likewise.
1205 (alpha_adjust_reloc_out): Likewise.
1206 (alpha_bfd_reloc_type_lookup): Likewise.
1207 (alpha_convert_external_reloc): Likewise.
1208 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
1209 (elf64_alpha_reloc_bad): Likewise.
1210 (elf64_alpha_reloc_gpdisp): Likewise.
1211 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
1212 (elf64_alpha_info_to_howto): Likewise.
1213 (elf64_alpha_add_symbol_hook): Likewise.
1214 (elf64_alpha_create_got_section): Likewise.
1215 (elf64_alpha_is_local_label_name): Likewise.
1216 (elf64_alpha_merge_ind_symbols): Likewise.
1217 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
1218 (mips_elf64_get_reloc_upper_bound): Likewise.
1219 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
1220 (nlm_alpha_get_public_offset): Likewise.
1224 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
1225 about overflow in R_OPENRISC_LO_16_IN_INSN and
1226 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
1230 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
1231 only for ELF_LINK_FORCED_LOCAL.
1232 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1233 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
1234 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1236 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
1237 if the symbol has hidden or internal visibility.
1241 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
1242 calls to undefined weak symbols.
1246 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
1247 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
1251 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
1252 out handled entries.
1253 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
1254 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
1255 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
1260 * config.bfd: Add arm-vxworks target.
1261 * coff-arm (coff_arm_relocate_section): Add in symbol value to
1262 addend (fro VXworks targets).
1266 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
1271 * bfd-in.h (bfd_cache_close): Declare newly exported function.
1272 * bfd-in2.h: Regenerated.
1276 * merge.c (struct sec_merge_hash_entry): Add alignment field.
1277 (struct sec_merge_hash): Remove alignment_power.
1278 (sec_merge_hash_newfunc): Clear alignment.
1279 (sec_merge_hash_lookup): Pass alignment as argument.
1280 Use hashp->root.next, not hashp->next to walk the hash chain.
1281 If a string already in the hashtable does not have required
1282 alignment, create a new hashtable entry.
1283 (sec_merge_init): Remove alignment_power argument.
1284 (sec_merge_add): Add alignment argument.
1285 (sec_merge_emit): Alignment is now a per-entity thing, not per
1287 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
1288 for proper alignment.
1289 Pass alignment information to sec_merge_add.
1293 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
1294 and R_REL16 reloc types; accept odd values for R_REL16 type
1298 * cpu-openrisc.c: New file.
1299 * elf32-openrisc.c: Likewise.
1301 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
1302 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
1303 (BFD32_BACKENDS): Add elf32-openrisc.lo.
1304 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
1305 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
1306 * Makefile.in: Regenerated.
1307 * config.bfd: (openrisc-*-elf): New target.
1308 * configure.in (bfd_elf32_openrisc_vec): New vector.
1309 * configure: Regenerated.
1310 * libbfd.h: Regenerated.
1311 * bfd-in2.h: Regenerated.
1312 * reloc.c: Add OpenRISC relocations.
1313 * targets.c (bfd_elf32_openrisc_vec): Declare.
1314 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
1315 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
1316 (bfd_openrisc_arch): Declare.
1317 (bfd_archures_list): Add bfd_openrisc_arch.
1318 * elf.c (prep_headers): Add bfd_arch_openrisc.
1322 * elf64-x86-64.c: Add c++ vtable hack.
1323 Small whitespace and comment changes.
1327 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
1328 (elf64_x86_64_plt_entry): Likewise.
1329 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
1330 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
1334 * elf32-cris.c: Tweak comments related to dynamic linking.
1335 (cris_elf_relocate_section): When not creating shared object, fill
1336 in the .got table for any symbol not in the dynamic symbol table.
1337 (elf_cris_finish_dynamic_symbol): When not creating shared object,
1338 only emit a .got.rela reloc if the symbol is in the dynamic symbol
1340 (cris_elf_check_relocs): Use variable r_type in all places rather
1341 than the original expression. Add default case in switch for
1343 (elf_cris_size_dynamic_sections): Iterate over
1344 elf_cris_discard_excess_program_dynamics when not creating shared
1346 (elf_cris_discard_excess_dso_dynamics): Renamed from
1347 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
1348 (elf_cris_discard_excess_program_dynamics): New.
1352 * coffcode.h (coff_write_object_contents): Use
1353 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
1357 * bfd-in2.h: Regenerate.
1361 * section.c (STD_SECTION): Add entsize.
1365 * section.c (SEC_MERGE): Define new flag for merging.
1366 (SEC_STRINGS): Likewise.
1367 (entsize): New field.
1371 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
1372 flag on pe-i386 targets.
1376 * libbfd-in.h (_bfd_merge_section): New.
1377 (_bfd_write_merged_section): New.
1378 (_bfd_merged_section_offset): New.
1379 * libbfd.h: Rebuilt.
1380 * linker.c (_bfd_generic_link_output_symbols): Handle
1382 * aoutx.h (aout_link_write_symbols): Likewise.
1383 * pdp11.c (aout_link_write_symbols): Likewise.
1384 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
1385 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
1387 (elf_link_sec_merge_syms): New.
1388 (elf_link_input_bfd): Call _bfd_merged_section_offset
1389 and _bfd_write_merged_section.
1390 Handle discard_sec_merge.
1391 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
1393 (struct bfd_elf_section_data): Likewise.
1394 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
1395 SEC_STRINGS section flags and entsize from their ELF counterparts.
1396 (_bfd_elf_link_hash_table_init): Initialize merge_info.
1397 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
1398 from their BFD counterparts.
1399 * merge.c: New file.
1400 * Makefile.am: Add strtab.lo.
1401 * Makefile.in: Rebuilt.
1405 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
1406 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
1410 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
1411 endian MIPS ELF target.
1412 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1415 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1416 64bit big endian MIPS ELF target.
1417 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1418 endian MIPS ELF target.
1419 * configure: Regenerated.
1421 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1422 little endian targets.
1423 (mips_elf_sym_is_global): Handle traditional targets.
1425 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1426 64bit big endian MIPS ELF target.
1427 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1428 endian MIPS ELF target.
1430 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1431 and bfd_elf64_tradlittlemips_vec.
1435 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1436 ordinary "progbits" section.
1440 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1441 when -Bsymbolic causes a symbol to no longer need a .plt entry.
1445 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1449 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1450 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1454 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1455 if there are any relocations for generic ELF.
1456 (bfd_elf32_bfd_link_add_symbols): Defined to
1457 elf32_generic_link_add_symbols.
1458 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1459 if there are any relocations for generic ELF.
1460 (bfd_elf64_bfd_link_add_symbols): Defined to
1461 elf64_generic_link_add_symbols.
1465 * Makefile.am (BUILD_CFILES): New variable: List of C source
1466 files created in build directory.
1467 (BUILD_HFILES): New variable: List of header files created in
1470 (po/POTFILES.in): Replace rule with empty entry.
1471 (po/SRC-POTFILES.in): New rule: Create a list of source files
1472 in the source directory.
1473 (po/BLD-POTFILES.in): New rule: Create a list of source files
1474 in the build directory.
1475 (MOSTLYCLEAN): Do not delete source files created in build
1477 * Makefile.in: Regenerate.
1478 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1480 * configure: Regenerate.
1482 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1484 Add .. to the search path when building bfd.pot.
1485 Delete POTFILES when performing distclean.
1486 Add comment describing why distclean is broken in maintainer mode.
1487 * po/POTFILES.in: Delete.
1488 * po/SRC-POTFILES.in: New file.
1489 * po/BLD-POTFILES.in: New file.
1490 * po/bfd.pot: Regenerate.
1494 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
1495 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1496 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1497 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1498 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1499 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1501 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1502 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
1503 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1504 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1505 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1506 New HOWTO members for new relocs.
1507 (cris_reloc_map): Map new relocs.
1508 (ELF_DYNAMIC_INTERPRETER): Define.
1509 (PLT_ENTRY_SIZE): Define.
1510 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1511 elf_cris_pic_plt_entry): New, PLT templates.
1512 (struct elf_cris_pcrel_relocs_copied, struct
1513 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1514 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1515 (cris_final_link_relocate): Check that 16-bit GOT relocs have
1516 positive values. Adjust PCREL relocs to be relative to location
1518 (cris_elf_relocate_section): Handle relocations to dynamic
1519 objects. Handle new relocations. Call error handler when seeing
1520 non-PIC relocation for read-only sections while generating shared
1522 (cris_elf_check_relocs): Set reference counts for GOT and PLT
1524 (bfd_elf32_bfd_link_hash_table_create,
1525 elf_backend_adjust_dynamic_symbol,
1526 elf_backend_size_dynamic_sections,
1527 elf_backend_finish_dynamic_symbol,
1528 elf_backend_finish_dynamic_sections,
1529 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1530 elf_backend_hide_symbol, elf_backend_want_got_plt,
1531 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1532 elf_backend_got_header_size, elf_backend_plt_header_size):
1535 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1536 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1537 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1538 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1539 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1540 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1541 * bfd-in2.h, libbfd.h: Regenerate.
1545 (_bfd_mips_elf_relocate_section): Give a better error message when
1546 a relocation is not recognized.
1550 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1551 non-NULL before attempting to dereference.
1555 * configure.in: Remove the redundent AC_ARG_PROGRAM.
1556 * configure: Rebuild.
1560 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1561 relocation value when resolving a reference from a debugging
1566 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1567 (xcoff64_swap_sym_out): Fix syntax errors.
1571 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1575 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1576 (hppa_link_hash_newfunc): Init it.
1577 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1578 section appears to be non-PIC.
1579 (final_link_relocate): Likewise.
1580 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1581 possible candidate function, and set pic_call for those that will
1582 only have a .plt entry for the PIC call stub.
1583 (hppa_handle_PIC_calls): Set maybe_pic_call.
1587 * elf32-sh.c (sh_elf_relocate_section): Only relocation
1588 R_SH_DIR8WP* relocs if they're against external symbols, else
1589 they're just for relaxing. Validate the reloc values.
1593 * binary.c (bfd_external_binary_architecture): Declare.
1594 (binary_object_p): If bfd_external_binary_architecture is defined,
1595 set the architecture to this string.
1599 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1600 entries that could serve as a definition for a weak symbol.
1604 * Most files: Update copyright notices using Perl script created
1609 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1610 prior patch on ! defined OLD_ARM_ABI.
1614 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1615 some relocation values.
1619 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1620 of offset in BLX(1) instruction.
1621 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1622 offset in BLX(1) instruction.
1627 * coff-arm.c (coff_arm_reloc_type_lookup): Add
1628 BFD_RELOC_THUMB_PCREL_BLX.
1632 * archures.c (bfd_default_scan): Add Coldfire CPUs.
1633 * bfd-in2.h: Regenerate.
1634 * cpu-m68k.c: Add Coldfire CPUs for arch table.
1635 * ieee.c (ieee_write_processor): Set proper id for
1640 * configure.in: Add s390 target.
1641 * configure: Regenerate.
1645 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1650 * elf32-arm.h: Update mentions of renamed EF_xx constants.
1651 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1655 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1656 abfd->tdata.aout_data == NULL.
1660 * elf32-hppa.c: Correct field selector in stub comments.
1661 (clobber_millicode_symbols): Formatting fix.
1663 * configure.in: Bump version to 2.11.90.
1664 * configure: Regenerate.
1665 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1666 (CFILES): $SOURCE_CFILES + generated C files.
1667 (POTFILES): Include $HFILES not $SOURCE_HFILES.
1669 * Makefile.in: Regenerate.
1670 * doc/Makefile.in: This too.
1674 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1679 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1680 up, replacing multiple if statements with a switch.
1681 (handle_COMDAT): New function.
1685 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1686 a warning for section flags we do not handle instead of
1691 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1695 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1696 * configure.in: Add objects for elf64_ia64_aix vectors.
1697 * configure: Regenerated.
1698 * configure.host: Recognize ia64-*-aix*.
1699 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
1700 for AIX. AIX5 requires most relocations to be dynamic (*all*
1701 binaries are somewhat similar to shared libraries).
1702 * targets.c: Add elf64_ia64_aix vectors.
1706 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1707 C8 said "1" instead of "8". Clarify error string for IMM22:
1708 "signed integer" instead of just "integer".
1712 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1713 PLT entries that could serve as a definition for a weak symbol.
1717 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1718 entries that could serve as a definition for a weak symbol.
1719 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1721 2001-02-18 David O'Brien <obrien@FreeBSD>
1723 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1724 FreeBSD/i386-CURRENT differently until I can figure out the needed
1726 * configure: Regenerate.
1727 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1728 FreeBSD/PowerPC, and FreeBSD/sparc64.
1732 * Makefile.am: Add PDP-11 a.out target.
1733 * config.bfd: Likewise.
1734 * configure.in: Likewise.
1735 * targets.c: Likewise.
1736 * archures.c: Likewise.
1737 * bfd-in2.h: Likewise. Add PDP-11 relocations.
1738 * libbfd.h: Add PDP-11 relocations.
1739 * reloc.c: Likewise.
1740 * cpu-pdp11.c: New file.
1741 * pdp11.c: New file.
1743 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1744 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1745 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1746 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1747 (GET_MAGIC): New macro.
1748 (PUT_MAGIC): Likewise.
1749 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1753 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1754 multiarch needs it).
1758 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1763 * vms-misc.c: Fix formatting.
1767 * vms.c: Fix formatting.
1771 * elf.c (elf_find_function): New function.
1772 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1773 the file name and function name.
1777 * ecoff.c (bfd_debug_section): Update to initialise new fields in
1780 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1781 (BFD64_BACKENDS): Add pepigen.c
1782 Add rules to create peigen.c and pepigen.c from peXXigen.c.
1784 * Makefile.in: Regenerate.
1785 * configure: Regenerate.
1786 * po/POTFILES.in: Regenerate.
1787 * po/bfd.pot: Regenerate.
1791 * libcoff-in.h (pe_tdata): Add members target_subsystem and
1792 force_minimum_alignment.
1796 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1797 (elf64_86_64_size_info): Struct added to fix a problem
1798 with the hashtable string entries.
1799 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1800 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1801 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1802 remove the FIXME for this.
1803 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1804 section. Also removed the FIXME for it.
1805 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1806 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1807 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1811 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1812 and not user provided.
1816 * vms.c (vms_print_symbol): Remove unreachable code.
1818 * rs6000-core.c: Fix formatting.
1822 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1823 as _bfd_XXi_only_swap_filehdr_out.
1824 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1825 pe->force_minimum_alignment to TRUE.
1826 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1827 PEI_TARGET_SUBSYSTEM.
1828 (pe_print_private_bfd_data): Call
1829 _bfd_XX_print_private_bfd_data_common() instead of
1830 _bfd_pe_print_private_bfd_data_common().
1831 (pe_bfd_copy_private_bfd_data): Call
1832 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1833 _bfd_pe_bfd_copy_private_bfd_data_common().
1834 (coff_bfd_copy_private_section_data): Define as
1835 _bfd_XX_bfd_copy_private_section_data instead of
1836 _bfd_pe_bfd_copy_private_section_data.
1837 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1838 of a _bfd_pe_get_symbol_info.
1842 * peXXigen.c: Renamed from peigen.c.
1843 (COFF_WITH_XX): Define this macro (will get expanded into
1844 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1845 compiled as peigen.c or pepigen.c.
1846 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1847 define the canonical PEP structures and definitions.
1848 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1849 effect, enforce minimum file and section alignments. If
1850 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1851 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1852 so, by default, this is a no-op).
1854 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1855 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1856 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1857 _bfd_pefoo if it's not defined. Use these macros to define
1860 * libcoff.h (pe_tdata): Add members target_subsystem and
1861 force_minimum_alignment.
1863 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1865 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
1867 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
1870 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
1871 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
1874 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
1875 (BFD64_BACKENDS_CFILES): Mention pepigen.c
1876 (peigen.c): Add rule to generate from peXXigen.c.
1878 (pepigen.lo): List dependencies for pepigen.lo.
1882 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
1883 $global$ referenced but not defined, set its value here.
1887 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
1889 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
1891 (elf64_x86_64_relocate_section): Fix formatting.
1892 (elf64_x86_64_relocate_section): Fix addend for relocation of
1893 R_X86_64_(8|16|32|PC8|PC16|PC32).
1897 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
1901 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
1906 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1907 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
1908 relocations against dynsym symbols.
1910 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1911 the R_MIPS_26 relocation.
1912 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1913 the R_MIPS_26 relocation.
1914 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1916 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1917 the R_MIPS_26 relocation.
1918 (mips_elf64_howto_table_rela): Likewise.
1920 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1921 member to mark symbols that have non-CALL relocations against
1923 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1924 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1926 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1927 non-CALL relocation against it is encountered.
1928 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1929 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1930 no_fn_stub is not set.
1932 * elf32-mips.c (mips_elf_output_extsym): Get the output section
1933 information from the real symbol for indirect ones.
1934 Check no_fn_stub to find out if a symbol has a function stub
1939 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1940 * Makefile.in: Regenerate.
1944 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
1945 true if section name is an unwind table section name.
1946 (elfNN_ia64_additional_program_headers): Count each unwind section
1948 (elfNN_ia64_modify_segment_map): Install one unwind program header
1949 for each unwind separate section. Note: normally the linker
1950 script merges the unwind sections that go into a single segment,
1951 so this still generates at most one unwind program header per
1954 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1955 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1956 (elfNN_ia64_fake_sections): Mark sections with names that start
1957 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1960 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1961 Use it to make sh_info in unwind section point to the text section
1966 * Makefile.am: Add linux target for S/390.
1967 * archures.c: Likewise.
1968 * bfd-in2.h: Likewise.
1969 * config.bfd: Likewise.
1970 * configure.in: Likewise.
1972 * libbfd.h: Likewise.
1973 * targets.c: Likewise.
1974 * cpu-s390.c: New file.
1975 * elf32-s390.c: New file.
1976 * elf64-s390.c: New file.
1980 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1981 ImageBase. This has already been done by coff_swap_hdr_in.
1985 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1989 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1990 (sparc64_elf_relocate_section): Likewise.
1994 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1995 similar to R_SPARC_32.
1996 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
2000 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
2001 relocation entries for weak definitions when building DSO with
2006 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
2007 before visibility. Locally defined protected symbols are not
2012 * config.bfd: Enable coff64 for rs6000-*. Patch from
2017 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
2018 found, do not attempt to find dwarf2 info before returning.
2022 * elflink.h (is_global_symbol_definition): Rename to
2023 is_global_data_symbol_definition and have it reject function
2025 (elf_link_is_defined_archive_symbol): Use renamed function.
2029 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
2030 * libbfd.h (bfd_target_vector): Likewise.
2031 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
2032 make static; create pointer reference named bfd_target_vector.
2033 (_bfd_target_vector_entries): Calculate this based on the array
2034 typed _bfd_target_vector.
2038 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
2039 internal symbols are not dynamic.
2040 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2044 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
2045 that it will not be pulled into the list of files that make up
2047 * Makefile.in: Regenerate.
2048 * po/bfd.pot: Regenerate.
2052 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
2054 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
2055 external_PEI_IMAGE_hdr.
2059 * elf-m10200.c: Fix formatting.
2063 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
2064 rel, it will be handled later on.
2068 * Makefile.in: Fix typo.
2072 * elf-m10300.c: Fix formatting.
2076 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
2077 (elf_backend_get_symbol_type): Define.
2078 (elf64_hppa_object_p): Set architecture and machine from elf
2083 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
2088 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
2089 for non-default visibility.
2090 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
2091 delete ugly macro and replace with pretty function.
2095 * coff-go32.c: Update copyright.
2096 * coff-stgo32.c: Likewise.
2097 * coff-go32.c (COFF_LONG_FILENAMES): Define.
2098 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
2099 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
2100 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2104 * bfd-in2.h: Rebuild.
2105 * libbfd.h: Likewise.
2109 * bfd-in2.h: Rebuild.
2113 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
2114 is NULL or PRIV(vms_rec) is outside of the buffer.
2118 * coff64-rs6000.c: Fix formatting.
2119 * coff-arm.c: Likewise.
2120 * coffgen.c: Likewise.
2121 * cofflink.c: Likewise.
2122 * coff-mcore.c: Likewise.
2123 * coff-mips.c: Likewise.
2124 * coff-pmac.c: Likewise.
2125 * coff-ppc.c: Likewise.
2126 * coff-rs6000.c: Likewise.
2127 * elf32.c: Likewise.
2128 * elf32-fr30.c: Likewise.
2129 * elf32-i370.c: Likewise.
2130 * elf32-i860.c: Likewise.
2131 * elf32-m32r.c: Likewise.
2132 * elf32-m68k.c: Likewise.
2133 * elf32-mcore.c: Likewise.
2134 * elf32-ppc.c: Likewise.
2135 * elf32-sh.c: Likewise.
2136 * elf32-v850.c: Likewise.
2137 * elf64-alpha.c: Likewise.
2138 * elf64-sparc.c: Likewise.
2139 * elflink.c: Likewise.
2140 * elflink.h: Likewise.
2141 * elf-m10200.c: Likewise.
2142 * elf-m10300.c: Likewise.
2143 * elfxx-ia64.c: Likewise.
2145 * aoutx.h: Fix formatting.
2147 * bfd-in2.h: Likewise.
2148 * bfd-in.h: Likewise.
2149 * cpu-i386.c: Likewise.
2150 * cpu-m68hc11.c: Likewise.
2151 * dwarf2.c: Likewise.
2152 * elf64-x86-64.c: Likewise.
2153 * format.c: Likewise.
2154 * freebsd.h: Likewise.
2156 * hp300hpux.c: Likewise.
2157 * hppabsd-core.c: Likewise.
2158 * hpux-core.c: Likewise.
2162 * elf64-x86-64.c: Added PIC support for X86-64.
2163 (elf64_x86_64_link_hash_newfunc): Function added.
2164 (elf64_x86_64_link_hash_table_create): Likewise.
2165 (elf64_x86_64_check_relocs): Likewise.
2166 (elf64_x86_64_gc_mark_hook): Likewise.
2167 (elf64_x86_64_gc_sweep_hook): Likewise.
2168 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2169 (elf64_x86_64_size_dynamic_sections): Likewise.
2170 (elf64_x86_64_discard_copies): Likewise.
2171 (elf64_x86_64_finish_dynamic_symbol): Likewise.
2172 (elf64_x86_64_finish_dynamic_sections): Likewise.
2173 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2177 * Makefile.am (install-data-local): Make use of $(DESTDIR).
2178 * Makefile.in: Regenerate.
2182 * coff-a29k.c: Fix formatting.
2186 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
2187 relocation section names.
2188 (elf_i386_relocate_section): Report files with bad relocation
2189 section names and return false.
2193 * targets.c: Alphabetize list of xvecs.
2197 * config.bfd: Add linux target variant for elfxx-hppa.
2198 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
2199 bfd_elf64_hppa_linux_vec.
2200 * configure: Regenerate.
2201 * elf64-hppa.c: Include elf64-target.h again to support linux
2203 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
2204 * elf32-hppa.c: Include elf32-target.h again to support linux
2206 (elf32_hppa_post_process_headers): New function.
2207 (elf_backend_post_process_headers): Define.
2208 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
2209 bfd_elf32_hppa_linux_vec.
2211 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
2212 and data_segment_base fields.
2213 (elf32_hppa_link_hash_table_create ): Init them.
2214 (elf32_hppa_check_relocs): Update comments.
2215 (hppa_record_segment_addr): New function.
2216 (elf32_hppa_relocate_section): Call it.
2217 (final_link_relocate): Handle R_PARISC_SEGREL32.
2218 (elf32_hppa_final_link): New function.
2219 (bfd_elf32_bfd_final_link): Define to call it.
2220 (hppa_unwind_entry_compare): New function.
2221 * cache.c (bfd_open_file): Create files in write+read mode.
2223 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
2224 SEGREL32 and numerous other relocs. Change duplicate
2225 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
2227 * opncls.c (bfd_fdopenr): Add parens like the comment says around
2230 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
2231 .plt entries for DT_INIT and DT_FINI.
2232 (elf32_hppa_finish_dynamic_sections): Remove special handling of
2233 DT_INIT and DT_FINI.
2235 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
2236 offsets for stub .plt access if wide mode. Check offset in range.
2240 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
2243 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
2248 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
2249 * configure: Regenerate.
2253 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
2254 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
2255 * cpu-arc.c (arch_info_struct): Add entries for variants.
2256 (bfd_arc_arch) Set default to bfd_mach_arc_5.
2257 (arc_get_mach) Don't assume machine names prefixed arc- before
2259 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
2261 (arc_elf_final_write_processing) Likewise.
2262 (ELF_MACHINE_CODE) Use EM_ARC.
2266 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
2275 * som.c: Fix formatting.
2279 * ecoffswap.h: Fix formatting.
2280 * elf-bfd.h: Likewise.
2281 * elfarm-nabi.c: Likewise.
2282 * elfarm-oabi.c: Likewise.
2283 * elfcode.h: Likewise.
2284 * elfcore.h: Likewise.
2285 * elflink.c: Likewise.
2286 * elflink.h: Likewise.
2287 * elfxx-ia64.c: Likewise.
2288 * elfxx-target.h: Likewise.
2289 * libbfd.c: Likewise
2290 * linker.c: Likewise.
2291 * lynx-core.c: Likewise.
2295 * pc532-mach.c: Fix formatting.
2296 * pe-arm.c: Likewise.
2297 * pe-i386.c: Likewise.
2298 * pe-mips.c: Likewise.
2299 * pe-ppc.c: Likewise.
2300 * pe-sh.c: Likewise.
2301 * pei-mips.c: Likewise.
2302 * pei-sh.c: Likewise.
2303 * peicode.h: Likewise.
2304 * ppcboot.c: Likewise.
2305 * ptrace-core.c: Likewise.
2309 * reloc.c: Fix formatting.
2310 * riscix.c: Likewise.
2311 * rs6000-core.c: Likewise.
2312 * xcoff-target.h: Likewise.
2316 * elfcode.h (elf_object_p): Also restore the bfd mach field on
2317 error, by calling bfd_default_set_arch_mach with incoming
2322 * vaxnetbsd.c: Fix formatting.
2323 * versados.c: Likewise.
2324 * vms-gsd.c: Likewise.
2325 * vms-hdr.c: Likewise.
2326 * vms-misc.c: Likewise.
2330 * archive.c (coff_write_armap): Don't write more than symbol_count
2331 `archive_member_file_ptr's.
2335 * vms-tir.c: Fix formatting.
2339 * vms.c: Fix formatting.
2344 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
2346 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
2348 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
2351 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
2353 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
2357 * libbfd.c (bfd_get_bits): Added
2358 (bfd_put_bits): Likewise
2359 * bfd-in.h: Declared the above.
2360 * bfd-in2.h: Regenerated.
2364 * targets.c: Fix formatting.
2365 * tekhex.c: Likewise.
2366 * trad-core.c: Likewise.
2370 * sco5-core.c: Fix formatting.
2371 * section.c: Likewise.
2372 * sparclinux.c: Likewise.
2373 * sparclynx.c: Likewise.
2374 * sparcnetbsd.c: Likewise.
2376 * stabs.c: Likewise.
2377 * stab-syms.c: Likewise.
2378 * sunos.c: Likewise.
2380 * sysdep.h: Likewise.
2384 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
2386 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
2387 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
2391 * vms-misc.c (_bfd_vms_get_record): Add default case to
2396 * elfcore.h (elf_core_file_p): Move to the start of the program
2397 headers before attempting to read them.
2401 * peigen.c: Fix formatting.
2407 * peigen.c: Fix formatting.
2411 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2415 * binary.c (binary_set_section_contents): Ignore sections
2420 * m68klinux.c: Fix formatting.
2421 * m68knetbsd.c: Likewise.
2422 * mipsbsd.c: Likewise.
2423 * netbsd-core.c: Likewise.
2424 * netbsd.h: Likewise.
2425 * newsos3.c: Likewise.
2426 * nlm32-alpha.c: Likewise.
2427 * nlm32-i386.c: Likewise.
2428 * nlm32-ppc.c: Likewise.
2429 * nlm32-sparc.c: Likewise.
2430 * nlmcode.h: Likewise.
2431 * nlmswap.h: Likewise.
2432 * nlm-target.h: Likewise.
2433 * ns32knetbsd.c: Likewise.
2437 * elflink.h (elf_link_output_extsym): Don't complain about undefined
2438 symbols in shared objects if allow_shlib_undefined is true.
2442 * cpu-sh.c: Fix formattng.
2443 * elf.c: Fix formattng.
2444 * elf32-mips.c: Fix formattng.
2445 * elf32-sh.c: Fix formattng.
2446 * elf64-alpha.c: Fix formattng.
2450 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2451 dwarf2_find_line_info as last parameter to invocation of
2452 _bfd_dwarf2_find_nearest_line.
2453 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2454 dwarf2_find_line_info as last parameter to invocation of
2455 _bfd_dwarf2_find_nearest_line.
2459 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2460 (BFD_LIBS): ...to here.
2461 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2462 (BFD_LIBS_CFILES): ...to here.
2463 * Makefile.in: Regenerate.
2464 * configure.in: Remove dwarf.lo from the elf shell variable.
2465 * configure: Regenerate.
2466 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2467 * libcoff.h: Regenerate.
2468 * coffgen.c (coff_find_nearest_line): Call
2469 _bfd_dwarf2_find_nearest_line.
2470 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2472 (read_abbrevs): Likewise
2473 (decode_line_info): Likewise.
2474 (parse_comp_unit): Likewise.
2475 (comp_unit_find_nearest_line): Likewise.
2476 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2477 * libbfd.h: Regenerate.
2478 * elf.c (_bfd_elf_find_nearest_line): Update call.
2479 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2480 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2481 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2482 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2483 (styp_to_sec_flags): Handle DWARF2 sections.
2484 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2485 to _bfd_find_nearest_line.
2486 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2487 call to _bfd_find_nearest_line.
2491 * coffgen.c: Fix formatting.
2492 * elf-m10300.c: Likewise.
2493 * elf32-i386.c: Likewise.
2494 * elf32-i960.c: Likewise.
2495 * elf32-m68k.c: Likewise.
2496 * elf32-mcore.c: Likewise.
2497 * elf32-ppc.c: Likewise.
2498 * elf32-sh.c: Likewise.
2499 * elf32-sparc.c: Likewise.
2500 * elf32-v850.c: Likewise.
2501 * elf64-alpha.c: Likewise.
2502 * elf64-hppa.c: Likewise.
2503 * elf64-mips.c: Likewise.
2504 * elf64-sparc.c: Likewise.
2508 * elf32-ppc.c: Fix formatting.
2509 * elf64-x86-64.c: Likewise.
2515 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2516 BFDs containing no sections or empty .text, .data or .bss sections
2517 to be merged, regardless of their flags.
2521 * elf32-m32r.c: Fix formatting.
2522 * elf32-m68hc11.c: Likewise.
2523 * elf32-m68hc12.c: Likewise.
2524 * elf32-m68k.c: Likewise.
2525 * elf32-mcore.c: Likewise.
2526 * elf32-pj.c: Likewise.
2527 * elf32-ppc.c: Likewise.
2531 * elf32-fr30.c: Fix formatting.
2532 * elf32-hppa.c: Likewise.
2533 * elf32-i370.c: Likewise.
2534 * elf32-i386.c: Likewise.
2535 * elf32-i860.c: Likewise.
2536 * elf32-i960.c: Likewise.
2540 * elf32-arm.h: Fix formatting.
2541 * elf32-avr.c: Likewise.
2542 * elf32-cris.c: Likewise.
2543 * elf32-d10v.c: Likewise.
2544 * elf32-d30v.c: Likewise.
2545 * elf-hppa.h: Likewise.
2546 * elf-m10200.c: Likewise.
2547 * elf-m10300.c: Likewise.
2551 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2552 bfd_mach_mips32_4k. Update FIXME comment.
2553 * archures.c (bfd_mach_mips32): New constant.
2554 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2555 the latter, renumber it.
2556 * bfd-in2.h (bfd_mach_mips32): New constant.
2557 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2558 the latter, renumber it.
2559 * cpu-mips.c (I_mips32): New constant.
2560 (I_mips4K, I_mips32_4k): Rename the former to the latter.
2561 (arch_info_struct): Add bfd_mach_mips32 entry, replace
2562 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2563 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2564 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
2565 with E_MIPS_MACH_MIPS32_4K.
2566 (_bfd_mips_elf_final_write_processing): Replace
2567 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2568 bfd_mach_mips32 case.
2569 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2570 comparison with support for MIPS32.
2571 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2574 * aoutx.h (NAME(aout,machine_type)): Add cases for
2575 bfd_mach_mips5 and bfd_mach_mips64.
2576 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2577 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2578 * cpu_mips.c (I_mips5, I_mips64): New definitions.
2579 (arch_info_struct): Add entries for bfd_mach_mips5 and
2581 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2582 _bfd_mips_elf_print_private_bfd_data): Add cases for
2583 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2584 (_bfd_mips_elf_final_write_processing): Add cases for
2585 bfd_mach_mips5 and bfd_mach_mips64.
2587 * aoutx.h (NAME(aout,machine_type)): Add a
2588 bfd_mach_mips_sb1 case.
2589 * archures.c (bfd_mach_mips_sb1): New constant.
2590 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2591 * cpu-mips.c (I_sb1): New constant.
2592 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2593 * elf32-mips.c (elf_mips_mach): Add case for
2595 (_bfd_mips_elf_final_write_processing): Add case for
2600 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2601 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2602 (sparc*-*-rtems*): Switched from a.out to ELF.
2606 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2607 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2608 (elf64-x86-64.lo): Add dependencies.
2609 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2610 bfd_mach_x86_64_intel_syntax.
2611 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2612 * config.bfd (x86_64): Add.
2613 * configure.in: Add support for bfd_elf64_x86_64_vec.
2614 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2615 (bfd_i386_arch, i8086_ar): Link in.
2616 * elf64-x86-64.c: New file.
2617 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2618 * targets.c (bfd_elf64_x86_64_vec): Add.
2619 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2623 * xcofflink.c: Fix formatting.
2627 * aoutx.h: Fix formatting.
2628 * bfd-in.h: Likewise.
2629 * bfd-in2.h: Likewise.
2630 * cache.c: Likewise.
2631 * cisco-core.c: Likewise.
2632 * coff64-rs6000.c: Likewise.
2633 * coffcode.h: Likewise.
2634 * coffswap.h: Likewise.
2635 * corefile.c: Likewise.
2636 * elf32-mips.c: Likewise.
2640 * aout-adobe.c: Fix formatting.
2641 * coff64-rs6000.c: Likewise.
2642 * coffgen.c: Likewise.
2643 * cofflink.c: Likewise.
2647 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2648 (obj_coff_strings_written): New accessor macro for above.
2649 * libcoff.h: Regenerate.
2650 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2652 * coffcode.h (coff_write_object_contents): No need to write out
2653 the string table if it's already been done.
2657 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2658 weak undefined symbols.
2662 * archures.c (bfd_mach_arm_5TE): Define.
2663 (bfd_mach_arm+XScale): Define.
2664 * bfd-in2.h: Regenerate.
2666 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2667 BFD_RELOC_ARM_PCREL_BLX.
2669 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2670 XScale machine numbers.
2672 * config.bfd (xscale-elf): Add target.
2673 (xscale-coff): Add target.
2675 * cpu-arm.c: Add xscale machine name.
2676 Add v5t, v5te and XScale machine numbers.
2680 * aix386-core.c: Fix formatting.
2684 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2685 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2686 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2687 (ins_imms_scaled): Initialize sign_bit at function entry.
2688 (elf64_ia64_operands): Add missing initializers.
2689 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2690 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2691 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2692 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2693 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2695 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2696 and free_extsyms at function entry.
2697 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2698 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2699 (get_got): Delete unused local srel.
2700 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2701 (elfNN_ia64_relocate_section): Delete unused local dynindx.
2705 * coff-a29k.c: Fix formatting.
2706 * coff-h8500.c: Likewise.
2707 * coff-i960.c: Likewise.
2708 * coff-ppc.c: Likewise.
2709 * coff-rs6000.c: Likewise.
2710 * coff-stgo32.c: Likewise.
2711 * coff-tic54x.c: Likewise.
2712 * coff-w65.c: Likewise.
2713 * cpu-h8500.c: Likewise.
2714 * cpu-hppa.c: Likewise.
2715 * cpu-ns32k.c: Likewise.
2716 * ecoff.c: Likewise.
2717 * ecofflink.c: Likewise.
2721 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2722 remove possibility of infinite loop.
2726 * aix386-core.c: Fix formatting.
2727 * aout-adobe.c: Likewise.
2728 * aout-arm.c: Likewise.
2729 * aout-encap.c: Likewise.
2730 * aout-ns32k.c: Likewise.
2731 * aout-target.h: Likewise.
2732 * aout-tic30.c: Likewise.
2733 * aoutf1.h: Likewise.
2734 * aoutx.h: Likewise.
2735 * archive.c: Likewise.
2736 * bfd-in.h: Likewise.
2737 * bfd-in2.h: Likewise.
2743 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2744 pltoff entries for DT_INIT and DT_FINI.
2745 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2746 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2751 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2752 (allocate_dynrel_entries): Likewise.
2753 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
2754 (set_pltoff_entry): Likewise.
2755 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2756 (elfNN_ia64_reloc_type_lookup): Likewise.
2757 (elfNN_ia64_install_value): Likewise.
2758 (elfNN_ia64_relocate_section): Likewise.
2759 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2760 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2764 * cpu-a29k.c: Fix formatting.
2765 * cpu-alpha.c: Likewise.
2766 * cpu-arm.c: Likewise.
2767 * cpu-avr.c: Likewise.
2768 * cpu-d10v.c: Likewise.
2769 * cpu-h8500.c: Likewise.
2770 * cpu-hppa.c: Likewise.
2771 * cpu-i370.c: Likewise.
2772 * cpu-i386.c: Likewise.
2773 * cpu-i960.c: Likewise.
2774 * cpu-ia64-opc.c: Likewise.
2775 * cpu-ia64.c: Likewise.
2776 * cpu-m32r.c: Likewise.
2777 * cpu-m68hc11.c: Likewise.
2778 * cpu-m68hc12.c: Likewise.
2779 * cpu-m68k.c: Likewise.
2780 * cpu-m88k.c: Likewise.
2781 * cpu-mips.c: Likewise.
2782 * cpu-ns32k.c: Likewise.
2783 * cpu-pj.c: Likewise.
2784 * cpu-powerpc.c: Likewise.
2785 * cpu-sh.c: Likewise.
2786 * cpu-sparc.c: Likewise.
2787 * cpu-tic54x.c: Likewise.
2788 * cpu-v850.c: Likewise.
2789 * cpu-vax.c: Likewise.
2790 * cpu-w65.c: Likewise.
2791 * cpu-we32k.c: Likewise.
2792 * cpu-z8k.c: Likewise.
2793 * dwarf1.c: Likewise.
2794 * dwarf2.c: Likewise.
2798 * coff-arm.c: Fix formatting.
2799 * coff-ppc.c: Likewise.
2800 * coff-rs6000.c: Likewise.
2801 * coff-sh.c: Likewise.
2802 * coff-sparc.c: Likewise.
2803 * coff-tic30.c: Likewise.
2804 * coff-tic54x.c: Likewise.
2805 * coff-tic80.c: Likewise.
2806 * coff-w65.c: Likewise.
2807 * coff-we32k.c: Likewise.
2808 * coff-z8k.c: Likewise.
2812 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2813 section with the same ALLOC|LOAD flags as the source section.
2817 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2818 by STO_ALPHA constants.
2822 * coff-pmac.c: Fix formatting.
2823 * coff-ppc.c: Likewise.
2827 * elflink.h (elf_link_add_object_symbols): Also add indirect
2828 symbols for common symbols with the default version.
2832 * section.c (STD_SECTION): Set gc_mark flag.
2836 * coff-i960.c: Likewise.
2837 * coff-m68k.c: Likewise.
2838 * coff-m88k.c: Likewise.
2839 * coff-mcore.c: Likewise.
2840 * coff-mips.c: Likewise.
2844 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2848 * coff-h8300.c: Fix formatting.
2849 * coff-h8500.c: Likewise.
2850 * coff-i386.c: Likewise.
2851 * coff-i860.c: Likewise.
2852 * coff-i960.c: Likewise.
2853 * coff-ia64.c: Likewise.
2857 * archive.c: Fix formatting.
2858 * archures.c: Likewise.
2862 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2863 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
2864 * section.c (bfd_set_section_contents): Call memcpy if
2865 section->contents set and location not equal to contents plus offset.
2869 * bfd-in.h: Fix formatting.
2870 * bfd-in2.h: Likewise.
2872 * binary.c: Likewise.
2874 * coff-a29k.c: Likewise.
2875 * coff-alpha.c: Likewise.
2876 * coff-apollo.c: Likewise.
2877 * coff-aux.c: Likewise.
2881 * aix386-core.c: Fix formatting.
2882 * aoutf1.h: Likewise.
2883 * aoutx.h: Likewise.
2884 * archures.c: Likewise.
2885 * armnetbsd.c: Likewise.
2889 * coff-h8300.c (special): Adjust reloc address.
2893 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
2894 to differentiate elf32 and elf64 on ia64.
2895 * bfd-in2.h: Regenerate.
2896 * config.bfd: Add target for "ia64*-*-hpux*".
2897 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
2898 * configure: Regenerate.
2899 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
2900 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
2902 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
2903 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
2904 * Makefile.in: Regnerate.
2905 * elf64-ia64.c: Deleted.
2906 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2910 * aout-adobe.c: Fix formatting.
2911 * aout-arm.c: Likewise.
2912 * aout-cris.c: Likewise.
2913 * aout-encap.c: Likewise.
2914 * aout-ns32k.c: Likewise.
2915 * aout-target.h: Likewise.
2916 * aout-tic30.c: Likewise.
2920 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2921 BFDs containing no sections to be merged, regardless of their flags.
2925 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2926 if a relocation for an undefined symbol also results in an
2931 * config.bfd: Add support for Sun Chorus.
2935 * configure.in: Recognize alpha-*-freebsd*.
2936 * configure: Regenerate.
2940 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2941 (Chunk): New global variable set by a parameter in objcopy.c.
2942 (S3Forced): New global variable set by a parameter in
2944 (srec_set_section_contents): If S3Forced is true, always generate
2946 (srec_write_section): Use 'Chunk' to limit maximum length of S
2951 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2952 * Makefile.in: Regenerate.
2953 * bfd-in2.h: Regenerate.
2954 * po/bfd.pot: Regenerate.
2958 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2959 EF_SOFT_FLOAT if it is defined.
2963 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2964 attempts to mix PIC code with non-PIC, just mark the output as
2965 being position dependent.
2966 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
2967 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
2968 all mismatches, not just the first one.
2972 * ieee.c (ieee_archive_p): Plug one of many possible
2973 memory leaks in error handling.
2977 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2978 elf32_sparc_object_p, elf32_sparc_final_write_processing):
2980 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2981 sparc64_elf_object_p): Support v9b.
2982 * archures.c: Declare v8plusb and v9b machines.
2984 * cpu-sparc.c: Ditto.
2988 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2991 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2992 (SYMBOL_CALLS_LOCAL): New macro.
2993 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2994 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2995 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2996 (ppc_elf_relocate_section): Use flag variable to determine
2997 whether the relocation refers to a local symbol.
2998 Test whether a PLTREL24 reloc will produce a reloc by looking
2999 to see whether a PLT entry was made.
3003 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
3004 entries that could serve as a definition for a weak symbol.
3010 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
3011 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
3012 against local symbols.
3013 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
3017 * section.c (struct sec): Add kept_section.
3018 (struct bfd_comdat_info): Remove sec, we can use above.
3019 (STD_SECTION): Add initializer.
3020 (bfd_make_section_anyway): Init here too.
3022 * bfd-in2.h: Regenerate.
3024 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
3026 (elf_link_input_bfd): Set all asection->symbol->value's here, and
3027 fudge values for discarded link-once section symbols.
3029 * elf64-hppa.c: Include alloca-conf.h
3033 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
3035 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
3039 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
3043 * section.c (bfd_make_section_anyway): Release newsect ptr when
3044 newsect->symbol fails to alloc. Use bfd_release instead of free.
3048 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
3049 (elf64_ia64_unwind_entry_compare): New.
3050 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
3054 * elflink.h (size_dynamic_sections): Don't create various tags if
3055 .dynstr is excluded from the link. Don't set first dynsym entry
3056 if dynsymcount is zero.
3057 (elf_bfd_final_link): Don't try to swap out dynamic syms if
3058 .dynsym excluded from the link. Don't try to write any dynamic
3059 sections excluded from the link.
3061 * elf.c (swap_out_syms): Handle global section symbols.
3065 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
3066 * coffcode.h (coff_set_alignment_hook): read extended reloc count
3067 (coff_write_relocs): write extended reloc count
3068 (coff_write_object_contents): account for extended relocs
3072 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
3074 * elf.c (_bfd_elf_make_section_from_shdr): Call the
3075 elf_backend_section_flags function.
3076 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
3078 (elf64_ia64_section_flags): New function containing flag conversion
3080 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
3081 * elfxx-target.h (elf_backend_section_flags): Define.
3082 (elfNN_bed): Initialize elf_backend_section_flags field.
3086 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
3087 _bfd_elf32_gc_record_vtable. Correct a comment.
3093 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
3094 produces binaries with got[1] = 0x80000001 to differenciate them
3095 for the dynamic linker from the broken binaries produced by old
3100 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
3101 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
3102 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
3103 * configure: Regenerate.
3107 Define two bfd_targets for absence and presence of leading
3108 underscore on symbols. Make sure to only link same kind.
3109 * elf32-cris.c (cris_elf_object_p,
3110 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
3111 cris_elf_merge_private_bfd_data): New.
3112 (elf_backend_object_p, elf_backend_final_write_processing,
3113 bfd_elf32_bfd_print_private_bfd_data,
3114 bfd_elf32_bfd_merge_private_bfd_data): Define.
3115 <Target vector definition>: Include elf32-target.h twice with
3116 different macro settings:
3117 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
3118 bfd_elf32_us_cris_vec.
3119 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
3120 (elf_symbol_leading_char): First as 0, then '_'.
3121 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
3122 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
3123 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
3124 * configure: Regenerate.
3125 * targets.c: Declare bfd_elf32_us_cris_vec.
3126 * po/bfd.pot: Regenerate.
3130 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
3131 R_ARM_THM_PC22 relocations.
3135 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
3139 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
3140 is has the SEC_HAS_CONTENTS flag set.
3145 * aout-cris.c (N_TXTADDR): Define.
3149 * som.c: Include alloca-conf.h.
3150 * Makefile.am: "make dep-am"
3151 * Makefile.in: Regenerate.
3155 * elf32-hppa.c (plt_stub): New.
3156 (PLT_STUB_ENTRY): Define.
3157 (elf32_hppa_link_hash_table): Change multi_subspace to packed
3158 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
3159 (elf32_hppa_link_hash_table_create): Init to suit.
3160 (elf32_hppa_check_relocs): Set has_12bit_branch and
3161 has_17bit_branch as appropriate.
3162 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
3163 non-local functions.
3164 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
3165 Add space for plt_stub as needed.
3166 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
3167 functions at plt_stub.
3168 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
3169 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
3171 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
3172 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
3173 of fixed size, and if negative, disable handling of input sections
3174 before stub section. Set up default stub group size depending
3175 on detected branch relocs.
3176 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
3177 ensure different offsets from sym_value aren't rounded to
3178 different 2k blocks. Use lrsel and rrsel for other stubs too for
3179 consistency rather than necessity.
3180 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
3181 (final_link_relocate): Likewise.
3182 (elf32_hppa_relocate_section): Likewise.
3184 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
3185 (_bfd_elf_hppa_gen_reloc_type): Generate them.
3186 (elf_hppa_final_link_relocate): Handle them.
3187 (elf_hppa_relocate_insn): Likewise.
3188 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
3192 * elfcode.h (elf_object_p): Preserve and clear abfd section
3193 information. Restore at error.
3197 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
3198 is empty, make sure that its rva also 0. NT loader dislikes
3203 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
3208 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
3209 currently unused RELATIVE_DYNAMIC_RELOCS code.
3210 (hppa_discard_copies): Likewise.
3211 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
3212 comments. Don't check non-code output sections for stub grouping.
3216 * section.c (bfd_get_unique_section_name): Return NULL if
3221 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
3222 instruction sequence to actually work.
3223 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
3228 * elf32-sh.c (sh_elf_relocate_section): Use
3229 _bfd_final_link_relocate to apply the relocation against a section
3230 symbol, when doing relocatable links.
3234 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
3236 (stub_hash_newfunc): Here too.
3237 (hppa_add_stub): And here.
3238 (elf32_hppa_link_hash_table): Remove stub_section_created,
3239 reloc_section_created, first_init_sec and first_fini_sec. Add
3241 (elf32_hppa_link_hash_table_create): Init to suit.
3242 (hppa_get_stub_entry): Add support for grouping stub sections.
3243 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
3244 section code. Index stub vars by section->id.
3245 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
3246 exit paths. Zap allocation of above removed vars. Refine
3249 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
3250 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3251 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
3252 rather than pointer to bfd_link_info.
3253 (hppa_add_stub): Likewise.
3254 (final_link_relocate): Likewise.
3258 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
3263 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
3264 ld/emulparams/shelf.sh.
3268 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
3269 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
3270 * bfd-in2.h: Regenerate.
3274 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
3275 LITUSE relocations incorrectly if -relax is specified on the ld
3276 command line and the displacement field of the load or store
3281 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
3282 first_fini_sec here.
3283 (elf32_hppa_size_stubs): Instead correctly find the first .init
3284 and .fini section here.
3288 * elf32-hppa.c (clobber_millicode_symbols): New function.
3289 (elf32_hppa_size_dynamic_sections): Call it.
3293 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
3294 packed. Add plabel, plt_abs packed booleans.
3295 (hppa_link_hash_newfunc): Init new fields.
3296 (PLABEL_PLT_ENTRY_SIZE): Define.
3297 (hppa_stub_name): Use size_t len vars.
3298 (hppa_add_stub): Likewise.
3299 (elf32_hppa_build_stubs): Likewise.
3300 (hppa_build_one_stub): Kill some compiler warnings.
3301 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
3302 if dynamic linking. Munge the local plt offsets into
3303 local_got_refcounts. Set h->plabel for all global PLABELs. Use
3304 size_t len vars. Add assert for plabel addend.
3305 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
3306 (elf32_hppa_hide_symbol): New function.
3307 (elf_backend_hide_symbol): Define.
3308 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
3309 with h->plabel set. Don't make plt entries to have dynamic syms
3310 when they have been forced local. If plt entry is used by a
3311 plabel, make it PLABEL_PLT_ENTRY_SIZE.
3312 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
3313 Set up .plt offsets for local syms.
3314 (elf32_hppa_relocate_section): Initialise plt entries for local
3315 syms. Leave weak undefined plabels zero. Make global plabel
3316 relocs against function symbol, and leave the addend zero.
3317 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
3318 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
3319 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
3320 relocs instead of SEGREL32 for dynamic got relocs.
3321 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
3322 (elf_backend_got_header_size): Adjust.
3323 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
3325 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
3326 (hppa_type_of_stub): Use it instead of #if 0
3327 (hppa_discard_copies): Use it here too.
3328 (elf32_hppa_size_dynamic_sections): And here.
3330 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
3331 (elf32_hppa_link_hash_table_create): And here.
3332 (hppa_build_one_stub): And here. Instead keep track of stub
3333 offset using _raw_size.
3334 (elf32_hppa_size_stubs): Likewise.
3335 (elf32_hppa_build_stubs): Likewise.
3336 (hppa_size_one_stub): Likewise. Resize reloc section too.
3338 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
3339 first_fini_sec handling. Don't search for reloc section or set
3340 hplink->reloc_section_created here.
3341 (elf32_hppa_size_stubs): Instead search for reloc sections, and
3342 set reloc_section_created here.
3343 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
3344 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
3346 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
3348 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
3349 with `hplink->root.'.
3350 (elf32_hppa_check_relocs): Likewise.
3351 (elf32_hppa_gc_sweep_hook): Likewise.
3352 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3353 (hppa_handle_PIC_calls): Likewise.
3354 (elf32_hppa_size_dynamic_sections): Likewise.
3355 (elf32_hppa_set_gp): Likewise.
3356 (elf32_hppa_relocate_section): Likewise.
3357 (elf32_hppa_finish_dynamic_symbol): Likewise.
3358 (elf32_hppa_finish_dynamic_sections): Likewise.
3361 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
3362 defined weak symbols in shared links.
3363 (final_link_relocate): Calls to defined weak symbols in shared
3364 objects must go via import stubs, as the target might not be known
3369 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
3370 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
3371 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
3372 the original entries with EMPTY_HOWTOs, and added new ones to fill
3374 (sh_elf_info_to_howto): Make sure the new gap isn't used.
3375 (sh_elf_relocate_section): Likewise.
3379 * cpu-mips.c (arch_info_struct): Add mips:4K
3380 * bfd-in2.h (bfd_mach_mips4K): New define.
3381 * archures.c: Add bfd_mach_mips4K to comment.
3382 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
3383 E_MIPS_ARCH_2 for bfd_mach_mips4K.
3387 * som.c (som_write_symbol_strings): Do not used fixed buffers,
3388 use size_t as a counter.
3389 (som_write_space_strings): Similarly.
3393 * elf32-i860.c (elf32_i860_relocate_pc26): New function
3395 (elf32_i860_relocate_section): Invoke new function from here.
3399 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
3404 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
3405 target section name instead of dumping core when the target symbol is
3410 * riscix.c: Remove DEFUN.
3414 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3415 initialise flags in output bfd if the input bfd is the default
3416 architecture with the default flags.
3420 * archive.c: Fix formatting.
3421 * coff-arm.c: Likewise.
3422 * doc/chew.c: Likewise.
3426 * section.c (bfd_get_unique_section_name): Put a dot before the
3431 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3432 * elf.c: Fix formatting.
3436 * config.bfd (sh-*-linux*): Added.
3437 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3438 * targets.c: Declare them.
3439 * elf32-sh-lin.c: New file.
3440 * Makefile.am: Compile it.
3441 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3442 * configure, Makefile.in: Rebuilt.
3446 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3447 pseduo-section when determining where the TOC ends.
3449 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3450 output x_tvndx as it is only two bytes wide.
3452 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3453 reloc is 26 or 32 bits wide.
3455 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3456 for relocs that don't change anything. Also look at the full
3461 * config.bfd (arm*-*-uclinux*): New target.
3465 * configure: Rebuilt with new libtool.m4.
3469 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3470 word for variable name.
3471 * bfd-in2.h: Regenerate.
3475 * config.in: Regenerate.
3476 * libbfd.h: Regenerate.
3477 * po/bfd.pot: Regenerate.
3478 * doc/bfdint.texi: Remove CVS date string - it foils compares with
3483 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
3487 Shared library and PIC support.
3488 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3489 (GOT_ENTRY_SIZE): New.
3490 (ELF_DYNAMIC_INTERPRETER): New.
3491 (STUB_SUFFIX): Define.
3492 (LONG_BRANCH_PIC_IN_SHLIB): Define.
3493 (RELATIVE_DYNAMIC_RELOCS): Define.
3494 (enum elf32_hppa_stub_type): New.
3495 (struct elf32_hppa_stub_hash_entry): Rename offset to
3496 stub_offset. Add a number of new fields.
3497 (struct elf32_hppa_link_hash_entry): New.
3498 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
3500 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3501 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3502 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
3504 (hppa_link_hash_newfunc): New function.
3505 (elf32_hppa_link_hash_table_create): Use above function. Init new
3507 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
3508 instead of addend, and remove sym_name from args. Don't use
3509 symbol name for local syms, instead use sym index.
3510 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3511 stub type rather than size. Pass in hash and handle import stub
3512 case. Also pass in reloc instead of offset so we can calculate
3513 PCREL22F and PCREL12F branches properly.
3514 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
3515 import and export stubs too.
3516 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
3517 import and export stub sizing.
3518 (elf32_hppa_check_relocs): New function.
3519 (elf32_hppa_adjust_dynamic_symbol): New function.
3520 (hppa_discard_copies): New function.
3521 (elf32_hppa_size_dynamic_sections): New function.
3522 (elf_backend_size_dynamic_sections): Define.
3523 (elf32_hppa_finish_dynamic_symbol): New function.
3524 (elf_backend_finish_dynamic_symbol): Define.
3525 (elf32_hppa_size_stubs): Stash params in link hash table, and move
3526 some local vars into the link hash table too. For shared links,
3527 trundle over function syms, generating export stubs. Handle
3528 PCREL22F branches. Break out stub creation code from here..
3529 (hppa_add_stub): .. to here. New function.
3530 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3531 call the bfd linker. Use elf_gp to record global pointer.
3532 Calculate a value from sections if $global$ is missing.
3533 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3534 (elf32_hppa_gc_mark_hook): New function.
3535 (elf_backend_gc_mark_hook): Define.
3536 (elf32_hppa_gc_sweep_hook): New function.
3537 (elf_backend_gc_sweep_hook): Define.
3538 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3539 Add rel to args, and remove howto, input_bfd, offset, addend,
3540 sym_name as we can recalculate these locally. Handle calls to
3541 dynamic objects, extra PIC relocs, PCREL22F branches. Change
3542 handling of undefined weak syms. Check that stubs are in range.
3543 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
3544 message on hitting a DPREL21L reloc that needs fixing. Subtract
3545 off PC for PCREL14F. Break out code that does a stub lookup from
3547 (hppa_get_stub_entry): ..to here. New function.
3548 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3549 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3551 (elf32_hppa_finish_dynamic_sections): New function.
3552 (elf_backend_finish_dynamic_sections): Define.
3553 (elf_backend_final_write_processing) Define.
3554 (hppa_handle_PIC_calls): New function.
3555 (elf32_hppa_build_stubs): Call it. Pass link_info to
3556 hppa_build_one_stub.
3557 (elf32_hppa_create_dynamic_sections): New function
3558 to create .plt and .got then set .plt flags correctly.
3559 (elf_backend_create_dynamic_sections): Define.
3560 (elf32_hppa_object_p): New function.
3561 (elf_backend_object_p): Define.
3562 (elf32_hppa_elf_get_symbol_type): New function.
3563 (elf_backend_get_symbol_type): Define.
3564 (elf_backend_can_gc_sections): Define.
3565 (elf_backend_want_got_plt): Define.
3566 (elf_backend_plt_alignment): Set to 2.
3567 (elf_backend_plt_readonly): Define.
3568 (elf_backend_want_plt_sym): Define.
3569 (elf_backend_got_header_size): Reserve one entry.
3571 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3572 (elf32_hppa_size_stubs): Pass in multi_subspace.
3573 (elf32_hppa_set_gp): Declare.
3575 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3576 (bfd_get_unique_section_name): New function.
3577 * bfd-in2.h: Regenerate.
3579 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3580 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3584 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3585 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3586 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3587 been updated in finish_dynamic_symbol before modifying function
3590 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3591 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
3592 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3593 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
3594 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
3595 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3596 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
3597 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3600 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3601 style of local labels as well.
3605 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3606 references to undefined symbols in debugging sections.
3610 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3611 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3612 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3617 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3618 (elf32_i860_is_local_label_name): New function and prototype.
3622 * configure.in: Increase version number to 2.10.91.
3623 * configure: Regenerate.
3624 * aclocal.m4: Regenerate.
3625 * config.in: Regenerate.
3626 * po/bfd.pot: Regenerate.
3630 * elf.c (_bfd_elf_make_section_from_shdr): Add
3631 .gnu.linkobce.wi. to the list of debug section names.
3635 * dwarf2.c (find_debug_info): New function: Locate a section
3636 containing dwarf2 debug information.
3637 (bfd_dwarf2_find_nearest_line): Find all sections containing
3638 debug information and include them in the stash.
3642 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3643 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3644 (sh_reloc_map): Add new relocs.
3645 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3646 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3647 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3648 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3650 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3651 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3652 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3653 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3654 New array constants.
3655 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3657 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3658 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3659 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3660 elf_sh_plt_reloc_offset): Define.
3661 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3662 elf_sh_link_hash_table): New structs.
3663 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3664 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3666 (elf_backend_create_dynamic_sections,
3667 bfd_elf32_bfd_link_hash_table_create,
3668 elf_backend_adjust_dynamic_symbol,
3669 elf_backend_size_dynamic_sections,
3670 elf_backend_finish_dynamic_symbol,
3671 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3672 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3673 elf_backend_got_header_size, elf_backend_plt_header_size):
3675 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3676 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3678 * bfd-in2.h, libbfd.h: Rebuilt.
3682 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3687 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3688 not initialized, set them to indicate the SH1 instruction set.
3692 * acinclude.m4: Include libtool and gettext macros from the
3694 * aclocal.m4, configure: Rebuilt.
3698 * elf.c: Eliminate references to __sparcv9 macro; replace with
3699 autoconf variables HAVE_PSINFO32_T etc.
3700 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3701 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3703 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3704 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3705 * aclocal.m4: Ditto.
3706 * configure: Regenerate.
3710 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3711 for any shared link, not just shared -Bsymbolic.
3712 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3713 any shared link, and pass link info to it.
3714 (elf_i386_size_dynamic_sections): Update comment.
3715 (elf_i386_discard_copies): Modify to discard relocs for symbols
3716 that have been forced local.
3717 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3718 that have been forced local.
3722 * elflink.h (elf_link_add_object_symbols): Allow common
3723 symbols to have an alignment of 1 if explicitly requested, and
3724 not overridden by other definitions.
3728 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3729 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3733 * elf-bfd.h (elf_link_hash_table): Add runpath.
3735 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3736 * bfd-in2.h: Rebuilt.
3738 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3739 "runpath" field to NULL.
3740 (bfd_elf_get_runpath_list): New function.
3742 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3747 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3748 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3749 explicitly. Improve validation of r_type.
3753 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3754 dynamic allocated content space. Add a comment to remind us that
3755 one day this ought to be fixed.
3756 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3757 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3758 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3762 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3763 field with the newly relocated value instead of adding it to the
3764 existing immediate field.
3765 (elf32_i860_relocate_splitn): Likewise.
3766 (elf32_i860_relocate_highadj): Likewise.
3770 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3771 was previously just a stub).
3775 * elflink.c (_bfd_elf_create_got_section): Don't abort().
3777 (_bfd_elf_create_dynamic_sections): Likewise.
3781 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3782 for undefined symbols to be the beginning of the section.
3784 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3785 four extra entries at the beginning of the .rela.plt section.
3786 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3787 section to account for the four reserved entries in the .plt section.
3791 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3792 to the list of NOPs we recognize after a branch-and-link.
3793 Use the ori NOP when one is needed.
3795 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3800 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3801 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3802 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
3807 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3811 * elf32-i860.c (elf32_i860_relocate_section): New function.
3812 (i860_final_link_relocate): New function.
3813 (elf32_i860_relocate_splitn): New function.
3814 (elf32_i860_relocate_pc16): New function.
3815 (elf32_i860_relocate_highadj): New function.
3816 (elf32_i860_howto): Minor adjustments to some relocations.
3817 (elf_info_to_howto_rel): Define.
3818 (elf_backend_relocate_section): Define.
3822 * elf32-arm.h: Fix formatting.
3826 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3830 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3834 * ieee.c (ieee_write_debug_part): Rewrite a comment.
3835 * elf64-ia64.c: Fix a typo.
3839 * elf32-i860.c (elf32_i860_howto_table): New structure.
3840 (lookup_howto): New function.
3841 (elf32_i860_reloc_type_lookup): New function.
3842 (elf32_i860_info_to_howto_rela): New function.
3843 (elf_code_to_howto_index): New structure.
3844 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3845 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3846 elf32_i860_reloc_type_lookup.
3850 * som.c (struct fixup_format): Constify `format'.
3851 (som_hppa_howto_table): Use SOM_HOWTO macro.
3852 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3853 (som_bfd_reloc_type_lookup): Likewise.
3854 (compare_subspaces): Remove unused `count1', `count2'.
3855 (som_begin_writing): Remove unused `total_reloc_size'.
3856 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3857 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3858 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3859 (som_find_nearest_line): Decorate unused parameter(s).
3860 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3861 (som_bfd_link_split_section): Likewise.
3865 * section.c: Restore backed out code.
3866 * elf.c: Restore backed out code.
3867 (copy_private_bfd_data): Fix bug preventing stipped dynamic
3868 binaries from working.
3869 * bfd-in2.h: Regenerate.
3873 * section.c: Back out the change made by Nick Clifton
3876 * bfd-in2.h: Likewise.
3881 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
3885 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
3886 * bfd-in2.h, libbfd.h: Regenerate.
3890 * section.c (struct sec): Add new boolean field 'segment_mark'.
3891 (STD_SECTION): Initialise new field to zero.
3893 * bfd-in2.h: Regenerate.
3895 * elf.c (copy_private_bfd_data): Reorganise section to segment
3896 mapping to cope with moved sections requiring new segments,
3897 and overlapping segments.
3898 (SEGMENT_END): New macro: Return the end address of a segment.
3899 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
3900 contains a section by comparing their VMA addresses.
3901 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
3902 contains a section by comparing their LMA addresses.
3903 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
3904 section should be included in a segment.
3905 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
3906 follows another in memory.
3907 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3912 * cpu-i860.c: Added comments.
3914 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3915 bfd_elf32_i860_little_vec.
3916 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3917 (ELF_MAXPAGESIZE): Changed to 4096.
3919 * targets.c (bfd_elf32_i860_little_vec): Declaration of
3921 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3923 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3924 config for little endian elf32 i860.
3925 (targ_defvec): Define for the new config above
3926 as "bfd_elf32_i860_little_vec".
3927 (targ_selvecs): Define for the new config above
3928 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3930 * configure.in (bfd_elf32_i860_little_vec): Added recognition
3933 * configure: Regenerated.
3937 * elflink.h (elf_merge_symbol): Take one more argument,
3938 dt_needed, to indicate if the symbol comes from a DT_NEEDED
3939 entry. Don't overide the existing weak definition if dt_needed
3941 (elf_link_add_object_symbols): Pass dt_needed to
3942 elf_merge_symbol ().
3946 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3951 * configure.host (*-*-aix*): AIX has 'long long' always.
3953 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3954 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3955 (xcoff_write_archive_contents_big): Don't update the offset
3956 of the symbol table, xcoff_write_armap will do it.
3960 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3961 of dynobj for SGI_COMPAT checks.
3965 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3966 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3967 * bfd-in2.h: Regenerate.
3971 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3972 range symbol indices in relocs and issue an error message.
3976 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3977 info->new_dtags when setting DT_FLAGS_1. It will only be set
3978 by the new linker options. It shouldn't break anything.
3982 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3983 only if info->new_dtags is true.
3987 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3988 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3992 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3993 (ALL_MACHINES_CFILES): Add cpu-cris.c.
3994 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3995 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3996 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3997 * Makefile.in: Rebuild.
3998 * aclocal.m4: Rebuild.
3999 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
4000 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
4001 (bfd_cris_arch): Declare.
4002 (bfd_archures_list): Add bfd_cris_arch.
4003 * bfd-in2.h: Rebuild.
4004 * config.bfd: (cris-*-*): New target.
4005 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
4006 * configure: Rebuild.
4007 * elf.c (prep_headers): Add bfd_arch_cris.
4008 * libbfd.h: Rebuild.
4009 * libaout.h (enum machine_type): Add M_CRIS.
4010 * reloc.c: Add CRIS relocations.
4011 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
4012 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
4013 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
4014 * po/POTFILES.in, po/bfd.pot: Regenerate.
4018 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
4019 DF_TEXTREL if DT_TEXTREL is set.
4020 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4021 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4022 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
4023 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
4024 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
4025 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4026 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
4027 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
4028 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
4029 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
4031 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
4032 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
4034 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
4038 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
4039 * bfd-in2.h: Rebuild.
4041 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
4042 (elf_dt_soname): New.
4044 * elf.c (bfd_elf_set_dt_needed_soname): New.
4046 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
4047 entry if the shared object loaded by DT_NEEDED is used to
4048 resolve the reference in a regular object.
4052 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
4053 DT_DEPAUDIT and DT_AUDIT as strings.
4057 * format.c: Fix formatting.
4061 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
4065 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
4066 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
4067 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
4068 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
4069 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
4070 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
4071 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
4075 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
4076 renamed functions from here...
4077 (assign_section_numbers): Use renamed functions.
4078 (prep_headers): Use renamed functions.
4080 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
4081 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
4082 * bfd-in2.h: Regenerate.
4086 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
4087 parenthesis in if statement.
4091 Enable the support for Traditional MIPS.
4092 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
4093 return ict_none appropriately for traditional mips targets.
4094 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
4095 (STUB_MOVE): Conditionalize for traditonal mips.
4096 (STUB_LI16): Likewise.
4097 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
4098 room for RTPROC header.
4099 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
4100 the permission for the PT_DYNAMIC as read, write and execute.
4101 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
4102 for traditonal mips.
4103 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
4104 _DYNAMIC_LINKING for traditonal mips.
4105 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
4106 in case of traditonal mips.
4107 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
4108 entry is required. For a function if PLT is not required then set the
4109 corresponding hash table entry to 0.
4110 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
4112 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
4113 shared object set the value to 0.
4114 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
4115 _DYNAMIC_LINKING for traditonal mips.
4116 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
4117 for traditonal mips.
4121 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
4125 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
4126 out a structure that is BFD_IN_MEMORY.
4130 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
4131 bfd pointer. Print section id instead of bfd pointer for local
4132 syms. Prefix addend with `+' for global syms as well as local.
4133 Correct calculation of name component lengths.
4134 (elf64_hppa_check_relocs): Update call to get_dyn_name.
4137 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
4138 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
4139 (elf64_hppa_modify_segment_map): Likewise.
4143 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
4144 addresses to be "naturally" sign extended. Return -1 if unknown.
4145 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
4146 * bfd-in2.h: Regenerate.
4150 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
4151 and ECOF_SIGNED_64 to list ways to extract an offset.
4152 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
4153 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
4155 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
4156 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
4160 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
4161 bfd_get_start_address.
4162 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
4163 (elf_swap_ehdr_out): Ditto.
4167 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
4168 compatibility with older binutils.
4172 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
4173 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
4176 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
4177 (parse_line_table): Ditto.
4178 (_bfd_dwarf1_find_nearest_line): Ditto.
4179 * syms.c (cmpindexentry): Remove extra `*' from params.
4183 * elf32-mips.c (sort_dynamic_relocs): New Function.
4184 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
4185 via qsort to sort the dynamic relocations in increasing r_symndx
4190 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
4191 ATTRIBUTE_UNUSED to unused args.
4192 (get_opd): Likewise.
4193 (get_plt): Likewise.
4194 (get_dlt): Likewise.
4195 (get_stub): Likewise.
4196 (elf64_hppa_adjust_dynamic_symbol): Likewise.
4197 (elf64_hppa_link_output_symbol_hook): Likewise.
4198 (elf64_hppa_check_relocs): Delete unused var.
4199 (elf64_hppa_size_dynamic_sections): Likewise.
4200 (elf64_hppa_finalize_opd): Likewise.
4201 (elf64_hppa_finalize_dynreloc): Likewise.
4202 (elf64_hppa_modify_segment_map): Likewise.
4203 (elf64_hppa_finish_dynamic_sections): Likewise.
4205 * elf-hppa.h (elf_hppa_final_write_processing): Add
4206 ATTRIBUTE_UNUSED to unused args.
4207 (elf_hppa_final_link_relocate): Likewise.
4208 (elf_hppa_record_segment_addrs): Add paretheses.
4209 (elf_hppa_relocate_section): Constify dyn_name.
4212 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
4213 rearrange case statement so that it gets preferred to 32-bit ones.
4215 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
4216 asection->id instead of address of asection structure.
4217 (elf32_hppa_size_stubs): Likewise.
4219 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
4220 for .init* and .fini*.
4222 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
4223 and addends used in stub names to 32 bits.
4224 (elf32_hppa_size_stubs): Likewise.
4226 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
4227 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
4228 not bfd_put_64. Fix minor comment typo and formatting.
4230 Changes to create multiple linker stubs, positioned immediately
4231 before the section where they are required.
4232 * elf32-hppa.c: Don't include hppa_stubs.h.
4233 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
4234 (elf32_hppa_stub_hash_table): Delete.
4235 (elf32_hppa_link_hash_entry): Delete.
4236 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
4237 stub_hash_table, and store the struct here rather than a pointer.
4238 Delete output_symbol_count. Add offset array. Change
4239 global_value to a bfd_vma.
4240 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
4241 (elf32_hppa_stub_hash_traverse): Delete.
4242 (elf32_hppa_name_of_stub): Delete.
4243 (elf32_hppa_link_hash_lookup): Delete.
4244 (elf32_hppa_link_hash_traverse): Delete.
4245 (elf32_hppa_stub_hash_table_init): Delete.
4246 (elf32_hppa_size_of_stub): Pass input section and offset rather
4247 than location and calculate location here. Don't pass name as all
4248 stubs are now the same size.
4249 (elf32_hppa_stub_hash_newfunc): Init new fields.
4250 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
4252 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
4253 comparing against ints. Rewrite stub handling code.
4254 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
4255 Case enums to int before comparing against ints. Remove
4256 bfd_reloc_dangerous case.
4257 (elf32_hppa_build_one_stub): Rewrite.
4258 (elf32_hppa_size_one_stub): New function.
4259 (elf32_hppa_build_stubs): Rewrite.
4260 (elf32_hppa_size_stubs): Pass in linker call-back functions.
4261 Rewrite stub-handling specific code.
4263 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
4265 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
4267 * hppa_stubs.h: Delete.
4268 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
4269 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
4270 * Makefile.in: Regenerate.
4272 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
4275 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
4277 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
4278 and section name for bfd_reloc_notsupported error message.
4279 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
4280 bfd_reloc_notsupported.
4281 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
4283 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
4284 undefined weak symbols for all relocs.
4285 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
4286 offsets are relative to one past the delay slot.
4287 (elf32_hppa_size_stubs): Account for reloc addend when calculating
4288 branch destination. Put addend into stub name too.
4289 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
4290 adjust by 8 when deciding whether a linker stub is needed. Put
4291 addend into stub name as for above.
4293 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
4294 various args and vars.
4295 (elf32_hppa_bfd_final_link_relocate): Here too.
4296 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
4297 inner block var to avoid shadowing.
4299 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
4301 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
4302 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
4303 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
4305 * libhppa.h: Change practically all unsigned ints to plain ints.
4306 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
4310 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
4311 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
4314 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
4315 to the new OP_* ones.
4317 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
4318 error exit. Bail out earlier on plabel relocs that we aren't
4319 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
4320 string, and then don't free our copy.
4321 (elf32_hppa_build_one_stub): Make insn unsigned int.
4323 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
4324 available with BL, not BE and BLE.
4326 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
4327 code for elf arg relocs.
4328 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
4329 argument with elf_link_hash_entry h. Handle undefined weak
4330 symbols. Move $global$ lookup from here...
4331 (elf32_hppa_relocate_section): ...to here. Return correct error
4332 message for non-handled relocs.
4333 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
4334 wrong test was -0x3ffff to +0x40000.
4336 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
4337 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
4338 Handle them as such.
4339 (elf_hppa_relocate_insn): Fix a typo.
4341 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
4342 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4343 assemble_17, assemble_21): Delete.
4344 Supply defines for all 64 possible opcodes.
4345 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
4346 formats. Handle COMICLR.
4347 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
4350 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
4351 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
4352 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
4354 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
4355 the local syms - did this code get deleted accidentally? Ignore
4356 undefined and undefweak syms.
4358 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
4359 block. Use it instead of elf64_hppa_hash_table (info).
4360 (elf_hppa_final_link_relocate): Use hppa_info instead of
4361 elf64_hppa_hash_table (info).
4363 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4364 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4365 (hppa_rebuild_insn): Mask immediate bits here instead.
4366 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4370 * section.c (struct sec): Add id field. Tidy comment formatting.
4371 (bfd_make_section_anyway): Set id.
4372 (STD_SECTION): Init id too.
4373 Change CONST to const throughout.
4374 * archures.c (bfd_arch_info): Tidy comment.
4375 (bfd_arch_list): Change a CONST to const.
4376 * libbfd-in.h: Tidy comments and replace CONST with const.
4377 * elf-bfd.h: Likewise.
4378 * libbfd.h: Regenerate.
4379 * bfd-in2.h: Regenerate.
4380 * libcoff.h: Regenerate.
4384 * archive.c (_bfd_write_archive_contents): Add an informative
4389 * srec.c: Fix formatting.
4397 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
4398 value of PC-relative offsets.
4402 * elf64-alpha.c (alpha_elf_size_info): New.
4403 (elf_backend_size_info): Define to alpha_elf_size_info.
4404 * elfcode.h (elf_size_info): Change hash bucket size to 4.
4408 * elf32-mips.c: Include elf32-target.h again for the traditional
4413 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4414 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4415 (avr_info_to_howto_rela): Likewise.
4416 (elf32_avr_gc_mark_hook): Likewise.
4417 (elf32_avr_gc_sweep_hook): Likewise.
4418 (elf32_avr_relocate_section): Likewise.
4422 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4423 an external symbol for a non-shared, non-relocatable link.
4427 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4428 is an external symbol.
4429 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4434 * reloc16.c: Fix formatting.
4438 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4439 to add a new target for traditional mips i.e
4440 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4441 * configure.in: Likewise.
4442 * configure: Rebuild.
4443 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4445 (bfd_elf32_tradlittlemips_vec): Likewise.
4446 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4447 to see that elfNN_bed does not get redefined even if the target file
4448 is included twice for a chip. See elf32-mips.c.
4452 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
4453 (CLEANFILES): Add DEPA.
4454 * Makefile.in: Regenerate.
4458 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4459 can't assume the PE header is at 0x80.
4463 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4467 * go32stub.h: Update stub.
4471 * archures.c (bfd_mach_avr5): Define.
4472 * bfd-in2.h (bfd_mach_avr5): Define.
4473 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4474 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
4475 (compatible): Update comment. Add missing test.
4476 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4477 for avr2 and avr4. Simplify 8K wrap code.
4478 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4479 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4483 * coff-h8300.c: Fix formatting.
4484 * cpu-h8300.c: Likewise.
4488 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4489 for local symbols whose names are unknown.
4493 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4495 * Makefile.in: Regenerate.
4496 * doc/Makefile.in: Regenerate.
4500 * Makefile.am: Rebuild dependency.
4501 * Makefile.in: Rebuild.
4505 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4506 (elf_backend_copy_indirect_symbol): Map to the new function.
4510 * archive.c (normalize): Correct pointer comparison when checking
4512 (bfd_bsd_truncate_arname): Likewise.
4513 (bfd_gnu_truncate_arname): Likewise.
4517 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4518 sections elf_{text,data}_{section,symbol}.
4519 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4520 (_bfd_mips_elf_hide_symbol): New function.
4521 (elf_backend_hide_symbol): Map to the new function.
4522 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4523 definitions of mips_elf_{text,data}_{section,symbol}.
4524 (mips_elf_local_relocation_p): Try to find the direct symbol
4525 based on new check_forced argument.
4526 (mips_elf_calculate_relocation): Use new version of
4527 mips_elf_local_relocation_p.
4528 (mips_elf_relocate_section): Likewise.
4529 (_bfd_mips_elf_relocate_section): Likewise.
4530 (mips_elf_sort_hash_table): Only assert that have enough GOT
4532 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4533 entry if the relocation based on the new external argument.
4534 (mips_elf_create_dynamic_relocation): Assert that we have a
4535 section contents allocated where we can swap out the dynamic
4537 (mips_elf_calculate_relocation): Find the real hash-table entry
4538 correctly by using h->root.root.type. Only create a dynamic
4539 relocation entry if the symbol is defined in a shared library.
4540 Create an external GOT entry for the GOT16 relocation if the
4541 symbol was forced local.
4542 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4543 dynamic index if the symbol was forced local.
4547 * elf32-mips.c: Fix typos in comments.
4551 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4556 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4557 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4558 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4559 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4560 (bfd_elf32_m68hc11_vec): Likewise.
4561 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4562 Supports 68hc11 & 68hc12 at the same time.
4563 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4565 (bfd_elf32_m68hc11_vec): Likewise.
4566 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4567 * archures.c (bfd_m68hc12_arch): Define and register in global list
4568 (bfd_m68hc11_arch): Likewise.
4569 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4570 BFD_RELOC_M68HC11_3B): Define.
4571 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4572 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4576 * elf_bfd.h (struct elf_backend_data): Add info argument to
4577 elf_backend_hide_symbol.
4578 (_bfd_elf_link_hash_hide_symbol): Likewise.
4579 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4580 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4581 * elflink.h (elf_link_add_object_symbols): Likewise.
4582 (elf_link_assign_sym_version): Likewise.
4586 * coff-i386.c (coff_i386_reloc): Don't return in case of
4587 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4588 Compensate PE relocations when linking with non-PE object
4589 files to generate a non-PE executable.
4593 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4594 GOT entries if we're doing a static link or -Bsymbolic link.
4598 * elflink.h (elf_link_adjust_relocs): Check for and call backend
4599 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4601 (elf_link_output_relocs): Likewise.
4602 (elf_reloc_link_order): Likewise.
4606 * archures.c (enum bfd_architecture): #define constants for
4607 PowerPc and RS6000 machine numbers.
4608 * bfd-in2.h: Regenerate.
4609 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4610 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
4611 and RS6000 machine numbers using #defined constants from
4613 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4614 machine numbers using #defined constants from archures.c. Add
4615 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
4616 64-bit words in 620 entry.
4617 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4619 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4623 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4624 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4625 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4629 * bfd-in.h (bfd_family_coff): Define.
4630 * bfd-in2.h: Regenerate.
4631 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4632 coff_find_nearest_line): Check COFFness using bfd_family_coff()
4633 instead of bfd_target_coff_flavour.
4634 * cofflink.c (_bfd_coff_final_link): Likewise.
4635 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4636 exclude XCOFF files.
4637 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4639 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4640 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4641 * xcofflink.c (XCOFF_XVECP): Delete.
4642 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4643 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4644 bfd_xcoff_record_link_assignment,
4645 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4646 check for bfd_target_xcoff_flavour.
4650 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4652 (read_hdr): New function.
4653 (rs6000coff_core_p): Store mstsave or __context64 struct instead
4654 of trying to extract individual registers. Set abfd->arch_info
4655 to match the architecture that created the core file.
4656 (rs6000coff_get_section_contents): Delete.
4657 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4661 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4666 * configure: Regenerate.
4670 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4675 * configure.in (VERSION): Update to show this is the CVS mainline.
4679 * elf32-d10v.c: Include elf/d10v.h
4680 (enum reloc_type): Delete.
4681 * elf32-d30v.c: Include elf/d30v.h
4682 (enum reloc_type): Delete.
4684 * Makefile.am: Run "make dep-am" to regenerate dependencies.
4685 * Makefile.in: Regenerate.
4687 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4688 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4689 move HOWTOs into elf_howto_table.
4690 (R_386_standard, R_386_ext_offset): Define.
4691 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4692 (elf_i386_reloc_type_lookup): Modify calculation of index into
4693 elf_howto_table since we've removed the padding.
4694 (elf_i386_info_to_howto_rel): Likewise.
4695 (elf_i386_relocate_section): Likewise.
4699 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4703 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4704 an error when seeing an undefined symbol with hidden/internal
4705 attribute. It is handled in *_relocate_section ().
4709 * elflink.h (elf_fix_symbol_flags): Follow the link for the
4710 indirect symbol for the ELF_LINK_NON_ELF bit.
4711 (elf_link_output_extsym): Don't output the indirect symbol even
4712 if the ELF_LINK_NON_ELF bit is set.
4716 * config.bfd (i[3456]86-*-netbsdelf*): New target.
4717 (i[3456]86-*-netbsdaout*): New target.
4718 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4719 (i[3456]86-*-openbsd*): Likewise.
4723 * trad-core.c: From hpux-core.c, include <dirent.h> or
4724 <sys/ndir.h> when possible.
4728 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4729 definitions. We must not assume they are sorted in the file
4730 according to their index numbers.
4734 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4735 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
4736 R_PARISC_DIR17F are for absolute branches; Handle them as such.
4740 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4741 80960CA, 80960MC as valid machine names.
4745 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4746 visibility bits if the symbol is undefined. Correctly handle
4747 weak undefined symbols with hidden and internal attributes.
4749 * elflink.h (elf_link_add_object_symbols): Always turn the
4750 symbol into local if it has the hidden or internal attribute.
4754 * ppcboot.c: Add packed attribute if compiling with GCC.
4758 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4762 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4763 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4764 corefile on a 64-bit (Sparc Solaris) host. Also clean up
4769 * Makefile.am: Update dependencies with "make dep-am"
4770 * Makefile.in: Regenerate.
4772 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4773 bindtextdomain): Replace defines with those from intl/libgettext.h
4774 to quieten gcc warnings.
4778 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4780 * archive.c (normalize, bfd_bsd_truncate_arname,
4781 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4782 file names with backslashes.
4784 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4787 * sysdep.h: Include filenames.h.
4791 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4795 * elf64-sparc.c (sparc64_elf_relax_section): New.
4796 (sparc64_elf_relocate_section): Optimize tail call into branch always
4798 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4799 (elf32_sparc_relax_section): New.
4803 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4804 Remove unusued variables.
4805 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4806 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4807 previous fix, so that shared libs really don't influence targets
4808 extension mask and memory model.
4812 * elf64-alpha.c (elf64_alpha_relocate_section): Check
4813 h->root.other not h->other.
4814 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4816 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4820 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4821 undefined symbol with the non-default visibility attributes.
4822 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4823 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4824 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4825 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4826 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4827 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4828 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4829 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4830 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4831 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4832 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4836 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4837 PCREL22, PCREL64I. Zero size of special relocs.
4838 (elf64_ia64_reloc_type_lookup): Likewise.
4839 (USE_BRL, oor_brl, oor_ip): New.
4840 (elf64_ia64_relax_section): New.
4841 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4842 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4843 (elf64_ia64_relocate_section): Likewise.
4844 (bfd_elf64_bfd_relax_section): New.
4845 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4846 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4847 * bfd-in2.h, libbfd.h: Regenerate.
4851 * configure.in : Add peigen.lo to MIPS PE targets.
4852 * configure: Regenerate.
4856 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4857 only if it is known for both input and output bfds. Separate
4858 error message strings as in some languages, it may be necessary
4859 to change more than one place in the string to change between
4862 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4863 endianess checks, call _bfd_generic_verify_endian_match() instead.
4865 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4867 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
4869 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
4870 endianess before checking bfd flavours.
4874 * elflink.h (elf_link_output_extsym): Clear the visibility
4875 field for symbols not defined locally.
4879 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4880 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4881 (hppa_rebuild_insn): Mask immediate bits here instead.
4882 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4886 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
4887 relocs for an executable, ensure that they are virtual addresses.
4891 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
4896 * elflink.h: Add emitrelocations support: when enabled, relocation
4897 information and relocation sections are put into final output
4898 executables. If the emitrelocations flag is set, do the following:
4899 (elf_bfd_final_link): Emit relocation sections.
4900 (elf_link_input_bfd): Compute relocation section contents.
4901 (elf_gc_sections): Don't clean relocation sections.
4905 * som.c (som_decode_symclass): Recognize weak symbols.
4909 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4910 read idata section only from dataoff.
4911 (pe_print_edata): Correctly check for valid eat_member.
4915 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4919 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4923 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4925 * peigen.c (pe_print_idata): Look for .idata section and print
4926 info even if data directory has zero entries. Read idata section
4927 starting from dataoff, and adjust all data offsets to suit. Cast
4928 all bfd_vma vars to unsigned long before passing to fprintf.
4929 * peigen.c (pe_print_edata): Similarly, look for .edata section
4930 and print info even if data directory has zero entries. Cast
4931 all bfd_vma vars to unsigned long before passing to fprintf.
4934 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4935 directory size which may be bogus.
4936 * peigen.c (pe_print_edata): Similarly.
4940 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4942 (copy_private_bfd_data): Allow for space possibly taken up by elf
4943 headers when calculating segment physical address from lma.
4947 * versados.c (versados_scan): Init stringlen and pass_2_done.
4949 * trad-core.c (trad_unix_core_file_p): Return
4950 bfd_error_wrong_format rather than bfd_error_file_truncated.
4952 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4953 add_data_entry. DataDirectory virtual address is relative.
4954 (pe_print_idata): Account for relative DataDirectory virtual
4955 addresses. Don't trash datasize inside POWERPC_LE_PE code.
4956 (pe_print_edata): Similarly.
4959 * peigen.c (dir_names): Add Delay Import Directory.
4960 (pe_print_idata): Always search for bfd section containing
4961 idata address rather than looking up section name. Print this
4962 section name rather than .idata.
4963 (pe_print_edata): Similarly. Also print some fields as %08lx.
4964 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4969 * xcoff.h: Rename to xcoff-target.h
4970 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4971 * coff-rs6000.c: Ditto.
4972 * coff64-rs6000.c: Ditto.
4973 * coff-pmac.c: Ditto.
4974 * Makefile.in: Regenerate.
4978 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4979 Change U802TOC64MAGIC to U803XTOCMAGIC.
4983 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4984 * bfd-in.h: Prototype bfd_elf_get_arch_size.
4985 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4989 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4993 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4994 hidden and internal symbols.
4995 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4997 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4998 assign a PLT or GOT entry to symbols with hidden and
4999 internal visibility.
5003 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
5005 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5009 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
5014 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
5015 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
5017 * Makefile.in: Regenerate.
5021 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
5022 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
5023 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
5024 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
5025 * Makefile.in: Rebuild.
5029 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
5030 doesn't work very well.
5032 * elf-hppa.h (elf_hppa_internal_shdr): Define.
5033 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
5034 Set hdr->s_type to 1 if ARCH_SIZE == 32.
5035 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
5036 (elf_hppa_info_to_howto): Likewise.
5037 (elf_hppa_info_to_howto_rel): Likewise.
5038 (elf_hppa_reloc_type_lookup): Likewise.
5039 (elf_hppa_is_local_label_name): Likewise.
5040 (elf_hppa_fake_sections): Likewise.
5041 (elf_hppa_final_write_processing): Likewise.
5042 (elf_hppa_howto_table): Fully initialise all entries.
5043 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
5044 (elf_hppa_info_to_howto): Likewise.
5045 (elf_hppa_info_to_howto_rel): Likewise.
5046 (elf_hppa_reloc_type_lookup): Likewise.
5047 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
5048 elf_hppa_unmark_useless_dynamic_symbols,
5049 elf_hppa_remark_useless_dynamic_symbols,
5050 elf_hppa_record_segment_addrs, elf_hppa_final_link,
5051 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
5052 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
5053 elf32-hppa.c mess is cleaned up.
5054 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
5055 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
5056 r_field then call hppa_field_adjust inline func with variable
5057 r_field arg, instead call hppa_field_adjust with fixed arg.
5058 In case R_PARISC_PCREL22F, don't set r_field.
5059 (elf_hppa_relocate_insn): Change args and return type to unsigned
5060 int. Call re_assemble_* funcs to do the work.
5062 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
5065 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
5067 (sign_extend): Mask first before sign extending.
5068 (low_sign_extend): Rewrite without condition expression.
5069 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
5070 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
5071 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
5072 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
5073 result as function return value rather than through pointer arg.
5074 Accept unsigned int args, and return unsigned int.
5075 (re_assemble_3): New. Combines function of dis_assemble_3 with
5076 re-assembly of opcode and immediate.
5077 (re_assemble_12): Likewise.
5078 (re_assemble_16): Likewise.
5079 (re_assemble_17): Likewise.
5080 (re_assemble_21): Likewise.
5081 (re_assemble_22): Likewise.
5082 (hppa_field_adjust): Rewrite and document, paying attention to
5083 size of types and signed/unsigned issues.
5084 (get_opcode): Shift before masking.
5085 (FDLW): Rename to FLDW.
5086 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
5087 (hppa_rebuild_insn): Change args and return value to unsigned
5088 int. Make use of re_assemble_*. Correct case 11.
5090 * dep-in.sed: Handle ../opcodes/.
5091 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
5092 elf64-hppa.h, hppa_stubs.h, xcoff.h.
5093 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
5094 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
5095 elfarm-nabi.lo dependencies outside of auto-dependency area.
5096 Regenerate dependencies.
5097 * Makefile.in: Regenerate.
5099 * configure.in (TRAD_HEADER): Test non-null before
5101 * configure: Regenerate.
5103 * reloc.c: Fix mis-spelling in comment.
5107 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
5108 * vms.c (vms_openr_next_archived_file): Return NULL.
5112 * coffcode.h Copy changes mistakenly done to libcoff.h in
5117 * libbfd-in.h: Correctly check GCC version.
5118 * bfd-in.h: Likewise.
5119 * libhppa.h: Likewise.
5120 * libbfd.h: Regenerate.
5121 * bfd-in2.h: Regenerate.
5125 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
5126 coffdu-rs6000.{lo,c}.
5127 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
5129 * Makefile.in: Regenerate.
5130 * xcoff.h: New file.
5131 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
5132 * coff-rs6000.c: Move all declarations and defines that are
5133 common to the xcoff backends into xcoff.h
5134 * coff64-rs6000.c: Ditto,
5138 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
5139 _bfd_coff_force_symnames in strings and
5140 _bfd_coff_debug_string_prefix_length to their default values.
5141 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
5145 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
5146 _bfd_coff_force_symnames in strings and
5147 _bfd_coff_debug_string_prefix_length to their default values.
5151 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
5152 Check local_got_refcounts before dereferencing.
5154 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
5155 before deciding we don't need R_PPC_PLT32 relocation.
5156 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
5159 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
5161 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
5163 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
5164 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
5165 (elf_i386_relocate_section): Allow for .plt to go missing.
5166 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
5167 can use a relative reloc for got as elf_i386_relocate_section.
5168 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
5172 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
5176 * Makefile.am (coff64-rs6000.lo): New rule.
5177 * Makefile.in: Regenerate.
5178 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
5179 xcoff_is_local_label_name, xcoff_rtype2howto,
5180 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
5181 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
5182 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
5183 (NO_COFF_SYMBOLS): Define.
5184 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
5185 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
5187 (MINUS_ONE): New macro.
5188 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
5190 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
5191 coff_SWAP_aux_out): Map to the new functions.
5192 * coff64-rs6000.c: New file.
5193 * libcoff.h (bfd_coff_backend_data): Add new fields
5194 _bfd_coff_force_symnames_in_strings and
5195 _bfd_coff_debug_string_prefix_length.
5196 (bfd_coff_force_symnames_in_strings,
5197 bfd_coff_debug_string_prefix_length): New macros for above fields.
5198 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
5199 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
5200 of using coff_swap_sym_in directly.
5201 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
5202 (coff_set_flags) Set magic for XCOFF64.
5203 (coff_compute_section_file_positions): Add symbol name length to
5204 string section length if bfd_coff_debug_string_prefix_length is
5206 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
5207 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
5208 using coff_swap_lineno_in directly.
5209 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
5210 and _bfd_coff_debug_string_prefix_length fields.
5211 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
5212 symbol names into strings table when
5213 bfd_coff_force_symnames_in_strings is true.
5214 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
5215 SET_RELOC_VADDR): New macros.
5216 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
5217 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
5219 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
5220 changes within RS6000COFF_C specific code.
5221 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
5222 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
5223 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
5224 Extend existing hack on target name.
5225 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
5227 * coff-tic54x.c (ticof): Keep up to date with new fields
5228 in bfd_coff_backend_data.
5229 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
5230 targ_selvecs to include rs6000coff64_vec for rs6000.
5231 * configure.in: Add rs6000coff64_vec case.
5232 * cpu-powerpc.c: New bfd_arch_info_type.
5236 * config.bfd: Only disable elf32-hppa vectors, not all of the
5237 BSD and OSF configuration support. Provide (disabled) clauses
5239 * configure.in: Add clause for PA64 support.
5240 * configure: Rebuilt.
5242 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
5243 (bfd_elf64_hppa_vec): Declare.
5245 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
5246 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
5247 (elf64-hppa.lo): Add dependencies.
5248 * Makefile.in: Rebuilt.
5250 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
5254 * libhppa.h (dis_assemble_16): New function.
5255 (pa_arch): Added pa20w element.
5259 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
5260 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
5261 bfd_elf64_slurp_reloc_table.
5263 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
5264 definitions to get external names.
5265 (elf_write_relocs): Renamed from write_relocs and make global.
5266 (elf_slurp_reloc_table): Make global.
5267 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
5269 * archive.c (hpux_uid_gid_encode): New function.
5270 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
5271 defined and the ID is greater than 99999.
5272 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
5273 special uid/gid fields into 32 bit values.
5277 * config.bfd: Add NetBSD/sparc64 support.
5284 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
5285 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
5286 (BFD64_BACKENDS): Add elf64-ia64.lo.
5287 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
5288 (cpu-ia64.lo, elf64-ia64.lo): New rules.
5289 * Makefile.in: Rebuild.
5290 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
5291 (bfd_ia64_arch): Declare.
5292 (bfd_archures_list): Add bfd_ia64_arch.
5293 * bfd-in2.h: Rebuild.
5294 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
5295 * configure: Rebuild.
5296 * configure.host: (ia64-*-linux*): New host.
5297 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
5298 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
5299 * elf.c (prep_headers): Add bfd_arch_ia64.
5300 * libbfd.h: Rebuild.
5301 * reloc.c: Add IA-64 relocations.
5302 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
5304 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
5305 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
5309 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
5310 contents when performing a partial link.
5311 (bfd_elf_d30v_reloc_21): Likewise.
5315 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
5316 patch to symbols defined by a shared object.
5317 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
5322 * dwarf2.c (concat_filename): Avoid string literal concatenation.
5323 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
5327 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
5328 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
5329 (coff-ia64.lo): Add dependency.
5330 * Makefile.in: Regenerate.
5331 * coff-ia64.c: New file.
5332 * efi-app-ia32.c: Ditto.
5333 * efi-app-ia64.c: Ditto.
5334 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
5335 (coff_set_flags): Ditto.
5336 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
5337 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
5338 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
5339 * configure: Regenerate.
5340 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
5341 (PUT_OPTHDR_IMAGE_BASE): Ditto.
5342 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5343 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5344 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5345 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5346 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5347 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5348 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5349 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5350 (GET_PDATA_ENTRY): Ditto.
5351 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
5352 data_start. Use above macros to read fields that are 64 bit wide for
5353 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
5354 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
5355 FileAlignment and SectionAlignment to minimum alignment if they
5357 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
5358 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
5359 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
5360 Use above macros to write fields that are 64 bit wide for
5362 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
5363 5*4 otherwise. This should be right for IA-32 and IA-64, but may
5364 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
5365 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
5366 begin address, end address, and unwind info address only. Use
5367 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
5369 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
5370 HIGH3ADJ relocation names.
5371 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
5372 * targets.c: Declare bfd_efi_app_ia32_vec and
5373 bfd_efi_app_ia64_vec.
5374 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
5375 bfd_efi_app_ia64_vec.
5379 * bfd-in2.h: Add prototypes for tic54x load page access.
5380 * bfd-in.h: Regenerate.
5381 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
5382 in customized _set_arch_mach function.
5383 * coffcode.h (coff_set_alignment_hook): Set section load page if
5384 the appropriate macro is defined.
5385 (write_object_contents): Read section load page.
5389 * elf32-hppa.h: Update copyright date.
5391 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
5392 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
5394 * elf32-d30v.c (MAX32): Don't use LL suffix.
5395 (MIN32): Define in terms of MAX32.
5396 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
5398 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
5401 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
5405 * dep-in.sed: Match space before file name, not after.
5406 * Makefile.am: Regenerate dependencies.
5407 * Makefile.in: Regenerate.
5409 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
5410 case, allow address wrap-around stupidly removed 2000-03-17. Sign
5411 extend without an if statement.
5415 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5417 * elf32-mips.c (gprel16_with_gp): Likewise.
5418 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5419 here using -0x40000, not (int)0xfffc0000.
5420 (elf32_hppa_size_of_stub): Likewise.
5424 * coff-tic54x.c: Now builds with all targets.
5425 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5426 * Makefile.in: Regenerate.
5427 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5428 unitialized variable.
5432 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
5433 --enable-build-warnings option.
5434 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5435 * Makefile.in, configure: Re-generate.
5439 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5440 BFD_RELOC_THUMB_PCREL_BLX.
5442 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5443 R_ARM_XPC25 and R_ARM_THM_PC22.
5445 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5446 R_ARM_XPC25 and R_ARM_THM_XPC22.
5447 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5448 R_ARM_[XPC25|THM_XPC22].
5450 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5451 elf/arm-oabi.h to elf/arm.h
5453 * Makefile.am: Fix dependency for elfarm-oabi.c
5454 * Makefile.in: Regenerate.
5456 * bfd-in2.h: Regenerate.
5457 * libbfd.h: Regenerate.
5461 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5462 and restore it on failure. Release newly allocated tdata on
5467 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5468 (decode_line_info): Set it. Report error if unit->line_offset is
5469 equal to or larger than it.
5473 * targets.c: Added vecs for tic54x.
5474 * reloc.c: Added relocs for tic54x.
5475 * libbfd.h: Regenerated.
5476 * configure: Add TI COFF vecs for tic54x.
5477 * configure.in: Ditto.
5478 * config.bfd (targ_cpu): Recognize new tic54x target.
5479 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5480 * bfd-in2.h: Add tic54x target and relocations.
5481 * Makefile.am, Makefile.in: Add tic54x target.
5482 * archures.c (bfd_archures_list): Add tic54x target.
5483 * coff-tic54x.c: New.
5484 * cpu-tic54x.c: New.
5488 * elfcore.h (elf_core_file_p): call backend_object_p which
5489 thereby gets an opportunity to update the arch/machine type.
5493 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5494 class. Handle SEC_CLINK and SEC_BLOCK flags.
5495 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5496 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5500 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5501 EF_INTERWORK if this is an unknown EABI.
5502 (elf32_arm_merge_private_bfd_data): Check EABI version
5503 numbers. Only check EF_xxx flags if the EABI version number
5505 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5506 if the EABI version number is unknown.
5507 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5508 if the EABI version number is unknown.
5512 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5513 BFD_RELOC_SH_LOOP_END.
5514 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5515 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5516 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5517 (sh_elf_reloc_loop): New function.
5518 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5520 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5521 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5522 * bfd-in2.h, libbfd.h: Regenerate.
5526 * po/bfd.pot: Regenerate.
5528 * Makefile.am: Remove extraneous mkdep comment.
5529 (MKDEP): Use gcc -MM rather than mkdep.
5530 (DEP): Quote when passing vars to sub-make. Add warning
5532 (DEP1): Rewrite for "gcc -MM".
5533 (CLEANFILES): Add DEP2.
5534 Update dependencies.
5535 * Makefile.in: Regenerate.
5539 * configure.in: Added corefile support for AIX 4.3. In particular,
5540 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5541 compiling rs6000-core.c.
5542 * configure: Regenerated.
5546 * cache.c (bfd_open_file): Unlink the output file only if
5547 it has non-zero size.
5551 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5552 relative relocations for non-loaded sections in shared objects.
5553 (elf64_alpha_check_relocs): Similarly.
5557 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5558 BFD_RELOC_16 to switch for extended relocs.
5559 (MY_swap_ext_reloc_in): New.
5560 (MY_swap_ext_reloc_out): New.
5561 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5562 than NAME(aout,swap_ext_reloc_in) for extended relocs.
5563 (NAME(aout,squirt_out_relocs)): Similarly use
5564 MY_swap_ext_reloc_out.
5565 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5569 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5570 the R_PCRWORD_B case.
5574 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5580 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
5581 HOWTO references to bfd_elf_generic_reloc, that have
5582 partial_inplace == true, now use the new function. The function
5583 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5584 extends its fixes to the R_M32R_{16,24,32} relocs.
5585 The new logic in m32r_elf_lo16_reloc() has been removed, and
5586 it instead calls the new routine to obtain that functionality.
5590 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5591 elf32_avr_check_relocs, avr_final_link_relocate,
5592 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5593 elf32_avr_object_p): Add prototypes.
5594 (elf32_avr_gc_mark_hook): Add default for h->root.type.
5595 (bfd_elf_avr_final_write_processing): Make static.
5599 * cpu-avr.c: New file. BFD support routines for AVR architecture.
5600 * archures.c (bfd_architecture): Add AVR architecture.
5601 (bfd_archures_list): Add reference to AVR architecture info.
5602 * elf.c (prep_headers): Handle bfd_arch_avr.
5603 * reloc.c: Add various AVR relocation enums.
5604 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5606 * Makefile.am: Add support for AVR elf.
5607 * configure.in: Likewise.
5608 * config.bfd: Likewise.
5609 * Makefile.in: Regenerate.
5610 * configure: This too.
5611 * bfd-in2.h: And this.
5612 * libbfd.h: And this.
5616 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5617 (elf64_alpha_find_reloc_at_ofs): Likewise.
5621 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5622 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
5623 allowable range used to be -2**(n-1) to 2**n-1.
5624 * reloc.c (_bfd_relocate_contents): Same here. Also replace
5625 "boolean overflow" with "bfd_reloc_status_type flag".
5629 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5633 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5634 of shrinks properly, including the last reloc.
5638 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5643 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5644 a format mismatch rather than an "error" from bfd_read such as
5645 bfd_error_file_truncated.
5649 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5650 sign-extension and big-endian compensation for
5651 R_MIPS_64 even in ld -r.
5655 * elf32-mips.c (mips_elf_next_relocation): Rename from
5656 mips_elf_next_lo16_relocation, and generalize to look
5657 for any relocation type.
5658 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5659 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5660 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5661 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5662 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5663 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5664 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5665 (mips_rtype_to_howto): Likewise.
5666 (mips_elf_calculate_relocation): Handle new relocs.
5667 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5668 are paired. The addend for R_MIPS_GNU_REL16_S2
5669 is shifted right two bits.
5673 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5674 comment, and ensure it doesn't happen again.
5675 (bfd_install_relocation): Same here.
5676 (_bfd_relocate_contents): Don't bother assigning unused signmask
5677 shift result. Fix typos in comments.
5678 Remove trailing whitespace throughout file.
5682 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5683 * bfd-in2.h: Rebuild.
5687 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5689 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5690 (SIZEOF_ILF_STRINGS): Redefine.
5691 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
5692 relative reloc, as opposed to a section relative reloc.
5693 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5695 Add length of symbol's prefix to string pointer.
5696 Store a pointer to the symbol in the symbol pointer table.
5697 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5698 Initialise the symbol pointer table.
5699 Store the hint in the Hint/Name table.
5700 Make the jump reloc be symbol realtive, not section relative.
5701 Create an import symbol for imported code.
5705 * elf.c (swap_out_syms): Check for null type_ptr.
5709 * aout-target.h (MY(write_object_contents)): Remove unused
5710 and unusable "#if CHOOSE_RELOC_SIZE".
5711 * pc532-mach.c (MY(write_object_contents)): Ditto.
5712 * netbsd.h (MY(write_object_contents)): Ditto.
5713 * hp300hpux.c (MY(write_object_contents)): Ditto.
5714 * freebsd.h (MY(write_object_contents)): Ditto.
5715 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5719 * peicode.h (jtab): Make it static.
5721 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5722 defined and COFF_IMAGE_WITH_PE is not defined.
5723 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5724 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5728 * coff-arm.c (bfd_arm_process_before_allocation): Make
5729 'symndx' signed to prevent compile time warning.
5731 * coff-mcore.c: Remove unused prototype for pe_object_p.
5733 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5734 functions that are not used when COFF_IMAGE_WITH_PE is
5736 (struct sh_opcode): Change type of 'flags' field to unsigned
5737 long so that it can hold the USESAS flag.
5739 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5741 * elf-m10300.c (mn10300_elf_relax_section): Initialise
5744 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5746 Remove unusued variables and code.
5747 (elf_backend_add_symbol_hook): Fix prototype.
5749 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5752 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5755 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5757 Remove unusued variables and code.
5758 (elf_backend_add_symbol_hook): Fix prototype.
5760 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5762 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5763 to unused function parameter.
5765 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5767 Use EMPTY_HOWTO to initialise empty howto slots.
5768 Remove unused variables.
5770 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5774 * aoutx.h (aout_link_input_section_std): Pass "true" to
5775 the undefined_symbol callback.
5776 (aout_link_input_section_ext): Likewise.
5777 * bout.c (get_value): Likewise.
5778 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5779 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5781 (alpha_relocate_section): Likewise.
5782 * coff-arm.c (coff_arm_relocate_section): Likewise.
5783 * coff-i960.c (coff_i960_relocate_section): Likewise.
5784 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5785 * coff-mips.c (mips_relocate_section): Likewise.
5786 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5787 * coff-sh.c (sh_relocate_section): Likewise.
5788 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5789 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5790 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5791 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5792 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5793 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5794 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5795 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5796 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5797 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5798 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5799 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5800 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5801 * elflink.h (elf_link_output_extsym): Likewise.
5802 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5803 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5804 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5806 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5807 undefined_symbol callback when building shared library with
5808 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5810 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5811 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5812 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5813 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5814 (elf32_mips_get_relocated_section_content): Likewise.
5815 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5816 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5817 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5818 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5822 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5823 * Makefile.in: Regenerate.
5825 * configure.in: Add support for mips and sh pe vectors.
5826 * configure: regenerate.
5828 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5831 * targets.c: Add mips and sh pe vectors.
5833 * libpei.h (coff_final_link_postscript): Only define if not
5836 * coffcode.h: Add support for WinCE magic numbers.
5838 * peigen.c (pe_print_reloc): Update comment and rearrange
5839 appending of newline character.
5841 * peicode.h: Add support for Image Library Format.
5842 (pe_ILF_vars): Structure containing data used by ILF code.
5843 (pe_ILF_make_a_section): New function. Create a section based
5845 (pe_ILF_make_a_reloc): New function. Create a reloc based on
5847 (pe_ILF_make_a_symbol): New function. Create a symbol based
5849 (pe_ILF_save_relocs): New function. Store the relocs created
5850 by pe_ILF_make_a_reloc in a section.
5851 (pe_ILF_build_a_bfd): New function. Create a BFD describing
5853 (pe_ILF_object_p): New function. Return a bfd_target pointer
5855 (pe_bfd_object_p): If an ILF object is detected call
5856 pe_ILF_object_p on it.
5858 * coff-arm.c: Add support for WinCE relocs which are different
5859 from normal ARM COFF relocs.
5860 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5862 * coff-sh.c: Add support for sh-pe target.
5863 * pe-sh.c: New file. Support code for sh-pe target.
5864 * pei-sh.c: New file. Support code for sh-pe target.
5866 * pe-mips.c: New file. Support code for mips-pe target.
5867 * pei-mips.c: New file. Support code for mips-pe target.
5871 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
5872 architecture if the object causing the bump is dynamic.
5873 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
5874 and also don't it for memory ordering.
5875 (sparc64_elf_write_relocs): Take src_rela out of the loop.
5879 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
5880 calling bfd_get_section_size_before_reloc.
5881 (decode_line_info): Likewise.
5882 (_bfd_dwarf2_find_nearest_line): Likewise.
5886 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
5887 name of the libtool directory.
5888 * Makefile.in: Rebuild.
5892 * som.c (SOM_HOWTO): Define.
5893 (som_hppa_howto_table): Use it.
5897 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
5899 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
5903 * som.c (som_misc_symbol_info): Add field
5905 (som_bfd_derive_misc_symbol_info): Initialize
5907 (som_build_and_write_symbol_table): Keep track
5908 of secondary_def field.
5909 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5910 if secondary_def field is set.
5911 (som_bfd_ar_write_symbol_stuff): Initialize
5916 * dwarf2.c (read_address): Read 16-bits addresses.
5917 (parse_comp_unit): Accept addr_size == 2.
5921 * bfd-in.h: Update copyright date.
5925 * cpu-i370.c: New file.
5926 * elf32-i370.c: New file.
5927 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5928 (bfd_i370_arch): New.
5929 (bfd_archures_list): Add bfd_i370_arch.
5930 * elf.c (prep_headers): Add bfd_arch_i370.
5931 * Makefile.am: Add support for IBM 370 elf.
5932 * config.bfd: Likewise.
5933 * configure.in: Likewise.
5934 * libbfd.h (bfd_reloc_code_real_names): Likewise.
5935 * reloc.c (bfd_reloc_code_type): Likewise.
5936 * targets.c: Likewise.
5938 * Makefile.in: Regenerate.
5939 * configure: Regenerate.
5940 * bfd-in2.h: Regenerate.
5944 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5945 invalid relocation types, and change them to R_386_NONE.
5949 * elflink.h (elf_link_add_object_symbols): If a version symbol is
5950 not defined, don't add a second ELF_VER_CHR.
5952 * elflink.h (elf_bfd_final_link): Call output_extsym for global
5953 symbols converted to local symbols even when stripping all
5955 (elf_link_output_extsym): Process global symbols converted to
5956 local symbols even if they are being stripped.
5960 * archures.c (bfd_octets_per_byte): Return unsigned int.
5961 (bfd_arch_mach_octets_per_byte): Ditto.
5962 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5964 * section.c (bfd_get_section_size_before_reloc): Quell signed
5965 vs. unsigned comparison warning.
5966 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
5967 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5968 change. What was I thinking?
5969 * bfd-in2.h: Regenerate.
5971 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5972 (elf_gc_sections): Same here.
5973 (elf_gc_common_finalize_got_offsets): And here.
5977 ELF HPPA doesn't work at present; remove it until it does.
5978 * config.bfd: Comment out setting targ_defvec to
5980 * Makefile.am: Rebuild dependencies.
5981 (BFD32_BACKENDS): Remove elf32-hppa.lo.
5982 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5983 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5984 * Makefile.in: Rebuild.
5985 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5989 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5990 is no bfd_free(). Revert bfd_free part of previous change.
5994 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5996 (coff_compute_section_file_positions): Use bfd_free to pair
5998 (coff_write_object_contents): Likewise.
6000 * coff-rs6000.c (xcoff_howto_table_16): New variable.
6001 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
6005 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
6006 (xcoff_ar_file_hdr_big): New structure.
6007 (SIZEOF_AR_FILE_HDR_BIG): New macro.
6008 (xcoff_ar_hdr_big): New structure.
6009 (SIZEOF_AR_HDR_BIG): New macro.
6010 (xcoff_big_format_p): New macro.
6011 (xcoff_ardata_big): New macro.
6012 (arch_xhdr_big): New macro.
6013 (xcoff_slurp_armap): Handle large archives.
6014 (xcoff_archive_p): Detect large archives.
6015 (xcoff_read_ar_hdr): Handle large archives.
6016 (xcoff_openr_next_archived_file): Handle large archives.
6017 (xcoff_generic_stat_arch_elt): Handle large archives.
6018 (xcoff_write_armap_old): Rename from xcoff_write_armap.
6019 (xcoff_write_armap_big): New function.
6020 (xcoff_write_armap): New function, dispatch to _old or _big.
6021 (xcoff_write_archive_contents_old): Rename from
6022 xcoff_write_archive_contents.
6023 (xcoff_write_archive_contents_big): New function.
6024 (xcoff_write_archive_contents): New function, dispatch to _old or
6029 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
6030 and hide_symbol members.
6031 (elf_link_hash_copy_indirect): Remove.
6032 (elf_link_hash_hide_symbol): Remove.
6033 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
6034 and elf_backend_hide_symbol.
6035 (_bfd_elf_link_hash_copy_indirect): Declare.
6036 (_bfd_elf_link_hash_hide_symbol): Declare.
6037 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
6038 (_bfd_elf_link_hash_hide_symbol): Likewise.
6039 (_bfd_elf_link_hash_table_init): Don't init killed members.
6040 * elflink.h (elf_link_add_object_symbols): Use the bed function
6041 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
6042 (elf_link_assign_sym_version): Likewise.
6043 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
6044 (elf_backend_hide_symbol): Likewise.
6045 (elfNN_bed): Update for new members.
6049 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
6050 STACK_END_ADDR): Define for new core file format.
6051 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
6052 for handling the vagaries of the various core file structures used
6053 by AIX over the years.
6054 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
6055 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
6056 core_dumpx structure.
6060 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
6061 (bfd_mach_sh3_dsp): Likewise.
6062 (bfd_mach_sh4): Reinstate.
6063 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
6064 * bfd-in2.h: Regenerate.
6065 * coff-sh.c (struct sh_opcode): flags is no longer short.
6066 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
6067 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
6068 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
6069 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
6070 (sh_opcodes): No longer const.
6071 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
6072 (sh_insn_uses_reg): Check for USESAS and USESR8.
6073 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
6074 (_bfd_sh_align_load_span): Return early for SH4.
6075 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
6076 Take into account that field b of a parallel processing insn
6077 could be mistaken for a separate insn.
6078 * cpu-sh.c (arch_info_struct): New array elements for
6079 sh2, sh-dsp and sh3-dsp.
6080 Reinstate element for sh4.
6081 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
6082 (SH4_NEXT): Reinstate.
6083 (SH3_NEXT, SH3E_NEXT): Adjust.
6084 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
6085 * elf32-sh.c (sh_elf_set_private_flags): New function.
6086 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
6087 (sh_elf_merge_private_data): New function.
6088 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
6089 (bfd_elf32_bfd_copy_private_bfd_data): Define.
6090 (bfd_elf32_bfd_merge_private_bfd_data): Change to
6091 sh_elf_merge_private_data.
6095 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
6096 hide_symbol members.
6097 (elf_link_hash_copy_indirect): New.
6098 (elf_link_hash_hide_symbol): New.
6099 * elflink.h (elf_link_add_object_symbols): Break out copy from
6100 indirect new new symbol to elf.c.
6101 (elf_link_assign_sym_version): Break out privatization of
6102 non-exported symbol to elf.c.
6103 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
6104 (_bfd_elf_link_hash_hide_symbol): New.
6105 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
6109 * section.c (_bfd_strip_section_from_output): Add info parameter.
6110 If it passed as non-NULL, use it to check whether any input BFD
6111 has an input section which uses this output section. Change all
6113 * bfd-in2.h: Rebuild.
6115 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
6116 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
6118 * bfd-in2.h: Rebuild.
6122 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
6123 allow final modifications of swapped-in symbol.
6124 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
6125 * coffcode.h (coff_write_relocs): Use macro
6126 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
6127 symbol index should be set to -1.
6131 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
6132 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
6133 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
6134 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
6135 sh_insns_uses_or_sets_freg): New functions.
6136 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
6137 * (sh_insns_conflict): Use new functions and new macros to
6138 detect conflicts when two instructions both set same integer registers,
6139 both set same fp register, and both set special register.
6143 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
6144 swapping in sections, so that the swapping routines have access to
6149 * coff-go32.c: Update comment. Update copyright.
6153 * syms.c (bfd_decode_symclass)
6154 Two new class characters were added - 'V' and 'v'. The
6155 meaning of 'W' is now restricted to just weak non-object
6156 symbols. This allows differentiation between, for example,
6157 weak functions vs weak objects. nm for example now dumps:
6159 'w' = weak unresolved
6160 'V' = weak global object
6161 'v' = weak unresolved object
6163 (bfd_is_undefined_symclass): New function. Return true if the
6164 given symbol class represents and undefined/unresolved symbol.
6166 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
6169 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
6171 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
6172 STT_ARM_16BIT flag set, but it is not attached to a data object
6173 return STT_ARM_16BIT so that it will be treated as code by the
6178 * coff-i386.c (i3coff_object_p): Remove prototype.
6181 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
6182 to name. Update copyright.
6184 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
6185 assignment to avoid warning. Update copyright.
6189 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
6190 instead of using GNU C extension.
6194 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
6195 amount from a bfd_in_memory structure.
6196 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
6201 * linker.c (default_indirect_link_order): oops - fix incorrectly
6202 applied patch from Tim Wall.
6206 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
6207 = scnhsz, filhsz, relsz, aoutsz, etc)
6209 * coffswap.h: Ditto.
6213 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
6214 interwork thumb to arm stub.
6218 * archures.c (bfd_octets_per_byte): New function: Return
6220 (bfd_arch_mach_octets_per_byte): New function: Return target
6223 * section.c: Distinguish between octets and bytes for usage of
6224 _cooked_size, _raw_size, and output_offset. Clarify
6225 description of bfd_set_section_contents.
6227 * bfd-in2.h: Regenerate.
6229 * coffgen.c: Indicate that the offset parameter is in bytes, not
6232 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
6233 where appropriate to get the octet offset when calling
6234 bfd_set_section_contents.
6235 (bfd_coff_reloc_link_order): Ditto.
6237 * linker.c (bfd_generic_reloc_link_order): Ditto.
6238 (_bfd_default_link_order): Ditto.
6240 * reloc.c (bfd_perform_relocation): Distinguish between octets
6241 and bytes. Use octets when indexing into octet data; use bytes
6242 when calculating target addresses.
6243 (bfd_install_relocation): Ditto.
6245 * srec.c (srec_write_section): Ditto.
6249 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
6250 3 to 2. This allows 4 byte sized sections, which is necessary for
6251 dlltool to build functioning DLLs.
6255 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
6256 (arm*-*-conix*): New target.
6260 * config.bfd: Include elf32_i386 vector to target list for cygwin
6263 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
6264 * configure.in: Test for structure win32_pstatus_t in
6266 * configure: Regenerate.
6268 * elf.c (elfcore_grok_win32pstatus): New function: process
6269 win32_pstatus_t notes in elf core file.
6270 (elfcore_grok_note): Detect win32_pstatus notes.
6274 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
6276 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
6277 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
6279 For older changes see ChangeLog-9899
6285 version-control: never