3 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
4 (bfd_errmsgs): Add corresponding message.
5 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
6 finding an archive that contains different format object files.
7 Return bfd_error_wrong_object_format for this case.
8 * format.c: Formatting fixes. s/CONST/const/.
9 (bfd_check_format_matches): Accept archives that give
10 bfd_error_wrong_object_format if no full match is found. Tidy
11 code handling matching_vector. Don't return a pointer to freed
12 memory in `matching'. Handle ambiguous matches as for partial
14 * bfd-in2.h: Regenerate.
18 * libieee.h (common_header_type): Add last_byte field.
20 * ieee.c: Add missing prototypes. Some format fixes.
21 (struct output_buffer_struct): Move for availability to prototypes.
22 (ieee_part_after): New function.
23 (ieee_slurp_debug): Use it here.
24 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
25 ieee_part_after to set last_byte to one past end of current part.
27 (ieee_pos): Pass in ieee_data_struct rather than bfd.
29 (parse_expression): Don't go beyond the end of the current part.
30 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
31 (ieee_get_symtab_upper_bound, ieee_get_symtab,
32 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
33 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
34 ieee_set_section_contents, ieee_write_object_contents,
35 ieee_make_empty_symbol): Make static.
36 (ieee_archive_p): Correct comments regarding bfd_read.
37 (ieee_object_p): Similarly.
38 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
39 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
40 input_bfd, output_bfd, output_buffer.
41 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
42 do_with_relocs, ie. as a symbol for relocatable files.
43 (ieee_vec): Add comments showing functions referenced by macros.
47 * aout-tic30.c: Add missing prototypes. Fix formatting.
48 * aout-ns32k.c: Add missing prototypes. Fix formatting.
49 * peXXigen.c: Add missining prototypes. Fix formatting.
50 * aout-adobe.c: Add missining prototypes. Fix formatting.
54 * elf32-v850.c: Add missing function prototypes.
57 * cpu-v850.c: Add missing function prototype.
62 * elf-bfd.h (struct elf_backend_data): Add new fields
63 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
64 (bfd_elf_sprintf_vma): Rename function prototype to
65 '_bfd_elf_sprintf_vma'.
66 (bfd_elf_fprintf_vma): Rename function prototype to
67 '_bfd_elf_fprintf_vma'.
68 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
69 directly, instead indirect via the elf_backend_data structure.
70 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
71 instead indirect via the elf_backend_data structure.
72 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
73 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
74 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
76 (elf_backend_fprintf_vma): Initialise if not already defined.
77 (struct elf_backend_data): Initialise the
78 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
82 * elf64-sparc.c: Add missing prototypes.
83 * elf32-cris.c: Likewise.
84 * elf32-i370.c: Likewise.
85 * elf64-hppa.c: Likewise.
86 * elf64-s390.c: Likewise.
90 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
91 Add prototypes where needed.
95 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
96 (bfd_fprintf_vma): Likewise.
100 * bfd.c (bfd_sprintf_vma): Don't return void.
101 (bfd_fprintf_vma): Likewise.
105 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
107 * configure: Regenerate.
111 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
112 warning if not BFD64. Add braces so emacs auto format works.
113 (bfd_elf_fprintf_vma): Likewise.
115 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
117 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
118 param to agree with libxcoff.h.
119 (xcoff_swap_ldhdr_out): Likewise.
120 (xcoff_swap_ldsym_in): Likewise.
121 (xcoff_swap_ldsym_out): Likewise.
122 (xcoff_swap_ldrel_in): Likewise.
123 (xcoff_swap_ldrel_out): Likewise.
124 (xcoff_create_csect_from_smclas): Likewise.
125 * coff64-rs6000.c: Add missing prototypes.
126 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
128 (xcoff64_swap_ldhdr_out): Likewise.
129 (xcoff64_swap_ldsym_in): Likewise.
130 (xcoff64_swap_ldsym_out): Likewise.
131 (xcoff64_swap_ldrel_in): Likewise.
132 (xcoff64_swap_ldrel_out): Likewise.
133 (xcoff64_ppc_relocate_section): Make static.
134 (xcoff64_slurp_armap): Likewise.
135 (xcoff64_archive_p): Likewise.
136 (xcoff64_openr_next_archived_file): Likewise.
137 (xcoff64_sizeof_headers): Likewise.
138 (xcoff64_is_lineno_count_overflow): Likewise.
139 (xcoff64_is_reloc_count_overflow): Likewise.
140 (xcoff64_loader_symbol_offset): Likewise.
141 (xcoff64_loader_reloc_offset): Likewise.
142 * elf64-gen.c: Add missing prototypes.
146 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
147 (bfd_elf_fprintf_vma): Likewise.
151 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
154 * bfd-in2.h: Regenerated.
158 * bfd-in.h (bfd_sprintf_vma): New prototype.
159 (bfd_fprintf_vma): Likewise.
160 (bfd_elf_sprintf_vma): Likewise.
161 (bfd_elf_fprintf_vma): Likewise.
162 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
163 * bfd-in2.h: Regenerated.
165 * bfd.c (bfd_sprintf_vma): New. Defined.
166 (bfd_fprintf_vma): Likewise.
168 * elf.c (bfd_elf_sprintf_vma): New. Defined.
169 (bfd_elf_fprintf_vma): Likewise.
173 * coff-rs6000.c: Add missing prototypes.
174 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
175 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
176 xcoff_loader_reloc_offset): Make static.
177 * dwarf1.c: Add missing prototypes.
178 * dwarf2.c: Add missing prototypes.
179 (struct abbrev_info): Move definition.
180 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
181 * elf.c: Add missing prototypes.
182 * elf32-gen.c: Likewise.
183 * elf32-i386.c: Likewise.
184 * elf32-ppc.c: Likewise.
185 (ppc_elf_sort_rela): Use PTR instead of "void *".
186 * elflink.h: Add missing prototypes. Formatting fixes.
187 * merge.c: Add missing prototypes.
188 (last4_eq): Use PTR instead of "void *".
190 * syms.c: Add missing prototypes.
194 * bfd.c: Fix formatting.
195 * bfd-in2.h: Regenerate.
199 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
200 true (this target uses REL relocations) and 'pcrel_offset' to
201 false (the PC is implied, not stored in the offset).
206 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
207 * elfxx-target.h (elf_backend_want_got_sym): Define.
208 (elfNN_bed): Add elf_backend_want_got_sym.
209 * elflink.c (_bfd_elf_create_got_section): Define
210 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
214 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
215 (find_rela_addend): New function.
216 (parse_comp_unit): Call it to find the abbrev offset addend.
217 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
218 members of dwarf2_debug as debugging information is read.
222 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
223 targets as well as sh-pe.
227 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
228 reloc from start of section when computing value for R_ARM_REL32
234 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
235 keep relocs for undefined syms if there are no dynamic sections in
237 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
241 * cofflink.c (coff_link_check_ar_symbols): also search for
242 __imp__symbol as well as _symbol.
243 * linker.c (_bfd_generic_link_add_archive_symbols): also
244 search for __imp__symbol as well as _symbol.
248 * elf.c (elf_sort_sections): Return zero only as the last step.
252 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
254 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
255 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
260 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
261 to match corresponding bfd_coff_backend data member.
265 * Makefile.am: Update dependencies with "make dep-am".
266 * Makefile.in: Regenerate
270 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
271 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
272 * Makefile.in: Regenerate.
276 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
277 flags when creating the reloc section if the ALLOC flag in the
278 source section is set.
282 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
283 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
284 * bfd-in2.h: Regenerate.
285 * libbfd.h: Regenerate.
286 * elfxx-ia64.c (ia64_howto_table): Define how to handle
288 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
289 (elfNN_ia64_check_relocs): Likewise.
290 (elfNN_ia64_install_value): Likewise.
291 (elfNN_ia64_relocate_section): Likewise.
295 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
297 (elf32_sparc_check_relocs): Likewise.
298 Only create .rela section for alloced sections in shared libraries.
299 (elf32_sparc_relocate_section): Likewise.
300 Remove redundant check.
301 Optimize unaligned reloc usage.
302 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
307 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
308 ALLOC|LOAD flags as the source section for debugging sections
309 when creating the reloc section.
313 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
314 the section of the bigger symbol.
316 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
320 * peicode.h (coff_swap_scnhdr_in): For sections containing
321 uninitialised data, only set their size to s_paddr if this does
322 not reset their size to zero. MS's latest compilers will set
327 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
328 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
333 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
335 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
336 sections being discarded.
340 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
341 instead of _bfd_elfcore_section_from_phdr.
342 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
343 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
344 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
345 (elfcore_grok_prstatus): Likewise.
346 (elfcore_grok_lwpstatus): Likewise.
347 (bfd_get_elf_phdr_upper_bound): Likewise.
348 (elfcore_make_note_pseudosection): Formatting.
349 (_bfd_elfcore_strndup): Formatting.
350 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
351 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
355 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
356 and _bfd_elfcore_strndup.
357 (struct elf_backend_data): Add elf_backend_grok_prstatus
358 and elf_backend_grok_psinfo.
359 * elf.c (_bfd_elfcore_make_pseudosection): New function.
360 (elfcore_grok_prstatus): Use it.
361 (elfcore_make_note_pseudosection): Likewise.
362 (elfcore_strndup): Rename to...
363 (_bfd_elfcore_strndup): Here, and make global.
364 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
365 (elfcore_grok_note): Call elf_backend_grok_prstatus
366 and elf_backend_grok_psinfo if available.
367 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
368 (_bfd_elf32_mips_grok_psinfo): New function.
369 (elf_backend_grok_prstatus): Define.
370 (elf_backend_grok_psinfo): Define.
371 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
372 (elf_backend_grok_psinfo): Likewise.
373 (elfNN_bed): Include elf_backend_grok_prstatus and
374 elf_backend_grok_psinfo.
378 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
379 hplink->sgot is NULL before filling GOT. Check if hplink->splt
380 is NULL before filling PLT.
384 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
388 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
390 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
391 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
394 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
395 (IS_ABSOLUTE_RELOC): Define.
396 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
397 (hppa_link_hash_newfunc): Always init it.
398 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
399 create COPY relocs only when the reloc is in a read-only section.
400 Instead, allocate space for a dynamic reloc to reference the
401 library symbol directly. Keep track of space we allocate using
403 (hppa_discard_copies): Delete, and move code to..
404 (allocate_plt_and_got): ..here. Rename to
405 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
406 relocs for non-shared link.
407 (elf32_hppa_size_dynamic_sections): Update calls to above.
408 (elf32_hppa_relocate_section): Write out the dynamic relocs used
409 in lieu of COPY relocs.
411 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
413 (elf_i386_adjust_dynamic_symbol): ..nor here..
414 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
416 (elf_i386_size_dynamic_sections): Fix a comment.
417 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
418 involved in writing reloc out.
422 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
423 Ensure syms are dynamic if we might be emitting a reloc.
424 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
425 for undefweak or undefined syms..
426 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
428 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
429 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
430 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
431 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
435 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
436 strncasecmp/strcasecmp instead of strncmp/strcmp.
440 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
441 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
442 in the regular object file and treat the weak definition as
447 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
448 unresolved_reloc test to exclude cases where we use "relocation"
449 before setting it to point into the .got. Reinstate fudge for
450 unresolved relocs in debugging sections.
452 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
453 complicated tests for unresolvable relocs with a simple direct
454 scheme using "unresolved_reloc" var.
456 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
457 elf_i386_dyn_relocs. Update comment.
458 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
460 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
462 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
464 (elf_i386_size_dynamic_sections): Likewise.
465 (elf_i386_finish_dynamic_symbol): Likewise.
466 (elf_i386_finish_dynamic_sections): Likewise.
467 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
470 Avoid creating COPY relocs if possible.
471 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
472 which .got created. Mark symbols used by R_386_32 and R_386_PC32
473 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
474 reloc is in a read-only section. Instead, allocate space for a
475 dynamic reloc to reference the library symbol directly. Keep
476 track of space we allocate using pcrel_relocs_copied.
477 (discard_copies): Delete, and move code to ..
478 (allocate_plt_and_got): ..here. Rename to
479 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
480 relocs for non-shared link.
481 (elf_i386_size_dynamic_sections): Update calls to above functions.
482 (elf_i386_relocate_section): Write out the dynamic relocs. Add
483 more ugly logic to avoid "unresolvable relocation" error. Use
484 htab shortcut in place of elf_hash_table macro.
485 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
486 not always be created now.
490 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
495 * configure.host (mips64-*-linux): Reformat.
499 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
500 allocate local .got space. Use shortcuts from hash table for .got
501 and .plt rather than comparing section names.
502 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
503 adjusting index into local_got_refcounts to document what we are
505 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
506 Tidy .got and .plt error checking.
510 * elf-bfd.h (struct elf_backend_data):
511 elf_backend_emit_relocs: New field: Function for emitting
513 elf_backend_count_relocs: New field: Function for determining
514 the number of relocs to be emitted.
515 * elfxx-target.h: Provide default (NULL) values for
516 elf_backend_emit_relocs and elf_backend_count_relocs.
517 * elflink.h (elf_link_size_reloc_section): Make the hash table
518 big enough to hold the relocs counted by either reloc_count or
520 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
521 should be emitted, either because of a command line option
522 stored in the info structure or because the target provides a
523 special reloc emitting function.
524 If the target provides a reloc counting function use it,
525 unless performing a relocatable link or emitting all relocs.
526 Also set the SEC_RELOC flag on any output section which will
528 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
529 should be emitted, either because of a command line option
530 stored in the info structure or because the target provides a
531 special reloc emitting function.
532 If the target provides a reloc emitting function, use it,
533 unless performing a relocatable link or emitting all relocs.
537 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
538 allocate local .got space.
542 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
547 * elflink.h (struct elf_assign_sym_version_info): Remove member
548 export_dynamic. All users changed to use info member.
549 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
550 export_dynamic, instead use member in parameter info.
551 * bfd-in.h (bfd_elf32_size_dynamic_sections,
552 bfd_elf64_size_dynamic_sections): Update prototype.
553 * bfd-in2.h: Regenerate.
557 * elflink.h (elf_info_failed): Add a new field, verdefs.
558 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
560 (elf_export_symbol): Check eif->verdefs to decide if a symbol
565 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
566 readonly_reloc, to record if a relocation in the .rel.dyn
567 section is against a read-only section.
568 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
570 (_bfd_mips_elf_check_relocs): Record if there is a relocation
571 in the .rel.dyn section against a read-only section by setting
572 DF_TEXTREL or readonly_reloc.
573 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
575 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
576 there is a relocation in the .rel.dyn section against a
578 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
583 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
584 function. Move flagword result into parameter list. Remove
585 comment about setting bfd_error_handler to intercept failure
587 * coffgen.c (make_a_section_from_file): Examine result of
588 calling bfd_coff_styp_to_sec_flags and pass a failure back to
590 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
591 function. Move flagword result into parameter list.
592 * libcoff.h: Regenerate.
593 * libecoff.h: Regenerate.
597 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
598 section is going to follow it.
602 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
603 with the file_align entry from elf_backend_data.
604 (elf_gc_smash_unused_vtentry_relocs): Likewise.
605 (elf_gc_record_vtentry): Likewise.
609 * elflink.h: Whitespace changes.
610 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
611 rather than "unsigned char".
612 (elf_link_output_relocs): Likewise.
613 (elf_link_input_bfd): Likewise.
614 (elf_reloc_link_order): LIkewise.
615 * elf.c: s/CONST/const/. Whitespace changes.
616 * elf32-mips.c: Formatting fix.
618 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
619 * Makefile.in: Regenerate.
620 * po/Make-in: Remove trailing tab.
624 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
626 (elf32_arm_plt_entry): Likewise.
630 * elf.c (swap_out_syms): Keep names for global section symbols.
634 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
635 MIPS-based machines need it.
639 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
642 * config.bfd: Remove ecoff from Linux/mips.
646 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
648 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
649 alignment of 8 for .rela sections; handle further relocations.
653 * coff-z8k.c: Fix formatting.
654 Fix howtos: howto->size was always 1.
658 * configure.host (mips64*-*-linux*): Define.
662 * elf32-i386.c (elf_i386_discard_copies): Rename to
663 discard_copies, and use elf_link_hash_entry arg rather than
664 elf_i386_link_hash_entry.
665 (elf_i386_link_hash_traverse): Delete.
666 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
667 Tidy sizing of dynamic sections.
668 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
669 possible .plt entries.
670 (elf_i386_gc_sweep_hook): Likewise.
671 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
672 everything with plt.refcount <= 0.
674 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
676 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
677 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
679 (allocate_plt_and_got): ..instead do it all here. New function.
680 (elf_i386_size_dynamic_sections): Allocate local .got space and
681 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
682 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
683 rather than gc variety).
684 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
685 (elf_i386_relocate_section): Use it here and correct handling of
686 R_386_GOT32. Provide section and offset for "unresolvable
687 relocation" error message.
688 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
690 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
691 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
692 (elf_i386_link_hash_table_create): Init them.
693 (create_got_section): New function.
694 (elf_i386_create_dynamic_sections): New function.
695 (elf_backend_create_dynamic_sections): Set to above.
696 (elf_i386_check_relocs): Use shortcuts from hash table rather than
697 calling bfd_get_section_by_name.
698 (elf_i386_gc_sweep_hook): Likewise.
699 (elf_i386_adjust_dynamic_symbol): Likewise.
700 (elf_i386_size_dynamic_sections): Likewise.
701 (elf_i386_relocate_section): Likewise.
702 (elf_i386_finish_dynamic_sections): Likewise.
704 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
708 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
710 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
714 * aout-cris.c (MACHTYPE_OK): New. Defined.
718 * section.c (_bfd_strip_section_from_output): Handle NULL
723 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
724 rs6000coff64_vec only if BFD64 is defined.
725 (powerpc64-*-aix*): Enable only if BFD64 is defined.
729 * coff-ia64.c (ia64coff_object_p): Rewrite with
730 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
734 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
735 relocation, small reformatting.
739 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
740 (elf64_x86_64_relocate_section): Likewise.
744 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
745 millicode. Don't allocate .got and .rela.got space here..
746 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
747 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
749 (hppa_handle_PIC_calls): ..nor here..
750 (allocate_plt_and_got): ..instead do it all here. New function.
751 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
752 call allocate_plt_and_got. No need to zap .got if not dynamic.
753 (elf32_hppa_final_link): Call regular bfd_final_link instead of
754 gc_common_final_link.
755 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
756 (elf32_hppa_relocate_section): Use it here.
757 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
758 dynamic_sections_created.
759 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
763 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
764 generic version since we want a hashsize of 4.
765 (elf_backend_size_info): Likewise.
769 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
771 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
772 (elf_link_input_bfd): Likewise.
773 (elf_reloc_link_order): Likewise.
774 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
775 relocations correctly.
779 * elf32-arm.h: fix PLT generation for big endian ARM
783 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
784 for symbols forced local that need plabels.
785 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
786 .plt.rela for local syms if non-shared.
787 (hppa_build_one_stub): Mask lsb of plt.offset.
788 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
789 (clobber_millicode_symbols): Correct comment.
790 (elf32_hppa_relocate_section): Likewise.
791 (elf32_hppa_finish_dynamic_symbol): Likewise.
795 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
796 * bfd-in2.h: Regenerate.
797 * libbfd.h: Regenerate.
798 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
799 and BFD_RELOC_SPARC_UA64 mapping
800 * elf64-sparc.c: Likewise.
804 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
805 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
806 (coff-rs6000.lo): Remove the old dependency.
807 * Makefile.in: Rebuild.
809 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
814 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
815 rs6000coff_core_file_matches_executable_p,
816 rs6000coff_core_file_failing_command and
817 rs6000coff_core_file_failing_signal only if AIX_CORE is
819 (pmac_xcoff_vec): Likewise.
820 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
824 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
825 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
829 * bfd-in2.h: Regenerated.
830 * libcoff.h: Likewise.
834 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
835 undefined millicode syms in shared libs.
836 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
837 (elf32_hppa_check_relocs): Likewise.
838 (elf32_hppa_adjust_dynamic_symbol): Likewise.
839 (elf32_hppa_size_dynamic_sections): Likewise.
840 (elf32_hppa_relocate_section): Likewise.
841 (elf32_hppa_finish_dynamic_symbol): Likewise.
842 (elf32_hppa_finish_dynamic_sections): Likewise.
846 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
847 xcoff-target.h not used to define rs6000 or ppc bfd.
850 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
853 * coff-rs6000.c : Many changes for 64 bit support. Move common
854 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
857 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
858 linker now supported. Explictly define the rs6000coff64_vec.
860 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
861 (coff_print_aux) same
862 (coff_write_object_contents) same
863 (coff_slurp_line_table) same
865 * coffgen.c : (coff_fix_symbol_name) formatting
866 (coff_mangle_symbols) xcoff 64 bit support
867 (coff_write_symbol) same
868 (coff_write_alien_symbol) same
869 (coff_write_native_symbol) same
870 (coff_write_symbols) same
871 (coff_get_symbol_info) same
872 (bfd_coff_get_syment) same
873 (coff_print_symbol) same
875 * config.bfd : add powerpc64-*-aix* target
877 * libcoff-in.h : formatting
879 * libcoff.h : move xcoff extern declarations to libxcoff.h
881 * libxcoff.h : New file
883 * xcofflink.c : Many changes for xcoff64 support. Move common
884 structures to include/coff/xcoff.h. Move specific structure to
885 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
886 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
888 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
891 (xcoff_build_ldsyms) : handle special __rtinit symbol.
895 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
900 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
901 * libbfd.h: Regenerate.
902 * bfd-in2.h: Regenerate.
904 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
905 * archures.c (bfd_mach_mips12000): Define.
906 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
907 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
909 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
910 * bfd-in2.h: Regenerate.
911 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
915 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
916 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
917 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
922 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
923 of entries in a structured section.
924 * elf.c: Use new macro.
925 * elf32-i386.c: Use new macro.
926 * elf32-mips.c: Use new macro.
927 * elf64-alpha.c: Use new macro.
928 * elf64-sparc.c: Use new macro.
929 * elfcode.h: Use new macro.
930 * elflink.h: Use new macro.
934 * bfdint.texi: Replace -oformat with --oformat.
938 * dwarf2.c (decode_line_info): Fix error message.
939 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
940 adjust error message.
944 * elflink.h (elf_link_add_object_symbols): Revert the last
949 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
950 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
951 (hppa_build_one_stub): Add an assert to check plt.offset.
955 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
956 version definition to basename of the output filename.
960 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
961 basename of the bfd filename.
965 * section.c (asection): Add linker_has_input field.
966 (STD_SECTION): Adjust initialization to suit.
967 * ecoff.c (bfd_debug_section): Likewise.
968 * bfd-in2.h: Regenerate.
972 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
973 negative 32-bit operands to 16 operands when the operand is
974 going to be zero-extended by the modified opcode.
978 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
979 name for 'arc5' core versions.
980 (bfd_arc_arch): Make bfd_mach_arc_6 default.
982 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
984 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
988 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
990 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
991 to .gnu.linkonce.t.FOO text section.
995 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
996 fields, change sec into secinfo.
997 (struct sec_merge_info): Add chain, remove last fields.
998 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
999 (sec_merge_hash_lookup): If lookup could not use a string only
1000 because it has bad alignment, mark the old string for deletion.
1001 (sec_merge_add): Add secinfo argument. Don't compute entry's
1002 position, instead record the section.
1003 (sec_merge_emit): Update for the sec into secinfo change in
1004 struct sec_merge_hash_entry.
1005 (_bfd_merge_section): Only record the section for merging, defer
1006 putting strings into the hash table.
1007 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
1008 _bfd_merge_sections): New functions.
1009 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
1011 * libbfd-in.h (_bfd_merge_sections): Add prototype.
1012 (_bfd_nolink_bfd_merge_sections): Define.
1013 * libbfd.h: Likewise.
1014 (bfd_generic_merge_sections): Add prototype.
1015 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
1016 (struct bfd_target): Likewise.
1017 * bfd.c (bfd_merge_sections): Define.
1018 * bfd-in2.h: Rebuilt.
1019 * elf.c (_bfd_elf_merge_sections): New function.
1020 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
1021 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
1022 * reloc.c (bfd_generic_merge_sections): New function.
1023 * vms.c (vms_bfd_merge_sections): New function.
1024 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
1025 * aout-target.h (MY_bfd_merge_sections): Define.
1026 * aout-tic30.c (MY_bfd_merge_sections): Define.
1027 * binary.c (binary_bfd_merge_sections): Define.
1028 * bout.c (b_out_bfd_merge_sections): Define.
1029 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
1030 * coffcode.c (coff_bfd_merge_sections): Define.
1031 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
1032 * i386msdos.c (msdos_bfd_merge_sections): Define.
1033 * i386os9k.c (os9k_bfd_merge_sections): Define.
1034 * ieee.c (ieee_bfd_merge_sections): Define.
1035 * ihex.c (ihex_bfd_merge_sections): Define.
1036 * nlm-target.h (nlm_bfd_merge_sections): Define.
1037 * oasys.c (oasys_bfd_merge_sections): Define.
1038 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
1039 * som.c (som_bfd_merge_sections): Define.
1040 * srec.c (srec_bfd_merge_sections): Define.
1041 * tekhex.c (tekhex_bfd_merge_sections): Define.
1042 * versados.c (versados_bfd_merge_sections): Define.
1043 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
1047 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
1048 to be unsigned long, in order to match its use.
1052 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
1057 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
1058 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
1059 Remove the unused veriable `dynver'.
1063 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
1064 NULL or is not COFF.
1065 (coff_i386_rtype_to_howto): Don't dump core if output section
1070 * ecoff.c (bfd_debug_section): Fix initialization.
1071 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
1072 is always a positive integer. Cast away sign mismatch.
1073 * elf32-mips.c: Fix misleading comment and typo.
1074 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
1076 * elflink.c: Fix typo.
1077 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
1078 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
1082 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
1086 * elf32-arm.h (elf32_arm_final_link_relocate): Set
1087 EF_ARM_HASENTRY if the start address is set.
1091 * targets.c (_bfd_target_vector_entries): Compute value based on
1092 the size of the _bfd_target_vector and not bfd_target_vector.
1096 * elfcode.h: Include "libiberty.h".
1098 * elflink.h (elf_link_add_object_symbols): Set
1099 elf_dt_name (abfd) to basename of the bfd filename.
1100 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
1101 of the bfd filename.
1105 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
1106 (elf_generic_info_to_howto_rel): Likewise.
1107 * coff-alpha.c (reloc_nil): Likewise.
1108 (alpha_ecoff_bad_format_hook): Likewise.
1109 (alpha_adjust_reloc_out): Likewise.
1110 (alpha_bfd_reloc_type_lookup): Likewise.
1111 (alpha_convert_external_reloc): Likewise.
1112 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
1113 (elf64_alpha_reloc_bad): Likewise.
1114 (elf64_alpha_reloc_gpdisp): Likewise.
1115 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
1116 (elf64_alpha_info_to_howto): Likewise.
1117 (elf64_alpha_add_symbol_hook): Likewise.
1118 (elf64_alpha_create_got_section): Likewise.
1119 (elf64_alpha_is_local_label_name): Likewise.
1120 (elf64_alpha_merge_ind_symbols): Likewise.
1121 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
1122 (mips_elf64_get_reloc_upper_bound): Likewise.
1123 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
1124 (nlm_alpha_get_public_offset): Likewise.
1128 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
1129 about overflow in R_OPENRISC_LO_16_IN_INSN and
1130 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
1134 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
1135 only for ELF_LINK_FORCED_LOCAL.
1136 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1137 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
1138 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1140 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
1141 if the symbol has hidden or internal visibility.
1145 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
1146 calls to undefined weak symbols.
1150 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
1151 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
1155 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
1156 out handled entries.
1157 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
1158 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
1159 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
1164 * config.bfd: Add arm-vxworks target.
1165 * coff-arm (coff_arm_relocate_section): Add in symbol value to
1166 addend (fro VXworks targets).
1170 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
1175 * bfd-in.h (bfd_cache_close): Declare newly exported function.
1176 * bfd-in2.h: Regenerated.
1180 * merge.c (struct sec_merge_hash_entry): Add alignment field.
1181 (struct sec_merge_hash): Remove alignment_power.
1182 (sec_merge_hash_newfunc): Clear alignment.
1183 (sec_merge_hash_lookup): Pass alignment as argument.
1184 Use hashp->root.next, not hashp->next to walk the hash chain.
1185 If a string already in the hashtable does not have required
1186 alignment, create a new hashtable entry.
1187 (sec_merge_init): Remove alignment_power argument.
1188 (sec_merge_add): Add alignment argument.
1189 (sec_merge_emit): Alignment is now a per-entity thing, not per
1191 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
1192 for proper alignment.
1193 Pass alignment information to sec_merge_add.
1197 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
1198 and R_REL16 reloc types; accept odd values for R_REL16 type
1202 * cpu-openrisc.c: New file.
1203 * elf32-openrisc.c: Likewise.
1205 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
1206 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
1207 (BFD32_BACKENDS): Add elf32-openrisc.lo.
1208 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
1209 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
1210 * Makefile.in: Regenerated.
1211 * config.bfd: (openrisc-*-elf): New target.
1212 * configure.in (bfd_elf32_openrisc_vec): New vector.
1213 * configure: Regenerated.
1214 * libbfd.h: Regenerated.
1215 * bfd-in2.h: Regenerated.
1216 * reloc.c: Add OpenRISC relocations.
1217 * targets.c (bfd_elf32_openrisc_vec): Declare.
1218 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
1219 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
1220 (bfd_openrisc_arch): Declare.
1221 (bfd_archures_list): Add bfd_openrisc_arch.
1222 * elf.c (prep_headers): Add bfd_arch_openrisc.
1226 * elf64-x86-64.c: Add c++ vtable hack.
1227 Small whitespace and comment changes.
1231 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
1232 (elf64_x86_64_plt_entry): Likewise.
1233 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
1234 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
1238 * elf32-cris.c: Tweak comments related to dynamic linking.
1239 (cris_elf_relocate_section): When not creating shared object, fill
1240 in the .got table for any symbol not in the dynamic symbol table.
1241 (elf_cris_finish_dynamic_symbol): When not creating shared object,
1242 only emit a .got.rela reloc if the symbol is in the dynamic symbol
1244 (cris_elf_check_relocs): Use variable r_type in all places rather
1245 than the original expression. Add default case in switch for
1247 (elf_cris_size_dynamic_sections): Iterate over
1248 elf_cris_discard_excess_program_dynamics when not creating shared
1250 (elf_cris_discard_excess_dso_dynamics): Renamed from
1251 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
1252 (elf_cris_discard_excess_program_dynamics): New.
1256 * coffcode.h (coff_write_object_contents): Use
1257 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
1261 * bfd-in2.h: Regenerate.
1265 * section.c (STD_SECTION): Add entsize.
1269 * section.c (SEC_MERGE): Define new flag for merging.
1270 (SEC_STRINGS): Likewise.
1271 (entsize): New field.
1275 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
1276 flag on pe-i386 targets.
1280 * libbfd-in.h (_bfd_merge_section): New.
1281 (_bfd_write_merged_section): New.
1282 (_bfd_merged_section_offset): New.
1283 * libbfd.h: Rebuilt.
1284 * linker.c (_bfd_generic_link_output_symbols): Handle
1286 * aoutx.h (aout_link_write_symbols): Likewise.
1287 * pdp11.c (aout_link_write_symbols): Likewise.
1288 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
1289 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
1291 (elf_link_sec_merge_syms): New.
1292 (elf_link_input_bfd): Call _bfd_merged_section_offset
1293 and _bfd_write_merged_section.
1294 Handle discard_sec_merge.
1295 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
1297 (struct bfd_elf_section_data): Likewise.
1298 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
1299 SEC_STRINGS section flags and entsize from their ELF counterparts.
1300 (_bfd_elf_link_hash_table_init): Initialize merge_info.
1301 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
1302 from their BFD counterparts.
1303 * merge.c: New file.
1304 * Makefile.am: Add strtab.lo.
1305 * Makefile.in: Rebuilt.
1309 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
1310 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
1314 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
1315 endian MIPS ELF target.
1316 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1319 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1320 64bit big endian MIPS ELF target.
1321 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1322 endian MIPS ELF target.
1323 * configure: Regenerated.
1325 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1326 little endian targets.
1327 (mips_elf_sym_is_global): Handle traditional targets.
1329 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1330 64bit big endian MIPS ELF target.
1331 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1332 endian MIPS ELF target.
1334 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1335 and bfd_elf64_tradlittlemips_vec.
1339 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1340 ordinary "progbits" section.
1344 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1345 when -Bsymbolic causes a symbol to no longer need a .plt entry.
1349 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1353 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1354 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1358 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1359 if there are any relocations for generic ELF.
1360 (bfd_elf32_bfd_link_add_symbols): Defined to
1361 elf32_generic_link_add_symbols.
1362 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1363 if there are any relocations for generic ELF.
1364 (bfd_elf64_bfd_link_add_symbols): Defined to
1365 elf64_generic_link_add_symbols.
1369 * Makefile.am (BUILD_CFILES): New variable: List of C source
1370 files created in build directory.
1371 (BUILD_HFILES): New variable: List of header files created in
1374 (po/POTFILES.in): Replace rule with empty entry.
1375 (po/SRC-POTFILES.in): New rule: Create a list of source files
1376 in the source directory.
1377 (po/BLD-POTFILES.in): New rule: Create a list of source files
1378 in the build directory.
1379 (MOSTLYCLEAN): Do not delete source files created in build
1381 * Makefile.in: Regenerate.
1382 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1384 * configure: Regenerate.
1386 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1388 Add .. to the search path when building bfd.pot.
1389 Delete POTFILES when performing distclean.
1390 Add comment describing why distclean is broken in maintainer mode.
1391 * po/POTFILES.in: Delete.
1392 * po/SRC-POTFILES.in: New file.
1393 * po/BLD-POTFILES.in: New file.
1394 * po/bfd.pot: Regenerate.
1398 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
1399 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1400 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1401 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1402 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1403 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1405 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1406 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
1407 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1408 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1409 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1410 New HOWTO members for new relocs.
1411 (cris_reloc_map): Map new relocs.
1412 (ELF_DYNAMIC_INTERPRETER): Define.
1413 (PLT_ENTRY_SIZE): Define.
1414 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1415 elf_cris_pic_plt_entry): New, PLT templates.
1416 (struct elf_cris_pcrel_relocs_copied, struct
1417 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1418 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1419 (cris_final_link_relocate): Check that 16-bit GOT relocs have
1420 positive values. Adjust PCREL relocs to be relative to location
1422 (cris_elf_relocate_section): Handle relocations to dynamic
1423 objects. Handle new relocations. Call error handler when seeing
1424 non-PIC relocation for read-only sections while generating shared
1426 (cris_elf_check_relocs): Set reference counts for GOT and PLT
1428 (bfd_elf32_bfd_link_hash_table_create,
1429 elf_backend_adjust_dynamic_symbol,
1430 elf_backend_size_dynamic_sections,
1431 elf_backend_finish_dynamic_symbol,
1432 elf_backend_finish_dynamic_sections,
1433 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1434 elf_backend_hide_symbol, elf_backend_want_got_plt,
1435 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1436 elf_backend_got_header_size, elf_backend_plt_header_size):
1439 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1440 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1441 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1442 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1443 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1444 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1445 * bfd-in2.h, libbfd.h: Regenerate.
1449 (_bfd_mips_elf_relocate_section): Give a better error message when
1450 a relocation is not recognized.
1454 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1455 non-NULL before attempting to dereference.
1459 * configure.in: Remove the redundent AC_ARG_PROGRAM.
1460 * configure: Rebuild.
1464 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1465 relocation value when resolving a reference from a debugging
1470 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1471 (xcoff64_swap_sym_out): Fix syntax errors.
1475 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1479 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1480 (hppa_link_hash_newfunc): Init it.
1481 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1482 section appears to be non-PIC.
1483 (final_link_relocate): Likewise.
1484 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1485 possible candidate function, and set pic_call for those that will
1486 only have a .plt entry for the PIC call stub.
1487 (hppa_handle_PIC_calls): Set maybe_pic_call.
1491 * elf32-sh.c (sh_elf_relocate_section): Only relocation
1492 R_SH_DIR8WP* relocs if they're against external symbols, else
1493 they're just for relaxing. Validate the reloc values.
1497 * binary.c (bfd_external_binary_architecture): Declare.
1498 (binary_object_p): If bfd_external_binary_architecture is defined,
1499 set the architecture to this string.
1503 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1504 entries that could serve as a definition for a weak symbol.
1508 * Most files: Update copyright notices using Perl script created
1513 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1514 prior patch on ! defined OLD_ARM_ABI.
1518 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1519 some relocation values.
1523 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1524 of offset in BLX(1) instruction.
1525 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1526 offset in BLX(1) instruction.
1531 * coff-arm.c (coff_arm_reloc_type_lookup): Add
1532 BFD_RELOC_THUMB_PCREL_BLX.
1536 * archures.c (bfd_default_scan): Add Coldfire CPUs.
1537 * bfd-in2.h: Regenerate.
1538 * cpu-m68k.c: Add Coldfire CPUs for arch table.
1539 * ieee.c (ieee_write_processor): Set proper id for
1544 * configure.in: Add s390 target.
1545 * configure: Regenerate.
1549 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1554 * elf32-arm.h: Update mentions of renamed EF_xx constants.
1555 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1559 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1560 abfd->tdata.aout_data == NULL.
1564 * elf32-hppa.c: Correct field selector in stub comments.
1565 (clobber_millicode_symbols): Formatting fix.
1567 * configure.in: Bump version to 2.11.90.
1568 * configure: Regenerate.
1569 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1570 (CFILES): $SOURCE_CFILES + generated C files.
1571 (POTFILES): Include $HFILES not $SOURCE_HFILES.
1573 * Makefile.in: Regenerate.
1574 * doc/Makefile.in: This too.
1578 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1583 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1584 up, replacing multiple if statements with a switch.
1585 (handle_COMDAT): New function.
1589 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1590 a warning for section flags we do not handle instead of
1595 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1599 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1600 * configure.in: Add objects for elf64_ia64_aix vectors.
1601 * configure: Regenerated.
1602 * configure.host: Recognize ia64-*-aix*.
1603 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
1604 for AIX. AIX5 requires most relocations to be dynamic (*all*
1605 binaries are somewhat similar to shared libraries).
1606 * targets.c: Add elf64_ia64_aix vectors.
1610 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1611 C8 said "1" instead of "8". Clarify error string for IMM22:
1612 "signed integer" instead of just "integer".
1616 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1617 PLT entries that could serve as a definition for a weak symbol.
1621 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1622 entries that could serve as a definition for a weak symbol.
1623 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1625 2001-02-18 David O'Brien <obrien@FreeBSD>
1627 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1628 FreeBSD/i386-CURRENT differently until I can figure out the needed
1630 * configure: Regenerate.
1631 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1632 FreeBSD/PowerPC, and FreeBSD/sparc64.
1636 * Makefile.am: Add PDP-11 a.out target.
1637 * config.bfd: Likewise.
1638 * configure.in: Likewise.
1639 * targets.c: Likewise.
1640 * archures.c: Likewise.
1641 * bfd-in2.h: Likewise. Add PDP-11 relocations.
1642 * libbfd.h: Add PDP-11 relocations.
1643 * reloc.c: Likewise.
1644 * cpu-pdp11.c: New file.
1645 * pdp11.c: New file.
1647 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1648 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1649 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1650 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1651 (GET_MAGIC): New macro.
1652 (PUT_MAGIC): Likewise.
1653 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1657 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1658 multiarch needs it).
1662 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1667 * vms-misc.c: Fix formatting.
1671 * vms.c: Fix formatting.
1675 * elf.c (elf_find_function): New function.
1676 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1677 the file name and function name.
1681 * ecoff.c (bfd_debug_section): Update to initialise new fields in
1684 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1685 (BFD64_BACKENDS): Add pepigen.c
1686 Add rules to create peigen.c and pepigen.c from peXXigen.c.
1688 * Makefile.in: Regenerate.
1689 * configure: Regenerate.
1690 * po/POTFILES.in: Regenerate.
1691 * po/bfd.pot: Regenerate.
1695 * libcoff-in.h (pe_tdata): Add members target_subsystem and
1696 force_minimum_alignment.
1700 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1701 (elf64_86_64_size_info): Struct added to fix a problem
1702 with the hashtable string entries.
1703 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1704 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1705 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1706 remove the FIXME for this.
1707 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1708 section. Also removed the FIXME for it.
1709 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1710 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1711 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1715 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1716 and not user provided.
1720 * vms.c (vms_print_symbol): Remove unreachable code.
1722 * rs6000-core.c: Fix formatting.
1726 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1727 as _bfd_XXi_only_swap_filehdr_out.
1728 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1729 pe->force_minimum_alignment to TRUE.
1730 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1731 PEI_TARGET_SUBSYSTEM.
1732 (pe_print_private_bfd_data): Call
1733 _bfd_XX_print_private_bfd_data_common() instead of
1734 _bfd_pe_print_private_bfd_data_common().
1735 (pe_bfd_copy_private_bfd_data): Call
1736 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1737 _bfd_pe_bfd_copy_private_bfd_data_common().
1738 (coff_bfd_copy_private_section_data): Define as
1739 _bfd_XX_bfd_copy_private_section_data instead of
1740 _bfd_pe_bfd_copy_private_section_data.
1741 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1742 of a _bfd_pe_get_symbol_info.
1746 * peXXigen.c: Renamed from peigen.c.
1747 (COFF_WITH_XX): Define this macro (will get expanded into
1748 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1749 compiled as peigen.c or pepigen.c.
1750 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1751 define the canonical PEP structures and definitions.
1752 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1753 effect, enforce minimum file and section alignments. If
1754 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1755 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1756 so, by default, this is a no-op).
1758 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1759 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1760 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1761 _bfd_pefoo if it's not defined. Use these macros to define
1764 * libcoff.h (pe_tdata): Add members target_subsystem and
1765 force_minimum_alignment.
1767 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1769 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
1771 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
1774 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
1775 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
1778 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
1779 (BFD64_BACKENDS_CFILES): Mention pepigen.c
1780 (peigen.c): Add rule to generate from peXXigen.c.
1782 (pepigen.lo): List dependencies for pepigen.lo.
1786 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
1787 $global$ referenced but not defined, set its value here.
1791 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
1793 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
1795 (elf64_x86_64_relocate_section): Fix formatting.
1796 (elf64_x86_64_relocate_section): Fix addend for relocation of
1797 R_X86_64_(8|16|32|PC8|PC16|PC32).
1801 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
1805 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
1810 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1811 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
1812 relocations against dynsym symbols.
1814 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1815 the R_MIPS_26 relocation.
1816 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1817 the R_MIPS_26 relocation.
1818 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1820 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1821 the R_MIPS_26 relocation.
1822 (mips_elf64_howto_table_rela): Likewise.
1824 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1825 member to mark symbols that have non-CALL relocations against
1827 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1828 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1830 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1831 non-CALL relocation against it is encountered.
1832 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1833 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1834 no_fn_stub is not set.
1836 * elf32-mips.c (mips_elf_output_extsym): Get the output section
1837 information from the real symbol for indirect ones.
1838 Check no_fn_stub to find out if a symbol has a function stub
1843 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1844 * Makefile.in: Regenerate.
1848 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
1849 true if section name is an unwind table section name.
1850 (elfNN_ia64_additional_program_headers): Count each unwind section
1852 (elfNN_ia64_modify_segment_map): Install one unwind program header
1853 for each unwind separate section. Note: normally the linker
1854 script merges the unwind sections that go into a single segment,
1855 so this still generates at most one unwind program header per
1858 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1859 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1860 (elfNN_ia64_fake_sections): Mark sections with names that start
1861 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1864 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1865 Use it to make sh_info in unwind section point to the text section
1870 * Makefile.am: Add linux target for S/390.
1871 * archures.c: Likewise.
1872 * bfd-in2.h: Likewise.
1873 * config.bfd: Likewise.
1874 * configure.in: Likewise.
1876 * libbfd.h: Likewise.
1877 * targets.c: Likewise.
1878 * cpu-s390.c: New file.
1879 * elf32-s390.c: New file.
1880 * elf64-s390.c: New file.
1884 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1885 ImageBase. This has already been done by coff_swap_hdr_in.
1889 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1893 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1894 (sparc64_elf_relocate_section): Likewise.
1898 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1899 similar to R_SPARC_32.
1900 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1904 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
1905 relocation entries for weak definitions when building DSO with
1910 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
1911 before visibility. Locally defined protected symbols are not
1916 * config.bfd: Enable coff64 for rs6000-*. Patch from
1921 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
1922 found, do not attempt to find dwarf2 info before returning.
1926 * elflink.h (is_global_symbol_definition): Rename to
1927 is_global_data_symbol_definition and have it reject function
1929 (elf_link_is_defined_archive_symbol): Use renamed function.
1933 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
1934 * libbfd.h (bfd_target_vector): Likewise.
1935 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
1936 make static; create pointer reference named bfd_target_vector.
1937 (_bfd_target_vector_entries): Calculate this based on the array
1938 typed _bfd_target_vector.
1942 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
1943 internal symbols are not dynamic.
1944 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1948 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
1949 that it will not be pulled into the list of files that make up
1951 * Makefile.in: Regenerate.
1952 * po/bfd.pot: Regenerate.
1956 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
1958 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
1959 external_PEI_IMAGE_hdr.
1963 * elf-m10200.c: Fix formatting.
1967 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
1968 rel, it will be handled later on.
1972 * Makefile.in: Fix typo.
1976 * elf-m10300.c: Fix formatting.
1980 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
1981 (elf_backend_get_symbol_type): Define.
1982 (elf64_hppa_object_p): Set architecture and machine from elf
1987 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
1992 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
1993 for non-default visibility.
1994 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
1995 delete ugly macro and replace with pretty function.
1999 * coff-go32.c: Update copyright.
2000 * coff-stgo32.c: Likewise.
2001 * coff-go32.c (COFF_LONG_FILENAMES): Define.
2002 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
2003 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
2004 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2008 * bfd-in2.h: Rebuild.
2009 * libbfd.h: Likewise.
2013 * bfd-in2.h: Rebuild.
2017 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
2018 is NULL or PRIV(vms_rec) is outside of the buffer.
2022 * coff64-rs6000.c: Fix formatting.
2023 * coff-arm.c: Likewise.
2024 * coffgen.c: Likewise.
2025 * cofflink.c: Likewise.
2026 * coff-mcore.c: Likewise.
2027 * coff-mips.c: Likewise.
2028 * coff-pmac.c: Likewise.
2029 * coff-ppc.c: Likewise.
2030 * coff-rs6000.c: Likewise.
2031 * elf32.c: Likewise.
2032 * elf32-fr30.c: Likewise.
2033 * elf32-i370.c: Likewise.
2034 * elf32-i860.c: Likewise.
2035 * elf32-m32r.c: Likewise.
2036 * elf32-m68k.c: Likewise.
2037 * elf32-mcore.c: Likewise.
2038 * elf32-ppc.c: Likewise.
2039 * elf32-sh.c: Likewise.
2040 * elf32-v850.c: Likewise.
2041 * elf64-alpha.c: Likewise.
2042 * elf64-sparc.c: Likewise.
2043 * elflink.c: Likewise.
2044 * elflink.h: Likewise.
2045 * elf-m10200.c: Likewise.
2046 * elf-m10300.c: Likewise.
2047 * elfxx-ia64.c: Likewise.
2049 * aoutx.h: Fix formatting.
2051 * bfd-in2.h: Likewise.
2052 * bfd-in.h: Likewise.
2053 * cpu-i386.c: Likewise.
2054 * cpu-m68hc11.c: Likewise.
2055 * dwarf2.c: Likewise.
2056 * elf64-x86-64.c: Likewise.
2057 * format.c: Likewise.
2058 * freebsd.h: Likewise.
2060 * hp300hpux.c: Likewise.
2061 * hppabsd-core.c: Likewise.
2062 * hpux-core.c: Likewise.
2066 * elf64-x86-64.c: Added PIC support for X86-64.
2067 (elf64_x86_64_link_hash_newfunc): Function added.
2068 (elf64_x86_64_link_hash_table_create): Likewise.
2069 (elf64_x86_64_check_relocs): Likewise.
2070 (elf64_x86_64_gc_mark_hook): Likewise.
2071 (elf64_x86_64_gc_sweep_hook): Likewise.
2072 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2073 (elf64_x86_64_size_dynamic_sections): Likewise.
2074 (elf64_x86_64_discard_copies): Likewise.
2075 (elf64_x86_64_finish_dynamic_symbol): Likewise.
2076 (elf64_x86_64_finish_dynamic_sections): Likewise.
2077 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2081 * Makefile.am (install-data-local): Make use of $(DESTDIR).
2082 * Makefile.in: Regenerate.
2086 * coff-a29k.c: Fix formatting.
2090 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
2091 relocation section names.
2092 (elf_i386_relocate_section): Report files with bad relocation
2093 section names and return false.
2097 * targets.c: Alphabetize list of xvecs.
2101 * config.bfd: Add linux target variant for elfxx-hppa.
2102 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
2103 bfd_elf64_hppa_linux_vec.
2104 * configure: Regenerate.
2105 * elf64-hppa.c: Include elf64-target.h again to support linux
2107 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
2108 * elf32-hppa.c: Include elf32-target.h again to support linux
2110 (elf32_hppa_post_process_headers): New function.
2111 (elf_backend_post_process_headers): Define.
2112 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
2113 bfd_elf32_hppa_linux_vec.
2115 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
2116 and data_segment_base fields.
2117 (elf32_hppa_link_hash_table_create ): Init them.
2118 (elf32_hppa_check_relocs): Update comments.
2119 (hppa_record_segment_addr): New function.
2120 (elf32_hppa_relocate_section): Call it.
2121 (final_link_relocate): Handle R_PARISC_SEGREL32.
2122 (elf32_hppa_final_link): New function.
2123 (bfd_elf32_bfd_final_link): Define to call it.
2124 (hppa_unwind_entry_compare): New function.
2125 * cache.c (bfd_open_file): Create files in write+read mode.
2127 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
2128 SEGREL32 and numerous other relocs. Change duplicate
2129 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
2131 * opncls.c (bfd_fdopenr): Add parens like the comment says around
2134 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
2135 .plt entries for DT_INIT and DT_FINI.
2136 (elf32_hppa_finish_dynamic_sections): Remove special handling of
2137 DT_INIT and DT_FINI.
2139 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
2140 offsets for stub .plt access if wide mode. Check offset in range.
2144 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
2147 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
2152 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
2153 * configure: Regenerate.
2157 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
2158 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
2159 * cpu-arc.c (arch_info_struct): Add entries for variants.
2160 (bfd_arc_arch) Set default to bfd_mach_arc_5.
2161 (arc_get_mach) Don't assume machine names prefixed arc- before
2163 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
2165 (arc_elf_final_write_processing) Likewise.
2166 (ELF_MACHINE_CODE) Use EM_ARC.
2170 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
2179 * som.c: Fix formatting.
2183 * ecoffswap.h: Fix formatting.
2184 * elf-bfd.h: Likewise.
2185 * elfarm-nabi.c: Likewise.
2186 * elfarm-oabi.c: Likewise.
2187 * elfcode.h: Likewise.
2188 * elfcore.h: Likewise.
2189 * elflink.c: Likewise.
2190 * elflink.h: Likewise.
2191 * elfxx-ia64.c: Likewise.
2192 * elfxx-target.h: Likewise.
2193 * libbfd.c: Likewise
2194 * linker.c: Likewise.
2195 * lynx-core.c: Likewise.
2199 * pc532-mach.c: Fix formatting.
2200 * pe-arm.c: Likewise.
2201 * pe-i386.c: Likewise.
2202 * pe-mips.c: Likewise.
2203 * pe-ppc.c: Likewise.
2204 * pe-sh.c: Likewise.
2205 * pei-mips.c: Likewise.
2206 * pei-sh.c: Likewise.
2207 * peicode.h: Likewise.
2208 * ppcboot.c: Likewise.
2209 * ptrace-core.c: Likewise.
2213 * reloc.c: Fix formatting.
2214 * riscix.c: Likewise.
2215 * rs6000-core.c: Likewise.
2216 * xcoff-target.h: Likewise.
2220 * elfcode.h (elf_object_p): Also restore the bfd mach field on
2221 error, by calling bfd_default_set_arch_mach with incoming
2226 * vaxnetbsd.c: Fix formatting.
2227 * versados.c: Likewise.
2228 * vms-gsd.c: Likewise.
2229 * vms-hdr.c: Likewise.
2230 * vms-misc.c: Likewise.
2234 * archive.c (coff_write_armap): Don't write more than symbol_count
2235 `archive_member_file_ptr's.
2239 * vms-tir.c: Fix formatting.
2243 * vms.c: Fix formatting.
2248 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
2250 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
2252 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
2255 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
2257 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
2261 * libbfd.c (bfd_get_bits): Added
2262 (bfd_put_bits): Likewise
2263 * bfd-in.h: Declared the above.
2264 * bfd-in2.h: Regenerated.
2268 * targets.c: Fix formatting.
2269 * tekhex.c: Likewise.
2270 * trad-core.c: Likewise.
2274 * sco5-core.c: Fix formatting.
2275 * section.c: Likewise.
2276 * sparclinux.c: Likewise.
2277 * sparclynx.c: Likewise.
2278 * sparcnetbsd.c: Likewise.
2280 * stabs.c: Likewise.
2281 * stab-syms.c: Likewise.
2282 * sunos.c: Likewise.
2284 * sysdep.h: Likewise.
2288 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
2290 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
2291 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
2295 * vms-misc.c (_bfd_vms_get_record): Add default case to
2300 * elfcore.h (elf_core_file_p): Move to the start of the program
2301 headers before attempting to read them.
2305 * peigen.c: Fix formatting.
2311 * peigen.c: Fix formatting.
2315 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2319 * binary.c (binary_set_section_contents): Ignore sections
2324 * m68klinux.c: Fix formatting.
2325 * m68knetbsd.c: Likewise.
2326 * mipsbsd.c: Likewise.
2327 * netbsd-core.c: Likewise.
2328 * netbsd.h: Likewise.
2329 * newsos3.c: Likewise.
2330 * nlm32-alpha.c: Likewise.
2331 * nlm32-i386.c: Likewise.
2332 * nlm32-ppc.c: Likewise.
2333 * nlm32-sparc.c: Likewise.
2334 * nlmcode.h: Likewise.
2335 * nlmswap.h: Likewise.
2336 * nlm-target.h: Likewise.
2337 * ns32knetbsd.c: Likewise.
2341 * elflink.h (elf_link_output_extsym): Don't complain about undefined
2342 symbols in shared objects if allow_shlib_undefined is true.
2346 * cpu-sh.c: Fix formattng.
2347 * elf.c: Fix formattng.
2348 * elf32-mips.c: Fix formattng.
2349 * elf32-sh.c: Fix formattng.
2350 * elf64-alpha.c: Fix formattng.
2354 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2355 dwarf2_find_line_info as last parameter to invocation of
2356 _bfd_dwarf2_find_nearest_line.
2357 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2358 dwarf2_find_line_info as last parameter to invocation of
2359 _bfd_dwarf2_find_nearest_line.
2363 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2364 (BFD_LIBS): ...to here.
2365 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2366 (BFD_LIBS_CFILES): ...to here.
2367 * Makefile.in: Regenerate.
2368 * configure.in: Remove dwarf.lo from the elf shell variable.
2369 * configure: Regenerate.
2370 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2371 * libcoff.h: Regenerate.
2372 * coffgen.c (coff_find_nearest_line): Call
2373 _bfd_dwarf2_find_nearest_line.
2374 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2376 (read_abbrevs): Likewise
2377 (decode_line_info): Likewise.
2378 (parse_comp_unit): Likewise.
2379 (comp_unit_find_nearest_line): Likewise.
2380 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2381 * libbfd.h: Regenerate.
2382 * elf.c (_bfd_elf_find_nearest_line): Update call.
2383 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2384 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2385 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2386 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2387 (styp_to_sec_flags): Handle DWARF2 sections.
2388 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2389 to _bfd_find_nearest_line.
2390 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2391 call to _bfd_find_nearest_line.
2395 * coffgen.c: Fix formatting.
2396 * elf-m10300.c: Likewise.
2397 * elf32-i386.c: Likewise.
2398 * elf32-i960.c: Likewise.
2399 * elf32-m68k.c: Likewise.
2400 * elf32-mcore.c: Likewise.
2401 * elf32-ppc.c: Likewise.
2402 * elf32-sh.c: Likewise.
2403 * elf32-sparc.c: Likewise.
2404 * elf32-v850.c: Likewise.
2405 * elf64-alpha.c: Likewise.
2406 * elf64-hppa.c: Likewise.
2407 * elf64-mips.c: Likewise.
2408 * elf64-sparc.c: Likewise.
2412 * elf32-ppc.c: Fix formatting.
2413 * elf64-x86-64.c: Likewise.
2419 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2420 BFDs containing no sections or empty .text, .data or .bss sections
2421 to be merged, regardless of their flags.
2425 * elf32-m32r.c: Fix formatting.
2426 * elf32-m68hc11.c: Likewise.
2427 * elf32-m68hc12.c: Likewise.
2428 * elf32-m68k.c: Likewise.
2429 * elf32-mcore.c: Likewise.
2430 * elf32-pj.c: Likewise.
2431 * elf32-ppc.c: Likewise.
2435 * elf32-fr30.c: Fix formatting.
2436 * elf32-hppa.c: Likewise.
2437 * elf32-i370.c: Likewise.
2438 * elf32-i386.c: Likewise.
2439 * elf32-i860.c: Likewise.
2440 * elf32-i960.c: Likewise.
2444 * elf32-arm.h: Fix formatting.
2445 * elf32-avr.c: Likewise.
2446 * elf32-cris.c: Likewise.
2447 * elf32-d10v.c: Likewise.
2448 * elf32-d30v.c: Likewise.
2449 * elf-hppa.h: Likewise.
2450 * elf-m10200.c: Likewise.
2451 * elf-m10300.c: Likewise.
2455 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2456 bfd_mach_mips32_4k. Update FIXME comment.
2457 * archures.c (bfd_mach_mips32): New constant.
2458 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2459 the latter, renumber it.
2460 * bfd-in2.h (bfd_mach_mips32): New constant.
2461 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2462 the latter, renumber it.
2463 * cpu-mips.c (I_mips32): New constant.
2464 (I_mips4K, I_mips32_4k): Rename the former to the latter.
2465 (arch_info_struct): Add bfd_mach_mips32 entry, replace
2466 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2467 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2468 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
2469 with E_MIPS_MACH_MIPS32_4K.
2470 (_bfd_mips_elf_final_write_processing): Replace
2471 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2472 bfd_mach_mips32 case.
2473 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2474 comparison with support for MIPS32.
2475 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2478 * aoutx.h (NAME(aout,machine_type)): Add cases for
2479 bfd_mach_mips5 and bfd_mach_mips64.
2480 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2481 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2482 * cpu_mips.c (I_mips5, I_mips64): New definitions.
2483 (arch_info_struct): Add entries for bfd_mach_mips5 and
2485 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2486 _bfd_mips_elf_print_private_bfd_data): Add cases for
2487 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2488 (_bfd_mips_elf_final_write_processing): Add cases for
2489 bfd_mach_mips5 and bfd_mach_mips64.
2491 * aoutx.h (NAME(aout,machine_type)): Add a
2492 bfd_mach_mips_sb1 case.
2493 * archures.c (bfd_mach_mips_sb1): New constant.
2494 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2495 * cpu-mips.c (I_sb1): New constant.
2496 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2497 * elf32-mips.c (elf_mips_mach): Add case for
2499 (_bfd_mips_elf_final_write_processing): Add case for
2504 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2505 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2506 (sparc*-*-rtems*): Switched from a.out to ELF.
2510 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2511 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2512 (elf64-x86-64.lo): Add dependencies.
2513 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2514 bfd_mach_x86_64_intel_syntax.
2515 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2516 * config.bfd (x86_64): Add.
2517 * configure.in: Add support for bfd_elf64_x86_64_vec.
2518 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2519 (bfd_i386_arch, i8086_ar): Link in.
2520 * elf64-x86-64.c: New file.
2521 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2522 * targets.c (bfd_elf64_x86_64_vec): Add.
2523 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2527 * xcofflink.c: Fix formatting.
2531 * aoutx.h: Fix formatting.
2532 * bfd-in.h: Likewise.
2533 * bfd-in2.h: Likewise.
2534 * cache.c: Likewise.
2535 * cisco-core.c: Likewise.
2536 * coff64-rs6000.c: Likewise.
2537 * coffcode.h: Likewise.
2538 * coffswap.h: Likewise.
2539 * corefile.c: Likewise.
2540 * elf32-mips.c: Likewise.
2544 * aout-adobe.c: Fix formatting.
2545 * coff64-rs6000.c: Likewise.
2546 * coffgen.c: Likewise.
2547 * cofflink.c: Likewise.
2551 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2552 (obj_coff_strings_written): New accessor macro for above.
2553 * libcoff.h: Regenerate.
2554 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2556 * coffcode.h (coff_write_object_contents): No need to write out
2557 the string table if it's already been done.
2561 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2562 weak undefined symbols.
2566 * archures.c (bfd_mach_arm_5TE): Define.
2567 (bfd_mach_arm+XScale): Define.
2568 * bfd-in2.h: Regenerate.
2570 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2571 BFD_RELOC_ARM_PCREL_BLX.
2573 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2574 XScale machine numbers.
2576 * config.bfd (xscale-elf): Add target.
2577 (xscale-coff): Add target.
2579 * cpu-arm.c: Add xscale machine name.
2580 Add v5t, v5te and XScale machine numbers.
2584 * aix386-core.c: Fix formatting.
2588 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2589 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2590 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2591 (ins_imms_scaled): Initialize sign_bit at function entry.
2592 (elf64_ia64_operands): Add missing initializers.
2593 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2594 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2595 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2596 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2597 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2599 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2600 and free_extsyms at function entry.
2601 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2602 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2603 (get_got): Delete unused local srel.
2604 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2605 (elfNN_ia64_relocate_section): Delete unused local dynindx.
2609 * coff-a29k.c: Fix formatting.
2610 * coff-h8500.c: Likewise.
2611 * coff-i960.c: Likewise.
2612 * coff-ppc.c: Likewise.
2613 * coff-rs6000.c: Likewise.
2614 * coff-stgo32.c: Likewise.
2615 * coff-tic54x.c: Likewise.
2616 * coff-w65.c: Likewise.
2617 * cpu-h8500.c: Likewise.
2618 * cpu-hppa.c: Likewise.
2619 * cpu-ns32k.c: Likewise.
2620 * ecoff.c: Likewise.
2621 * ecofflink.c: Likewise.
2625 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2626 remove possibility of infinite loop.
2630 * aix386-core.c: Fix formatting.
2631 * aout-adobe.c: Likewise.
2632 * aout-arm.c: Likewise.
2633 * aout-encap.c: Likewise.
2634 * aout-ns32k.c: Likewise.
2635 * aout-target.h: Likewise.
2636 * aout-tic30.c: Likewise.
2637 * aoutf1.h: Likewise.
2638 * aoutx.h: Likewise.
2639 * archive.c: Likewise.
2640 * bfd-in.h: Likewise.
2641 * bfd-in2.h: Likewise.
2647 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2648 pltoff entries for DT_INIT and DT_FINI.
2649 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2650 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2655 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2656 (allocate_dynrel_entries): Likewise.
2657 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
2658 (set_pltoff_entry): Likewise.
2659 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2660 (elfNN_ia64_reloc_type_lookup): Likewise.
2661 (elfNN_ia64_install_value): Likewise.
2662 (elfNN_ia64_relocate_section): Likewise.
2663 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2664 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2668 * cpu-a29k.c: Fix formatting.
2669 * cpu-alpha.c: Likewise.
2670 * cpu-arm.c: Likewise.
2671 * cpu-avr.c: Likewise.
2672 * cpu-d10v.c: Likewise.
2673 * cpu-h8500.c: Likewise.
2674 * cpu-hppa.c: Likewise.
2675 * cpu-i370.c: Likewise.
2676 * cpu-i386.c: Likewise.
2677 * cpu-i960.c: Likewise.
2678 * cpu-ia64-opc.c: Likewise.
2679 * cpu-ia64.c: Likewise.
2680 * cpu-m32r.c: Likewise.
2681 * cpu-m68hc11.c: Likewise.
2682 * cpu-m68hc12.c: Likewise.
2683 * cpu-m68k.c: Likewise.
2684 * cpu-m88k.c: Likewise.
2685 * cpu-mips.c: Likewise.
2686 * cpu-ns32k.c: Likewise.
2687 * cpu-pj.c: Likewise.
2688 * cpu-powerpc.c: Likewise.
2689 * cpu-sh.c: Likewise.
2690 * cpu-sparc.c: Likewise.
2691 * cpu-tic54x.c: Likewise.
2692 * cpu-v850.c: Likewise.
2693 * cpu-vax.c: Likewise.
2694 * cpu-w65.c: Likewise.
2695 * cpu-we32k.c: Likewise.
2696 * cpu-z8k.c: Likewise.
2697 * dwarf1.c: Likewise.
2698 * dwarf2.c: Likewise.
2702 * coff-arm.c: Fix formatting.
2703 * coff-ppc.c: Likewise.
2704 * coff-rs6000.c: Likewise.
2705 * coff-sh.c: Likewise.
2706 * coff-sparc.c: Likewise.
2707 * coff-tic30.c: Likewise.
2708 * coff-tic54x.c: Likewise.
2709 * coff-tic80.c: Likewise.
2710 * coff-w65.c: Likewise.
2711 * coff-we32k.c: Likewise.
2712 * coff-z8k.c: Likewise.
2716 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2717 section with the same ALLOC|LOAD flags as the source section.
2721 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2722 by STO_ALPHA constants.
2726 * coff-pmac.c: Fix formatting.
2727 * coff-ppc.c: Likewise.
2731 * elflink.h (elf_link_add_object_symbols): Also add indirect
2732 symbols for common symbols with the default version.
2736 * section.c (STD_SECTION): Set gc_mark flag.
2740 * coff-i960.c: Likewise.
2741 * coff-m68k.c: Likewise.
2742 * coff-m88k.c: Likewise.
2743 * coff-mcore.c: Likewise.
2744 * coff-mips.c: Likewise.
2748 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2752 * coff-h8300.c: Fix formatting.
2753 * coff-h8500.c: Likewise.
2754 * coff-i386.c: Likewise.
2755 * coff-i860.c: Likewise.
2756 * coff-i960.c: Likewise.
2757 * coff-ia64.c: Likewise.
2761 * archive.c: Fix formatting.
2762 * archures.c: Likewise.
2766 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2767 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
2768 * section.c (bfd_set_section_contents): Call memcpy if
2769 section->contents set and location not equal to contents plus offset.
2773 * bfd-in.h: Fix formatting.
2774 * bfd-in2.h: Likewise.
2776 * binary.c: Likewise.
2778 * coff-a29k.c: Likewise.
2779 * coff-alpha.c: Likewise.
2780 * coff-apollo.c: Likewise.
2781 * coff-aux.c: Likewise.
2785 * aix386-core.c: Fix formatting.
2786 * aoutf1.h: Likewise.
2787 * aoutx.h: Likewise.
2788 * archures.c: Likewise.
2789 * armnetbsd.c: Likewise.
2793 * coff-h8300.c (special): Adjust reloc address.
2797 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
2798 to differentiate elf32 and elf64 on ia64.
2799 * bfd-in2.h: Regenerate.
2800 * config.bfd: Add target for "ia64*-*-hpux*".
2801 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
2802 * configure: Regenerate.
2803 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
2804 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
2806 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
2807 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
2808 * Makefile.in: Regnerate.
2809 * elf64-ia64.c: Deleted.
2810 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2814 * aout-adobe.c: Fix formatting.
2815 * aout-arm.c: Likewise.
2816 * aout-cris.c: Likewise.
2817 * aout-encap.c: Likewise.
2818 * aout-ns32k.c: Likewise.
2819 * aout-target.h: Likewise.
2820 * aout-tic30.c: Likewise.
2824 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2825 BFDs containing no sections to be merged, regardless of their flags.
2829 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2830 if a relocation for an undefined symbol also results in an
2835 * config.bfd: Add support for Sun Chorus.
2839 * configure.in: Recognize alpha-*-freebsd*.
2840 * configure: Regenerate.
2844 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2845 (Chunk): New global variable set by a parameter in objcopy.c.
2846 (S3Forced): New global variable set by a parameter in
2848 (srec_set_section_contents): If S3Forced is true, always generate
2850 (srec_write_section): Use 'Chunk' to limit maximum length of S
2855 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2856 * Makefile.in: Regenerate.
2857 * bfd-in2.h: Regenerate.
2858 * po/bfd.pot: Regenerate.
2862 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2863 EF_SOFT_FLOAT if it is defined.
2867 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2868 attempts to mix PIC code with non-PIC, just mark the output as
2869 being position dependent.
2870 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
2871 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
2872 all mismatches, not just the first one.
2876 * ieee.c (ieee_archive_p): Plug one of many possible
2877 memory leaks in error handling.
2881 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2882 elf32_sparc_object_p, elf32_sparc_final_write_processing):
2884 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2885 sparc64_elf_object_p): Support v9b.
2886 * archures.c: Declare v8plusb and v9b machines.
2888 * cpu-sparc.c: Ditto.
2892 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2895 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2896 (SYMBOL_CALLS_LOCAL): New macro.
2897 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2898 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2899 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2900 (ppc_elf_relocate_section): Use flag variable to determine
2901 whether the relocation refers to a local symbol.
2902 Test whether a PLTREL24 reloc will produce a reloc by looking
2903 to see whether a PLT entry was made.
2907 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
2908 entries that could serve as a definition for a weak symbol.
2914 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
2915 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
2916 against local symbols.
2917 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2921 * section.c (struct sec): Add kept_section.
2922 (struct bfd_comdat_info): Remove sec, we can use above.
2923 (STD_SECTION): Add initializer.
2924 (bfd_make_section_anyway): Init here too.
2926 * bfd-in2.h: Regenerate.
2928 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
2930 (elf_link_input_bfd): Set all asection->symbol->value's here, and
2931 fudge values for discarded link-once section symbols.
2933 * elf64-hppa.c: Include alloca-conf.h
2937 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
2939 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
2943 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
2947 * section.c (bfd_make_section_anyway): Release newsect ptr when
2948 newsect->symbol fails to alloc. Use bfd_release instead of free.
2952 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
2953 (elf64_ia64_unwind_entry_compare): New.
2954 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2958 * elflink.h (size_dynamic_sections): Don't create various tags if
2959 .dynstr is excluded from the link. Don't set first dynsym entry
2960 if dynsymcount is zero.
2961 (elf_bfd_final_link): Don't try to swap out dynamic syms if
2962 .dynsym excluded from the link. Don't try to write any dynamic
2963 sections excluded from the link.
2965 * elf.c (swap_out_syms): Handle global section symbols.
2969 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
2970 * coffcode.h (coff_set_alignment_hook): read extended reloc count
2971 (coff_write_relocs): write extended reloc count
2972 (coff_write_object_contents): account for extended relocs
2976 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
2978 * elf.c (_bfd_elf_make_section_from_shdr): Call the
2979 elf_backend_section_flags function.
2980 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
2982 (elf64_ia64_section_flags): New function containing flag conversion
2984 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
2985 * elfxx-target.h (elf_backend_section_flags): Define.
2986 (elfNN_bed): Initialize elf_backend_section_flags field.
2990 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
2991 _bfd_elf32_gc_record_vtable. Correct a comment.
2997 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
2998 produces binaries with got[1] = 0x80000001 to differenciate them
2999 for the dynamic linker from the broken binaries produced by old
3004 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
3005 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
3006 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
3007 * configure: Regenerate.
3011 Define two bfd_targets for absence and presence of leading
3012 underscore on symbols. Make sure to only link same kind.
3013 * elf32-cris.c (cris_elf_object_p,
3014 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
3015 cris_elf_merge_private_bfd_data): New.
3016 (elf_backend_object_p, elf_backend_final_write_processing,
3017 bfd_elf32_bfd_print_private_bfd_data,
3018 bfd_elf32_bfd_merge_private_bfd_data): Define.
3019 <Target vector definition>: Include elf32-target.h twice with
3020 different macro settings:
3021 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
3022 bfd_elf32_us_cris_vec.
3023 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
3024 (elf_symbol_leading_char): First as 0, then '_'.
3025 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
3026 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
3027 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
3028 * configure: Regenerate.
3029 * targets.c: Declare bfd_elf32_us_cris_vec.
3030 * po/bfd.pot: Regenerate.
3034 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
3035 R_ARM_THM_PC22 relocations.
3039 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
3043 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
3044 is has the SEC_HAS_CONTENTS flag set.
3049 * aout-cris.c (N_TXTADDR): Define.
3053 * som.c: Include alloca-conf.h.
3054 * Makefile.am: "make dep-am"
3055 * Makefile.in: Regenerate.
3059 * elf32-hppa.c (plt_stub): New.
3060 (PLT_STUB_ENTRY): Define.
3061 (elf32_hppa_link_hash_table): Change multi_subspace to packed
3062 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
3063 (elf32_hppa_link_hash_table_create): Init to suit.
3064 (elf32_hppa_check_relocs): Set has_12bit_branch and
3065 has_17bit_branch as appropriate.
3066 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
3067 non-local functions.
3068 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
3069 Add space for plt_stub as needed.
3070 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
3071 functions at plt_stub.
3072 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
3073 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
3075 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
3076 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
3077 of fixed size, and if negative, disable handling of input sections
3078 before stub section. Set up default stub group size depending
3079 on detected branch relocs.
3080 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
3081 ensure different offsets from sym_value aren't rounded to
3082 different 2k blocks. Use lrsel and rrsel for other stubs too for
3083 consistency rather than necessity.
3084 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
3085 (final_link_relocate): Likewise.
3086 (elf32_hppa_relocate_section): Likewise.
3088 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
3089 (_bfd_elf_hppa_gen_reloc_type): Generate them.
3090 (elf_hppa_final_link_relocate): Handle them.
3091 (elf_hppa_relocate_insn): Likewise.
3092 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
3096 * elfcode.h (elf_object_p): Preserve and clear abfd section
3097 information. Restore at error.
3101 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
3102 is empty, make sure that its rva also 0. NT loader dislikes
3107 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
3112 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
3113 currently unused RELATIVE_DYNAMIC_RELOCS code.
3114 (hppa_discard_copies): Likewise.
3115 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
3116 comments. Don't check non-code output sections for stub grouping.
3120 * section.c (bfd_get_unique_section_name): Return NULL if
3125 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
3126 instruction sequence to actually work.
3127 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
3132 * elf32-sh.c (sh_elf_relocate_section): Use
3133 _bfd_final_link_relocate to apply the relocation against a section
3134 symbol, when doing relocatable links.
3138 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
3140 (stub_hash_newfunc): Here too.
3141 (hppa_add_stub): And here.
3142 (elf32_hppa_link_hash_table): Remove stub_section_created,
3143 reloc_section_created, first_init_sec and first_fini_sec. Add
3145 (elf32_hppa_link_hash_table_create): Init to suit.
3146 (hppa_get_stub_entry): Add support for grouping stub sections.
3147 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
3148 section code. Index stub vars by section->id.
3149 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
3150 exit paths. Zap allocation of above removed vars. Refine
3153 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
3154 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3155 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
3156 rather than pointer to bfd_link_info.
3157 (hppa_add_stub): Likewise.
3158 (final_link_relocate): Likewise.
3162 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
3167 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
3168 ld/emulparams/shelf.sh.
3172 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
3173 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
3174 * bfd-in2.h: Regenerate.
3178 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
3179 LITUSE relocations incorrectly if -relax is specified on the ld
3180 command line and the displacement field of the load or store
3185 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
3186 first_fini_sec here.
3187 (elf32_hppa_size_stubs): Instead correctly find the first .init
3188 and .fini section here.
3192 * elf32-hppa.c (clobber_millicode_symbols): New function.
3193 (elf32_hppa_size_dynamic_sections): Call it.
3197 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
3198 packed. Add plabel, plt_abs packed booleans.
3199 (hppa_link_hash_newfunc): Init new fields.
3200 (PLABEL_PLT_ENTRY_SIZE): Define.
3201 (hppa_stub_name): Use size_t len vars.
3202 (hppa_add_stub): Likewise.
3203 (elf32_hppa_build_stubs): Likewise.
3204 (hppa_build_one_stub): Kill some compiler warnings.
3205 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
3206 if dynamic linking. Munge the local plt offsets into
3207 local_got_refcounts. Set h->plabel for all global PLABELs. Use
3208 size_t len vars. Add assert for plabel addend.
3209 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
3210 (elf32_hppa_hide_symbol): New function.
3211 (elf_backend_hide_symbol): Define.
3212 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
3213 with h->plabel set. Don't make plt entries to have dynamic syms
3214 when they have been forced local. If plt entry is used by a
3215 plabel, make it PLABEL_PLT_ENTRY_SIZE.
3216 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
3217 Set up .plt offsets for local syms.
3218 (elf32_hppa_relocate_section): Initialise plt entries for local
3219 syms. Leave weak undefined plabels zero. Make global plabel
3220 relocs against function symbol, and leave the addend zero.
3221 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
3222 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
3223 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
3224 relocs instead of SEGREL32 for dynamic got relocs.
3225 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
3226 (elf_backend_got_header_size): Adjust.
3227 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
3229 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
3230 (hppa_type_of_stub): Use it instead of #if 0
3231 (hppa_discard_copies): Use it here too.
3232 (elf32_hppa_size_dynamic_sections): And here.
3234 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
3235 (elf32_hppa_link_hash_table_create): And here.
3236 (hppa_build_one_stub): And here. Instead keep track of stub
3237 offset using _raw_size.
3238 (elf32_hppa_size_stubs): Likewise.
3239 (elf32_hppa_build_stubs): Likewise.
3240 (hppa_size_one_stub): Likewise. Resize reloc section too.
3242 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
3243 first_fini_sec handling. Don't search for reloc section or set
3244 hplink->reloc_section_created here.
3245 (elf32_hppa_size_stubs): Instead search for reloc sections, and
3246 set reloc_section_created here.
3247 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
3248 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
3250 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
3252 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
3253 with `hplink->root.'.
3254 (elf32_hppa_check_relocs): Likewise.
3255 (elf32_hppa_gc_sweep_hook): Likewise.
3256 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3257 (hppa_handle_PIC_calls): Likewise.
3258 (elf32_hppa_size_dynamic_sections): Likewise.
3259 (elf32_hppa_set_gp): Likewise.
3260 (elf32_hppa_relocate_section): Likewise.
3261 (elf32_hppa_finish_dynamic_symbol): Likewise.
3262 (elf32_hppa_finish_dynamic_sections): Likewise.
3265 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
3266 defined weak symbols in shared links.
3267 (final_link_relocate): Calls to defined weak symbols in shared
3268 objects must go via import stubs, as the target might not be known
3273 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
3274 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
3275 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
3276 the original entries with EMPTY_HOWTOs, and added new ones to fill
3278 (sh_elf_info_to_howto): Make sure the new gap isn't used.
3279 (sh_elf_relocate_section): Likewise.
3283 * cpu-mips.c (arch_info_struct): Add mips:4K
3284 * bfd-in2.h (bfd_mach_mips4K): New define.
3285 * archures.c: Add bfd_mach_mips4K to comment.
3286 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
3287 E_MIPS_ARCH_2 for bfd_mach_mips4K.
3291 * som.c (som_write_symbol_strings): Do not used fixed buffers,
3292 use size_t as a counter.
3293 (som_write_space_strings): Similarly.
3297 * elf32-i860.c (elf32_i860_relocate_pc26): New function
3299 (elf32_i860_relocate_section): Invoke new function from here.
3303 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
3308 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
3309 target section name instead of dumping core when the target symbol is
3314 * riscix.c: Remove DEFUN.
3318 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3319 initialise flags in output bfd if the input bfd is the default
3320 architecture with the default flags.
3324 * archive.c: Fix formatting.
3325 * coff-arm.c: Likewise.
3326 * doc/chew.c: Likewise.
3330 * section.c (bfd_get_unique_section_name): Put a dot before the
3335 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3336 * elf.c: Fix formatting.
3340 * config.bfd (sh-*-linux*): Added.
3341 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3342 * targets.c: Declare them.
3343 * elf32-sh-lin.c: New file.
3344 * Makefile.am: Compile it.
3345 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3346 * configure, Makefile.in: Rebuilt.
3350 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3351 pseduo-section when determining where the TOC ends.
3353 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3354 output x_tvndx as it is only two bytes wide.
3356 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3357 reloc is 26 or 32 bits wide.
3359 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3360 for relocs that don't change anything. Also look at the full
3365 * config.bfd (arm*-*-uclinux*): New target.
3369 * configure: Rebuilt with new libtool.m4.
3373 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3374 word for variable name.
3375 * bfd-in2.h: Regenerate.
3379 * config.in: Regenerate.
3380 * libbfd.h: Regenerate.
3381 * po/bfd.pot: Regenerate.
3382 * doc/bfdint.texi: Remove CVS date string - it foils compares with
3387 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
3391 Shared library and PIC support.
3392 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3393 (GOT_ENTRY_SIZE): New.
3394 (ELF_DYNAMIC_INTERPRETER): New.
3395 (STUB_SUFFIX): Define.
3396 (LONG_BRANCH_PIC_IN_SHLIB): Define.
3397 (RELATIVE_DYNAMIC_RELOCS): Define.
3398 (enum elf32_hppa_stub_type): New.
3399 (struct elf32_hppa_stub_hash_entry): Rename offset to
3400 stub_offset. Add a number of new fields.
3401 (struct elf32_hppa_link_hash_entry): New.
3402 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
3404 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3405 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3406 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
3408 (hppa_link_hash_newfunc): New function.
3409 (elf32_hppa_link_hash_table_create): Use above function. Init new
3411 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
3412 instead of addend, and remove sym_name from args. Don't use
3413 symbol name for local syms, instead use sym index.
3414 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3415 stub type rather than size. Pass in hash and handle import stub
3416 case. Also pass in reloc instead of offset so we can calculate
3417 PCREL22F and PCREL12F branches properly.
3418 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
3419 import and export stubs too.
3420 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
3421 import and export stub sizing.
3422 (elf32_hppa_check_relocs): New function.
3423 (elf32_hppa_adjust_dynamic_symbol): New function.
3424 (hppa_discard_copies): New function.
3425 (elf32_hppa_size_dynamic_sections): New function.
3426 (elf_backend_size_dynamic_sections): Define.
3427 (elf32_hppa_finish_dynamic_symbol): New function.
3428 (elf_backend_finish_dynamic_symbol): Define.
3429 (elf32_hppa_size_stubs): Stash params in link hash table, and move
3430 some local vars into the link hash table too. For shared links,
3431 trundle over function syms, generating export stubs. Handle
3432 PCREL22F branches. Break out stub creation code from here..
3433 (hppa_add_stub): .. to here. New function.
3434 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3435 call the bfd linker. Use elf_gp to record global pointer.
3436 Calculate a value from sections if $global$ is missing.
3437 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3438 (elf32_hppa_gc_mark_hook): New function.
3439 (elf_backend_gc_mark_hook): Define.
3440 (elf32_hppa_gc_sweep_hook): New function.
3441 (elf_backend_gc_sweep_hook): Define.
3442 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3443 Add rel to args, and remove howto, input_bfd, offset, addend,
3444 sym_name as we can recalculate these locally. Handle calls to
3445 dynamic objects, extra PIC relocs, PCREL22F branches. Change
3446 handling of undefined weak syms. Check that stubs are in range.
3447 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
3448 message on hitting a DPREL21L reloc that needs fixing. Subtract
3449 off PC for PCREL14F. Break out code that does a stub lookup from
3451 (hppa_get_stub_entry): ..to here. New function.
3452 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3453 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3455 (elf32_hppa_finish_dynamic_sections): New function.
3456 (elf_backend_finish_dynamic_sections): Define.
3457 (elf_backend_final_write_processing) Define.
3458 (hppa_handle_PIC_calls): New function.
3459 (elf32_hppa_build_stubs): Call it. Pass link_info to
3460 hppa_build_one_stub.
3461 (elf32_hppa_create_dynamic_sections): New function
3462 to create .plt and .got then set .plt flags correctly.
3463 (elf_backend_create_dynamic_sections): Define.
3464 (elf32_hppa_object_p): New function.
3465 (elf_backend_object_p): Define.
3466 (elf32_hppa_elf_get_symbol_type): New function.
3467 (elf_backend_get_symbol_type): Define.
3468 (elf_backend_can_gc_sections): Define.
3469 (elf_backend_want_got_plt): Define.
3470 (elf_backend_plt_alignment): Set to 2.
3471 (elf_backend_plt_readonly): Define.
3472 (elf_backend_want_plt_sym): Define.
3473 (elf_backend_got_header_size): Reserve one entry.
3475 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3476 (elf32_hppa_size_stubs): Pass in multi_subspace.
3477 (elf32_hppa_set_gp): Declare.
3479 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3480 (bfd_get_unique_section_name): New function.
3481 * bfd-in2.h: Regenerate.
3483 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3484 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3488 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3489 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3490 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3491 been updated in finish_dynamic_symbol before modifying function
3494 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3495 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
3496 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3497 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
3498 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
3499 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3500 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
3501 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3504 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3505 style of local labels as well.
3509 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3510 references to undefined symbols in debugging sections.
3514 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3515 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3516 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3521 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3522 (elf32_i860_is_local_label_name): New function and prototype.
3526 * configure.in: Increase version number to 2.10.91.
3527 * configure: Regenerate.
3528 * aclocal.m4: Regenerate.
3529 * config.in: Regenerate.
3530 * po/bfd.pot: Regenerate.
3534 * elf.c (_bfd_elf_make_section_from_shdr): Add
3535 .gnu.linkobce.wi. to the list of debug section names.
3539 * dwarf2.c (find_debug_info): New function: Locate a section
3540 containing dwarf2 debug information.
3541 (bfd_dwarf2_find_nearest_line): Find all sections containing
3542 debug information and include them in the stash.
3546 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3547 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3548 (sh_reloc_map): Add new relocs.
3549 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3550 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3551 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3552 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3554 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3555 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3556 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3557 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3558 New array constants.
3559 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3561 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3562 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3563 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3564 elf_sh_plt_reloc_offset): Define.
3565 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3566 elf_sh_link_hash_table): New structs.
3567 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3568 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3570 (elf_backend_create_dynamic_sections,
3571 bfd_elf32_bfd_link_hash_table_create,
3572 elf_backend_adjust_dynamic_symbol,
3573 elf_backend_size_dynamic_sections,
3574 elf_backend_finish_dynamic_symbol,
3575 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3576 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3577 elf_backend_got_header_size, elf_backend_plt_header_size):
3579 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3580 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3582 * bfd-in2.h, libbfd.h: Rebuilt.
3586 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3591 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3592 not initialized, set them to indicate the SH1 instruction set.
3596 * acinclude.m4: Include libtool and gettext macros from the
3598 * aclocal.m4, configure: Rebuilt.
3602 * elf.c: Eliminate references to __sparcv9 macro; replace with
3603 autoconf variables HAVE_PSINFO32_T etc.
3604 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3605 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3607 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3608 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3609 * aclocal.m4: Ditto.
3610 * configure: Regenerate.
3614 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3615 for any shared link, not just shared -Bsymbolic.
3616 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3617 any shared link, and pass link info to it.
3618 (elf_i386_size_dynamic_sections): Update comment.
3619 (elf_i386_discard_copies): Modify to discard relocs for symbols
3620 that have been forced local.
3621 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3622 that have been forced local.
3626 * elflink.h (elf_link_add_object_symbols): Allow common
3627 symbols to have an alignment of 1 if explicitly requested, and
3628 not overridden by other definitions.
3632 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3633 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3637 * elf-bfd.h (elf_link_hash_table): Add runpath.
3639 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3640 * bfd-in2.h: Rebuilt.
3642 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3643 "runpath" field to NULL.
3644 (bfd_elf_get_runpath_list): New function.
3646 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3651 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3652 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3653 explicitly. Improve validation of r_type.
3657 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3658 dynamic allocated content space. Add a comment to remind us that
3659 one day this ought to be fixed.
3660 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3661 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3662 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3666 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3667 field with the newly relocated value instead of adding it to the
3668 existing immediate field.
3669 (elf32_i860_relocate_splitn): Likewise.
3670 (elf32_i860_relocate_highadj): Likewise.
3674 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3675 was previously just a stub).
3679 * elflink.c (_bfd_elf_create_got_section): Don't abort().
3681 (_bfd_elf_create_dynamic_sections): Likewise.
3685 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3686 for undefined symbols to be the beginning of the section.
3688 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3689 four extra entries at the beginning of the .rela.plt section.
3690 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3691 section to account for the four reserved entries in the .plt section.
3695 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3696 to the list of NOPs we recognize after a branch-and-link.
3697 Use the ori NOP when one is needed.
3699 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3704 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3705 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3706 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
3711 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3715 * elf32-i860.c (elf32_i860_relocate_section): New function.
3716 (i860_final_link_relocate): New function.
3717 (elf32_i860_relocate_splitn): New function.
3718 (elf32_i860_relocate_pc16): New function.
3719 (elf32_i860_relocate_highadj): New function.
3720 (elf32_i860_howto): Minor adjustments to some relocations.
3721 (elf_info_to_howto_rel): Define.
3722 (elf_backend_relocate_section): Define.
3726 * elf32-arm.h: Fix formatting.
3730 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3734 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3738 * ieee.c (ieee_write_debug_part): Rewrite a comment.
3739 * elf64-ia64.c: Fix a typo.
3743 * elf32-i860.c (elf32_i860_howto_table): New structure.
3744 (lookup_howto): New function.
3745 (elf32_i860_reloc_type_lookup): New function.
3746 (elf32_i860_info_to_howto_rela): New function.
3747 (elf_code_to_howto_index): New structure.
3748 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3749 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3750 elf32_i860_reloc_type_lookup.
3754 * som.c (struct fixup_format): Constify `format'.
3755 (som_hppa_howto_table): Use SOM_HOWTO macro.
3756 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3757 (som_bfd_reloc_type_lookup): Likewise.
3758 (compare_subspaces): Remove unused `count1', `count2'.
3759 (som_begin_writing): Remove unused `total_reloc_size'.
3760 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3761 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3762 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3763 (som_find_nearest_line): Decorate unused parameter(s).
3764 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3765 (som_bfd_link_split_section): Likewise.
3769 * section.c: Restore backed out code.
3770 * elf.c: Restore backed out code.
3771 (copy_private_bfd_data): Fix bug preventing stipped dynamic
3772 binaries from working.
3773 * bfd-in2.h: Regenerate.
3777 * section.c: Back out the change made by Nick Clifton
3780 * bfd-in2.h: Likewise.
3785 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
3789 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
3790 * bfd-in2.h, libbfd.h: Regenerate.
3794 * section.c (struct sec): Add new boolean field 'segment_mark'.
3795 (STD_SECTION): Initialise new field to zero.
3797 * bfd-in2.h: Regenerate.
3799 * elf.c (copy_private_bfd_data): Reorganise section to segment
3800 mapping to cope with moved sections requiring new segments,
3801 and overlapping segments.
3802 (SEGMENT_END): New macro: Return the end address of a segment.
3803 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
3804 contains a section by comparing their VMA addresses.
3805 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
3806 contains a section by comparing their LMA addresses.
3807 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
3808 section should be included in a segment.
3809 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
3810 follows another in memory.
3811 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3816 * cpu-i860.c: Added comments.
3818 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3819 bfd_elf32_i860_little_vec.
3820 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3821 (ELF_MAXPAGESIZE): Changed to 4096.
3823 * targets.c (bfd_elf32_i860_little_vec): Declaration of
3825 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3827 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3828 config for little endian elf32 i860.
3829 (targ_defvec): Define for the new config above
3830 as "bfd_elf32_i860_little_vec".
3831 (targ_selvecs): Define for the new config above
3832 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3834 * configure.in (bfd_elf32_i860_little_vec): Added recognition
3837 * configure: Regenerated.
3841 * elflink.h (elf_merge_symbol): Take one more argument,
3842 dt_needed, to indicate if the symbol comes from a DT_NEEDED
3843 entry. Don't overide the existing weak definition if dt_needed
3845 (elf_link_add_object_symbols): Pass dt_needed to
3846 elf_merge_symbol ().
3850 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3855 * configure.host (*-*-aix*): AIX has 'long long' always.
3857 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3858 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3859 (xcoff_write_archive_contents_big): Don't update the offset
3860 of the symbol table, xcoff_write_armap will do it.
3864 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3865 of dynobj for SGI_COMPAT checks.
3869 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3870 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3871 * bfd-in2.h: Regenerate.
3875 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3876 range symbol indices in relocs and issue an error message.
3880 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3881 info->new_dtags when setting DT_FLAGS_1. It will only be set
3882 by the new linker options. It shouldn't break anything.
3886 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3887 only if info->new_dtags is true.
3891 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3892 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3896 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3897 (ALL_MACHINES_CFILES): Add cpu-cris.c.
3898 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3899 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3900 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3901 * Makefile.in: Rebuild.
3902 * aclocal.m4: Rebuild.
3903 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
3904 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
3905 (bfd_cris_arch): Declare.
3906 (bfd_archures_list): Add bfd_cris_arch.
3907 * bfd-in2.h: Rebuild.
3908 * config.bfd: (cris-*-*): New target.
3909 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
3910 * configure: Rebuild.
3911 * elf.c (prep_headers): Add bfd_arch_cris.
3912 * libbfd.h: Rebuild.
3913 * libaout.h (enum machine_type): Add M_CRIS.
3914 * reloc.c: Add CRIS relocations.
3915 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
3916 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
3917 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
3918 * po/POTFILES.in, po/bfd.pot: Regenerate.
3922 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
3923 DF_TEXTREL if DT_TEXTREL is set.
3924 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3925 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3926 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3927 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
3928 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3929 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3930 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3931 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3932 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
3933 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
3935 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
3936 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
3938 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
3942 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
3943 * bfd-in2.h: Rebuild.
3945 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
3946 (elf_dt_soname): New.
3948 * elf.c (bfd_elf_set_dt_needed_soname): New.
3950 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
3951 entry if the shared object loaded by DT_NEEDED is used to
3952 resolve the reference in a regular object.
3956 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
3957 DT_DEPAUDIT and DT_AUDIT as strings.
3961 * format.c: Fix formatting.
3965 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
3969 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
3970 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
3971 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
3972 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
3973 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
3974 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
3975 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
3979 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
3980 renamed functions from here...
3981 (assign_section_numbers): Use renamed functions.
3982 (prep_headers): Use renamed functions.
3984 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
3985 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
3986 * bfd-in2.h: Regenerate.
3990 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
3991 parenthesis in if statement.
3995 Enable the support for Traditional MIPS.
3996 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
3997 return ict_none appropriately for traditional mips targets.
3998 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
3999 (STUB_MOVE): Conditionalize for traditonal mips.
4000 (STUB_LI16): Likewise.
4001 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
4002 room for RTPROC header.
4003 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
4004 the permission for the PT_DYNAMIC as read, write and execute.
4005 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
4006 for traditonal mips.
4007 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
4008 _DYNAMIC_LINKING for traditonal mips.
4009 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
4010 in case of traditonal mips.
4011 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
4012 entry is required. For a function if PLT is not required then set the
4013 corresponding hash table entry to 0.
4014 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
4016 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
4017 shared object set the value to 0.
4018 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
4019 _DYNAMIC_LINKING for traditonal mips.
4020 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
4021 for traditonal mips.
4025 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
4029 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
4030 out a structure that is BFD_IN_MEMORY.
4034 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
4035 bfd pointer. Print section id instead of bfd pointer for local
4036 syms. Prefix addend with `+' for global syms as well as local.
4037 Correct calculation of name component lengths.
4038 (elf64_hppa_check_relocs): Update call to get_dyn_name.
4041 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
4042 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
4043 (elf64_hppa_modify_segment_map): Likewise.
4047 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
4048 addresses to be "naturally" sign extended. Return -1 if unknown.
4049 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
4050 * bfd-in2.h: Regenerate.
4054 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
4055 and ECOF_SIGNED_64 to list ways to extract an offset.
4056 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
4057 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
4059 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
4060 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
4064 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
4065 bfd_get_start_address.
4066 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
4067 (elf_swap_ehdr_out): Ditto.
4071 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
4072 compatibility with older binutils.
4076 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
4077 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
4080 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
4081 (parse_line_table): Ditto.
4082 (_bfd_dwarf1_find_nearest_line): Ditto.
4083 * syms.c (cmpindexentry): Remove extra `*' from params.
4087 * elf32-mips.c (sort_dynamic_relocs): New Function.
4088 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
4089 via qsort to sort the dynamic relocations in increasing r_symndx
4094 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
4095 ATTRIBUTE_UNUSED to unused args.
4096 (get_opd): Likewise.
4097 (get_plt): Likewise.
4098 (get_dlt): Likewise.
4099 (get_stub): Likewise.
4100 (elf64_hppa_adjust_dynamic_symbol): Likewise.
4101 (elf64_hppa_link_output_symbol_hook): Likewise.
4102 (elf64_hppa_check_relocs): Delete unused var.
4103 (elf64_hppa_size_dynamic_sections): Likewise.
4104 (elf64_hppa_finalize_opd): Likewise.
4105 (elf64_hppa_finalize_dynreloc): Likewise.
4106 (elf64_hppa_modify_segment_map): Likewise.
4107 (elf64_hppa_finish_dynamic_sections): Likewise.
4109 * elf-hppa.h (elf_hppa_final_write_processing): Add
4110 ATTRIBUTE_UNUSED to unused args.
4111 (elf_hppa_final_link_relocate): Likewise.
4112 (elf_hppa_record_segment_addrs): Add paretheses.
4113 (elf_hppa_relocate_section): Constify dyn_name.
4116 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
4117 rearrange case statement so that it gets preferred to 32-bit ones.
4119 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
4120 asection->id instead of address of asection structure.
4121 (elf32_hppa_size_stubs): Likewise.
4123 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
4124 for .init* and .fini*.
4126 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
4127 and addends used in stub names to 32 bits.
4128 (elf32_hppa_size_stubs): Likewise.
4130 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
4131 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
4132 not bfd_put_64. Fix minor comment typo and formatting.
4134 Changes to create multiple linker stubs, positioned immediately
4135 before the section where they are required.
4136 * elf32-hppa.c: Don't include hppa_stubs.h.
4137 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
4138 (elf32_hppa_stub_hash_table): Delete.
4139 (elf32_hppa_link_hash_entry): Delete.
4140 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
4141 stub_hash_table, and store the struct here rather than a pointer.
4142 Delete output_symbol_count. Add offset array. Change
4143 global_value to a bfd_vma.
4144 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
4145 (elf32_hppa_stub_hash_traverse): Delete.
4146 (elf32_hppa_name_of_stub): Delete.
4147 (elf32_hppa_link_hash_lookup): Delete.
4148 (elf32_hppa_link_hash_traverse): Delete.
4149 (elf32_hppa_stub_hash_table_init): Delete.
4150 (elf32_hppa_size_of_stub): Pass input section and offset rather
4151 than location and calculate location here. Don't pass name as all
4152 stubs are now the same size.
4153 (elf32_hppa_stub_hash_newfunc): Init new fields.
4154 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
4156 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
4157 comparing against ints. Rewrite stub handling code.
4158 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
4159 Case enums to int before comparing against ints. Remove
4160 bfd_reloc_dangerous case.
4161 (elf32_hppa_build_one_stub): Rewrite.
4162 (elf32_hppa_size_one_stub): New function.
4163 (elf32_hppa_build_stubs): Rewrite.
4164 (elf32_hppa_size_stubs): Pass in linker call-back functions.
4165 Rewrite stub-handling specific code.
4167 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
4169 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
4171 * hppa_stubs.h: Delete.
4172 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
4173 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
4174 * Makefile.in: Regenerate.
4176 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
4179 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
4181 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
4182 and section name for bfd_reloc_notsupported error message.
4183 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
4184 bfd_reloc_notsupported.
4185 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
4187 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
4188 undefined weak symbols for all relocs.
4189 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
4190 offsets are relative to one past the delay slot.
4191 (elf32_hppa_size_stubs): Account for reloc addend when calculating
4192 branch destination. Put addend into stub name too.
4193 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
4194 adjust by 8 when deciding whether a linker stub is needed. Put
4195 addend into stub name as for above.
4197 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
4198 various args and vars.
4199 (elf32_hppa_bfd_final_link_relocate): Here too.
4200 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
4201 inner block var to avoid shadowing.
4203 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
4205 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
4206 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
4207 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
4209 * libhppa.h: Change practically all unsigned ints to plain ints.
4210 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
4214 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
4215 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
4218 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
4219 to the new OP_* ones.
4221 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
4222 error exit. Bail out earlier on plabel relocs that we aren't
4223 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
4224 string, and then don't free our copy.
4225 (elf32_hppa_build_one_stub): Make insn unsigned int.
4227 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
4228 available with BL, not BE and BLE.
4230 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
4231 code for elf arg relocs.
4232 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
4233 argument with elf_link_hash_entry h. Handle undefined weak
4234 symbols. Move $global$ lookup from here...
4235 (elf32_hppa_relocate_section): ...to here. Return correct error
4236 message for non-handled relocs.
4237 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
4238 wrong test was -0x3ffff to +0x40000.
4240 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
4241 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
4242 Handle them as such.
4243 (elf_hppa_relocate_insn): Fix a typo.
4245 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
4246 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4247 assemble_17, assemble_21): Delete.
4248 Supply defines for all 64 possible opcodes.
4249 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
4250 formats. Handle COMICLR.
4251 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
4254 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
4255 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
4256 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
4258 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
4259 the local syms - did this code get deleted accidentally? Ignore
4260 undefined and undefweak syms.
4262 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
4263 block. Use it instead of elf64_hppa_hash_table (info).
4264 (elf_hppa_final_link_relocate): Use hppa_info instead of
4265 elf64_hppa_hash_table (info).
4267 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4268 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4269 (hppa_rebuild_insn): Mask immediate bits here instead.
4270 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4274 * section.c (struct sec): Add id field. Tidy comment formatting.
4275 (bfd_make_section_anyway): Set id.
4276 (STD_SECTION): Init id too.
4277 Change CONST to const throughout.
4278 * archures.c (bfd_arch_info): Tidy comment.
4279 (bfd_arch_list): Change a CONST to const.
4280 * libbfd-in.h: Tidy comments and replace CONST with const.
4281 * elf-bfd.h: Likewise.
4282 * libbfd.h: Regenerate.
4283 * bfd-in2.h: Regenerate.
4284 * libcoff.h: Regenerate.
4288 * archive.c (_bfd_write_archive_contents): Add an informative
4293 * srec.c: Fix formatting.
4301 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
4302 value of PC-relative offsets.
4306 * elf64-alpha.c (alpha_elf_size_info): New.
4307 (elf_backend_size_info): Define to alpha_elf_size_info.
4308 * elfcode.h (elf_size_info): Change hash bucket size to 4.
4312 * elf32-mips.c: Include elf32-target.h again for the traditional
4317 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4318 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4319 (avr_info_to_howto_rela): Likewise.
4320 (elf32_avr_gc_mark_hook): Likewise.
4321 (elf32_avr_gc_sweep_hook): Likewise.
4322 (elf32_avr_relocate_section): Likewise.
4326 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4327 an external symbol for a non-shared, non-relocatable link.
4331 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4332 is an external symbol.
4333 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4338 * reloc16.c: Fix formatting.
4342 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4343 to add a new target for traditional mips i.e
4344 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4345 * configure.in: Likewise.
4346 * configure: Rebuild.
4347 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4349 (bfd_elf32_tradlittlemips_vec): Likewise.
4350 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4351 to see that elfNN_bed does not get redefined even if the target file
4352 is included twice for a chip. See elf32-mips.c.
4356 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
4357 (CLEANFILES): Add DEPA.
4358 * Makefile.in: Regenerate.
4362 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4363 can't assume the PE header is at 0x80.
4367 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4371 * go32stub.h: Update stub.
4375 * archures.c (bfd_mach_avr5): Define.
4376 * bfd-in2.h (bfd_mach_avr5): Define.
4377 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4378 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
4379 (compatible): Update comment. Add missing test.
4380 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4381 for avr2 and avr4. Simplify 8K wrap code.
4382 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4383 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4387 * coff-h8300.c: Fix formatting.
4388 * cpu-h8300.c: Likewise.
4392 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4393 for local symbols whose names are unknown.
4397 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4399 * Makefile.in: Regenerate.
4400 * doc/Makefile.in: Regenerate.
4404 * Makefile.am: Rebuild dependency.
4405 * Makefile.in: Rebuild.
4409 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4410 (elf_backend_copy_indirect_symbol): Map to the new function.
4414 * archive.c (normalize): Correct pointer comparison when checking
4416 (bfd_bsd_truncate_arname): Likewise.
4417 (bfd_gnu_truncate_arname): Likewise.
4421 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4422 sections elf_{text,data}_{section,symbol}.
4423 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4424 (_bfd_mips_elf_hide_symbol): New function.
4425 (elf_backend_hide_symbol): Map to the new function.
4426 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4427 definitions of mips_elf_{text,data}_{section,symbol}.
4428 (mips_elf_local_relocation_p): Try to find the direct symbol
4429 based on new check_forced argument.
4430 (mips_elf_calculate_relocation): Use new version of
4431 mips_elf_local_relocation_p.
4432 (mips_elf_relocate_section): Likewise.
4433 (_bfd_mips_elf_relocate_section): Likewise.
4434 (mips_elf_sort_hash_table): Only assert that have enough GOT
4436 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4437 entry if the relocation based on the new external argument.
4438 (mips_elf_create_dynamic_relocation): Assert that we have a
4439 section contents allocated where we can swap out the dynamic
4441 (mips_elf_calculate_relocation): Find the real hash-table entry
4442 correctly by using h->root.root.type. Only create a dynamic
4443 relocation entry if the symbol is defined in a shared library.
4444 Create an external GOT entry for the GOT16 relocation if the
4445 symbol was forced local.
4446 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4447 dynamic index if the symbol was forced local.
4451 * elf32-mips.c: Fix typos in comments.
4455 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4460 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4461 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4462 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4463 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4464 (bfd_elf32_m68hc11_vec): Likewise.
4465 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4466 Supports 68hc11 & 68hc12 at the same time.
4467 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4469 (bfd_elf32_m68hc11_vec): Likewise.
4470 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4471 * archures.c (bfd_m68hc12_arch): Define and register in global list
4472 (bfd_m68hc11_arch): Likewise.
4473 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4474 BFD_RELOC_M68HC11_3B): Define.
4475 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4476 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4480 * elf_bfd.h (struct elf_backend_data): Add info argument to
4481 elf_backend_hide_symbol.
4482 (_bfd_elf_link_hash_hide_symbol): Likewise.
4483 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4484 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4485 * elflink.h (elf_link_add_object_symbols): Likewise.
4486 (elf_link_assign_sym_version): Likewise.
4490 * coff-i386.c (coff_i386_reloc): Don't return in case of
4491 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4492 Compensate PE relocations when linking with non-PE object
4493 files to generate a non-PE executable.
4497 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4498 GOT entries if we're doing a static link or -Bsymbolic link.
4502 * elflink.h (elf_link_adjust_relocs): Check for and call backend
4503 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4505 (elf_link_output_relocs): Likewise.
4506 (elf_reloc_link_order): Likewise.
4510 * archures.c (enum bfd_architecture): #define constants for
4511 PowerPc and RS6000 machine numbers.
4512 * bfd-in2.h: Regenerate.
4513 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4514 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
4515 and RS6000 machine numbers using #defined constants from
4517 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4518 machine numbers using #defined constants from archures.c. Add
4519 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
4520 64-bit words in 620 entry.
4521 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4523 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4527 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4528 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4529 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4533 * bfd-in.h (bfd_family_coff): Define.
4534 * bfd-in2.h: Regenerate.
4535 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4536 coff_find_nearest_line): Check COFFness using bfd_family_coff()
4537 instead of bfd_target_coff_flavour.
4538 * cofflink.c (_bfd_coff_final_link): Likewise.
4539 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4540 exclude XCOFF files.
4541 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4543 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4544 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4545 * xcofflink.c (XCOFF_XVECP): Delete.
4546 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4547 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4548 bfd_xcoff_record_link_assignment,
4549 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4550 check for bfd_target_xcoff_flavour.
4554 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4556 (read_hdr): New function.
4557 (rs6000coff_core_p): Store mstsave or __context64 struct instead
4558 of trying to extract individual registers. Set abfd->arch_info
4559 to match the architecture that created the core file.
4560 (rs6000coff_get_section_contents): Delete.
4561 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4565 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4570 * configure: Regenerate.
4574 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4579 * configure.in (VERSION): Update to show this is the CVS mainline.
4583 * elf32-d10v.c: Include elf/d10v.h
4584 (enum reloc_type): Delete.
4585 * elf32-d30v.c: Include elf/d30v.h
4586 (enum reloc_type): Delete.
4588 * Makefile.am: Run "make dep-am" to regenerate dependencies.
4589 * Makefile.in: Regenerate.
4591 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4592 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4593 move HOWTOs into elf_howto_table.
4594 (R_386_standard, R_386_ext_offset): Define.
4595 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4596 (elf_i386_reloc_type_lookup): Modify calculation of index into
4597 elf_howto_table since we've removed the padding.
4598 (elf_i386_info_to_howto_rel): Likewise.
4599 (elf_i386_relocate_section): Likewise.
4603 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4607 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4608 an error when seeing an undefined symbol with hidden/internal
4609 attribute. It is handled in *_relocate_section ().
4613 * elflink.h (elf_fix_symbol_flags): Follow the link for the
4614 indirect symbol for the ELF_LINK_NON_ELF bit.
4615 (elf_link_output_extsym): Don't output the indirect symbol even
4616 if the ELF_LINK_NON_ELF bit is set.
4620 * config.bfd (i[3456]86-*-netbsdelf*): New target.
4621 (i[3456]86-*-netbsdaout*): New target.
4622 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4623 (i[3456]86-*-openbsd*): Likewise.
4627 * trad-core.c: From hpux-core.c, include <dirent.h> or
4628 <sys/ndir.h> when possible.
4632 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4633 definitions. We must not assume they are sorted in the file
4634 according to their index numbers.
4638 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4639 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
4640 R_PARISC_DIR17F are for absolute branches; Handle them as such.
4644 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4645 80960CA, 80960MC as valid machine names.
4649 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4650 visibility bits if the symbol is undefined. Correctly handle
4651 weak undefined symbols with hidden and internal attributes.
4653 * elflink.h (elf_link_add_object_symbols): Always turn the
4654 symbol into local if it has the hidden or internal attribute.
4658 * ppcboot.c: Add packed attribute if compiling with GCC.
4662 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4666 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4667 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4668 corefile on a 64-bit (Sparc Solaris) host. Also clean up
4673 * Makefile.am: Update dependencies with "make dep-am"
4674 * Makefile.in: Regenerate.
4676 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4677 bindtextdomain): Replace defines with those from intl/libgettext.h
4678 to quieten gcc warnings.
4682 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4684 * archive.c (normalize, bfd_bsd_truncate_arname,
4685 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4686 file names with backslashes.
4688 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4691 * sysdep.h: Include filenames.h.
4695 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4699 * elf64-sparc.c (sparc64_elf_relax_section): New.
4700 (sparc64_elf_relocate_section): Optimize tail call into branch always
4702 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4703 (elf32_sparc_relax_section): New.
4707 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4708 Remove unusued variables.
4709 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4710 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4711 previous fix, so that shared libs really don't influence targets
4712 extension mask and memory model.
4716 * elf64-alpha.c (elf64_alpha_relocate_section): Check
4717 h->root.other not h->other.
4718 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4720 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4724 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4725 undefined symbol with the non-default visibility attributes.
4726 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4727 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4728 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4729 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4730 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4731 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4732 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4733 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4734 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4735 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4736 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4740 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4741 PCREL22, PCREL64I. Zero size of special relocs.
4742 (elf64_ia64_reloc_type_lookup): Likewise.
4743 (USE_BRL, oor_brl, oor_ip): New.
4744 (elf64_ia64_relax_section): New.
4745 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4746 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4747 (elf64_ia64_relocate_section): Likewise.
4748 (bfd_elf64_bfd_relax_section): New.
4749 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4750 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4751 * bfd-in2.h, libbfd.h: Regenerate.
4755 * configure.in : Add peigen.lo to MIPS PE targets.
4756 * configure: Regenerate.
4760 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4761 only if it is known for both input and output bfds. Separate
4762 error message strings as in some languages, it may be necessary
4763 to change more than one place in the string to change between
4766 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4767 endianess checks, call _bfd_generic_verify_endian_match() instead.
4769 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4771 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
4773 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
4774 endianess before checking bfd flavours.
4778 * elflink.h (elf_link_output_extsym): Clear the visibility
4779 field for symbols not defined locally.
4783 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4784 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4785 (hppa_rebuild_insn): Mask immediate bits here instead.
4786 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4790 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
4791 relocs for an executable, ensure that they are virtual addresses.
4795 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
4800 * elflink.h: Add emitrelocations support: when enabled, relocation
4801 information and relocation sections are put into final output
4802 executables. If the emitrelocations flag is set, do the following:
4803 (elf_bfd_final_link): Emit relocation sections.
4804 (elf_link_input_bfd): Compute relocation section contents.
4805 (elf_gc_sections): Don't clean relocation sections.
4809 * som.c (som_decode_symclass): Recognize weak symbols.
4813 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4814 read idata section only from dataoff.
4815 (pe_print_edata): Correctly check for valid eat_member.
4819 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4823 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4827 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4829 * peigen.c (pe_print_idata): Look for .idata section and print
4830 info even if data directory has zero entries. Read idata section
4831 starting from dataoff, and adjust all data offsets to suit. Cast
4832 all bfd_vma vars to unsigned long before passing to fprintf.
4833 * peigen.c (pe_print_edata): Similarly, look for .edata section
4834 and print info even if data directory has zero entries. Cast
4835 all bfd_vma vars to unsigned long before passing to fprintf.
4838 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4839 directory size which may be bogus.
4840 * peigen.c (pe_print_edata): Similarly.
4844 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4846 (copy_private_bfd_data): Allow for space possibly taken up by elf
4847 headers when calculating segment physical address from lma.
4851 * versados.c (versados_scan): Init stringlen and pass_2_done.
4853 * trad-core.c (trad_unix_core_file_p): Return
4854 bfd_error_wrong_format rather than bfd_error_file_truncated.
4856 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4857 add_data_entry. DataDirectory virtual address is relative.
4858 (pe_print_idata): Account for relative DataDirectory virtual
4859 addresses. Don't trash datasize inside POWERPC_LE_PE code.
4860 (pe_print_edata): Similarly.
4863 * peigen.c (dir_names): Add Delay Import Directory.
4864 (pe_print_idata): Always search for bfd section containing
4865 idata address rather than looking up section name. Print this
4866 section name rather than .idata.
4867 (pe_print_edata): Similarly. Also print some fields as %08lx.
4868 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4873 * xcoff.h: Rename to xcoff-target.h
4874 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4875 * coff-rs6000.c: Ditto.
4876 * coff64-rs6000.c: Ditto.
4877 * coff-pmac.c: Ditto.
4878 * Makefile.in: Regenerate.
4882 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4883 Change U802TOC64MAGIC to U803XTOCMAGIC.
4887 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4888 * bfd-in.h: Prototype bfd_elf_get_arch_size.
4889 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4893 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4897 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4898 hidden and internal symbols.
4899 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4901 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4902 assign a PLT or GOT entry to symbols with hidden and
4903 internal visibility.
4907 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
4909 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4913 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
4918 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
4919 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
4921 * Makefile.in: Regenerate.
4925 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
4926 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
4927 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
4928 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
4929 * Makefile.in: Rebuild.
4933 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
4934 doesn't work very well.
4936 * elf-hppa.h (elf_hppa_internal_shdr): Define.
4937 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
4938 Set hdr->s_type to 1 if ARCH_SIZE == 32.
4939 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
4940 (elf_hppa_info_to_howto): Likewise.
4941 (elf_hppa_info_to_howto_rel): Likewise.
4942 (elf_hppa_reloc_type_lookup): Likewise.
4943 (elf_hppa_is_local_label_name): Likewise.
4944 (elf_hppa_fake_sections): Likewise.
4945 (elf_hppa_final_write_processing): Likewise.
4946 (elf_hppa_howto_table): Fully initialise all entries.
4947 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
4948 (elf_hppa_info_to_howto): Likewise.
4949 (elf_hppa_info_to_howto_rel): Likewise.
4950 (elf_hppa_reloc_type_lookup): Likewise.
4951 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
4952 elf_hppa_unmark_useless_dynamic_symbols,
4953 elf_hppa_remark_useless_dynamic_symbols,
4954 elf_hppa_record_segment_addrs, elf_hppa_final_link,
4955 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
4956 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
4957 elf32-hppa.c mess is cleaned up.
4958 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
4959 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
4960 r_field then call hppa_field_adjust inline func with variable
4961 r_field arg, instead call hppa_field_adjust with fixed arg.
4962 In case R_PARISC_PCREL22F, don't set r_field.
4963 (elf_hppa_relocate_insn): Change args and return type to unsigned
4964 int. Call re_assemble_* funcs to do the work.
4966 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
4969 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
4971 (sign_extend): Mask first before sign extending.
4972 (low_sign_extend): Rewrite without condition expression.
4973 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
4974 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
4975 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4976 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
4977 result as function return value rather than through pointer arg.
4978 Accept unsigned int args, and return unsigned int.
4979 (re_assemble_3): New. Combines function of dis_assemble_3 with
4980 re-assembly of opcode and immediate.
4981 (re_assemble_12): Likewise.
4982 (re_assemble_16): Likewise.
4983 (re_assemble_17): Likewise.
4984 (re_assemble_21): Likewise.
4985 (re_assemble_22): Likewise.
4986 (hppa_field_adjust): Rewrite and document, paying attention to
4987 size of types and signed/unsigned issues.
4988 (get_opcode): Shift before masking.
4989 (FDLW): Rename to FLDW.
4990 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
4991 (hppa_rebuild_insn): Change args and return value to unsigned
4992 int. Make use of re_assemble_*. Correct case 11.
4994 * dep-in.sed: Handle ../opcodes/.
4995 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
4996 elf64-hppa.h, hppa_stubs.h, xcoff.h.
4997 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
4998 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
4999 elfarm-nabi.lo dependencies outside of auto-dependency area.
5000 Regenerate dependencies.
5001 * Makefile.in: Regenerate.
5003 * configure.in (TRAD_HEADER): Test non-null before
5005 * configure: Regenerate.
5007 * reloc.c: Fix mis-spelling in comment.
5011 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
5012 * vms.c (vms_openr_next_archived_file): Return NULL.
5016 * coffcode.h Copy changes mistakenly done to libcoff.h in
5021 * libbfd-in.h: Correctly check GCC version.
5022 * bfd-in.h: Likewise.
5023 * libhppa.h: Likewise.
5024 * libbfd.h: Regenerate.
5025 * bfd-in2.h: Regenerate.
5029 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
5030 coffdu-rs6000.{lo,c}.
5031 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
5033 * Makefile.in: Regenerate.
5034 * xcoff.h: New file.
5035 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
5036 * coff-rs6000.c: Move all declarations and defines that are
5037 common to the xcoff backends into xcoff.h
5038 * coff64-rs6000.c: Ditto,
5042 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
5043 _bfd_coff_force_symnames in strings and
5044 _bfd_coff_debug_string_prefix_length to their default values.
5045 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
5049 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
5050 _bfd_coff_force_symnames in strings and
5051 _bfd_coff_debug_string_prefix_length to their default values.
5055 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
5056 Check local_got_refcounts before dereferencing.
5058 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
5059 before deciding we don't need R_PPC_PLT32 relocation.
5060 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
5063 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
5065 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
5067 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
5068 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
5069 (elf_i386_relocate_section): Allow for .plt to go missing.
5070 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
5071 can use a relative reloc for got as elf_i386_relocate_section.
5072 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
5076 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
5080 * Makefile.am (coff64-rs6000.lo): New rule.
5081 * Makefile.in: Regenerate.
5082 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
5083 xcoff_is_local_label_name, xcoff_rtype2howto,
5084 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
5085 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
5086 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
5087 (NO_COFF_SYMBOLS): Define.
5088 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
5089 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
5091 (MINUS_ONE): New macro.
5092 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
5094 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
5095 coff_SWAP_aux_out): Map to the new functions.
5096 * coff64-rs6000.c: New file.
5097 * libcoff.h (bfd_coff_backend_data): Add new fields
5098 _bfd_coff_force_symnames_in_strings and
5099 _bfd_coff_debug_string_prefix_length.
5100 (bfd_coff_force_symnames_in_strings,
5101 bfd_coff_debug_string_prefix_length): New macros for above fields.
5102 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
5103 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
5104 of using coff_swap_sym_in directly.
5105 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
5106 (coff_set_flags) Set magic for XCOFF64.
5107 (coff_compute_section_file_positions): Add symbol name length to
5108 string section length if bfd_coff_debug_string_prefix_length is
5110 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
5111 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
5112 using coff_swap_lineno_in directly.
5113 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
5114 and _bfd_coff_debug_string_prefix_length fields.
5115 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
5116 symbol names into strings table when
5117 bfd_coff_force_symnames_in_strings is true.
5118 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
5119 SET_RELOC_VADDR): New macros.
5120 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
5121 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
5123 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
5124 changes within RS6000COFF_C specific code.
5125 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
5126 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
5127 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
5128 Extend existing hack on target name.
5129 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
5131 * coff-tic54x.c (ticof): Keep up to date with new fields
5132 in bfd_coff_backend_data.
5133 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
5134 targ_selvecs to include rs6000coff64_vec for rs6000.
5135 * configure.in: Add rs6000coff64_vec case.
5136 * cpu-powerpc.c: New bfd_arch_info_type.
5140 * config.bfd: Only disable elf32-hppa vectors, not all of the
5141 BSD and OSF configuration support. Provide (disabled) clauses
5143 * configure.in: Add clause for PA64 support.
5144 * configure: Rebuilt.
5146 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
5147 (bfd_elf64_hppa_vec): Declare.
5149 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
5150 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
5151 (elf64-hppa.lo): Add dependencies.
5152 * Makefile.in: Rebuilt.
5154 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
5158 * libhppa.h (dis_assemble_16): New function.
5159 (pa_arch): Added pa20w element.
5163 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
5164 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
5165 bfd_elf64_slurp_reloc_table.
5167 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
5168 definitions to get external names.
5169 (elf_write_relocs): Renamed from write_relocs and make global.
5170 (elf_slurp_reloc_table): Make global.
5171 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
5173 * archive.c (hpux_uid_gid_encode): New function.
5174 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
5175 defined and the ID is greater than 99999.
5176 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
5177 special uid/gid fields into 32 bit values.
5181 * config.bfd: Add NetBSD/sparc64 support.
5188 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
5189 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
5190 (BFD64_BACKENDS): Add elf64-ia64.lo.
5191 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
5192 (cpu-ia64.lo, elf64-ia64.lo): New rules.
5193 * Makefile.in: Rebuild.
5194 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
5195 (bfd_ia64_arch): Declare.
5196 (bfd_archures_list): Add bfd_ia64_arch.
5197 * bfd-in2.h: Rebuild.
5198 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
5199 * configure: Rebuild.
5200 * configure.host: (ia64-*-linux*): New host.
5201 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
5202 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
5203 * elf.c (prep_headers): Add bfd_arch_ia64.
5204 * libbfd.h: Rebuild.
5205 * reloc.c: Add IA-64 relocations.
5206 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
5208 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
5209 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
5213 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
5214 contents when performing a partial link.
5215 (bfd_elf_d30v_reloc_21): Likewise.
5219 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
5220 patch to symbols defined by a shared object.
5221 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
5226 * dwarf2.c (concat_filename): Avoid string literal concatenation.
5227 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
5231 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
5232 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
5233 (coff-ia64.lo): Add dependency.
5234 * Makefile.in: Regenerate.
5235 * coff-ia64.c: New file.
5236 * efi-app-ia32.c: Ditto.
5237 * efi-app-ia64.c: Ditto.
5238 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
5239 (coff_set_flags): Ditto.
5240 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
5241 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
5242 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
5243 * configure: Regenerate.
5244 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
5245 (PUT_OPTHDR_IMAGE_BASE): Ditto.
5246 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5247 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5248 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5249 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5250 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5251 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5252 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5253 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5254 (GET_PDATA_ENTRY): Ditto.
5255 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
5256 data_start. Use above macros to read fields that are 64 bit wide for
5257 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
5258 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
5259 FileAlignment and SectionAlignment to minimum alignment if they
5261 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
5262 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
5263 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
5264 Use above macros to write fields that are 64 bit wide for
5266 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
5267 5*4 otherwise. This should be right for IA-32 and IA-64, but may
5268 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
5269 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
5270 begin address, end address, and unwind info address only. Use
5271 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
5273 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
5274 HIGH3ADJ relocation names.
5275 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
5276 * targets.c: Declare bfd_efi_app_ia32_vec and
5277 bfd_efi_app_ia64_vec.
5278 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
5279 bfd_efi_app_ia64_vec.
5283 * bfd-in2.h: Add prototypes for tic54x load page access.
5284 * bfd-in.h: Regenerate.
5285 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
5286 in customized _set_arch_mach function.
5287 * coffcode.h (coff_set_alignment_hook): Set section load page if
5288 the appropriate macro is defined.
5289 (write_object_contents): Read section load page.
5293 * elf32-hppa.h: Update copyright date.
5295 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
5296 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
5298 * elf32-d30v.c (MAX32): Don't use LL suffix.
5299 (MIN32): Define in terms of MAX32.
5300 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
5302 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
5305 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
5309 * dep-in.sed: Match space before file name, not after.
5310 * Makefile.am: Regenerate dependencies.
5311 * Makefile.in: Regenerate.
5313 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
5314 case, allow address wrap-around stupidly removed 2000-03-17. Sign
5315 extend without an if statement.
5319 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5321 * elf32-mips.c (gprel16_with_gp): Likewise.
5322 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5323 here using -0x40000, not (int)0xfffc0000.
5324 (elf32_hppa_size_of_stub): Likewise.
5328 * coff-tic54x.c: Now builds with all targets.
5329 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5330 * Makefile.in: Regenerate.
5331 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5332 unitialized variable.
5336 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
5337 --enable-build-warnings option.
5338 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5339 * Makefile.in, configure: Re-generate.
5343 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5344 BFD_RELOC_THUMB_PCREL_BLX.
5346 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5347 R_ARM_XPC25 and R_ARM_THM_PC22.
5349 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5350 R_ARM_XPC25 and R_ARM_THM_XPC22.
5351 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5352 R_ARM_[XPC25|THM_XPC22].
5354 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5355 elf/arm-oabi.h to elf/arm.h
5357 * Makefile.am: Fix dependency for elfarm-oabi.c
5358 * Makefile.in: Regenerate.
5360 * bfd-in2.h: Regenerate.
5361 * libbfd.h: Regenerate.
5365 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5366 and restore it on failure. Release newly allocated tdata on
5371 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5372 (decode_line_info): Set it. Report error if unit->line_offset is
5373 equal to or larger than it.
5377 * targets.c: Added vecs for tic54x.
5378 * reloc.c: Added relocs for tic54x.
5379 * libbfd.h: Regenerated.
5380 * configure: Add TI COFF vecs for tic54x.
5381 * configure.in: Ditto.
5382 * config.bfd (targ_cpu): Recognize new tic54x target.
5383 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5384 * bfd-in2.h: Add tic54x target and relocations.
5385 * Makefile.am, Makefile.in: Add tic54x target.
5386 * archures.c (bfd_archures_list): Add tic54x target.
5387 * coff-tic54x.c: New.
5388 * cpu-tic54x.c: New.
5392 * elfcore.h (elf_core_file_p): call backend_object_p which
5393 thereby gets an opportunity to update the arch/machine type.
5397 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5398 class. Handle SEC_CLINK and SEC_BLOCK flags.
5399 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5400 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5404 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5405 EF_INTERWORK if this is an unknown EABI.
5406 (elf32_arm_merge_private_bfd_data): Check EABI version
5407 numbers. Only check EF_xxx flags if the EABI version number
5409 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5410 if the EABI version number is unknown.
5411 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5412 if the EABI version number is unknown.
5416 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5417 BFD_RELOC_SH_LOOP_END.
5418 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5419 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5420 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5421 (sh_elf_reloc_loop): New function.
5422 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5424 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5425 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5426 * bfd-in2.h, libbfd.h: Regenerate.
5430 * po/bfd.pot: Regenerate.
5432 * Makefile.am: Remove extraneous mkdep comment.
5433 (MKDEP): Use gcc -MM rather than mkdep.
5434 (DEP): Quote when passing vars to sub-make. Add warning
5436 (DEP1): Rewrite for "gcc -MM".
5437 (CLEANFILES): Add DEP2.
5438 Update dependencies.
5439 * Makefile.in: Regenerate.
5443 * configure.in: Added corefile support for AIX 4.3. In particular,
5444 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5445 compiling rs6000-core.c.
5446 * configure: Regenerated.
5450 * cache.c (bfd_open_file): Unlink the output file only if
5451 it has non-zero size.
5455 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5456 relative relocations for non-loaded sections in shared objects.
5457 (elf64_alpha_check_relocs): Similarly.
5461 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5462 BFD_RELOC_16 to switch for extended relocs.
5463 (MY_swap_ext_reloc_in): New.
5464 (MY_swap_ext_reloc_out): New.
5465 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5466 than NAME(aout,swap_ext_reloc_in) for extended relocs.
5467 (NAME(aout,squirt_out_relocs)): Similarly use
5468 MY_swap_ext_reloc_out.
5469 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5473 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5474 the R_PCRWORD_B case.
5478 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5484 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
5485 HOWTO references to bfd_elf_generic_reloc, that have
5486 partial_inplace == true, now use the new function. The function
5487 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5488 extends its fixes to the R_M32R_{16,24,32} relocs.
5489 The new logic in m32r_elf_lo16_reloc() has been removed, and
5490 it instead calls the new routine to obtain that functionality.
5494 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5495 elf32_avr_check_relocs, avr_final_link_relocate,
5496 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5497 elf32_avr_object_p): Add prototypes.
5498 (elf32_avr_gc_mark_hook): Add default for h->root.type.
5499 (bfd_elf_avr_final_write_processing): Make static.
5503 * cpu-avr.c: New file. BFD support routines for AVR architecture.
5504 * archures.c (bfd_architecture): Add AVR architecture.
5505 (bfd_archures_list): Add reference to AVR architecture info.
5506 * elf.c (prep_headers): Handle bfd_arch_avr.
5507 * reloc.c: Add various AVR relocation enums.
5508 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5510 * Makefile.am: Add support for AVR elf.
5511 * configure.in: Likewise.
5512 * config.bfd: Likewise.
5513 * Makefile.in: Regenerate.
5514 * configure: This too.
5515 * bfd-in2.h: And this.
5516 * libbfd.h: And this.
5520 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5521 (elf64_alpha_find_reloc_at_ofs): Likewise.
5525 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5526 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
5527 allowable range used to be -2**(n-1) to 2**n-1.
5528 * reloc.c (_bfd_relocate_contents): Same here. Also replace
5529 "boolean overflow" with "bfd_reloc_status_type flag".
5533 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5537 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5538 of shrinks properly, including the last reloc.
5542 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5547 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5548 a format mismatch rather than an "error" from bfd_read such as
5549 bfd_error_file_truncated.
5553 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5554 sign-extension and big-endian compensation for
5555 R_MIPS_64 even in ld -r.
5559 * elf32-mips.c (mips_elf_next_relocation): Rename from
5560 mips_elf_next_lo16_relocation, and generalize to look
5561 for any relocation type.
5562 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5563 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5564 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5565 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5566 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5567 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5568 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5569 (mips_rtype_to_howto): Likewise.
5570 (mips_elf_calculate_relocation): Handle new relocs.
5571 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5572 are paired. The addend for R_MIPS_GNU_REL16_S2
5573 is shifted right two bits.
5577 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5578 comment, and ensure it doesn't happen again.
5579 (bfd_install_relocation): Same here.
5580 (_bfd_relocate_contents): Don't bother assigning unused signmask
5581 shift result. Fix typos in comments.
5582 Remove trailing whitespace throughout file.
5586 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5587 * bfd-in2.h: Rebuild.
5591 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5593 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5594 (SIZEOF_ILF_STRINGS): Redefine.
5595 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
5596 relative reloc, as opposed to a section relative reloc.
5597 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5599 Add length of symbol's prefix to string pointer.
5600 Store a pointer to the symbol in the symbol pointer table.
5601 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5602 Initialise the symbol pointer table.
5603 Store the hint in the Hint/Name table.
5604 Make the jump reloc be symbol realtive, not section relative.
5605 Create an import symbol for imported code.
5609 * elf.c (swap_out_syms): Check for null type_ptr.
5613 * aout-target.h (MY(write_object_contents)): Remove unused
5614 and unusable "#if CHOOSE_RELOC_SIZE".
5615 * pc532-mach.c (MY(write_object_contents)): Ditto.
5616 * netbsd.h (MY(write_object_contents)): Ditto.
5617 * hp300hpux.c (MY(write_object_contents)): Ditto.
5618 * freebsd.h (MY(write_object_contents)): Ditto.
5619 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5623 * peicode.h (jtab): Make it static.
5625 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5626 defined and COFF_IMAGE_WITH_PE is not defined.
5627 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5628 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5632 * coff-arm.c (bfd_arm_process_before_allocation): Make
5633 'symndx' signed to prevent compile time warning.
5635 * coff-mcore.c: Remove unused prototype for pe_object_p.
5637 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5638 functions that are not used when COFF_IMAGE_WITH_PE is
5640 (struct sh_opcode): Change type of 'flags' field to unsigned
5641 long so that it can hold the USESAS flag.
5643 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5645 * elf-m10300.c (mn10300_elf_relax_section): Initialise
5648 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5650 Remove unusued variables and code.
5651 (elf_backend_add_symbol_hook): Fix prototype.
5653 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5656 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5659 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5661 Remove unusued variables and code.
5662 (elf_backend_add_symbol_hook): Fix prototype.
5664 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5666 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5667 to unused function parameter.
5669 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5671 Use EMPTY_HOWTO to initialise empty howto slots.
5672 Remove unused variables.
5674 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5678 * aoutx.h (aout_link_input_section_std): Pass "true" to
5679 the undefined_symbol callback.
5680 (aout_link_input_section_ext): Likewise.
5681 * bout.c (get_value): Likewise.
5682 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5683 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5685 (alpha_relocate_section): Likewise.
5686 * coff-arm.c (coff_arm_relocate_section): Likewise.
5687 * coff-i960.c (coff_i960_relocate_section): Likewise.
5688 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5689 * coff-mips.c (mips_relocate_section): Likewise.
5690 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5691 * coff-sh.c (sh_relocate_section): Likewise.
5692 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5693 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5694 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5695 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5696 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5697 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5698 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5699 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5700 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5701 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5702 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5703 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5704 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5705 * elflink.h (elf_link_output_extsym): Likewise.
5706 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5707 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5708 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5710 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5711 undefined_symbol callback when building shared library with
5712 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5714 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5715 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5716 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5717 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5718 (elf32_mips_get_relocated_section_content): Likewise.
5719 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5720 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5721 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5722 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5726 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5727 * Makefile.in: Regenerate.
5729 * configure.in: Add support for mips and sh pe vectors.
5730 * configure: regenerate.
5732 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5735 * targets.c: Add mips and sh pe vectors.
5737 * libpei.h (coff_final_link_postscript): Only define if not
5740 * coffcode.h: Add support for WinCE magic numbers.
5742 * peigen.c (pe_print_reloc): Update comment and rearrange
5743 appending of newline character.
5745 * peicode.h: Add support for Image Library Format.
5746 (pe_ILF_vars): Structure containing data used by ILF code.
5747 (pe_ILF_make_a_section): New function. Create a section based
5749 (pe_ILF_make_a_reloc): New function. Create a reloc based on
5751 (pe_ILF_make_a_symbol): New function. Create a symbol based
5753 (pe_ILF_save_relocs): New function. Store the relocs created
5754 by pe_ILF_make_a_reloc in a section.
5755 (pe_ILF_build_a_bfd): New function. Create a BFD describing
5757 (pe_ILF_object_p): New function. Return a bfd_target pointer
5759 (pe_bfd_object_p): If an ILF object is detected call
5760 pe_ILF_object_p on it.
5762 * coff-arm.c: Add support for WinCE relocs which are different
5763 from normal ARM COFF relocs.
5764 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5766 * coff-sh.c: Add support for sh-pe target.
5767 * pe-sh.c: New file. Support code for sh-pe target.
5768 * pei-sh.c: New file. Support code for sh-pe target.
5770 * pe-mips.c: New file. Support code for mips-pe target.
5771 * pei-mips.c: New file. Support code for mips-pe target.
5775 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
5776 architecture if the object causing the bump is dynamic.
5777 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
5778 and also don't it for memory ordering.
5779 (sparc64_elf_write_relocs): Take src_rela out of the loop.
5783 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
5784 calling bfd_get_section_size_before_reloc.
5785 (decode_line_info): Likewise.
5786 (_bfd_dwarf2_find_nearest_line): Likewise.
5790 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
5791 name of the libtool directory.
5792 * Makefile.in: Rebuild.
5796 * som.c (SOM_HOWTO): Define.
5797 (som_hppa_howto_table): Use it.
5801 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
5803 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
5807 * som.c (som_misc_symbol_info): Add field
5809 (som_bfd_derive_misc_symbol_info): Initialize
5811 (som_build_and_write_symbol_table): Keep track
5812 of secondary_def field.
5813 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5814 if secondary_def field is set.
5815 (som_bfd_ar_write_symbol_stuff): Initialize
5820 * dwarf2.c (read_address): Read 16-bits addresses.
5821 (parse_comp_unit): Accept addr_size == 2.
5825 * bfd-in.h: Update copyright date.
5829 * cpu-i370.c: New file.
5830 * elf32-i370.c: New file.
5831 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5832 (bfd_i370_arch): New.
5833 (bfd_archures_list): Add bfd_i370_arch.
5834 * elf.c (prep_headers): Add bfd_arch_i370.
5835 * Makefile.am: Add support for IBM 370 elf.
5836 * config.bfd: Likewise.
5837 * configure.in: Likewise.
5838 * libbfd.h (bfd_reloc_code_real_names): Likewise.
5839 * reloc.c (bfd_reloc_code_type): Likewise.
5840 * targets.c: Likewise.
5842 * Makefile.in: Regenerate.
5843 * configure: Regenerate.
5844 * bfd-in2.h: Regenerate.
5848 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5849 invalid relocation types, and change them to R_386_NONE.
5853 * elflink.h (elf_link_add_object_symbols): If a version symbol is
5854 not defined, don't add a second ELF_VER_CHR.
5856 * elflink.h (elf_bfd_final_link): Call output_extsym for global
5857 symbols converted to local symbols even when stripping all
5859 (elf_link_output_extsym): Process global symbols converted to
5860 local symbols even if they are being stripped.
5864 * archures.c (bfd_octets_per_byte): Return unsigned int.
5865 (bfd_arch_mach_octets_per_byte): Ditto.
5866 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5868 * section.c (bfd_get_section_size_before_reloc): Quell signed
5869 vs. unsigned comparison warning.
5870 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
5871 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5872 change. What was I thinking?
5873 * bfd-in2.h: Regenerate.
5875 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5876 (elf_gc_sections): Same here.
5877 (elf_gc_common_finalize_got_offsets): And here.
5881 ELF HPPA doesn't work at present; remove it until it does.
5882 * config.bfd: Comment out setting targ_defvec to
5884 * Makefile.am: Rebuild dependencies.
5885 (BFD32_BACKENDS): Remove elf32-hppa.lo.
5886 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5887 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5888 * Makefile.in: Rebuild.
5889 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5893 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5894 is no bfd_free(). Revert bfd_free part of previous change.
5898 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5900 (coff_compute_section_file_positions): Use bfd_free to pair
5902 (coff_write_object_contents): Likewise.
5904 * coff-rs6000.c (xcoff_howto_table_16): New variable.
5905 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
5909 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
5910 (xcoff_ar_file_hdr_big): New structure.
5911 (SIZEOF_AR_FILE_HDR_BIG): New macro.
5912 (xcoff_ar_hdr_big): New structure.
5913 (SIZEOF_AR_HDR_BIG): New macro.
5914 (xcoff_big_format_p): New macro.
5915 (xcoff_ardata_big): New macro.
5916 (arch_xhdr_big): New macro.
5917 (xcoff_slurp_armap): Handle large archives.
5918 (xcoff_archive_p): Detect large archives.
5919 (xcoff_read_ar_hdr): Handle large archives.
5920 (xcoff_openr_next_archived_file): Handle large archives.
5921 (xcoff_generic_stat_arch_elt): Handle large archives.
5922 (xcoff_write_armap_old): Rename from xcoff_write_armap.
5923 (xcoff_write_armap_big): New function.
5924 (xcoff_write_armap): New function, dispatch to _old or _big.
5925 (xcoff_write_archive_contents_old): Rename from
5926 xcoff_write_archive_contents.
5927 (xcoff_write_archive_contents_big): New function.
5928 (xcoff_write_archive_contents): New function, dispatch to _old or
5933 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
5934 and hide_symbol members.
5935 (elf_link_hash_copy_indirect): Remove.
5936 (elf_link_hash_hide_symbol): Remove.
5937 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
5938 and elf_backend_hide_symbol.
5939 (_bfd_elf_link_hash_copy_indirect): Declare.
5940 (_bfd_elf_link_hash_hide_symbol): Declare.
5941 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
5942 (_bfd_elf_link_hash_hide_symbol): Likewise.
5943 (_bfd_elf_link_hash_table_init): Don't init killed members.
5944 * elflink.h (elf_link_add_object_symbols): Use the bed function
5945 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
5946 (elf_link_assign_sym_version): Likewise.
5947 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
5948 (elf_backend_hide_symbol): Likewise.
5949 (elfNN_bed): Update for new members.
5953 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
5954 STACK_END_ADDR): Define for new core file format.
5955 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
5956 for handling the vagaries of the various core file structures used
5957 by AIX over the years.
5958 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
5959 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
5960 core_dumpx structure.
5964 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
5965 (bfd_mach_sh3_dsp): Likewise.
5966 (bfd_mach_sh4): Reinstate.
5967 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
5968 * bfd-in2.h: Regenerate.
5969 * coff-sh.c (struct sh_opcode): flags is no longer short.
5970 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
5971 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
5972 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
5973 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
5974 (sh_opcodes): No longer const.
5975 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
5976 (sh_insn_uses_reg): Check for USESAS and USESR8.
5977 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
5978 (_bfd_sh_align_load_span): Return early for SH4.
5979 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
5980 Take into account that field b of a parallel processing insn
5981 could be mistaken for a separate insn.
5982 * cpu-sh.c (arch_info_struct): New array elements for
5983 sh2, sh-dsp and sh3-dsp.
5984 Reinstate element for sh4.
5985 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
5986 (SH4_NEXT): Reinstate.
5987 (SH3_NEXT, SH3E_NEXT): Adjust.
5988 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
5989 * elf32-sh.c (sh_elf_set_private_flags): New function.
5990 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
5991 (sh_elf_merge_private_data): New function.
5992 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
5993 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5994 (bfd_elf32_bfd_merge_private_bfd_data): Change to
5995 sh_elf_merge_private_data.
5999 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
6000 hide_symbol members.
6001 (elf_link_hash_copy_indirect): New.
6002 (elf_link_hash_hide_symbol): New.
6003 * elflink.h (elf_link_add_object_symbols): Break out copy from
6004 indirect new new symbol to elf.c.
6005 (elf_link_assign_sym_version): Break out privatization of
6006 non-exported symbol to elf.c.
6007 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
6008 (_bfd_elf_link_hash_hide_symbol): New.
6009 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
6013 * section.c (_bfd_strip_section_from_output): Add info parameter.
6014 If it passed as non-NULL, use it to check whether any input BFD
6015 has an input section which uses this output section. Change all
6017 * bfd-in2.h: Rebuild.
6019 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
6020 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
6022 * bfd-in2.h: Rebuild.
6026 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
6027 allow final modifications of swapped-in symbol.
6028 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
6029 * coffcode.h (coff_write_relocs): Use macro
6030 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
6031 symbol index should be set to -1.
6035 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
6036 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
6037 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
6038 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
6039 sh_insns_uses_or_sets_freg): New functions.
6040 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
6041 * (sh_insns_conflict): Use new functions and new macros to
6042 detect conflicts when two instructions both set same integer registers,
6043 both set same fp register, and both set special register.
6047 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
6048 swapping in sections, so that the swapping routines have access to
6053 * coff-go32.c: Update comment. Update copyright.
6057 * syms.c (bfd_decode_symclass)
6058 Two new class characters were added - 'V' and 'v'. The
6059 meaning of 'W' is now restricted to just weak non-object
6060 symbols. This allows differentiation between, for example,
6061 weak functions vs weak objects. nm for example now dumps:
6063 'w' = weak unresolved
6064 'V' = weak global object
6065 'v' = weak unresolved object
6067 (bfd_is_undefined_symclass): New function. Return true if the
6068 given symbol class represents and undefined/unresolved symbol.
6070 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
6073 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
6075 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
6076 STT_ARM_16BIT flag set, but it is not attached to a data object
6077 return STT_ARM_16BIT so that it will be treated as code by the
6082 * coff-i386.c (i3coff_object_p): Remove prototype.
6085 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
6086 to name. Update copyright.
6088 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
6089 assignment to avoid warning. Update copyright.
6093 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
6094 instead of using GNU C extension.
6098 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
6099 amount from a bfd_in_memory structure.
6100 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
6105 * linker.c (default_indirect_link_order): oops - fix incorrectly
6106 applied patch from Tim Wall.
6110 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
6111 = scnhsz, filhsz, relsz, aoutsz, etc)
6113 * coffswap.h: Ditto.
6117 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
6118 interwork thumb to arm stub.
6122 * archures.c (bfd_octets_per_byte): New function: Return
6124 (bfd_arch_mach_octets_per_byte): New function: Return target
6127 * section.c: Distinguish between octets and bytes for usage of
6128 _cooked_size, _raw_size, and output_offset. Clarify
6129 description of bfd_set_section_contents.
6131 * bfd-in2.h: Regenerate.
6133 * coffgen.c: Indicate that the offset parameter is in bytes, not
6136 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
6137 where appropriate to get the octet offset when calling
6138 bfd_set_section_contents.
6139 (bfd_coff_reloc_link_order): Ditto.
6141 * linker.c (bfd_generic_reloc_link_order): Ditto.
6142 (_bfd_default_link_order): Ditto.
6144 * reloc.c (bfd_perform_relocation): Distinguish between octets
6145 and bytes. Use octets when indexing into octet data; use bytes
6146 when calculating target addresses.
6147 (bfd_install_relocation): Ditto.
6149 * srec.c (srec_write_section): Ditto.
6153 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
6154 3 to 2. This allows 4 byte sized sections, which is necessary for
6155 dlltool to build functioning DLLs.
6159 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
6160 (arm*-*-conix*): New target.
6164 * config.bfd: Include elf32_i386 vector to target list for cygwin
6167 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
6168 * configure.in: Test for structure win32_pstatus_t in
6170 * configure: Regenerate.
6172 * elf.c (elfcore_grok_win32pstatus): New function: process
6173 win32_pstatus_t notes in elf core file.
6174 (elfcore_grok_note): Detect win32_pstatus notes.
6178 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
6180 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
6181 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
6183 For older changes see ChangeLog-9899
6189 version-control: never