3 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
8 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
10 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
11 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
12 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
17 * config.bfd: Add arm-vxworks target.
18 * coff-arm (coff_arm_relocate_section): Add in symbol value to
19 addend (fro VXworks targets).
23 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
28 * bfd-in.h (bfd_cache_close): Declare newly exported function.
29 * bfd-in2.h: Regenerated.
33 * merge.c (struct sec_merge_hash_entry): Add alignment field.
34 (struct sec_merge_hash): Remove alignment_power.
35 (sec_merge_hash_newfunc): Clear alignment.
36 (sec_merge_hash_lookup): Pass alignment as argument.
37 Use hashp->root.next, not hashp->next to walk the hash chain.
38 If a string already in the hashtable does not have required
39 alignment, create a new hashtable entry.
40 (sec_merge_init): Remove alignment_power argument.
41 (sec_merge_add): Add alignment argument.
42 (sec_merge_emit): Alignment is now a per-entity thing, not per
44 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
46 Pass alignment information to sec_merge_add.
50 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
51 and R_REL16 reloc types; accept odd values for R_REL16 type
55 * cpu-openrisc.c: New file.
56 * elf32-openrisc.c: Likewise.
58 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
59 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
60 (BFD32_BACKENDS): Add elf32-openrisc.lo.
61 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
62 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
63 * Makefile.in: Regenerated.
64 * config.bfd: (openrisc-*-elf): New target.
65 * configure.in (bfd_elf32_openrisc_vec): New vector.
66 * configure: Regenerated.
67 * libbfd.h: Regenerated.
68 * bfd-in2.h: Regenerated.
69 * reloc.c: Add OpenRISC relocations.
70 * targets.c (bfd_elf32_openrisc_vec): Declare.
71 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
72 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
73 (bfd_openrisc_arch): Declare.
74 (bfd_archures_list): Add bfd_openrisc_arch.
75 * elf.c (prep_headers): Add bfd_arch_openrisc.
79 * elf64-x86-64.c: Add c++ vtable hack.
80 Small whitespace and comment changes.
84 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
85 (elf64_x86_64_plt_entry): Likewise.
86 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
87 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
91 * elf32-cris.c: Tweak comments related to dynamic linking.
92 (cris_elf_relocate_section): When not creating shared object, fill
93 in the .got table for any symbol not in the dynamic symbol table.
94 (elf_cris_finish_dynamic_symbol): When not creating shared object,
95 only emit a .got.rela reloc if the symbol is in the dynamic symbol
97 (cris_elf_check_relocs): Use variable r_type in all places rather
98 than the original expression. Add default case in switch for
100 (elf_cris_size_dynamic_sections): Iterate over
101 elf_cris_discard_excess_program_dynamics when not creating shared
103 (elf_cris_discard_excess_dso_dynamics): Renamed from
104 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
105 (elf_cris_discard_excess_program_dynamics): New.
109 * coffcode.h (coff_write_object_contents): Use
110 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
114 * bfd-in2.h: Regenerate.
118 * section.c (STD_SECTION): Add entsize.
122 * section.c (SEC_MERGE): Define new flag for merging.
123 (SEC_STRINGS): Likewise.
124 (entsize): New field.
128 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
129 flag on pe-i386 targets.
133 * libbfd-in.h (_bfd_merge_section): New.
134 (_bfd_write_merged_section): New.
135 (_bfd_merged_section_offset): New.
137 * linker.c (_bfd_generic_link_output_symbols): Handle
139 * aoutx.h (aout_link_write_symbols): Likewise.
140 * pdp11.c (aout_link_write_symbols): Likewise.
141 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
142 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
144 (elf_link_sec_merge_syms): New.
145 (elf_link_input_bfd): Call _bfd_merged_section_offset
146 and _bfd_write_merged_section.
147 Handle discard_sec_merge.
148 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
150 (struct bfd_elf_section_data): Likewise.
151 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
152 SEC_STRINGS section flags and entsize from their ELF counterparts.
153 (_bfd_elf_link_hash_table_init): Initialize merge_info.
154 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
155 from their BFD counterparts.
157 * Makefile.am: Add strtab.lo.
158 * Makefile.in: Rebuilt.
162 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
163 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
167 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
168 endian MIPS ELF target.
169 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
172 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
173 64bit big endian MIPS ELF target.
174 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
175 endian MIPS ELF target.
176 * configure: Regenerated.
178 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
179 little endian targets.
180 (mips_elf_sym_is_global): Handle traditional targets.
182 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
183 64bit big endian MIPS ELF target.
184 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
185 endian MIPS ELF target.
187 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
188 and bfd_elf64_tradlittlemips_vec.
192 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
193 ordinary "progbits" section.
197 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
198 when -Bsymbolic causes a symbol to no longer need a .plt entry.
202 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
206 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
207 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
211 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
212 if there are any relocations for generic ELF.
213 (bfd_elf32_bfd_link_add_symbols): Defined to
214 elf32_generic_link_add_symbols.
215 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
216 if there are any relocations for generic ELF.
217 (bfd_elf64_bfd_link_add_symbols): Defined to
218 elf64_generic_link_add_symbols.
222 * Makefile.am (BUILD_CFILES): New variable: List of C source
223 files created in build directory.
224 (BUILD_HFILES): New variable: List of header files created in
227 (po/POTFILES.in): Replace rule with empty entry.
228 (po/SRC-POTFILES.in): New rule: Create a list of source files
229 in the source directory.
230 (po/BLD-POTFILES.in): New rule: Create a list of source files
231 in the build directory.
232 (MOSTLYCLEAN): Do not delete source files created in build
234 * Makefile.in: Regenerate.
235 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
237 * configure: Regenerate.
239 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
241 Add .. to the search path when building bfd.pot.
242 Delete POTFILES when performing distclean.
243 Add comment describing why distclean is broken in maintainer mode.
244 * po/POTFILES.in: Delete.
245 * po/SRC-POTFILES.in: New file.
246 * po/BLD-POTFILES.in: New file.
247 * po/bfd.pot: Regenerate.
251 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
252 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
253 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
254 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
255 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
256 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
258 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
259 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
260 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
261 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
262 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
263 New HOWTO members for new relocs.
264 (cris_reloc_map): Map new relocs.
265 (ELF_DYNAMIC_INTERPRETER): Define.
266 (PLT_ENTRY_SIZE): Define.
267 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
268 elf_cris_pic_plt_entry): New, PLT templates.
269 (struct elf_cris_pcrel_relocs_copied, struct
270 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
271 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
272 (cris_final_link_relocate): Check that 16-bit GOT relocs have
273 positive values. Adjust PCREL relocs to be relative to location
275 (cris_elf_relocate_section): Handle relocations to dynamic
276 objects. Handle new relocations. Call error handler when seeing
277 non-PIC relocation for read-only sections while generating shared
279 (cris_elf_check_relocs): Set reference counts for GOT and PLT
281 (bfd_elf32_bfd_link_hash_table_create,
282 elf_backend_adjust_dynamic_symbol,
283 elf_backend_size_dynamic_sections,
284 elf_backend_finish_dynamic_symbol,
285 elf_backend_finish_dynamic_sections,
286 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
287 elf_backend_hide_symbol, elf_backend_want_got_plt,
288 elf_backend_plt_readonly, elf_backend_want_plt_sym,
289 elf_backend_got_header_size, elf_backend_plt_header_size):
292 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
293 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
294 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
295 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
296 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
297 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
298 * bfd-in2.h, libbfd.h: Regenerate.
302 (_bfd_mips_elf_relocate_section): Give a better error message when
303 a relocation is not recognized.
307 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
308 non-NULL before attempting to dereference.
312 * configure.in: Remove the redundent AC_ARG_PROGRAM.
313 * configure: Rebuild.
317 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
318 relocation value when resolving a reference from a debugging
323 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
324 (xcoff64_swap_sym_out): Fix syntax errors.
328 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
332 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
333 (hppa_link_hash_newfunc): Init it.
334 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
335 section appears to be non-PIC.
336 (final_link_relocate): Likewise.
337 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
338 possible candidate function, and set pic_call for those that will
339 only have a .plt entry for the PIC call stub.
340 (hppa_handle_PIC_calls): Set maybe_pic_call.
344 * elf32-sh.c (sh_elf_relocate_section): Only relocation
345 R_SH_DIR8WP* relocs if they're against external symbols, else
346 they're just for relaxing. Validate the reloc values.
350 * binary.c (bfd_external_binary_architecture): Declare.
351 (binary_object_p): If bfd_external_binary_architecture is defined,
352 set the architecture to this string.
356 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
357 entries that could serve as a definition for a weak symbol.
361 * Most files: Update copyright notices using Perl script created
366 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
367 prior patch on ! defined OLD_ARM_ABI.
371 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
372 some relocation values.
376 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
377 of offset in BLX(1) instruction.
378 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
379 offset in BLX(1) instruction.
384 * coff-arm.c (coff_arm_reloc_type_lookup): Add
385 BFD_RELOC_THUMB_PCREL_BLX.
389 * archures.c (bfd_default_scan): Add Coldfire CPUs.
390 * bfd-in2.h: Regenerate.
391 * cpu-m68k.c: Add Coldfire CPUs for arch table.
392 * ieee.c (ieee_write_processor): Set proper id for
397 * configure.in: Add s390 target.
398 * configure: Regenerate.
402 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
407 * elf32-arm.h: Update mentions of renamed EF_xx constants.
408 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
412 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
413 abfd->tdata.aout_data == NULL.
417 * elf32-hppa.c: Correct field selector in stub comments.
418 (clobber_millicode_symbols): Formatting fix.
420 * configure.in: Bump version to 2.11.90.
421 * configure: Regenerate.
422 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
423 (CFILES): $SOURCE_CFILES + generated C files.
424 (POTFILES): Include $HFILES not $SOURCE_HFILES.
426 * Makefile.in: Regenerate.
427 * doc/Makefile.in: This too.
431 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
436 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
437 up, replacing multiple if statements with a switch.
438 (handle_COMDAT): New function.
442 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
443 a warning for section flags we do not handle instead of
448 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
452 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
453 * configure.in: Add objects for elf64_ia64_aix vectors.
454 * configure: Regenerated.
455 * configure.host: Recognize ia64-*-aix*.
456 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
457 for AIX. AIX5 requires most relocations to be dynamic (*all*
458 binaries are somewhat similar to shared libraries).
459 * targets.c: Add elf64_ia64_aix vectors.
463 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
464 C8 said "1" instead of "8". Clarify error string for IMM22:
465 "signed integer" instead of just "integer".
469 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
470 PLT entries that could serve as a definition for a weak symbol.
474 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
475 entries that could serve as a definition for a weak symbol.
476 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
478 2001-02-18 David O'Brien <obrien@FreeBSD>
480 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
481 FreeBSD/i386-CURRENT differently until I can figure out the needed
483 * configure: Regenerate.
484 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
485 FreeBSD/PowerPC, and FreeBSD/sparc64.
489 * Makefile.am: Add PDP-11 a.out target.
490 * config.bfd: Likewise.
491 * configure.in: Likewise.
492 * targets.c: Likewise.
493 * archures.c: Likewise.
494 * bfd-in2.h: Likewise. Add PDP-11 relocations.
495 * libbfd.h: Add PDP-11 relocations.
497 * cpu-pdp11.c: New file.
500 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
501 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
502 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
503 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
504 (GET_MAGIC): New macro.
505 (PUT_MAGIC): Likewise.
506 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
510 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
515 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
520 * vms-misc.c: Fix formatting.
524 * vms.c: Fix formatting.
528 * elf.c (elf_find_function): New function.
529 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
530 the file name and function name.
534 * ecoff.c (bfd_debug_section): Update to initialise new fields in
537 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
538 (BFD64_BACKENDS): Add pepigen.c
539 Add rules to create peigen.c and pepigen.c from peXXigen.c.
541 * Makefile.in: Regenerate.
542 * configure: Regenerate.
543 * po/POTFILES.in: Regenerate.
544 * po/bfd.pot: Regenerate.
548 * libcoff-in.h (pe_tdata): Add members target_subsystem and
549 force_minimum_alignment.
553 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
554 (elf64_86_64_size_info): Struct added to fix a problem
555 with the hashtable string entries.
556 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
557 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
558 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
559 remove the FIXME for this.
560 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
561 section. Also removed the FIXME for it.
562 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
563 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
564 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
568 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
569 and not user provided.
573 * vms.c (vms_print_symbol): Remove unreachable code.
575 * rs6000-core.c: Fix formatting.
579 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
580 as _bfd_XXi_only_swap_filehdr_out.
581 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
582 pe->force_minimum_alignment to TRUE.
583 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
584 PEI_TARGET_SUBSYSTEM.
585 (pe_print_private_bfd_data): Call
586 _bfd_XX_print_private_bfd_data_common() instead of
587 _bfd_pe_print_private_bfd_data_common().
588 (pe_bfd_copy_private_bfd_data): Call
589 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
590 _bfd_pe_bfd_copy_private_bfd_data_common().
591 (coff_bfd_copy_private_section_data): Define as
592 _bfd_XX_bfd_copy_private_section_data instead of
593 _bfd_pe_bfd_copy_private_section_data.
594 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
595 of a _bfd_pe_get_symbol_info.
599 * peXXigen.c: Renamed from peigen.c.
600 (COFF_WITH_XX): Define this macro (will get expanded into
601 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
602 compiled as peigen.c or pepigen.c.
603 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
604 define the canonical PEP structures and definitions.
605 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
606 effect, enforce minimum file and section alignments. If
607 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
608 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
609 so, by default, this is a no-op).
611 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
612 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
613 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
614 _bfd_pefoo if it's not defined. Use these macros to define
617 * libcoff.h (pe_tdata): Add members target_subsystem and
618 force_minimum_alignment.
620 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
622 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
624 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
627 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
628 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
631 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
632 (BFD64_BACKENDS_CFILES): Mention pepigen.c
633 (peigen.c): Add rule to generate from peXXigen.c.
635 (pepigen.lo): List dependencies for pepigen.lo.
639 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
640 $global$ referenced but not defined, set its value here.
644 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
646 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
648 (elf64_x86_64_relocate_section): Fix formatting.
649 (elf64_x86_64_relocate_section): Fix addend for relocation of
650 R_X86_64_(8|16|32|PC8|PC16|PC32).
654 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
658 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
663 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
664 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
665 relocations against dynsym symbols.
667 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
668 the R_MIPS_26 relocation.
669 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
670 the R_MIPS_26 relocation.
671 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
673 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
674 the R_MIPS_26 relocation.
675 (mips_elf64_howto_table_rela): Likewise.
677 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
678 member to mark symbols that have non-CALL relocations against
680 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
681 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
683 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
684 non-CALL relocation against it is encountered.
685 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
686 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
687 no_fn_stub is not set.
689 * elf32-mips.c (mips_elf_output_extsym): Get the output section
690 information from the real symbol for indirect ones.
691 Check no_fn_stub to find out if a symbol has a function stub
696 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
697 * Makefile.in: Regenerate.
701 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
702 true if section name is an unwind table section name.
703 (elfNN_ia64_additional_program_headers): Count each unwind section
705 (elfNN_ia64_modify_segment_map): Install one unwind program header
706 for each unwind separate section. Note: normally the linker
707 script merges the unwind sections that go into a single segment,
708 so this still generates at most one unwind program header per
711 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
712 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
713 (elfNN_ia64_fake_sections): Mark sections with names that start
714 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
717 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
718 Use it to make sh_info in unwind section point to the text section
723 * Makefile.am: Add linux target for S/390.
724 * archures.c: Likewise.
725 * bfd-in2.h: Likewise.
726 * config.bfd: Likewise.
727 * configure.in: Likewise.
729 * libbfd.h: Likewise.
730 * targets.c: Likewise.
731 * cpu-s390.c: New file.
732 * elf32-s390.c: New file.
733 * elf64-s390.c: New file.
737 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
738 ImageBase. This has already been done by coff_swap_hdr_in.
742 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
746 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
747 (sparc64_elf_relocate_section): Likewise.
751 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
752 similar to R_SPARC_32.
753 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
757 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
758 relocation entries for weak definitions when building DSO with
763 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
764 before visibility. Locally defined protected symbols are not
769 * config.bfd: Enable coff64 for rs6000-*. Patch from
774 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
775 found, do not attempt to find dwarf2 info before returning.
779 * elflink.h (is_global_symbol_definition): Rename to
780 is_global_data_symbol_definition and have it reject function
782 (elf_link_is_defined_archive_symbol): Use renamed function.
786 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
787 * libbfd.h (bfd_target_vector): Likewise.
788 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
789 make static; create pointer reference named bfd_target_vector.
790 (_bfd_target_vector_entries): Calculate this based on the array
791 typed _bfd_target_vector.
795 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
796 internal symbols are not dynamic.
797 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
801 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
802 that it will not be pulled into the list of files that make up
804 * Makefile.in: Regenerate.
805 * po/bfd.pot: Regenerate.
809 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
811 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
812 external_PEI_IMAGE_hdr.
816 * elf-m10200.c: Fix formatting.
820 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
821 rel, it will be handled later on.
825 * Makefile.in: Fix typo.
829 * elf-m10300.c: Fix formatting.
833 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
834 (elf_backend_get_symbol_type): Define.
835 (elf64_hppa_object_p): Set architecture and machine from elf
840 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
845 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
846 for non-default visibility.
847 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
848 delete ugly macro and replace with pretty function.
852 * coff-go32.c: Update copyright.
853 * coff-stgo32.c: Likewise.
854 * coff-go32.c (COFF_LONG_FILENAMES): Define.
855 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
856 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
857 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
861 * bfd-in2.h: Rebuild.
862 * libbfd.h: Likewise.
866 * bfd-in2.h: Rebuild.
870 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
871 is NULL or PRIV(vms_rec) is outside of the buffer.
875 * coff64-rs6000.c: Fix formatting.
876 * coff-arm.c: Likewise.
877 * coffgen.c: Likewise.
878 * cofflink.c: Likewise.
879 * coff-mcore.c: Likewise.
880 * coff-mips.c: Likewise.
881 * coff-pmac.c: Likewise.
882 * coff-ppc.c: Likewise.
883 * coff-rs6000.c: Likewise.
885 * elf32-fr30.c: Likewise.
886 * elf32-i370.c: Likewise.
887 * elf32-i860.c: Likewise.
888 * elf32-m32r.c: Likewise.
889 * elf32-m68k.c: Likewise.
890 * elf32-mcore.c: Likewise.
891 * elf32-ppc.c: Likewise.
892 * elf32-sh.c: Likewise.
893 * elf32-v850.c: Likewise.
894 * elf64-alpha.c: Likewise.
895 * elf64-sparc.c: Likewise.
896 * elflink.c: Likewise.
897 * elflink.h: Likewise.
898 * elf-m10200.c: Likewise.
899 * elf-m10300.c: Likewise.
900 * elfxx-ia64.c: Likewise.
902 * aoutx.h: Fix formatting.
904 * bfd-in2.h: Likewise.
905 * bfd-in.h: Likewise.
906 * cpu-i386.c: Likewise.
907 * cpu-m68hc11.c: Likewise.
908 * dwarf2.c: Likewise.
909 * elf64-x86-64.c: Likewise.
910 * format.c: Likewise.
911 * freebsd.h: Likewise.
913 * hp300hpux.c: Likewise.
914 * hppabsd-core.c: Likewise.
915 * hpux-core.c: Likewise.
919 * elf64-x86-64.c: Added PIC support for X86-64.
920 (elf64_x86_64_link_hash_newfunc): Function added.
921 (elf64_x86_64_link_hash_table_create): Likewise.
922 (elf64_x86_64_check_relocs): Likewise.
923 (elf64_x86_64_gc_mark_hook): Likewise.
924 (elf64_x86_64_gc_sweep_hook): Likewise.
925 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
926 (elf64_x86_64_size_dynamic_sections): Likewise.
927 (elf64_x86_64_discard_copies): Likewise.
928 (elf64_x86_64_finish_dynamic_symbol): Likewise.
929 (elf64_x86_64_finish_dynamic_sections): Likewise.
930 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
934 * Makefile.am (install-data-local): Make use of $(DESTDIR).
935 * Makefile.in: Regenerate.
939 * coff-a29k.c: Fix formatting.
943 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
944 relocation section names.
945 (elf_i386_relocate_section): Report files with bad relocation
946 section names and return false.
950 * targets.c: Alphabetize list of xvecs.
954 * config.bfd: Add linux target variant for elfxx-hppa.
955 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
956 bfd_elf64_hppa_linux_vec.
957 * configure: Regenerate.
958 * elf64-hppa.c: Include elf64-target.h again to support linux
960 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
961 * elf32-hppa.c: Include elf32-target.h again to support linux
963 (elf32_hppa_post_process_headers): New function.
964 (elf_backend_post_process_headers): Define.
965 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
966 bfd_elf32_hppa_linux_vec.
968 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
969 and data_segment_base fields.
970 (elf32_hppa_link_hash_table_create ): Init them.
971 (elf32_hppa_check_relocs): Update comments.
972 (hppa_record_segment_addr): New function.
973 (elf32_hppa_relocate_section): Call it.
974 (final_link_relocate): Handle R_PARISC_SEGREL32.
975 (elf32_hppa_final_link): New function.
976 (bfd_elf32_bfd_final_link): Define to call it.
977 (hppa_unwind_entry_compare): New function.
978 * cache.c (bfd_open_file): Create files in write+read mode.
980 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
981 SEGREL32 and numerous other relocs. Change duplicate
982 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
984 * opncls.c (bfd_fdopenr): Add parens like the comment says around
987 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
988 .plt entries for DT_INIT and DT_FINI.
989 (elf32_hppa_finish_dynamic_sections): Remove special handling of
992 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
993 offsets for stub .plt access if wide mode. Check offset in range.
997 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
1000 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
1005 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
1006 * configure: Regenerate.
1010 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
1011 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
1012 * cpu-arc.c (arch_info_struct): Add entries for variants.
1013 (bfd_arc_arch) Set default to bfd_mach_arc_5.
1014 (arc_get_mach) Don't assume machine names prefixed arc- before
1016 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
1018 (arc_elf_final_write_processing) Likewise.
1019 (ELF_MACHINE_CODE) Use EM_ARC.
1023 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
1032 * som.c: Fix formatting.
1036 * ecoffswap.h: Fix formatting.
1037 * elf-bfd.h: Likewise.
1038 * elfarm-nabi.c: Likewise.
1039 * elfarm-oabi.c: Likewise.
1040 * elfcode.h: Likewise.
1041 * elfcore.h: Likewise.
1042 * elflink.c: Likewise.
1043 * elflink.h: Likewise.
1044 * elfxx-ia64.c: Likewise.
1045 * elfxx-target.h: Likewise.
1046 * libbfd.c: Likewise
1047 * linker.c: Likewise.
1048 * lynx-core.c: Likewise.
1052 * pc532-mach.c: Fix formatting.
1053 * pe-arm.c: Likewise.
1054 * pe-i386.c: Likewise.
1055 * pe-mips.c: Likewise.
1056 * pe-ppc.c: Likewise.
1057 * pe-sh.c: Likewise.
1058 * pei-mips.c: Likewise.
1059 * pei-sh.c: Likewise.
1060 * peicode.h: Likewise.
1061 * ppcboot.c: Likewise.
1062 * ptrace-core.c: Likewise.
1066 * reloc.c: Fix formatting.
1067 * riscix.c: Likewise.
1068 * rs6000-core.c: Likewise.
1069 * xcoff-target.h: Likewise.
1073 * elfcode.h (elf_object_p): Also restore the bfd mach field on
1074 error, by calling bfd_default_set_arch_mach with incoming
1079 * vaxnetbsd.c: Fix formatting.
1080 * versados.c: Likewise.
1081 * vms-gsd.c: Likewise.
1082 * vms-hdr.c: Likewise.
1083 * vms-misc.c: Likewise.
1087 * archive.c (coff_write_armap): Don't write more than symbol_count
1088 `archive_member_file_ptr's.
1092 * vms-tir.c: Fix formatting.
1096 * vms.c: Fix formatting.
1101 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
1103 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
1105 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
1108 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
1110 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
1114 * libbfd.c (bfd_get_bits): Added
1115 (bfd_put_bits): Likewise
1116 * bfd-in.h: Declared the above.
1117 * bfd-in2.h: Regenerated.
1121 * targets.c: Fix formatting.
1122 * tekhex.c: Likewise.
1123 * trad-core.c: Likewise.
1127 * sco5-core.c: Fix formatting.
1128 * section.c: Likewise.
1129 * sparclinux.c: Likewise.
1130 * sparclynx.c: Likewise.
1131 * sparcnetbsd.c: Likewise.
1133 * stabs.c: Likewise.
1134 * stab-syms.c: Likewise.
1135 * sunos.c: Likewise.
1137 * sysdep.h: Likewise.
1141 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
1143 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
1144 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
1148 * vms-misc.c (_bfd_vms_get_record): Add default case to
1153 * elfcore.h (elf_core_file_p): Move to the start of the program
1154 headers before attempting to read them.
1158 * peigen.c: Fix formatting.
1164 * peigen.c: Fix formatting.
1168 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
1172 * binary.c (binary_set_section_contents): Ignore sections
1177 * m68klinux.c: Fix formatting.
1178 * m68knetbsd.c: Likewise.
1179 * mipsbsd.c: Likewise.
1180 * netbsd-core.c: Likewise.
1181 * netbsd.h: Likewise.
1182 * newsos3.c: Likewise.
1183 * nlm32-alpha.c: Likewise.
1184 * nlm32-i386.c: Likewise.
1185 * nlm32-ppc.c: Likewise.
1186 * nlm32-sparc.c: Likewise.
1187 * nlmcode.h: Likewise.
1188 * nlmswap.h: Likewise.
1189 * nlm-target.h: Likewise.
1190 * ns32knetbsd.c: Likewise.
1194 * elflink.h (elf_link_output_extsym): Don't complain about undefined
1195 symbols in shared objects if allow_shlib_undefined is true.
1199 * cpu-sh.c: Fix formattng.
1200 * elf.c: Fix formattng.
1201 * elf32-mips.c: Fix formattng.
1202 * elf32-sh.c: Fix formattng.
1203 * elf64-alpha.c: Fix formattng.
1207 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
1208 dwarf2_find_line_info as last parameter to invocation of
1209 _bfd_dwarf2_find_nearest_line.
1210 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
1211 dwarf2_find_line_info as last parameter to invocation of
1212 _bfd_dwarf2_find_nearest_line.
1216 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
1217 (BFD_LIBS): ...to here.
1218 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
1219 (BFD_LIBS_CFILES): ...to here.
1220 * Makefile.in: Regenerate.
1221 * configure.in: Remove dwarf.lo from the elf shell variable.
1222 * configure: Regenerate.
1223 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
1224 * libcoff.h: Regenerate.
1225 * coffgen.c (coff_find_nearest_line): Call
1226 _bfd_dwarf2_find_nearest_line.
1227 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
1229 (read_abbrevs): Likewise
1230 (decode_line_info): Likewise.
1231 (parse_comp_unit): Likewise.
1232 (comp_unit_find_nearest_line): Likewise.
1233 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1234 * libbfd.h: Regenerate.
1235 * elf.c (_bfd_elf_find_nearest_line): Update call.
1236 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
1237 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
1238 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
1239 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
1240 (styp_to_sec_flags): Handle DWARF2 sections.
1241 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
1242 to _bfd_find_nearest_line.
1243 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
1244 call to _bfd_find_nearest_line.
1248 * coffgen.c: Fix formatting.
1249 * elf-m10300.c: Likewise.
1250 * elf32-i386.c: Likewise.
1251 * elf32-i960.c: Likewise.
1252 * elf32-m68k.c: Likewise.
1253 * elf32-mcore.c: Likewise.
1254 * elf32-ppc.c: Likewise.
1255 * elf32-sh.c: Likewise.
1256 * elf32-sparc.c: Likewise.
1257 * elf32-v850.c: Likewise.
1258 * elf64-alpha.c: Likewise.
1259 * elf64-hppa.c: Likewise.
1260 * elf64-mips.c: Likewise.
1261 * elf64-sparc.c: Likewise.
1265 * elf32-ppc.c: Fix formatting.
1266 * elf64-x86-64.c: Likewise.
1272 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
1273 BFDs containing no sections or empty .text, .data or .bss sections
1274 to be merged, regardless of their flags.
1278 * elf32-m32r.c: Fix formatting.
1279 * elf32-m68hc11.c: Likewise.
1280 * elf32-m68hc12.c: Likewise.
1281 * elf32-m68k.c: Likewise.
1282 * elf32-mcore.c: Likewise.
1283 * elf32-pj.c: Likewise.
1284 * elf32-ppc.c: Likewise.
1288 * elf32-fr30.c: Fix formatting.
1289 * elf32-hppa.c: Likewise.
1290 * elf32-i370.c: Likewise.
1291 * elf32-i386.c: Likewise.
1292 * elf32-i860.c: Likewise.
1293 * elf32-i960.c: Likewise.
1297 * elf32-arm.h: Fix formatting.
1298 * elf32-avr.c: Likewise.
1299 * elf32-cris.c: Likewise.
1300 * elf32-d10v.c: Likewise.
1301 * elf32-d30v.c: Likewise.
1302 * elf-hppa.h: Likewise.
1303 * elf-m10200.c: Likewise.
1304 * elf-m10300.c: Likewise.
1308 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
1309 bfd_mach_mips32_4k. Update FIXME comment.
1310 * archures.c (bfd_mach_mips32): New constant.
1311 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1312 the latter, renumber it.
1313 * bfd-in2.h (bfd_mach_mips32): New constant.
1314 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1315 the latter, renumber it.
1316 * cpu-mips.c (I_mips32): New constant.
1317 (I_mips4K, I_mips32_4k): Rename the former to the latter.
1318 (arch_info_struct): Add bfd_mach_mips32 entry, replace
1319 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
1320 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
1321 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
1322 with E_MIPS_MACH_MIPS32_4K.
1323 (_bfd_mips_elf_final_write_processing): Replace
1324 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
1325 bfd_mach_mips32 case.
1326 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
1327 comparison with support for MIPS32.
1328 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
1331 * aoutx.h (NAME(aout,machine_type)): Add cases for
1332 bfd_mach_mips5 and bfd_mach_mips64.
1333 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
1334 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
1335 * cpu_mips.c (I_mips5, I_mips64): New definitions.
1336 (arch_info_struct): Add entries for bfd_mach_mips5 and
1338 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
1339 _bfd_mips_elf_print_private_bfd_data): Add cases for
1340 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
1341 (_bfd_mips_elf_final_write_processing): Add cases for
1342 bfd_mach_mips5 and bfd_mach_mips64.
1344 * aoutx.h (NAME(aout,machine_type)): Add a
1345 bfd_mach_mips_sb1 case.
1346 * archures.c (bfd_mach_mips_sb1): New constant.
1347 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
1348 * cpu-mips.c (I_sb1): New constant.
1349 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
1350 * elf32-mips.c (elf_mips_mach): Add case for
1352 (_bfd_mips_elf_final_write_processing): Add case for
1357 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
1358 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
1359 (sparc*-*-rtems*): Switched from a.out to ELF.
1363 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
1364 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
1365 (elf64-x86-64.lo): Add dependencies.
1366 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
1367 bfd_mach_x86_64_intel_syntax.
1368 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
1369 * config.bfd (x86_64): Add.
1370 * configure.in: Add support for bfd_elf64_x86_64_vec.
1371 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
1372 (bfd_i386_arch, i8086_ar): Link in.
1373 * elf64-x86-64.c: New file.
1374 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
1375 * targets.c (bfd_elf64_x86_64_vec): Add.
1376 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
1380 * xcofflink.c: Fix formatting.
1384 * aoutx.h: Fix formatting.
1385 * bfd-in.h: Likewise.
1386 * bfd-in2.h: Likewise.
1387 * cache.c: Likewise.
1388 * cisco-core.c: Likewise.
1389 * coff64-rs6000.c: Likewise.
1390 * coffcode.h: Likewise.
1391 * coffswap.h: Likewise.
1392 * corefile.c: Likewise.
1393 * elf32-mips.c: Likewise.
1397 * aout-adobe.c: Fix formatting.
1398 * coff64-rs6000.c: Likewise.
1399 * coffgen.c: Likewise.
1400 * cofflink.c: Likewise.
1404 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
1405 (obj_coff_strings_written): New accessor macro for above.
1406 * libcoff.h: Regenerate.
1407 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
1409 * coffcode.h (coff_write_object_contents): No need to write out
1410 the string table if it's already been done.
1414 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
1415 weak undefined symbols.
1419 * archures.c (bfd_mach_arm_5TE): Define.
1420 (bfd_mach_arm+XScale): Define.
1421 * bfd-in2.h: Regenerate.
1423 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
1424 BFD_RELOC_ARM_PCREL_BLX.
1426 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
1427 XScale machine numbers.
1429 * config.bfd (xscale-elf): Add target.
1430 (xscale-coff): Add target.
1432 * cpu-arm.c: Add xscale machine name.
1433 Add v5t, v5te and XScale machine numbers.
1437 * aix386-core.c: Fix formatting.
1441 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
1442 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
1443 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
1444 (ins_imms_scaled): Initialize sign_bit at function entry.
1445 (elf64_ia64_operands): Add missing initializers.
1446 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
1447 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
1448 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
1449 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
1450 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
1452 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
1453 and free_extsyms at function entry.
1454 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
1455 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
1456 (get_got): Delete unused local srel.
1457 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
1458 (elfNN_ia64_relocate_section): Delete unused local dynindx.
1462 * coff-a29k.c: Fix formatting.
1463 * coff-h8500.c: Likewise.
1464 * coff-i960.c: Likewise.
1465 * coff-ppc.c: Likewise.
1466 * coff-rs6000.c: Likewise.
1467 * coff-stgo32.c: Likewise.
1468 * coff-tic54x.c: Likewise.
1469 * coff-w65.c: Likewise.
1470 * cpu-h8500.c: Likewise.
1471 * cpu-hppa.c: Likewise.
1472 * cpu-ns32k.c: Likewise.
1473 * ecoff.c: Likewise.
1474 * ecofflink.c: Likewise.
1478 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
1479 remove possibility of infinite loop.
1483 * aix386-core.c: Fix formatting.
1484 * aout-adobe.c: Likewise.
1485 * aout-arm.c: Likewise.
1486 * aout-encap.c: Likewise.
1487 * aout-ns32k.c: Likewise.
1488 * aout-target.h: Likewise.
1489 * aout-tic30.c: Likewise.
1490 * aoutf1.h: Likewise.
1491 * aoutx.h: Likewise.
1492 * archive.c: Likewise.
1493 * bfd-in.h: Likewise.
1494 * bfd-in2.h: Likewise.
1500 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
1501 pltoff entries for DT_INIT and DT_FINI.
1502 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
1503 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
1508 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
1509 (allocate_dynrel_entries): Likewise.
1510 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
1511 (set_pltoff_entry): Likewise.
1512 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
1513 (elfNN_ia64_reloc_type_lookup): Likewise.
1514 (elfNN_ia64_install_value): Likewise.
1515 (elfNN_ia64_relocate_section): Likewise.
1516 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
1517 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
1521 * cpu-a29k.c: Fix formatting.
1522 * cpu-alpha.c: Likewise.
1523 * cpu-arm.c: Likewise.
1524 * cpu-avr.c: Likewise.
1525 * cpu-d10v.c: Likewise.
1526 * cpu-h8500.c: Likewise.
1527 * cpu-hppa.c: Likewise.
1528 * cpu-i370.c: Likewise.
1529 * cpu-i386.c: Likewise.
1530 * cpu-i960.c: Likewise.
1531 * cpu-ia64-opc.c: Likewise.
1532 * cpu-ia64.c: Likewise.
1533 * cpu-m32r.c: Likewise.
1534 * cpu-m68hc11.c: Likewise.
1535 * cpu-m68hc12.c: Likewise.
1536 * cpu-m68k.c: Likewise.
1537 * cpu-m88k.c: Likewise.
1538 * cpu-mips.c: Likewise.
1539 * cpu-ns32k.c: Likewise.
1540 * cpu-pj.c: Likewise.
1541 * cpu-powerpc.c: Likewise.
1542 * cpu-sh.c: Likewise.
1543 * cpu-sparc.c: Likewise.
1544 * cpu-tic54x.c: Likewise.
1545 * cpu-v850.c: Likewise.
1546 * cpu-vax.c: Likewise.
1547 * cpu-w65.c: Likewise.
1548 * cpu-we32k.c: Likewise.
1549 * cpu-z8k.c: Likewise.
1550 * dwarf1.c: Likewise.
1551 * dwarf2.c: Likewise.
1555 * coff-arm.c: Fix formatting.
1556 * coff-ppc.c: Likewise.
1557 * coff-rs6000.c: Likewise.
1558 * coff-sh.c: Likewise.
1559 * coff-sparc.c: Likewise.
1560 * coff-tic30.c: Likewise.
1561 * coff-tic54x.c: Likewise.
1562 * coff-tic80.c: Likewise.
1563 * coff-w65.c: Likewise.
1564 * coff-we32k.c: Likewise.
1565 * coff-z8k.c: Likewise.
1569 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
1570 section with the same ALLOC|LOAD flags as the source section.
1574 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
1575 by STO_ALPHA constants.
1579 * coff-pmac.c: Fix formatting.
1580 * coff-ppc.c: Likewise.
1584 * elflink.h (elf_link_add_object_symbols): Also add indirect
1585 symbols for common symbols with the default version.
1589 * section.c (STD_SECTION): Set gc_mark flag.
1593 * coff-i960.c: Likewise.
1594 * coff-m68k.c: Likewise.
1595 * coff-m88k.c: Likewise.
1596 * coff-mcore.c: Likewise.
1597 * coff-mips.c: Likewise.
1601 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
1605 * coff-h8300.c: Fix formatting.
1606 * coff-h8500.c: Likewise.
1607 * coff-i386.c: Likewise.
1608 * coff-i860.c: Likewise.
1609 * coff-i960.c: Likewise.
1610 * coff-ia64.c: Likewise.
1614 * archive.c: Fix formatting.
1615 * archures.c: Likewise.
1619 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
1620 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
1621 * section.c (bfd_set_section_contents): Call memcpy if
1622 section->contents set and location not equal to contents plus offset.
1626 * bfd-in.h: Fix formatting.
1627 * bfd-in2.h: Likewise.
1629 * binary.c: Likewise.
1631 * coff-a29k.c: Likewise.
1632 * coff-alpha.c: Likewise.
1633 * coff-apollo.c: Likewise.
1634 * coff-aux.c: Likewise.
1638 * aix386-core.c: Fix formatting.
1639 * aoutf1.h: Likewise.
1640 * aoutx.h: Likewise.
1641 * archures.c: Likewise.
1642 * armnetbsd.c: Likewise.
1646 * coff-h8300.c (special): Adjust reloc address.
1650 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
1651 to differentiate elf32 and elf64 on ia64.
1652 * bfd-in2.h: Regenerate.
1653 * config.bfd: Add target for "ia64*-*-hpux*".
1654 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
1655 * configure: Regenerate.
1656 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
1657 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
1659 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
1660 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
1661 * Makefile.in: Regnerate.
1662 * elf64-ia64.c: Deleted.
1663 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
1667 * aout-adobe.c: Fix formatting.
1668 * aout-arm.c: Likewise.
1669 * aout-cris.c: Likewise.
1670 * aout-encap.c: Likewise.
1671 * aout-ns32k.c: Likewise.
1672 * aout-target.h: Likewise.
1673 * aout-tic30.c: Likewise.
1677 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
1678 BFDs containing no sections to be merged, regardless of their flags.
1682 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
1683 if a relocation for an undefined symbol also results in an
1688 * config.bfd: Add support for Sun Chorus.
1692 * configure.in: Recognize alpha-*-freebsd*.
1693 * configure: Regenerate.
1697 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
1698 (Chunk): New global variable set by a parameter in objcopy.c.
1699 (S3Forced): New global variable set by a parameter in
1701 (srec_set_section_contents): If S3Forced is true, always generate
1703 (srec_write_section): Use 'Chunk' to limit maximum length of S
1708 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
1709 * Makefile.in: Regenerate.
1710 * bfd-in2.h: Regenerate.
1711 * po/bfd.pot: Regenerate.
1715 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
1716 EF_SOFT_FLOAT if it is defined.
1720 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
1721 attempts to mix PIC code with non-PIC, just mark the output as
1722 being position dependent.
1723 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
1724 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
1725 all mismatches, not just the first one.
1729 * ieee.c (ieee_archive_p): Plug one of many possible
1730 memory leaks in error handling.
1734 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
1735 elf32_sparc_object_p, elf32_sparc_final_write_processing):
1737 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
1738 sparc64_elf_object_p): Support v9b.
1739 * archures.c: Declare v8plusb and v9b machines.
1741 * cpu-sparc.c: Ditto.
1745 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
1748 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
1749 (SYMBOL_CALLS_LOCAL): New macro.
1750 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1751 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
1752 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1753 (ppc_elf_relocate_section): Use flag variable to determine
1754 whether the relocation refers to a local symbol.
1755 Test whether a PLTREL24 reloc will produce a reloc by looking
1756 to see whether a PLT entry was made.
1760 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
1761 entries that could serve as a definition for a weak symbol.
1767 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
1768 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
1769 against local symbols.
1770 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
1774 * section.c (struct sec): Add kept_section.
1775 (struct bfd_comdat_info): Remove sec, we can use above.
1776 (STD_SECTION): Add initializer.
1777 (bfd_make_section_anyway): Init here too.
1779 * bfd-in2.h: Regenerate.
1781 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
1783 (elf_link_input_bfd): Set all asection->symbol->value's here, and
1784 fudge values for discarded link-once section symbols.
1786 * elf64-hppa.c: Include alloca-conf.h
1790 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
1792 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
1796 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
1800 * section.c (bfd_make_section_anyway): Release newsect ptr when
1801 newsect->symbol fails to alloc. Use bfd_release instead of free.
1805 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
1806 (elf64_ia64_unwind_entry_compare): New.
1807 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
1811 * elflink.h (size_dynamic_sections): Don't create various tags if
1812 .dynstr is excluded from the link. Don't set first dynsym entry
1813 if dynsymcount is zero.
1814 (elf_bfd_final_link): Don't try to swap out dynamic syms if
1815 .dynsym excluded from the link. Don't try to write any dynamic
1816 sections excluded from the link.
1818 * elf.c (swap_out_syms): Handle global section symbols.
1822 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
1823 * coffcode.h (coff_set_alignment_hook): read extended reloc count
1824 (coff_write_relocs): write extended reloc count
1825 (coff_write_object_contents): account for extended relocs
1829 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
1831 * elf.c (_bfd_elf_make_section_from_shdr): Call the
1832 elf_backend_section_flags function.
1833 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
1835 (elf64_ia64_section_flags): New function containing flag conversion
1837 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
1838 * elfxx-target.h (elf_backend_section_flags): Define.
1839 (elfNN_bed): Initialize elf_backend_section_flags field.
1843 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
1844 _bfd_elf32_gc_record_vtable. Correct a comment.
1850 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
1851 produces binaries with got[1] = 0x80000001 to differenciate them
1852 for the dynamic linker from the broken binaries produced by old
1857 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
1858 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
1859 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
1860 * configure: Regenerate.
1864 Define two bfd_targets for absence and presence of leading
1865 underscore on symbols. Make sure to only link same kind.
1866 * elf32-cris.c (cris_elf_object_p,
1867 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
1868 cris_elf_merge_private_bfd_data): New.
1869 (elf_backend_object_p, elf_backend_final_write_processing,
1870 bfd_elf32_bfd_print_private_bfd_data,
1871 bfd_elf32_bfd_merge_private_bfd_data): Define.
1872 <Target vector definition>: Include elf32-target.h twice with
1873 different macro settings:
1874 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
1875 bfd_elf32_us_cris_vec.
1876 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
1877 (elf_symbol_leading_char): First as 0, then '_'.
1878 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
1879 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
1880 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
1881 * configure: Regenerate.
1882 * targets.c: Declare bfd_elf32_us_cris_vec.
1883 * po/bfd.pot: Regenerate.
1887 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
1888 R_ARM_THM_PC22 relocations.
1892 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
1896 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
1897 is has the SEC_HAS_CONTENTS flag set.
1902 * aout-cris.c (N_TXTADDR): Define.
1906 * som.c: Include alloca-conf.h.
1907 * Makefile.am: "make dep-am"
1908 * Makefile.in: Regenerate.
1912 * elf32-hppa.c (plt_stub): New.
1913 (PLT_STUB_ENTRY): Define.
1914 (elf32_hppa_link_hash_table): Change multi_subspace to packed
1915 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
1916 (elf32_hppa_link_hash_table_create): Init to suit.
1917 (elf32_hppa_check_relocs): Set has_12bit_branch and
1918 has_17bit_branch as appropriate.
1919 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
1920 non-local functions.
1921 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
1922 Add space for plt_stub as needed.
1923 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
1924 functions at plt_stub.
1925 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
1926 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
1928 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
1929 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
1930 of fixed size, and if negative, disable handling of input sections
1931 before stub section. Set up default stub group size depending
1932 on detected branch relocs.
1933 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
1934 ensure different offsets from sym_value aren't rounded to
1935 different 2k blocks. Use lrsel and rrsel for other stubs too for
1936 consistency rather than necessity.
1937 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
1938 (final_link_relocate): Likewise.
1939 (elf32_hppa_relocate_section): Likewise.
1941 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
1942 (_bfd_elf_hppa_gen_reloc_type): Generate them.
1943 (elf_hppa_final_link_relocate): Handle them.
1944 (elf_hppa_relocate_insn): Likewise.
1945 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
1949 * elfcode.h (elf_object_p): Preserve and clear abfd section
1950 information. Restore at error.
1954 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
1955 is empty, make sure that its rva also 0. NT loader dislikes
1960 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
1965 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
1966 currently unused RELATIVE_DYNAMIC_RELOCS code.
1967 (hppa_discard_copies): Likewise.
1968 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
1969 comments. Don't check non-code output sections for stub grouping.
1973 * section.c (bfd_get_unique_section_name): Return NULL if
1978 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
1979 instruction sequence to actually work.
1980 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
1985 * elf32-sh.c (sh_elf_relocate_section): Use
1986 _bfd_final_link_relocate to apply the relocation against a section
1987 symbol, when doing relocatable links.
1991 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
1993 (stub_hash_newfunc): Here too.
1994 (hppa_add_stub): And here.
1995 (elf32_hppa_link_hash_table): Remove stub_section_created,
1996 reloc_section_created, first_init_sec and first_fini_sec. Add
1998 (elf32_hppa_link_hash_table_create): Init to suit.
1999 (hppa_get_stub_entry): Add support for grouping stub sections.
2000 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
2001 section code. Index stub vars by section->id.
2002 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
2003 exit paths. Zap allocation of above removed vars. Refine
2006 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
2007 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2008 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
2009 rather than pointer to bfd_link_info.
2010 (hppa_add_stub): Likewise.
2011 (final_link_relocate): Likewise.
2015 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
2020 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
2021 ld/emulparams/shelf.sh.
2025 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
2026 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
2027 * bfd-in2.h: Regenerate.
2031 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
2032 LITUSE relocations incorrectly if -relax is specified on the ld
2033 command line and the displacement field of the load or store
2038 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
2039 first_fini_sec here.
2040 (elf32_hppa_size_stubs): Instead correctly find the first .init
2041 and .fini section here.
2045 * elf32-hppa.c (clobber_millicode_symbols): New function.
2046 (elf32_hppa_size_dynamic_sections): Call it.
2050 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
2051 packed. Add plabel, plt_abs packed booleans.
2052 (hppa_link_hash_newfunc): Init new fields.
2053 (PLABEL_PLT_ENTRY_SIZE): Define.
2054 (hppa_stub_name): Use size_t len vars.
2055 (hppa_add_stub): Likewise.
2056 (elf32_hppa_build_stubs): Likewise.
2057 (hppa_build_one_stub): Kill some compiler warnings.
2058 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
2059 if dynamic linking. Munge the local plt offsets into
2060 local_got_refcounts. Set h->plabel for all global PLABELs. Use
2061 size_t len vars. Add assert for plabel addend.
2062 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
2063 (elf32_hppa_hide_symbol): New function.
2064 (elf_backend_hide_symbol): Define.
2065 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
2066 with h->plabel set. Don't make plt entries to have dynamic syms
2067 when they have been forced local. If plt entry is used by a
2068 plabel, make it PLABEL_PLT_ENTRY_SIZE.
2069 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
2070 Set up .plt offsets for local syms.
2071 (elf32_hppa_relocate_section): Initialise plt entries for local
2072 syms. Leave weak undefined plabels zero. Make global plabel
2073 relocs against function symbol, and leave the addend zero.
2074 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
2075 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
2076 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
2077 relocs instead of SEGREL32 for dynamic got relocs.
2078 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
2079 (elf_backend_got_header_size): Adjust.
2080 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
2082 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
2083 (hppa_type_of_stub): Use it instead of #if 0
2084 (hppa_discard_copies): Use it here too.
2085 (elf32_hppa_size_dynamic_sections): And here.
2087 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
2088 (elf32_hppa_link_hash_table_create): And here.
2089 (hppa_build_one_stub): And here. Instead keep track of stub
2090 offset using _raw_size.
2091 (elf32_hppa_size_stubs): Likewise.
2092 (elf32_hppa_build_stubs): Likewise.
2093 (hppa_size_one_stub): Likewise. Resize reloc section too.
2095 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
2096 first_fini_sec handling. Don't search for reloc section or set
2097 hplink->reloc_section_created here.
2098 (elf32_hppa_size_stubs): Instead search for reloc sections, and
2099 set reloc_section_created here.
2100 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
2101 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
2103 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
2105 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
2106 with `hplink->root.'.
2107 (elf32_hppa_check_relocs): Likewise.
2108 (elf32_hppa_gc_sweep_hook): Likewise.
2109 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2110 (hppa_handle_PIC_calls): Likewise.
2111 (elf32_hppa_size_dynamic_sections): Likewise.
2112 (elf32_hppa_set_gp): Likewise.
2113 (elf32_hppa_relocate_section): Likewise.
2114 (elf32_hppa_finish_dynamic_symbol): Likewise.
2115 (elf32_hppa_finish_dynamic_sections): Likewise.
2118 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
2119 defined weak symbols in shared links.
2120 (final_link_relocate): Calls to defined weak symbols in shared
2121 objects must go via import stubs, as the target might not be known
2126 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
2127 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
2128 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
2129 the original entries with EMPTY_HOWTOs, and added new ones to fill
2131 (sh_elf_info_to_howto): Make sure the new gap isn't used.
2132 (sh_elf_relocate_section): Likewise.
2136 * cpu-mips.c (arch_info_struct): Add mips:4K
2137 * bfd-in2.h (bfd_mach_mips4K): New define.
2138 * archures.c: Add bfd_mach_mips4K to comment.
2139 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
2140 E_MIPS_ARCH_2 for bfd_mach_mips4K.
2144 * som.c (som_write_symbol_strings): Do not used fixed buffers,
2145 use size_t as a counter.
2146 (som_write_space_strings): Similarly.
2150 * elf32-i860.c (elf32_i860_relocate_pc26): New function
2152 (elf32_i860_relocate_section): Invoke new function from here.
2156 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
2161 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
2162 target section name instead of dumping core when the target symbol is
2167 * riscix.c: Remove DEFUN.
2171 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
2172 initialise flags in output bfd if the input bfd is the default
2173 architecture with the default flags.
2177 * archive.c: Fix formatting.
2178 * coff-arm.c: Likewise.
2179 * doc/chew.c: Likewise.
2183 * section.c (bfd_get_unique_section_name): Put a dot before the
2188 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
2189 * elf.c: Fix formatting.
2193 * config.bfd (sh-*-linux*): Added.
2194 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
2195 * targets.c: Declare them.
2196 * elf32-sh-lin.c: New file.
2197 * Makefile.am: Compile it.
2198 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
2199 * configure, Makefile.in: Rebuilt.
2203 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
2204 pseduo-section when determining where the TOC ends.
2206 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
2207 output x_tvndx as it is only two bytes wide.
2209 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
2210 reloc is 26 or 32 bits wide.
2212 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
2213 for relocs that don't change anything. Also look at the full
2218 * config.bfd (arm*-*-uclinux*): New target.
2222 * configure: Rebuilt with new libtool.m4.
2226 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
2227 word for variable name.
2228 * bfd-in2.h: Regenerate.
2232 * config.in: Regenerate.
2233 * libbfd.h: Regenerate.
2234 * po/bfd.pot: Regenerate.
2235 * doc/bfdint.texi: Remove CVS date string - it foils compares with
2240 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
2244 Shared library and PIC support.
2245 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
2246 (GOT_ENTRY_SIZE): New.
2247 (ELF_DYNAMIC_INTERPRETER): New.
2248 (STUB_SUFFIX): Define.
2249 (LONG_BRANCH_PIC_IN_SHLIB): Define.
2250 (RELATIVE_DYNAMIC_RELOCS): Define.
2251 (enum elf32_hppa_stub_type): New.
2252 (struct elf32_hppa_stub_hash_entry): Rename offset to
2253 stub_offset. Add a number of new fields.
2254 (struct elf32_hppa_link_hash_entry): New.
2255 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
2257 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
2258 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
2259 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
2261 (hppa_link_hash_newfunc): New function.
2262 (elf32_hppa_link_hash_table_create): Use above function. Init new
2264 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
2265 instead of addend, and remove sym_name from args. Don't use
2266 symbol name for local syms, instead use sym index.
2267 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
2268 stub type rather than size. Pass in hash and handle import stub
2269 case. Also pass in reloc instead of offset so we can calculate
2270 PCREL22F and PCREL12F branches properly.
2271 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
2272 import and export stubs too.
2273 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
2274 import and export stub sizing.
2275 (elf32_hppa_check_relocs): New function.
2276 (elf32_hppa_adjust_dynamic_symbol): New function.
2277 (hppa_discard_copies): New function.
2278 (elf32_hppa_size_dynamic_sections): New function.
2279 (elf_backend_size_dynamic_sections): Define.
2280 (elf32_hppa_finish_dynamic_symbol): New function.
2281 (elf_backend_finish_dynamic_symbol): Define.
2282 (elf32_hppa_size_stubs): Stash params in link hash table, and move
2283 some local vars into the link hash table too. For shared links,
2284 trundle over function syms, generating export stubs. Handle
2285 PCREL22F branches. Break out stub creation code from here..
2286 (hppa_add_stub): .. to here. New function.
2287 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
2288 call the bfd linker. Use elf_gp to record global pointer.
2289 Calculate a value from sections if $global$ is missing.
2290 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
2291 (elf32_hppa_gc_mark_hook): New function.
2292 (elf_backend_gc_mark_hook): Define.
2293 (elf32_hppa_gc_sweep_hook): New function.
2294 (elf_backend_gc_sweep_hook): Define.
2295 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
2296 Add rel to args, and remove howto, input_bfd, offset, addend,
2297 sym_name as we can recalculate these locally. Handle calls to
2298 dynamic objects, extra PIC relocs, PCREL22F branches. Change
2299 handling of undefined weak syms. Check that stubs are in range.
2300 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
2301 message on hitting a DPREL21L reloc that needs fixing. Subtract
2302 off PC for PCREL14F. Break out code that does a stub lookup from
2304 (hppa_get_stub_entry): ..to here. New function.
2305 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
2306 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
2308 (elf32_hppa_finish_dynamic_sections): New function.
2309 (elf_backend_finish_dynamic_sections): Define.
2310 (elf_backend_final_write_processing) Define.
2311 (hppa_handle_PIC_calls): New function.
2312 (elf32_hppa_build_stubs): Call it. Pass link_info to
2313 hppa_build_one_stub.
2314 (elf32_hppa_create_dynamic_sections): New function
2315 to create .plt and .got then set .plt flags correctly.
2316 (elf_backend_create_dynamic_sections): Define.
2317 (elf32_hppa_object_p): New function.
2318 (elf_backend_object_p): Define.
2319 (elf32_hppa_elf_get_symbol_type): New function.
2320 (elf_backend_get_symbol_type): Define.
2321 (elf_backend_can_gc_sections): Define.
2322 (elf_backend_want_got_plt): Define.
2323 (elf_backend_plt_alignment): Set to 2.
2324 (elf_backend_plt_readonly): Define.
2325 (elf_backend_want_plt_sym): Define.
2326 (elf_backend_got_header_size): Reserve one entry.
2328 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
2329 (elf32_hppa_size_stubs): Pass in multi_subspace.
2330 (elf32_hppa_set_gp): Declare.
2332 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
2333 (bfd_get_unique_section_name): New function.
2334 * bfd-in2.h: Regenerate.
2336 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
2337 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
2341 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
2342 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
2343 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
2344 been updated in finish_dynamic_symbol before modifying function
2347 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
2348 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
2349 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
2350 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
2351 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
2352 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
2353 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
2354 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
2357 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
2358 style of local labels as well.
2362 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
2363 references to undefined symbols in debugging sections.
2367 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2368 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
2369 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
2374 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
2375 (elf32_i860_is_local_label_name): New function and prototype.
2379 * configure.in: Increase version number to 2.10.91.
2380 * configure: Regenerate.
2381 * aclocal.m4: Regenerate.
2382 * config.in: Regenerate.
2383 * po/bfd.pot: Regenerate.
2387 * elf.c (_bfd_elf_make_section_from_shdr): Add
2388 .gnu.linkobce.wi. to the list of debug section names.
2392 * dwarf2.c (find_debug_info): New function: Locate a section
2393 containing dwarf2 debug information.
2394 (bfd_dwarf2_find_nearest_line): Find all sections containing
2395 debug information and include them in the stash.
2399 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
2400 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
2401 (sh_reloc_map): Add new relocs.
2402 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
2403 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
2404 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
2405 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
2407 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
2408 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2409 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
2410 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2411 New array constants.
2412 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
2414 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2415 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
2416 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
2417 elf_sh_plt_reloc_offset): Define.
2418 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
2419 elf_sh_link_hash_table): New structs.
2420 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
2421 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
2423 (elf_backend_create_dynamic_sections,
2424 bfd_elf32_bfd_link_hash_table_create,
2425 elf_backend_adjust_dynamic_symbol,
2426 elf_backend_size_dynamic_sections,
2427 elf_backend_finish_dynamic_symbol,
2428 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2429 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2430 elf_backend_got_header_size, elf_backend_plt_header_size):
2432 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2433 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
2435 * bfd-in2.h, libbfd.h: Rebuilt.
2439 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
2444 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
2445 not initialized, set them to indicate the SH1 instruction set.
2449 * acinclude.m4: Include libtool and gettext macros from the
2451 * aclocal.m4, configure: Rebuilt.
2455 * elf.c: Eliminate references to __sparcv9 macro; replace with
2456 autoconf variables HAVE_PSINFO32_T etc.
2457 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
2458 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
2460 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
2461 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
2462 * aclocal.m4: Ditto.
2463 * configure: Regenerate.
2467 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
2468 for any shared link, not just shared -Bsymbolic.
2469 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
2470 any shared link, and pass link info to it.
2471 (elf_i386_size_dynamic_sections): Update comment.
2472 (elf_i386_discard_copies): Modify to discard relocs for symbols
2473 that have been forced local.
2474 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
2475 that have been forced local.
2479 * elflink.h (elf_link_add_object_symbols): Allow common
2480 symbols to have an alignment of 1 if explicitly requested, and
2481 not overridden by other definitions.
2485 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
2486 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
2490 * elf-bfd.h (elf_link_hash_table): Add runpath.
2492 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
2493 * bfd-in2.h: Rebuilt.
2495 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
2496 "runpath" field to NULL.
2497 (bfd_elf_get_runpath_list): New function.
2499 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
2504 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
2505 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
2506 explicitly. Improve validation of r_type.
2510 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
2511 dynamic allocated content space. Add a comment to remind us that
2512 one day this ought to be fixed.
2513 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2514 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2515 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2519 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
2520 field with the newly relocated value instead of adding it to the
2521 existing immediate field.
2522 (elf32_i860_relocate_splitn): Likewise.
2523 (elf32_i860_relocate_highadj): Likewise.
2527 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
2528 was previously just a stub).
2532 * elflink.c (_bfd_elf_create_got_section): Don't abort().
2534 (_bfd_elf_create_dynamic_sections): Likewise.
2538 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
2539 for undefined symbols to be the beginning of the section.
2541 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
2542 four extra entries at the beginning of the .rela.plt section.
2543 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
2544 section to account for the four reserved entries in the .plt section.
2548 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
2549 to the list of NOPs we recognize after a branch-and-link.
2550 Use the ori NOP when one is needed.
2552 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
2557 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
2558 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
2559 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
2564 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
2568 * elf32-i860.c (elf32_i860_relocate_section): New function.
2569 (i860_final_link_relocate): New function.
2570 (elf32_i860_relocate_splitn): New function.
2571 (elf32_i860_relocate_pc16): New function.
2572 (elf32_i860_relocate_highadj): New function.
2573 (elf32_i860_howto): Minor adjustments to some relocations.
2574 (elf_info_to_howto_rel): Define.
2575 (elf_backend_relocate_section): Define.
2579 * elf32-arm.h: Fix formatting.
2583 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
2587 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2591 * ieee.c (ieee_write_debug_part): Rewrite a comment.
2592 * elf64-ia64.c: Fix a typo.
2596 * elf32-i860.c (elf32_i860_howto_table): New structure.
2597 (lookup_howto): New function.
2598 (elf32_i860_reloc_type_lookup): New function.
2599 (elf32_i860_info_to_howto_rela): New function.
2600 (elf_code_to_howto_index): New structure.
2601 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
2602 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
2603 elf32_i860_reloc_type_lookup.
2607 * som.c (struct fixup_format): Constify `format'.
2608 (som_hppa_howto_table): Use SOM_HOWTO macro.
2609 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
2610 (som_bfd_reloc_type_lookup): Likewise.
2611 (compare_subspaces): Remove unused `count1', `count2'.
2612 (som_begin_writing): Remove unused `total_reloc_size'.
2613 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
2614 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
2615 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
2616 (som_find_nearest_line): Decorate unused parameter(s).
2617 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
2618 (som_bfd_link_split_section): Likewise.
2622 * section.c: Restore backed out code.
2623 * elf.c: Restore backed out code.
2624 (copy_private_bfd_data): Fix bug preventing stipped dynamic
2625 binaries from working.
2626 * bfd-in2.h: Regenerate.
2630 * section.c: Back out the change made by Nick Clifton
2633 * bfd-in2.h: Likewise.
2638 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
2642 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
2643 * bfd-in2.h, libbfd.h: Regenerate.
2647 * section.c (struct sec): Add new boolean field 'segment_mark'.
2648 (STD_SECTION): Initialise new field to zero.
2650 * bfd-in2.h: Regenerate.
2652 * elf.c (copy_private_bfd_data): Reorganise section to segment
2653 mapping to cope with moved sections requiring new segments,
2654 and overlapping segments.
2655 (SEGMENT_END): New macro: Return the end address of a segment.
2656 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
2657 contains a section by comparing their VMA addresses.
2658 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
2659 contains a section by comparing their LMA addresses.
2660 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
2661 section should be included in a segment.
2662 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
2663 follows another in memory.
2664 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
2669 * cpu-i860.c: Added comments.
2671 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
2672 bfd_elf32_i860_little_vec.
2673 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
2674 (ELF_MAXPAGESIZE): Changed to 4096.
2676 * targets.c (bfd_elf32_i860_little_vec): Declaration of
2678 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
2680 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
2681 config for little endian elf32 i860.
2682 (targ_defvec): Define for the new config above
2683 as "bfd_elf32_i860_little_vec".
2684 (targ_selvecs): Define for the new config above
2685 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
2687 * configure.in (bfd_elf32_i860_little_vec): Added recognition
2690 * configure: Regenerated.
2694 * elflink.h (elf_merge_symbol): Take one more argument,
2695 dt_needed, to indicate if the symbol comes from a DT_NEEDED
2696 entry. Don't overide the existing weak definition if dt_needed
2698 (elf_link_add_object_symbols): Pass dt_needed to
2699 elf_merge_symbol ().
2703 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
2708 * configure.host (*-*-aix*): AIX has 'long long' always.
2710 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
2711 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
2712 (xcoff_write_archive_contents_big): Don't update the offset
2713 of the symbol table, xcoff_write_armap will do it.
2717 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
2718 of dynobj for SGI_COMPAT checks.
2722 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
2723 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
2724 * bfd-in2.h: Regenerate.
2728 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
2729 range symbol indices in relocs and issue an error message.
2733 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
2734 info->new_dtags when setting DT_FLAGS_1. It will only be set
2735 by the new linker options. It shouldn't break anything.
2739 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
2740 only if info->new_dtags is true.
2744 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
2745 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2749 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
2750 (ALL_MACHINES_CFILES): Add cpu-cris.c.
2751 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
2752 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
2753 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
2754 * Makefile.in: Rebuild.
2755 * aclocal.m4: Rebuild.
2756 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
2757 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
2758 (bfd_cris_arch): Declare.
2759 (bfd_archures_list): Add bfd_cris_arch.
2760 * bfd-in2.h: Rebuild.
2761 * config.bfd: (cris-*-*): New target.
2762 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
2763 * configure: Rebuild.
2764 * elf.c (prep_headers): Add bfd_arch_cris.
2765 * libbfd.h: Rebuild.
2766 * libaout.h (enum machine_type): Add M_CRIS.
2767 * reloc.c: Add CRIS relocations.
2768 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
2769 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
2770 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
2771 * po/POTFILES.in, po/bfd.pot: Regenerate.
2775 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
2776 DF_TEXTREL if DT_TEXTREL is set.
2777 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2778 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2779 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2780 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
2781 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2782 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2783 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2784 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2785 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
2786 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
2788 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
2789 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
2791 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2795 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
2796 * bfd-in2.h: Rebuild.
2798 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
2799 (elf_dt_soname): New.
2801 * elf.c (bfd_elf_set_dt_needed_soname): New.
2803 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
2804 entry if the shared object loaded by DT_NEEDED is used to
2805 resolve the reference in a regular object.
2809 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
2810 DT_DEPAUDIT and DT_AUDIT as strings.
2814 * format.c: Fix formatting.
2818 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2822 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
2823 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
2824 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
2825 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
2826 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
2827 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
2828 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2832 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
2833 renamed functions from here...
2834 (assign_section_numbers): Use renamed functions.
2835 (prep_headers): Use renamed functions.
2837 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
2838 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
2839 * bfd-in2.h: Regenerate.
2843 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
2844 parenthesis in if statement.
2848 Enable the support for Traditional MIPS.
2849 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
2850 return ict_none appropriately for traditional mips targets.
2851 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
2852 (STUB_MOVE): Conditionalize for traditonal mips.
2853 (STUB_LI16): Likewise.
2854 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
2855 room for RTPROC header.
2856 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
2857 the permission for the PT_DYNAMIC as read, write and execute.
2858 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
2859 for traditonal mips.
2860 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
2861 _DYNAMIC_LINKING for traditonal mips.
2862 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
2863 in case of traditonal mips.
2864 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
2865 entry is required. For a function if PLT is not required then set the
2866 corresponding hash table entry to 0.
2867 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
2869 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
2870 shared object set the value to 0.
2871 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
2872 _DYNAMIC_LINKING for traditonal mips.
2873 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
2874 for traditonal mips.
2878 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
2882 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
2883 out a structure that is BFD_IN_MEMORY.
2887 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
2888 bfd pointer. Print section id instead of bfd pointer for local
2889 syms. Prefix addend with `+' for global syms as well as local.
2890 Correct calculation of name component lengths.
2891 (elf64_hppa_check_relocs): Update call to get_dyn_name.
2894 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
2895 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
2896 (elf64_hppa_modify_segment_map): Likewise.
2900 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
2901 addresses to be "naturally" sign extended. Return -1 if unknown.
2902 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
2903 * bfd-in2.h: Regenerate.
2907 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
2908 and ECOF_SIGNED_64 to list ways to extract an offset.
2909 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
2910 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
2912 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
2913 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
2917 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
2918 bfd_get_start_address.
2919 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
2920 (elf_swap_ehdr_out): Ditto.
2924 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
2925 compatibility with older binutils.
2929 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
2930 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
2933 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
2934 (parse_line_table): Ditto.
2935 (_bfd_dwarf1_find_nearest_line): Ditto.
2936 * syms.c (cmpindexentry): Remove extra `*' from params.
2940 * elf32-mips.c (sort_dynamic_relocs): New Function.
2941 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
2942 via qsort to sort the dynamic relocations in increasing r_symndx
2947 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
2948 ATTRIBUTE_UNUSED to unused args.
2949 (get_opd): Likewise.
2950 (get_plt): Likewise.
2951 (get_dlt): Likewise.
2952 (get_stub): Likewise.
2953 (elf64_hppa_adjust_dynamic_symbol): Likewise.
2954 (elf64_hppa_link_output_symbol_hook): Likewise.
2955 (elf64_hppa_check_relocs): Delete unused var.
2956 (elf64_hppa_size_dynamic_sections): Likewise.
2957 (elf64_hppa_finalize_opd): Likewise.
2958 (elf64_hppa_finalize_dynreloc): Likewise.
2959 (elf64_hppa_modify_segment_map): Likewise.
2960 (elf64_hppa_finish_dynamic_sections): Likewise.
2962 * elf-hppa.h (elf_hppa_final_write_processing): Add
2963 ATTRIBUTE_UNUSED to unused args.
2964 (elf_hppa_final_link_relocate): Likewise.
2965 (elf_hppa_record_segment_addrs): Add paretheses.
2966 (elf_hppa_relocate_section): Constify dyn_name.
2969 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
2970 rearrange case statement so that it gets preferred to 32-bit ones.
2972 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
2973 asection->id instead of address of asection structure.
2974 (elf32_hppa_size_stubs): Likewise.
2976 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
2977 for .init* and .fini*.
2979 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
2980 and addends used in stub names to 32 bits.
2981 (elf32_hppa_size_stubs): Likewise.
2983 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
2984 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
2985 not bfd_put_64. Fix minor comment typo and formatting.
2987 Changes to create multiple linker stubs, positioned immediately
2988 before the section where they are required.
2989 * elf32-hppa.c: Don't include hppa_stubs.h.
2990 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
2991 (elf32_hppa_stub_hash_table): Delete.
2992 (elf32_hppa_link_hash_entry): Delete.
2993 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
2994 stub_hash_table, and store the struct here rather than a pointer.
2995 Delete output_symbol_count. Add offset array. Change
2996 global_value to a bfd_vma.
2997 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
2998 (elf32_hppa_stub_hash_traverse): Delete.
2999 (elf32_hppa_name_of_stub): Delete.
3000 (elf32_hppa_link_hash_lookup): Delete.
3001 (elf32_hppa_link_hash_traverse): Delete.
3002 (elf32_hppa_stub_hash_table_init): Delete.
3003 (elf32_hppa_size_of_stub): Pass input section and offset rather
3004 than location and calculate location here. Don't pass name as all
3005 stubs are now the same size.
3006 (elf32_hppa_stub_hash_newfunc): Init new fields.
3007 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
3009 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
3010 comparing against ints. Rewrite stub handling code.
3011 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
3012 Case enums to int before comparing against ints. Remove
3013 bfd_reloc_dangerous case.
3014 (elf32_hppa_build_one_stub): Rewrite.
3015 (elf32_hppa_size_one_stub): New function.
3016 (elf32_hppa_build_stubs): Rewrite.
3017 (elf32_hppa_size_stubs): Pass in linker call-back functions.
3018 Rewrite stub-handling specific code.
3020 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
3022 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
3024 * hppa_stubs.h: Delete.
3025 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
3026 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
3027 * Makefile.in: Regenerate.
3029 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
3032 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
3034 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
3035 and section name for bfd_reloc_notsupported error message.
3036 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
3037 bfd_reloc_notsupported.
3038 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
3040 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
3041 undefined weak symbols for all relocs.
3042 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
3043 offsets are relative to one past the delay slot.
3044 (elf32_hppa_size_stubs): Account for reloc addend when calculating
3045 branch destination. Put addend into stub name too.
3046 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
3047 adjust by 8 when deciding whether a linker stub is needed. Put
3048 addend into stub name as for above.
3050 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
3051 various args and vars.
3052 (elf32_hppa_bfd_final_link_relocate): Here too.
3053 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
3054 inner block var to avoid shadowing.
3056 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
3058 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
3059 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
3060 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
3062 * libhppa.h: Change practically all unsigned ints to plain ints.
3063 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
3067 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
3068 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
3071 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
3072 to the new OP_* ones.
3074 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
3075 error exit. Bail out earlier on plabel relocs that we aren't
3076 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
3077 string, and then don't free our copy.
3078 (elf32_hppa_build_one_stub): Make insn unsigned int.
3080 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
3081 available with BL, not BE and BLE.
3083 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
3084 code for elf arg relocs.
3085 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
3086 argument with elf_link_hash_entry h. Handle undefined weak
3087 symbols. Move $global$ lookup from here...
3088 (elf32_hppa_relocate_section): ...to here. Return correct error
3089 message for non-handled relocs.
3090 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
3091 wrong test was -0x3ffff to +0x40000.
3093 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
3094 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
3095 Handle them as such.
3096 (elf_hppa_relocate_insn): Fix a typo.
3098 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
3099 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3100 assemble_17, assemble_21): Delete.
3101 Supply defines for all 64 possible opcodes.
3102 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
3103 formats. Handle COMICLR.
3104 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
3107 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
3108 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
3109 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
3111 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
3112 the local syms - did this code get deleted accidentally? Ignore
3113 undefined and undefweak syms.
3115 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
3116 block. Use it instead of elf64_hppa_hash_table (info).
3117 (elf_hppa_final_link_relocate): Use hppa_info instead of
3118 elf64_hppa_hash_table (info).
3120 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3121 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3122 (hppa_rebuild_insn): Mask immediate bits here instead.
3123 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3127 * section.c (struct sec): Add id field. Tidy comment formatting.
3128 (bfd_make_section_anyway): Set id.
3129 (STD_SECTION): Init id too.
3130 Change CONST to const throughout.
3131 * archures.c (bfd_arch_info): Tidy comment.
3132 (bfd_arch_list): Change a CONST to const.
3133 * libbfd-in.h: Tidy comments and replace CONST with const.
3134 * elf-bfd.h: Likewise.
3135 * libbfd.h: Regenerate.
3136 * bfd-in2.h: Regenerate.
3137 * libcoff.h: Regenerate.
3141 * archive.c (_bfd_write_archive_contents): Add an informative
3146 * srec.c: Fix formatting.
3154 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
3155 value of PC-relative offsets.
3159 * elf64-alpha.c (alpha_elf_size_info): New.
3160 (elf_backend_size_info): Define to alpha_elf_size_info.
3161 * elfcode.h (elf_size_info): Change hash bucket size to 4.
3165 * elf32-mips.c: Include elf32-target.h again for the traditional
3170 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
3171 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
3172 (avr_info_to_howto_rela): Likewise.
3173 (elf32_avr_gc_mark_hook): Likewise.
3174 (elf32_avr_gc_sweep_hook): Likewise.
3175 (elf32_avr_relocate_section): Likewise.
3179 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
3180 an external symbol for a non-shared, non-relocatable link.
3184 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
3185 is an external symbol.
3186 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
3191 * reloc16.c: Fix formatting.
3195 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
3196 to add a new target for traditional mips i.e
3197 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
3198 * configure.in: Likewise.
3199 * configure: Rebuild.
3200 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
3202 (bfd_elf32_tradlittlemips_vec): Likewise.
3203 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
3204 to see that elfNN_bed does not get redefined even if the target file
3205 is included twice for a chip. See elf32-mips.c.
3209 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
3210 (CLEANFILES): Add DEPA.
3211 * Makefile.in: Regenerate.
3215 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
3216 can't assume the PE header is at 0x80.
3220 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
3224 * go32stub.h: Update stub.
3228 * archures.c (bfd_mach_avr5): Define.
3229 * bfd-in2.h (bfd_mach_avr5): Define.
3230 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
3231 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
3232 (compatible): Update comment. Add missing test.
3233 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
3234 for avr2 and avr4. Simplify 8K wrap code.
3235 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
3236 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
3240 * coff-h8300.c: Fix formatting.
3241 * cpu-h8300.c: Likewise.
3245 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
3246 for local symbols whose names are unknown.
3250 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
3252 * Makefile.in: Regenerate.
3253 * doc/Makefile.in: Regenerate.
3257 * Makefile.am: Rebuild dependency.
3258 * Makefile.in: Rebuild.
3262 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
3263 (elf_backend_copy_indirect_symbol): Map to the new function.
3267 * archive.c (normalize): Correct pointer comparison when checking
3269 (bfd_bsd_truncate_arname): Likewise.
3270 (bfd_gnu_truncate_arname): Likewise.
3274 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
3275 sections elf_{text,data}_{section,symbol}.
3276 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
3277 (_bfd_mips_elf_hide_symbol): New function.
3278 (elf_backend_hide_symbol): Map to the new function.
3279 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
3280 definitions of mips_elf_{text,data}_{section,symbol}.
3281 (mips_elf_local_relocation_p): Try to find the direct symbol
3282 based on new check_forced argument.
3283 (mips_elf_calculate_relocation): Use new version of
3284 mips_elf_local_relocation_p.
3285 (mips_elf_relocate_section): Likewise.
3286 (_bfd_mips_elf_relocate_section): Likewise.
3287 (mips_elf_sort_hash_table): Only assert that have enough GOT
3289 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
3290 entry if the relocation based on the new external argument.
3291 (mips_elf_create_dynamic_relocation): Assert that we have a
3292 section contents allocated where we can swap out the dynamic
3294 (mips_elf_calculate_relocation): Find the real hash-table entry
3295 correctly by using h->root.root.type. Only create a dynamic
3296 relocation entry if the symbol is defined in a shared library.
3297 Create an external GOT entry for the GOT16 relocation if the
3298 symbol was forced local.
3299 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
3300 dynamic index if the symbol was forced local.
3304 * elf32-mips.c: Fix typos in comments.
3308 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
3313 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
3314 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
3315 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
3316 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
3317 (bfd_elf32_m68hc11_vec): Likewise.
3318 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
3319 Supports 68hc11 & 68hc12 at the same time.
3320 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
3322 (bfd_elf32_m68hc11_vec): Likewise.
3323 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
3324 * archures.c (bfd_m68hc12_arch): Define and register in global list
3325 (bfd_m68hc11_arch): Likewise.
3326 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
3327 BFD_RELOC_M68HC11_3B): Define.
3328 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
3329 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
3333 * elf_bfd.h (struct elf_backend_data): Add info argument to
3334 elf_backend_hide_symbol.
3335 (_bfd_elf_link_hash_hide_symbol): Likewise.
3336 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
3337 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
3338 * elflink.h (elf_link_add_object_symbols): Likewise.
3339 (elf_link_assign_sym_version): Likewise.
3343 * coff-i386.c (coff_i386_reloc): Don't return in case of
3344 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
3345 Compensate PE relocations when linking with non-PE object
3346 files to generate a non-PE executable.
3350 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
3351 GOT entries if we're doing a static link or -Bsymbolic link.
3355 * elflink.h (elf_link_adjust_relocs): Check for and call backend
3356 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
3358 (elf_link_output_relocs): Likewise.
3359 (elf_reloc_link_order): Likewise.
3363 * archures.c (enum bfd_architecture): #define constants for
3364 PowerPc and RS6000 machine numbers.
3365 * bfd-in2.h: Regenerate.
3366 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
3367 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
3368 and RS6000 machine numbers using #defined constants from
3370 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
3371 machine numbers using #defined constants from archures.c. Add
3372 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
3373 64-bit words in 620 entry.
3374 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
3376 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
3380 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
3381 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
3382 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
3386 * bfd-in.h (bfd_family_coff): Define.
3387 * bfd-in2.h: Regenerate.
3388 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
3389 coff_find_nearest_line): Check COFFness using bfd_family_coff()
3390 instead of bfd_target_coff_flavour.
3391 * cofflink.c (_bfd_coff_final_link): Likewise.
3392 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
3393 exclude XCOFF files.
3394 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3396 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
3397 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
3398 * xcofflink.c (XCOFF_XVECP): Delete.
3399 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
3400 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
3401 bfd_xcoff_record_link_assignment,
3402 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
3403 check for bfd_target_xcoff_flavour.
3407 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
3409 (read_hdr): New function.
3410 (rs6000coff_core_p): Store mstsave or __context64 struct instead
3411 of trying to extract individual registers. Set abfd->arch_info
3412 to match the architecture that created the core file.
3413 (rs6000coff_get_section_contents): Delete.
3414 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
3418 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
3423 * configure: Regenerate.
3427 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
3432 * configure.in (VERSION): Update to show this is the CVS mainline.
3436 * elf32-d10v.c: Include elf/d10v.h
3437 (enum reloc_type): Delete.
3438 * elf32-d30v.c: Include elf/d30v.h
3439 (enum reloc_type): Delete.
3441 * Makefile.am: Run "make dep-am" to regenerate dependencies.
3442 * Makefile.in: Regenerate.
3444 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
3445 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
3446 move HOWTOs into elf_howto_table.
3447 (R_386_standard, R_386_ext_offset): Define.
3448 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
3449 (elf_i386_reloc_type_lookup): Modify calculation of index into
3450 elf_howto_table since we've removed the padding.
3451 (elf_i386_info_to_howto_rel): Likewise.
3452 (elf_i386_relocate_section): Likewise.
3456 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
3460 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
3461 an error when seeing an undefined symbol with hidden/internal
3462 attribute. It is handled in *_relocate_section ().
3466 * elflink.h (elf_fix_symbol_flags): Follow the link for the
3467 indirect symbol for the ELF_LINK_NON_ELF bit.
3468 (elf_link_output_extsym): Don't output the indirect symbol even
3469 if the ELF_LINK_NON_ELF bit is set.
3473 * config.bfd (i[3456]86-*-netbsdelf*): New target.
3474 (i[3456]86-*-netbsdaout*): New target.
3475 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
3476 (i[3456]86-*-openbsd*): Likewise.
3480 * trad-core.c: From hpux-core.c, include <dirent.h> or
3481 <sys/ndir.h> when possible.
3485 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
3486 definitions. We must not assume they are sorted in the file
3487 according to their index numbers.
3491 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
3492 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
3493 R_PARISC_DIR17F are for absolute branches; Handle them as such.
3497 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
3498 80960CA, 80960MC as valid machine names.
3502 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
3503 visibility bits if the symbol is undefined. Correctly handle
3504 weak undefined symbols with hidden and internal attributes.
3506 * elflink.h (elf_link_add_object_symbols): Always turn the
3507 symbol into local if it has the hidden or internal attribute.
3511 * ppcboot.c: Add packed attribute if compiling with GCC.
3515 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
3519 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
3520 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
3521 corefile on a 64-bit (Sparc Solaris) host. Also clean up
3526 * Makefile.am: Update dependencies with "make dep-am"
3527 * Makefile.in: Regenerate.
3529 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
3530 bindtextdomain): Replace defines with those from intl/libgettext.h
3531 to quieten gcc warnings.
3535 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
3537 * archive.c (normalize, bfd_bsd_truncate_arname,
3538 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
3539 file names with backslashes.
3541 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
3544 * sysdep.h: Include filenames.h.
3548 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
3552 * elf64-sparc.c (sparc64_elf_relax_section): New.
3553 (sparc64_elf_relocate_section): Optimize tail call into branch always
3555 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3556 (elf32_sparc_relax_section): New.
3560 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
3561 Remove unusued variables.
3562 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
3563 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
3564 previous fix, so that shared libs really don't influence targets
3565 extension mask and memory model.
3569 * elf64-alpha.c (elf64_alpha_relocate_section): Check
3570 h->root.other not h->other.
3571 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3573 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
3577 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
3578 undefined symbol with the non-default visibility attributes.
3579 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3580 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3581 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3582 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3583 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3584 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3585 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3586 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3587 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3588 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
3589 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3593 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
3594 PCREL22, PCREL64I. Zero size of special relocs.
3595 (elf64_ia64_reloc_type_lookup): Likewise.
3596 (USE_BRL, oor_brl, oor_ip): New.
3597 (elf64_ia64_relax_section): New.
3598 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
3599 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
3600 (elf64_ia64_relocate_section): Likewise.
3601 (bfd_elf64_bfd_relax_section): New.
3602 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
3603 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
3604 * bfd-in2.h, libbfd.h: Regenerate.
3608 * configure.in : Add peigen.lo to MIPS PE targets.
3609 * configure: Regenerate.
3613 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
3614 only if it is known for both input and output bfds. Separate
3615 error message strings as in some languages, it may be necessary
3616 to change more than one place in the string to change between
3619 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
3620 endianess checks, call _bfd_generic_verify_endian_match() instead.
3622 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3624 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
3626 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
3627 endianess before checking bfd flavours.
3631 * elflink.h (elf_link_output_extsym): Clear the visibility
3632 field for symbols not defined locally.
3636 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3637 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3638 (hppa_rebuild_insn): Mask immediate bits here instead.
3639 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3643 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
3644 relocs for an executable, ensure that they are virtual addresses.
3648 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
3653 * elflink.h: Add emitrelocations support: when enabled, relocation
3654 information and relocation sections are put into final output
3655 executables. If the emitrelocations flag is set, do the following:
3656 (elf_bfd_final_link): Emit relocation sections.
3657 (elf_link_input_bfd): Compute relocation section contents.
3658 (elf_gc_sections): Don't clean relocation sections.
3662 * som.c (som_decode_symclass): Recognize weak symbols.
3666 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
3667 read idata section only from dataoff.
3668 (pe_print_edata): Correctly check for valid eat_member.
3672 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
3676 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
3680 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
3682 * peigen.c (pe_print_idata): Look for .idata section and print
3683 info even if data directory has zero entries. Read idata section
3684 starting from dataoff, and adjust all data offsets to suit. Cast
3685 all bfd_vma vars to unsigned long before passing to fprintf.
3686 * peigen.c (pe_print_edata): Similarly, look for .edata section
3687 and print info even if data directory has zero entries. Cast
3688 all bfd_vma vars to unsigned long before passing to fprintf.
3691 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
3692 directory size which may be bogus.
3693 * peigen.c (pe_print_edata): Similarly.
3697 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
3699 (copy_private_bfd_data): Allow for space possibly taken up by elf
3700 headers when calculating segment physical address from lma.
3704 * versados.c (versados_scan): Init stringlen and pass_2_done.
3706 * trad-core.c (trad_unix_core_file_p): Return
3707 bfd_error_wrong_format rather than bfd_error_file_truncated.
3709 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
3710 add_data_entry. DataDirectory virtual address is relative.
3711 (pe_print_idata): Account for relative DataDirectory virtual
3712 addresses. Don't trash datasize inside POWERPC_LE_PE code.
3713 (pe_print_edata): Similarly.
3716 * peigen.c (dir_names): Add Delay Import Directory.
3717 (pe_print_idata): Always search for bfd section containing
3718 idata address rather than looking up section name. Print this
3719 section name rather than .idata.
3720 (pe_print_edata): Similarly. Also print some fields as %08lx.
3721 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
3726 * xcoff.h: Rename to xcoff-target.h
3727 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
3728 * coff-rs6000.c: Ditto.
3729 * coff64-rs6000.c: Ditto.
3730 * coff-pmac.c: Ditto.
3731 * Makefile.in: Regenerate.
3735 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
3736 Change U802TOC64MAGIC to U803XTOCMAGIC.
3740 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
3741 * bfd-in.h: Prototype bfd_elf_get_arch_size.
3742 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
3746 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
3750 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
3751 hidden and internal symbols.
3752 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
3754 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
3755 assign a PLT or GOT entry to symbols with hidden and
3756 internal visibility.
3760 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
3762 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3766 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
3771 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
3772 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
3774 * Makefile.in: Regenerate.
3778 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
3779 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
3780 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
3781 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
3782 * Makefile.in: Rebuild.
3786 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
3787 doesn't work very well.
3789 * elf-hppa.h (elf_hppa_internal_shdr): Define.
3790 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
3791 Set hdr->s_type to 1 if ARCH_SIZE == 32.
3792 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
3793 (elf_hppa_info_to_howto): Likewise.
3794 (elf_hppa_info_to_howto_rel): Likewise.
3795 (elf_hppa_reloc_type_lookup): Likewise.
3796 (elf_hppa_is_local_label_name): Likewise.
3797 (elf_hppa_fake_sections): Likewise.
3798 (elf_hppa_final_write_processing): Likewise.
3799 (elf_hppa_howto_table): Fully initialise all entries.
3800 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
3801 (elf_hppa_info_to_howto): Likewise.
3802 (elf_hppa_info_to_howto_rel): Likewise.
3803 (elf_hppa_reloc_type_lookup): Likewise.
3804 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
3805 elf_hppa_unmark_useless_dynamic_symbols,
3806 elf_hppa_remark_useless_dynamic_symbols,
3807 elf_hppa_record_segment_addrs, elf_hppa_final_link,
3808 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
3809 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
3810 elf32-hppa.c mess is cleaned up.
3811 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
3812 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
3813 r_field then call hppa_field_adjust inline func with variable
3814 r_field arg, instead call hppa_field_adjust with fixed arg.
3815 In case R_PARISC_PCREL22F, don't set r_field.
3816 (elf_hppa_relocate_insn): Change args and return type to unsigned
3817 int. Call re_assemble_* funcs to do the work.
3819 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
3822 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
3824 (sign_extend): Mask first before sign extending.
3825 (low_sign_extend): Rewrite without condition expression.
3826 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
3827 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
3828 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3829 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
3830 result as function return value rather than through pointer arg.
3831 Accept unsigned int args, and return unsigned int.
3832 (re_assemble_3): New. Combines function of dis_assemble_3 with
3833 re-assembly of opcode and immediate.
3834 (re_assemble_12): Likewise.
3835 (re_assemble_16): Likewise.
3836 (re_assemble_17): Likewise.
3837 (re_assemble_21): Likewise.
3838 (re_assemble_22): Likewise.
3839 (hppa_field_adjust): Rewrite and document, paying attention to
3840 size of types and signed/unsigned issues.
3841 (get_opcode): Shift before masking.
3842 (FDLW): Rename to FLDW.
3843 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
3844 (hppa_rebuild_insn): Change args and return value to unsigned
3845 int. Make use of re_assemble_*. Correct case 11.
3847 * dep-in.sed: Handle ../opcodes/.
3848 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
3849 elf64-hppa.h, hppa_stubs.h, xcoff.h.
3850 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
3851 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
3852 elfarm-nabi.lo dependencies outside of auto-dependency area.
3853 Regenerate dependencies.
3854 * Makefile.in: Regenerate.
3856 * configure.in (TRAD_HEADER): Test non-null before
3858 * configure: Regenerate.
3860 * reloc.c: Fix mis-spelling in comment.
3864 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
3865 * vms.c (vms_openr_next_archived_file): Return NULL.
3869 * coffcode.h Copy changes mistakenly done to libcoff.h in
3874 * libbfd-in.h: Correctly check GCC version.
3875 * bfd-in.h: Likewise.
3876 * libhppa.h: Likewise.
3877 * libbfd.h: Regenerate.
3878 * bfd-in2.h: Regenerate.
3882 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
3883 coffdu-rs6000.{lo,c}.
3884 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
3886 * Makefile.in: Regenerate.
3887 * xcoff.h: New file.
3888 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
3889 * coff-rs6000.c: Move all declarations and defines that are
3890 common to the xcoff backends into xcoff.h
3891 * coff64-rs6000.c: Ditto,
3895 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
3896 _bfd_coff_force_symnames in strings and
3897 _bfd_coff_debug_string_prefix_length to their default values.
3898 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
3902 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
3903 _bfd_coff_force_symnames in strings and
3904 _bfd_coff_debug_string_prefix_length to their default values.
3908 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
3909 Check local_got_refcounts before dereferencing.
3911 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
3912 before deciding we don't need R_PPC_PLT32 relocation.
3913 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
3916 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
3918 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
3920 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
3921 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
3922 (elf_i386_relocate_section): Allow for .plt to go missing.
3923 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
3924 can use a relative reloc for got as elf_i386_relocate_section.
3925 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
3929 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
3933 * Makefile.am (coff64-rs6000.lo): New rule.
3934 * Makefile.in: Regenerate.
3935 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
3936 xcoff_is_local_label_name, xcoff_rtype2howto,
3937 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
3938 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
3939 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
3940 (NO_COFF_SYMBOLS): Define.
3941 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
3942 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
3944 (MINUS_ONE): New macro.
3945 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
3947 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
3948 coff_SWAP_aux_out): Map to the new functions.
3949 * coff64-rs6000.c: New file.
3950 * libcoff.h (bfd_coff_backend_data): Add new fields
3951 _bfd_coff_force_symnames_in_strings and
3952 _bfd_coff_debug_string_prefix_length.
3953 (bfd_coff_force_symnames_in_strings,
3954 bfd_coff_debug_string_prefix_length): New macros for above fields.
3955 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
3956 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
3957 of using coff_swap_sym_in directly.
3958 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
3959 (coff_set_flags) Set magic for XCOFF64.
3960 (coff_compute_section_file_positions): Add symbol name length to
3961 string section length if bfd_coff_debug_string_prefix_length is
3963 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
3964 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
3965 using coff_swap_lineno_in directly.
3966 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
3967 and _bfd_coff_debug_string_prefix_length fields.
3968 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
3969 symbol names into strings table when
3970 bfd_coff_force_symnames_in_strings is true.
3971 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
3972 SET_RELOC_VADDR): New macros.
3973 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
3974 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
3976 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
3977 changes within RS6000COFF_C specific code.
3978 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
3979 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
3980 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3981 Extend existing hack on target name.
3982 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
3984 * coff-tic54x.c (ticof): Keep up to date with new fields
3985 in bfd_coff_backend_data.
3986 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
3987 targ_selvecs to include rs6000coff64_vec for rs6000.
3988 * configure.in: Add rs6000coff64_vec case.
3989 * cpu-powerpc.c: New bfd_arch_info_type.
3993 * config.bfd: Only disable elf32-hppa vectors, not all of the
3994 BSD and OSF configuration support. Provide (disabled) clauses
3996 * configure.in: Add clause for PA64 support.
3997 * configure: Rebuilt.
3999 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
4000 (bfd_elf64_hppa_vec): Declare.
4002 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
4003 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
4004 (elf64-hppa.lo): Add dependencies.
4005 * Makefile.in: Rebuilt.
4007 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
4011 * libhppa.h (dis_assemble_16): New function.
4012 (pa_arch): Added pa20w element.
4016 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
4017 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
4018 bfd_elf64_slurp_reloc_table.
4020 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
4021 definitions to get external names.
4022 (elf_write_relocs): Renamed from write_relocs and make global.
4023 (elf_slurp_reloc_table): Make global.
4024 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
4026 * archive.c (hpux_uid_gid_encode): New function.
4027 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
4028 defined and the ID is greater than 99999.
4029 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
4030 special uid/gid fields into 32 bit values.
4034 * config.bfd: Add NetBSD/sparc64 support.
4041 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
4042 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
4043 (BFD64_BACKENDS): Add elf64-ia64.lo.
4044 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
4045 (cpu-ia64.lo, elf64-ia64.lo): New rules.
4046 * Makefile.in: Rebuild.
4047 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
4048 (bfd_ia64_arch): Declare.
4049 (bfd_archures_list): Add bfd_ia64_arch.
4050 * bfd-in2.h: Rebuild.
4051 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
4052 * configure: Rebuild.
4053 * configure.host: (ia64-*-linux*): New host.
4054 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
4055 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
4056 * elf.c (prep_headers): Add bfd_arch_ia64.
4057 * libbfd.h: Rebuild.
4058 * reloc.c: Add IA-64 relocations.
4059 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
4061 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
4062 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
4066 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
4067 contents when performing a partial link.
4068 (bfd_elf_d30v_reloc_21): Likewise.
4072 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
4073 patch to symbols defined by a shared object.
4074 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
4079 * dwarf2.c (concat_filename): Avoid string literal concatenation.
4080 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
4084 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
4085 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
4086 (coff-ia64.lo): Add dependency.
4087 * Makefile.in: Regenerate.
4088 * coff-ia64.c: New file.
4089 * efi-app-ia32.c: Ditto.
4090 * efi-app-ia64.c: Ditto.
4091 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
4092 (coff_set_flags): Ditto.
4093 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
4094 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
4095 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
4096 * configure: Regenerate.
4097 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
4098 (PUT_OPTHDR_IMAGE_BASE): Ditto.
4099 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4100 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4101 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4102 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4103 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4104 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4105 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4106 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4107 (GET_PDATA_ENTRY): Ditto.
4108 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
4109 data_start. Use above macros to read fields that are 64 bit wide for
4110 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
4111 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
4112 FileAlignment and SectionAlignment to minimum alignment if they
4114 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
4115 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
4116 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
4117 Use above macros to write fields that are 64 bit wide for
4119 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
4120 5*4 otherwise. This should be right for IA-32 and IA-64, but may
4121 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
4122 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
4123 begin address, end address, and unwind info address only. Use
4124 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
4126 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
4127 HIGH3ADJ relocation names.
4128 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
4129 * targets.c: Declare bfd_efi_app_ia32_vec and
4130 bfd_efi_app_ia64_vec.
4131 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
4132 bfd_efi_app_ia64_vec.
4136 * bfd-in2.h: Add prototypes for tic54x load page access.
4137 * bfd-in.h: Regenerate.
4138 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
4139 in customized _set_arch_mach function.
4140 * coffcode.h (coff_set_alignment_hook): Set section load page if
4141 the appropriate macro is defined.
4142 (write_object_contents): Read section load page.
4146 * elf32-hppa.h: Update copyright date.
4148 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
4149 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
4151 * elf32-d30v.c (MAX32): Don't use LL suffix.
4152 (MIN32): Define in terms of MAX32.
4153 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
4155 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
4158 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
4162 * dep-in.sed: Match space before file name, not after.
4163 * Makefile.am: Regenerate dependencies.
4164 * Makefile.in: Regenerate.
4166 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
4167 case, allow address wrap-around stupidly removed 2000-03-17. Sign
4168 extend without an if statement.
4172 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
4174 * elf32-mips.c (gprel16_with_gp): Likewise.
4175 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
4176 here using -0x40000, not (int)0xfffc0000.
4177 (elf32_hppa_size_of_stub): Likewise.
4181 * coff-tic54x.c: Now builds with all targets.
4182 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
4183 * Makefile.in: Regenerate.
4184 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
4185 unitialized variable.
4189 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
4190 --enable-build-warnings option.
4191 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
4192 * Makefile.in, configure: Re-generate.
4196 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
4197 BFD_RELOC_THUMB_PCREL_BLX.
4199 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4200 R_ARM_XPC25 and R_ARM_THM_PC22.
4202 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
4203 R_ARM_XPC25 and R_ARM_THM_XPC22.
4204 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
4205 R_ARM_[XPC25|THM_XPC22].
4207 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
4208 elf/arm-oabi.h to elf/arm.h
4210 * Makefile.am: Fix dependency for elfarm-oabi.c
4211 * Makefile.in: Regenerate.
4213 * bfd-in2.h: Regenerate.
4214 * libbfd.h: Regenerate.
4218 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
4219 and restore it on failure. Release newly allocated tdata on
4224 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
4225 (decode_line_info): Set it. Report error if unit->line_offset is
4226 equal to or larger than it.
4230 * targets.c: Added vecs for tic54x.
4231 * reloc.c: Added relocs for tic54x.
4232 * libbfd.h: Regenerated.
4233 * configure: Add TI COFF vecs for tic54x.
4234 * configure.in: Ditto.
4235 * config.bfd (targ_cpu): Recognize new tic54x target.
4236 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
4237 * bfd-in2.h: Add tic54x target and relocations.
4238 * Makefile.am, Makefile.in: Add tic54x target.
4239 * archures.c (bfd_archures_list): Add tic54x target.
4240 * coff-tic54x.c: New.
4241 * cpu-tic54x.c: New.
4245 * elfcore.h (elf_core_file_p): call backend_object_p which
4246 thereby gets an opportunity to update the arch/machine type.
4250 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
4251 class. Handle SEC_CLINK and SEC_BLOCK flags.
4252 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
4253 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
4257 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
4258 EF_INTERWORK if this is an unknown EABI.
4259 (elf32_arm_merge_private_bfd_data): Check EABI version
4260 numbers. Only check EF_xxx flags if the EABI version number
4262 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
4263 if the EABI version number is unknown.
4264 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
4265 if the EABI version number is unknown.
4269 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
4270 BFD_RELOC_SH_LOOP_END.
4271 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
4272 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
4273 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
4274 (sh_elf_reloc_loop): New function.
4275 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
4277 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
4278 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
4279 * bfd-in2.h, libbfd.h: Regenerate.
4283 * po/bfd.pot: Regenerate.
4285 * Makefile.am: Remove extraneous mkdep comment.
4286 (MKDEP): Use gcc -MM rather than mkdep.
4287 (DEP): Quote when passing vars to sub-make. Add warning
4289 (DEP1): Rewrite for "gcc -MM".
4290 (CLEANFILES): Add DEP2.
4291 Update dependencies.
4292 * Makefile.in: Regenerate.
4296 * configure.in: Added corefile support for AIX 4.3. In particular,
4297 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
4298 compiling rs6000-core.c.
4299 * configure: Regenerated.
4303 * cache.c (bfd_open_file): Unlink the output file only if
4304 it has non-zero size.
4308 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
4309 relative relocations for non-loaded sections in shared objects.
4310 (elf64_alpha_check_relocs): Similarly.
4314 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
4315 BFD_RELOC_16 to switch for extended relocs.
4316 (MY_swap_ext_reloc_in): New.
4317 (MY_swap_ext_reloc_out): New.
4318 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
4319 than NAME(aout,swap_ext_reloc_in) for extended relocs.
4320 (NAME(aout,squirt_out_relocs)): Similarly use
4321 MY_swap_ext_reloc_out.
4322 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
4326 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
4327 the R_PCRWORD_B case.
4331 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
4337 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
4338 HOWTO references to bfd_elf_generic_reloc, that have
4339 partial_inplace == true, now use the new function. The function
4340 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
4341 extends its fixes to the R_M32R_{16,24,32} relocs.
4342 The new logic in m32r_elf_lo16_reloc() has been removed, and
4343 it instead calls the new routine to obtain that functionality.
4347 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
4348 elf32_avr_check_relocs, avr_final_link_relocate,
4349 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
4350 elf32_avr_object_p): Add prototypes.
4351 (elf32_avr_gc_mark_hook): Add default for h->root.type.
4352 (bfd_elf_avr_final_write_processing): Make static.
4356 * cpu-avr.c: New file. BFD support routines for AVR architecture.
4357 * archures.c (bfd_architecture): Add AVR architecture.
4358 (bfd_archures_list): Add reference to AVR architecture info.
4359 * elf.c (prep_headers): Handle bfd_arch_avr.
4360 * reloc.c: Add various AVR relocation enums.
4361 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
4363 * Makefile.am: Add support for AVR elf.
4364 * configure.in: Likewise.
4365 * config.bfd: Likewise.
4366 * Makefile.in: Regenerate.
4367 * configure: This too.
4368 * bfd-in2.h: And this.
4369 * libbfd.h: And this.
4373 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
4374 (elf64_alpha_find_reloc_at_ofs): Likewise.
4378 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
4379 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
4380 allowable range used to be -2**(n-1) to 2**n-1.
4381 * reloc.c (_bfd_relocate_contents): Same here. Also replace
4382 "boolean overflow" with "bfd_reloc_status_type flag".
4386 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
4390 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
4391 of shrinks properly, including the last reloc.
4395 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
4400 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
4401 a format mismatch rather than an "error" from bfd_read such as
4402 bfd_error_file_truncated.
4406 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
4407 sign-extension and big-endian compensation for
4408 R_MIPS_64 even in ld -r.
4412 * elf32-mips.c (mips_elf_next_relocation): Rename from
4413 mips_elf_next_lo16_relocation, and generalize to look
4414 for any relocation type.
4415 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
4416 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
4417 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
4418 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
4419 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
4420 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
4421 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
4422 (mips_rtype_to_howto): Likewise.
4423 (mips_elf_calculate_relocation): Handle new relocs.
4424 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
4425 are paired. The addend for R_MIPS_GNU_REL16_S2
4426 is shifted right two bits.
4430 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
4431 comment, and ensure it doesn't happen again.
4432 (bfd_install_relocation): Same here.
4433 (_bfd_relocate_contents): Don't bother assigning unused signmask
4434 shift result. Fix typos in comments.
4435 Remove trailing whitespace throughout file.
4439 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
4440 * bfd-in2.h: Rebuild.
4444 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
4446 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
4447 (SIZEOF_ILF_STRINGS): Redefine.
4448 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
4449 relative reloc, as opposed to a section relative reloc.
4450 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
4452 Add length of symbol's prefix to string pointer.
4453 Store a pointer to the symbol in the symbol pointer table.
4454 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
4455 Initialise the symbol pointer table.
4456 Store the hint in the Hint/Name table.
4457 Make the jump reloc be symbol realtive, not section relative.
4458 Create an import symbol for imported code.
4462 * elf.c (swap_out_syms): Check for null type_ptr.
4466 * aout-target.h (MY(write_object_contents)): Remove unused
4467 and unusable "#if CHOOSE_RELOC_SIZE".
4468 * pc532-mach.c (MY(write_object_contents)): Ditto.
4469 * netbsd.h (MY(write_object_contents)): Ditto.
4470 * hp300hpux.c (MY(write_object_contents)): Ditto.
4471 * freebsd.h (MY(write_object_contents)): Ditto.
4472 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
4476 * peicode.h (jtab): Make it static.
4478 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
4479 defined and COFF_IMAGE_WITH_PE is not defined.
4480 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
4481 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
4485 * coff-arm.c (bfd_arm_process_before_allocation): Make
4486 'symndx' signed to prevent compile time warning.
4488 * coff-mcore.c: Remove unused prototype for pe_object_p.
4490 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
4491 functions that are not used when COFF_IMAGE_WITH_PE is
4493 (struct sh_opcode): Change type of 'flags' field to unsigned
4494 long so that it can hold the USESAS flag.
4496 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
4498 * elf-m10300.c (mn10300_elf_relax_section): Initialise
4501 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
4503 Remove unusued variables and code.
4504 (elf_backend_add_symbol_hook): Fix prototype.
4506 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
4509 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
4512 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
4514 Remove unusued variables and code.
4515 (elf_backend_add_symbol_hook): Fix prototype.
4517 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
4519 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
4520 to unused function parameter.
4522 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
4524 Use EMPTY_HOWTO to initialise empty howto slots.
4525 Remove unused variables.
4527 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
4531 * aoutx.h (aout_link_input_section_std): Pass "true" to
4532 the undefined_symbol callback.
4533 (aout_link_input_section_ext): Likewise.
4534 * bout.c (get_value): Likewise.
4535 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4536 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
4538 (alpha_relocate_section): Likewise.
4539 * coff-arm.c (coff_arm_relocate_section): Likewise.
4540 * coff-i960.c (coff_i960_relocate_section): Likewise.
4541 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4542 * coff-mips.c (mips_relocate_section): Likewise.
4543 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4544 * coff-sh.c (sh_relocate_section): Likewise.
4545 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4546 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
4547 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4548 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4549 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4550 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4551 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4552 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4553 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4554 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4555 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4556 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4557 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4558 * elflink.h (elf_link_output_extsym): Likewise.
4559 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
4560 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
4561 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
4563 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
4564 undefined_symbol callback when building shared library with
4565 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
4567 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4568 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4569 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4570 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4571 (elf32_mips_get_relocated_section_content): Likewise.
4572 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4573 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4574 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4575 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4579 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
4580 * Makefile.in: Regenerate.
4582 * configure.in: Add support for mips and sh pe vectors.
4583 * configure: regenerate.
4585 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
4588 * targets.c: Add mips and sh pe vectors.
4590 * libpei.h (coff_final_link_postscript): Only define if not
4593 * coffcode.h: Add support for WinCE magic numbers.
4595 * peigen.c (pe_print_reloc): Update comment and rearrange
4596 appending of newline character.
4598 * peicode.h: Add support for Image Library Format.
4599 (pe_ILF_vars): Structure containing data used by ILF code.
4600 (pe_ILF_make_a_section): New function. Create a section based
4602 (pe_ILF_make_a_reloc): New function. Create a reloc based on
4604 (pe_ILF_make_a_symbol): New function. Create a symbol based
4606 (pe_ILF_save_relocs): New function. Store the relocs created
4607 by pe_ILF_make_a_reloc in a section.
4608 (pe_ILF_build_a_bfd): New function. Create a BFD describing
4610 (pe_ILF_object_p): New function. Return a bfd_target pointer
4612 (pe_bfd_object_p): If an ILF object is detected call
4613 pe_ILF_object_p on it.
4615 * coff-arm.c: Add support for WinCE relocs which are different
4616 from normal ARM COFF relocs.
4617 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
4619 * coff-sh.c: Add support for sh-pe target.
4620 * pe-sh.c: New file. Support code for sh-pe target.
4621 * pei-sh.c: New file. Support code for sh-pe target.
4623 * pe-mips.c: New file. Support code for mips-pe target.
4624 * pei-mips.c: New file. Support code for mips-pe target.
4628 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
4629 architecture if the object causing the bump is dynamic.
4630 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
4631 and also don't it for memory ordering.
4632 (sparc64_elf_write_relocs): Take src_rela out of the loop.
4636 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
4637 calling bfd_get_section_size_before_reloc.
4638 (decode_line_info): Likewise.
4639 (_bfd_dwarf2_find_nearest_line): Likewise.
4643 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
4644 name of the libtool directory.
4645 * Makefile.in: Rebuild.
4649 * som.c (SOM_HOWTO): Define.
4650 (som_hppa_howto_table): Use it.
4654 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
4656 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
4660 * som.c (som_misc_symbol_info): Add field
4662 (som_bfd_derive_misc_symbol_info): Initialize
4664 (som_build_and_write_symbol_table): Keep track
4665 of secondary_def field.
4666 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
4667 if secondary_def field is set.
4668 (som_bfd_ar_write_symbol_stuff): Initialize
4673 * dwarf2.c (read_address): Read 16-bits addresses.
4674 (parse_comp_unit): Accept addr_size == 2.
4678 * bfd-in.h: Update copyright date.
4682 * cpu-i370.c: New file.
4683 * elf32-i370.c: New file.
4684 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
4685 (bfd_i370_arch): New.
4686 (bfd_archures_list): Add bfd_i370_arch.
4687 * elf.c (prep_headers): Add bfd_arch_i370.
4688 * Makefile.am: Add support for IBM 370 elf.
4689 * config.bfd: Likewise.
4690 * configure.in: Likewise.
4691 * libbfd.h (bfd_reloc_code_real_names): Likewise.
4692 * reloc.c (bfd_reloc_code_type): Likewise.
4693 * targets.c: Likewise.
4695 * Makefile.in: Regenerate.
4696 * configure: Regenerate.
4697 * bfd-in2.h: Regenerate.
4701 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
4702 invalid relocation types, and change them to R_386_NONE.
4706 * elflink.h (elf_link_add_object_symbols): If a version symbol is
4707 not defined, don't add a second ELF_VER_CHR.
4709 * elflink.h (elf_bfd_final_link): Call output_extsym for global
4710 symbols converted to local symbols even when stripping all
4712 (elf_link_output_extsym): Process global symbols converted to
4713 local symbols even if they are being stripped.
4717 * archures.c (bfd_octets_per_byte): Return unsigned int.
4718 (bfd_arch_mach_octets_per_byte): Ditto.
4719 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
4721 * section.c (bfd_get_section_size_before_reloc): Quell signed
4722 vs. unsigned comparison warning.
4723 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
4724 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
4725 change. What was I thinking?
4726 * bfd-in2.h: Regenerate.
4728 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
4729 (elf_gc_sections): Same here.
4730 (elf_gc_common_finalize_got_offsets): And here.
4734 ELF HPPA doesn't work at present; remove it until it does.
4735 * config.bfd: Comment out setting targ_defvec to
4737 * Makefile.am: Rebuild dependencies.
4738 (BFD32_BACKENDS): Remove elf32-hppa.lo.
4739 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
4740 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
4741 * Makefile.in: Rebuild.
4742 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
4746 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
4747 is no bfd_free(). Revert bfd_free part of previous change.
4751 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
4753 (coff_compute_section_file_positions): Use bfd_free to pair
4755 (coff_write_object_contents): Likewise.
4757 * coff-rs6000.c (xcoff_howto_table_16): New variable.
4758 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
4762 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
4763 (xcoff_ar_file_hdr_big): New structure.
4764 (SIZEOF_AR_FILE_HDR_BIG): New macro.
4765 (xcoff_ar_hdr_big): New structure.
4766 (SIZEOF_AR_HDR_BIG): New macro.
4767 (xcoff_big_format_p): New macro.
4768 (xcoff_ardata_big): New macro.
4769 (arch_xhdr_big): New macro.
4770 (xcoff_slurp_armap): Handle large archives.
4771 (xcoff_archive_p): Detect large archives.
4772 (xcoff_read_ar_hdr): Handle large archives.
4773 (xcoff_openr_next_archived_file): Handle large archives.
4774 (xcoff_generic_stat_arch_elt): Handle large archives.
4775 (xcoff_write_armap_old): Rename from xcoff_write_armap.
4776 (xcoff_write_armap_big): New function.
4777 (xcoff_write_armap): New function, dispatch to _old or _big.
4778 (xcoff_write_archive_contents_old): Rename from
4779 xcoff_write_archive_contents.
4780 (xcoff_write_archive_contents_big): New function.
4781 (xcoff_write_archive_contents): New function, dispatch to _old or
4786 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
4787 and hide_symbol members.
4788 (elf_link_hash_copy_indirect): Remove.
4789 (elf_link_hash_hide_symbol): Remove.
4790 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
4791 and elf_backend_hide_symbol.
4792 (_bfd_elf_link_hash_copy_indirect): Declare.
4793 (_bfd_elf_link_hash_hide_symbol): Declare.
4794 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
4795 (_bfd_elf_link_hash_hide_symbol): Likewise.
4796 (_bfd_elf_link_hash_table_init): Don't init killed members.
4797 * elflink.h (elf_link_add_object_symbols): Use the bed function
4798 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
4799 (elf_link_assign_sym_version): Likewise.
4800 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
4801 (elf_backend_hide_symbol): Likewise.
4802 (elfNN_bed): Update for new members.
4806 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
4807 STACK_END_ADDR): Define for new core file format.
4808 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
4809 for handling the vagaries of the various core file structures used
4810 by AIX over the years.
4811 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
4812 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
4813 core_dumpx structure.
4817 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
4818 (bfd_mach_sh3_dsp): Likewise.
4819 (bfd_mach_sh4): Reinstate.
4820 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
4821 * bfd-in2.h: Regenerate.
4822 * coff-sh.c (struct sh_opcode): flags is no longer short.
4823 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
4824 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
4825 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
4826 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
4827 (sh_opcodes): No longer const.
4828 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
4829 (sh_insn_uses_reg): Check for USESAS and USESR8.
4830 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
4831 (_bfd_sh_align_load_span): Return early for SH4.
4832 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
4833 Take into account that field b of a parallel processing insn
4834 could be mistaken for a separate insn.
4835 * cpu-sh.c (arch_info_struct): New array elements for
4836 sh2, sh-dsp and sh3-dsp.
4837 Reinstate element for sh4.
4838 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
4839 (SH4_NEXT): Reinstate.
4840 (SH3_NEXT, SH3E_NEXT): Adjust.
4841 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
4842 * elf32-sh.c (sh_elf_set_private_flags): New function.
4843 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
4844 (sh_elf_merge_private_data): New function.
4845 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
4846 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4847 (bfd_elf32_bfd_merge_private_bfd_data): Change to
4848 sh_elf_merge_private_data.
4852 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
4853 hide_symbol members.
4854 (elf_link_hash_copy_indirect): New.
4855 (elf_link_hash_hide_symbol): New.
4856 * elflink.h (elf_link_add_object_symbols): Break out copy from
4857 indirect new new symbol to elf.c.
4858 (elf_link_assign_sym_version): Break out privatization of
4859 non-exported symbol to elf.c.
4860 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
4861 (_bfd_elf_link_hash_hide_symbol): New.
4862 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
4866 * section.c (_bfd_strip_section_from_output): Add info parameter.
4867 If it passed as non-NULL, use it to check whether any input BFD
4868 has an input section which uses this output section. Change all
4870 * bfd-in2.h: Rebuild.
4872 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
4873 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
4875 * bfd-in2.h: Rebuild.
4879 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
4880 allow final modifications of swapped-in symbol.
4881 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
4882 * coffcode.h (coff_write_relocs): Use macro
4883 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
4884 symbol index should be set to -1.
4888 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
4889 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
4890 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
4891 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
4892 sh_insns_uses_or_sets_freg): New functions.
4893 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
4894 * (sh_insns_conflict): Use new functions and new macros to
4895 detect conflicts when two instructions both set same integer registers,
4896 both set same fp register, and both set special register.
4900 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
4901 swapping in sections, so that the swapping routines have access to
4906 * coff-go32.c: Update comment. Update copyright.
4910 * syms.c (bfd_decode_symclass)
4911 Two new class characters were added - 'V' and 'v'. The
4912 meaning of 'W' is now restricted to just weak non-object
4913 symbols. This allows differentiation between, for example,
4914 weak functions vs weak objects. nm for example now dumps:
4916 'w' = weak unresolved
4917 'V' = weak global object
4918 'v' = weak unresolved object
4920 (bfd_is_undefined_symclass): New function. Return true if the
4921 given symbol class represents and undefined/unresolved symbol.
4923 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
4926 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
4928 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
4929 STT_ARM_16BIT flag set, but it is not attached to a data object
4930 return STT_ARM_16BIT so that it will be treated as code by the
4935 * coff-i386.c (i3coff_object_p): Remove prototype.
4938 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
4939 to name. Update copyright.
4941 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
4942 assignment to avoid warning. Update copyright.
4946 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
4947 instead of using GNU C extension.
4951 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
4952 amount from a bfd_in_memory structure.
4953 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
4958 * linker.c (default_indirect_link_order): oops - fix incorrectly
4959 applied patch from Tim Wall.
4963 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
4964 = scnhsz, filhsz, relsz, aoutsz, etc)
4966 * coffswap.h: Ditto.
4970 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
4971 interwork thumb to arm stub.
4975 * archures.c (bfd_octets_per_byte): New function: Return
4977 (bfd_arch_mach_octets_per_byte): New function: Return target
4980 * section.c: Distinguish between octets and bytes for usage of
4981 _cooked_size, _raw_size, and output_offset. Clarify
4982 description of bfd_set_section_contents.
4984 * bfd-in2.h: Regenerate.
4986 * coffgen.c: Indicate that the offset parameter is in bytes, not
4989 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
4990 where appropriate to get the octet offset when calling
4991 bfd_set_section_contents.
4992 (bfd_coff_reloc_link_order): Ditto.
4994 * linker.c (bfd_generic_reloc_link_order): Ditto.
4995 (_bfd_default_link_order): Ditto.
4997 * reloc.c (bfd_perform_relocation): Distinguish between octets
4998 and bytes. Use octets when indexing into octet data; use bytes
4999 when calculating target addresses.
5000 (bfd_install_relocation): Ditto.
5002 * srec.c (srec_write_section): Ditto.
5006 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
5007 3 to 2. This allows 4 byte sized sections, which is necessary for
5008 dlltool to build functioning DLLs.
5012 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
5013 (arm*-*-conix*): New target.
5017 * config.bfd: Include elf32_i386 vector to target list for cygwin
5020 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
5021 * configure.in: Test for structure win32_pstatus_t in
5023 * configure: Regenerate.
5025 * elf.c (elfcore_grok_win32pstatus): New function: process
5026 win32_pstatus_t notes in elf core file.
5027 (elfcore_grok_note): Detect win32_pstatus notes.
5031 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
5033 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
5034 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
5036 For older changes see ChangeLog-9899
5042 version-control: never