3 * peicode.h (coff_swap_scnhdr_in): For sections containing
4 uninitialised data, only set their size to s_paddr if this does
5 not reset their size to zero. MS's latest compilers will set
10 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
11 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
16 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
18 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
19 sections being discarded.
23 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
24 instead of _bfd_elfcore_section_from_phdr.
25 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
26 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
27 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
28 (elfcore_grok_prstatus): Likewise.
29 (elfcore_grok_lwpstatus): Likewise.
30 (bfd_get_elf_phdr_upper_bound): Likewise.
31 (elfcore_make_note_pseudosection): Formatting.
32 (_bfd_elfcore_strndup): Formatting.
33 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
34 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
38 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
39 and _bfd_elfcore_strndup.
40 (struct elf_backend_data): Add elf_backend_grok_prstatus
41 and elf_backend_grok_psinfo.
42 * elf.c (_bfd_elfcore_make_pseudosection): New function.
43 (elfcore_grok_prstatus): Use it.
44 (elfcore_make_note_pseudosection): Likewise.
45 (elfcore_strndup): Rename to...
46 (_bfd_elfcore_strndup): Here, and make global.
47 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
48 (elfcore_grok_note): Call elf_backend_grok_prstatus
49 and elf_backend_grok_psinfo if available.
50 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
51 (_bfd_elf32_mips_grok_psinfo): New function.
52 (elf_backend_grok_prstatus): Define.
53 (elf_backend_grok_psinfo): Define.
54 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
55 (elf_backend_grok_psinfo): Likewise.
56 (elfNN_bed): Include elf_backend_grok_prstatus and
57 elf_backend_grok_psinfo.
61 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
62 hplink->sgot is NULL before filling GOT. Checck if hplink->splt
63 is NULL before filling PLT.
67 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
71 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
73 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
74 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
77 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
78 (IS_ABSOLUTE_RELOC): Define.
79 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
80 (hppa_link_hash_newfunc): Always init it.
81 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
82 create COPY relocs only when the reloc is in a read-only section.
83 Instead, allocate space for a dynamic reloc to reference the
84 library symbol directly. Keep track of space we allocate using
86 (hppa_discard_copies): Delete, and move code to..
87 (allocate_plt_and_got): ..here. Rename to
88 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
89 relocs for non-shared link.
90 (elf32_hppa_size_dynamic_sections): Update calls to above.
91 (elf32_hppa_relocate_section): Write out the dynamic relocs used
92 in lieu of COPY relocs.
94 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
96 (elf_i386_adjust_dynamic_symbol): ..nor here..
97 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
99 (elf_i386_size_dynamic_sections): Fix a comment.
100 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
101 involved in writing reloc out.
105 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
106 Ensure syms are dynamic if we might be emitting a reloc.
107 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
108 for undefweak or undefined syms..
109 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
111 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
112 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
113 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
114 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
118 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
119 strncasecmp/strcasecmp instead of strncmp/strcmp.
123 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
124 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
125 in the regular object file and treat the weak definition as
130 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
131 unresolved_reloc test to exclude cases where we use "relocation"
132 before setting it to point into the .got. Reinstate fudge for
133 unresolved relocs in debugging sections.
135 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
136 complicated tests for unresolvable relocs with a simple direct
137 scheme using "unresolved_reloc" var.
139 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
140 elf_i386_dyn_relocs. Update comment.
141 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
143 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
145 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
147 (elf_i386_size_dynamic_sections): Likewise.
148 (elf_i386_finish_dynamic_symbol): Likewise.
149 (elf_i386_finish_dynamic_sections): Likewise.
150 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
153 Avoid creating COPY relocs if possible.
154 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
155 which .got created. Mark symbols used by R_386_32 and R_386_PC32
156 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
157 reloc is in a read-only section. Instead, allocate space for a
158 dynamic reloc to reference the library symbol directly. Keep
159 track of space we allocate using pcrel_relocs_copied.
160 (discard_copies): Delete, and move code to ..
161 (allocate_plt_and_got): ..here. Rename to
162 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
163 relocs for non-shared link.
164 (elf_i386_size_dynamic_sections): Update calls to above functions.
165 (elf_i386_relocate_section): Write out the dynamic relocs. Add
166 more ugly logic to avoid "unresolvable relocation" error. Use
167 htab shortcut in place of elf_hash_table macro.
168 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
169 not always be created now.
173 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
178 * configure.host (mips64-*-linux): Reformat.
182 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
183 allocate local .got space. Use shortcuts from hash table for .got
184 and .plt rather than comparing section names.
185 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
186 adjusting index into local_got_refcounts to document what we are
188 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
189 Tidy .got and .plt error checking.
193 * elf-bfd.h (struct elf_backend_data):
194 elf_backend_emit_relocs: New field: Function for emitting
196 elf_backend_count_relocs: New field: Function for determining
197 the number of relocs to be emitted.
198 * elfxx-target.h: Provide default (NULL) values for
199 elf_backend_emit_relocs and elf_backend_count_relocs.
200 * elflink.h (elf_link_size_reloc_section): Make the hash table
201 big enough to hold the relocs counted by either reloc_count or
203 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
204 should be emitted, either because of a command line option
205 stored in the info structure or because the target provides a
206 special reloc emitting function.
207 If the target provides a reloc counting function use it,
208 unless performing a relocatable link or emitting all relocs.
209 Also set the SEC_RELOC flag on any output section which will
211 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
212 should be emitted, either because of a command line option
213 stored in the info structure or because the target provides a
214 special reloc emitting function.
215 If the target provides a reloc emitting function, use it,
216 unless performing a relocatable link or emitting all relocs.
220 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
221 allocate local .got space.
225 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
230 * elflink.h (struct elf_assign_sym_version_info): Remove member
231 export_dynamic. All users changed to use info member.
232 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
233 export_dynamic, instead use member in parameter info.
234 * bfd-in.h (bfd_elf32_size_dynamic_sections,
235 bfd_elf64_size_dynamic_sections): Update prototype.
236 * bfd-in2.h: Regenerate.
240 * elflink.h (elf_info_failed): Add a new field, verdefs.
241 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
243 (elf_export_symbol): Check eif->verdefs to decide if a symbol
248 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
249 readonly_reloc, to record if a relocation in the .rel.dyn
250 section is against a read-only section.
251 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
253 (_bfd_mips_elf_check_relocs): Record if there is a relocation
254 in the .rel.dyn section against a read-only section by setting
255 DF_TEXTREL or readonly_reloc.
256 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
258 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
259 there is a relocation in the .rel.dyn section against a
261 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
266 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
267 function. Move flagword result into parameter list. Remove
268 comment about setting bfd_error_handler to intercept failure
270 * coffgen.c (make_a_section_from_file): Examine result of
271 calling bfd_coff_styp_to_sec_flags and pass a failure back to
273 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
274 function. Move flagword result into parameter list.
275 * libcoff.h: Regenerate.
276 * libecoff.h: Regenerate.
280 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
281 section is going to follow it.
285 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
286 with the file_align entry from elf_backend_data.
287 (elf_gc_smash_unused_vtentry_relocs): Likewise.
288 (elf_gc_record_vtentry): Likewise.
292 * elflink.h: Whitespace changes.
293 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
294 rather than "unsigned char".
295 (elf_link_output_relocs): Likewise.
296 (elf_link_input_bfd): Likewise.
297 (elf_reloc_link_order): LIkewise.
298 * elf.c: s/CONST/const/. Whitespace changes.
299 * elf32-mips.c: Formatting fix.
301 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
302 * Makefile.in: Regenerate.
303 * po/Make-in: Remove trailing tab.
307 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
309 (elf32_arm_plt_entry): Likewise.
313 * elf.c (swap_out_syms): Keep names for global section symbols.
317 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
318 MIPS-based machines need it.
322 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
325 * config.bfd: Remove ecoff from Linux/mips.
329 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
331 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
332 alignment of 8 for .rela sections; handle further relocations.
336 * coff-z8k.c: Fix formatting.
337 Fix howtos: howto->size was always 1.
341 * configure.host (mips64*-*-linux*): Define.
345 * elf32-i386.c (elf_i386_discard_copies): Rename to
346 discard_copies, and use elf_link_hash_entry arg rather than
347 elf_i386_link_hash_entry.
348 (elf_i386_link_hash_traverse): Delete.
349 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
350 Tidy sizing of dynamic sections.
351 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
352 possible .plt entries.
353 (elf_i386_gc_sweep_hook): Likewise.
354 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
355 everything with plt.refcount <= 0.
357 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
359 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
360 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
362 (allocate_plt_and_got): ..instead do it all here. New function.
363 (elf_i386_size_dynamic_sections): Allocate local .got space and
364 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
365 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
366 rather than gc variety).
367 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
368 (elf_i386_relocate_section): Use it here and correct handling of
369 R_386_GOT32. Provide section and offset for "unresolvable
370 relocation" error message.
371 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
373 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
374 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
375 (elf_i386_link_hash_table_create): Init them.
376 (create_got_section): New function.
377 (elf_i386_create_dynamic_sections): New function.
378 (elf_backend_create_dynamic_sections): Set to above.
379 (elf_i386_check_relocs): Use shortcuts from hash table rather than
380 calling bfd_get_section_by_name.
381 (elf_i386_gc_sweep_hook): Likewise.
382 (elf_i386_adjust_dynamic_symbol): Likewise.
383 (elf_i386_size_dynamic_sections): Likewise.
384 (elf_i386_relocate_section): Likewise.
385 (elf_i386_finish_dynamic_sections): Likewise.
387 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
391 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
393 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
397 * aout-cris.c (MACHTYPE_OK): New. Defined.
401 * section.c (_bfd_strip_section_from_output): Handle NULL
406 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
407 rs6000coff64_vec only if BFD64 is defined.
408 (powerpc64-*-aix*): Enable only if BFD64 is defined.
412 * coff-ia64.c (ia64coff_object_p): Rewrite with
413 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
417 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
418 relocation, small reformatting.
422 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
423 (elf64_x86_64_relocate_section): Likewise.
427 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
428 millicode. Don't allocate .got and .rela.got space here..
429 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
430 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
432 (hppa_handle_PIC_calls): ..nor here..
433 (allocate_plt_and_got): ..instead do it all here. New function.
434 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
435 call allocate_plt_and_got. No need to zap .got if not dynamic.
436 (elf32_hppa_final_link): Call regular bfd_final_link instead of
437 gc_common_final_link.
438 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
439 (elf32_hppa_relocate_section): Use it here.
440 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
441 dynamic_sections_created.
442 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
446 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
447 generic version since we want a hashsize of 4.
448 (elf_backend_size_info): Likewise.
452 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
454 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
455 (elf_link_input_bfd): Likewise.
456 (elf_reloc_link_order): Likewise.
457 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
458 relocations correctly.
462 * elf32-arm.h: fix PLT generation for big endian ARM
466 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
467 for symbols forced local that need plabels.
468 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
469 .plt.rela for local syms if non-shared.
470 (hppa_build_one_stub): Mask lsb of plt.offset.
471 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
472 (clobber_millicode_symbols): Correct comment.
473 (elf32_hppa_relocate_section): Likewise.
474 (elf32_hppa_finish_dynamic_symbol): Likewise.
478 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
479 * bfd-in2.h: Regenerate.
480 * libbfd.h: Regenerate.
481 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
482 and BFD_RELOC_SPARC_UA64 mapping
483 * elf64-sparc.c: Likewise.
487 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
488 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
489 (coff-rs6000.lo): Remove the old dependency.
490 * Makefile.in: Rebuild.
492 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
497 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
498 rs6000coff_core_file_matches_executable_p,
499 rs6000coff_core_file_failing_command and
500 rs6000coff_core_file_failing_signal only if AIX_CORE is
502 (pmac_xcoff_vec): Likewise.
503 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
507 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
508 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
512 * bfd-in2.h: Regenerated.
513 * libcoff.h: Likewise.
517 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
518 undefined millicode syms in shared libs.
519 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
520 (elf32_hppa_check_relocs): Likewise.
521 (elf32_hppa_adjust_dynamic_symbol): Likewise.
522 (elf32_hppa_size_dynamic_sections): Likewise.
523 (elf32_hppa_relocate_section): Likewise.
524 (elf32_hppa_finish_dynamic_symbol): Likewise.
525 (elf32_hppa_finish_dynamic_sections): Likewise.
529 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
530 xcoff-target.h not used to define rs6000 or ppc bfd.
533 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
536 * coff-rs6000.c : Many changes for 64 bit support. Move common
537 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
540 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
541 linker now supported. Explictly define the rs6000coff64_vec.
543 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
544 (coff_print_aux) same
545 (coff_write_object_contents) same
546 (coff_slurp_line_table) same
548 * coffgen.c : (coff_fix_symbol_name) formatting
549 (coff_mangle_symbols) xcoff 64 bit support
550 (coff_write_symbol) same
551 (coff_write_alien_symbol) same
552 (coff_write_native_symbol) same
553 (coff_write_symbols) same
554 (coff_get_symbol_info) same
555 (bfd_coff_get_syment) same
556 (coff_print_symbol) same
558 * config.bfd : add powerpc64-*-aix* target
560 * libcoff-in.h : formatting
562 * libcoff.h : move xcoff extern declarations to libxcoff.h
564 * libxcoff.h : New file
566 * xcofflink.c : Many changes for xcoff64 support. Move common
567 structures to include/coff/xcoff.h. Move specific structure to
568 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
569 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
571 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
574 (xcoff_build_ldsyms) : handle special __rtinit symbol.
578 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
583 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
584 * libbfd.h: Regenerate.
585 * bfd-in2.h: Regenerate.
587 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
588 * archures.c (bfd_mach_mips12000): Define.
589 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
590 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
592 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
593 * bfd-in2.h: Regenerate.
594 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
598 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
599 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
600 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
605 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
606 of entries in a structured section.
607 * elf.c: Use new macro.
608 * elf32-i386.c: Use new macro.
609 * elf32-mips.c: Use new macro.
610 * elf64-alpha.c: Use new macro.
611 * elf64-sparc.c: Use new macro.
612 * elfcode.h: Use new macro.
613 * elflink.h: Use new macro.
617 * bfdint.texi: Replace -oformat with --oformat.
621 * dwarf2.c (decode_line_info): Fix error message.
622 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
623 adjust error message.
627 * elflink.h (elf_link_add_object_symbols): Revert the last
632 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
633 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
634 (hppa_build_one_stub): Add an assert to check plt.offset.
638 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
639 version definition to basename of the output filename.
643 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
644 basename of the bfd filename.
648 * section.c (asection): Add linker_has_input field.
649 (STD_SECTION): Adjust initialization to suit.
650 * ecoff.c (bfd_debug_section): Likewise.
651 * bfd-in2.h: Regenerate.
655 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
656 negative 32-bit operands to 16 operands when the operand is
657 going to be zero-extended by the modified opcode.
661 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
662 name for 'arc5' core versions.
663 (bfd_arc_arch): Make bfd_mach_arc_6 default.
665 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
667 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
671 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
673 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
674 to .gnu.linkonce.t.FOO text section.
678 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
679 fields, change sec into secinfo.
680 (struct sec_merge_info): Add chain, remove last fields.
681 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
682 (sec_merge_hash_lookup): If lookup could not use a string only
683 because it has bad alignment, mark the old string for deletion.
684 (sec_merge_add): Add secinfo argument. Don't compute entry's
685 position, instead record the section.
686 (sec_merge_emit): Update for the sec into secinfo change in
687 struct sec_merge_hash_entry.
688 (_bfd_merge_section): Only record the section for merging, defer
689 putting strings into the hash table.
690 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
691 _bfd_merge_sections): New functions.
692 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
694 * libbfd-in.h (_bfd_merge_sections): Add prototype.
695 (_bfd_nolink_bfd_merge_sections): Define.
696 * libbfd.h: Likewise.
697 (bfd_generic_merge_sections): Add prototype.
698 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
699 (struct bfd_target): Likewise.
700 * bfd.c (bfd_merge_sections): Define.
701 * bfd-in2.h: Rebuilt.
702 * elf.c (_bfd_elf_merge_sections): New function.
703 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
704 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
705 * reloc.c (bfd_generic_merge_sections): New function.
706 * vms.c (vms_bfd_merge_sections): New function.
707 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
708 * aout-target.h (MY_bfd_merge_sections): Define.
709 * aout-tic30.c (MY_bfd_merge_sections): Define.
710 * binary.c (binary_bfd_merge_sections): Define.
711 * bout.c (b_out_bfd_merge_sections): Define.
712 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
713 * coffcode.c (coff_bfd_merge_sections): Define.
714 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
715 * i386msdos.c (msdos_bfd_merge_sections): Define.
716 * i386os9k.c (os9k_bfd_merge_sections): Define.
717 * ieee.c (ieee_bfd_merge_sections): Define.
718 * ihex.c (ihex_bfd_merge_sections): Define.
719 * nlm-target.h (nlm_bfd_merge_sections): Define.
720 * oasys.c (oasys_bfd_merge_sections): Define.
721 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
722 * som.c (som_bfd_merge_sections): Define.
723 * srec.c (srec_bfd_merge_sections): Define.
724 * tekhex.c (tekhex_bfd_merge_sections): Define.
725 * versados.c (versados_bfd_merge_sections): Define.
726 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
730 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
731 to be unsigned long, in order to match its use.
735 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
740 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
741 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
742 Remove the unused veriable `dynver'.
746 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
748 (coff_i386_rtype_to_howto): Don't dump core if output section
753 * ecoff.c (bfd_debug_section): Fix initialization.
754 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
755 is always a positive integer. Cast away sign mismatch.
756 * elf32-mips.c: Fix misleading comment and typo.
757 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
759 * elflink.c: Fix typo.
760 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
761 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
765 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
769 * elf32-arm.h (elf32_arm_final_link_relocate): Set
770 EF_ARM_HASENTRY if the start address is set.
774 * targets.c (_bfd_target_vector_entries): Compute value based on
775 the size of the _bfd_target_vector and not bfd_target_vector.
779 * elfcode.h: Include "libiberty.h".
781 * elflink.h (elf_link_add_object_symbols): Set
782 elf_dt_name (abfd) to basename of the bfd filename.
783 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
788 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
789 (elf_generic_info_to_howto_rel): Likewise.
790 * coff-alpha.c (reloc_nil): Likewise.
791 (alpha_ecoff_bad_format_hook): Likewise.
792 (alpha_adjust_reloc_out): Likewise.
793 (alpha_bfd_reloc_type_lookup): Likewise.
794 (alpha_convert_external_reloc): Likewise.
795 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
796 (elf64_alpha_reloc_bad): Likewise.
797 (elf64_alpha_reloc_gpdisp): Likewise.
798 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
799 (elf64_alpha_info_to_howto): Likewise.
800 (elf64_alpha_add_symbol_hook): Likewise.
801 (elf64_alpha_create_got_section): Likewise.
802 (elf64_alpha_is_local_label_name): Likewise.
803 (elf64_alpha_merge_ind_symbols): Likewise.
804 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
805 (mips_elf64_get_reloc_upper_bound): Likewise.
806 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
807 (nlm_alpha_get_public_offset): Likewise.
811 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
812 about overflow in R_OPENRISC_LO_16_IN_INSN and
813 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
817 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
818 only for ELF_LINK_FORCED_LOCAL.
819 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
820 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
821 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
823 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
824 if the symbol has hidden or internal visibility.
828 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
829 calls to undefined weak symbols.
833 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
834 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
838 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
840 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
841 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
842 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
847 * config.bfd: Add arm-vxworks target.
848 * coff-arm (coff_arm_relocate_section): Add in symbol value to
849 addend (fro VXworks targets).
853 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
858 * bfd-in.h (bfd_cache_close): Declare newly exported function.
859 * bfd-in2.h: Regenerated.
863 * merge.c (struct sec_merge_hash_entry): Add alignment field.
864 (struct sec_merge_hash): Remove alignment_power.
865 (sec_merge_hash_newfunc): Clear alignment.
866 (sec_merge_hash_lookup): Pass alignment as argument.
867 Use hashp->root.next, not hashp->next to walk the hash chain.
868 If a string already in the hashtable does not have required
869 alignment, create a new hashtable entry.
870 (sec_merge_init): Remove alignment_power argument.
871 (sec_merge_add): Add alignment argument.
872 (sec_merge_emit): Alignment is now a per-entity thing, not per
874 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
875 for proper alignment.
876 Pass alignment information to sec_merge_add.
880 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
881 and R_REL16 reloc types; accept odd values for R_REL16 type
885 * cpu-openrisc.c: New file.
886 * elf32-openrisc.c: Likewise.
888 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
889 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
890 (BFD32_BACKENDS): Add elf32-openrisc.lo.
891 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
892 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
893 * Makefile.in: Regenerated.
894 * config.bfd: (openrisc-*-elf): New target.
895 * configure.in (bfd_elf32_openrisc_vec): New vector.
896 * configure: Regenerated.
897 * libbfd.h: Regenerated.
898 * bfd-in2.h: Regenerated.
899 * reloc.c: Add OpenRISC relocations.
900 * targets.c (bfd_elf32_openrisc_vec): Declare.
901 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
902 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
903 (bfd_openrisc_arch): Declare.
904 (bfd_archures_list): Add bfd_openrisc_arch.
905 * elf.c (prep_headers): Add bfd_arch_openrisc.
909 * elf64-x86-64.c: Add c++ vtable hack.
910 Small whitespace and comment changes.
914 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
915 (elf64_x86_64_plt_entry): Likewise.
916 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
917 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
921 * elf32-cris.c: Tweak comments related to dynamic linking.
922 (cris_elf_relocate_section): When not creating shared object, fill
923 in the .got table for any symbol not in the dynamic symbol table.
924 (elf_cris_finish_dynamic_symbol): When not creating shared object,
925 only emit a .got.rela reloc if the symbol is in the dynamic symbol
927 (cris_elf_check_relocs): Use variable r_type in all places rather
928 than the original expression. Add default case in switch for
930 (elf_cris_size_dynamic_sections): Iterate over
931 elf_cris_discard_excess_program_dynamics when not creating shared
933 (elf_cris_discard_excess_dso_dynamics): Renamed from
934 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
935 (elf_cris_discard_excess_program_dynamics): New.
939 * coffcode.h (coff_write_object_contents): Use
940 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
944 * bfd-in2.h: Regenerate.
948 * section.c (STD_SECTION): Add entsize.
952 * section.c (SEC_MERGE): Define new flag for merging.
953 (SEC_STRINGS): Likewise.
954 (entsize): New field.
958 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
959 flag on pe-i386 targets.
963 * libbfd-in.h (_bfd_merge_section): New.
964 (_bfd_write_merged_section): New.
965 (_bfd_merged_section_offset): New.
967 * linker.c (_bfd_generic_link_output_symbols): Handle
969 * aoutx.h (aout_link_write_symbols): Likewise.
970 * pdp11.c (aout_link_write_symbols): Likewise.
971 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
972 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
974 (elf_link_sec_merge_syms): New.
975 (elf_link_input_bfd): Call _bfd_merged_section_offset
976 and _bfd_write_merged_section.
977 Handle discard_sec_merge.
978 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
980 (struct bfd_elf_section_data): Likewise.
981 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
982 SEC_STRINGS section flags and entsize from their ELF counterparts.
983 (_bfd_elf_link_hash_table_init): Initialize merge_info.
984 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
985 from their BFD counterparts.
987 * Makefile.am: Add strtab.lo.
988 * Makefile.in: Rebuilt.
992 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
993 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
997 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
998 endian MIPS ELF target.
999 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1002 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1003 64bit big endian MIPS ELF target.
1004 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1005 endian MIPS ELF target.
1006 * configure: Regenerated.
1008 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1009 little endian targets.
1010 (mips_elf_sym_is_global): Handle traditional targets.
1012 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1013 64bit big endian MIPS ELF target.
1014 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1015 endian MIPS ELF target.
1017 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1018 and bfd_elf64_tradlittlemips_vec.
1022 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1023 ordinary "progbits" section.
1027 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1028 when -Bsymbolic causes a symbol to no longer need a .plt entry.
1032 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1036 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1037 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1041 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1042 if there are any relocations for generic ELF.
1043 (bfd_elf32_bfd_link_add_symbols): Defined to
1044 elf32_generic_link_add_symbols.
1045 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1046 if there are any relocations for generic ELF.
1047 (bfd_elf64_bfd_link_add_symbols): Defined to
1048 elf64_generic_link_add_symbols.
1052 * Makefile.am (BUILD_CFILES): New variable: List of C source
1053 files created in build directory.
1054 (BUILD_HFILES): New variable: List of header files created in
1057 (po/POTFILES.in): Replace rule with empty entry.
1058 (po/SRC-POTFILES.in): New rule: Create a list of source files
1059 in the source directory.
1060 (po/BLD-POTFILES.in): New rule: Create a list of source files
1061 in the build directory.
1062 (MOSTLYCLEAN): Do not delete source files created in build
1064 * Makefile.in: Regenerate.
1065 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1067 * configure: Regenerate.
1069 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1071 Add .. to the search path when building bfd.pot.
1072 Delete POTFILES when performing distclean.
1073 Add comment describing why distclean is broken in maintainer mode.
1074 * po/POTFILES.in: Delete.
1075 * po/SRC-POTFILES.in: New file.
1076 * po/BLD-POTFILES.in: New file.
1077 * po/bfd.pot: Regenerate.
1081 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
1082 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1083 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1084 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1085 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1086 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1088 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1089 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
1090 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1091 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1092 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1093 New HOWTO members for new relocs.
1094 (cris_reloc_map): Map new relocs.
1095 (ELF_DYNAMIC_INTERPRETER): Define.
1096 (PLT_ENTRY_SIZE): Define.
1097 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1098 elf_cris_pic_plt_entry): New, PLT templates.
1099 (struct elf_cris_pcrel_relocs_copied, struct
1100 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1101 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1102 (cris_final_link_relocate): Check that 16-bit GOT relocs have
1103 positive values. Adjust PCREL relocs to be relative to location
1105 (cris_elf_relocate_section): Handle relocations to dynamic
1106 objects. Handle new relocations. Call error handler when seeing
1107 non-PIC relocation for read-only sections while generating shared
1109 (cris_elf_check_relocs): Set reference counts for GOT and PLT
1111 (bfd_elf32_bfd_link_hash_table_create,
1112 elf_backend_adjust_dynamic_symbol,
1113 elf_backend_size_dynamic_sections,
1114 elf_backend_finish_dynamic_symbol,
1115 elf_backend_finish_dynamic_sections,
1116 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1117 elf_backend_hide_symbol, elf_backend_want_got_plt,
1118 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1119 elf_backend_got_header_size, elf_backend_plt_header_size):
1122 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1123 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1124 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1125 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1126 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1127 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1128 * bfd-in2.h, libbfd.h: Regenerate.
1132 (_bfd_mips_elf_relocate_section): Give a better error message when
1133 a relocation is not recognized.
1137 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1138 non-NULL before attempting to dereference.
1142 * configure.in: Remove the redundent AC_ARG_PROGRAM.
1143 * configure: Rebuild.
1147 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1148 relocation value when resolving a reference from a debugging
1153 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1154 (xcoff64_swap_sym_out): Fix syntax errors.
1158 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1162 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1163 (hppa_link_hash_newfunc): Init it.
1164 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1165 section appears to be non-PIC.
1166 (final_link_relocate): Likewise.
1167 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1168 possible candidate function, and set pic_call for those that will
1169 only have a .plt entry for the PIC call stub.
1170 (hppa_handle_PIC_calls): Set maybe_pic_call.
1174 * elf32-sh.c (sh_elf_relocate_section): Only relocation
1175 R_SH_DIR8WP* relocs if they're against external symbols, else
1176 they're just for relaxing. Validate the reloc values.
1180 * binary.c (bfd_external_binary_architecture): Declare.
1181 (binary_object_p): If bfd_external_binary_architecture is defined,
1182 set the architecture to this string.
1186 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1187 entries that could serve as a definition for a weak symbol.
1191 * Most files: Update copyright notices using Perl script created
1196 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1197 prior patch on ! defined OLD_ARM_ABI.
1201 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1202 some relocation values.
1206 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1207 of offset in BLX(1) instruction.
1208 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1209 offset in BLX(1) instruction.
1214 * coff-arm.c (coff_arm_reloc_type_lookup): Add
1215 BFD_RELOC_THUMB_PCREL_BLX.
1219 * archures.c (bfd_default_scan): Add Coldfire CPUs.
1220 * bfd-in2.h: Regenerate.
1221 * cpu-m68k.c: Add Coldfire CPUs for arch table.
1222 * ieee.c (ieee_write_processor): Set proper id for
1227 * configure.in: Add s390 target.
1228 * configure: Regenerate.
1232 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1237 * elf32-arm.h: Update mentions of renamed EF_xx constants.
1238 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1242 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1243 abfd->tdata.aout_data == NULL.
1247 * elf32-hppa.c: Correct field selector in stub comments.
1248 (clobber_millicode_symbols): Formatting fix.
1250 * configure.in: Bump version to 2.11.90.
1251 * configure: Regenerate.
1252 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1253 (CFILES): $SOURCE_CFILES + generated C files.
1254 (POTFILES): Include $HFILES not $SOURCE_HFILES.
1256 * Makefile.in: Regenerate.
1257 * doc/Makefile.in: This too.
1261 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1266 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1267 up, replacing multiple if statements with a switch.
1268 (handle_COMDAT): New function.
1272 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1273 a warning for section flags we do not handle instead of
1278 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1282 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1283 * configure.in: Add objects for elf64_ia64_aix vectors.
1284 * configure: Regenerated.
1285 * configure.host: Recognize ia64-*-aix*.
1286 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
1287 for AIX. AIX5 requires most relocations to be dynamic (*all*
1288 binaries are somewhat similar to shared libraries).
1289 * targets.c: Add elf64_ia64_aix vectors.
1293 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1294 C8 said "1" instead of "8". Clarify error string for IMM22:
1295 "signed integer" instead of just "integer".
1299 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1300 PLT entries that could serve as a definition for a weak symbol.
1304 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1305 entries that could serve as a definition for a weak symbol.
1306 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1308 2001-02-18 David O'Brien <obrien@FreeBSD>
1310 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1311 FreeBSD/i386-CURRENT differently until I can figure out the needed
1313 * configure: Regenerate.
1314 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1315 FreeBSD/PowerPC, and FreeBSD/sparc64.
1319 * Makefile.am: Add PDP-11 a.out target.
1320 * config.bfd: Likewise.
1321 * configure.in: Likewise.
1322 * targets.c: Likewise.
1323 * archures.c: Likewise.
1324 * bfd-in2.h: Likewise. Add PDP-11 relocations.
1325 * libbfd.h: Add PDP-11 relocations.
1326 * reloc.c: Likewise.
1327 * cpu-pdp11.c: New file.
1328 * pdp11.c: New file.
1330 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1331 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1332 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1333 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1334 (GET_MAGIC): New macro.
1335 (PUT_MAGIC): Likewise.
1336 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1340 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1341 multiarch needs it).
1345 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1350 * vms-misc.c: Fix formatting.
1354 * vms.c: Fix formatting.
1358 * elf.c (elf_find_function): New function.
1359 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1360 the file name and function name.
1364 * ecoff.c (bfd_debug_section): Update to initialise new fields in
1367 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1368 (BFD64_BACKENDS): Add pepigen.c
1369 Add rules to create peigen.c and pepigen.c from peXXigen.c.
1371 * Makefile.in: Regenerate.
1372 * configure: Regenerate.
1373 * po/POTFILES.in: Regenerate.
1374 * po/bfd.pot: Regenerate.
1378 * libcoff-in.h (pe_tdata): Add members target_subsystem and
1379 force_minimum_alignment.
1383 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1384 (elf64_86_64_size_info): Struct added to fix a problem
1385 with the hashtable string entries.
1386 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1387 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1388 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1389 remove the FIXME for this.
1390 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1391 section. Also removed the FIXME for it.
1392 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1393 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1394 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1398 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1399 and not user provided.
1403 * vms.c (vms_print_symbol): Remove unreachable code.
1405 * rs6000-core.c: Fix formatting.
1409 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1410 as _bfd_XXi_only_swap_filehdr_out.
1411 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1412 pe->force_minimum_alignment to TRUE.
1413 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1414 PEI_TARGET_SUBSYSTEM.
1415 (pe_print_private_bfd_data): Call
1416 _bfd_XX_print_private_bfd_data_common() instead of
1417 _bfd_pe_print_private_bfd_data_common().
1418 (pe_bfd_copy_private_bfd_data): Call
1419 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1420 _bfd_pe_bfd_copy_private_bfd_data_common().
1421 (coff_bfd_copy_private_section_data): Define as
1422 _bfd_XX_bfd_copy_private_section_data instead of
1423 _bfd_pe_bfd_copy_private_section_data.
1424 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1425 of a _bfd_pe_get_symbol_info.
1429 * peXXigen.c: Renamed from peigen.c.
1430 (COFF_WITH_XX): Define this macro (will get expanded into
1431 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1432 compiled as peigen.c or pepigen.c.
1433 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1434 define the canonical PEP structures and definitions.
1435 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1436 effect, enforce minimum file and section alignments. If
1437 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1438 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1439 so, by default, this is a no-op).
1441 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1442 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1443 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1444 _bfd_pefoo if it's not defined. Use these macros to define
1447 * libcoff.h (pe_tdata): Add members target_subsystem and
1448 force_minimum_alignment.
1450 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1452 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
1454 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
1457 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
1458 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
1461 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
1462 (BFD64_BACKENDS_CFILES): Mention pepigen.c
1463 (peigen.c): Add rule to generate from peXXigen.c.
1465 (pepigen.lo): List dependencies for pepigen.lo.
1469 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
1470 $global$ referenced but not defined, set its value here.
1474 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
1476 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
1478 (elf64_x86_64_relocate_section): Fix formatting.
1479 (elf64_x86_64_relocate_section): Fix addend for relocation of
1480 R_X86_64_(8|16|32|PC8|PC16|PC32).
1484 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
1488 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
1493 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1494 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
1495 relocations against dynsym symbols.
1497 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1498 the R_MIPS_26 relocation.
1499 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1500 the R_MIPS_26 relocation.
1501 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1503 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1504 the R_MIPS_26 relocation.
1505 (mips_elf64_howto_table_rela): Likewise.
1507 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1508 member to mark symbols that have non-CALL relocations against
1510 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1511 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1513 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1514 non-CALL relocation against it is encountered.
1515 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1516 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1517 no_fn_stub is not set.
1519 * elf32-mips.c (mips_elf_output_extsym): Get the output section
1520 information from the real symbol for indirect ones.
1521 Check no_fn_stub to find out if a symbol has a function stub
1526 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1527 * Makefile.in: Regenerate.
1531 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
1532 true if section name is an unwind table section name.
1533 (elfNN_ia64_additional_program_headers): Count each unwind section
1535 (elfNN_ia64_modify_segment_map): Install one unwind program header
1536 for each unwind separate section. Note: normally the linker
1537 script merges the unwind sections that go into a single segment,
1538 so this still generates at most one unwind program header per
1541 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1542 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1543 (elfNN_ia64_fake_sections): Mark sections with names that start
1544 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1547 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1548 Use it to make sh_info in unwind section point to the text section
1553 * Makefile.am: Add linux target for S/390.
1554 * archures.c: Likewise.
1555 * bfd-in2.h: Likewise.
1556 * config.bfd: Likewise.
1557 * configure.in: Likewise.
1559 * libbfd.h: Likewise.
1560 * targets.c: Likewise.
1561 * cpu-s390.c: New file.
1562 * elf32-s390.c: New file.
1563 * elf64-s390.c: New file.
1567 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1568 ImageBase. This has already been done by coff_swap_hdr_in.
1572 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1576 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1577 (sparc64_elf_relocate_section): Likewise.
1581 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1582 similar to R_SPARC_32.
1583 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1587 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
1588 relocation entries for weak definitions when building DSO with
1593 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
1594 before visibility. Locally defined protected symbols are not
1599 * config.bfd: Enable coff64 for rs6000-*. Patch from
1604 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
1605 found, do not attempt to find dwarf2 info before returning.
1609 * elflink.h (is_global_symbol_definition): Rename to
1610 is_global_data_symbol_definition and have it reject function
1612 (elf_link_is_defined_archive_symbol): Use renamed function.
1616 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
1617 * libbfd.h (bfd_target_vector): Likewise.
1618 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
1619 make static; create pointer reference named bfd_target_vector.
1620 (_bfd_target_vector_entries): Calculate this based on the array
1621 typed _bfd_target_vector.
1625 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
1626 internal symbols are not dynamic.
1627 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1631 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
1632 that it will not be pulled into the list of files that make up
1634 * Makefile.in: Regenerate.
1635 * po/bfd.pot: Regenerate.
1639 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
1641 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
1642 external_PEI_IMAGE_hdr.
1646 * elf-m10200.c: Fix formatting.
1650 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
1651 rel, it will be handled later on.
1655 * Makefile.in: Fix typo.
1659 * elf-m10300.c: Fix formatting.
1663 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
1664 (elf_backend_get_symbol_type): Define.
1665 (elf64_hppa_object_p): Set architecture and machine from elf
1670 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
1675 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
1676 for non-default visibility.
1677 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
1678 delete ugly macro and replace with pretty function.
1682 * coff-go32.c: Update copyright.
1683 * coff-stgo32.c: Likewise.
1684 * coff-go32.c (COFF_LONG_FILENAMES): Define.
1685 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
1686 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
1687 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1691 * bfd-in2.h: Rebuild.
1692 * libbfd.h: Likewise.
1696 * bfd-in2.h: Rebuild.
1700 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
1701 is NULL or PRIV(vms_rec) is outside of the buffer.
1705 * coff64-rs6000.c: Fix formatting.
1706 * coff-arm.c: Likewise.
1707 * coffgen.c: Likewise.
1708 * cofflink.c: Likewise.
1709 * coff-mcore.c: Likewise.
1710 * coff-mips.c: Likewise.
1711 * coff-pmac.c: Likewise.
1712 * coff-ppc.c: Likewise.
1713 * coff-rs6000.c: Likewise.
1714 * elf32.c: Likewise.
1715 * elf32-fr30.c: Likewise.
1716 * elf32-i370.c: Likewise.
1717 * elf32-i860.c: Likewise.
1718 * elf32-m32r.c: Likewise.
1719 * elf32-m68k.c: Likewise.
1720 * elf32-mcore.c: Likewise.
1721 * elf32-ppc.c: Likewise.
1722 * elf32-sh.c: Likewise.
1723 * elf32-v850.c: Likewise.
1724 * elf64-alpha.c: Likewise.
1725 * elf64-sparc.c: Likewise.
1726 * elflink.c: Likewise.
1727 * elflink.h: Likewise.
1728 * elf-m10200.c: Likewise.
1729 * elf-m10300.c: Likewise.
1730 * elfxx-ia64.c: Likewise.
1732 * aoutx.h: Fix formatting.
1734 * bfd-in2.h: Likewise.
1735 * bfd-in.h: Likewise.
1736 * cpu-i386.c: Likewise.
1737 * cpu-m68hc11.c: Likewise.
1738 * dwarf2.c: Likewise.
1739 * elf64-x86-64.c: Likewise.
1740 * format.c: Likewise.
1741 * freebsd.h: Likewise.
1743 * hp300hpux.c: Likewise.
1744 * hppabsd-core.c: Likewise.
1745 * hpux-core.c: Likewise.
1749 * elf64-x86-64.c: Added PIC support for X86-64.
1750 (elf64_x86_64_link_hash_newfunc): Function added.
1751 (elf64_x86_64_link_hash_table_create): Likewise.
1752 (elf64_x86_64_check_relocs): Likewise.
1753 (elf64_x86_64_gc_mark_hook): Likewise.
1754 (elf64_x86_64_gc_sweep_hook): Likewise.
1755 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1756 (elf64_x86_64_size_dynamic_sections): Likewise.
1757 (elf64_x86_64_discard_copies): Likewise.
1758 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1759 (elf64_x86_64_finish_dynamic_sections): Likewise.
1760 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
1764 * Makefile.am (install-data-local): Make use of $(DESTDIR).
1765 * Makefile.in: Regenerate.
1769 * coff-a29k.c: Fix formatting.
1773 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
1774 relocation section names.
1775 (elf_i386_relocate_section): Report files with bad relocation
1776 section names and return false.
1780 * targets.c: Alphabetize list of xvecs.
1784 * config.bfd: Add linux target variant for elfxx-hppa.
1785 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
1786 bfd_elf64_hppa_linux_vec.
1787 * configure: Regenerate.
1788 * elf64-hppa.c: Include elf64-target.h again to support linux
1790 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
1791 * elf32-hppa.c: Include elf32-target.h again to support linux
1793 (elf32_hppa_post_process_headers): New function.
1794 (elf_backend_post_process_headers): Define.
1795 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
1796 bfd_elf32_hppa_linux_vec.
1798 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
1799 and data_segment_base fields.
1800 (elf32_hppa_link_hash_table_create ): Init them.
1801 (elf32_hppa_check_relocs): Update comments.
1802 (hppa_record_segment_addr): New function.
1803 (elf32_hppa_relocate_section): Call it.
1804 (final_link_relocate): Handle R_PARISC_SEGREL32.
1805 (elf32_hppa_final_link): New function.
1806 (bfd_elf32_bfd_final_link): Define to call it.
1807 (hppa_unwind_entry_compare): New function.
1808 * cache.c (bfd_open_file): Create files in write+read mode.
1810 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
1811 SEGREL32 and numerous other relocs. Change duplicate
1812 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
1814 * opncls.c (bfd_fdopenr): Add parens like the comment says around
1817 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
1818 .plt entries for DT_INIT and DT_FINI.
1819 (elf32_hppa_finish_dynamic_sections): Remove special handling of
1820 DT_INIT and DT_FINI.
1822 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
1823 offsets for stub .plt access if wide mode. Check offset in range.
1827 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
1830 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
1835 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
1836 * configure: Regenerate.
1840 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
1841 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
1842 * cpu-arc.c (arch_info_struct): Add entries for variants.
1843 (bfd_arc_arch) Set default to bfd_mach_arc_5.
1844 (arc_get_mach) Don't assume machine names prefixed arc- before
1846 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
1848 (arc_elf_final_write_processing) Likewise.
1849 (ELF_MACHINE_CODE) Use EM_ARC.
1853 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
1862 * som.c: Fix formatting.
1866 * ecoffswap.h: Fix formatting.
1867 * elf-bfd.h: Likewise.
1868 * elfarm-nabi.c: Likewise.
1869 * elfarm-oabi.c: Likewise.
1870 * elfcode.h: Likewise.
1871 * elfcore.h: Likewise.
1872 * elflink.c: Likewise.
1873 * elflink.h: Likewise.
1874 * elfxx-ia64.c: Likewise.
1875 * elfxx-target.h: Likewise.
1876 * libbfd.c: Likewise
1877 * linker.c: Likewise.
1878 * lynx-core.c: Likewise.
1882 * pc532-mach.c: Fix formatting.
1883 * pe-arm.c: Likewise.
1884 * pe-i386.c: Likewise.
1885 * pe-mips.c: Likewise.
1886 * pe-ppc.c: Likewise.
1887 * pe-sh.c: Likewise.
1888 * pei-mips.c: Likewise.
1889 * pei-sh.c: Likewise.
1890 * peicode.h: Likewise.
1891 * ppcboot.c: Likewise.
1892 * ptrace-core.c: Likewise.
1896 * reloc.c: Fix formatting.
1897 * riscix.c: Likewise.
1898 * rs6000-core.c: Likewise.
1899 * xcoff-target.h: Likewise.
1903 * elfcode.h (elf_object_p): Also restore the bfd mach field on
1904 error, by calling bfd_default_set_arch_mach with incoming
1909 * vaxnetbsd.c: Fix formatting.
1910 * versados.c: Likewise.
1911 * vms-gsd.c: Likewise.
1912 * vms-hdr.c: Likewise.
1913 * vms-misc.c: Likewise.
1917 * archive.c (coff_write_armap): Don't write more than symbol_count
1918 `archive_member_file_ptr's.
1922 * vms-tir.c: Fix formatting.
1926 * vms.c: Fix formatting.
1931 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
1933 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
1935 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
1938 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
1940 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
1944 * libbfd.c (bfd_get_bits): Added
1945 (bfd_put_bits): Likewise
1946 * bfd-in.h: Declared the above.
1947 * bfd-in2.h: Regenerated.
1951 * targets.c: Fix formatting.
1952 * tekhex.c: Likewise.
1953 * trad-core.c: Likewise.
1957 * sco5-core.c: Fix formatting.
1958 * section.c: Likewise.
1959 * sparclinux.c: Likewise.
1960 * sparclynx.c: Likewise.
1961 * sparcnetbsd.c: Likewise.
1963 * stabs.c: Likewise.
1964 * stab-syms.c: Likewise.
1965 * sunos.c: Likewise.
1967 * sysdep.h: Likewise.
1971 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
1973 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
1974 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
1978 * vms-misc.c (_bfd_vms_get_record): Add default case to
1983 * elfcore.h (elf_core_file_p): Move to the start of the program
1984 headers before attempting to read them.
1988 * peigen.c: Fix formatting.
1994 * peigen.c: Fix formatting.
1998 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2002 * binary.c (binary_set_section_contents): Ignore sections
2007 * m68klinux.c: Fix formatting.
2008 * m68knetbsd.c: Likewise.
2009 * mipsbsd.c: Likewise.
2010 * netbsd-core.c: Likewise.
2011 * netbsd.h: Likewise.
2012 * newsos3.c: Likewise.
2013 * nlm32-alpha.c: Likewise.
2014 * nlm32-i386.c: Likewise.
2015 * nlm32-ppc.c: Likewise.
2016 * nlm32-sparc.c: Likewise.
2017 * nlmcode.h: Likewise.
2018 * nlmswap.h: Likewise.
2019 * nlm-target.h: Likewise.
2020 * ns32knetbsd.c: Likewise.
2024 * elflink.h (elf_link_output_extsym): Don't complain about undefined
2025 symbols in shared objects if allow_shlib_undefined is true.
2029 * cpu-sh.c: Fix formattng.
2030 * elf.c: Fix formattng.
2031 * elf32-mips.c: Fix formattng.
2032 * elf32-sh.c: Fix formattng.
2033 * elf64-alpha.c: Fix formattng.
2037 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2038 dwarf2_find_line_info as last parameter to invocation of
2039 _bfd_dwarf2_find_nearest_line.
2040 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2041 dwarf2_find_line_info as last parameter to invocation of
2042 _bfd_dwarf2_find_nearest_line.
2046 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2047 (BFD_LIBS): ...to here.
2048 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2049 (BFD_LIBS_CFILES): ...to here.
2050 * Makefile.in: Regenerate.
2051 * configure.in: Remove dwarf.lo from the elf shell variable.
2052 * configure: Regenerate.
2053 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2054 * libcoff.h: Regenerate.
2055 * coffgen.c (coff_find_nearest_line): Call
2056 _bfd_dwarf2_find_nearest_line.
2057 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2059 (read_abbrevs): Likewise
2060 (decode_line_info): Likewise.
2061 (parse_comp_unit): Likewise.
2062 (comp_unit_find_nearest_line): Likewise.
2063 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2064 * libbfd.h: Regenerate.
2065 * elf.c (_bfd_elf_find_nearest_line): Update call.
2066 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2067 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2068 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2069 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2070 (styp_to_sec_flags): Handle DWARF2 sections.
2071 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2072 to _bfd_find_nearest_line.
2073 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2074 call to _bfd_find_nearest_line.
2078 * coffgen.c: Fix formatting.
2079 * elf-m10300.c: Likewise.
2080 * elf32-i386.c: Likewise.
2081 * elf32-i960.c: Likewise.
2082 * elf32-m68k.c: Likewise.
2083 * elf32-mcore.c: Likewise.
2084 * elf32-ppc.c: Likewise.
2085 * elf32-sh.c: Likewise.
2086 * elf32-sparc.c: Likewise.
2087 * elf32-v850.c: Likewise.
2088 * elf64-alpha.c: Likewise.
2089 * elf64-hppa.c: Likewise.
2090 * elf64-mips.c: Likewise.
2091 * elf64-sparc.c: Likewise.
2095 * elf32-ppc.c: Fix formatting.
2096 * elf64-x86-64.c: Likewise.
2102 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2103 BFDs containing no sections or empty .text, .data or .bss sections
2104 to be merged, regardless of their flags.
2108 * elf32-m32r.c: Fix formatting.
2109 * elf32-m68hc11.c: Likewise.
2110 * elf32-m68hc12.c: Likewise.
2111 * elf32-m68k.c: Likewise.
2112 * elf32-mcore.c: Likewise.
2113 * elf32-pj.c: Likewise.
2114 * elf32-ppc.c: Likewise.
2118 * elf32-fr30.c: Fix formatting.
2119 * elf32-hppa.c: Likewise.
2120 * elf32-i370.c: Likewise.
2121 * elf32-i386.c: Likewise.
2122 * elf32-i860.c: Likewise.
2123 * elf32-i960.c: Likewise.
2127 * elf32-arm.h: Fix formatting.
2128 * elf32-avr.c: Likewise.
2129 * elf32-cris.c: Likewise.
2130 * elf32-d10v.c: Likewise.
2131 * elf32-d30v.c: Likewise.
2132 * elf-hppa.h: Likewise.
2133 * elf-m10200.c: Likewise.
2134 * elf-m10300.c: Likewise.
2138 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2139 bfd_mach_mips32_4k. Update FIXME comment.
2140 * archures.c (bfd_mach_mips32): New constant.
2141 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2142 the latter, renumber it.
2143 * bfd-in2.h (bfd_mach_mips32): New constant.
2144 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2145 the latter, renumber it.
2146 * cpu-mips.c (I_mips32): New constant.
2147 (I_mips4K, I_mips32_4k): Rename the former to the latter.
2148 (arch_info_struct): Add bfd_mach_mips32 entry, replace
2149 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2150 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2151 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
2152 with E_MIPS_MACH_MIPS32_4K.
2153 (_bfd_mips_elf_final_write_processing): Replace
2154 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2155 bfd_mach_mips32 case.
2156 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2157 comparison with support for MIPS32.
2158 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2161 * aoutx.h (NAME(aout,machine_type)): Add cases for
2162 bfd_mach_mips5 and bfd_mach_mips64.
2163 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2164 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2165 * cpu_mips.c (I_mips5, I_mips64): New definitions.
2166 (arch_info_struct): Add entries for bfd_mach_mips5 and
2168 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2169 _bfd_mips_elf_print_private_bfd_data): Add cases for
2170 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2171 (_bfd_mips_elf_final_write_processing): Add cases for
2172 bfd_mach_mips5 and bfd_mach_mips64.
2174 * aoutx.h (NAME(aout,machine_type)): Add a
2175 bfd_mach_mips_sb1 case.
2176 * archures.c (bfd_mach_mips_sb1): New constant.
2177 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2178 * cpu-mips.c (I_sb1): New constant.
2179 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2180 * elf32-mips.c (elf_mips_mach): Add case for
2182 (_bfd_mips_elf_final_write_processing): Add case for
2187 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2188 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2189 (sparc*-*-rtems*): Switched from a.out to ELF.
2193 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2194 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2195 (elf64-x86-64.lo): Add dependencies.
2196 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2197 bfd_mach_x86_64_intel_syntax.
2198 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2199 * config.bfd (x86_64): Add.
2200 * configure.in: Add support for bfd_elf64_x86_64_vec.
2201 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2202 (bfd_i386_arch, i8086_ar): Link in.
2203 * elf64-x86-64.c: New file.
2204 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2205 * targets.c (bfd_elf64_x86_64_vec): Add.
2206 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2210 * xcofflink.c: Fix formatting.
2214 * aoutx.h: Fix formatting.
2215 * bfd-in.h: Likewise.
2216 * bfd-in2.h: Likewise.
2217 * cache.c: Likewise.
2218 * cisco-core.c: Likewise.
2219 * coff64-rs6000.c: Likewise.
2220 * coffcode.h: Likewise.
2221 * coffswap.h: Likewise.
2222 * corefile.c: Likewise.
2223 * elf32-mips.c: Likewise.
2227 * aout-adobe.c: Fix formatting.
2228 * coff64-rs6000.c: Likewise.
2229 * coffgen.c: Likewise.
2230 * cofflink.c: Likewise.
2234 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2235 (obj_coff_strings_written): New accessor macro for above.
2236 * libcoff.h: Regenerate.
2237 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2239 * coffcode.h (coff_write_object_contents): No need to write out
2240 the string table if it's already been done.
2244 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2245 weak undefined symbols.
2249 * archures.c (bfd_mach_arm_5TE): Define.
2250 (bfd_mach_arm+XScale): Define.
2251 * bfd-in2.h: Regenerate.
2253 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2254 BFD_RELOC_ARM_PCREL_BLX.
2256 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2257 XScale machine numbers.
2259 * config.bfd (xscale-elf): Add target.
2260 (xscale-coff): Add target.
2262 * cpu-arm.c: Add xscale machine name.
2263 Add v5t, v5te and XScale machine numbers.
2267 * aix386-core.c: Fix formatting.
2271 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2272 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2273 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2274 (ins_imms_scaled): Initialize sign_bit at function entry.
2275 (elf64_ia64_operands): Add missing initializers.
2276 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2277 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2278 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2279 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2280 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2282 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2283 and free_extsyms at function entry.
2284 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2285 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2286 (get_got): Delete unused local srel.
2287 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2288 (elfNN_ia64_relocate_section): Delete unused local dynindx.
2292 * coff-a29k.c: Fix formatting.
2293 * coff-h8500.c: Likewise.
2294 * coff-i960.c: Likewise.
2295 * coff-ppc.c: Likewise.
2296 * coff-rs6000.c: Likewise.
2297 * coff-stgo32.c: Likewise.
2298 * coff-tic54x.c: Likewise.
2299 * coff-w65.c: Likewise.
2300 * cpu-h8500.c: Likewise.
2301 * cpu-hppa.c: Likewise.
2302 * cpu-ns32k.c: Likewise.
2303 * ecoff.c: Likewise.
2304 * ecofflink.c: Likewise.
2308 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2309 remove possibility of infinite loop.
2313 * aix386-core.c: Fix formatting.
2314 * aout-adobe.c: Likewise.
2315 * aout-arm.c: Likewise.
2316 * aout-encap.c: Likewise.
2317 * aout-ns32k.c: Likewise.
2318 * aout-target.h: Likewise.
2319 * aout-tic30.c: Likewise.
2320 * aoutf1.h: Likewise.
2321 * aoutx.h: Likewise.
2322 * archive.c: Likewise.
2323 * bfd-in.h: Likewise.
2324 * bfd-in2.h: Likewise.
2330 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2331 pltoff entries for DT_INIT and DT_FINI.
2332 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2333 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2338 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2339 (allocate_dynrel_entries): Likewise.
2340 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
2341 (set_pltoff_entry): Likewise.
2342 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2343 (elfNN_ia64_reloc_type_lookup): Likewise.
2344 (elfNN_ia64_install_value): Likewise.
2345 (elfNN_ia64_relocate_section): Likewise.
2346 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2347 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2351 * cpu-a29k.c: Fix formatting.
2352 * cpu-alpha.c: Likewise.
2353 * cpu-arm.c: Likewise.
2354 * cpu-avr.c: Likewise.
2355 * cpu-d10v.c: Likewise.
2356 * cpu-h8500.c: Likewise.
2357 * cpu-hppa.c: Likewise.
2358 * cpu-i370.c: Likewise.
2359 * cpu-i386.c: Likewise.
2360 * cpu-i960.c: Likewise.
2361 * cpu-ia64-opc.c: Likewise.
2362 * cpu-ia64.c: Likewise.
2363 * cpu-m32r.c: Likewise.
2364 * cpu-m68hc11.c: Likewise.
2365 * cpu-m68hc12.c: Likewise.
2366 * cpu-m68k.c: Likewise.
2367 * cpu-m88k.c: Likewise.
2368 * cpu-mips.c: Likewise.
2369 * cpu-ns32k.c: Likewise.
2370 * cpu-pj.c: Likewise.
2371 * cpu-powerpc.c: Likewise.
2372 * cpu-sh.c: Likewise.
2373 * cpu-sparc.c: Likewise.
2374 * cpu-tic54x.c: Likewise.
2375 * cpu-v850.c: Likewise.
2376 * cpu-vax.c: Likewise.
2377 * cpu-w65.c: Likewise.
2378 * cpu-we32k.c: Likewise.
2379 * cpu-z8k.c: Likewise.
2380 * dwarf1.c: Likewise.
2381 * dwarf2.c: Likewise.
2385 * coff-arm.c: Fix formatting.
2386 * coff-ppc.c: Likewise.
2387 * coff-rs6000.c: Likewise.
2388 * coff-sh.c: Likewise.
2389 * coff-sparc.c: Likewise.
2390 * coff-tic30.c: Likewise.
2391 * coff-tic54x.c: Likewise.
2392 * coff-tic80.c: Likewise.
2393 * coff-w65.c: Likewise.
2394 * coff-we32k.c: Likewise.
2395 * coff-z8k.c: Likewise.
2399 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2400 section with the same ALLOC|LOAD flags as the source section.
2404 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2405 by STO_ALPHA constants.
2409 * coff-pmac.c: Fix formatting.
2410 * coff-ppc.c: Likewise.
2414 * elflink.h (elf_link_add_object_symbols): Also add indirect
2415 symbols for common symbols with the default version.
2419 * section.c (STD_SECTION): Set gc_mark flag.
2423 * coff-i960.c: Likewise.
2424 * coff-m68k.c: Likewise.
2425 * coff-m88k.c: Likewise.
2426 * coff-mcore.c: Likewise.
2427 * coff-mips.c: Likewise.
2431 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2435 * coff-h8300.c: Fix formatting.
2436 * coff-h8500.c: Likewise.
2437 * coff-i386.c: Likewise.
2438 * coff-i860.c: Likewise.
2439 * coff-i960.c: Likewise.
2440 * coff-ia64.c: Likewise.
2444 * archive.c: Fix formatting.
2445 * archures.c: Likewise.
2449 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2450 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
2451 * section.c (bfd_set_section_contents): Call memcpy if
2452 section->contents set and location not equal to contents plus offset.
2456 * bfd-in.h: Fix formatting.
2457 * bfd-in2.h: Likewise.
2459 * binary.c: Likewise.
2461 * coff-a29k.c: Likewise.
2462 * coff-alpha.c: Likewise.
2463 * coff-apollo.c: Likewise.
2464 * coff-aux.c: Likewise.
2468 * aix386-core.c: Fix formatting.
2469 * aoutf1.h: Likewise.
2470 * aoutx.h: Likewise.
2471 * archures.c: Likewise.
2472 * armnetbsd.c: Likewise.
2476 * coff-h8300.c (special): Adjust reloc address.
2480 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
2481 to differentiate elf32 and elf64 on ia64.
2482 * bfd-in2.h: Regenerate.
2483 * config.bfd: Add target for "ia64*-*-hpux*".
2484 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
2485 * configure: Regenerate.
2486 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
2487 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
2489 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
2490 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
2491 * Makefile.in: Regnerate.
2492 * elf64-ia64.c: Deleted.
2493 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2497 * aout-adobe.c: Fix formatting.
2498 * aout-arm.c: Likewise.
2499 * aout-cris.c: Likewise.
2500 * aout-encap.c: Likewise.
2501 * aout-ns32k.c: Likewise.
2502 * aout-target.h: Likewise.
2503 * aout-tic30.c: Likewise.
2507 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2508 BFDs containing no sections to be merged, regardless of their flags.
2512 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2513 if a relocation for an undefined symbol also results in an
2518 * config.bfd: Add support for Sun Chorus.
2522 * configure.in: Recognize alpha-*-freebsd*.
2523 * configure: Regenerate.
2527 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2528 (Chunk): New global variable set by a parameter in objcopy.c.
2529 (S3Forced): New global variable set by a parameter in
2531 (srec_set_section_contents): If S3Forced is true, always generate
2533 (srec_write_section): Use 'Chunk' to limit maximum length of S
2538 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2539 * Makefile.in: Regenerate.
2540 * bfd-in2.h: Regenerate.
2541 * po/bfd.pot: Regenerate.
2545 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2546 EF_SOFT_FLOAT if it is defined.
2550 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2551 attempts to mix PIC code with non-PIC, just mark the output as
2552 being position dependent.
2553 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
2554 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
2555 all mismatches, not just the first one.
2559 * ieee.c (ieee_archive_p): Plug one of many possible
2560 memory leaks in error handling.
2564 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2565 elf32_sparc_object_p, elf32_sparc_final_write_processing):
2567 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2568 sparc64_elf_object_p): Support v9b.
2569 * archures.c: Declare v8plusb and v9b machines.
2571 * cpu-sparc.c: Ditto.
2575 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2578 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2579 (SYMBOL_CALLS_LOCAL): New macro.
2580 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2581 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2582 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2583 (ppc_elf_relocate_section): Use flag variable to determine
2584 whether the relocation refers to a local symbol.
2585 Test whether a PLTREL24 reloc will produce a reloc by looking
2586 to see whether a PLT entry was made.
2590 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
2591 entries that could serve as a definition for a weak symbol.
2597 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
2598 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
2599 against local symbols.
2600 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2604 * section.c (struct sec): Add kept_section.
2605 (struct bfd_comdat_info): Remove sec, we can use above.
2606 (STD_SECTION): Add initializer.
2607 (bfd_make_section_anyway): Init here too.
2609 * bfd-in2.h: Regenerate.
2611 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
2613 (elf_link_input_bfd): Set all asection->symbol->value's here, and
2614 fudge values for discarded link-once section symbols.
2616 * elf64-hppa.c: Include alloca-conf.h
2620 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
2622 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
2626 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
2630 * section.c (bfd_make_section_anyway): Release newsect ptr when
2631 newsect->symbol fails to alloc. Use bfd_release instead of free.
2635 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
2636 (elf64_ia64_unwind_entry_compare): New.
2637 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2641 * elflink.h (size_dynamic_sections): Don't create various tags if
2642 .dynstr is excluded from the link. Don't set first dynsym entry
2643 if dynsymcount is zero.
2644 (elf_bfd_final_link): Don't try to swap out dynamic syms if
2645 .dynsym excluded from the link. Don't try to write any dynamic
2646 sections excluded from the link.
2648 * elf.c (swap_out_syms): Handle global section symbols.
2652 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
2653 * coffcode.h (coff_set_alignment_hook): read extended reloc count
2654 (coff_write_relocs): write extended reloc count
2655 (coff_write_object_contents): account for extended relocs
2659 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
2661 * elf.c (_bfd_elf_make_section_from_shdr): Call the
2662 elf_backend_section_flags function.
2663 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
2665 (elf64_ia64_section_flags): New function containing flag conversion
2667 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
2668 * elfxx-target.h (elf_backend_section_flags): Define.
2669 (elfNN_bed): Initialize elf_backend_section_flags field.
2673 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
2674 _bfd_elf32_gc_record_vtable. Correct a comment.
2680 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
2681 produces binaries with got[1] = 0x80000001 to differenciate them
2682 for the dynamic linker from the broken binaries produced by old
2687 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
2688 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
2689 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
2690 * configure: Regenerate.
2694 Define two bfd_targets for absence and presence of leading
2695 underscore on symbols. Make sure to only link same kind.
2696 * elf32-cris.c (cris_elf_object_p,
2697 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
2698 cris_elf_merge_private_bfd_data): New.
2699 (elf_backend_object_p, elf_backend_final_write_processing,
2700 bfd_elf32_bfd_print_private_bfd_data,
2701 bfd_elf32_bfd_merge_private_bfd_data): Define.
2702 <Target vector definition>: Include elf32-target.h twice with
2703 different macro settings:
2704 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
2705 bfd_elf32_us_cris_vec.
2706 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
2707 (elf_symbol_leading_char): First as 0, then '_'.
2708 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
2709 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
2710 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
2711 * configure: Regenerate.
2712 * targets.c: Declare bfd_elf32_us_cris_vec.
2713 * po/bfd.pot: Regenerate.
2717 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
2718 R_ARM_THM_PC22 relocations.
2722 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
2726 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
2727 is has the SEC_HAS_CONTENTS flag set.
2732 * aout-cris.c (N_TXTADDR): Define.
2736 * som.c: Include alloca-conf.h.
2737 * Makefile.am: "make dep-am"
2738 * Makefile.in: Regenerate.
2742 * elf32-hppa.c (plt_stub): New.
2743 (PLT_STUB_ENTRY): Define.
2744 (elf32_hppa_link_hash_table): Change multi_subspace to packed
2745 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
2746 (elf32_hppa_link_hash_table_create): Init to suit.
2747 (elf32_hppa_check_relocs): Set has_12bit_branch and
2748 has_17bit_branch as appropriate.
2749 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
2750 non-local functions.
2751 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
2752 Add space for plt_stub as needed.
2753 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
2754 functions at plt_stub.
2755 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
2756 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
2758 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
2759 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
2760 of fixed size, and if negative, disable handling of input sections
2761 before stub section. Set up default stub group size depending
2762 on detected branch relocs.
2763 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
2764 ensure different offsets from sym_value aren't rounded to
2765 different 2k blocks. Use lrsel and rrsel for other stubs too for
2766 consistency rather than necessity.
2767 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
2768 (final_link_relocate): Likewise.
2769 (elf32_hppa_relocate_section): Likewise.
2771 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
2772 (_bfd_elf_hppa_gen_reloc_type): Generate them.
2773 (elf_hppa_final_link_relocate): Handle them.
2774 (elf_hppa_relocate_insn): Likewise.
2775 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
2779 * elfcode.h (elf_object_p): Preserve and clear abfd section
2780 information. Restore at error.
2784 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
2785 is empty, make sure that its rva also 0. NT loader dislikes
2790 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
2795 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
2796 currently unused RELATIVE_DYNAMIC_RELOCS code.
2797 (hppa_discard_copies): Likewise.
2798 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
2799 comments. Don't check non-code output sections for stub grouping.
2803 * section.c (bfd_get_unique_section_name): Return NULL if
2808 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
2809 instruction sequence to actually work.
2810 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
2815 * elf32-sh.c (sh_elf_relocate_section): Use
2816 _bfd_final_link_relocate to apply the relocation against a section
2817 symbol, when doing relocatable links.
2821 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
2823 (stub_hash_newfunc): Here too.
2824 (hppa_add_stub): And here.
2825 (elf32_hppa_link_hash_table): Remove stub_section_created,
2826 reloc_section_created, first_init_sec and first_fini_sec. Add
2828 (elf32_hppa_link_hash_table_create): Init to suit.
2829 (hppa_get_stub_entry): Add support for grouping stub sections.
2830 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
2831 section code. Index stub vars by section->id.
2832 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
2833 exit paths. Zap allocation of above removed vars. Refine
2836 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
2837 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2838 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
2839 rather than pointer to bfd_link_info.
2840 (hppa_add_stub): Likewise.
2841 (final_link_relocate): Likewise.
2845 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
2850 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
2851 ld/emulparams/shelf.sh.
2855 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
2856 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
2857 * bfd-in2.h: Regenerate.
2861 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
2862 LITUSE relocations incorrectly if -relax is specified on the ld
2863 command line and the displacement field of the load or store
2868 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
2869 first_fini_sec here.
2870 (elf32_hppa_size_stubs): Instead correctly find the first .init
2871 and .fini section here.
2875 * elf32-hppa.c (clobber_millicode_symbols): New function.
2876 (elf32_hppa_size_dynamic_sections): Call it.
2880 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
2881 packed. Add plabel, plt_abs packed booleans.
2882 (hppa_link_hash_newfunc): Init new fields.
2883 (PLABEL_PLT_ENTRY_SIZE): Define.
2884 (hppa_stub_name): Use size_t len vars.
2885 (hppa_add_stub): Likewise.
2886 (elf32_hppa_build_stubs): Likewise.
2887 (hppa_build_one_stub): Kill some compiler warnings.
2888 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
2889 if dynamic linking. Munge the local plt offsets into
2890 local_got_refcounts. Set h->plabel for all global PLABELs. Use
2891 size_t len vars. Add assert for plabel addend.
2892 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
2893 (elf32_hppa_hide_symbol): New function.
2894 (elf_backend_hide_symbol): Define.
2895 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
2896 with h->plabel set. Don't make plt entries to have dynamic syms
2897 when they have been forced local. If plt entry is used by a
2898 plabel, make it PLABEL_PLT_ENTRY_SIZE.
2899 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
2900 Set up .plt offsets for local syms.
2901 (elf32_hppa_relocate_section): Initialise plt entries for local
2902 syms. Leave weak undefined plabels zero. Make global plabel
2903 relocs against function symbol, and leave the addend zero.
2904 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
2905 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
2906 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
2907 relocs instead of SEGREL32 for dynamic got relocs.
2908 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
2909 (elf_backend_got_header_size): Adjust.
2910 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
2912 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
2913 (hppa_type_of_stub): Use it instead of #if 0
2914 (hppa_discard_copies): Use it here too.
2915 (elf32_hppa_size_dynamic_sections): And here.
2917 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
2918 (elf32_hppa_link_hash_table_create): And here.
2919 (hppa_build_one_stub): And here. Instead keep track of stub
2920 offset using _raw_size.
2921 (elf32_hppa_size_stubs): Likewise.
2922 (elf32_hppa_build_stubs): Likewise.
2923 (hppa_size_one_stub): Likewise. Resize reloc section too.
2925 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
2926 first_fini_sec handling. Don't search for reloc section or set
2927 hplink->reloc_section_created here.
2928 (elf32_hppa_size_stubs): Instead search for reloc sections, and
2929 set reloc_section_created here.
2930 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
2931 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
2933 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
2935 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
2936 with `hplink->root.'.
2937 (elf32_hppa_check_relocs): Likewise.
2938 (elf32_hppa_gc_sweep_hook): Likewise.
2939 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2940 (hppa_handle_PIC_calls): Likewise.
2941 (elf32_hppa_size_dynamic_sections): Likewise.
2942 (elf32_hppa_set_gp): Likewise.
2943 (elf32_hppa_relocate_section): Likewise.
2944 (elf32_hppa_finish_dynamic_symbol): Likewise.
2945 (elf32_hppa_finish_dynamic_sections): Likewise.
2948 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
2949 defined weak symbols in shared links.
2950 (final_link_relocate): Calls to defined weak symbols in shared
2951 objects must go via import stubs, as the target might not be known
2956 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
2957 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
2958 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
2959 the original entries with EMPTY_HOWTOs, and added new ones to fill
2961 (sh_elf_info_to_howto): Make sure the new gap isn't used.
2962 (sh_elf_relocate_section): Likewise.
2966 * cpu-mips.c (arch_info_struct): Add mips:4K
2967 * bfd-in2.h (bfd_mach_mips4K): New define.
2968 * archures.c: Add bfd_mach_mips4K to comment.
2969 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
2970 E_MIPS_ARCH_2 for bfd_mach_mips4K.
2974 * som.c (som_write_symbol_strings): Do not used fixed buffers,
2975 use size_t as a counter.
2976 (som_write_space_strings): Similarly.
2980 * elf32-i860.c (elf32_i860_relocate_pc26): New function
2982 (elf32_i860_relocate_section): Invoke new function from here.
2986 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
2991 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
2992 target section name instead of dumping core when the target symbol is
2997 * riscix.c: Remove DEFUN.
3001 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3002 initialise flags in output bfd if the input bfd is the default
3003 architecture with the default flags.
3007 * archive.c: Fix formatting.
3008 * coff-arm.c: Likewise.
3009 * doc/chew.c: Likewise.
3013 * section.c (bfd_get_unique_section_name): Put a dot before the
3018 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3019 * elf.c: Fix formatting.
3023 * config.bfd (sh-*-linux*): Added.
3024 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3025 * targets.c: Declare them.
3026 * elf32-sh-lin.c: New file.
3027 * Makefile.am: Compile it.
3028 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3029 * configure, Makefile.in: Rebuilt.
3033 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3034 pseduo-section when determining where the TOC ends.
3036 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3037 output x_tvndx as it is only two bytes wide.
3039 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3040 reloc is 26 or 32 bits wide.
3042 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3043 for relocs that don't change anything. Also look at the full
3048 * config.bfd (arm*-*-uclinux*): New target.
3052 * configure: Rebuilt with new libtool.m4.
3056 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3057 word for variable name.
3058 * bfd-in2.h: Regenerate.
3062 * config.in: Regenerate.
3063 * libbfd.h: Regenerate.
3064 * po/bfd.pot: Regenerate.
3065 * doc/bfdint.texi: Remove CVS date string - it foils compares with
3070 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
3074 Shared library and PIC support.
3075 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3076 (GOT_ENTRY_SIZE): New.
3077 (ELF_DYNAMIC_INTERPRETER): New.
3078 (STUB_SUFFIX): Define.
3079 (LONG_BRANCH_PIC_IN_SHLIB): Define.
3080 (RELATIVE_DYNAMIC_RELOCS): Define.
3081 (enum elf32_hppa_stub_type): New.
3082 (struct elf32_hppa_stub_hash_entry): Rename offset to
3083 stub_offset. Add a number of new fields.
3084 (struct elf32_hppa_link_hash_entry): New.
3085 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
3087 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3088 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3089 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
3091 (hppa_link_hash_newfunc): New function.
3092 (elf32_hppa_link_hash_table_create): Use above function. Init new
3094 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
3095 instead of addend, and remove sym_name from args. Don't use
3096 symbol name for local syms, instead use sym index.
3097 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3098 stub type rather than size. Pass in hash and handle import stub
3099 case. Also pass in reloc instead of offset so we can calculate
3100 PCREL22F and PCREL12F branches properly.
3101 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
3102 import and export stubs too.
3103 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
3104 import and export stub sizing.
3105 (elf32_hppa_check_relocs): New function.
3106 (elf32_hppa_adjust_dynamic_symbol): New function.
3107 (hppa_discard_copies): New function.
3108 (elf32_hppa_size_dynamic_sections): New function.
3109 (elf_backend_size_dynamic_sections): Define.
3110 (elf32_hppa_finish_dynamic_symbol): New function.
3111 (elf_backend_finish_dynamic_symbol): Define.
3112 (elf32_hppa_size_stubs): Stash params in link hash table, and move
3113 some local vars into the link hash table too. For shared links,
3114 trundle over function syms, generating export stubs. Handle
3115 PCREL22F branches. Break out stub creation code from here..
3116 (hppa_add_stub): .. to here. New function.
3117 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3118 call the bfd linker. Use elf_gp to record global pointer.
3119 Calculate a value from sections if $global$ is missing.
3120 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3121 (elf32_hppa_gc_mark_hook): New function.
3122 (elf_backend_gc_mark_hook): Define.
3123 (elf32_hppa_gc_sweep_hook): New function.
3124 (elf_backend_gc_sweep_hook): Define.
3125 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3126 Add rel to args, and remove howto, input_bfd, offset, addend,
3127 sym_name as we can recalculate these locally. Handle calls to
3128 dynamic objects, extra PIC relocs, PCREL22F branches. Change
3129 handling of undefined weak syms. Check that stubs are in range.
3130 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
3131 message on hitting a DPREL21L reloc that needs fixing. Subtract
3132 off PC for PCREL14F. Break out code that does a stub lookup from
3134 (hppa_get_stub_entry): ..to here. New function.
3135 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3136 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3138 (elf32_hppa_finish_dynamic_sections): New function.
3139 (elf_backend_finish_dynamic_sections): Define.
3140 (elf_backend_final_write_processing) Define.
3141 (hppa_handle_PIC_calls): New function.
3142 (elf32_hppa_build_stubs): Call it. Pass link_info to
3143 hppa_build_one_stub.
3144 (elf32_hppa_create_dynamic_sections): New function
3145 to create .plt and .got then set .plt flags correctly.
3146 (elf_backend_create_dynamic_sections): Define.
3147 (elf32_hppa_object_p): New function.
3148 (elf_backend_object_p): Define.
3149 (elf32_hppa_elf_get_symbol_type): New function.
3150 (elf_backend_get_symbol_type): Define.
3151 (elf_backend_can_gc_sections): Define.
3152 (elf_backend_want_got_plt): Define.
3153 (elf_backend_plt_alignment): Set to 2.
3154 (elf_backend_plt_readonly): Define.
3155 (elf_backend_want_plt_sym): Define.
3156 (elf_backend_got_header_size): Reserve one entry.
3158 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3159 (elf32_hppa_size_stubs): Pass in multi_subspace.
3160 (elf32_hppa_set_gp): Declare.
3162 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3163 (bfd_get_unique_section_name): New function.
3164 * bfd-in2.h: Regenerate.
3166 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3167 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3171 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3172 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3173 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3174 been updated in finish_dynamic_symbol before modifying function
3177 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3178 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
3179 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3180 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
3181 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
3182 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3183 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
3184 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3187 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3188 style of local labels as well.
3192 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3193 references to undefined symbols in debugging sections.
3197 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3198 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3199 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3204 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3205 (elf32_i860_is_local_label_name): New function and prototype.
3209 * configure.in: Increase version number to 2.10.91.
3210 * configure: Regenerate.
3211 * aclocal.m4: Regenerate.
3212 * config.in: Regenerate.
3213 * po/bfd.pot: Regenerate.
3217 * elf.c (_bfd_elf_make_section_from_shdr): Add
3218 .gnu.linkobce.wi. to the list of debug section names.
3222 * dwarf2.c (find_debug_info): New function: Locate a section
3223 containing dwarf2 debug information.
3224 (bfd_dwarf2_find_nearest_line): Find all sections containing
3225 debug information and include them in the stash.
3229 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3230 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3231 (sh_reloc_map): Add new relocs.
3232 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3233 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3234 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3235 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3237 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3238 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3239 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3240 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3241 New array constants.
3242 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3244 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3245 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3246 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3247 elf_sh_plt_reloc_offset): Define.
3248 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3249 elf_sh_link_hash_table): New structs.
3250 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3251 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3253 (elf_backend_create_dynamic_sections,
3254 bfd_elf32_bfd_link_hash_table_create,
3255 elf_backend_adjust_dynamic_symbol,
3256 elf_backend_size_dynamic_sections,
3257 elf_backend_finish_dynamic_symbol,
3258 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3259 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3260 elf_backend_got_header_size, elf_backend_plt_header_size):
3262 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3263 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3265 * bfd-in2.h, libbfd.h: Rebuilt.
3269 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3274 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3275 not initialized, set them to indicate the SH1 instruction set.
3279 * acinclude.m4: Include libtool and gettext macros from the
3281 * aclocal.m4, configure: Rebuilt.
3285 * elf.c: Eliminate references to __sparcv9 macro; replace with
3286 autoconf variables HAVE_PSINFO32_T etc.
3287 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3288 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3290 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3291 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3292 * aclocal.m4: Ditto.
3293 * configure: Regenerate.
3297 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3298 for any shared link, not just shared -Bsymbolic.
3299 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3300 any shared link, and pass link info to it.
3301 (elf_i386_size_dynamic_sections): Update comment.
3302 (elf_i386_discard_copies): Modify to discard relocs for symbols
3303 that have been forced local.
3304 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3305 that have been forced local.
3309 * elflink.h (elf_link_add_object_symbols): Allow common
3310 symbols to have an alignment of 1 if explicitly requested, and
3311 not overridden by other definitions.
3315 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3316 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3320 * elf-bfd.h (elf_link_hash_table): Add runpath.
3322 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3323 * bfd-in2.h: Rebuilt.
3325 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3326 "runpath" field to NULL.
3327 (bfd_elf_get_runpath_list): New function.
3329 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3334 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3335 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3336 explicitly. Improve validation of r_type.
3340 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3341 dynamic allocated content space. Add a comment to remind us that
3342 one day this ought to be fixed.
3343 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3344 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3345 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3349 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3350 field with the newly relocated value instead of adding it to the
3351 existing immediate field.
3352 (elf32_i860_relocate_splitn): Likewise.
3353 (elf32_i860_relocate_highadj): Likewise.
3357 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3358 was previously just a stub).
3362 * elflink.c (_bfd_elf_create_got_section): Don't abort().
3364 (_bfd_elf_create_dynamic_sections): Likewise.
3368 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3369 for undefined symbols to be the beginning of the section.
3371 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3372 four extra entries at the beginning of the .rela.plt section.
3373 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3374 section to account for the four reserved entries in the .plt section.
3378 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3379 to the list of NOPs we recognize after a branch-and-link.
3380 Use the ori NOP when one is needed.
3382 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3387 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3388 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3389 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
3394 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3398 * elf32-i860.c (elf32_i860_relocate_section): New function.
3399 (i860_final_link_relocate): New function.
3400 (elf32_i860_relocate_splitn): New function.
3401 (elf32_i860_relocate_pc16): New function.
3402 (elf32_i860_relocate_highadj): New function.
3403 (elf32_i860_howto): Minor adjustments to some relocations.
3404 (elf_info_to_howto_rel): Define.
3405 (elf_backend_relocate_section): Define.
3409 * elf32-arm.h: Fix formatting.
3413 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3417 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3421 * ieee.c (ieee_write_debug_part): Rewrite a comment.
3422 * elf64-ia64.c: Fix a typo.
3426 * elf32-i860.c (elf32_i860_howto_table): New structure.
3427 (lookup_howto): New function.
3428 (elf32_i860_reloc_type_lookup): New function.
3429 (elf32_i860_info_to_howto_rela): New function.
3430 (elf_code_to_howto_index): New structure.
3431 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3432 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3433 elf32_i860_reloc_type_lookup.
3437 * som.c (struct fixup_format): Constify `format'.
3438 (som_hppa_howto_table): Use SOM_HOWTO macro.
3439 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3440 (som_bfd_reloc_type_lookup): Likewise.
3441 (compare_subspaces): Remove unused `count1', `count2'.
3442 (som_begin_writing): Remove unused `total_reloc_size'.
3443 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3444 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3445 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3446 (som_find_nearest_line): Decorate unused parameter(s).
3447 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3448 (som_bfd_link_split_section): Likewise.
3452 * section.c: Restore backed out code.
3453 * elf.c: Restore backed out code.
3454 (copy_private_bfd_data): Fix bug preventing stipped dynamic
3455 binaries from working.
3456 * bfd-in2.h: Regenerate.
3460 * section.c: Back out the change made by Nick Clifton
3463 * bfd-in2.h: Likewise.
3468 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
3472 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
3473 * bfd-in2.h, libbfd.h: Regenerate.
3477 * section.c (struct sec): Add new boolean field 'segment_mark'.
3478 (STD_SECTION): Initialise new field to zero.
3480 * bfd-in2.h: Regenerate.
3482 * elf.c (copy_private_bfd_data): Reorganise section to segment
3483 mapping to cope with moved sections requiring new segments,
3484 and overlapping segments.
3485 (SEGMENT_END): New macro: Return the end address of a segment.
3486 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
3487 contains a section by comparing their VMA addresses.
3488 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
3489 contains a section by comparing their LMA addresses.
3490 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
3491 section should be included in a segment.
3492 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
3493 follows another in memory.
3494 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3499 * cpu-i860.c: Added comments.
3501 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3502 bfd_elf32_i860_little_vec.
3503 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3504 (ELF_MAXPAGESIZE): Changed to 4096.
3506 * targets.c (bfd_elf32_i860_little_vec): Declaration of
3508 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3510 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3511 config for little endian elf32 i860.
3512 (targ_defvec): Define for the new config above
3513 as "bfd_elf32_i860_little_vec".
3514 (targ_selvecs): Define for the new config above
3515 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3517 * configure.in (bfd_elf32_i860_little_vec): Added recognition
3520 * configure: Regenerated.
3524 * elflink.h (elf_merge_symbol): Take one more argument,
3525 dt_needed, to indicate if the symbol comes from a DT_NEEDED
3526 entry. Don't overide the existing weak definition if dt_needed
3528 (elf_link_add_object_symbols): Pass dt_needed to
3529 elf_merge_symbol ().
3533 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3538 * configure.host (*-*-aix*): AIX has 'long long' always.
3540 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3541 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3542 (xcoff_write_archive_contents_big): Don't update the offset
3543 of the symbol table, xcoff_write_armap will do it.
3547 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3548 of dynobj for SGI_COMPAT checks.
3552 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3553 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3554 * bfd-in2.h: Regenerate.
3558 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3559 range symbol indices in relocs and issue an error message.
3563 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3564 info->new_dtags when setting DT_FLAGS_1. It will only be set
3565 by the new linker options. It shouldn't break anything.
3569 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3570 only if info->new_dtags is true.
3574 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3575 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3579 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3580 (ALL_MACHINES_CFILES): Add cpu-cris.c.
3581 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3582 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3583 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3584 * Makefile.in: Rebuild.
3585 * aclocal.m4: Rebuild.
3586 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
3587 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
3588 (bfd_cris_arch): Declare.
3589 (bfd_archures_list): Add bfd_cris_arch.
3590 * bfd-in2.h: Rebuild.
3591 * config.bfd: (cris-*-*): New target.
3592 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
3593 * configure: Rebuild.
3594 * elf.c (prep_headers): Add bfd_arch_cris.
3595 * libbfd.h: Rebuild.
3596 * libaout.h (enum machine_type): Add M_CRIS.
3597 * reloc.c: Add CRIS relocations.
3598 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
3599 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
3600 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
3601 * po/POTFILES.in, po/bfd.pot: Regenerate.
3605 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
3606 DF_TEXTREL if DT_TEXTREL is set.
3607 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3608 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3609 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3610 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
3611 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3612 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3613 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3614 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3615 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
3616 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
3618 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
3619 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
3621 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
3625 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
3626 * bfd-in2.h: Rebuild.
3628 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
3629 (elf_dt_soname): New.
3631 * elf.c (bfd_elf_set_dt_needed_soname): New.
3633 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
3634 entry if the shared object loaded by DT_NEEDED is used to
3635 resolve the reference in a regular object.
3639 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
3640 DT_DEPAUDIT and DT_AUDIT as strings.
3644 * format.c: Fix formatting.
3648 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
3652 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
3653 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
3654 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
3655 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
3656 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
3657 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
3658 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
3662 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
3663 renamed functions from here...
3664 (assign_section_numbers): Use renamed functions.
3665 (prep_headers): Use renamed functions.
3667 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
3668 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
3669 * bfd-in2.h: Regenerate.
3673 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
3674 parenthesis in if statement.
3678 Enable the support for Traditional MIPS.
3679 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
3680 return ict_none appropriately for traditional mips targets.
3681 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
3682 (STUB_MOVE): Conditionalize for traditonal mips.
3683 (STUB_LI16): Likewise.
3684 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
3685 room for RTPROC header.
3686 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
3687 the permission for the PT_DYNAMIC as read, write and execute.
3688 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
3689 for traditonal mips.
3690 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
3691 _DYNAMIC_LINKING for traditonal mips.
3692 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
3693 in case of traditonal mips.
3694 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
3695 entry is required. For a function if PLT is not required then set the
3696 corresponding hash table entry to 0.
3697 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
3699 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
3700 shared object set the value to 0.
3701 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
3702 _DYNAMIC_LINKING for traditonal mips.
3703 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
3704 for traditonal mips.
3708 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
3712 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
3713 out a structure that is BFD_IN_MEMORY.
3717 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
3718 bfd pointer. Print section id instead of bfd pointer for local
3719 syms. Prefix addend with `+' for global syms as well as local.
3720 Correct calculation of name component lengths.
3721 (elf64_hppa_check_relocs): Update call to get_dyn_name.
3724 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
3725 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
3726 (elf64_hppa_modify_segment_map): Likewise.
3730 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
3731 addresses to be "naturally" sign extended. Return -1 if unknown.
3732 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
3733 * bfd-in2.h: Regenerate.
3737 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
3738 and ECOF_SIGNED_64 to list ways to extract an offset.
3739 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
3740 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
3742 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
3743 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
3747 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
3748 bfd_get_start_address.
3749 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
3750 (elf_swap_ehdr_out): Ditto.
3754 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
3755 compatibility with older binutils.
3759 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
3760 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
3763 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
3764 (parse_line_table): Ditto.
3765 (_bfd_dwarf1_find_nearest_line): Ditto.
3766 * syms.c (cmpindexentry): Remove extra `*' from params.
3770 * elf32-mips.c (sort_dynamic_relocs): New Function.
3771 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
3772 via qsort to sort the dynamic relocations in increasing r_symndx
3777 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
3778 ATTRIBUTE_UNUSED to unused args.
3779 (get_opd): Likewise.
3780 (get_plt): Likewise.
3781 (get_dlt): Likewise.
3782 (get_stub): Likewise.
3783 (elf64_hppa_adjust_dynamic_symbol): Likewise.
3784 (elf64_hppa_link_output_symbol_hook): Likewise.
3785 (elf64_hppa_check_relocs): Delete unused var.
3786 (elf64_hppa_size_dynamic_sections): Likewise.
3787 (elf64_hppa_finalize_opd): Likewise.
3788 (elf64_hppa_finalize_dynreloc): Likewise.
3789 (elf64_hppa_modify_segment_map): Likewise.
3790 (elf64_hppa_finish_dynamic_sections): Likewise.
3792 * elf-hppa.h (elf_hppa_final_write_processing): Add
3793 ATTRIBUTE_UNUSED to unused args.
3794 (elf_hppa_final_link_relocate): Likewise.
3795 (elf_hppa_record_segment_addrs): Add paretheses.
3796 (elf_hppa_relocate_section): Constify dyn_name.
3799 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
3800 rearrange case statement so that it gets preferred to 32-bit ones.
3802 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
3803 asection->id instead of address of asection structure.
3804 (elf32_hppa_size_stubs): Likewise.
3806 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
3807 for .init* and .fini*.
3809 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
3810 and addends used in stub names to 32 bits.
3811 (elf32_hppa_size_stubs): Likewise.
3813 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
3814 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
3815 not bfd_put_64. Fix minor comment typo and formatting.
3817 Changes to create multiple linker stubs, positioned immediately
3818 before the section where they are required.
3819 * elf32-hppa.c: Don't include hppa_stubs.h.
3820 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
3821 (elf32_hppa_stub_hash_table): Delete.
3822 (elf32_hppa_link_hash_entry): Delete.
3823 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
3824 stub_hash_table, and store the struct here rather than a pointer.
3825 Delete output_symbol_count. Add offset array. Change
3826 global_value to a bfd_vma.
3827 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
3828 (elf32_hppa_stub_hash_traverse): Delete.
3829 (elf32_hppa_name_of_stub): Delete.
3830 (elf32_hppa_link_hash_lookup): Delete.
3831 (elf32_hppa_link_hash_traverse): Delete.
3832 (elf32_hppa_stub_hash_table_init): Delete.
3833 (elf32_hppa_size_of_stub): Pass input section and offset rather
3834 than location and calculate location here. Don't pass name as all
3835 stubs are now the same size.
3836 (elf32_hppa_stub_hash_newfunc): Init new fields.
3837 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
3839 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
3840 comparing against ints. Rewrite stub handling code.
3841 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
3842 Case enums to int before comparing against ints. Remove
3843 bfd_reloc_dangerous case.
3844 (elf32_hppa_build_one_stub): Rewrite.
3845 (elf32_hppa_size_one_stub): New function.
3846 (elf32_hppa_build_stubs): Rewrite.
3847 (elf32_hppa_size_stubs): Pass in linker call-back functions.
3848 Rewrite stub-handling specific code.
3850 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
3852 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
3854 * hppa_stubs.h: Delete.
3855 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
3856 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
3857 * Makefile.in: Regenerate.
3859 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
3862 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
3864 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
3865 and section name for bfd_reloc_notsupported error message.
3866 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
3867 bfd_reloc_notsupported.
3868 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
3870 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
3871 undefined weak symbols for all relocs.
3872 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
3873 offsets are relative to one past the delay slot.
3874 (elf32_hppa_size_stubs): Account for reloc addend when calculating
3875 branch destination. Put addend into stub name too.
3876 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
3877 adjust by 8 when deciding whether a linker stub is needed. Put
3878 addend into stub name as for above.
3880 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
3881 various args and vars.
3882 (elf32_hppa_bfd_final_link_relocate): Here too.
3883 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
3884 inner block var to avoid shadowing.
3886 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
3888 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
3889 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
3890 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
3892 * libhppa.h: Change practically all unsigned ints to plain ints.
3893 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
3897 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
3898 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
3901 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
3902 to the new OP_* ones.
3904 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
3905 error exit. Bail out earlier on plabel relocs that we aren't
3906 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
3907 string, and then don't free our copy.
3908 (elf32_hppa_build_one_stub): Make insn unsigned int.
3910 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
3911 available with BL, not BE and BLE.
3913 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
3914 code for elf arg relocs.
3915 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
3916 argument with elf_link_hash_entry h. Handle undefined weak
3917 symbols. Move $global$ lookup from here...
3918 (elf32_hppa_relocate_section): ...to here. Return correct error
3919 message for non-handled relocs.
3920 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
3921 wrong test was -0x3ffff to +0x40000.
3923 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
3924 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
3925 Handle them as such.
3926 (elf_hppa_relocate_insn): Fix a typo.
3928 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
3929 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3930 assemble_17, assemble_21): Delete.
3931 Supply defines for all 64 possible opcodes.
3932 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
3933 formats. Handle COMICLR.
3934 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
3937 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
3938 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
3939 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
3941 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
3942 the local syms - did this code get deleted accidentally? Ignore
3943 undefined and undefweak syms.
3945 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
3946 block. Use it instead of elf64_hppa_hash_table (info).
3947 (elf_hppa_final_link_relocate): Use hppa_info instead of
3948 elf64_hppa_hash_table (info).
3950 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3951 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3952 (hppa_rebuild_insn): Mask immediate bits here instead.
3953 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3957 * section.c (struct sec): Add id field. Tidy comment formatting.
3958 (bfd_make_section_anyway): Set id.
3959 (STD_SECTION): Init id too.
3960 Change CONST to const throughout.
3961 * archures.c (bfd_arch_info): Tidy comment.
3962 (bfd_arch_list): Change a CONST to const.
3963 * libbfd-in.h: Tidy comments and replace CONST with const.
3964 * elf-bfd.h: Likewise.
3965 * libbfd.h: Regenerate.
3966 * bfd-in2.h: Regenerate.
3967 * libcoff.h: Regenerate.
3971 * archive.c (_bfd_write_archive_contents): Add an informative
3976 * srec.c: Fix formatting.
3984 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
3985 value of PC-relative offsets.
3989 * elf64-alpha.c (alpha_elf_size_info): New.
3990 (elf_backend_size_info): Define to alpha_elf_size_info.
3991 * elfcode.h (elf_size_info): Change hash bucket size to 4.
3995 * elf32-mips.c: Include elf32-target.h again for the traditional
4000 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4001 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4002 (avr_info_to_howto_rela): Likewise.
4003 (elf32_avr_gc_mark_hook): Likewise.
4004 (elf32_avr_gc_sweep_hook): Likewise.
4005 (elf32_avr_relocate_section): Likewise.
4009 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4010 an external symbol for a non-shared, non-relocatable link.
4014 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4015 is an external symbol.
4016 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4021 * reloc16.c: Fix formatting.
4025 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4026 to add a new target for traditional mips i.e
4027 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4028 * configure.in: Likewise.
4029 * configure: Rebuild.
4030 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4032 (bfd_elf32_tradlittlemips_vec): Likewise.
4033 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4034 to see that elfNN_bed does not get redefined even if the target file
4035 is included twice for a chip. See elf32-mips.c.
4039 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
4040 (CLEANFILES): Add DEPA.
4041 * Makefile.in: Regenerate.
4045 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4046 can't assume the PE header is at 0x80.
4050 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4054 * go32stub.h: Update stub.
4058 * archures.c (bfd_mach_avr5): Define.
4059 * bfd-in2.h (bfd_mach_avr5): Define.
4060 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4061 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
4062 (compatible): Update comment. Add missing test.
4063 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4064 for avr2 and avr4. Simplify 8K wrap code.
4065 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4066 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4070 * coff-h8300.c: Fix formatting.
4071 * cpu-h8300.c: Likewise.
4075 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4076 for local symbols whose names are unknown.
4080 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4082 * Makefile.in: Regenerate.
4083 * doc/Makefile.in: Regenerate.
4087 * Makefile.am: Rebuild dependency.
4088 * Makefile.in: Rebuild.
4092 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4093 (elf_backend_copy_indirect_symbol): Map to the new function.
4097 * archive.c (normalize): Correct pointer comparison when checking
4099 (bfd_bsd_truncate_arname): Likewise.
4100 (bfd_gnu_truncate_arname): Likewise.
4104 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4105 sections elf_{text,data}_{section,symbol}.
4106 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4107 (_bfd_mips_elf_hide_symbol): New function.
4108 (elf_backend_hide_symbol): Map to the new function.
4109 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4110 definitions of mips_elf_{text,data}_{section,symbol}.
4111 (mips_elf_local_relocation_p): Try to find the direct symbol
4112 based on new check_forced argument.
4113 (mips_elf_calculate_relocation): Use new version of
4114 mips_elf_local_relocation_p.
4115 (mips_elf_relocate_section): Likewise.
4116 (_bfd_mips_elf_relocate_section): Likewise.
4117 (mips_elf_sort_hash_table): Only assert that have enough GOT
4119 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4120 entry if the relocation based on the new external argument.
4121 (mips_elf_create_dynamic_relocation): Assert that we have a
4122 section contents allocated where we can swap out the dynamic
4124 (mips_elf_calculate_relocation): Find the real hash-table entry
4125 correctly by using h->root.root.type. Only create a dynamic
4126 relocation entry if the symbol is defined in a shared library.
4127 Create an external GOT entry for the GOT16 relocation if the
4128 symbol was forced local.
4129 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4130 dynamic index if the symbol was forced local.
4134 * elf32-mips.c: Fix typos in comments.
4138 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4143 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4144 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4145 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4146 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4147 (bfd_elf32_m68hc11_vec): Likewise.
4148 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4149 Supports 68hc11 & 68hc12 at the same time.
4150 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4152 (bfd_elf32_m68hc11_vec): Likewise.
4153 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4154 * archures.c (bfd_m68hc12_arch): Define and register in global list
4155 (bfd_m68hc11_arch): Likewise.
4156 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4157 BFD_RELOC_M68HC11_3B): Define.
4158 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4159 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4163 * elf_bfd.h (struct elf_backend_data): Add info argument to
4164 elf_backend_hide_symbol.
4165 (_bfd_elf_link_hash_hide_symbol): Likewise.
4166 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4167 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4168 * elflink.h (elf_link_add_object_symbols): Likewise.
4169 (elf_link_assign_sym_version): Likewise.
4173 * coff-i386.c (coff_i386_reloc): Don't return in case of
4174 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4175 Compensate PE relocations when linking with non-PE object
4176 files to generate a non-PE executable.
4180 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4181 GOT entries if we're doing a static link or -Bsymbolic link.
4185 * elflink.h (elf_link_adjust_relocs): Check for and call backend
4186 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4188 (elf_link_output_relocs): Likewise.
4189 (elf_reloc_link_order): Likewise.
4193 * archures.c (enum bfd_architecture): #define constants for
4194 PowerPc and RS6000 machine numbers.
4195 * bfd-in2.h: Regenerate.
4196 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4197 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
4198 and RS6000 machine numbers using #defined constants from
4200 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4201 machine numbers using #defined constants from archures.c. Add
4202 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
4203 64-bit words in 620 entry.
4204 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4206 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4210 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4211 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4212 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4216 * bfd-in.h (bfd_family_coff): Define.
4217 * bfd-in2.h: Regenerate.
4218 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4219 coff_find_nearest_line): Check COFFness using bfd_family_coff()
4220 instead of bfd_target_coff_flavour.
4221 * cofflink.c (_bfd_coff_final_link): Likewise.
4222 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4223 exclude XCOFF files.
4224 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4226 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4227 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4228 * xcofflink.c (XCOFF_XVECP): Delete.
4229 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4230 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4231 bfd_xcoff_record_link_assignment,
4232 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4233 check for bfd_target_xcoff_flavour.
4237 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4239 (read_hdr): New function.
4240 (rs6000coff_core_p): Store mstsave or __context64 struct instead
4241 of trying to extract individual registers. Set abfd->arch_info
4242 to match the architecture that created the core file.
4243 (rs6000coff_get_section_contents): Delete.
4244 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4248 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4253 * configure: Regenerate.
4257 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4262 * configure.in (VERSION): Update to show this is the CVS mainline.
4266 * elf32-d10v.c: Include elf/d10v.h
4267 (enum reloc_type): Delete.
4268 * elf32-d30v.c: Include elf/d30v.h
4269 (enum reloc_type): Delete.
4271 * Makefile.am: Run "make dep-am" to regenerate dependencies.
4272 * Makefile.in: Regenerate.
4274 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4275 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4276 move HOWTOs into elf_howto_table.
4277 (R_386_standard, R_386_ext_offset): Define.
4278 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4279 (elf_i386_reloc_type_lookup): Modify calculation of index into
4280 elf_howto_table since we've removed the padding.
4281 (elf_i386_info_to_howto_rel): Likewise.
4282 (elf_i386_relocate_section): Likewise.
4286 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4290 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4291 an error when seeing an undefined symbol with hidden/internal
4292 attribute. It is handled in *_relocate_section ().
4296 * elflink.h (elf_fix_symbol_flags): Follow the link for the
4297 indirect symbol for the ELF_LINK_NON_ELF bit.
4298 (elf_link_output_extsym): Don't output the indirect symbol even
4299 if the ELF_LINK_NON_ELF bit is set.
4303 * config.bfd (i[3456]86-*-netbsdelf*): New target.
4304 (i[3456]86-*-netbsdaout*): New target.
4305 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4306 (i[3456]86-*-openbsd*): Likewise.
4310 * trad-core.c: From hpux-core.c, include <dirent.h> or
4311 <sys/ndir.h> when possible.
4315 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4316 definitions. We must not assume they are sorted in the file
4317 according to their index numbers.
4321 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4322 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
4323 R_PARISC_DIR17F are for absolute branches; Handle them as such.
4327 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4328 80960CA, 80960MC as valid machine names.
4332 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4333 visibility bits if the symbol is undefined. Correctly handle
4334 weak undefined symbols with hidden and internal attributes.
4336 * elflink.h (elf_link_add_object_symbols): Always turn the
4337 symbol into local if it has the hidden or internal attribute.
4341 * ppcboot.c: Add packed attribute if compiling with GCC.
4345 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4349 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4350 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4351 corefile on a 64-bit (Sparc Solaris) host. Also clean up
4356 * Makefile.am: Update dependencies with "make dep-am"
4357 * Makefile.in: Regenerate.
4359 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4360 bindtextdomain): Replace defines with those from intl/libgettext.h
4361 to quieten gcc warnings.
4365 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4367 * archive.c (normalize, bfd_bsd_truncate_arname,
4368 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4369 file names with backslashes.
4371 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4374 * sysdep.h: Include filenames.h.
4378 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4382 * elf64-sparc.c (sparc64_elf_relax_section): New.
4383 (sparc64_elf_relocate_section): Optimize tail call into branch always
4385 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4386 (elf32_sparc_relax_section): New.
4390 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4391 Remove unusued variables.
4392 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4393 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4394 previous fix, so that shared libs really don't influence targets
4395 extension mask and memory model.
4399 * elf64-alpha.c (elf64_alpha_relocate_section): Check
4400 h->root.other not h->other.
4401 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4403 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4407 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4408 undefined symbol with the non-default visibility attributes.
4409 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4410 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4411 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4412 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4413 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4414 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4415 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4416 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4417 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4418 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4419 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4423 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4424 PCREL22, PCREL64I. Zero size of special relocs.
4425 (elf64_ia64_reloc_type_lookup): Likewise.
4426 (USE_BRL, oor_brl, oor_ip): New.
4427 (elf64_ia64_relax_section): New.
4428 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4429 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4430 (elf64_ia64_relocate_section): Likewise.
4431 (bfd_elf64_bfd_relax_section): New.
4432 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4433 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4434 * bfd-in2.h, libbfd.h: Regenerate.
4438 * configure.in : Add peigen.lo to MIPS PE targets.
4439 * configure: Regenerate.
4443 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4444 only if it is known for both input and output bfds. Separate
4445 error message strings as in some languages, it may be necessary
4446 to change more than one place in the string to change between
4449 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4450 endianess checks, call _bfd_generic_verify_endian_match() instead.
4452 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4454 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
4456 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
4457 endianess before checking bfd flavours.
4461 * elflink.h (elf_link_output_extsym): Clear the visibility
4462 field for symbols not defined locally.
4466 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4467 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4468 (hppa_rebuild_insn): Mask immediate bits here instead.
4469 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4473 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
4474 relocs for an executable, ensure that they are virtual addresses.
4478 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
4483 * elflink.h: Add emitrelocations support: when enabled, relocation
4484 information and relocation sections are put into final output
4485 executables. If the emitrelocations flag is set, do the following:
4486 (elf_bfd_final_link): Emit relocation sections.
4487 (elf_link_input_bfd): Compute relocation section contents.
4488 (elf_gc_sections): Don't clean relocation sections.
4492 * som.c (som_decode_symclass): Recognize weak symbols.
4496 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4497 read idata section only from dataoff.
4498 (pe_print_edata): Correctly check for valid eat_member.
4502 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4506 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4510 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4512 * peigen.c (pe_print_idata): Look for .idata section and print
4513 info even if data directory has zero entries. Read idata section
4514 starting from dataoff, and adjust all data offsets to suit. Cast
4515 all bfd_vma vars to unsigned long before passing to fprintf.
4516 * peigen.c (pe_print_edata): Similarly, look for .edata section
4517 and print info even if data directory has zero entries. Cast
4518 all bfd_vma vars to unsigned long before passing to fprintf.
4521 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4522 directory size which may be bogus.
4523 * peigen.c (pe_print_edata): Similarly.
4527 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4529 (copy_private_bfd_data): Allow for space possibly taken up by elf
4530 headers when calculating segment physical address from lma.
4534 * versados.c (versados_scan): Init stringlen and pass_2_done.
4536 * trad-core.c (trad_unix_core_file_p): Return
4537 bfd_error_wrong_format rather than bfd_error_file_truncated.
4539 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4540 add_data_entry. DataDirectory virtual address is relative.
4541 (pe_print_idata): Account for relative DataDirectory virtual
4542 addresses. Don't trash datasize inside POWERPC_LE_PE code.
4543 (pe_print_edata): Similarly.
4546 * peigen.c (dir_names): Add Delay Import Directory.
4547 (pe_print_idata): Always search for bfd section containing
4548 idata address rather than looking up section name. Print this
4549 section name rather than .idata.
4550 (pe_print_edata): Similarly. Also print some fields as %08lx.
4551 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4556 * xcoff.h: Rename to xcoff-target.h
4557 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4558 * coff-rs6000.c: Ditto.
4559 * coff64-rs6000.c: Ditto.
4560 * coff-pmac.c: Ditto.
4561 * Makefile.in: Regenerate.
4565 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4566 Change U802TOC64MAGIC to U803XTOCMAGIC.
4570 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4571 * bfd-in.h: Prototype bfd_elf_get_arch_size.
4572 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4576 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4580 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4581 hidden and internal symbols.
4582 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4584 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4585 assign a PLT or GOT entry to symbols with hidden and
4586 internal visibility.
4590 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
4592 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4596 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
4601 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
4602 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
4604 * Makefile.in: Regenerate.
4608 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
4609 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
4610 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
4611 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
4612 * Makefile.in: Rebuild.
4616 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
4617 doesn't work very well.
4619 * elf-hppa.h (elf_hppa_internal_shdr): Define.
4620 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
4621 Set hdr->s_type to 1 if ARCH_SIZE == 32.
4622 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
4623 (elf_hppa_info_to_howto): Likewise.
4624 (elf_hppa_info_to_howto_rel): Likewise.
4625 (elf_hppa_reloc_type_lookup): Likewise.
4626 (elf_hppa_is_local_label_name): Likewise.
4627 (elf_hppa_fake_sections): Likewise.
4628 (elf_hppa_final_write_processing): Likewise.
4629 (elf_hppa_howto_table): Fully initialise all entries.
4630 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
4631 (elf_hppa_info_to_howto): Likewise.
4632 (elf_hppa_info_to_howto_rel): Likewise.
4633 (elf_hppa_reloc_type_lookup): Likewise.
4634 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
4635 elf_hppa_unmark_useless_dynamic_symbols,
4636 elf_hppa_remark_useless_dynamic_symbols,
4637 elf_hppa_record_segment_addrs, elf_hppa_final_link,
4638 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
4639 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
4640 elf32-hppa.c mess is cleaned up.
4641 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
4642 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
4643 r_field then call hppa_field_adjust inline func with variable
4644 r_field arg, instead call hppa_field_adjust with fixed arg.
4645 In case R_PARISC_PCREL22F, don't set r_field.
4646 (elf_hppa_relocate_insn): Change args and return type to unsigned
4647 int. Call re_assemble_* funcs to do the work.
4649 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
4652 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
4654 (sign_extend): Mask first before sign extending.
4655 (low_sign_extend): Rewrite without condition expression.
4656 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
4657 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
4658 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4659 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
4660 result as function return value rather than through pointer arg.
4661 Accept unsigned int args, and return unsigned int.
4662 (re_assemble_3): New. Combines function of dis_assemble_3 with
4663 re-assembly of opcode and immediate.
4664 (re_assemble_12): Likewise.
4665 (re_assemble_16): Likewise.
4666 (re_assemble_17): Likewise.
4667 (re_assemble_21): Likewise.
4668 (re_assemble_22): Likewise.
4669 (hppa_field_adjust): Rewrite and document, paying attention to
4670 size of types and signed/unsigned issues.
4671 (get_opcode): Shift before masking.
4672 (FDLW): Rename to FLDW.
4673 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
4674 (hppa_rebuild_insn): Change args and return value to unsigned
4675 int. Make use of re_assemble_*. Correct case 11.
4677 * dep-in.sed: Handle ../opcodes/.
4678 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
4679 elf64-hppa.h, hppa_stubs.h, xcoff.h.
4680 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
4681 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
4682 elfarm-nabi.lo dependencies outside of auto-dependency area.
4683 Regenerate dependencies.
4684 * Makefile.in: Regenerate.
4686 * configure.in (TRAD_HEADER): Test non-null before
4688 * configure: Regenerate.
4690 * reloc.c: Fix mis-spelling in comment.
4694 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
4695 * vms.c (vms_openr_next_archived_file): Return NULL.
4699 * coffcode.h Copy changes mistakenly done to libcoff.h in
4704 * libbfd-in.h: Correctly check GCC version.
4705 * bfd-in.h: Likewise.
4706 * libhppa.h: Likewise.
4707 * libbfd.h: Regenerate.
4708 * bfd-in2.h: Regenerate.
4712 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
4713 coffdu-rs6000.{lo,c}.
4714 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
4716 * Makefile.in: Regenerate.
4717 * xcoff.h: New file.
4718 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
4719 * coff-rs6000.c: Move all declarations and defines that are
4720 common to the xcoff backends into xcoff.h
4721 * coff64-rs6000.c: Ditto,
4725 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
4726 _bfd_coff_force_symnames in strings and
4727 _bfd_coff_debug_string_prefix_length to their default values.
4728 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
4732 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
4733 _bfd_coff_force_symnames in strings and
4734 _bfd_coff_debug_string_prefix_length to their default values.
4738 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
4739 Check local_got_refcounts before dereferencing.
4741 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
4742 before deciding we don't need R_PPC_PLT32 relocation.
4743 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
4746 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
4748 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
4750 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
4751 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
4752 (elf_i386_relocate_section): Allow for .plt to go missing.
4753 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
4754 can use a relative reloc for got as elf_i386_relocate_section.
4755 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
4759 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
4763 * Makefile.am (coff64-rs6000.lo): New rule.
4764 * Makefile.in: Regenerate.
4765 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
4766 xcoff_is_local_label_name, xcoff_rtype2howto,
4767 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
4768 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
4769 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
4770 (NO_COFF_SYMBOLS): Define.
4771 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
4772 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
4774 (MINUS_ONE): New macro.
4775 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
4777 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
4778 coff_SWAP_aux_out): Map to the new functions.
4779 * coff64-rs6000.c: New file.
4780 * libcoff.h (bfd_coff_backend_data): Add new fields
4781 _bfd_coff_force_symnames_in_strings and
4782 _bfd_coff_debug_string_prefix_length.
4783 (bfd_coff_force_symnames_in_strings,
4784 bfd_coff_debug_string_prefix_length): New macros for above fields.
4785 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
4786 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
4787 of using coff_swap_sym_in directly.
4788 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
4789 (coff_set_flags) Set magic for XCOFF64.
4790 (coff_compute_section_file_positions): Add symbol name length to
4791 string section length if bfd_coff_debug_string_prefix_length is
4793 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
4794 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
4795 using coff_swap_lineno_in directly.
4796 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
4797 and _bfd_coff_debug_string_prefix_length fields.
4798 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
4799 symbol names into strings table when
4800 bfd_coff_force_symnames_in_strings is true.
4801 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
4802 SET_RELOC_VADDR): New macros.
4803 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
4804 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
4806 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
4807 changes within RS6000COFF_C specific code.
4808 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
4809 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
4810 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4811 Extend existing hack on target name.
4812 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
4814 * coff-tic54x.c (ticof): Keep up to date with new fields
4815 in bfd_coff_backend_data.
4816 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
4817 targ_selvecs to include rs6000coff64_vec for rs6000.
4818 * configure.in: Add rs6000coff64_vec case.
4819 * cpu-powerpc.c: New bfd_arch_info_type.
4823 * config.bfd: Only disable elf32-hppa vectors, not all of the
4824 BSD and OSF configuration support. Provide (disabled) clauses
4826 * configure.in: Add clause for PA64 support.
4827 * configure: Rebuilt.
4829 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
4830 (bfd_elf64_hppa_vec): Declare.
4832 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
4833 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
4834 (elf64-hppa.lo): Add dependencies.
4835 * Makefile.in: Rebuilt.
4837 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
4841 * libhppa.h (dis_assemble_16): New function.
4842 (pa_arch): Added pa20w element.
4846 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
4847 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
4848 bfd_elf64_slurp_reloc_table.
4850 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
4851 definitions to get external names.
4852 (elf_write_relocs): Renamed from write_relocs and make global.
4853 (elf_slurp_reloc_table): Make global.
4854 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
4856 * archive.c (hpux_uid_gid_encode): New function.
4857 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
4858 defined and the ID is greater than 99999.
4859 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
4860 special uid/gid fields into 32 bit values.
4864 * config.bfd: Add NetBSD/sparc64 support.
4871 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
4872 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
4873 (BFD64_BACKENDS): Add elf64-ia64.lo.
4874 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
4875 (cpu-ia64.lo, elf64-ia64.lo): New rules.
4876 * Makefile.in: Rebuild.
4877 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
4878 (bfd_ia64_arch): Declare.
4879 (bfd_archures_list): Add bfd_ia64_arch.
4880 * bfd-in2.h: Rebuild.
4881 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
4882 * configure: Rebuild.
4883 * configure.host: (ia64-*-linux*): New host.
4884 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
4885 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
4886 * elf.c (prep_headers): Add bfd_arch_ia64.
4887 * libbfd.h: Rebuild.
4888 * reloc.c: Add IA-64 relocations.
4889 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
4891 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
4892 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
4896 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
4897 contents when performing a partial link.
4898 (bfd_elf_d30v_reloc_21): Likewise.
4902 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
4903 patch to symbols defined by a shared object.
4904 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
4909 * dwarf2.c (concat_filename): Avoid string literal concatenation.
4910 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
4914 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
4915 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
4916 (coff-ia64.lo): Add dependency.
4917 * Makefile.in: Regenerate.
4918 * coff-ia64.c: New file.
4919 * efi-app-ia32.c: Ditto.
4920 * efi-app-ia64.c: Ditto.
4921 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
4922 (coff_set_flags): Ditto.
4923 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
4924 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
4925 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
4926 * configure: Regenerate.
4927 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
4928 (PUT_OPTHDR_IMAGE_BASE): Ditto.
4929 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4930 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4931 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4932 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4933 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4934 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4935 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4936 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4937 (GET_PDATA_ENTRY): Ditto.
4938 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
4939 data_start. Use above macros to read fields that are 64 bit wide for
4940 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
4941 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
4942 FileAlignment and SectionAlignment to minimum alignment if they
4944 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
4945 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
4946 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
4947 Use above macros to write fields that are 64 bit wide for
4949 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
4950 5*4 otherwise. This should be right for IA-32 and IA-64, but may
4951 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
4952 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
4953 begin address, end address, and unwind info address only. Use
4954 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
4956 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
4957 HIGH3ADJ relocation names.
4958 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
4959 * targets.c: Declare bfd_efi_app_ia32_vec and
4960 bfd_efi_app_ia64_vec.
4961 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
4962 bfd_efi_app_ia64_vec.
4966 * bfd-in2.h: Add prototypes for tic54x load page access.
4967 * bfd-in.h: Regenerate.
4968 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
4969 in customized _set_arch_mach function.
4970 * coffcode.h (coff_set_alignment_hook): Set section load page if
4971 the appropriate macro is defined.
4972 (write_object_contents): Read section load page.
4976 * elf32-hppa.h: Update copyright date.
4978 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
4979 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
4981 * elf32-d30v.c (MAX32): Don't use LL suffix.
4982 (MIN32): Define in terms of MAX32.
4983 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
4985 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
4988 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
4992 * dep-in.sed: Match space before file name, not after.
4993 * Makefile.am: Regenerate dependencies.
4994 * Makefile.in: Regenerate.
4996 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
4997 case, allow address wrap-around stupidly removed 2000-03-17. Sign
4998 extend without an if statement.
5002 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5004 * elf32-mips.c (gprel16_with_gp): Likewise.
5005 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5006 here using -0x40000, not (int)0xfffc0000.
5007 (elf32_hppa_size_of_stub): Likewise.
5011 * coff-tic54x.c: Now builds with all targets.
5012 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5013 * Makefile.in: Regenerate.
5014 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5015 unitialized variable.
5019 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
5020 --enable-build-warnings option.
5021 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5022 * Makefile.in, configure: Re-generate.
5026 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5027 BFD_RELOC_THUMB_PCREL_BLX.
5029 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5030 R_ARM_XPC25 and R_ARM_THM_PC22.
5032 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5033 R_ARM_XPC25 and R_ARM_THM_XPC22.
5034 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5035 R_ARM_[XPC25|THM_XPC22].
5037 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5038 elf/arm-oabi.h to elf/arm.h
5040 * Makefile.am: Fix dependency for elfarm-oabi.c
5041 * Makefile.in: Regenerate.
5043 * bfd-in2.h: Regenerate.
5044 * libbfd.h: Regenerate.
5048 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5049 and restore it on failure. Release newly allocated tdata on
5054 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5055 (decode_line_info): Set it. Report error if unit->line_offset is
5056 equal to or larger than it.
5060 * targets.c: Added vecs for tic54x.
5061 * reloc.c: Added relocs for tic54x.
5062 * libbfd.h: Regenerated.
5063 * configure: Add TI COFF vecs for tic54x.
5064 * configure.in: Ditto.
5065 * config.bfd (targ_cpu): Recognize new tic54x target.
5066 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5067 * bfd-in2.h: Add tic54x target and relocations.
5068 * Makefile.am, Makefile.in: Add tic54x target.
5069 * archures.c (bfd_archures_list): Add tic54x target.
5070 * coff-tic54x.c: New.
5071 * cpu-tic54x.c: New.
5075 * elfcore.h (elf_core_file_p): call backend_object_p which
5076 thereby gets an opportunity to update the arch/machine type.
5080 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5081 class. Handle SEC_CLINK and SEC_BLOCK flags.
5082 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5083 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5087 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5088 EF_INTERWORK if this is an unknown EABI.
5089 (elf32_arm_merge_private_bfd_data): Check EABI version
5090 numbers. Only check EF_xxx flags if the EABI version number
5092 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5093 if the EABI version number is unknown.
5094 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5095 if the EABI version number is unknown.
5099 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5100 BFD_RELOC_SH_LOOP_END.
5101 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5102 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5103 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5104 (sh_elf_reloc_loop): New function.
5105 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5107 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5108 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5109 * bfd-in2.h, libbfd.h: Regenerate.
5113 * po/bfd.pot: Regenerate.
5115 * Makefile.am: Remove extraneous mkdep comment.
5116 (MKDEP): Use gcc -MM rather than mkdep.
5117 (DEP): Quote when passing vars to sub-make. Add warning
5119 (DEP1): Rewrite for "gcc -MM".
5120 (CLEANFILES): Add DEP2.
5121 Update dependencies.
5122 * Makefile.in: Regenerate.
5126 * configure.in: Added corefile support for AIX 4.3. In particular,
5127 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5128 compiling rs6000-core.c.
5129 * configure: Regenerated.
5133 * cache.c (bfd_open_file): Unlink the output file only if
5134 it has non-zero size.
5138 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5139 relative relocations for non-loaded sections in shared objects.
5140 (elf64_alpha_check_relocs): Similarly.
5144 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5145 BFD_RELOC_16 to switch for extended relocs.
5146 (MY_swap_ext_reloc_in): New.
5147 (MY_swap_ext_reloc_out): New.
5148 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5149 than NAME(aout,swap_ext_reloc_in) for extended relocs.
5150 (NAME(aout,squirt_out_relocs)): Similarly use
5151 MY_swap_ext_reloc_out.
5152 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5156 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5157 the R_PCRWORD_B case.
5161 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5167 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
5168 HOWTO references to bfd_elf_generic_reloc, that have
5169 partial_inplace == true, now use the new function. The function
5170 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5171 extends its fixes to the R_M32R_{16,24,32} relocs.
5172 The new logic in m32r_elf_lo16_reloc() has been removed, and
5173 it instead calls the new routine to obtain that functionality.
5177 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5178 elf32_avr_check_relocs, avr_final_link_relocate,
5179 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5180 elf32_avr_object_p): Add prototypes.
5181 (elf32_avr_gc_mark_hook): Add default for h->root.type.
5182 (bfd_elf_avr_final_write_processing): Make static.
5186 * cpu-avr.c: New file. BFD support routines for AVR architecture.
5187 * archures.c (bfd_architecture): Add AVR architecture.
5188 (bfd_archures_list): Add reference to AVR architecture info.
5189 * elf.c (prep_headers): Handle bfd_arch_avr.
5190 * reloc.c: Add various AVR relocation enums.
5191 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5193 * Makefile.am: Add support for AVR elf.
5194 * configure.in: Likewise.
5195 * config.bfd: Likewise.
5196 * Makefile.in: Regenerate.
5197 * configure: This too.
5198 * bfd-in2.h: And this.
5199 * libbfd.h: And this.
5203 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5204 (elf64_alpha_find_reloc_at_ofs): Likewise.
5208 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5209 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
5210 allowable range used to be -2**(n-1) to 2**n-1.
5211 * reloc.c (_bfd_relocate_contents): Same here. Also replace
5212 "boolean overflow" with "bfd_reloc_status_type flag".
5216 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5220 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5221 of shrinks properly, including the last reloc.
5225 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5230 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5231 a format mismatch rather than an "error" from bfd_read such as
5232 bfd_error_file_truncated.
5236 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5237 sign-extension and big-endian compensation for
5238 R_MIPS_64 even in ld -r.
5242 * elf32-mips.c (mips_elf_next_relocation): Rename from
5243 mips_elf_next_lo16_relocation, and generalize to look
5244 for any relocation type.
5245 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5246 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5247 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5248 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5249 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5250 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5251 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5252 (mips_rtype_to_howto): Likewise.
5253 (mips_elf_calculate_relocation): Handle new relocs.
5254 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5255 are paired. The addend for R_MIPS_GNU_REL16_S2
5256 is shifted right two bits.
5260 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5261 comment, and ensure it doesn't happen again.
5262 (bfd_install_relocation): Same here.
5263 (_bfd_relocate_contents): Don't bother assigning unused signmask
5264 shift result. Fix typos in comments.
5265 Remove trailing whitespace throughout file.
5269 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5270 * bfd-in2.h: Rebuild.
5274 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5276 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5277 (SIZEOF_ILF_STRINGS): Redefine.
5278 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
5279 relative reloc, as opposed to a section relative reloc.
5280 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5282 Add length of symbol's prefix to string pointer.
5283 Store a pointer to the symbol in the symbol pointer table.
5284 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5285 Initialise the symbol pointer table.
5286 Store the hint in the Hint/Name table.
5287 Make the jump reloc be symbol realtive, not section relative.
5288 Create an import symbol for imported code.
5292 * elf.c (swap_out_syms): Check for null type_ptr.
5296 * aout-target.h (MY(write_object_contents)): Remove unused
5297 and unusable "#if CHOOSE_RELOC_SIZE".
5298 * pc532-mach.c (MY(write_object_contents)): Ditto.
5299 * netbsd.h (MY(write_object_contents)): Ditto.
5300 * hp300hpux.c (MY(write_object_contents)): Ditto.
5301 * freebsd.h (MY(write_object_contents)): Ditto.
5302 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5306 * peicode.h (jtab): Make it static.
5308 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5309 defined and COFF_IMAGE_WITH_PE is not defined.
5310 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5311 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5315 * coff-arm.c (bfd_arm_process_before_allocation): Make
5316 'symndx' signed to prevent compile time warning.
5318 * coff-mcore.c: Remove unused prototype for pe_object_p.
5320 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5321 functions that are not used when COFF_IMAGE_WITH_PE is
5323 (struct sh_opcode): Change type of 'flags' field to unsigned
5324 long so that it can hold the USESAS flag.
5326 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5328 * elf-m10300.c (mn10300_elf_relax_section): Initialise
5331 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5333 Remove unusued variables and code.
5334 (elf_backend_add_symbol_hook): Fix prototype.
5336 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5339 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5342 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5344 Remove unusued variables and code.
5345 (elf_backend_add_symbol_hook): Fix prototype.
5347 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5349 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5350 to unused function parameter.
5352 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5354 Use EMPTY_HOWTO to initialise empty howto slots.
5355 Remove unused variables.
5357 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5361 * aoutx.h (aout_link_input_section_std): Pass "true" to
5362 the undefined_symbol callback.
5363 (aout_link_input_section_ext): Likewise.
5364 * bout.c (get_value): Likewise.
5365 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5366 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5368 (alpha_relocate_section): Likewise.
5369 * coff-arm.c (coff_arm_relocate_section): Likewise.
5370 * coff-i960.c (coff_i960_relocate_section): Likewise.
5371 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5372 * coff-mips.c (mips_relocate_section): Likewise.
5373 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5374 * coff-sh.c (sh_relocate_section): Likewise.
5375 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5376 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5377 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5378 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5379 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5380 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5381 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5382 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5383 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5384 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5385 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5386 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5387 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5388 * elflink.h (elf_link_output_extsym): Likewise.
5389 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5390 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5391 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5393 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5394 undefined_symbol callback when building shared library with
5395 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5397 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5398 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5399 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5400 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5401 (elf32_mips_get_relocated_section_content): Likewise.
5402 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5403 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5404 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5405 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5409 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5410 * Makefile.in: Regenerate.
5412 * configure.in: Add support for mips and sh pe vectors.
5413 * configure: regenerate.
5415 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5418 * targets.c: Add mips and sh pe vectors.
5420 * libpei.h (coff_final_link_postscript): Only define if not
5423 * coffcode.h: Add support for WinCE magic numbers.
5425 * peigen.c (pe_print_reloc): Update comment and rearrange
5426 appending of newline character.
5428 * peicode.h: Add support for Image Library Format.
5429 (pe_ILF_vars): Structure containing data used by ILF code.
5430 (pe_ILF_make_a_section): New function. Create a section based
5432 (pe_ILF_make_a_reloc): New function. Create a reloc based on
5434 (pe_ILF_make_a_symbol): New function. Create a symbol based
5436 (pe_ILF_save_relocs): New function. Store the relocs created
5437 by pe_ILF_make_a_reloc in a section.
5438 (pe_ILF_build_a_bfd): New function. Create a BFD describing
5440 (pe_ILF_object_p): New function. Return a bfd_target pointer
5442 (pe_bfd_object_p): If an ILF object is detected call
5443 pe_ILF_object_p on it.
5445 * coff-arm.c: Add support for WinCE relocs which are different
5446 from normal ARM COFF relocs.
5447 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5449 * coff-sh.c: Add support for sh-pe target.
5450 * pe-sh.c: New file. Support code for sh-pe target.
5451 * pei-sh.c: New file. Support code for sh-pe target.
5453 * pe-mips.c: New file. Support code for mips-pe target.
5454 * pei-mips.c: New file. Support code for mips-pe target.
5458 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
5459 architecture if the object causing the bump is dynamic.
5460 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
5461 and also don't it for memory ordering.
5462 (sparc64_elf_write_relocs): Take src_rela out of the loop.
5466 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
5467 calling bfd_get_section_size_before_reloc.
5468 (decode_line_info): Likewise.
5469 (_bfd_dwarf2_find_nearest_line): Likewise.
5473 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
5474 name of the libtool directory.
5475 * Makefile.in: Rebuild.
5479 * som.c (SOM_HOWTO): Define.
5480 (som_hppa_howto_table): Use it.
5484 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
5486 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
5490 * som.c (som_misc_symbol_info): Add field
5492 (som_bfd_derive_misc_symbol_info): Initialize
5494 (som_build_and_write_symbol_table): Keep track
5495 of secondary_def field.
5496 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5497 if secondary_def field is set.
5498 (som_bfd_ar_write_symbol_stuff): Initialize
5503 * dwarf2.c (read_address): Read 16-bits addresses.
5504 (parse_comp_unit): Accept addr_size == 2.
5508 * bfd-in.h: Update copyright date.
5512 * cpu-i370.c: New file.
5513 * elf32-i370.c: New file.
5514 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5515 (bfd_i370_arch): New.
5516 (bfd_archures_list): Add bfd_i370_arch.
5517 * elf.c (prep_headers): Add bfd_arch_i370.
5518 * Makefile.am: Add support for IBM 370 elf.
5519 * config.bfd: Likewise.
5520 * configure.in: Likewise.
5521 * libbfd.h (bfd_reloc_code_real_names): Likewise.
5522 * reloc.c (bfd_reloc_code_type): Likewise.
5523 * targets.c: Likewise.
5525 * Makefile.in: Regenerate.
5526 * configure: Regenerate.
5527 * bfd-in2.h: Regenerate.
5531 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5532 invalid relocation types, and change them to R_386_NONE.
5536 * elflink.h (elf_link_add_object_symbols): If a version symbol is
5537 not defined, don't add a second ELF_VER_CHR.
5539 * elflink.h (elf_bfd_final_link): Call output_extsym for global
5540 symbols converted to local symbols even when stripping all
5542 (elf_link_output_extsym): Process global symbols converted to
5543 local symbols even if they are being stripped.
5547 * archures.c (bfd_octets_per_byte): Return unsigned int.
5548 (bfd_arch_mach_octets_per_byte): Ditto.
5549 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5551 * section.c (bfd_get_section_size_before_reloc): Quell signed
5552 vs. unsigned comparison warning.
5553 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
5554 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5555 change. What was I thinking?
5556 * bfd-in2.h: Regenerate.
5558 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5559 (elf_gc_sections): Same here.
5560 (elf_gc_common_finalize_got_offsets): And here.
5564 ELF HPPA doesn't work at present; remove it until it does.
5565 * config.bfd: Comment out setting targ_defvec to
5567 * Makefile.am: Rebuild dependencies.
5568 (BFD32_BACKENDS): Remove elf32-hppa.lo.
5569 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5570 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5571 * Makefile.in: Rebuild.
5572 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5576 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5577 is no bfd_free(). Revert bfd_free part of previous change.
5581 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5583 (coff_compute_section_file_positions): Use bfd_free to pair
5585 (coff_write_object_contents): Likewise.
5587 * coff-rs6000.c (xcoff_howto_table_16): New variable.
5588 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
5592 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
5593 (xcoff_ar_file_hdr_big): New structure.
5594 (SIZEOF_AR_FILE_HDR_BIG): New macro.
5595 (xcoff_ar_hdr_big): New structure.
5596 (SIZEOF_AR_HDR_BIG): New macro.
5597 (xcoff_big_format_p): New macro.
5598 (xcoff_ardata_big): New macro.
5599 (arch_xhdr_big): New macro.
5600 (xcoff_slurp_armap): Handle large archives.
5601 (xcoff_archive_p): Detect large archives.
5602 (xcoff_read_ar_hdr): Handle large archives.
5603 (xcoff_openr_next_archived_file): Handle large archives.
5604 (xcoff_generic_stat_arch_elt): Handle large archives.
5605 (xcoff_write_armap_old): Rename from xcoff_write_armap.
5606 (xcoff_write_armap_big): New function.
5607 (xcoff_write_armap): New function, dispatch to _old or _big.
5608 (xcoff_write_archive_contents_old): Rename from
5609 xcoff_write_archive_contents.
5610 (xcoff_write_archive_contents_big): New function.
5611 (xcoff_write_archive_contents): New function, dispatch to _old or
5616 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
5617 and hide_symbol members.
5618 (elf_link_hash_copy_indirect): Remove.
5619 (elf_link_hash_hide_symbol): Remove.
5620 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
5621 and elf_backend_hide_symbol.
5622 (_bfd_elf_link_hash_copy_indirect): Declare.
5623 (_bfd_elf_link_hash_hide_symbol): Declare.
5624 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
5625 (_bfd_elf_link_hash_hide_symbol): Likewise.
5626 (_bfd_elf_link_hash_table_init): Don't init killed members.
5627 * elflink.h (elf_link_add_object_symbols): Use the bed function
5628 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
5629 (elf_link_assign_sym_version): Likewise.
5630 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
5631 (elf_backend_hide_symbol): Likewise.
5632 (elfNN_bed): Update for new members.
5636 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
5637 STACK_END_ADDR): Define for new core file format.
5638 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
5639 for handling the vagaries of the various core file structures used
5640 by AIX over the years.
5641 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
5642 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
5643 core_dumpx structure.
5647 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
5648 (bfd_mach_sh3_dsp): Likewise.
5649 (bfd_mach_sh4): Reinstate.
5650 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
5651 * bfd-in2.h: Regenerate.
5652 * coff-sh.c (struct sh_opcode): flags is no longer short.
5653 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
5654 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
5655 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
5656 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
5657 (sh_opcodes): No longer const.
5658 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
5659 (sh_insn_uses_reg): Check for USESAS and USESR8.
5660 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
5661 (_bfd_sh_align_load_span): Return early for SH4.
5662 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
5663 Take into account that field b of a parallel processing insn
5664 could be mistaken for a separate insn.
5665 * cpu-sh.c (arch_info_struct): New array elements for
5666 sh2, sh-dsp and sh3-dsp.
5667 Reinstate element for sh4.
5668 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
5669 (SH4_NEXT): Reinstate.
5670 (SH3_NEXT, SH3E_NEXT): Adjust.
5671 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
5672 * elf32-sh.c (sh_elf_set_private_flags): New function.
5673 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
5674 (sh_elf_merge_private_data): New function.
5675 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
5676 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5677 (bfd_elf32_bfd_merge_private_bfd_data): Change to
5678 sh_elf_merge_private_data.
5682 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
5683 hide_symbol members.
5684 (elf_link_hash_copy_indirect): New.
5685 (elf_link_hash_hide_symbol): New.
5686 * elflink.h (elf_link_add_object_symbols): Break out copy from
5687 indirect new new symbol to elf.c.
5688 (elf_link_assign_sym_version): Break out privatization of
5689 non-exported symbol to elf.c.
5690 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
5691 (_bfd_elf_link_hash_hide_symbol): New.
5692 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
5696 * section.c (_bfd_strip_section_from_output): Add info parameter.
5697 If it passed as non-NULL, use it to check whether any input BFD
5698 has an input section which uses this output section. Change all
5700 * bfd-in2.h: Rebuild.
5702 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
5703 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
5705 * bfd-in2.h: Rebuild.
5709 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
5710 allow final modifications of swapped-in symbol.
5711 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
5712 * coffcode.h (coff_write_relocs): Use macro
5713 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
5714 symbol index should be set to -1.
5718 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
5719 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
5720 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
5721 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
5722 sh_insns_uses_or_sets_freg): New functions.
5723 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
5724 * (sh_insns_conflict): Use new functions and new macros to
5725 detect conflicts when two instructions both set same integer registers,
5726 both set same fp register, and both set special register.
5730 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
5731 swapping in sections, so that the swapping routines have access to
5736 * coff-go32.c: Update comment. Update copyright.
5740 * syms.c (bfd_decode_symclass)
5741 Two new class characters were added - 'V' and 'v'. The
5742 meaning of 'W' is now restricted to just weak non-object
5743 symbols. This allows differentiation between, for example,
5744 weak functions vs weak objects. nm for example now dumps:
5746 'w' = weak unresolved
5747 'V' = weak global object
5748 'v' = weak unresolved object
5750 (bfd_is_undefined_symclass): New function. Return true if the
5751 given symbol class represents and undefined/unresolved symbol.
5753 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
5756 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
5758 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
5759 STT_ARM_16BIT flag set, but it is not attached to a data object
5760 return STT_ARM_16BIT so that it will be treated as code by the
5765 * coff-i386.c (i3coff_object_p): Remove prototype.
5768 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
5769 to name. Update copyright.
5771 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
5772 assignment to avoid warning. Update copyright.
5776 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
5777 instead of using GNU C extension.
5781 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
5782 amount from a bfd_in_memory structure.
5783 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
5788 * linker.c (default_indirect_link_order): oops - fix incorrectly
5789 applied patch from Tim Wall.
5793 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
5794 = scnhsz, filhsz, relsz, aoutsz, etc)
5796 * coffswap.h: Ditto.
5800 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
5801 interwork thumb to arm stub.
5805 * archures.c (bfd_octets_per_byte): New function: Return
5807 (bfd_arch_mach_octets_per_byte): New function: Return target
5810 * section.c: Distinguish between octets and bytes for usage of
5811 _cooked_size, _raw_size, and output_offset. Clarify
5812 description of bfd_set_section_contents.
5814 * bfd-in2.h: Regenerate.
5816 * coffgen.c: Indicate that the offset parameter is in bytes, not
5819 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
5820 where appropriate to get the octet offset when calling
5821 bfd_set_section_contents.
5822 (bfd_coff_reloc_link_order): Ditto.
5824 * linker.c (bfd_generic_reloc_link_order): Ditto.
5825 (_bfd_default_link_order): Ditto.
5827 * reloc.c (bfd_perform_relocation): Distinguish between octets
5828 and bytes. Use octets when indexing into octet data; use bytes
5829 when calculating target addresses.
5830 (bfd_install_relocation): Ditto.
5832 * srec.c (srec_write_section): Ditto.
5836 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
5837 3 to 2. This allows 4 byte sized sections, which is necessary for
5838 dlltool to build functioning DLLs.
5842 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
5843 (arm*-*-conix*): New target.
5847 * config.bfd: Include elf32_i386 vector to target list for cygwin
5850 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
5851 * configure.in: Test for structure win32_pstatus_t in
5853 * configure: Regenerate.
5855 * elf.c (elfcore_grok_win32pstatus): New function: process
5856 win32_pstatus_t notes in elf core file.
5857 (elfcore_grok_note): Detect win32_pstatus notes.
5861 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
5863 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
5864 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
5866 For older changes see ChangeLog-9899
5872 version-control: never