1 2003-12-15 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
2 Nick Clifton <nickc@redhat.com>
4 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Ensure that correct flags
5 are set on known section types.
7 2003-12-12 Nick Clifton <nickc@redhat.com>
9 * po/ro.po: Updated translation.
11 2003-12-12 Alan Modra <amodra@bigpond.net.au>
13 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
16 2003-12-11 Nick Clifton <nickc@redhat.com>
18 * elf.c (INCLUDE_SECTION_IN_SEGMENT): Skip PT_GNU_STACK segments.
20 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
22 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
23 Remove casts that were only needed for K&R compatibility.
25 2003-12-08 Alan Modra <amodra@bigpond.net.au>
27 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
28 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
29 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
30 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
31 and pass to output_symbol_hook.
32 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
33 (elf_link_output_extsym): Likewise.
34 (elf_link_input_bfd): Likewise.
35 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
36 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
37 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
38 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
39 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
40 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
41 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
42 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
43 Validate dynh->h against h.
44 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
45 (link_hash_newfunc): Init it.
46 (adjust_opd_syms): New function.
47 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
48 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
49 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
50 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
51 (ppc64_elf_output_symbol_hook): New function.
52 (elf_backend_link_output_symbol_hook): Define.
54 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
56 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
57 Remove casts that were only needed for K&R compatibility.
59 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
61 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
62 partial_inplace for these relocs to FALSE for comptability with
64 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
65 generated by MS linker, and brings the relocation in line the MS
68 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
70 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
72 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
74 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
75 need_relax_finalize field in link_info instead of
76 relax_finalizing to check if the relax finalize pass is being
79 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
81 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
82 Change ARM26* to ARM_26* in comments to match definitions.
83 (coff_arm_adjust_symndx): Replace hard-coded constants with
84 appropriate definitions (ARM_26*).
86 2003-12-04 Alan Modra <amodra@bigpond.net.au>
88 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
89 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
90 (mn10300_elf_relax_section): Likewise.
91 * nlm32-alpha.c (ONES): Define.
92 (nlm32_alpha_howto_table): Use it to avoid warnings.
94 2003-12-04 Alan Modra <amodra@bigpond.net.au>
96 * elf32-i386.c (elf_i386_object_p): Delete.
97 (elf_backend_object_p): Don't define.
98 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
99 * elf32-sh.c (sh_elf_object_p): Likewise.
100 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
101 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
102 * elf64-s390.c (elf_s390_object_p): Likewise.
103 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
105 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
107 * archures.c (bfd_mach_m32r2): Add new machine type.
108 * bfd-in2.h: Regenerate.
109 * cpu-m32r.c : Add new machine type.
110 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
111 m32r_elf_merge_private_bfd_data): Add support for new machine
114 2003-12-03 Dave Airlie <airlied@linux.ie>
116 * config.bfd: Add vax-linux-gnu target.
117 * configure.in: Likewise.
118 * configure: Regenerate.
120 2003-12-03 Alan Modra <amodra@bigpond.net.au>
122 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
123 bfd_link_hash_entry field "next" -> "und_next".
124 * linker.c (_bfd_link_hash_newfunc): Likewise.
125 (bfd_link_add_undef): Likewise.
126 (_bfd_generic_link_add_archive_symbols): Likewise.
127 (_bfd_generic_link_add_one_symbol): Likewise.
128 * xcofflink.c (xcoff_link_add_symbols): Likewise.
130 2003-12-02 Nick Clifton <nickc@redhat.com>
132 * configure.in (ALL_LINGUAS): Add ro.
133 * po/ro.po: New Romanian translation.
135 2003-12-02 Alan Modra <amodra@bigpond.net.au>
137 * Makefile.am: Run "make dep-am".
138 * Makefile.in: Regenerate.
140 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
142 * coffcode.h (coff_compute_section_file_positions): Set page_size
143 to 1 instead of 0 in the case file alignment value is zero.
145 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
147 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
148 * coff64-rs6000.c: Likewise.
149 * coffcode.h: Likewise.
150 * elf32-vax.c: Likewise.
152 * hppabsd-core.c: Likewise.
153 * hpux-core.c: Likewise.
155 * netbsd-core.c: Likewise.
156 * osf-core.c: Likewise.
158 * ptrace-core.c: Likewise.
159 * sco5-core.c: Likewise.
160 * section.c: Likewise.
162 * trad-core.c: Likewise.
164 2003-12-01 Alan Modra <amodra@bigpond.net.au>
166 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
167 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
168 (_bfd_elf_link_just_syms): Likewise.
169 (bfd_elf_get_needed_list): Likewise.
170 (bfd_elf_get_runpath_list): Likewise.
171 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
172 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
174 (elf32_hppa_set_gp): Look up output sections rather than using htab.
175 * elf32-i960.c: Comment fix. Formatting.
176 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
177 rather than testing creator flavour.
178 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
179 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
180 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
181 is_elf_hash_table change. Remove redundant test.
182 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
183 testing creator flavour.
184 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
185 (_bfd_elf_fix_symbol_flags): Likewise.
186 (_bfd_elf_adjust_dynamic_symbol): Likewise.
187 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
188 checks. Use is_elf_hash_table rather than testing creator flavour.
189 Use hash_table throughout in place of info->hash.
190 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
191 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
193 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
194 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
195 testing creator flavour.
196 (elf_gc_sections): Add is_elf_hash_table check.
197 (elf_gc_common_finalize_got_offsets): Likewise.
198 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
200 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
201 rather than testing creator flavour.
203 2003-11-28 Christian Groessler <chris@groessler.org>
205 * cpu-z8k.c: Convert to ISO C90.
206 * coff-z8k.c: Likewise.
208 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
210 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
211 Add link info argument.
212 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
213 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
214 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
215 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
216 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
217 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
218 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
219 * elf.c (assign_file_positions_except_relocs,
220 assign_file_positions_for_segments): Likewise. Adjust calls.
222 2003-11-27 Mark Kettenis <kettenis@gnu.org>
224 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
227 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
228 Richard Sandiford <rsandifo@redhat.com>
230 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
231 (mips_elf_set_no_stub): New function.
232 (mips_elf_multi_got): Call it.
233 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
234 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
235 use mips_elf_create_dynamic_relocation to deal with any compatibility
236 issues. Store the adjusted addend in the GOT slot.
238 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
240 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
241 procesing N_BINCL stabs.
243 2003-11-25 Alan Modra <amodra@bigpond.net.au>
245 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
246 ppc_stub_plt_call to symbols defined in shared libs.
248 2003-11-22 Jakub Jelinek <jakub@redhat.com>
250 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
251 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
252 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
253 (elf_i386_check_relocs): Set it.
254 (elf_i386_finish_dynamic_symbol): If it is not set,
255 clear st_value of SHN_UNDEF symbol.
257 2003-11-20 Jim Blandy <jimb@redhat.com>
259 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
260 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
262 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
264 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
265 section for reloc output and subtract the output section's address
266 from the addend when converting a relocation into one against a
268 * elf64-s390.c (elf_s390_relocate_section): Likewise.
270 2003-11-18 James E Wilson <wilson@specifixinc.com>
272 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
273 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
274 for ia64_info->rel_fptr_sec.
276 2003-11-18 Alan Modra <amodra@bigpond.net.au>
278 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
281 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
283 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
284 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
285 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
286 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
287 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
288 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
289 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
290 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
291 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
292 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
293 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
294 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
295 (elf_backend_copy_indirect_symbol): Don't define.
297 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
299 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
302 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
304 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
305 to R_390_RELATIVE. Convert the other relocations against local
306 symbols to relocations against the start of the section.
307 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
308 to R_390_RELATIVE. Convert the other relocations against local
309 symbols to relocations against the start of the section.
311 2003-11-11 Nick Clifton <nickc@redhat.com>
313 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
314 info->executable not info->shared to decide if a .interp section
316 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
317 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
318 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
319 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
320 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
321 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
322 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
323 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
324 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
325 * elflink.h (size_dynamic_sections): Likewise.
327 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
329 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
330 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
331 found initialise the tls data directory entry.
333 2003-11-07 Alan Modra <amodra@bigpond.net.au>
335 * elf32-ppc.c (ppc_elf_install_value): Delete.
336 (shared_stub_entry, stub_entry): Make them arrays of ints.
337 Remove initial branch.
338 (ppc_elf_relax_section): Write one branch around all trampolines
339 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
340 branch range check. Only use shared_stub_entry when shared.
341 Test that branches can reach stubs. Write trampolines out at
342 end so that just one realloc is used. Handle little-endian
343 mode. Move relevant code from ppc_elf_install_value to here.
344 (ppc_elf_relocate_section): Move code handling RELAX32 from
345 ppc_elf_install_value to here.
347 2003-11-06 Alan Modra <amodra@bigpond.net.au>
349 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
350 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
352 (shared_stub_entry): Correct opcode.
353 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
354 (ppc_elf_relocate_section): Handle them.
356 2003-11-05 Alan Modra <amodra@bigpond.net.au>
358 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
359 updated section in case of merged section.
360 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
361 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
362 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
363 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
364 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
365 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
366 * elf32-cris.c (cris_elf_relocate_section): Likewise.
367 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
368 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
369 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
370 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
371 * elf32-i370.c (i370_elf_relocate_section): Likewise.
372 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
373 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
374 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
375 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
376 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
377 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
378 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
379 * elf32-s390.c (elf_s390_relocate_section): Likewise.
380 * elf32-sh.c (sh_elf_relocate_section): Likewise.
381 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
382 * elf32-v850.c (v850_elf_relocate_section) Likewise.
383 * elf32-vax.c (elf_vax_relocate_section): Likewise.
384 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
385 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
386 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
387 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
388 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
389 * elf64-s390.c (elf_s390_relocate_section): Likewise.
390 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
391 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
392 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
393 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
395 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
396 section for reloc output.
397 * elf32-i370.c (i370_elf_relocate_section): Likewise.
398 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
399 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
400 * elf32-vax.c (elf_vax_relocate_section): Likewise.
401 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
402 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
404 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
405 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
407 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
410 2003-11-05 Alan Modra <amodra@bigpond.net.au>
412 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
413 (elf32_d10v_relocate_section): Use them to handle -r reloc
414 adjustments, and in place of _bfd_elf_rela_local_sym.
416 * cpu-iq2000.c (arch_info_struct): Warning fix.
418 2003-11-05 Alan Modra <amodra@bigpond.net.au>
420 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
421 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
423 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
424 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
426 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
427 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
428 non-default visibility.
429 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
432 2003-11-04 Alan Modra <amodra@bigpond.net.au>
434 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
435 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
436 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
437 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
438 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
439 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
440 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
442 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
443 "dereferencing type-punned pointer" warnings.
445 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
446 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
447 * bfd-in2.h: Regenerate.
448 * binary.c (binary_set_section_contents): Ditto.
449 * bout.c (b_out_set_section_contents): Ditto.
450 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
451 * coffcode.h (coff_set_section_contents): Ditto.
452 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
453 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
454 * elf.c (_bfd_elf_set_section_contents): Ditto.
455 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
456 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
457 * i386msdos.c (msdos_set_section_contents): Ditto.
458 * ieee.c (ieee_set_section_contents): Ditto.
459 * ihex.c (ihex_set_section_contents): Ditto.
460 * libaout.h (NAME(aout,set_section_contents)): Ditto.
461 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
462 (_bfd_generic_set_section_contents): Ditto.
463 * libbfd.h: Regenerate.
464 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
465 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
466 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
467 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
468 * mmo.c (mmo_set_section_contents): Ditto.
469 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
470 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
471 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
472 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
473 * nlmcode.h (nlm_set_section_contents): Ditto.
474 * oasys.c (oasys_set_section_contents): Ditto.
475 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
476 * ppcboot.c (ppcboot_set_section_contents): Ditto.
477 * srec.c (srec_set_section_contents): Ditto.
478 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
479 * tekhex.c (tekhex_set_section_contents): Ditto.
480 (move_section_contents): Ditto.
481 * versados.c (versados_set_section_contents): Ditto.
482 * vms-misc.c (_bfd_save_vms_section): Ditto.
483 * vms.c (vms_set_section_contents): Ditto.
484 * vms.h (_bfd_save_vms_section): Ditto.
486 2003-11-04 Alan Modra <amodra@bigpond.net.au>
488 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
490 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
492 (ppc64_elf_build_stubs): Allocate space for relbrlt.
494 2003-11-04 Alan Modra <amodra@bigpond.net.au>
496 * bfd-in.h (_bfd_elf_tls_setup): Declare.
497 * bfd-in2.h: Regenerate.
498 * elf-bfd.h (struct elf_link_tls_segment): Delete.
499 (struct elf_link_hash_table): Add tls_sec and tls_size.
500 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
501 * elflink.c (_bfd_elf_tls_setup): New function.
502 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
503 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
504 saving tls segment info, round segment size up.
505 (elf_link_output_extsym): Adjust code using tls segment info.
506 (elf_link_input_bfd): Likewise.
507 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
508 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
509 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
510 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
511 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
512 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
513 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
514 (elfNN_ia64_dtprel_base): Likewise.
515 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
516 (alpha_get_tprel_base): Likewise.
517 (struct alpha_relax_info): Remove tls_segment.
518 (elf64_alpha_relax_got_load): Adjust invocation of
519 alpha_get_dtprel_base and alpha_get_tprel_base.
520 (elf64_alpha_relax_tls_get_addr): Likewise.
521 (elf64_alpha_relax_section): Likewise.
522 (elf64_alpha_relocate_section): Likewise.
523 (elf64_alpha_relax_find_tls_segment): Delete.
524 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
525 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
526 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
527 * elf32-ppc.h (ppc_elf_tls_setup): Update.
528 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
529 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
530 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
531 (ppc64_elf_relocate_section): Likewise.
532 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
534 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
536 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
537 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
538 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
539 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
540 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
541 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
542 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
543 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
544 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
545 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
546 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
547 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
548 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
549 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
550 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
551 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
552 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
553 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
554 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
555 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
556 * elfxx-target.h (elf_backend_plt_header_size): Don't define
557 or include in target initializer.
559 2003-11-03 Andrew Cagney <cagney@redhat.com>
561 * section.c (bfd_set_section_contents): Make the "location" buffer
563 * bfd-in2.h: Re-generate.
565 2003-10-30 Andrew Cagney <cagney@redhat.com>
567 * syms.c: Replace "struct symbol_cache_entry" with "struct
569 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
570 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
571 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
572 * bfd-in2.h: Re-generate.
574 2003-10-30 Jakub Jelinek <jakub@redhat.com>
576 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
577 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
579 (struct elfNN_ia64_local_hash_table): Remove.
580 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
581 to htab_t. Add loc_hash_memory field.
582 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
584 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
586 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
587 loc_hash_table. Initialize loc_hash_memory.
588 (elfNN_ia64_hash_table_free): New function.
589 (elfNN_ia64_local_hash_lookup): Remove.
590 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
592 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
593 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
594 (bfd_elfNN_bfd_link_hash_table_free): Define.
596 2003-10-30 Alan Modra <amodra@bigpond.net.au>
598 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
599 symbol string in place.
601 2003-10-30 Jim Blandy <jimb@redhat.com>
603 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
604 object's mach field: all PowerPC machines are supersets of the
605 original rs6000, but not later rs6000 machines.
607 2003-10-30 Alan Modra <amodra@bigpond.net.au>
609 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
610 Add "val" and "sval" fields.
611 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
612 (read_attribute_value): Expand and adjust DW_* occurrences.
613 (scan_unit_for_functions, parse_comp_unit): Likewise.
615 2003-10-30 Phil Edwards <phil@codesourcery.com>
617 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
618 other common ELF triples.
619 (i[3-7]86-*-vxworks): Change to ELF format.
620 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
621 (sh-*-vxworks): New stanza.
623 2003-10-30 Lars Knoll <lars@trolltech.com>
624 Michael Matz <matz@suse.de>
625 Jakub Jelinek <jakub@redhat.com>
626 Alan Modra <amodra@bigpond.net.au>
628 * merge.c (struct sec_merge_sec_info): Update comment.
629 (struct sec_merge_hash_entry): Remove entsize.
630 (sec_merge_hash_lookup): Only adjust alignment when creating.
631 (sec_merge_emit): Remove register keyword.
632 (cmplengthentry, last4_eq, last_eq): Delete.
633 (strrevcmp, strrevcmp_align, is_suffix): New.
634 (merge_strings): Use them to implement fast suffix merging.
635 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
637 (_bfd_elf_strtab_add): Lose on >2G strings.
638 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
639 (cmplengthentry, last4_eq): Delete.
640 (strrevcmp, is_suffix): New.
641 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
643 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
645 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
648 2003-10-29 Philip Blundell <philb@gnu.org>
650 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
652 (PLT_HEADER_SIZE): New.
653 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
654 (struct elf32_arm_relocs_copied): ... this. Count both
655 pcrel and non-pcrel relocs. All uses updated.
656 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
657 sections and symbol/section mapping cache.
658 (create_got_section): New.
659 (elf32_arm_create_dynamic_sections): New.
660 (elf_backend_create_dynamic_sections): Use it.
661 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
662 (elf32_arm_check_relocs): Likewise.
663 (elf32_arm_adjust_dynamic_symbol): Likewise.
664 (elf32_arm_copy_indirect_symbol): New.
665 (elf32_arm_link_hash_table_create): Initialise new fields.
666 (elf32_arm_gc_sweep_hook): Implement.
667 (elf32_arm_discard_copies): Delete.
668 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
669 (elf32_arm_finish_dynamic_sections): Likewise.
670 (elf_backend_can_refcount): Define.
671 (elf_backend_copy_indirect_symbol): Likewise.
672 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
674 2003-10-29 Alan Modra <amodra@bigpond.net.au>
676 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
677 (elf_backend_grok_psinfo): Define.
678 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
680 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
681 sections with the same name.
682 (elfcore_grok_lwpstatus): Likewise.
683 (elfcore_grok_win32pstatus): Likewise.
684 (elfcore_grok_note): Likewise.
685 (elfcore_grok_nto_status): Likewise.
686 (elfcore_grok_nto_gregs): Likewise.
688 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
690 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
693 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
695 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
697 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
699 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
700 hash table for real symbols.
702 2003-10-23 Michael Snyder <msnyder@redhat.com>
704 * section.c (asection): Fix typo in comment.
706 2003-10-23 Alan Modra <amodra@bigpond.net.au>
708 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
709 reloc symbol index to it. Don't allow gd syms in shared libs
711 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
712 (ppc64_elf_size_stubs): Likewise.
713 (ppc64_elf_relocate_section): Check that tls relocs are only used
714 with tls syms, and similarly for non-tls. Correct symbol used
715 when optimizing toc tls code.
717 2003-10-22 Nick Clifton <nickc@redhat.com>
719 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
720 processing an executable.
722 2003-10-22 Jakub Jelinek <jakub@redhat.com>
724 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
726 (_bfd_elf_link_assign_sym_version): Likewise.
727 * elflink.h (size_dynamic_sections): Likewise.
729 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
730 Michael Snyder <msnyder@redhat.com>
732 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
733 bfd_mach_sh4a_nofpu): New machine types.
734 * bfd-in2.h: Rebuilt.
735 * cpu-sh.c (compatible): Remove unused function.
736 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
737 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
738 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
740 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
742 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
743 describing mismatched formats involving the Maverick FP type.
745 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
747 * binary.c (binary_object_p): Pass machine flag along with
750 2003-10-21 Thorsten Brehm <brehm@gmx.net>
752 * archures.c (bfd_default_scan): Add support for mcf528x.
753 * ieee.c (ieee_write_processor): Likewise.
755 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
756 Bernardo Innocenti <bernie@develer.com>
758 * archures.c: Add MCF528x (MCFv4) support.
759 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
760 * bfd-in2.h: Regenerate.
762 2003-10-20 Andrew Cagney <cagney@redhat.com>
764 * targets.c: Replace "struct sec" with "struct bfd_section"
765 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
766 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
767 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
768 * aout-tic30.c, aout-target.h:
769 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
771 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
773 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
774 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
775 (struct _mmix_elf_section_data): New member pjs.
776 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
778 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
779 (mmix_reloc_map): Ditto.
780 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
781 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
782 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
784 (mmix_elf_check_relocs): Move early return to after
785 mmix_elf_check_common_relocs call.
786 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
787 (_bfd_mmix_before_linker_allocation): Rename from
788 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
789 Arrange to set the initial relaxable size of sections.
790 (_bfd_mmix_after_linker_allocation): Rename from
791 _bfd_mmix_finalize_linker_allocated_gregs.
792 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
793 (bfd_elf64_get_section_contents): Define.
794 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
795 * libbfd.h, bfd-in2.h: Regenerate.
797 * reloc.c (bfd_generic_relax_section): Default-set
798 section->_cooked_size here.
799 (bfd_generic_get_relocated_section_contents): Don't set it here.
802 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
804 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
805 output section has been discarded.
807 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
809 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
810 (h8300_reloc16_extra_cases): Likewise.
811 (h8300_bfd_link_add_symbols): Likewise.
813 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
815 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
816 (h8300sn_info_struct): Likewise.
817 (h8300hn_info_struct): Likewise.
819 2003-10-16 Pavel Roskin <proski@gnu.org>
821 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
822 for sections which lack size info.
824 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
826 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
829 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
831 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
832 undefined patterns with '*'.
834 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
836 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
837 use the last CIE from a different section.
838 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
839 size of the output section.
841 2003-10-07 Roland McGrath <roland@redhat.com>
843 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
844 new section from p_align header field.
846 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
848 * elf32-xtensa.c (xtensa_read_table_entries): The external size
851 2003-10-15 Andrew Cagney <cagney@redhat.com>
853 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
854 with NAME##_canonicalize_symtab.
855 * libcoff-in.h (coff_canonicalize_symtab): Update.
856 * xsym.h (bfd_sym_canonicalize_symtab): Update.
857 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
858 * coffgen.c (coff_canonicalize_symtab): Update.
859 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
860 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
861 * ieee.c (ieee_vec): Update comment.
862 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
863 * mmo.c (mmo_canonicalize_symtab): Update.
864 * nlm-target.h (nlm_canonicalize_symtab): Update.
865 * nlmcode.h (nlm_canonicalize_symtab): Update.
866 * i386msdos.c (msdos_canonicalize_symtab): Update.
867 * hp300hpux.c (MY (canonicalize_symtab)): Update.
868 * oasys.c (oasys_canonicalize_symtab): Update.
869 * som.c (som_canonicalize_symtab): Update.
870 * pef.c (bfd_pef_canonicalize_symtab): Update.
871 * nlmcode.h (nlm_canonicalize_symtab): Update.
872 * xsym.c (bfd_sym_canonicalize_symtab): Update.
873 * vms.c (vms_canonicalize_symtab): Update.
874 * versados.c (versados_canonicalize_symtab): Update.
875 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
876 * ieee.c (ieee_canonicalize_symtab): Update.
877 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
878 * reloc.c: Update comment.
879 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
880 * coff64-rs6000.c (aix5coff64_vec): Update.
881 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
882 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
883 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
884 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
885 * hp300hpux.c (MY_canonicalize_symtab): Update.
886 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
887 * aout-tic30.c (MY_canonicalize_symtab): Update.
888 * aout-target.h (MY_canonicalize_symtab): Update.
889 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
890 * elf.c (_bfd_elf_canonicalize_symtab): Update.
891 * elfcode.h (elf_canonicalize_symtab): Update.
892 * ihex.c (ihex_canonicalize_symtab): Update.
893 * tekhex.c (tekhex_canonicalize_symtab): Update.
894 * binary.c (binary_canonicalize_symtab): Update.
895 * srec.c (srec_canonicalize_symtab): Update.
897 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
899 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
901 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
903 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
905 (sh_elf_check_relocs): Likewise.
907 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
908 (sh64_elf_merge_symbol_attribute): New.
909 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
910 (sh64_elf64_merge_symbol_attribute): New.
912 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
914 * elf-bfd.h (struct elf_backend_data): New function pointer member
915 elf_backend_merge_symbol_attribute.
916 * elflink.h (elf_link_add_object_symbols): Adjust call to
917 elf_backend_merge_symbol_attribute if the backend defined it.
918 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
919 (elfNN_bed): Add that to the initializer.
921 2003-10-14 Bob Wilson <bob.wilson@acm.org>
923 * elf32-xtensa.c (get_is_linkonce_section): Delete.
924 (xtensa_is_property_section, xtensa_is_littable_section): Use
925 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
926 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
927 (xtensa_get_property_section_name): Check section name instead of
928 calling get_is_linkonce_section. Remove unused bfd parameter. Use
929 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
930 linkonce section names by appending ".xt.insn" or ".xt.lit".
931 (xtensa_read_table_entries): Remove bfd argument in call to
932 xtensa_get_property_section_name. Free section name when done.
933 (elf_xtensa_combine_prop_entries): Free leaking table.
935 2003-10-13 Richard Sandiford <rsandifo@redht.com>
937 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
938 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
939 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
940 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
942 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
943 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
945 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
947 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
948 (bfd_elf64_ia64_after_parse): Likewise.
949 * bfd-in2.h: Regenerated.
951 * elfxx-ia64.c (oor_ip): New.
952 (oor_branch_size): Likewise.
953 (bfd_elfNN_ia64_after_parse): Likewise.
954 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
955 equals sizeof (oor_ip).
957 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
959 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
960 renumbering of some relocation numbers.
962 2003-10-11 Alan Modra <amodra@bigpond.net.au>
964 * coff-sh.c: Move definition of MAP and guard more code with
967 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
968 * bfd-in2.h: Regenerate.
970 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
972 * Makefile.am: Run "make dep-am".
973 * Makefile.in: Regenerate.
974 * doc/Makefile.in: Likewise.
976 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
978 * cofflink.c: Include "safe-ctype.h".
979 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
981 2003-10-08 Dave Brolley <brolley@redhat.com>
982 On behalf of Michael Snyder <msnyder@redhat.com>
984 * archures.c: Add FRV fr550 machine.
986 * elf32-frv.c: Ditto.
987 * bfd-in2.h: Regenerate.
989 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
991 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
992 for non-SGI N64 ABI. Improve code consitency.
994 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
996 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
999 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
1001 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
1003 * cofflink.c (coff_link_add_symbols): Deal with split stab
1005 * elflink.h (elf_link_add_object_symbols): Deal with split stab
1007 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
1008 * libbfd.h: Regenerated.
1010 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
1011 overflow, set reloc start position to after the count
1012 reloc. Subtract one from num relocs. Give error on 0xffff relocs
1014 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
1016 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
1019 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1021 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1022 last CIE/FDE if needed.
1024 2003-10-06 Nick Clifton <nickc@redhat.com>
1026 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1029 2003-10-06 Matt Thomas <matt@3am-software.com>
1031 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1033 2003-10-06 Robert Millan <robertmh@gnu.org>
1035 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1036 * config.bfd: Likewise.
1037 * configure: Regenerate.
1039 2003-10-04 Christian Groessler <chris@groessler.org>
1041 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1044 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1046 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1047 * elf32-m68hc11.c: Likewise.
1048 * elf32-m68hc12.c: Likewise.
1049 * elf32-m68hc1x.h: Likewise.
1051 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1053 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1054 of flags between HC12 and HCS12.
1056 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1058 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1059 which become empty after merging.
1061 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1063 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1064 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1066 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1068 * archures.c (bfd_mach_mipsisa64r2): New define.
1069 * bfd-in2.h: Regenerate.
1070 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1071 * cpu-mips.c (I_mipsisa64r2): New enum value.
1072 (arch_info_struct): Add entry for I_mipsisa64r2.
1073 * elfxx-mips.c (_bfd_elf_mips_mach)
1074 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1075 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1076 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1078 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1080 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1081 Handle SHN_IA_64_ANSI_COMMON.
1082 (elf_backend_section_from_bfd_section): Defined.
1084 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1086 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1087 of a pointer to section. Check bad symbol index.
1088 (_bfd_elf_link_read_relocs): Modify calls to
1089 elf_link_read_relocs_from_section.
1091 2003-09-23 DJ Delorie <dj@redhat.com>
1093 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1094 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1095 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1096 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1097 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1098 R_SH_PSHA, R_SH_PSHL added.
1099 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1100 (sh_elf_relocate_section): Support new relocs.
1102 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1104 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1105 dynamic relocation offsets.
1107 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1109 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1110 hash table using _bfd_generic_link_hash_table_free.
1112 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1114 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1115 type of prefix_length and suffix_length to int. Rename "attributes"
1117 (_bfd_elf_get_sec_type_attr): Update prototype.
1118 * elf.c (get_special_section): Rewrite.
1119 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1120 attr and type pointers.
1121 (_bfd_elf_new_section_hook): Adjust for above.
1122 (special_sections): Merge suffix with prefix. Set
1123 prefix_length for all entries. Set suffix_length appropriately.
1124 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1125 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1126 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1127 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1128 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1129 * elf32-v850.c (v850_elf_special_sections): Likewise.
1130 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1131 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1132 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1133 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1134 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1135 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1136 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1137 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1139 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1141 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1142 ->got if the section already exists.
1144 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1146 * dwarf2.c (decode_line_info): Cope with an initially empty
1149 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1151 * acinclude.m4: Include ../config/accross.m4.
1152 * aclocal.m4: Regenerated.
1154 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1156 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1157 (host64): Remove if HOST_64BIT_TYPE is set to long.
1159 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1161 (HOST_U_64BIT_TYPE): Likewise.
1163 * configure: Regenerated.
1165 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1167 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1168 since some ABIs round up the size of the struct.
1170 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1172 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1173 the old symbol is undefined and the new symbol is defined.
1175 2003-09-18 Andreas Schwab <schwab@suse.de>
1177 * simple.c (bfd_simple_get_relocated_section_contents): Use
1178 _bfd_generic_link_hash_table_create instead of
1179 bfd_link_hash_table_create.
1181 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1183 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1184 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1186 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1187 Randolph Chung <randolph@tausq.org>
1189 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1190 hppa_link_hash_newfunc, hppa_build_one_stub,
1191 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1192 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1193 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1194 for generating import stubs for calls to statically linked PIC
1196 (hppa_type_of_stub): Don't generate an import stub for calls to
1197 statically linked pic functions. Generate import stubs for calls
1198 in a shared object, to functions not in a regular file, and to
1199 defined weak functions. Add new argument INFO.
1200 (hppa_build_one_stub): Don't undef ADDIL_DP.
1201 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1202 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1203 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1204 non-shared link. Convert instructions that use the the linkage table
1205 pointer, or a facsimile thereof, to use the global data pointer when
1206 the reloc has been changed.
1208 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1210 * archures.c: Add new machine names for hppa.
1211 * bfd-in2.h: Regenerate.
1212 * cpu-hppa.c: Use the new machine names.
1214 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1216 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1217 all_local_syms member.
1218 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1219 to get the local symbols.
1221 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1223 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1224 (elf_backend_special_sections): Define.a
1227 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1228 section is read-only.
1230 2003-09-04 Nick Clifton <nickc@redhat.com>
1232 * archures.c (bfd_mach_v850e1): Define.
1233 * bfd-in2.h: Regenerate.
1234 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1235 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1236 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1237 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1238 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1239 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1240 linked with v850e binaries. Mark the output as v850e.
1242 2003-09-03 Nick Clifton <nickc@redhat.com>
1244 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1245 symbols that are used in relocs.
1247 2003-08-30 Robert Millan <robertmh@gnu.org>
1249 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1250 * config.bfd: Likewise.
1251 * configure: Regenerate.
1253 2003-08-31 Christian Groessler <chris@groessler.org>
1255 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1256 instead of returning bfd_reloc_continue.
1258 2003-08-31 Andreas Jaeger <aj@suse.de>
1260 * merge.c: Update to ISO C90.
1262 2003-08-27 Ian Lance Taylor <ian@airs.com>
1264 * configure.in: Check for strtoull.
1265 * bfd.c (bfd_scan_vma): Use strtoull when available.
1266 * configure, config.in: Regenerate.
1268 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1269 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1270 __GNUC__ when deciding whether to use long long for
1272 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1274 2003-08-27 Christian Groessler <chris@groessler.org>
1276 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1277 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1279 (elf32_i860_howto_table): Insert the new functions as
1280 'special_function's in the proper reloc type entries.
1282 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1284 * elf32-frv.c (elf32_frv_relocate_section): Use
1285 _bfd_elf_rela_local_sym.
1287 2003-08-26 Michael Snyder <msnyder@redhat.com>
1289 * cpu-frv.c: Remove unused enum.
1291 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1293 * reloc.c: Fix documentation for MIPS ELF relocations.
1294 libbfd.h: Regenerate.
1295 bfd-in2.h: Regenerate.
1297 2003-08-24 Jason Eckhardt <jle@rice.edu>
1299 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1301 2003-08-24 Jason Eckhardt <jle@rice.edu>
1303 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1304 shift by 2 before storing the relocated value.
1306 2003-08-23 Jason Eckhardt <jle@rice.edu>
1308 * coff-i860.c (coff_i860_reloc_nyi): New function.
1309 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1310 LOWn, SPLITn, and BRADDR.
1311 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1312 before trying to access the entry.
1313 (coff_i860_rtype_to_howto): Likewise.
1314 (coff_i860_reloc_type_lookup): New function.
1315 (i860_reloc_processing): New function.
1316 (coff_bfd_reloc_type_lookup): Define macro.
1317 (RELOC_PROCESSING): Define macro.
1318 Minor formatting adjustments.
1320 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1322 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1324 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1326 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1327 .got section at 8 bytes.
1329 2003-08-21 Nick Clifton <nickc@redhat.com>
1331 * cofflink.c: Update to ISO C90 and tidy up formatting.
1333 2003-08-21 Randolph Chung <tausq@debian.org>
1335 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1336 can have OSABI=Linux or OSABI=SysV. Check for both.
1337 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1339 2003-08-21 Nick Clifton <nickc@redhat.com>
1341 * po/sv.po: Updated Swedish translation.
1343 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1345 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1347 2003-08-20 Nick Clifton <nickc@redhat.com>
1349 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1350 replace some duplicated code in most elfxx-xxxx.c files. This
1351 version uses the new fields in bfd_link_info.
1353 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1354 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1355 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1356 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1357 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1358 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1359 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1360 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1361 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1362 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1363 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1364 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1365 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1366 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1367 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1368 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1369 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1370 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1371 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1373 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1374 elf_hppa_remark_useless_dynamic_symbols,
1375 elf_hppa_relocate_section): Use the new fields in
1376 bfd_link_info structure.
1377 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1378 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1379 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1380 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1381 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1382 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1384 * elflink.h (elf_link_output_extsym): Fix test for reporting
1385 undefined symbols in shared libraries. Remove redundant test
1386 of shlib_undefined when reporting references to forced local
1389 2003-08-18 Andreas Schwab <schwab@suse.de>
1391 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1394 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1396 * simple.c (bfd_simple_get_relocated_section_contents): Move
1397 reloc_done hack to before first bfd_section_size call. Change all
1398 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1400 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1402 * elf64-ppc.c: Don't include elf/ppc.h.
1404 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1406 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1407 code to work with 64-bit bfds.
1409 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1411 * dep-in.sed: Remove libintl.h.
1412 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1413 (POTFILES.in): Remove target.
1414 * Makefile.in: Regenerate.
1416 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1418 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1419 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1420 use the function sym from the previous reloc.
1422 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1424 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1426 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1427 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1428 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1429 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1430 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1431 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1433 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1434 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1435 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1436 on undefined symbols if -pie.
1437 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1439 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1441 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1442 branch to __libc_start_main.
1444 2003-08-08 Dmitry Diky <diwil@mail.ru>
1446 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1448 * cpu-msp430.c: Likewise.
1449 * elf32-msp430.c: Likewise.
1450 * bfd-in2.h: Regenerate.
1452 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1454 * elfxx-target.h: Remove PTR cast.
1455 * targets.c (bfd_target): Make backend_data const void *.
1456 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1457 * elf-m10300.c: Likewise.
1459 * elf32-hppa.c: Likewise.
1460 * elf32-i386.c: Likewise.
1461 * elf32-m68hc1x.c: Likewise.
1462 * elf32-ppc.c: Likewise.
1463 * elf32-s390.c: Likewise.
1464 * elf32-sh.c: Likewise.
1465 * elf32-sh64.c: Likewise.
1466 * elf32-sparc.c: Likewise.
1467 * elf32-xtensa.c: Likewise.
1468 * elf64-mips.c: Likewise.
1469 * elf64-ppc.c: Likewise.
1470 * elf64-s390.c: Likewise.
1471 * elf64-sh64.c: Likewise.
1472 * elf64-sparc.c: Likewise.
1473 * elf64-x86-64.c: Likewise.
1474 * elfcode.h: Likewise.
1475 * elfcore.h: Likewise.
1476 * elflink.c: Likewise.
1477 * elflink.h: Likewise.
1478 * elfxx-ia64.c: Likewise.
1479 * elfxx-mips.c: Likewise.
1480 * elfxx-mips.h: Likewise.
1481 * elf.c (prep_headers): Remove useless check for null backend_data.
1482 * bfd-in2.h: Regenerate.
1484 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1485 (NAME): Use ## rather than CONCAT4 macro.
1486 * elfcode.h: Remove one remaining PARAMS macro.
1487 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1488 * elf-strtab.c: Likewise.
1489 * elf-hppa.h: Likewise.
1490 * elf32-hppa.h: Likewise.
1491 * elf32-hppa.c: Likewise.
1492 (elf32_hppa_add_symbol_hook): Delete.
1493 (elf_backend_add_symbol_hook): Don't define.
1494 * libhppa.h: Convert to C90. Replace INLINE with inline.
1496 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1498 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1499 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1500 function descriptors, but warn.
1501 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1502 stub syms so that we can avoid a stub sym if we already have a
1503 plt sym. Do not redefine an existing symbol.
1504 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1507 2003-08-06 Nick Clifton <nickc@redhat.com>
1509 * po/fr.po: Updated French translation.
1511 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1513 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1516 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1518 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1519 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1521 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1523 * coffcode.h (coff_slurp_line_table): Return with a warning
1524 message if the line number table could not be read.
1526 2003-08-04 Nick Clifton <nickc@redhat.com>
1528 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1529 to messages produced for .gnu.warning.SYMBOL sections.
1531 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1533 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1534 * elfcore.h: Likewise.
1535 * elflink.c: Likewise.
1536 * elflink.h: Likewise.
1537 * elf.c (sym_is_global): Remove INLINE.
1538 (align_file_position): Replace INLINE with inline.
1539 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1540 (elf_file_p): Replace INLINE with inline.
1542 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1544 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1546 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1548 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1550 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1552 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1553 ElfNN_External_Rela instead of Elf64_External_Rela.
1555 2003-08-01 Nick Clifton <nickc@redhat.com>
1557 * config.bfd: Add code to catch obsolete configurations and warn
1558 about them unless --enable-obsolete is used. Use this to mark
1559 vax-vms port as obsolete.
1561 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1563 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1564 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1566 * elfxx-target.h: Remove PARAMS macro. Formatting.
1568 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1570 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1571 * elf64-ppc.c (get_fdh): New function, split out from
1573 (ppc64_elf_check_relocs): Use get_fdh.
1574 (func_desc_adjust): Likewise. Tidy.
1575 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1576 exit. Use get_fdh. Account for superfluous dynamic relocs.
1577 (ppc64_elf_relocate_section): Warning fix.
1579 2003-07-30 Jason Eckhardt <jle@rice.edu>
1581 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1583 2003-07-30 Jason Eckhardt <jle@rice.edu>
1585 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1587 2003-07-30 Randolph Chung <tausq@debian.org>
1589 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1590 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1592 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1594 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1595 Replace PTR with void *. Formatting.
1596 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1597 (make_mapping): Likewise.
1599 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1601 * elf64-ppc.c (func_desc_adjust): Give linker created function
1602 descriptor symbols a size and type.
1603 (ppc64_elf_relocate_section): Correct lq insn test.
1605 2003-07-28 Eric Christopher <echristo@redhat.com>
1607 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1608 (ppc_elf_install_value): New function.
1609 (ppc_elf_sort_rela): Remove.
1610 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1611 and replace with out of range branch stubs.
1612 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1614 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1616 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1619 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1621 * elf.c (special_sections): Set attributes for .got and .plt.
1623 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1625 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1626 on function descriptors.
1627 (ELIMINATE_COPY_RELOCS): Expand comment.
1628 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1631 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1633 * elf.c (_bfd_elf_new_section_hook): Set the default section
1635 (elf_fake_sections): Set the section type based on asect->flags
1636 if it is SHT_NULL. Don't abort on processor specific section
1639 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1641 * bfd-in2.h: Regenerated.
1643 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1645 * elf-bfd.h (bfd_elf_special_section): New.
1646 (elf_backend_data): Add special_sections, a pointer to
1647 bfd_elf_special_section.
1648 (elf_section_type). New.
1649 (elf_section_flags): New.
1650 (_bfd_elf_get_sec_type_attr): New.
1652 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1653 real section type/flags.
1654 (special_sections): New.
1655 (get_special_section): New.
1656 (_bfd_elf_get_sec_type_attr): New.
1657 (_bfd_elf_new_section_hook): Check special_section to set
1658 elf_section_type and elf_section_flags.
1659 (elf_fake_sections): Don't use section name to set ELF section
1662 * elf32-m32r.c (m32r_elf_special_sections): New.
1663 (elf_backend_special_sections): Defined.
1665 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1666 (elf_backend_special_sections): Defined.
1668 * elf32-mcore.c (mcore_elf_special_sections): New.
1669 (elf_backend_special_sections): Defined.
1671 * elf32-ppc.c (ppc_elf_special_sections): New.
1672 (elf_backend_special_sections): Defined.
1674 * elf32-sh64.c (sh64_elf_special_sections): New.
1675 (elf_backend_special_sections): Defined.
1677 * elf32-v850.c (v850_elf_special_sections): New.
1678 (elf_backend_special_sections): Defined.
1680 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1681 (elf_backend_special_sections): Defined.
1683 * elf64-alpha.c (elf64_alpha_special_sections): New.
1684 (elf_backend_special_sections): Defined.
1686 * elf64-hppa.c (elf64_hppa_special_sections): New.
1687 (elf_backend_special_sections): Defined.
1689 * elf64-ppc.c (ppc64_elf_special_sections): New.
1690 (elf_backend_special_sections): Defined.
1692 * elf64-sh64.c (sh64_elf64_special_sections): New.
1693 (elf_backend_special_sections): Defined.
1695 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1696 (elf_backend_special_sections): Defined.
1698 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1700 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1701 (elf_backend_special_sections): Defined.
1703 * elfxx-target.h (elf_backend_special_sections): New. Default
1705 (elfNN_bed): Initialize special_sections.
1707 * section.c (bfd_abs_section): Remove const.
1708 (bfd_und_section): Likewise.
1709 (bfd_com_section): Likewise.
1710 (bfd_ind_section): Likewise.
1712 2003-07-24 Nick Clifton <nickc@redhat.com>
1714 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1715 sections are assigned the LOAD attribute.
1717 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1719 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1720 * elf32-sh64-com.c: Likewise.
1721 * elf32-sh64.c: Likewise.
1722 * elf32-sh64.h: Likewise.
1723 * elf64-sh64.c: Likewise.
1725 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1727 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1728 (allocate_dynrelocs): Likewise.
1729 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1730 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1732 2003-07-24 Nick Clifton <nickc@redhat.com>
1734 * po/fr.po: Updated French translation.
1736 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1738 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1739 near the beginning of the file. Swap order of arguments. Call
1740 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1741 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1742 (elf_xtensa_relocate_section): Likewise.
1743 (shrink_dynamic_reloc_sections): Likewise.
1745 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1747 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1748 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1749 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1750 first printing an error message.
1751 (elf_xtensa_finish_dynamic_sections): Likewise.
1752 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1753 discarding literal table entries.
1754 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1755 (elf_xtensa_do_asm_simplify): Likewise.
1757 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1759 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1760 we have a local symbol in common section.
1762 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1764 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1767 2003-07-22 Nick Clifton <nickc@redhat.com>
1769 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1770 expected RS6000 storage classes.
1772 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1774 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1775 output_bfd unused to silence gcc.
1777 2003-07-21 Nick Clifton <nickc@redhat.com>
1779 * po/sv.po: Updated Swedish translation.
1781 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1783 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1784 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1785 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1786 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1787 now done in _bfd_elf_symbol_refs_local_p.
1788 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1789 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1790 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1792 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1794 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1796 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1798 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1799 (SYMBOL_CALLS_LOCAL): Likewise.
1801 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1802 immediately if symbol isn't defined locally.
1804 2003-07-18 Richard Henderson <rth@redhat.com>
1806 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1807 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1808 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1809 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1810 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1811 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1812 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1813 Update all callers to provide the relocation being resolved.
1815 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1817 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1820 2003-07-17 Nick Clifton <nickc@redhat.com>
1822 * po/es.po: New Spanish translation.
1823 * po/sv.po: New Swedish translation.
1824 * po/opcodes.pot: Regenerate.
1826 2003-07-16 Richard Henderson <rth@redhat.com>
1828 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1829 * elfxx-ia64.c, targets.c: Likewise.
1831 2003-07-16 Richard Henderson <rth@redhat.com>
1833 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1834 for symbols defined locally plus -Bsymbolic. Tidy logic.
1836 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1838 * archures.c (bfd_mach_mips7000): New.
1839 * bfd-in2.h: Regenerated.
1840 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1841 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1842 (mips_mach_extensions): Add an entry for it.
1844 2003-07-14 Nick Clifton <nickc@redhat.com>
1846 * po/tr.po: Update with latest version.
1847 * po/SRC-POTFILES.in: Regenerate.
1848 * po/bfd.pot: Regenerate.
1849 * Makfile.in: Regenerate.
1850 * configure: Regenerate.
1852 2003-07-12 Jeff Baker <jbaker@qnx.com>
1854 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1855 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1856 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1857 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1859 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1861 * coffcode.h (coff_set_section_contents): Set the
1862 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1864 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1866 * bfd-in.h (bfd_h8300_pad_address): Declare.
1867 * bfd-in2.h: Regenerate.
1868 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1869 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1870 addresses before checking whether they can be relaxed.
1871 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1872 Don't complain about overflows in general 8-bit relocations.
1873 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1874 Fix handling of R_H8_DIR24A8.
1876 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1878 * elf32-h8300.c: Convert function prototypes and definitions
1880 * coff-h8300.c: Likewise.
1881 * cpu-h8300.c: Likewise.
1883 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1885 * po/SRC-POTFILES.in: Regenerate.
1886 * po/bfd.pot: Likewise.
1888 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1890 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1891 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1892 .xt.lit.plt section.
1893 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1894 and allocate memory for it.
1895 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1896 section to the .got.loc section.
1897 (elf_xtensa_finish_dynamic_sections): Fix up call to
1898 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1899 the address of .got.loc.
1900 (relax_property_section): Shrink .got.loc to match changes in any
1901 literal table section.
1902 (xtensa_is_property_section): Change to match
1903 xtensa_get_property_section_name.
1904 (xtensa_is_littable_section): New.
1906 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1908 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1911 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1913 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1914 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1916 * Makefile.in: Regenerate.
1918 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1920 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1921 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1922 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1923 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1924 * elf32-am33lin.c: Rename global functions.
1925 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1926 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1927 * configure.in (bfd_elf32_am33lin_vec): Added.
1928 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1929 (elf32-am33lin.lo): List dependencies.
1930 * aclocal.m4, configure, Makefile.in: Rebuilt.
1931 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1932 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1933 ELF_ARCH was not defined before.
1934 (elf_symbol_leading_char): Define if not defined.
1935 * elf32-am33lin.c: Override the definitions above.
1936 * targets.c (bfd_elf32_am33lin_vec): New.
1938 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1940 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1941 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1942 pcrel_relocs_copied.
1943 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1944 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1945 ld-linux.so.2 to ld.so.1.
1946 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1947 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1948 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1949 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1950 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1951 .rela.* section contents with bfd_zalloc.
1952 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1953 * elf-m10300.c: Added declarations for functions missing them.
1954 Merge some shared-library changes from the i386 back-end. Use
1955 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1956 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1957 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1958 members of elf_link_hash_entry. Adjusted references.
1959 (mn10300_elf_final_link_relocate): dynobj was already loaded
1960 into a local variable, use it.
1961 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1962 * elf-m10300.c: Add missing function prototypes.
1963 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1964 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1965 relocation for dynamic relocations.
1966 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1967 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1968 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1969 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1970 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1971 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1972 adress is already known at the time we compute relaxations.
1973 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1974 and PLT32 to narrower relocations.
1975 * libbfd.h, bfd-in2.h: Rebuilt.
1976 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1977 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1978 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1979 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1980 BFD_RELOC_MN10300_RELATIVE): New relocs.
1981 * libbfd.h, bfd-in2.h: Rebuilt.
1982 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1983 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1985 (elf_mn10300_howto): Defined new relocation types.
1986 (mn10300_reloc_map): Map them.
1987 (_bfd_mn10300_elf_create_got_section): New fn.
1988 (mn10300_elf_check_relocs): Handle PIC relocs.
1989 (mn10300_elf_final_link_relocate): Likewise.
1990 (mn10300_elf_relocate_section): Handle DSOs.
1991 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1992 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1993 elf_mn10300_pic_plt_entry): New.
1994 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1995 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1996 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1997 elf_mn10300_plt_reloc_offset: New macros.
1998 (ELF_DYNAMIC_INTERPRETER): Likewise.
1999 (_bfd_mn10300_elf_create_dynamic_sections): New function.
2000 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
2001 (_bfd_mn10300_elf_discard_copies): Likewise.
2002 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
2003 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2004 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
2005 (elf_backend_can_gc_sections,
2006 elf_backend_create_dynamic_sections,
2007 elf_backend_adjust_dynamic_sections,
2008 elf_backend_size_dynamic_sections,
2009 elf_backend_finish_dynamic_symbol,
2010 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2011 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2012 elf_backend_got_header_size, elf_backend_plt_header_size): New
2015 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2017 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
2018 * elf-m10300.c (compute_function_info): Account for AM33
2019 registers in `movm' when computing stack space for `call' when
2020 linking for AM33/2.0 link.
2021 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2022 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2023 * bfd-in2.h: Rebuilt.
2024 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2025 * elf-m10300.c: Updated.
2026 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2027 * archures.c (bfd_mach_am332): Defined.
2028 * bfd-in2.h: Rebuilt.
2029 * cpu-m10300.c (bfd_am332_arch): Defined.
2030 (bfd_am33_arch): Chained with am33-2.
2031 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2032 (_bfd_mn10300_elf_final_write_processing): Likewise.
2034 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2036 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2038 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2040 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2041 (struct ppc64_elf_obj_tdata): New.
2042 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2043 (ppc64_elf_mkobject): New function.
2044 (struct got_entry): Add "owner". Move "tls_type".
2045 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2046 (ppc64_elf_init_stub_bfd): New function.
2047 (create_got_section): Create header .got in dynobj. Create .got
2048 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2049 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2050 Look for dynobj .got, and test it.
2051 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2052 (update_local_sym_info): Likewise.
2053 (ppc64_elf_check_relocs): Likewise.
2054 (ppc64_elf_gc_sweep_hook): Likewise.
2055 (ppc64_elf_tls_optimize): Likewise.
2056 (allocate_dynrelocs): Likewise.
2057 (ppc64_elf_size_dynamic_sections): Likewise.
2058 (ppc64_elf_relocate_section): Likewise.
2059 (ppc64_elf_next_toc_section): Update comment.
2060 (toc_adjusting_stub_needed): Remove unneeded cast.
2061 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2062 testing section flags.
2063 (ppc64_elf_build_stubs): Likewise.
2064 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2065 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2066 (func_desc_adjust): Copy over dynamic info for undef weaks.
2067 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2068 (ppc64_elf_size_stubs): Update prototype.
2069 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2070 input sections rather than scanning dynobj.
2072 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2074 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2075 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2076 (mips_elf_create_msym_section): Delete.
2077 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2078 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2079 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2080 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2081 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2082 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2083 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2085 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2087 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2090 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2092 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2093 of relocations whose offset is -2.
2095 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2097 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2098 forced-local symbols like other locals. Don't create relocations
2099 against STN_UNDEF in irix objects.
2101 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2103 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2104 compatible objects, add the values of defined external symbols
2107 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2109 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2110 initialize a GOT entry to the symbol's st_value.
2112 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2114 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2115 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2116 (ppc_elf_tdata): Define.
2117 (elf_local_ptr_offsets): Adjust.
2118 (ppc_elf_mkobject): New function.
2119 (bfd_elf32_mkobject): Define.
2121 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2122 * elfcore.h (elf_core_file_p): Likewise.
2123 * section.c (bfd_section_init): Remove prototype.
2125 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2127 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2129 (enum elf_linker_section_enum): Delete.
2130 (struct elf_linker_section): Delete.
2131 (struct elf_linker_section_pointers): Delete.
2132 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2133 Make linker_section_pointers a void**.
2134 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2135 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2136 of old item in elf-bfd.h.
2137 (struct elf_linker_section): Likewise.
2138 (struct elf_linker_section_pointers): Likewise.
2139 (elf_local_ptr_offsets): Define.
2140 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2141 (ppc_elf_link_hash_newfunc): Init it.
2142 (struct ppc_elf_link_hash_table): Add sbss.
2143 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2145 (elf_create_linker_section): Fold into..
2146 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2147 Make rela section here if shared.
2148 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2149 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2151 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2153 (ppc_elf_check_relocs): Adjust.
2154 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2155 creating .sbss by hand.
2156 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2158 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2160 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2161 complain_overflow_bitfield.
2162 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2163 complain_overflow_bitfield.
2165 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2167 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2170 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2172 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2173 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2175 (get_fptr): For -pie create .opd as writable section and create
2177 (elfNN_ia64_check_relocs): Change info->shared into
2179 (allocate_fptr): Likewise.
2180 (allocate_dynrel_entries): Account for a relative reloc for -pie
2181 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2182 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2184 (set_got_entry): Don't create a relative reloc if -pie
2185 want_ltoff_fptr for undefweak symbol.
2186 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2187 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2190 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2192 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2193 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2194 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2195 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2196 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2197 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2198 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2199 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2200 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2202 2003-07-04 Paul Clarke <paulc@senet.com.au>
2204 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2205 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2206 <R_H8_DIR32A16>: Fix type of relocation.
2208 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2210 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2211 sections were created already. Remove unnecessary tests of
2212 the previous change.
2214 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2216 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2217 bfd_make_section for existing sections.
2219 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2221 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2222 create_got_section if we already have done so.
2223 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2224 (sh_elf_check_relocs): Likewise.
2225 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2226 htab->root.dynobj instead.
2227 (sh_elf_check_relocs): Likewise.
2228 (sh_elf_finish_dynamic_sections): Likewise.
2230 * section.c (bfd_make_section): Return NULL for existing section.
2232 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2234 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2235 ppc_elf_create_got if we've already done so.
2237 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2238 (_bfd_elf_find_pointer_linker_section): Likewise.
2239 (bfd_elf32_create_pointer_linker_section): Likewise.
2240 (bfd_elf32_finish_pointer_linker_section): Likewise.
2241 (bfd_elf64_create_pointer_linker_section): Likewise.
2242 (bfd_elf64_finish_pointer_linker_section): Likewise.
2243 (_bfd_elf_make_linker_section_rela): Likewise.
2244 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2245 (elf_finish_pointer_linker_section): Likewise.
2246 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2247 (_bfd_elf_create_linker_section): Move this function..
2248 (_bfd_elf_find_pointer_linker_section): ..and this..
2249 * elflink.h (elf_create_pointer_linker_section): ..and this..
2250 (elf_finish_pointer_linker_section): ..and this..
2251 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2253 (elf_create_linker_section): Convert to C90, tidy.
2254 (elf_find_pointer_linker_section): Likewise.
2255 (elf_create_pointer_linker_section): Likewise.
2256 (elf_finish_pointer_linker_section): Likewise.
2257 * elf32-i370.c: Delete #if 0 code.
2259 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2261 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2262 _restf* to be satisfied by shared libs, and always force them local.
2263 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2264 Correct test for "bl".
2265 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2268 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2270 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2271 (s390_tls_reloc): New function.
2272 (elf_howto_table): Add long displacement relocations R_390_20,
2273 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2274 (elf_s390_reloc_type_lookup): Likewise.
2275 (elf_s390_check_relocs): Likewise.
2276 (elf_s390_gc_sweep_hook): Likewise.
2277 (elf_s390_relocate_section): Likewise.
2278 * elf64-s390.c: Same changes as for elf32-s390.c.
2279 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2280 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2281 BFD_RELOC_390_TLS_GOTIE20.
2282 * bfd-in2.h: Regenerate.
2283 * libbfd.h: Likewise.
2285 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2287 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2288 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2290 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2292 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2293 Replace PTR with void *. Formatting.
2294 * archive64.c: Likewise.
2295 * archures.c: Likewise.
2296 * bfd-in.h: Likewise.
2298 * bfdio.c: Likewise.
2299 * bfdwin.c: Likewise.
2300 * cache.c: Likewise.
2301 * corefile.c: Likewise.
2302 * format.c: Likewise.
2304 * libbfd-in.h: Likewise.
2305 * libbfd.c: Likewise.
2306 * linker.c: Likewise.
2307 * opncls.c: Likewise.
2308 * reloc.c: Likewise.
2309 * section.c: Likewise.
2310 * simple.c: Likewise.
2312 * targets.c: Likewise.
2313 * bfd-in2.h: Regenerate.
2314 * libbfd.h: Regenerate.
2316 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2317 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2318 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2319 (bfd_getb64): Rewrite without parens.
2320 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2321 * cache.c (insert, snip): Remove INLINE.
2322 * linker.c (bfd_link_add_undef): Likewise.
2324 2003-06-29 Andreas Jaeger <aj@suse.de>
2326 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2327 unnecessary prototypes. Replace PTR with void *.
2328 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2329 trim plt entries. Move undefweak non-default visibility test ...
2330 (allocate_dynrelocs): ... from here.
2331 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2333 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2334 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2335 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2336 dynreloc and .got relocs.
2337 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2340 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2342 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2344 2003-06-27 Nick Clifton <nickc@redhat.com>
2346 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2347 bfd_add_gnu_debuglink_section and only create the section, do not
2348 fill in its contents.
2349 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2350 contents of a .gnu-debuglink section.
2351 * bfd-in2.h: Regenerate.
2353 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2355 * elfxx-mips.c: Revert .got alignment to 2**4.
2357 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2359 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2361 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2363 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2364 relocation header setup.
2366 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2368 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2369 (ppc_elf_reloc_type_lookup): Modify comment.
2370 (ppc_elf_info_to_howto): Ditto.
2371 (ppc_elf_relocate_section): Ditto.
2372 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2374 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2376 * aout-ns32k.c: Correct spelling of "relocatable".
2377 * aoutx.h: Likewise.
2378 * bfd-in.h: Likewise.
2381 * coff-a29k.c: Likewise.
2382 * coff-alpha.c: Likewise.
2383 * coff-arm.c: Likewise.
2384 * coff-i386.c: Likewise.
2385 * coff-i860.c: Likewise.
2386 * coff-i960.c: Likewise.
2387 * coff-m68k.c: Likewise.
2388 * coff-m88k.c: Likewise.
2389 * coff-mcore.c: Likewise.
2390 * coff-mips.c: Likewise.
2391 * coff-or32.c: Likewise.
2392 * coff-ppc.c: Likewise.
2393 * coff-rs6000.c: Likewise.
2394 * coff-sh.c: Likewise.
2395 * coff-tic80.c: Likewise.
2396 * coff64-rs6000.c: Likewise.
2397 * cofflink.c: Likewise.
2398 * cpu-ns32k.c: Likewise.
2399 * ecoff.c: Likewise.
2400 * ecofflink.c: Likewise.
2401 * elf-bfd.h: Likewise.
2402 * elf-eh-frame.c: Likewise.
2403 * elf-hppa.h: Likewise.
2404 * elf-m10200.c: Likewise.
2405 * elf-m10300.c: Likewise.
2407 * elf32-arm.h: Likewise.
2408 * elf32-avr.c: Likewise.
2409 * elf32-cris.c: Likewise.
2410 * elf32-d10v.c: Likewise.
2411 * elf32-dlx.c: Likewise.
2412 * elf32-fr30.c: Likewise.
2413 * elf32-frv.c: Likewise.
2414 * elf32-h8300.c: Likewise.
2415 * elf32-hppa.c: Likewise.
2416 * elf32-i370.c: Likewise.
2417 * elf32-i386.c: Likewise.
2418 * elf32-i860.c: Likewise.
2419 * elf32-i960.c: Likewise.
2420 * elf32-ip2k.c: Likewise.
2421 * elf32-iq2000.c: Likewise.
2422 * elf32-m32r.c: Likewise.
2423 * elf32-m68hc11.c: Likewise.
2424 * elf32-m68hc1x.c: Likewise.
2425 * elf32-m68k.c: Likewise.
2426 * elf32-mcore.c: Likewise.
2427 * elf32-mips.c: Likewise.
2428 * elf32-msp430.c: Likewise.
2429 * elf32-openrisc.c: Likewise.
2430 * elf32-ppc.c: Likewise.
2431 * elf32-s390.c: Likewise.
2432 * elf32-sh.c: Likewise.
2433 * elf32-sh64.c: Likewise.
2434 * elf32-sparc.c: Likewise.
2435 * elf32-v850.c: Likewise.
2436 * elf32-vax.c: Likewise.
2437 * elf32-xstormy16.c: Likewise.
2438 * elf32-xtensa.c: Likewise.
2439 * elf64-alpha.c: Likewise.
2440 * elf64-hppa.c: Likewise.
2441 * elf64-mips.c: Likewise.
2442 * elf64-mmix.c: Likewise.
2443 * elf64-ppc.c: Likewise.
2444 * elf64-s390.c: Likewise.
2445 * elf64-sh64.c: Likewise.
2446 * elf64-sparc.c: Likewise.
2447 * elf64-x86-64.c: Likewise.
2448 * elfcode.h: Likewise.
2449 * elflink.h: Likewise.
2450 * elfn32-mips.c: Likewise.
2451 * elfxx-ia64.c: Likewise.
2452 * elfxx-mips.c: Likewise.
2453 * i386linux.c: Likewise.
2455 * libcoff-in.h: Likewise.
2456 * linker.c: Likewise.
2457 * m68klinux.c: Likewise.
2458 * pdp11.c: Likewise.
2459 * pe-mips.c: Likewise.
2460 * peXXigen.c: Likewise.
2461 * reloc.c: Likewise.
2462 * reloc16.c: Likewise.
2463 * sparclinux.c: Likewise.
2464 * sunos.c: Likewise.
2466 * versados.c: Likewise.
2468 * xcofflink.c: Likewise.
2469 * bfd-in2.h: Regenerate.
2470 * libcoff.h: Regenerate.
2471 * libbfd.h: Regenerate.
2473 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2475 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2478 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2479 prototypes and casts. Replace PTR with void *. Formatting.
2480 * elf32-ppc.c: Likewise. Break long strings too.
2481 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2482 (ppc_elf_unhandled_reloc): Internationalize error message.
2483 * elf32-ppc.h: Remove PARAMS.
2485 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2487 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2489 (ppc_elf_final_write_processing): Likewise.
2491 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2493 * elflink.h (elf_link_input_bfd): Check raw size when using
2494 kept_section to preserve debug information discarded by
2497 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2499 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2500 (ppc64_elf_setup_section_lists): Set it.
2501 (ppc64_elf_relocate_section): Check sym section id against top_id.
2502 (ppc_build_one_stub): Comment on top_id.
2504 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2506 * config.bfd: Add tic4x-*-rtems*.
2508 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2510 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2511 prototypes and casts. Replace PTR with void *. Format copyright.
2513 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2514 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2515 (ppc_type_of_stub): Make r_type an enum.
2516 (ppc64_elf_size_stubs): Likewise.
2517 * elf64-ppc.h: Remove PARAMS macro.
2519 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2521 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2522 elf hash tab fields.
2524 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2525 (ppc64_elf_info_to_howto): Likewise.
2526 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2527 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2529 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2531 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2532 reloc overflow on discarded eh_frame entries.
2534 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2536 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2537 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2538 Return error condition.
2539 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2540 that have has_gp_reloc set.
2541 (struct ppc_link_hash_table): Add stub_count.
2542 (ppc_build_one_stub): Increment it.
2543 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2545 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2547 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2549 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2550 size calculation from addend. Round size up.
2552 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2554 * elf32-cris.c (cris_elf_relocate_section) <case
2555 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2556 symbol from a normal object or an undefined weak symbol.
2558 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2560 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2563 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2565 * section.c (struct sec): Put back kept_section.
2566 (STD_SECTION): Put back kept_section initialization.
2567 * bfd-in2.h: Regenerate.
2569 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2570 sections for relocateable output. Use kept_section to preserve
2571 debug information discarded by linkonce.
2573 2003-06-17 Roland McGrath <roland@redhat.com>
2575 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2576 segment-relative relocation between different segments.
2578 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2580 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2581 optimizations earlier.
2583 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2584 Restore previous input_list type.
2585 (ppc64_elf_link_hash_table_create): Undo last change.
2586 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2587 per output section, but don't bother with bfd_abs_section marker.
2588 (ppc64_elf_next_input_section): Adjust for multiple input section
2590 (group_sections): Likewise.
2592 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2594 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2595 *r_offset == r_addend for RELATIVE relocs against .got.
2597 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2599 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2601 2003-06-17 Nick Clifton <nickc@redhat.com>
2603 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2604 in the vtable_entries_used array to allow for the accessing
2605 the largest element.
2607 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2609 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2611 (ppc64_elf_link_hash_table_create): Init input_list here.
2612 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2613 per output section. Set toc_off for abs and other standard sections.
2614 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2615 (ppc64_elf_next_input_section): Adjust for single input section list.
2616 Don't set toc_curr from input bfds that haven't set elf_gp.
2617 (group_sections): Adjust for single input section list.
2619 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2621 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2623 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2624 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2625 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2626 got section for RELATIVE relocs. Fix wrong comment. Change condition
2627 under which dynamic relocs update the section contents.
2629 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2631 * config.bfd: Add i386-netbsd-gnu target.
2633 2003-06-12 Nick Clifton <nickc@redhat.com>
2635 * opncls.c (calc_crc32): Rename to
2636 bfd_calc_gnu_debuglink_crc32 and export.
2637 (GNU_DEBUGLINK): Define and use to replace occurrences of
2638 hard-coded ".gnu_debuglink" in the code.
2639 (get_debug_link_info): Prevent aborts by replacing call to
2640 xmalloc with a call to malloc.
2641 (find_separate_debug_file): Prevent aborts by replacing calls
2642 to xmalloc and xstrdup with calls to malloc and strdup.
2643 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2645 * bfd-in2.h: Regenerate.
2647 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2649 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2650 New target (was i[3-7]86-*-openbsd* before).
2651 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2652 (vax-*-openbsd*): New target.
2654 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2656 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2658 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2659 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2660 (mips_elf_create_got_section): Likewise.
2661 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2663 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2665 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2666 (elf_mips_howto_table_rel): Use it.
2667 (gprel32_with_gp): Move prototype.
2668 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2669 Use mips_elf_generic_reloc.
2670 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2672 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2674 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2675 as in the other *_gprel*_reloc functions.
2676 (gprel32_with_gp): Handle partial_inplace properly.
2677 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2678 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2679 Do addend handling directly instead of calling
2680 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2681 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2682 of zero addend. Handle partial_inplace properly.
2683 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2685 (mips_elf64_gprel16_reloc): Likewise.
2686 (mips_elf64_literal_reloc): Likewise.
2687 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2688 logic as in the other *_gprel*_reloc functions. Handle
2689 partial_inplace properly.
2690 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2691 addend. Handle partial_inplace properly.
2692 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2693 of calling _bfd_mips_elf_gprel16_with_gp.
2694 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2695 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2697 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2698 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2699 of calling _bfd_mips_elf_gprel16_with_gp.
2700 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2701 partial_inplace properly. Fix wrong addend handling. Fix overflow
2703 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2705 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2706 (_bfd_mips_elf_relocate_section): Likewise.
2707 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2708 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2709 (_bfd_mips_elf_sign_extend): New prototype.
2711 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2713 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2714 New target (was sparc-*-openbsd* before).
2715 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2717 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2718 * configure: Regenerate.
2720 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2722 * po/Make-in (DESTDIR): New.
2723 (install-data-yes): Support $(DESTDIR).
2724 (uninstall): Likewise.
2726 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2728 * Makefile.am (config.status): Depend on version.h.
2730 * Makefile.in: Regenerate.
2731 * po/SRC-POTFILES.in: Regenerate.
2733 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2734 Gary Hade <garyhade@us.ibm.com>
2736 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2738 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2740 * archures.c (bfd_mach_h8300sxn): New architecture.
2741 * bfd-in2.h: Regenerate.
2742 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2743 (h8300sxn_info_struct): New.
2744 (h8300sx_info_struct): Link to it.
2745 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2746 (elf32_h8_final_write_processing): Likewise.
2748 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2750 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2751 elfxx-target.h so that we can use elf_backend_got_header_size.
2752 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2753 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2755 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2757 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2758 ppc_stub_plt_branch_r2off.
2759 (struct ppc_stub_hash_entry): Reorganize.
2760 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2761 toc_curr, toc_off and emit_stub_syms.
2762 (ppc64_elf_link_hash_table_create): Init them.
2763 (ppc_stub_name): Correct string size.
2764 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2765 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2767 (ppc_type_of_stub): Tweak root.type test.
2768 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2769 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2770 ppc_stub_plt_branch_r2off.
2771 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2772 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2773 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2774 Initialize elf_gp and toc_curr.
2775 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2776 (ppc64_elf_next_input_section): Set toc_off.
2777 (group_sections): Ensure groups have the same TOC.
2778 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2779 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2780 Build new glink stub.
2781 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2782 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2783 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2784 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2785 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2786 (STD_SECTION): Update.
2787 * ecoff.c (bfd_debug_section): Update comment.
2788 * bfd-in2.h: Regenerate.
2790 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2792 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2793 NULL function pointers.
2795 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2797 * simple.c (bfd_simple_get_relocated_section_contents): Call
2798 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2800 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2802 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2803 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2805 * coff-tic4x.c: Ditto
2806 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2807 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2808 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2809 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2811 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2812 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2813 * coff-apollo.c: Ditto
2815 * coff-h8300.c: Ditto
2816 * coff-h8500.c: Ditto
2817 * coff-i960.c: Ditto
2818 * coff-m68k.c: Ditto
2819 * coff-m88k.c: Ditto
2820 * coff-mcore.c: Ditto
2822 * coff-sparc.c: Ditto
2823 * coff-tic80.c: Ditto
2824 * coff-we32k.c: Ditto
2828 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2830 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2833 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2835 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2836 (bfd_section_from_phdr): Likewise.
2837 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2838 (get_program_header_size): Count with PT_GNU_STACK.
2839 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2840 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2842 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2844 * elflink.h (elf_link_input_bfd): Call linker error_handler
2845 for discarded definitions.
2847 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2849 * syms.c (decode_section_type): Return 'n' if section flags are
2850 SEC_HAS_CONTENTS && SEC_READONLY.
2852 2003-06-03 Nick Clifton <nickc@redhat.com>
2854 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2855 R_V850_ABS32. Add entry for R_V850_REL32.
2856 (v850_elf_reloc_map): Likewise.
2857 (v850_elf_check_relocs): Likewise.
2858 (v850_elf_perform_relocation): Likewise.
2859 (v850_elf_final_link_relocate): Likewise. Include computation
2860 to make R_V850_REl32 pc-relative.
2862 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2864 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2865 and DT_DEBUG dynamic tag even for position independent executables.
2866 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2868 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2870 * config.bfd: Move obsolete entries out of the range of the
2871 targmatch sed script.
2873 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2875 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2877 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2879 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2880 plt entries, not just 8191.
2882 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2884 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2885 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2887 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2888 Jakub Jelinek <jakub@redhat.com>
2890 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2891 instead of info->shared where appropriate.
2892 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2893 * elflink.c (_bfd_elf_create_got_section): Likewise.
2894 (_bfd_elf_link_create_dynamic_sections): Likewise.
2895 (_bfd_elf_link_assign_sym_version): Likewise.
2896 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2897 and DT_DEBUG dynamic tag even for position independent executables.
2898 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2899 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2900 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2901 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2902 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2903 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2904 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2905 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2906 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2908 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2910 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2912 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2914 2003-05-29 Nick Clifton <nickc@redhat.com>
2916 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2918 * Makefile.am: Add dependency on safe-ctype.h.
2919 * Makefile.in: Regenerate.
2921 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2923 * elfxx-mips.c: Don't force symbols local unconditionally.
2925 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2927 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2928 undefined_symbol call.
2930 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2932 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2933 (mips_elf_link_hash_table): Likewise.
2935 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2937 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2938 R_MIPS_GNU_REL16_S2 support.
2939 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2940 (mips_elf64_rtype_to_howto): Use it.
2941 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2942 R_MIPS_GNU_REL16_S2 support.
2943 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2944 (mips_elf_n32_rtype_to_howto): Use it.
2946 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2948 * som.h: Define PA_2_0 before including a.out.h
2950 2003-05-07 Eric Christopher <echristo@redhat.com>
2951 Alexandre Oliva <aoliva@redhat.com>
2953 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2954 pic tests, change to warning.
2955 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2957 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2959 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2960 well as shle-...-netbsdelf. Remove duplicate entry.
2962 2003-05-21 Nick Clifton <nickc@redhat.com>
2964 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2965 for X_STORMY16_REL_12 reloc.
2967 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2968 the type of the hash table in the bfd_link_info structure.
2969 (bfd_elf_get_runpath_list): Likewise.
2971 2003-05-19 Roland McGrath <roland@redhat.com>
2973 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2974 * bfd-in.h: Declare it.
2975 * bfd-in2.h: Regenerated.
2976 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2977 * elf-bfd.h (struct elf_backend_data): New function pointer member
2978 elf_backend_bfd_from_remote_memory.
2979 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2981 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2982 (elfNN_bed): Add that to the initializer.
2984 2003-05-15 Roland McGrath <roland@redhat.com>
2986 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2988 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2990 * elflink.h (elf_link_output_extsym): Only issue error about !=
2991 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2993 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2995 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2996 when removing the old definition for symbols with non-default
2999 2003-05-18 Jason Eckhardt <jle@rice.edu>
3001 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
3003 2003-05-17 Andreas Schwab <schwab@suse.de>
3005 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
3006 elf_section_data during processing of pc-relative and absolute
3008 (elf_m68k_relocate_section): Use the cached reloc section instead
3009 of computing it again. Fix handling of visibility. Don't modify
3010 addend when copying over a relocation into the output.
3012 2003-05-17 Alan Modra <amodra@bigpond.net.au>
3014 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3015 to trim plt entries. Move undefweak non-default visibility test..
3016 (allocate_dynrelocs): ..from here.
3017 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
3018 dynamic_sections_created here. Update comment. Move undefweak
3019 non-default visibility test..
3020 (allocate_dynrelocs): ..from here. Fix comment.
3021 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3022 to trim plt entries. Move undefweak non-default visibility test..
3023 (allocate_dynrelocs): ..from here. Fix comment.
3024 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3025 STV_DEFAULT rather than comparing with zero.
3026 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3027 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3029 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3031 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3033 (_bfd_set_gp_value): Likewise.
3035 2003-05-16 Michael Snyder <msnyder@redhat.com>
3036 From Bernd Schmidt <bernds@redhat.com>
3037 * archures.c (bfd_mach_h8300sx): New.
3038 * bfd-in2.h: Regenerate.
3039 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3040 (h8300sx_info_struct): New.
3041 (h8300s_info_struct): Link to it.
3042 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3043 (elf32_h8_final_write_processing): Likewise.
3044 (elf32_h8_relax_section): Likewise.
3046 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3048 * config.bfd: Accept i[3-7]86 variants.
3049 * configure.host: Likewise.
3050 * configure.in: Likewise.
3051 * configure: Regenerate.
3053 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3055 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3058 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3060 * elflink.h (elf_link_check_versioned_symbol): Also allow
3063 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3064 H.J. Lu <hongjiu.lu@intel.com>
3066 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3067 (elf_i386_relocate_section): Likewise.
3068 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3069 (ppc_elf_relocate_section): Likewise.
3070 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3071 (ppc64_elf_relocate_section): Likewise.
3073 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3075 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3077 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3079 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3080 processor capability, allow merge of HC12 and HCS12 in some cases.
3081 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3082 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3083 (bfd_m68hc12_arch): Link it.
3084 (scan_mach): New function.
3086 2003-05-13 Andrew Haley <aph@redhat.com>
3088 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3090 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3091 H.J. Lu <hongjiu.lu@intel.com>
3093 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3094 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3095 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3096 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3097 (ppc_elf_relocate_section): Likewise.
3098 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3099 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3100 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3101 relocs need no other types.
3102 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3104 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3105 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3108 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3110 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3111 copy ELF_LINK_NON_GOT_REF from weakdef.
3112 (allocate_dynrelocs): For undef weak syms with non-default
3113 visibility, a) don't allocate plt entries, b) don't allocate
3114 .got relocs, c) discard dyn rel space
3115 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3116 don't generate dynamic relocs.
3117 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3118 for weakdefs when symbol already adjusted.
3120 2003-05-12 Nick Clifton <nickc@redhat.com>
3122 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3123 overflow detection for R_XSTORMY16_16 reloc.
3125 2003-05-12 Paul Clarke <paulc@senet.com.au>
3127 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3129 2003-05-11 Jason Eckhardt <jle@rice.edu>
3131 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3133 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3135 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3138 2003-05-11 Andreas Schwab <schwab@suse.de>
3140 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3141 complicated tests for unresolvable relocs with a simple direct
3142 scheme using "unresolved_reloc" var. Report some detail on
3143 bfd_reloc_outofrange and similar errors.
3145 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3147 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3148 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3149 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3150 * elf64-s390.c: Likewise.
3152 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3154 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3155 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3156 ELF_LINK_NON_GOT_REF from weakdef.
3157 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3158 already been adjusted before treating it specially.
3159 * el64-s390.c: Likwise.
3161 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3163 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3164 non-default visibility, a) don't make them dynamic, b) discard
3165 space for dynamic relocs.
3166 (elf_s390_relocate_section): Initialize the GOT entries and skip
3167 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3168 symbols with non-default visibility.
3169 * elf64-s390.c: Likewise.
3171 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3173 * cpu-arm.c (arm_check_note): Warning fix.
3174 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3175 to keep relocs if edited.
3176 (iq2000_elf_print_private_bfd_data): Return TRUE.
3177 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3179 (elfNN_ia64_relax_ldxmov): Warning fix.
3180 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3181 * xtensa-modules.c (get_num_opcodes): Warning fix.
3183 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3185 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3187 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3189 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3190 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3191 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3192 (bfd_elf_record_link_assignment): Move from elflink.h.
3193 (_bfd_elf_merge_symbol): Likewise.
3194 (_bfd_elf_add_default_symbol): Likewise.
3195 (_bfd_elf_export_symbol): Likewise.
3196 (_bfd_elf_link_find_version_dependencies): Likewise.
3197 (_bfd_elf_link_assign_sym_version): Likewise.
3198 (_bfd_elf_link_read_relocs): Likewise.
3199 (_bfd_elf_link_size_reloc_section): Likewise.
3200 (_bfd_elf_fix_symbol_flags): Likewise.
3201 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3202 (_bfd_elf_link_sec_merge_syms): Likewise.
3203 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3204 and bed->s->sizeof_rela.
3205 (_bfd_elf_link_output_relocs): Likewise.
3206 * elf-bfd.h (struct elf_size_info): Rename file_align to
3208 (struct elf_info_failed): Move from elflink.h.
3209 (struct elf_assign_sym_version_info): Likewise.
3210 (struct elf_find_verdep_info): Likewise.
3211 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3212 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3213 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3214 _bfd_elf_link_assign_sym_version,
3215 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3216 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3217 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3218 _bfd_elf_link_sec_merge_syms): Declare.
3219 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3220 (_bfd_elf32_link_read_relocs): Likewise.
3221 (bfd_elf64_link_create_dynamic_sections): Likewise.
3222 (_bfd_elf64_link_read_relocs): Likewise.
3223 * elflink.h: Move lots o' stuff elsewhere.
3224 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3225 (bfd_elf64_record_link_assignment): Likewise.
3226 (bfd_elf_record_link_assignment): Declare.
3227 * bfd-in2.h: Regenerate.
3228 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3229 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3230 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3231 (assign_file_positions_for_segments): Likewise.
3232 (assign_file_positions_except_relocs): Likewise.
3233 (swap_out_syms, elfcore_write_note): Likewise.
3234 * elf-m10200.c: Adjust for changed function names.
3235 * elf-m10300.c: Likewise.
3236 * elf32-arm.h: Likewise.
3237 * elf32-h8300.c: Likewise.
3238 * elf32-hppa.c: Likewise.
3239 * elf32-ip2k.c: Likewise.
3240 * elf32-m32r.c: Likewise.
3241 * elf32-m68hc11.c: Likewise.
3242 * elf32-m68hc1x.c: Likewise.
3243 * elf32-m68k.c: Likewise.
3244 * elf32-mips.c: Likewise.
3245 * elf32-ppc.c: Likewise.
3246 * elf32-sh.c: Likewise.
3247 * elf32-v850.c: Likewise.
3248 * elf32-xtensa.c: Likewise.
3249 * elf64-alpha.c: Likewise.
3250 * elf64-hppa.c: Likewise.
3251 * elf64-mmix.c: Likewise.
3252 * elf64-ppc.c: Likewise.
3253 * elf64-sh64.c: Likewise.
3254 * elfxx-ia64.c: Likewise.
3255 * elfxx-mips.c: Likewise.
3256 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3257 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3258 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3259 * elf64-mips.c (mips_elf64_size_info): Likewise.
3260 * elf64-s390.c (s390_elf64_size_info): Likewise.
3261 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3263 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3265 * elflink.h (elf_add_default_symbol): After skipping the
3266 unversioned symbol, go to non-default one.
3268 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3270 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3272 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3273 for symbols with non-default visibility.
3275 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3277 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3278 case that a DSO references a hidden symbol which may be
3279 satisfied by a versioned symbol in another DSO.
3280 (elf_link_output_extsym): Check versioned definition for hidden
3281 symbol referenced by a DSO.
3283 2003-05-07 Nick Clifton <nickc@redhat.com>
3285 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3286 R_XSTORMY16_16 reloc to ignore overflows.
3288 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3290 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3291 error message for mixing different-endian files. Check for ABI
3292 compatibility of input files with the selected emulation.
3294 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3296 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3297 non-default visibility, a) don't make them dynamic, b) discard
3298 space for dynamic relocs.
3299 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3301 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3302 non-default visibility, a) don't allocate plt entries, b) don't
3303 allocate .got relocs, c) discard dyn rel space,
3304 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3305 don't generate dynamic relocs.
3306 * elf64-ppc.c (allocate_dynrelocs): As above.
3307 (ppc64_elf_relocate_section): As above.
3309 2003-05-05 Andreas Jaeger <aj@suse.de>
3311 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3312 relocation entries for weak undefined symbols with non-default
3314 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3315 skip R_386_32/R_386_PC32 for weak undefined symbols with
3316 non-default visibility.
3318 2003-05-04 H.J. Lu <hjl@gnu.org>
3320 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3321 relocation entries for weak undefined symbols with non-default
3323 (elf_i386_relocate_section): Initialize the GOT entries and
3324 skip R_386_32/R_386_PC32 for weak undefined symbols with
3325 non-default visibility.
3327 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3328 descriptors for weak undefined symbols with non-default
3330 (allocate_dynrel_entries): Don't allocate relocation entries
3331 for symbols resolved to 0.
3332 (set_got_entry): Don't install dynamic relocation for weak
3333 undefined symbols with non-default visibility.
3334 (set_pltoff_entry): Likewise.
3336 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3337 with non-default visibility.
3338 (elf_link_output_extsym): Don't make weak undefined symbols
3339 with non-default visibility dynamic.
3341 2003-05-04 H.J. Lu <hjl@gnu.org>
3343 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3345 2003-05-04 H.J. Lu <hjl@gnu.org>
3347 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3348 symbol dynamic. Check indirection when removing the old
3349 definition for symbols with non-default visibility.
3350 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3352 2003-05-02 Nick Clifton <nickc@redhat.com>
3354 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3355 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3358 2003-05-02 Andreas Jaeger <aj@suse.de>
3360 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3361 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3362 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3363 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3364 ELF_LINK_NON_GOT_REF from weakdef.
3366 2003-05-02 Charles Lepple <clepple@ghz.cc>
3367 Nick Clifton <nickc@redhat.com>
3369 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3370 * aclocal.m4: Regenerate.
3371 * configure: Regenerate.
3372 * Makefile.in: Regenerate.
3374 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3376 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3377 weakdef sym has already been adjusted before treating it specially.
3378 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3379 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3380 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3381 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3383 2003-04-28 H.J. Lu <hjl@gnu.org>
3385 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3386 the relax finalize pass.
3388 * section.c (struct sec): Add need_finalize_relax and remove
3390 (STD_SECTION): Update struct sec initializer.
3391 * bfd-in2.h: Regenerated.
3393 2003-04-28 H.J. Lu <hjl@gnu.org>
3395 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3396 to copy any information related to dynamic linking when we flip
3399 2003-04-27 H.J. Lu <hjl@gnu.org>
3401 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3402 (ELF_LINK_DYNAMIC_WEAK): New.
3404 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3405 a symbol should be skipped. Ignore definitions in dynamic
3406 objects for symbols with non-default visibility.
3407 (elf_add_default_symbol): Adjusted.
3408 (elf_link_add_object_symbols): Check if a symbol should be
3409 skipped. Don't merge the visibility field with the one from
3411 (elf_link_check_versioned_symbol): Use undef_bfd.
3412 (elf_link_output_extsym): Warn if a forced local symbol is
3413 referenced from dynamic objects. Make non-weak undefined symbol
3414 with non-default visibility a fatal error.
3416 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3418 * configure.in: Bump version on HEAD to 2.14.90.
3419 * configure: Regenerated.
3421 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3424 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3425 when we couldn't relax something.
3427 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3429 * elflink.h (elf_merge_symbol): When we find a regular definition
3430 for an indirect symbol, flip the indirection so that the old
3431 direct symbol now points to the new definition.
3433 2003-04-24 Roland McGrath <roland@redhat.com>
3435 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3437 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3439 * elf32-ppc.c: Formatting and comment fixes.
3440 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3441 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3443 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3445 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3446 * bfd-in2.h: Rebuilt.
3447 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3448 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3450 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3451 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3452 (h8300sn_info_struct, h8300hn_info_struct): New.
3453 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3454 (elf32_h8_final_write_processing): Likewise.
3456 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3458 * elf32-sh.c (tpoff): New.
3459 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3460 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3461 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3462 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3463 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3464 (dtpoff_base): Fix wrong indentation.
3465 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3466 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3467 R_SH_TLS_TPOFF32 relocations.
3469 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3471 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3472 * cpu-sh.c: Likewise.
3473 * elf32-sh.c: Likewise.
3474 * reloc.c (bfd_reloc_code_real): Likewise.
3475 * elf32-sh64-com.c: Change comment to refer to SuperH.
3476 * elf32-sh64.c: Likewise.
3477 * elf64-sh64.c: Likewise.
3478 * bfd-in2.h (enum bfd_architecture): Regenerate.
3480 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3482 From Julien LEMOINE <speedblue@debian.org>
3483 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3484 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3486 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3488 * archures.c: Replace references to Mitsubishi M32R with references
3490 * relocs.c: Likewise.
3491 * bfd-in2.h: Regenerate.
3493 2003-04-21 Richard Henderson <rth@redhat.com>
3495 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3496 executable when a symbol is defined both regular and dynamic.
3498 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3500 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3501 (elf32-m68hc1x.lo): Update dependencies
3502 * configure.in: Add elf32-m68hc1x.lo.
3503 * configure: Rebuild.
3504 * Makefile.in: Rebuild.
3506 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3508 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3509 (m68hc11_elf_hash_table_create): New function.
3510 (elf32_m68hc11_link_hash_table_free): New function.
3511 (stub_hash_newfunc): New function.
3512 (m68hc11_add_stub): New function.
3513 (elf32_m68hc11_add_symbol_hook): New function.
3514 (elf32_m68hc11_setup_section_lists): New function.
3515 (elf32_m68hc11_next_input_section): New function.
3516 (elf32_m68hc11_size_stubs): New function.
3517 (elf32_m68hc11_build_stubs): New function.
3518 (m68hc11_get_relocation_value): New function.
3519 (elf32_m68hc11_relocate_section): Call the above to redirect
3520 some relocations to the trampoline code.
3521 (m68hc11_elf_export_one_stub): New function.
3522 (m68hc11_elf_set_symbol): New function.
3523 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3524 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3525 is not yet initialized.
3527 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3528 (elf32_m68hc11_stub_hash_entry): New struct.
3529 (m68hc11_page_info): Add trampoline handler address.
3530 (m68hc11_elf_link_hash_table): Add stubs generation members.
3531 (elf32_m68hc11_add_symbol_hook): Declare.
3532 (elf32_m68hc11_setup_section_lists): Declare.
3533 (elf32_m68hc11_size_stubs): Declare.
3534 (elf32_m68hc11_build_stubs): Declare.
3536 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3537 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3538 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3539 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3540 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3541 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3542 (bfd_elf32_bfd_link_hash_table_create): Define.
3543 (elf_backend_add_symbol_hook): Define.
3544 (m68hc11_elf_bfd_link_hash_table_create): New function.
3545 (m68hc11_elf_build_one_stub): New function.
3546 (m68hc11_elf_size_one_stub): New function.
3547 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3548 (bfd_elf32_bfd_link_hash_table_create): Define.
3550 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3551 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3552 (m68hc12_phys_addr): Ditto.
3553 (m68hc12_phys_page): Ditto.
3554 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3555 (elf32_m68hc11_gc_mark_hook): Likewise.
3556 (elf32_m68hc11_gc_sweep_hook): Likewise.
3557 (elf32_m68hc11_check_relocs): Likewise.
3558 (elf32_m68hc11_relocate_section): Likewise.
3559 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3560 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3561 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3562 (m68hc12_elf_build_one_stub): New function.
3563 (m68hc12_elf_size_one_stub): New function.
3564 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3565 (elf_backend_add_symbol_hook): Define.
3566 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3568 2003-04-18 Nick Clifton <nickc@redhat.com>
3570 * format.c (bfd_check_format_matches): Only check associated
3571 vector if the matching_vector has been created.
3573 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3575 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3576 2003-04-09's change.
3578 2003-04-15 Brian Ford <ford@vss.fsi.com>
3580 * peicode.h (coff_swap_scnhdr_in): If a section holds
3581 uninitialized data and is from an object file or from an
3582 executable image that has not initialized the s_size field, or if
3583 the physical size is padded, use the virtual size (stored in
3586 2003-04-15 H.J. Lu <hjl@gnu.org>
3588 * elflink.h (elf_link_add_object_symbols): Properly report
3589 filename for alignment reduction.
3591 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3593 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3594 * reloc.c: Likewise.
3595 * coff-h8300.c: Likewise.
3596 * coff-h8500.c: Likewise.
3597 * coff-sh.c: Likewise.
3598 * cpu-h8300.c: Likewise.
3599 * cpu-sh.c: Likewise.
3600 * elf32-h8300.c: Likewise.
3601 * elf32-sh.c: Likewise.
3602 * elf32-sh64-com.c: Likewise.
3603 * elf32-sh64.c: Likewise.
3604 * elf64-sh64.c: Likewise.
3605 * bfd-in2.h: Regenerate.
3607 2003-04-14 H.J. Lu <hjl@gnu.org>
3609 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3610 alignment for common symbols. Warn reducing alignment for
3611 common symbols. Report old filename when symbol size changes.
3613 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3615 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3616 occurrences of the same test changed in the previous patch.
3619 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3621 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3622 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3623 GOT_DISP/addend only if the symbol got a global GOT entry.
3625 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3627 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3628 GOT_PAGE/GOT_OFST referencing overridable symbol to
3630 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3631 global symbol as GOT_DISP.
3633 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3635 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3636 next relocation on an undefined symbol.
3638 2003-04-09 Richard Henderson <rth@redhat.com>
3640 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3641 Ignore relocations against r_symndx == 0.
3643 2003-04-09 H.J. Lu <hjl@gnu.org>
3645 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3646 FALSE for undefined symbols.
3647 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3649 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3651 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3652 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3655 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3657 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3658 pointer size from ABI, not arch_bits_per_address.
3660 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3662 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3663 constants for n32 ABI.
3665 2003-04-06 Andrew Cagney <cagney@redhat.com>
3667 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3668 free that leads to GDB vs BFD memory corruption.
3670 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3672 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3673 symbols that mark the end of the section.
3674 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3675 converting to a relative branch so that the offset is computed after
3676 the relaxation; also relocate a jsr into a bsr if possible but don't
3677 relax them if they are to a far symbol as we need to call the
3679 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3681 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3683 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3684 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3685 * bfd-in2.h: Regenerate
3686 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3687 * cpu-tic4x.c: Ditto
3689 2003-04-03 Nick Clifton <nickc@redhat.com>
3691 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3692 differently for object files and executables.
3693 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3694 for object files or for executables who have not already
3695 initialised the field.
3696 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3697 the PE format bfd is an executable.
3699 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3701 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3702 here as it's too early to reliably determine locality.
3703 (ppc_elf_gc_sweep_hook): Likewise.
3704 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3706 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3708 * xtensa-modules.c: Remove comment indicating that this is a
3711 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3713 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3715 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3717 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3718 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3719 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3721 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3723 (cpu-xtensa.lo): New target.
3724 (elf32-xtensa.lo): Likewise.
3725 (xtensa-isa.lo): Likewise.
3726 (xtensa-modules.lo): Likewise.
3727 * Makefile.in: Regenerate.
3728 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3729 (bfd_archures_list): Add bfd_xtensa_arch.
3730 * config.bfd: Handle xtensa-*-*.
3731 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3732 * configure: Regenerate.
3733 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3734 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3735 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3736 (bfd_elf32_xtensa_le_vec): Likewise.
3737 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3738 * cpu-xtensa.c: New file.
3739 * elf32-xtensa.c: Likewise.
3740 * xtensa-isa.c: Likewise.
3741 * xtensa-modules.c: Likewise.
3742 * libbfd.h: Regenerate.
3743 * bfd-in2.h: Likewise.
3745 2003-04-01 Nick Clifton <nickc@redhat.com>
3747 * archures.c (bfd_mach_arm_unknown): Define.
3748 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3749 bfd_arm_get_mach_from_notes): Prototype.
3750 * bfd-in2.h: Regenerate.
3751 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3752 bfd_arm_merge_machines.
3753 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3754 * coffcode.h (coff_set_arch_mach_hook): Call
3755 bfd_arm_get_mach_from_notes.
3756 * coffgen.c (coff_real_object_p): Revert previous delta.
3757 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3759 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3760 binaries compiled for different architectures..
3761 (bfd_arm_update_notes): New function: Update an ARM note section.
3762 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3763 number from an ARM note section.
3764 * elf32-arm.h (elf32_arm_object_p): Use
3765 bfd_arm_get_mach_from_notes.
3766 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3767 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3769 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3771 * dwarf2.c (read_attribute_value): Correct typo in comment.
3773 2003-04-01 Nick Clifton <nickc@redhat.com>
3775 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3776 instead of concat().
3777 (decode_line_info): Only free filename if it is not NULL.
3778 (add_line_info): Make a copy of the filename when storing it into
3781 2003-03-31 Andreas Schwab <schwab@suse.de>
3782 Daniel Jacobowitz <drow@mvista.com>
3784 * simple.c (bfd_simple_get_relocated_section_contents): Add
3785 parameter symbol_table. Optionally use it instead of the symbol
3786 table from the bfd. Save and restore output offsets and output
3787 sections around bfd_get_relocated_section_contents. Fix a memory
3789 (simple_save_output_info, simple_restore_output_info): New
3791 * bfd-in2.h: Regenerate.
3792 * dwarf2.c (read_abbrevs): Use
3793 bfd_simple_get_relocated_section_contents instead of
3794 bfd_get_section_contents.
3795 (decode_line_info): Likewise.
3796 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3798 (find_rela_addend): Remove.
3799 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3801 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3804 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3806 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3808 * dwarf2.c (concat_filename): Always allocate space for the
3810 (decode_line_info): Free the allocated filename returned by
3812 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3813 * elf.c (copy_private_bfd_data): Likewise.
3814 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3815 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3816 * format.c (bfd_check_format_matches): Likewise.
3817 * linker.c (bfd_generic_final_link): Likewise.
3818 * opncls.c (find_separate_debug_info): Likewise.
3819 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3821 2003-03-28 H.J. Lu <hjl@gnu.org>
3823 * elflink.h (elf_link_add_object_symbols): Correctly combine
3826 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3828 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3829 to -1 before recomputing got offsets.
3831 2003-03-26 Andreas Schwab <schwab@suse.de>
3833 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3834 (elf_m68k_relocate_section): Use it to correctly handle symbols
3836 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3837 entries for symbols that are forced to be local.
3839 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3841 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3842 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3843 * elfn32-mips.c, elf64-mips.c: Use it.
3845 2003-03-25 Stan Cox <scox@redhat.com>
3846 Nick Clifton <nickc@redhat.com>
3848 Contribute support for Intel's iWMMXt chip - an ARM variant:
3850 * archures.c: Add bfd_mach_arm_iWMMXt.
3851 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3852 * bfd-in2.h: Regenerate.
3853 * libbfd.h: Regenerate.
3854 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3855 object files to be linked with XScale ones.
3856 (coff_arm_final_link_postscript): Update note section.
3857 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3858 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3859 after identifying a coff binary.
3860 * cpu-arm.c (processors): Add iWMMXt.
3861 (arch_inf): Likewise.
3862 * elf32-arm.h (arm_object_p): Handle note section.
3863 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3864 be linked with XScale ones.
3865 (elf32_arm_section_flags): New function: Set flags on note section.
3866 (elf32_arm_final_write_processing): Handle note section.
3868 2003-03-21 DJ Delorie <dj@redhat.com>
3870 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3871 _bfd_elf_rela_local_sym.
3873 2003-03-20 H.J. Lu <hjl@gnu.org>
3875 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3878 2003-03-20 Nick Clifton <nickc@redhat.com>
3880 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3881 $idata5 in case bfd_coff_final_link is not called.
3883 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3885 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3887 (canon_reloc_count): Define.
3888 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3889 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3891 (sparc64_elf_canonicalize_reloc): New routine.
3892 (bfd_elf64_canonicalize_reloc): Define.
3894 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3896 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3897 againt mergeable sections. Take r_addend into account when caching
3900 2003-03-18 Richard Henderson <rth@redhat.com>
3902 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3903 local symbols that have no dyninfo.
3905 2003-03-14 Gene Smith <gene.smith@siemens.com>
3907 * ieee.c (ieee_write_expression): Handle the case where symbol is
3909 General formatting improvements.
3911 2003-03-13 Nick Clifton <nickc@redhat.com>
3913 * configure.in (LINGUAS): Add zh_CN.
3914 * configure: Regenerate.
3915 * po/zh_CN.po: New file.
3917 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3919 * aout-cris.c (BYTES_IN_WORD): Don't define.
3920 aout-encap.c: Likewise.
3921 aout-ns32k.c: Likewise.
3922 aout-tic30.c: Likewise.
3923 hp300bsd.c: Likewise.
3924 i386aout.c: Likewise.
3925 i386dynix.c: Likewise.
3926 i386linux.c: Likewise.
3927 i386lynx.c: Likewise.
3928 i386mach3.c: Likewise.
3929 m68k4knetbsd.c: Likewise.
3930 m68klinux.c: Likewise.
3931 m68klynx.c: Likewise.
3932 m68knetbsd.c: Likewise.
3933 m88kmach3.c: Likewise.
3934 mipsbsd.c: Likewise.
3935 newsos3.c: Likewise.
3936 sparclinux.c: Likewise.
3937 sparclynx.c: Likewise.
3938 sparcnetbsd.c: Likewise.
3939 vaxbsd.c: Likewise. Fix comment formatting.
3941 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3943 * Reverted 2003-03-02's patch.
3945 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3947 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3948 mips_elf64_get_dynamic_reloc_upper_bound,
3949 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3950 (bfd_elf64_get_canonicalize_reloc,
3951 bfd_elf64_get_dynamic_reloc_upper_bound,
3952 bfd_elf64_canonicalize_dynamic_reloc): Define.
3953 (mips_elf64_slurp_reloc_table): Support dynamic.
3954 (mips_elf64_slurp_one_reloc_table): Adjust.
3956 2003-03-12 Nick Clifton <nickc@redhat.com>
3958 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3959 'index' to 'offset' in test for zero value.
3961 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3963 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3964 dynamic relocations pointing to local or section symbols, use the
3965 NULL symbol instead. Document the choice to not emit an
3966 additional R_MIPS_64 relocation.
3968 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3970 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3971 zero index dynamic tls relocs generated for the GOT. Tidy code.
3972 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3973 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3975 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3977 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3978 a tls_get_addr call.
3980 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3981 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3982 ELF_LINK_NON_GOT_REF from weakdef.
3983 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3984 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3985 ELF_LINK_NON_GOT_REF from weakdef.
3986 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3987 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3988 ELF_LINK_NON_GOT_REF from weakdef.
3990 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3991 Andrew Haley <aph@redhat.com>
3993 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3994 output is relocateable.
3996 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3998 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
4001 2003-03-06 Alan Modra <amodra@bigpond.net.au>
4003 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
4005 (ELIMINATE_COPY_RELOCS): Define to zero.
4006 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
4007 TLSLD relocs. Report reloc types on a number of errors. Optimize
4008 LOCAL24PC check for non-local syms. Don't capitalize error messages.
4009 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
4010 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
4011 calculating TLSLD relocs. Report reloc types on a number of errors.
4012 Don't capitalize error messages.
4014 2003-03-03 H.J. Lu <hjl@gnu.org>
4016 * elfxx-ia64.c (USE_BRL): Removed.
4019 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4021 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4022 relocation (no special function), and make it non-partial_inplace.
4023 (sh_elf_relax_section): When creating a bsr, use a consistent value
4024 no matter if the symbol is extern or not; set addend to -4.
4025 Don't swap load / non-load instructions for SH4.
4026 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4027 rather than if the symbol is external to determine if adjusting the
4028 offset makes sense. Adjust the addend too if appropriate.
4029 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4032 2003-03-03 Nick Clifton <nickc@redhat.com>
4034 * po/da.po: Installed latest translation.
4036 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4038 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4039 R_MIPS_PC16 to rightshift 2.
4040 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4041 (bfd_elf32_bfd_reloc_type_lookup): Support
4042 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4043 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4044 R_MIPS_PC16 to rightshift 2.
4045 (mips_elf64_howto_table_rela): Likewise.
4046 (mips_reloc_map): Map to rightshifted BFD reloc.
4047 * elfn32-mips.c: The same as in elf64-mips.c.
4048 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4049 (mips_elf_calculate_relocation): Handle rightshifted addends for
4051 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4052 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4053 * libbfd.h: Regenerate.
4054 * bfd-in2.h: Regenerate.
4056 2003-02-28 Richard Henderson <rth@redhat.com>
4058 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4059 for ltoff22x relaxation.
4061 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4063 * bfd-in.h (_bfd): Don't define.
4064 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4066 * bfd-in2.h: Regenerate.
4068 2003-02-27 Richard Henderson <rth@redhat.com>
4070 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4071 (elfNN_ia64_check_relocs): Set it.
4072 (allocate_global_data_got): Check it.
4073 (allocate_local_got): Likewise.
4074 (allocate_dynrel_entries): Likewise.
4075 (elfNN_ia64_relax_ldxmov): New.
4076 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4077 (elfNN_ia64_choose_gp): Split out from ...
4078 (elfNN_ia64_final_link): ... here.
4080 2003-02-27 Andrew Cagney <cagney@redhat.com>
4082 * bfd.c (struct bfd): Rename "struct _bfd".
4083 * bfd-in.h: Update copyright.
4084 (struct bfd): Rename "struct _bfd".
4085 (_bfd): Define for backward compatibility.
4086 * bfd-in2.h: Regenerate.
4088 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4090 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4091 and rel_hdr2 when initially counting input relocs rather than after
4092 creating output reloc sections.
4093 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4096 * Makefile.am: Run "make dep-am".
4097 * Makefile.in: Regenerate.
4099 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4101 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4102 (elfcore_grog_nto_note): New function.
4103 (elfcore_grog_nto_gregs): New function.
4104 (elfcore_grog_nto_status): New function.
4106 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4108 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4109 section flags before concluding that we've already been called.
4110 Don't use register keyword.
4111 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4112 (_bfd_elf_create_linker_section): Formatting.
4114 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4116 * coff-h8300.c: Fix typo: intial -> initial.
4117 * coff-ppc.c: Likewise.
4119 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4121 * elf32-ppc.c: Formatting.
4122 (allocate_dynrelocs): LD and GD relocs against the same sym need
4123 separate GOT entries.
4124 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4127 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4129 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4130 removal. Localize vars. Remove unnecessary dynobj test.
4131 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4133 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4135 (elf_i386_relocate_section): Likewise.
4136 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4137 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4138 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4139 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4140 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4141 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4142 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4143 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4146 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4147 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4149 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4150 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4151 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4152 and optimize. Use ELIMINATE_COPY_RELOCS.
4153 (ppc64_elf_relocate_section): Likewise.
4155 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4156 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4157 (ELIMINATE_COPY_RELOCS): Define.
4158 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4159 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4160 (MUST_BE_DYN_RELOC): Define.
4161 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4162 and optimize. Trim dyn_relocs.
4163 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4164 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4165 track of pc_rel dyn relocs.
4166 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4167 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4168 allocate_dynrelocs. Don't recalculate "sec".
4170 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4172 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4173 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4174 on invalid LD relocs.
4175 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4176 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4177 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4179 * elf32-ppc.h: New file.
4180 * elf32-ppc.c: Include elf32-ppc.h.
4181 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4182 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4183 Add "tls_mask" field.
4184 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4185 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4186 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4187 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4188 Make use of htab shortcuts throughout file.
4189 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4190 (ppc_elf_link_hash_table_create): Init new fields.
4191 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4192 (ppc_elf_howto_raw): Add tls relocs.
4193 (ppc_elf_reloc_type_lookup): Handle them.
4194 (ppc_elf_unhandled_reloc): New function.
4195 (ppc_elf_create_got): Stash got section pointer in hash table,
4196 return status. Make .rela.got too.
4197 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4198 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4199 NON_GOT_REF set. Don't allocate space in .plt here..
4200 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4201 not allocating plt entries unnecessarily. Allocate got entries here.
4202 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4203 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4204 "info" during allocate_dynrelocs hash traversal. Use htab section
4205 shortcuts rather than searching for named sections. Get rid of
4206 "plt" and "strip" booleans.
4207 (update_local_sym_info, bad_shared_reloc): New functions.
4208 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4209 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4210 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4211 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4212 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4213 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4214 relocs that might use a plt entry. Set NON_GOT_REF too.
4215 Enumerate all do-nothing relocs.
4216 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4217 tls relocs and all plt relocs.
4218 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4219 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4220 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4222 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4223 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4224 entries and got relocs here. Warn on non-zero got reloc addend.
4225 Split out branch taken/not taken reloc code into a separate switch
4226 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4227 Split out HA reloc adjustments to separate switch statement. Don't
4228 warn on reloc overflow if we've already warned about undefined.
4229 Don't rebuild sym name when reporting errors. Report all possible
4230 errors from _bfd_final_link_relocate.
4231 (bfd_elf32_bfd_final_link): Don't define.
4233 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4235 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4236 rebuild sym name when reporting errors.
4238 2003-02-17 Nick Clifton <nickc@redhat.com>
4240 * elflink.h (elf_link_output_extsym): Only check
4241 allow_shlib_undefined for shared libraries.
4242 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4243 of allow_shlib_undefined.
4244 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4245 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4246 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4247 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4248 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4249 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4250 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4251 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4252 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4253 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4254 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4255 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4256 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4257 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4258 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4259 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4261 2003-02-17 Nick Clifton <nickc@redhat.com>
4263 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4264 address field to use in the comparison.
4265 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4267 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4269 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4270 backends when checking if the generic ELF target should be used.
4272 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4273 outside of functions, treat values as absolute addresses.
4275 * bfd.c: Change embedded documentation to use consistent indentation
4276 and to split up long lines. Change informal style of description
4277 for functions lacking real documentation.
4278 * coffcode.h: Break up long lines in embedded documentation.
4279 * format.c: Likewise.
4280 * targets.c: Likewise.
4281 * libcoff.h: Regenerate.
4282 * bfd-in2.h: Regenerate.
4284 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4286 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4287 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4288 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4289 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4290 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4291 (group_sections): Don't share a stub section if stubs are for a large
4292 section. Adjust comment.
4293 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4294 !stubs_always_before_branch.
4295 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4296 treat undefined and undefweak specially when processing dyn relocs.
4298 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4300 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4302 2003-02-13 Nick Clifton <nickc@redhat.com>
4304 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4305 in computation of offset to insert into BL instruction.
4307 2003-02-11 Uwe Stieber <uwe@wwws.de>
4309 * config.bfd: Add support for kaOS as cross build target system.
4311 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4313 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4314 .__tls_get_addr too.
4315 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4317 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4319 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4320 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4321 (sh_elf_link_hash_newfunc): Remove the initialization of
4323 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4324 for which tls_tpoff32 flag is set.
4325 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4326 of the symbol includes the entry matched with the input_section
4327 and having tls_tpoff32 flag on. When linking statically, set
4328 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4329 is defined in this executable.
4330 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4332 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4334 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4335 even if there is just non-empty .rela.plt.
4337 2003-02-10 Nick Clifton <nickc@redhat.com>
4339 * archures.c (bfd_mach_arm_ep9312): Define.
4340 * bfd-in2.h: Regenerate.
4341 * cpu-arm.c (processors[]): Add ep9312.
4342 (bfd_arm_arch): Add ep9312.
4343 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4344 messages and add test for Maverick floating point support.
4345 (elf32_arm_print_private_bfd_data): Handle
4346 EF_ARM_MAVERICK_FLOAT flag.
4347 (elf32_arm_object_p): New function.
4348 (elf_backend_object_p): Define.
4350 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4352 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4353 variables, structure fields or function params to tls_mask or
4354 similar to better reflect usage.
4355 (struct got_entry): Comment.
4356 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4357 (get_tls_mask): Rename from get_tls_type.
4359 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4361 * elf64-ppc.c (TLS_GD_LD): Don't define..
4362 (TLS_GD): ..define this instead and update all uses.
4363 (TLS_TPRELGD): Define.
4364 (ppc64_elf_link_hash_table_create): Tweak initialization of
4365 init_refcount and init_offset.
4366 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4367 Mark second slot of GD or LD toc entries.
4368 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4369 from other tls types.
4370 (ppc64_elf_tls_setup): New function, split out from..
4371 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4372 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4373 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4374 return value to properly decide whether toc GD and LD entries can
4375 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4376 to determine GD or LD rather than looking at TLS_LD flag. Don't
4377 attempt to adjust got entry tls_type here..
4378 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4379 look for possible merges.
4380 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4382 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4383 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4384 Make use of return value from get_tls_type to properly detect GD and
4385 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4386 handle tls_get_addr removal when looking at REL24 relocs, do it when
4387 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4389 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4391 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4393 * elf32-hppa.c (group_sections): Don't share a stub section if
4394 stubs are for a large section.
4396 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4397 stubs if !stubs_always_before_branch.
4399 2003-02-07 Nick Clifton <nickc@redhat.com>
4401 * elf.c (swap_out_syms): Generate an error message if an
4402 equivalent output section cannot be found for a symbol.
4404 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4406 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4407 local_got_entries is NULL.
4409 2003-02-06 Andreas Schwab <schwab@suse.de>
4411 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4412 (read_value): Add parameter is_signed, use signed extraction if
4413 the value is signed.
4414 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4415 encoding to read_value.
4417 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4419 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4420 plt info when called to transfer weak sym info.
4422 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4424 * reloc.c: Add PPC and PPC64 TLS relocs.
4425 * libbfd.h: Regenerate.
4426 * bfd-in2.h: Regenerate.
4427 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4428 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4429 against a 32 bit field.
4430 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4431 (_ppc64_elf_section_data): Add t_symndx and comments.
4432 (ppc64_elf_section_data): Use elf_section_data macro.
4433 (ppc64_elf_new_section_hook): American spelling.
4434 (struct got_entry, struct plt_entry): New.
4435 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4436 (struct ppc_stub_hash_entry): Add "addend" field.
4437 (struct ppc_link_hash_entry): Add "tls_type".
4438 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4439 TLS_EXPLICIT): Define.
4440 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4441 (link_hash_newfunc): Init new fields.
4442 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4443 init_offset to NULL.
4444 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4445 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4447 (update_local_sym_info, update_plt_info): New functions.
4448 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4449 handling to use got.glist rather than got.refcount. Likewise for PLT.
4450 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4451 (func_desc_adjust): Adjust for new PLT list.
4452 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4453 (get_sym_h, get_tls_type): New functions.
4454 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4455 (ppc64_elf_tls_optimize): New function.
4456 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4458 (ppc64_elf_size_dynamic_sections): Likewise.
4459 (ppc_type_of_stub): Adjust for new PLT list.
4460 (ppc_build_one_stub): Likewise.
4461 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4463 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4464 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4465 init GOT entries that have a reloc. Generate GOT relocs here..
4466 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4467 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4469 2003-02-04 Andreas Schwab <schwab@suse.de>
4471 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4472 (elf_m68k_link_hash_traverse): Remove.
4473 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4474 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4476 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4478 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4479 instead of elf_m68k_link_hash_traverse.
4480 (elf_m68k_discard_copies): Change first parameter to pointer to
4481 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4482 elf_m68k_link_hash_entry is needed.
4484 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4486 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4487 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4488 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4490 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4491 Add "init_offset" field.
4492 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4493 (elf_local_got_ents): Declare.
4494 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4496 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4497 (_bfd_elf_link_hash_table_init): Set "init_offset".
4498 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4500 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4502 * elf.c (bfd_elf_local_sym_name): Split out from..
4503 (group_signature): ..here.
4504 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4506 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4508 * elf-bfd.h (enum elf_link_info_type): Remove.
4509 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4510 to struct sec. Remove linkonce_p field.
4511 (elf_linkonce_p): Delete.
4512 (elf_discarded_section): Update for sec_info_type change.
4513 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4514 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4515 (ELF_INFO_TYPE_NONE): Define.
4516 (ELF_INFO_TYPE_STABS): Define.
4517 (ELF_INFO_TYPE_MERGE): Define.
4518 (ELF_INFO_TYPE_EH_FRAME): Define.
4519 (ELF_INFO_TYPE_JUST_SYMS): Define.
4520 (STD_SECTION): Update struct sec initializer.
4521 * ecoff.c (bfd_debug_section): Likewise.
4522 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4523 * elflink.h: Likewise.
4524 * elf-eh-frame.c: Likewise.
4525 * elf64-alpha.c: Likewise.
4526 * elfxx-ia64.c: Likewise.
4527 * elfxx-mips.c: Likewise.
4528 * bfd-in2.h: Regenerate.
4530 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4531 referring to used_by_bfd.
4532 * elf64-sparc.c (sec_do_relax): Likewise.
4533 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4534 * elfxx-mips.c (mips_elf_section_data): Likewise.
4535 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4536 (ieee_get_section_contents): Likewise.
4537 (ieee_new_section_hook): Formatting.
4538 (ieee_canonicalize_reloc): Remove commented out code.
4539 * mmo.c (mmo_section_data): Define. Use throughout file.
4540 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4542 2003-01-31 Graydon Hoare <graydon@redhat.com>
4544 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4545 * Makefile.in: Regenerate.
4546 * opncls.c (calc_crc32, get_debug_link_info,
4547 seperate_debug_file_exists, find_seperate_debug_file): New
4549 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4550 contained inside a .gnu_debuglink section.
4551 * bfd-in2.h: Regenerate.
4553 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4555 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4556 entry->abfd when it's NULL.
4558 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4560 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4561 _bfd_elf_section_offset returning -2 the same way as -1.
4563 * elfxx-mips.c (mips_elf_multi_got): New function.
4564 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4565 addend into union along with address and link hash entry.
4566 (struct mips_got_info): Added bfd2got and next.
4567 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4568 (mips_elf_got_section, mips_elf_create_got_section): Use
4569 SEC_EXCLUDE bit to tell whether we really need the got
4570 section. Take boolean arguments to disregard an excluded
4571 section, or to create it as excluded. Adjust all callers.
4572 Use mips_elf_got_section all over.
4573 (mips_elf_local_got_index, mips_elf_got_page,
4574 mips_elf_got16_entry): Take input bfd as argument, and pass it
4575 on to mips_elf_create_local_got_entry.
4576 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4577 Take input bfd as argument, and manage entries in the
4579 (mips_elf_got_offset_from_index): Take input bfd as argument,
4580 and use it to adjust the GP offset of the bfd.
4581 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4582 unreferenced GOT entries of global symbols to the end.
4583 (mips_elf_record_global_got_symbol): Take input bfd as
4584 argument. Add entries to the master GOT hash table.
4585 (struct mips_elf_bfd2got_hash): New.
4586 (struct mips_elf_got_per_bfd_arg): New.
4587 (struct mips_elf_set_global_got_offset_arg): New.
4588 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4589 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4590 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4591 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4592 mips_elf_resolve_final_got_entry,
4593 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4594 mips_elf_got_for_ibfd): New functions.
4595 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4596 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4597 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4598 (mips_elf_got_entry_hash): Take new fields into account. Use
4599 mips_elf_hash_bfd_vma.
4600 (mips_elf_got_entry_eq): Take new fields into account.
4601 (mips_elf_create_got_section): Initialize new fields.
4602 (mips_elf_calculate_relocation): Pass input_bfd to functions
4603 that now take it. Adjust gp for the input_bfd.
4604 (mips_elf_allocate_dynamic_relocation,
4605 mips_elf_create_dynamic_relocation,
4606 _bfd_mips_elf_create_dynamic_sections): Use...
4607 (mips_elf_rel_dyn_section): New function. Borrow code from...
4608 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4609 now take it. Create the got section if needed, even if
4610 excluded, before recording a global got symbol. Move some
4612 (mips_elf_record_local_got_symbol): New fn.
4613 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4614 Compute multi-got global entries offsets. Move GOT code to...
4615 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4616 if the GOT is too big.
4617 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4618 undefweak symbol to zero. Generate dynamic relocations for
4619 non-primary GOT entries for global symbols.
4620 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4621 case. Generate dynamic relocations for local got entries.
4622 Sort dynamic relocations on N64 too, using...
4623 (sort_dynamic_relocs_64): New fns.
4624 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4625 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4627 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4629 * bfd.c (struct _bfd): Added id field.
4630 * opncls.c (_bfd_id_counter): New static variable.
4631 (_bfd_new_bfd): Use it.
4632 * bfd-in2.h: Rebuilt.
4634 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4636 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4638 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4640 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4641 (elf32_sparc_rev32_howto): New variable.
4642 (sparc_reloc_map): Add TLS relocs.
4643 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4645 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4647 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4648 struct elf32_sparc_link_hash_table):
4650 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4651 elf32_sparc_hash_table): Define.
4652 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4653 create_got_section, elf32_sparc_create_dynamic_sections,
4654 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4656 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4658 (elf32_sparc_gc_sweep_hook): Likewise.
4659 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4660 (elf32_sparc_size_dynamic_sections): Likewise.
4661 (elf32_sparc_relocate_section): Likewise.
4662 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4664 (elf32_sparc_object_p): Allocate backend private object data.
4665 (bfd_elf32_bfd_link_hash_table_create,
4666 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4667 elf_backend_can_refcount): Define.
4668 (elf_backend_create_dynamic_sections): Define to
4669 elf32_sparc_create_dynamic_sections.
4670 * reloc.c: Add SPARC TLS relocs.
4671 * bfd-in2.h, libbfd.h: Rebuilt.
4672 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4673 (sparc_reloc_map): Likewise.
4675 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4677 * bfd-in2.h: Regenerate.
4678 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4679 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4680 (elf_howto_table): Add TLS relocs.
4681 (elf_s390_reloc_type_lookup): Likewise.
4682 (elf_s390_link_hash_entry): Add tls_type.
4683 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4685 (elf_s390_link_hash_table): Add tls_ldm_got.
4686 (link_hash_newfunc): Initialize tls_type.
4687 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4688 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4689 (elf_s390_check_relocs): Support TLS relocs.
4690 (elf_s390_gc_sweep_hook): Likewise.
4691 (allocate_dynrelocs): Likewise.
4692 (elf_s390_size_dynamic_sections): Likewise.
4693 (elf_s390_relocate_section): Likewise.
4694 (elf_s390_finish_dynamic_symbol): Likewise.
4695 (bfd_elf32_mkobject): Define for TLS.
4696 * elf64-s390.c: Same changes as for elf32-s390.c.
4697 * libbfd.h: Regenerate.
4698 * reloc.c: Add s390 TLS relocations.
4700 2003-01-24 Charles Lepple <clepple@ghz.cc>
4702 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4704 2003-01-23 Nick Clifton <nickc@redhat.com>
4707 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4708 * archures.c (bfd_mach_sh2e): Added.
4709 * bfd-in2.h: Rebuilt.
4710 * cpu-sh.c (arch_info_struct): Added SH2e.
4711 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4713 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4715 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4716 dynindx to an int. Rearrange for better packing.
4717 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4718 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4719 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4720 (struct _sh64_elf_section_data): New struct.
4721 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4722 * elf32-sh64-com.c: Include elf32-sh64.h.
4723 * elf32-sh64.c: Likewise.
4724 (sh64_elf_new_section_hook): New function.
4725 (bfd_elf32_new_section_hook): Define.
4726 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4727 (sh64_bfd_elf_copy_private_section_data): Likewise.
4728 (sh64_elf_final_write_processing): Likewise.
4729 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4730 (elf32_sparc_new_section_hook): New function.
4731 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4732 (sec_do_relax): Define.
4733 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4734 (elf32_sparc_relocate_section): Likewise.
4735 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4736 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4737 (mmix_elf_section_data): Define. Use throughout file.
4738 (mmix_elf_new_section_hook): New function.
4739 (bfd_elf64_new_section_hook): Define.
4740 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4741 (ppc64_elf_section_data): Define. Use throughout.
4742 (ppc64_elf_new_section_hook): New function.
4743 (bfd_elf64_new_section_hook): Define.
4744 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4745 (sparc64_elf_new_section_hook): New function.
4746 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4747 (sec_do_relax): Define.
4748 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4749 (sparc64_elf_relocate_section): Likewise.
4750 (bfd_elf64_new_section_hook): Define.
4751 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4752 * elfxx-mips.c (struct _mips_elf_section_data): New.
4753 (mips_elf_section_data): Define. Use throughout.
4754 (_bfd_mips_elf_new_section_hook): New function.
4755 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4756 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4757 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4758 * Makefile.am: Run "make dep-am".
4759 * Makefile.in: Regenerate.
4761 2003-01-21 Richard Henderson <rth@redhat.com>
4763 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4764 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4765 (elf64_alpha_adjust_dynamic_symbol): Set them.
4766 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4767 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4768 symbol index when relaxing LDM to TPREL.
4769 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4770 relocs, even if the target isn't locally defined.
4771 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4772 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4773 relocs vs symndx 0 to the tp base.
4775 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4777 * config.bfd: Handle i[3456]86-*-aros*.
4779 2003-01-21 Andreas Schwab <schwab@suse.de>
4781 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4782 (struct ppc_elf_link_hash_entry): Define.
4783 (ppc_elf_hash_entry): New function.
4784 (struct ppc_elf_link_hash_table): Define.
4785 (ppc_elf_hash_table): New function.
4786 (ppc_elf_link_hash_newfunc): New function.
4787 (ppc_elf_link_hash_table_create): New function.
4788 (ppc_elf_copy_indirect_symbol): New function.
4789 (allocate_dynrelocs): New function.
4790 (readonly_dynrelocs): New function.
4791 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4792 relocs and determine DT_TEXTREL.
4793 (ppc_elf_check_relocs): Don't do that here, just count the
4795 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4797 (bfd_elf32_bfd_link_hash_table_create): Define.
4798 (elf_backend_copy_indirect_symbol): Define.
4800 2003-01-21 Richard Henderson <rth@redhat.com>
4802 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4803 TPREL also get a reloc if shared. Remove SREL support.
4804 (elf64_alpha_emit_dynrel): New.
4805 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4806 and GOTTPREL relocs to local symbols against the tp base.
4807 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4809 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4810 use count before clobbering r_type.
4811 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4812 ordering would mean dataflow inspection is necessary.
4814 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4816 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4818 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4820 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4821 elfxx-target.h and #undef it before #define'ing it.
4822 * elf32-i386.c: Likewise.
4823 * elf32-sh64.c: Likewise.
4824 * elf64-alpha.c: Likewise.
4825 * elf64-sh64.c: Likewise.
4827 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4829 * bfd-in2.h: Regenerate.
4830 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4831 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4832 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4833 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4834 R_390_PLTOFF32 and R_390_PLTOFF64.
4835 (elf_s390_reloc_type_lookup): Likewise.
4836 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4837 of GOTPLT references to a function.
4838 (link_hash_newfunc): Initialize gotplt_refcount.
4839 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4840 and creation of the got section out of the main switch. Add support
4841 for the gotoff, gotplt and pltoff relocations.
4842 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4844 (elf_s390_adjust_gotplt): New function.
4845 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4847 (allocate_dynrelocs): Add comment.
4848 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4849 for gotoff, gotplt and pltoff relocations.
4850 * elf64-s390.c: Same changes as for elf32-s390.c.
4851 * libbfd.h: Regenerate.
4852 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4853 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4854 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4855 and BFD_RELOC_390_PLTOFF64.
4857 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4859 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4860 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4862 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4864 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4865 self_dtpmod_done and self_dtpmod_offset.
4866 (allocate_global_data_got): Only use one got entry for all
4867 dtpmod relocs against local symbols.
4868 (allocate_dynrel_entries): Only need .rela.got entry for
4869 dtpmod against global symbol.
4870 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4871 Reserve space in .rela.got for the local dtpmod entry.
4872 (set_got_entry): Initialize the common local dtpmod .got entry.
4873 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4874 and R_IA_64_DTPREL64MSB.
4876 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4878 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4879 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4880 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4881 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4882 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4883 relative relocs, not with absolute ones.
4884 * Makefile.am: Run "make dep-am".
4885 * Makefile.in: Regenerate.
4886 * po/SRC-POTFILES.in: Regenerate.
4888 2003-01-15 Andreas Schwab <schwab@suse.de>
4890 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4891 relocation against a non-allocated readonly section.
4893 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4895 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4896 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4898 2002-01-08 Klee Dienes <kdienes@apple.com>
4900 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4901 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4902 * Makefile.in: Regenerate.
4904 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4906 * elfn32-mips.c (prev_reloc_section): New.
4907 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4908 (SET_RELOC_ADDEND): Parenthesize macro argument.
4910 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4912 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4913 adjust addil instructions if the symbol has no section.
4915 2003-01-07 DJ Delorie <dj@redhat.com>
4917 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4920 2003-01-07 Andreas Schwab <schwab@suse.de>
4922 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4923 PC relative relocations.
4924 (elf_m68k_discard_copies): Set it here instead.
4926 2002-01-02 Ben Elliston <bje@redhat.com>
4927 Jeff Johnston <jjohnstn@redhat.com>
4929 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4930 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4931 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4932 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4933 (cpu-iq2000.lo): New target.
4934 * Makefile.in: Regenerate.
4935 * config.bfd: Handle iq2000-*-elf.
4936 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4937 (bfd_archures_list): Add bfd_iq2000_arch.
4938 * configure.in: Handle bfd_elf32_iq2000_vec.
4939 * configure: Regenerate.
4940 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4941 and BFD_RELOC_IQ2000_UHI16.
4942 * targets.c (bfd_elf32_iq2000_vec): Declare.
4943 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4944 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4945 * cpu-iq2000.c: New file.
4946 * elf32-iq2000.c: Likewise.
4947 * libbfd.h: Regenerate.
4948 * bfd-in2.h: Likewise.
4950 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4952 * elfxx-mips.c: Include libiberty.h.
4953 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4954 (mips_set_isa_flags): New function, split out from...
4955 (_bfd_mips_elf_final_write_processing): ...here. Only call
4956 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4957 (mips_mach_extensions): New array.
4958 (mips_32bit_flags_p): New function.
4959 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4960 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4961 other is 64-bit. When adopting IBFD's architecture, adopt the
4962 bfd_mach as well as the flags.
4964 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4966 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4967 fix internal errors, fix bad code generation, fix incorrect stabs
4968 information, and improve ability to eliminate redundant page
4969 instructions. Added code to ip2k_final_link_relocate to self-verify
4970 the linker relaxation. Fix formatting problems.
4972 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4974 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4975 * archures.c (bfd_mach_mipsisa32r2): New define.
4976 * bfd-in2.h: Regenerate.
4977 * cpu-mips.c (I_mipsisa32r2): New enum value.
4978 (arch_info_struct): Add entry for I_mipsisa32r2.
4979 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4980 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4981 (_bfd_mips_elf_final_write_processing): Add
4982 bfd_mach_mipsisa32r2 case.
4983 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4984 binaries marked as using MIPS32 Release 2.
4986 2002-12-30 Dmitry Diky <diwil@mail.ru>
4988 * Makefile.am: Add msp430 target.
4989 * configure.in: Likewise.
4990 * Makefile.in: Regenerate.
4991 * configure: Regenerate.
4992 * archures.c: Add msp430 architecture vector.
4993 * config.bfd: Likewise.
4994 * reloc.c: Add msp430 relocs.
4995 * targets.c: Add msp320 target.
4996 * cpu-msp430.c: New file: msp430 cpu detection.
4997 * elf32-msp430.c: New file: msp430 reloc processing.
4998 * bfd-in2.h: Regenerate.
4999 * libbfd.h: Regenerate.
5001 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5003 * elf.c (elf_sort_sections): Don't reorder .tbss.
5004 (assign_file_positions_for_segments): Only adjust off/voff
5005 for increased alignment in PT_LOAD or PT_NOTE segment,
5006 but adjust p_filesz for .tbss too. in PT_LOAD consider
5007 .tbss to have zero memory size.
5008 (copy_private_bfd_data) [SECTION_SIZE]: Define.
5009 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
5010 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
5011 into PT_TLS segment. Never put SHF_TLS sections in
5012 segments other than PT_TLS or PT_LOAD.
5014 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
5017 2002-12-23 DJ Delorie <dj@redhat.com>
5019 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5021 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5023 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5025 2002-12-23 Nick Clifton <nickc@redhat.com>
5027 * archures.c (bfd_arch_get_compatible): Add third parameter
5028 'accept_unknowns'. Only accept unknown format BFDs if
5029 accept_unknowns is true, or if the format is "binary".
5030 * bfd-in2.h: Regenerate.
5032 2002-12-21 Nick Clifton <nickc@redhat.com>
5034 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5035 that subtracted 8 from pc relative relocations.
5037 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5039 * coff-h8300.c: Fix comment typos.
5040 * coffcode.h: Likewise.
5041 * cpu-cris.c: Likewise.
5042 * elf32-vax.c: Likewise.
5043 * genlink.h: Likewise.
5044 * linker.c: Likewise.
5046 * tekhex.c: Likewise.
5047 * vms-misc.c: Likewise.
5049 2002-12-20 DJ Delorie <dj@redhat.com>
5051 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5052 * libbfd.h: Regenerate.
5053 * bfd-in2.h: Regenerate.
5054 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5055 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5057 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5059 * doc/bfdint.texi: Fix typos.
5061 2002-12-20 Paul Eggert <eggert@twinsun.com>
5063 Port to POSIX 1003.1-2001.
5064 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5065 * configure.in (build-warnings): Likewise.
5066 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5067 * aclocal.m4: Regenerate.
5068 * config.in: Regenerate.
5069 * configure: Regenerate.
5071 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5073 * coff-h8300.c: Include libiberty.h.
5074 (h8300_reloc16_extra_cases): Check the hash table creator before
5075 referencing h8300 specific fields. Stash the hash table pointer
5076 in a local var. Comment typo fixes.
5077 (h8300_bfd_link_add_symbols): Likewise.
5079 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5081 * bfd-in2.h: Regenerate.
5083 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5085 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5086 code a little. Comment on dynamic relocs against section symbols.
5088 2002-12-17 Roger Sayle <roger@eyesopen.com>
5090 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5091 the HP compiler's "long long".
5093 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5095 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5096 and R_XSTORMY16_HI16) howto entries.
5097 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5098 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5099 determine the start of the second reloc table.
5101 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5103 * ecofflink.c: Fix the reading of the debugging information
5104 of Tru64/Alpha binaries that are produced by recent Compaq
5106 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5108 (lookup_line): Because of the strange information sometimes
5109 generated by Compaq's recent compilers, change how the FDR
5110 table is searched so that PDRs (procedure descriptors) are
5111 correctly found. Note that this change is really more of a hack;
5112 however, I have included extensive documentation as to why
5113 this is the best solution short of an extensive rewrite or
5115 (fdrtab_lookup): Add comments to explain the algorithm.
5117 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5119 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5120 initializers to match struct declaration.
5122 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5124 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5125 * elf.c (get_program_header_size): Likewise.
5126 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5127 (m32r_elf_generic_reloc): Likewise.
5128 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5129 * elflink.h (elf_bfd_discard_info): Likewise.
5131 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5133 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5134 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5135 DT_RELSZ adjustment, not output section. Avoid writing tags when
5136 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5137 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5138 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5139 DT_RELASZ adjustment, not output section. Avoid writing tags when
5140 unchanged. Adjust DT_RELA.
5141 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5142 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5144 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5146 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5149 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5151 * elfxx-mips.c (struct mips_got_entry): New.
5152 (struct mips_got_info): Added got_entries field.
5153 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5154 (mips_elf_local_got_index, mips_elf_got_page,
5155 mips_elf_got16_entry): Re-implement in terms of new...
5156 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5158 (mips_elf_highest): Warning clean-up.
5159 (mips_elf_create_got_section): Initialize got_entries.
5160 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5162 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5163 GOT_PAGE entries, since we now reuse GOT16 entries.
5165 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5167 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5168 read-only section that lies after .text and before .data to be
5169 written into the output file and included in a_text.
5170 (translate_to_native_sym_flags): If an otherwise unrepresentable
5171 section was merged with .text, convert its symbols to N_TEXT
5173 * libaout.h (aout_section_merge_with_text_p): New macro.
5175 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5177 * bfd-in.h: Comment typo fix. Formatting.
5178 * bfd-in2.h: Regenerate.
5179 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5180 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5181 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5183 2002-12-05 Richard Henderson <rth@redhat.com>
5185 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5186 Only send PCREL21B though the plt. Fix installed reloc type.
5187 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5188 against PCREL22 or PCREL64I; clean up error messages for
5191 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5193 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5195 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5197 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5199 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5201 2002-12-04 H.J. Lu <hjl@gnu.org>
5203 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5204 BFD address when constructing local name.
5206 2002-12-04 Andreas Schwab <schwab@suse.de>
5208 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5210 (elf_m68k_link_hash_table_create): Initialize it.
5211 (elf_m68k_check_relocs): Handle symbols that are forced to be
5212 local due to visibility changes.
5213 (elf_m68k_adjust_dynamic_symbol): Likewise.
5214 (elf_m68k_size_dynamic_sections): Likewise.
5215 (elf_m68k_discard_copies): Likewise.
5216 (elf_m68k_relocate_section): Likewise.
5218 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5220 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5222 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5224 * srec.c (srec_write_symbols): Restore '$' prefix to address
5225 accidentally removed in 2002-04-04 change.
5226 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5228 2002-12-03 Nick Clifton <nickc@redhat.com>
5230 * elf32-ppc.c (apuinfo_list_init): New function.
5231 (apuinfo_list_add): New function: Add a value to the list.
5232 (apuinfo_list_length): New function: Return the number of
5234 (apuinfo_list_element): New function: Return a value on the
5236 (apuinfo_list_finish): New function: Free the resources used
5238 (ppc_elf_begin_write_processing): New function. Scan the
5239 input bfds for apuinfo sections.
5240 (ppc_elf_write_section): New function: Delay the creation of
5241 the contents of an apuinfo section in an output bfd.
5242 (ppc_elf_final_write_processing): New function. Create the
5243 contents of an apuinfo section in an output bfd.
5244 (elf_backend_begin_write_processing): Define.
5245 (elf_backend_final_write_processing): Define.
5246 (elf_backend_write_section): Define.
5248 2002-12-03 Richard Henderson <rth@redhat.com>
5250 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5252 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5254 Fix PR savannah/1417:
5255 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5256 branch if it goes to the start of the deleted region.
5258 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5260 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5261 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5262 bfd_mach_m6812s): Declare.
5264 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5265 (_bfd_m68hc12_elf_set_private_flags): Call it.
5266 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5267 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5268 report microcontroller incompatibilities (HC12 vs HCS12).
5269 (elf_backend_object_p): Update.
5271 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5273 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5274 (enum bfd_boolean, boolean): Delete.
5275 (bfd_boolean): Typedef to an int.
5276 (FALSE, TRUE): Define.
5277 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5278 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5279 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5280 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5281 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5282 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5283 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5284 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5285 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5286 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5287 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5288 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5289 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5290 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5291 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5292 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5293 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5294 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5295 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5296 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5297 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5298 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5299 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5300 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5301 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5302 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5303 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5304 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5305 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5306 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5307 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5308 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5309 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5310 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5311 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5312 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5313 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5314 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5315 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5316 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5317 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5318 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5319 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5320 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5321 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5322 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5323 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5324 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5325 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5326 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5327 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5328 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5329 of bfd_boolean vars with TRUE/FALSE. Formatting.
5330 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5332 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5334 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5335 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5336 with Elf_Internal_Rela.
5337 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5338 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5339 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5340 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5341 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5342 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5343 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5344 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5345 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5346 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5347 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5348 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5350 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5351 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5352 Remove INLINE keyword.
5353 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5354 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5356 (elf_write_relocs): Consolidate REL and RELA code.
5357 (elf_slurp_reloc_table_from_section): Simplify REL code.
5358 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5359 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5360 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5362 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5363 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5364 (elf_link_output_relocs): Likewise.
5365 (elf_reloc_link_order): Likewise.
5366 (elf_finish_pointer_linker_section): Likewise.
5367 (struct elf_link_sort_rela): Remove union.
5368 (elf_link_sort_cmp1): Update to suit.
5369 (elf_link_sort_cmp2): Here too.
5370 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5371 over-allocation for int_rels_per_ext_rel != 1 case.
5372 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5373 * elf32-i386.c: Likewise.
5374 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5375 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5376 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5377 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5378 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5379 elf64-sparc.c, elf64-x86-64.c: Likewise.
5380 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5381 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5382 bfd_elf32_swap_reloc_in.
5384 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5385 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5386 (mips_elf64_swap_reloc_in): Zero r_addend.
5387 (mips_elf64_be_swap_reloc_in): Likewise.
5388 (mips_elf64_slurp_one_reloc_table): Simplify.
5390 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5391 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5392 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5394 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5396 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5397 unresolved debugging relocs in dynamic applications.
5398 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5400 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5402 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5403 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5404 on a relocatable link. Comment typos.
5405 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5406 in the order they are declared. Clear elf_hash_value too.
5407 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5408 eh_info and tls_segment.
5409 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5410 sorted when discarding relocs by turning them into R_*_NONE.
5412 * libbfd.c (warn_deprecated): Comment spelling.
5413 * po/SRC-POTFILES.in: Regenerate.
5415 2002-11-21 Richard Henderson <rth@redhat.com>
5417 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5418 arch's st_other bits when merging visibilities.
5419 (elf_link_output_extsym): Tidy clearing of visibility field.
5421 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5423 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5424 (SWAP_OUT_RELOC_OFFSET): Define.
5426 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5428 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5429 can_refcount is properly extended to the type of
5432 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5434 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5435 (_bfd_mips_elf_relocate_section): Use it.
5437 * elfxx-mips.c (MNAME): New macro.
5438 (_bfd_mips_elf_check_relocs): Use it.
5439 (_bfd_mips_elf_discard_info): Likewise.
5440 (_bfd_mips_elf_final_link): Likewise.
5442 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5444 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5445 rel_hdr.sh_size too.
5447 2002-11-18 Klee Dienes <kdienes@apple.com>
5449 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5450 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5451 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5452 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5453 Add dependencies for bfdwin.c, bfdio.c.
5454 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5455 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5456 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5457 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5458 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5459 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5460 bfd_get_size (moved from libbfd.c and bfd.c).
5461 * bfdwin.c New file. Contains _bfd_window_internal,
5462 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5463 libbfd.c and bfd.c).
5464 * po/SRC-POTFILES.in: Regenerate.
5465 * po/bfd.pot: Regenerate.
5466 * libbfd.h: Regenerate.
5467 * bfd-in2.h: Regenerate.
5468 * aclocal.m4: Regenerate.
5469 * Makefile.in: Regenerate.
5470 * configure: Regenerate.
5472 2002-11-18 Klee Dienes <kdienes@apple.com>
5474 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5476 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5478 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5479 jsr after a short jump.
5480 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5482 2002-11-15 Klee Dienes <kdienes@apple.com>
5484 * pef.c (bfd_pef_convert_architecture): Move declaration of
5485 ARCH_POWERPC and ARCH_M68K to the start of the function.
5487 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5489 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5491 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5493 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5494 For bpo_gregs_section->contents, allocate _raw_size, not
5497 2002-11-13 Klee Dienes <kdienes@apple.com>
5499 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5501 2002-11-13 H.J. Lu <hjl@gnu.org>
5503 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5505 2002-11-13 Klee Dienes <kdienes@apple.com>
5506 Alan Modra <amodra@bigpond.net.au>
5508 * bfd.c (struct bfd_preserve): New.
5509 (bfd_preserve_save): New function.
5510 (bfd_preserve_restore): Ditto.
5511 (bfd_preserve_finish): Ditto.
5512 * bfd-in2.h: Regenerate.
5513 * mach-o.c: Formatting.
5514 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5515 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5516 (bfd_mach_o_core_p): Ditto.
5517 (bfd_mach_o_scan): Pass in mdata.
5518 * mach-o.h (bfd_mach_o_scan): Update prototype.
5519 * pef.c: Formatting.
5520 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5521 (bfd_pef_xlib_object_p): Ditto.
5522 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5523 * pef.h (bfd_pef_scan): Update prototype.
5524 * xsym.c: Formatting, K&R fixes.
5525 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5526 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5527 * xsym.h (bfd_sym_scan): Declare.
5528 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5529 * elfcore.h (elf_core_file_p): Likewise.
5530 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5532 2002-11-12 Nick Clifton <nickc@redhat.com>
5534 * po/da.po: Updated Danish translation.
5536 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5538 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5539 relocatable link too.
5540 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5541 eh_frame and stab sections. Zap deleted relocs.
5542 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5543 (elf_bfd_discard_info): Run for relocatable link too.
5544 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5546 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5547 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5549 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5550 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5551 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5552 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5553 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5554 (struct elf_link_hash_table): Add eh_info.
5555 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5556 (_bfd_elf_discard_section_eh_frame): Update prototype.
5557 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5558 (_bfd_elf_write_section_eh_frame): Likewise.
5559 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5560 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5561 param. Get "hdr_info" from link hash table.
5562 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5563 header section from link hash table. Save header section to elf_tdata.
5564 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5565 header section from link hash table. Don't alloc hdr_info. Clear
5566 hdr_sec instead of setting "strip".
5567 (_bfd_elf_eh_frame_section_offset): Formatting.
5568 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5569 Get header section from link hash table.
5570 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5571 Get header section from link hash table.
5572 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5573 (get_program_header_size): Likewise.
5574 (_bfd_elf_section_offset): Formatting.
5575 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5576 section pointer in link hash table.
5577 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5578 and _bfd_elf_write_section_eh_frame calls. Update comment about
5580 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5581 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5583 * po/SRC-POTFILES.in: Regenerate.
5585 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5586 relocs for discarded FDEs. Remove dead code.
5587 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5588 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5589 Tidy conditions under which stabs are edited. Formatting.
5590 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5591 from discarded relocs.
5592 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5593 section adjustments after testing magic values.
5595 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5597 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5598 references to large plt symbols.
5600 2002-11-12 Klee Dienes <kdienes@apple.com>
5602 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5603 looking for an unused section name.
5605 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5607 * coff-h8300.c: Fix formatting.
5608 * elf32-h8300.c: Likewise.
5609 * reloc16.c: Likewise.
5611 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5613 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5614 section when dynamic section unused; _bfd_strip_section_from_output
5617 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5619 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5622 * dwarf2.c: Revert last change.
5624 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5626 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5627 _bfd_dwarf2_find_nearest_line): Use
5628 bfd_simple_get_relocated_section_contents() instead of
5629 bfd_get_section_contents().
5630 * reloc.c (bfd_perform_relocation): Add sanity check.
5631 * simple.c (simple_get_relocated_section_contents): If the section
5632 does not have any relocs associated with it, just return the
5633 unadjusted contents.
5635 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5637 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5638 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5639 contents, enabling for a non-DSO, for symbols defined in the
5640 program with --export-dynamic.
5642 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5644 * elf64-ppc.c: Comment typo fixes.
5645 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5647 2002-11-07 Nick Clifton <nickc@redhat.com>
5649 * po/da.po: Updated Danish translation.
5651 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5653 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5654 exactly three internal relocs per external reloc. Set reloc_count
5655 to the external reloc count.
5657 2002-11-06 Klee Dienes <kdienes@apple.com>
5659 * coff-stgo32.c (stub_bytes): Mark as const.
5660 Fix comment formatting.
5662 2002-11-06 Klee Dienes <kdienes@apple.com>
5664 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5666 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5667 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5668 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5669 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5670 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5672 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5673 * Makefile.in: Regenerate.
5674 * doc/Makefile.in: Regenerate.
5675 * bfd-in2.h: Regenerate.
5676 * xsym.c: New file. Contains support for the Apple/Metrowerks
5677 xSYM debugging format.
5679 * pef.c: New file. Contains support for the Apple Code Fragment
5680 Manager Preferred Executable Format
5682 * pef-traceback.h: New file. Contains support for parsing PowerPC
5683 traceback tables as used by PEF executables (and perhaps other
5685 * mach-o.c: New file. Contains support for the Mach-O object file
5687 * mach-o.h: New file.
5688 * mach-o-target.c: New file. Declares the mach-o targets
5689 themselves. Included three times by mach-o.c; each time with a
5690 different set of macros set.
5692 2002-11-06 Graeme Peterson <gp@qnx.com>
5694 * Makefile.am: Remove entries for elf32-qnx.[ch].
5695 * Makefile.in: Regenerate.
5696 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5697 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5698 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5699 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5700 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5701 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5702 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5703 * configure: Regenerate.
5704 * elf32-qnx.c: Remove.
5705 * elf32-qnx.h: Remove.
5706 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5707 is_contained_by_filepos, and copy_private_bfd_data_p.
5708 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5709 is_contained_by_filepos, and copy_private_bfd_data_p.
5710 * elf32-i386.c: Remove QNX extended bfd support.
5711 * elf32-ppc.c: Remove QNX extended bfd support.
5712 * elf32-sh.c: Remove QNX extended bfd support.
5713 * elfarm-nabi.c: Remove QNX extended bfd support.
5714 * targets.c: Remove qnx vectors.
5715 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5716 (elf_backend_is_contained_by_filepos): Remove.
5717 (elf_backend_copy_private_bfd_data_p): Remove.
5718 * po/SRC-POTFILES.in: Regenerate.
5720 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5721 Alan Modra <amodra@bigpond.net.au>
5723 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5724 dynamic relocs against section symbols for the output section vma.
5726 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5728 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5729 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5731 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5732 Alan Modra <amodra@bigpond.net.au>
5734 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5735 vectors in target_selvecs.
5736 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5738 (sh-*-netbsdelf*): Likewise.
5739 * configure.in (assocvecs): New variable. Handle assocvecs like
5741 * configure: Regenerate.
5742 * format.c (bfd_check_format_matches): Store bfd_target pointers
5743 in matching_vector instead of target names. Select first target
5744 from bfd_associated_vector that matches a list of ambiguous targets.
5745 * targets.c (_bfd_associated_vector): New array.
5746 (bfd_associated_vector): New variable.
5747 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5748 * libbfd-in.h (bfd_associated_vector): Declare.
5749 * libbfd.h: Regenerate.
5751 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5753 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5754 non-NULL before dereferencing.
5756 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5758 * vms.c (vms_object_p): Restore the start address when returning
5761 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5762 Hans-Peter Nilsson <hp@axis.com>
5764 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5765 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5766 Set up a larger symshndxbuf, and write it out. Free it on
5767 exit rather than freeing symbuf twice. Correct section index
5768 on output section symbol loop.
5769 (elf_link_output_sym): Accumulate symbol extension section
5770 indices, reallocating symshndxbuf rather than writing it out.
5771 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5772 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5773 Use bfd_zalloc to clear i_shdrp[0] too.
5775 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5777 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5778 _raw_size of cranges section if _cooked_size not yet set.
5780 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5782 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5783 for bfd_elf32_swap_symbol_out.
5785 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5787 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5788 signed and unsigned in comparison.
5790 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5792 * coffcode.h: Remove extraneous '\'.
5794 2002-10-28 H.J. Lu <hjl@gnu.org>
5796 * Makefile.am (targets.lo): Depend on Makefile instead of
5798 (archures.lo): Likewise.
5799 * Makefile.in: Regenerated.
5801 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5803 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5804 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5807 2002-10-25 Jim Wilson <wilson@redhat.com>
5809 * elf64-sh64.c (sh_elf64_relocate_section): Call
5810 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5811 of SHF_MERGE section.
5813 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5815 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5817 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5819 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5820 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5822 (NAME(aout,final_link)): Cast enum used in assignment.
5823 (aout_link_write_symbols): Cast enums in comparisons, int values to
5824 boolean, enums in assignments to int.
5825 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5826 (aout_link_input_section_ext): Likewise. Cast enums used in
5827 comparisons with unsigned ints.
5828 (aout_link_reloc_link_order): Cast enum to int in assignment.
5829 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5831 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5833 * bfd-in2.h (bfd_set_section_vma): Likewise.
5834 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5835 * binary.c (bfd_alloc): Cast enum to long.
5836 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5837 * dwarf2.c (read_abbrevs): Add casts to enum types.
5838 (read_attribute_value): Likewise.
5839 (arange_add): Cast result of bfd_zalloc call.
5840 (comp_unit_contains_address): Return true and false.
5841 (comp_unit_find_nearest_line): Cast return to boolean.
5842 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5843 * gen-aout.c: define macro '_' if not defined.
5844 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5845 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5846 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5847 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5848 (bfd_generic_is_local_label_name): Cast return to boolean.
5849 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5850 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5851 struct bfd_hash_entry *.
5852 (_bfd_generic_link_hash_newfunc): likewise.
5853 (_bfd_generic_final_link): Cast enum to unsigned int.
5854 * merge.c (sec_merge_emit): Cast return to boolean.
5855 (merge_strings): Add casts to const unsigned char *.
5856 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5857 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5858 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5859 to struct bfd_hash_entry *.
5860 (bfd_set_section_content): Add cast to PTR in comparison.
5861 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5862 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5863 simple_dummy_unattached_reloc,
5864 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5865 function definitions.
5866 * srec.c (S3Forced): Initialize to false.
5867 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5868 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5869 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5870 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5871 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5874 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5876 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5877 relocs into shared lib non-allocated reloc sections.
5879 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5881 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5882 sorted even when given an out-of-order line sequence.
5883 (lookup_address_in_line_info_table): When an exact VMA match is
5884 not found, return line information with the closest VMA.
5886 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5888 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5889 HPUX 11.00 patch PHSS_26559.
5891 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5893 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5894 the options section into a separate section unless IRIX 6
5895 compatibility is enabled.
5897 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5899 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5901 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5902 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5904 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5905 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5907 2002-10-21 Graeme Peterson <gp@qnx.com>
5909 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5911 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5913 * targets.c (bfd_target_list): Don't return the default target twice.
5915 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5917 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5918 perror with bfd_perror.
5920 2002-10-19 H.J. Lu <hjl@gnu.org>
5922 * elflink.h (elf_link_add_object_symbols): Correctly handle
5923 DT_RPATH and DT_RUNPATH.
5925 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5927 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5929 2002-10-17 Denis Chertykov <denisc@overta.ru>
5931 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5934 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5936 * elfxx-target.h (USE_REL): Don't define as 1.
5937 * elf32-arm.h (USE_REL): Provide a default define of 0.
5938 Use #if rather than #ifdef when testing USE_REL.
5939 * elf32-m32r.c: Likewise.
5941 * elf32-arc.c (USE_REL): Define as 1.
5942 * elf32-d10v.c (USE_REL): Likewise.
5943 * elf32-m32r.c (USE_REL): Likewise.
5944 * elf32-m68hc11.c (USE_REL): Likewise.
5945 * elf32-m68hc12.c (USE_REL): Likewise.
5946 * elf32-or32.c (USE_REL): Likewise.
5947 * elfarm-nabi.c (USE_REL): Likewise.
5949 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5951 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5952 (s390x-*-linux*): Add targ_selvecs.
5954 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5956 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5957 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5958 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5959 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5960 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5961 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5962 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5963 (SOURCE_HFILES): Add elf32-qnx.h.
5964 (BUILD_HFILES): Add bfdver.h.
5966 * Makefile.in: Regenerate.
5967 * configure.in Update bfd vector dependencies.
5968 * configure: Regenerate.
5969 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5970 * elf32-i386qnx.c: Likewise.
5971 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5972 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5973 * elf32-sh-lin.c: Likewise.
5974 * elf32-shqnx.c: Likewise.
5975 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5976 * elf32-sh64-nbsd.c: Likewise.
5977 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5978 * elf64-sh64-nbsd.c: Likewise.
5979 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5980 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5981 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5982 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5983 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5984 (elf_backend_is_contained_by_filepos): Likewise.
5985 (elf_backend_copy_private_bfd_data_p): Likewise.
5986 Globalize and move functions to..
5987 * elf32-qnx.c: ..here. New file.
5988 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5989 emit target vectors when INCLUDE_SHMEDIA.
5990 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5992 * elf64-sh64.c: Remove ELF_ARCH test.
5993 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5994 * po/BLD-POTFILES.in: Regenerate.
5995 * po/SRC-POTFILES.in: Regenerate.
5997 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5999 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
6000 loaded with --just-symbols.
6002 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
6003 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6004 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6005 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6007 2002-10-15 Richard Henderson <rth@redhat.com>
6009 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
6010 (BFD64_BACKENDS_CFILES): Likewise.
6011 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
6012 * elf64-alpha-fbsd.c: Remove file, move code ...
6013 * elf64-alpha.c: ... here.
6014 * Makefile.in, configure: Rebuild.
6016 2002-10-14 Richard Henderson <rth@redhat.com>
6018 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6021 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6023 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6024 datalabel_got_offset with union of datalabel_got
6025 offset and refcount.
6026 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6027 (allocate_dynrelocs): Delete unnecessary code for
6028 STT_DATALABEL type. Create entry in got for
6029 datalabel version of symbol if datalabel_got.refcount > 0.
6030 (sh_elf_relocate_section): Use datalabel_got union.
6031 (sh_elf_gc_sweep_hook): Pull common code to initialize
6032 h and eh out of switch statement. Declare seen_stt_datalabel.
6033 Initialize it. Decrement datalabel_got.refcount for
6034 got relocs when seen_stt_datalabel is true.
6035 Decrement local_got_refcounts entry for datalabel got relocs
6037 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6038 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6039 Initialize it. When seen_stt_datalabel is true, increment
6040 datalabel_got refcount rather than got.refcount.
6041 (sh_elf_finish_dynamic_symbol): Create relocs to
6042 initialize got entry for datalabel version of symbol.
6044 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6046 * Makefile.am: Run "make dep-am".
6047 (BFD_H_FILES): Remove version.h.
6048 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6049 * version.h: ..to here.
6050 * configure.in (bfd_version_date): Remove.
6051 (AC_OUTPUT): Make bfdver.h from version.h.
6052 * bfd.c: #include "bfdver.h".
6053 * vms-hdr.c: Likewise.
6054 * Makefile.in: Regenerate.
6055 * bfd-in2.h: Regenerate.
6056 * configure: Regenerate.
6057 * po/SRC-POTFILES.in: Regenerate.
6059 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6061 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6062 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6063 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6064 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6065 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6066 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6067 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6068 bfd_mach_ip2022, bfd_mach_ip2022ext,
6069 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6070 * bfd-in2.h: Regenerate.
6072 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6074 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6075 endian vector to targ_selvecs.
6077 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6079 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6080 save_addend argument. Don't apply the 32-bit mask to a
6081 GPREL32 value if it's to be used in another relocation. Don't
6082 use forced-check computation of local_p to decide whether to
6083 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6084 of the addend of a non-in-place GPREL16 relocation.
6085 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6086 mips_elf_calculate_relocation().
6088 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6090 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6091 with symbols in other sections if we relaxed something; the sections
6092 output offsets must be re-computed before.
6094 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6096 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6097 handling to use Elf_Internal_Sym.
6098 (m68hc11_elf_relax_delete_bytes): Likewise.
6100 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6102 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6103 sh_elf_object_p, dtpoff_base): New functions.
6104 (sh_elf_howto_table): Add TLS relocs.
6105 (sh_reloc_map): Likewise.
6106 (sh_elf_info_to_howto): Support TLS relocs.
6107 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6108 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6110 (sh_elf_obj_tdata): New.
6111 (elf_sh_link_hash_table): Add tls_ldm_got.
6112 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6113 (allocate_dynrelocs): Support TLS relocs.
6114 (sh_elf_size_dynamic_sections): Likewise.
6115 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6116 .rela.got section when found already. Return false after printing
6117 error about unresolvable relocation.
6118 (sh_elf_gc_sweep_hook): Support TLS relocs.
6119 (sh_elf_check_relocs): Likewise.
6120 (sh_elf_finish_dynamic_symbol): Likewise.
6121 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6122 * reloc.c: Add SH TLS relocs.
6123 * bfd-in2.h, libbfd.h: Regenerate.
6125 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6127 * Makefile.in: Regenerated.
6129 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6131 * Makefile.am: Run dep-am.
6132 (BFD_H_DEP): Add simple.c and linker.c.
6133 (BFD32_LIBS): Add simple.lo.
6134 (BFD32_LIBS_CFILES): Add simple.c.
6135 * Makefile.in: Regenerated.
6136 * bfd-in2.h: Regenerated.
6137 * simple.c: New file.
6139 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6141 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6142 (record_thumb_to_arm_glue): Likewise.
6143 * ecoff.c (ecoff_link_add_externals): Likewise.
6144 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6145 (record_thumb_to_arm_glue): Likewise.
6146 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6147 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6148 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6149 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6150 * elf64-ppc.c (func_desc_adjust): Likewise.
6151 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6152 (sh64_elf64_create_dynamic_sections): Likewise.
6153 * elflink.c (_bfd_elf_create_got_section): Likewise.
6154 (_bfd_elf_create_dynamic_sections): Likewise.
6155 (_bfd_elf_create_linker_section): Likewise.
6156 * elflink.h (elf_add_default_symbol): Likewise.
6157 (elf_link_create_dynamic_sections): Likewise.
6158 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6159 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6160 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6161 (_bfd_mips_elf_add_symbol_hook): Likewise.
6162 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6163 * linker.c (generic_link_add_symbol_list): Likewise.
6164 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6166 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6168 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6169 completely removed. Correct local sym adjustment.
6171 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6173 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6174 Correct mistake in calculation of address of .got.
6175 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6176 elf_sh64_pic_plt_entry_le): Likewise.
6178 2002-10-09 Richard Shann <richard.shann@superh.com>
6179 Stephen Clarke <stephen.clarke@superh.com>
6181 * Makefile.am: Add entries for elf32-sh64-lin.c and
6182 elf64-sh64-lin.c. Regenerate.
6183 * Makefile.in: Regenerate.
6184 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6185 to use sh64 vectors rather than sh vectors.
6186 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6187 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6188 * configure: Regenerate.
6189 * elf32-sh64-lin.c: New file.
6190 * elf64-sh64-lin.c: New file.
6191 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6192 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6194 2002-10-08 H.J. Lu <hjl@gnu.org>
6196 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6197 IE->LE transition for R_386_TLS_IE.
6199 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6201 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6203 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6205 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6208 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6210 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6213 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6215 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6217 * opncls.c: Formatting.
6218 (_bfd_new_bfd): Use a smaller section hash table.
6220 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6222 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6223 of the other two relocations packed with a REL32 to NONE.
6225 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6227 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6228 (sh_elf_link_hash_newfunc): Initialize it.
6229 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6230 to got.refcount for symbols that are forced local or when
6231 we have direct got refs.
6232 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6233 to correctly adjust got.refcount and plt.refcount.
6234 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6235 (sh_elf_check_relocs): Increment gotplt_refcount.
6237 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6239 * elf32-i386.c (elf_i386_relocate_section): Fix
6240 movl foo@indntpoff, %eax IE->LE transition.
6242 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6244 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6245 sequence and its transitions.
6247 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6249 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6250 to st_value + addend in non-code sections.
6251 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6252 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6254 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6255 Ken Raeburn <raeburn@cygnus.com>
6256 Aldy Hernandez <aldyh@redhat.com>
6257 Eric Christopher <echristo@redhat.com>
6258 Richard Sandiford <rsandifo@redhat.com>
6260 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6261 (bfd_mach_mips5500): New.
6262 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6263 (arch_info_struct): Add corresponding entries here.
6264 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6265 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6266 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6267 bfd_mach_mips5400 and bfd_mach_mips5500.
6268 (_bfd_mips_elf_mach_extends_p): New function.
6269 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6270 the EF_MIPS_MACH flags.
6271 * bfd-in2.h: Regenerate.
6273 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6275 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6278 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6280 * elf.c (map_sections_to_segments): Correct test for start of
6281 writable section in the same page as end of read-only section.
6283 2002-09-27 Matt Thomas <matt@3am-software.com>
6285 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6286 local_got_refcounts usage. Remove allocation of got slot.
6287 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6288 Remove de-allocation of got slot.
6289 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6290 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6291 sections to be GC'ed.
6292 (elf_vax_instantiate_got_entries): New function.
6293 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6294 tests that are now handled by elf_vax_instantiate_got_entries.
6295 Assert GOT entry falls within .got section size. Remove redundant
6296 comparisions. Fix comments.
6298 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6300 * reloc.c: Add x86-64 TLS relocs.
6301 * bfd-in2.h, libbfd.h: Rebuilt.
6302 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6303 relocs. Add TLS relocs.
6304 (x86_64_reloc_map): Add TLS relocs.
6305 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6306 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6307 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6308 (elf64_x86_64_hash_entry): Define.
6309 (struct elf64_x86_64_obj_tdata): New.
6310 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6311 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6312 (link_hash_newfunc): Initialize tls_type.
6313 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6314 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6315 (elf64_x86_64_mkobject): New.
6316 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6317 (elf64_x86_64_tls_transition): New.
6318 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6320 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6321 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6322 (elf64_x86_64_size_dynamic_sections): Likewise.
6323 (dtpoff_base, tpoff): New.
6324 (elf64_x86_64_relocate_section): Handle TLS relocs.
6325 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6327 (bfd_elf64_mkobject): Define.
6329 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6330 DF_STATIC_TLS if shared.
6332 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6334 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6335 empty relocation sections.
6337 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6339 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6340 (ppc64_elf_build_stubs): Build them here instead.
6342 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6344 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6345 addend into r_addend, not *r_offset.
6346 (elf32_sparc_finish_dynamic_symbol): Likewise.
6347 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6348 R_SPARC_RELATIVE's r_offset.
6350 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6352 * dwarf2.c (decode_line_info): Update to correctly decode
6353 the (non-standard DWARF2) out-of-order address sequences
6354 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6356 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6358 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6360 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6362 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6363 for discarded FDEs. Remove redundant assignment.
6364 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6366 2002-09-22 H.J. Lu <hjl@gnu.org>
6368 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6369 the relocation count between different .reloc sections.
6371 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6373 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6374 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6375 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6378 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6379 unsigned. Move "symcount" assignment out of loop.
6380 * Makefile.am: Run "make dep-am".
6381 * Makefile.in: Regenerate.
6382 * configure: Regenerate.
6383 * po/SRC-POTFILES.in: Regnerate.
6385 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6387 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6388 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6391 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6393 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6394 even if generating R_PPC_RELATIVE reloc.
6395 (ppc_elf_relocate_section): Make sure relocation is performed
6396 if skip == -2. Clear memory at r_offset when creating dynamic
6399 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6401 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6402 BFD_RELOC_386_TLS_GOTIE): Add.
6403 * bfd-in2.h, libbfd.h: Rebuilt.
6404 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6405 and R_386_TLS_GOTIE.
6406 (elf_i386_reloc_type_lookup): Handle it.
6407 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6408 char instead of enum, change GOT_* into defines.
6409 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6410 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6411 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6412 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6413 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6414 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6415 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6416 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6417 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6418 tls_type is GOT_TLS_IE_BOTH.
6419 (elf_i386_size_dynamic_sections): Likewise.
6420 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6421 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6422 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6423 all 4 GOT_TLS_* TLS types.
6425 2002-09-19 Nick Clifton <nickc@redhat.com>
6427 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6428 follow indirect links.
6430 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6432 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6433 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6435 (ecoff_swap_sym_in) <iss>: Likewise.
6436 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6437 ECOFF information: 'ioptMax' refers to the actual *size*
6438 of the optimization symtab, not the number of entries.
6440 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6442 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6443 ELF_LINK_HASH_NEEDS_PLT logic.
6445 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6447 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6448 correct relocation count.
6450 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6452 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6453 * bfd.c (struct _bfd): Add dynsymcount.
6454 * bfd-in2.h: Regenerated.
6455 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6457 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6460 2002-09-17 Stan Cox <scox@redhat.com>
6462 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6463 (mips_elf64_final_gp): Don't make up gp value.
6464 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6465 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6466 .MIPS.options/.options section.
6468 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6470 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6471 It is benign for FreeBSD < 4.1. Minor reformatting.
6472 * elf64-alpha-fbsd.c: Likewise.
6474 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6476 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6479 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6481 * elf64-alpha.c (alpha_elf_size_info): Make static.
6483 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6485 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6486 * cpu-tic4x.c: Ditto.
6488 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6490 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6493 2002-09-16 Bruno Haible <bruno@clisp.org>
6495 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6496 by a target variant implementation.
6497 * elf64-alpha.c: Likewise.
6498 * elf32-i386-fbsd.c: New file.
6499 * elf64-alpha-fbsd.c: New file.
6500 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6501 bfd_elf64_alpha_freebsd_vec.
6502 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6503 bfd_elf64_alpha_freebsd_vec.
6504 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6505 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6506 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6507 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6508 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6509 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6510 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6512 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6514 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6516 (elf_i386_relocate_section): Return false after printing error about
6517 unresolvable relocation.
6519 2002-09-12 Nick Clifton <nickc@redhat.com>
6521 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6524 2002-09-11 Jeffrey Law <law@redhat.com>
6526 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6528 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6530 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6531 line_ptr before deciding we've found a symbol.
6533 2002-09-11 Nick Clifton <nickc@redhat.com>
6535 * po/da.po: New Danish translation file.
6536 * configure.in (LINGUAS): Add 'da'.
6537 * configure: Regenerate.
6539 2002-09-10 Michael Snyder <msnyder@redhat.com>
6541 * irix-core.c (do_sections, do_sections64): New functions.
6542 (irix_core_core_file_p): Call new functions do_sections,
6543 do_sections64, depending on corefile (32-bit or 64-bit).
6545 2002-09-09 Richard Henderson <rth@redhat.com>
6547 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6548 and PCREL21F like PCREL21B.
6550 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6552 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6555 2002-09-02 Nick Clifton <nickc@redhat.com>
6557 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6558 names instead of cryptically overloaded bfd_reloc error
6560 (v850_elf_relocate_section): Likewise.
6561 (v850_elf_relax_section): Replace caching of external symbols
6562 with caching of internal symbols obtained from calling
6563 bfd_elf_get_elf_syms().
6564 Fixup problems with freeing cached allocated memory blocks.
6566 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6568 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6569 (bfd_pj_arch): Use bfd_default_scan.
6570 * cpu-v850.c (scan): Remove.
6571 (N): Use bfd_default_scan.
6572 * cpu-z8k.c (scan_mach): Remove.
6573 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6574 first. Use bfd_default_scan.
6576 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6578 (ecoff_get_magic): Likewise.
6579 * elf32-v850.c (v850_elf_object_p): Likewise.
6580 (v850_elf_final_write_processing): Likewise.
6581 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6582 (MY(write_object_contents)): Likewise.
6583 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6584 * coffcode.h (coff_write_object_contents): Likewise.
6585 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6586 Remove unnecessary "machine" assignments.
6587 (coff_write_relocs): Test for the absolute section sym by testing
6590 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6591 and bfd_mach_i386_i386_intel_syntax.
6592 * pdp11.c (NAME(aout,machine_type)): Likewise.
6594 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6596 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6597 * bfd-in2.h (align_power): Likewise.
6599 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6601 * Makefile.am: Run "make dep-am".
6602 * Makefile.in: Regenerate.
6604 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6605 * cpu-powerpc.c (powerpc_compatible): Likewise.
6606 * cpu-rs6000.c (rs6000_compatible): Likewise.
6608 2002-08-28 Catherine Moore <clm@redhat.com>
6610 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6611 (v850-elf-reloc): Don't resolve pc relative relocs.
6612 (v850_elf_ignore_reloc): New routine.
6613 (v850_elf_final_link_relocate): Handle new relocs.
6614 (v850_elf_relax_delete_bytes ): New routine.
6615 (v850_elf_relax_section): New routine.
6616 (bfd_elf32_bfd_relax_section): Define.
6617 (HOWTO): New entries for new relocs.
6618 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6619 (BFD_RELOC_V850_LONGJUMP): New reloc.
6620 (BFD_RELOC_V850_ALIGN): New reloc.
6621 * archures.c: Remove redundant v850ea architecture.
6622 * cpu-v850.c: Remove redundant v850ea support.
6623 * libbfd.h: Regenerate.
6624 * bfd-in2.h: Regenerated.
6626 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6628 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6629 * configure.in: Add tic4x_coff vector files.
6630 * configure: Regenerate.
6631 * Makefile.am: Add tic4x target.
6632 * Makefile.in: Regenerate.
6634 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6636 * archures.c: Add the BFD arch type tic4x.
6637 * bfd-in.h: Add BFD_IN_MEMORY flag.
6638 * coff-tic4x.c: New file.
6639 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6640 * cpu-tic4x.c: New file.
6641 * targets.c: Added tic4x- in list of xvecs.
6642 * ticoff.h: New file.
6643 * bfd-in2.h: Regenerate.
6645 2002-08-27 Adam Nemet <anemet@lnxw.com>
6647 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6648 bit of DT_INIT and DT_FINI for Thumb functions.
6650 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6652 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6654 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6656 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6658 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6660 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6661 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6663 (struct elf_sh_pcrel_relocs_copied): Removed.
6664 (struct elf_sh_dyn_relocs): New.
6665 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6666 field with dyn_relocs.
6667 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6668 sections and sym_sec.
6669 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6670 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6671 (sh_elf_create_dynamic_sections): Use create_got_section instead
6672 of _bfd_elf_create_got_section.
6673 (sh_elf_check_relocs): Likewise.
6674 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6676 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6677 sh_elf_relocate_section, sh_elf_check_relocs,
6678 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6680 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6681 dynamic relocations and avoiding the copy relocation when we
6682 didn't find any dynamic relocations in the section which has
6683 contents or is read-only.
6684 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6685 (sh_elf_size_dynamic_sections): Don't reset the size of
6686 .rela.got section even if dynamic_sections_created flag is off.
6687 Don't use sh_elf_discard_copies. Scan all input bfd and use
6688 allocate_dynrelocs. Call readonly_dynrelocs to determine
6689 whether we need DT_TEXTREL.
6690 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6691 whether the symbol was never referred to.
6692 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6693 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6694 (sh_elf_check_relocs): Call create_got_section if the short-cut
6695 to .got is null. Increment reference counters only instead of
6696 allocating space on dynamic sections here. Don't conditionalize
6697 uninitialized got.offset value when marking the symbol as a
6698 global offset table entry. Keep relocations for symbols satisfied
6699 by a dynamic library to avoid copy relocations for the symbol.
6700 Set dynobj field of an elf hash table if needed.
6701 (sh_elf_finish_dynamic_sections): Handle null section pointer
6703 (elf_backend_copy_indirect_symbol): Defined.
6704 (elf_backend_can_refcount): Defined.
6706 2002-08-23 Nick Clifton <nickc@redhat.com>
6708 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6709 previous change. Add comment explaining why.
6711 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6713 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6714 contents of .got.plt[2] to tr0, not address of .got.plt.
6715 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6716 patching absolute plt entry. For shmedia plt entry, set bottom bit
6717 of branch to plt0 as this is a branch to an shmedia instruction.
6718 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6719 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6720 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6722 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6723 patching absolute plt entry. For shmedia plt entry, branch to
6724 plt0 is now ptrel, so use relative offset. Set bottom bit of
6725 branch target as it is a branch to an shmedia instruction.
6727 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6728 Richard Shann <richard.shann@superh.com>
6730 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6731 value if .init is an SHmedia function. Similarly for DT_FINI.
6732 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6734 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6736 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6738 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6740 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6742 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6743 byte read when reading the return address register column.
6745 2002-08-22 Nick Clifton <nickc@redhat.com>
6747 * config.bfd: Add powepc64-*-*bsd* target.
6749 2002-08-22 Graeme Peterson <gp@qnx.com>
6751 * Makefile.am: Add entries for elf32-shqnx.c
6752 * Makefile.in: Regenerate.
6753 * config.bfd: Add support sh-*-nto* target.
6754 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6755 * configure: Regenerate.
6756 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6757 * elf32-sh.c: Do not include elf32-target.h if
6758 ELF32_SH_C_INCLUDED is defined.
6759 * elf32-shqnx.c: New file: Support for QNX.
6760 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6762 2002-08-22 Nick Clifton <nickc@redhat.com>
6764 * po/tr.po: Updated Turkish translation.
6766 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6767 symbols are not read.
6769 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6771 * elf32-m68hc11.c: Formatting fixes.
6772 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6773 * elf32-m68hc12.c: Formatting fixes.
6774 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6776 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6778 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6780 (pmac_xcoff_vec): Likewise.
6781 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6782 (aix5coff64_vec): Likewise.
6784 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6786 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6787 param to elf_backend_copy_indirect_symbol.
6788 (_bfd_elf_link_hash_copy_indirect): Likewise.
6789 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6790 calls to copy_indirect_symbol.
6791 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6792 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6793 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6794 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6795 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6796 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6797 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6798 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6799 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6800 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6801 test refcounts for "used" values.
6803 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6805 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6806 argument declaration.
6808 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6810 * archures.c (bfd_mach_ppc_e500): Added.
6811 * bfd-in2.h: Rebuilt.
6812 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6814 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6816 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6818 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6820 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6823 2002-08-17 Stan Cox <scox@redhat.com>
6825 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6826 IRIX 6 segment layout for NEWABI.
6828 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6830 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6831 symbols when looking for section referred to by a relocation.
6832 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6834 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6836 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6838 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6840 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6841 missing check for whether the symbol is referenced by DSO before
6842 unexporting it as an unneeded dynamic symbol.
6844 2002-08-14 H.J. Lu <hjl@gnu.org>
6846 * libbfd.h: Regenerate.
6848 2002-08-14 H.J. Lu <hjl@gnu.org>
6850 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6852 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6854 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6856 (m68hc11_direct_relax): New to define table of relaxable instructions.
6857 (find_relaxable_insn): New, find a relaxable insn.
6858 (compare_reloc): New to compare two relocs.
6859 (m68hc11_elf_relax_section): New, relax text sections.
6860 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6861 (elf32_m68hc11_check_relocs): New function for GC support.
6862 (elf32_m68hc11_relocate_section): New function for GC support.
6863 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6864 (elf_backend_check_relocs): Likewise.
6865 (elf_backend_relocate_section): Likewise.
6867 2002-08-13 H.J. Lu <hjl@gnu.org>
6869 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6870 definitions in shared objects when checking symbol with
6873 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6875 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6876 (elf32_m68hc11_gc_sweep_hook): Likewise.
6877 (elf_backend_gc_mark_hook): Define for GC section support.
6878 (elf_backend_gc_sweep_hook): Likewise.
6879 (elf_backend_can_gc_sections): Likewise.
6881 * elf32-m68hc12.c: Likewise.
6883 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6885 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6886 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6887 (_bfd_m68hc11_elf_set_private_flags): New function.
6888 Use them to set/check/print ELF flags specific to 68HC11.
6890 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6891 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6892 (_bfd_m68hc12_elf_set_private_flags): New function.
6893 Use them to set/check/print ELF flags specific to 68HC12.
6895 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6897 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6898 fix masks for PC-rel relocs.
6899 (m68hc11_elf_ignore_reloc): New function.
6901 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6902 68HC12 banked addressing relocs.
6903 (m68hc12_phys_addr): New to compute physical address of banked memory.
6904 (m68hc12_phys_page): Likewise for page.
6905 (m68hc12_addr_is_banked): New to see if address is in banked area.
6906 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6908 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6910 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6911 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6912 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6913 * bfd-in2.h: Regenerate.
6915 2002-08-12 H.J. Lu <hjl@gnu.org>
6917 * elflink.h (elf_add_default_symbol): Preserve section across
6920 2002-08-09 Graeme Peterson <gp@qnx.com>
6922 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6923 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6924 * Makefile.in: Regenerate.
6925 * config.bfd: Add support for powerpc{le}-*-nto targets.
6926 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6927 * configure: Regenerate.
6928 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6929 common file "elf32-qnx.h", and now include that file.
6930 * elf32-qnx.h: New file: QNX specific common elf backend.
6931 * elf32-ppc.c: Do not include elf32-target.h if
6932 ELF32_PPC_C_INCLUDED is defined.
6933 * elf32-ppcqnx.c: New file: Support for QNX.
6934 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6935 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6937 2002-08-09 Nick Clifton <nickc@redhat.com>
6939 * po/sv.po: Updated Swedish translation.
6941 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6943 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6944 g->global_gotsym is NULL.
6946 2002-08-08 H.J. Lu <hjl@gnu.org>
6948 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6949 overrides an indirect versioned symbol.
6951 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6953 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6954 for R_386_TLS_TPOFF32 relocs against symndx 0.
6956 2002-08-07 H.J. Lu <hjl@gnu.org>
6958 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6959 with undefined version if needed.
6960 (elf_link_assign_sym_version): Match a default symbol with a
6961 version without definition. No need to hide the default
6962 definition separately.
6964 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6966 * elflink.h (elf_link_output_extsym): Don't output symbols from
6967 SEC_EXCLUDE sections.
6969 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6971 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6973 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6976 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6978 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6981 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6983 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6985 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6987 * elf32-mips.c (mips_reloc_map): Fix typo.
6989 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6991 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6993 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6995 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6997 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6999 * libxcoff.h: Use PARAMS on function declarations.
7000 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
7001 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7003 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
7005 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
7007 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7009 * coff-rs6000.c: Formatting fixes.
7010 (xcoff_calculate_relocation): Use PARAMS in declaration.
7011 (xcoff_complain_overflow): Likewise.
7012 (xcoff_ppc_relocate_section): Use old-style function pointer call.
7013 (bfd_xcoff_backend_data): Remove useless comments.
7014 (rs6000coff_vec): Likewise.
7015 (bfd_pmac_xcoff_backend_data): Likewise.
7016 (pmac_xcoff_vec): Likewise.
7018 * coff64-rs6000.c: Formatting fixes.
7019 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7020 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7021 (bfd_xcoff_backend_data): Remove useless comments.
7022 (rs6000coff64_vec): Likewise.
7023 (bfd_xcoff_aix5_backend_data): Likewise.
7024 (aix5coff64_vec): Likewise.
7026 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7028 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7029 mask entries. Use complain_overflow_dont for R_REF.
7030 (xcoff_reloc_type_ba): Revert last change.
7031 (xcoff_reloc_type_br): Likewise.
7032 (xcoff_reloc_type_crel): Likewise.
7033 (xcoff_ppc_relocate_section): Likewise.
7034 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7035 (xcoff64_ppc_relocate_section): Likewise.
7036 (xcoff64_howto_table): Revert some of last change to mask entries.
7037 Use complain_overflow_dont for R_REF.
7039 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7040 relocs with bitsize == 16 have size = 1.
7041 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7042 (xcoff_reloc_type_br): Likewise.
7043 (xcoff_reloc_type_crel): Likewise.
7044 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7045 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7046 dst_mask adjustment.
7047 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7048 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7049 bitsize == 16 have size = 1.
7051 2002-08-01 Denis Chertykov <denisc@overta.ru>
7053 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7054 (struct misc): New field isymbuf. All free_* fields removed.
7055 (symbol_value): Pass in internal syms. No need to swap syms in.
7056 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7057 possibly cached info.
7058 (tidyup_after_error): Removed.
7059 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7060 misc. Use new field.
7061 (adjust_all_relocations): Use internal syms. No need to swap syms
7063 (add_page_insn): Don't use removed fields of struct misc.
7065 2002-08-01 Nick Clifton <nickc@redhat.com>
7067 * elf32-arm.h: Revert previous delta.
7069 2002-08-01 Nick Clifton <nickc@redhat.com>
7071 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7072 * configure: Regenerate.
7074 2002-07-31 H.J. Lu <hjl@gnu.org>
7076 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7079 2002-07-31 H.J. Lu <hjl@gnu.org>
7081 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7084 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7086 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7087 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7089 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7091 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7092 There is no 8 byte relocation type for this architecture.
7093 (do_ns32k_reloc): Use bfd_vma instead of native types.
7094 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7096 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7097 rely on generic code to do that.
7098 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7099 to all table entries.
7100 (_bfd_ns32k_relocate_contents): put_data returns void.
7101 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7102 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7105 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7107 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7108 archive object is target dependant.
7110 2002-07-31 Adam Nemet <anemet@lnxw.com>
7112 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7113 (THUMB_PLT_ENTRY_SIZE): New macro.
7114 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7115 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7117 (elf32_arm_plt_entry): Likewise.
7118 (elf_backend_plt_header_size): Likewise.
7119 (elf32_thumb_plt0_entry): New global.
7120 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7122 (elf32_thumb_plt_entry): New global.
7123 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7124 Thumb entries. Set the bottom bit of the corresponding GOT entry
7125 for a Thumb PLT entry.
7126 (struct elf32_arm_plt_entry_info): New structure.
7127 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7129 (elf32_arm_link_hash_newfunc): Initialize new member.
7130 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7131 relocations against the PLT.
7132 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7133 first_rel_type if this is the first time we encounter the symbol.
7134 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7135 Determine if relocation needs a PLT entry. Set first_rel_type if
7136 this is the first time we encounter the symbol
7137 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7139 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7140 (elf32_arm_create_dynamic_sections): New function. Create the
7142 (elf_backend_create_dynamic_sections): Call it.
7144 2002-07-31 Nick Clifton <nickc@redhat.com>
7146 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7147 'alternative' in order to avoid shadowing global symbol of the
7149 * bfd-in2.h: Regenerate.
7150 * libbfd.h: Regenerate.
7151 * libcoff.h: Regenerate.
7153 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7155 * Makefile.am: Add n32 ABI support.
7156 * Makefile.in: Regenerate.
7157 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7158 bit vectors for mips*-*-linux targets as optional.
7159 * configure.in: Add n32 ABI vectors.
7160 * configure: Regenerate.
7161 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7162 * elfn32-mips.c: New file, n32 ABI support.
7163 * targets.c: Add n32 ABI vectors.
7165 2002-07-30 Graeme Peterson <gp@qnx.com>
7167 * elfarmqnx-nabi.c: New file: Support for QNX.
7168 * config.bfd: Add support for arm-*-nto target.
7169 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7170 * configure: Regenerate.
7171 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7172 * Makefile.in: Regenerate.
7173 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7174 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7175 * elfarm-nabi.c: Do not include elf32-arm.h if
7176 ELFARM_NABI_C_INCLUDED is defined.
7177 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7179 2002-07-30 Nick Clifton <nickc@redhat.com>
7181 * po/sv.po: Updated Swedish translation.
7183 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7185 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7187 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7189 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7190 * archive.c (bfd_generic_archive_p): Likewise.
7191 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7192 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7193 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7194 (xcoff64_archive_p): Likewise.
7195 (xcoff64_openr_next_archived_file): Likewise.
7196 (xcoff64_archive_p): Clean up tdata properly on error.
7197 * coffgen.c (coff_real_object_p): Likewise.
7198 (coff_object_p): Release filehdr and opthdr.
7199 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7200 * ieee.c (ieee_archive_p): Likewise.
7201 * ihex.c (ihex_object_p): Likewise.
7202 (ihex_mkobject): Always allocate tdata.
7203 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7204 * srec.c (srec_mkobject): Always allocate tdata.
7205 (srec_object_p): Clean up tdata properly on error.
7206 (symbolsrec_object_p): Likewise.
7207 * versados.c (versados_object_p): Likewise.
7208 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7209 and bfd_realloc instead of realloc.
7210 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7211 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7212 place of bfd_malloc, simplifying error freeing. Free hash table too.
7213 (vms_object_p): Clean up tdata on error.
7214 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7215 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7217 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7219 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7221 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7223 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7224 flags into resulting BFD.
7226 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7228 From John Reiser <jreiser@BitWagon.com>
7229 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7230 tls_ldm_got.refcount.
7232 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7234 * elf64-mips.c: Update TODO comment.
7235 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7236 mips_elf64_gprel16_reloca): Remove prototypes.
7237 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7238 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7239 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7240 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7242 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7243 R_MIPS_GOT16. Remove wrong comments.
7244 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7245 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7247 (mips_elf64_hi16_reloc): Fix formatting.
7248 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7249 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7250 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7251 (mips_elf64_gprel16_reloc): Make static. Add check for
7253 (mips_elf64_gprel16_reloca): Remove.
7254 (mips_elf64_literal_reloc): New function.
7255 (mips_elf64_gprel32_reloc): Fix formatting.
7256 (mips_elf64_shift6_reloc): Fix comment. Make static.
7257 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7259 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7261 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7262 specific relocations.
7263 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7264 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7265 (ELF_MAXPAGESIZE): Add comment.
7267 2002-07-25 Nick Clifton <nickc@redhat.com>
7269 * po/sv.po: Updated Swedish translation.
7270 * po/es.po: Updated Spanish translation.
7271 * po/fr.po: Updated French translation.
7273 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7275 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7276 as elf_link_record_local_dynamic_symbol.
7277 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7278 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7279 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7280 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7281 attempt is made to record a symbol in a discarded section, and
7282 return `2' in that case.
7284 2002-07-24 Nick Clifton <nickc@redhat.com>
7286 * po/sv.po: Updated Swedish translation.
7287 * po/es.po: Updated Spanish translation.
7289 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7291 * po/SRC-POTFILES.in: Regenerate.
7293 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7294 immediately. Remove code handling relocatable linking.
7295 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7296 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7297 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7298 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7299 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7300 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7301 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7302 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7303 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7304 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7305 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7306 * elf32-avr.c (elf_backend_rela_normal): Define.
7307 * elf32-cris.c: Likewise.
7308 * elf32-fr30.c: Likewise.
7309 * elf32-frv.c: Likewise.
7310 * elf32-h8300.c: Likewise.
7311 * elf32-hppa.c: Likewise.
7312 * elf32-ip2k.c: Likewise.
7313 * elf32-sparc.c: Likewise.
7314 * elf32-v850.c: Likewise.
7315 * elf32-vax.c: Likewise.
7316 * elf64-hppa.c: Likewise.
7317 * elf64-sparc.c: Likewise.
7318 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7319 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7320 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7321 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7322 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7323 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7324 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7325 * elf-m10200.c (USE_RELA): Don't define.
7326 * elf-m10300.c: Likewise.
7327 * elfarm-oabi.c: Likewise.
7328 * elf32-i370.c: Likewise.
7329 * elf32-ip2k.c: Likewise.
7330 * elf32-m68k.c: Likewise.
7331 * elf32-mcore.c: Likewise.
7332 * elf32-ppc.c: Likewise.
7333 * elf32-s390.c: Likewise.
7334 * elf32-vax.c: Likewise.
7335 * elf64-ppc.c: Likewise.
7336 * elf64-s390.c: Likewise.
7337 * elf64-x86-64.c: Likewise.
7338 * elfxx-ia64.c: Likewise.
7339 * elf32-avr.c (USE_REL): Don't undef.
7340 * elf32-ip2k.c: Likewise.
7342 2002-07-23 Nick Clifton <nickc@redhat.com>
7344 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7345 'want_p_paddr_set_to_zero'.
7346 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7348 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7349 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7351 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7353 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7354 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7355 show the Copyright string.
7356 Minor formatting tidy ups.
7358 2002-07-23 Nick Clifton <nickc@redhat.com>
7360 * po/fr.po: Updated French translation.
7361 * po/sv.po: Updated Swedish translation.
7363 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7365 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7366 when outputting relocs.
7368 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7370 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7371 DT_PLTGOT into the dynamic section if there is a PLT.
7373 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7375 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7377 (_bfd_mips_elf_write_section): Likewise.
7378 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7379 (_bfd_mips_elf_write_section): Likewise.
7380 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7381 (elf32_mips_write_section): Likewise.
7382 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7383 (_bfd_mips_elf_write_section): Likewise.
7385 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7387 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7388 PT_IA_64_UNWIND segments for a given section.
7390 2002-07-17 H.J. Lu <hjl@gnu.org>
7392 * Makefile.am: Fix a typo.
7393 * Makefile.in: Regenerate.
7395 2002-07-15 Denis Chertykov <denisc@overta.ru>
7396 Frank Ch. Eigler <fche@redhat.com>
7397 Ben Elliston <bje@redhat.com>
7398 Alan Lehotsky <alehotsky@cygnus.com>
7399 John Healy <jhealy@redhat.com>
7400 Graham Stott <grahams@redhat.com>
7401 Jeff Johnston <jjohnstn@redhat.com>
7403 * Makefile.am: Add support for ip2k.
7404 * Makefile.in: Regenerate.
7405 * doc/Makefile.in: Regenerate.
7406 * archures.c: Add support for ip2k.
7407 * config.bfd: Add support for ip2k.
7408 * configure.in: Add support for ip2k.
7409 * configure: Regenerate.
7410 * reloc.c: Add support for ip2k.
7411 * targets.c: Add support for ip2k.
7412 * bfd-in2.h: Regenerate.
7413 * libbfd.h: Regenerate.
7414 * cpu-ip2k.c: New file.
7415 * elf32-ip2k.c: New file.
7417 2002-07-17 Ian Rickards <irickard@arm.com>
7419 * dwarf2.c (concat_filename): If we can't establish the directory
7420 just return the filename.
7422 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7424 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7426 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7428 * elflink.h: Formatting fixes, tidy prototypes.
7429 (elf_link_assign_sym_version): Move common code out of loop.
7431 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7433 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7434 reloc section size is zero. Correct reloc output location.
7436 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7438 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7439 the final type for the e_fsel selector when generating PA2.0W code.
7440 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7443 2002-07-14 H.J. Lu <hjl@gnu.org>
7445 * elflink.h (elf_link_assign_sym_version): Hide the default
7446 definition if there is a hidden versioned definition.
7448 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7450 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7451 dynamic reference test in assertion when initializing GOT with
7452 static contents. Just assert that there are either no dynamic
7453 sections, the symbol is defined in the regular objects or that the
7454 symbol is undef weak. Tweak comment.
7455 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7456 only if the symbol isn't defined in the program and isn't undef
7458 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7459 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7460 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7461 (elf_cris_discard_excess_program_dynamics): Don't consider
7462 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7464 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7466 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7467 unresolved debugging relocs in dynamic applications.
7468 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7469 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7470 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7471 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7472 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7473 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7475 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7477 * elf64-ppc.c (ONES): Define.
7478 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7479 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7480 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7482 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7483 (ppc64_elf_set_private_flags): Delete.
7484 (ppc64_elf_section_from_shdr): Delete.
7485 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7486 (ppc64_elf_fake_sections): Delete.
7487 (bfd_elf64_bfd_set_private_flags): Don't define.
7488 (bfd_elf64_get_symbol_info): Likewise.
7489 (elf_backend_section_from_shdr): Likewise.
7490 (elf_backend_fake_sections): Likewise.
7492 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7494 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7495 when not already set.
7496 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7497 (elf_backend_fake_sections): Define.
7499 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7501 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7503 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7505 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7507 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7508 NULL sym_hashes to just before use.
7509 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7510 symbol with non-default visibility.
7511 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7512 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7514 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7515 symbol with non-default visibility.
7516 (cris_elf_check_relocs): At tests for local symbol before
7517 increasing h->plt.refcount, also check for non-default
7518 visibility. Ditto when checking for local symbol to eliminate
7519 pc-relative runtime relocs.
7521 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7523 * elf.c: Formatting.
7524 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7525 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7526 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7529 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7530 Alan Modra <amodra@bigpond.net.au>
7532 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7533 account the impact of relocation count overflow when computing
7535 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7536 or not to apply the PE COFF reloc overflow handling. Fix a
7537 fencepost error in deciding whether or not to use that technique.
7539 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7541 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7542 change type of locsyms.
7543 (bfd_elf_get_elf_syms): Declare.
7544 * elf.c (bfd_elf_get_elf_syms): New function.
7545 (group_signature): Use bfd_elf_get_elf_syms.
7546 (bfd_section_from_r_symndx): Likewise.
7547 * elfcode.h (elf_slurp_symbol_table): Likewise.
7548 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7549 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7550 locality of various data structures. Properly free internal relocs.
7551 (elf_bfd_final_link): Properly free internal relocs.
7552 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7553 (elf_link_input_bfd): Likewise.
7554 (elf_gc_mark): Likewise. Properly free internal relocs.
7555 (elf_gc_sweep): Properly free internal relocs.
7556 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7557 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7559 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7560 Properly free possibly cached info.
7561 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7562 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7563 symbol swapping code.
7564 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7565 Properly free possibly cached info.
7566 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7567 (mn10300_elf_relax_delete_bytes): Likewise.
7568 (mn10300_elf_symbol_address_p): Likewise.
7569 (mn10300_elf_get_relocated_section_contents): Likewise.
7570 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7571 (elf32_h8_relax_delete_bytes): Likewise.
7572 (elf32_h8_symbol_address_p): Likewise.
7573 (elf32_h8_get_relocated_section_contents): Likewise.
7574 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7575 (m32r_elf_relax_delete_bytes): Likewise.
7576 (m32r_elf_get_relocated_section_contents): Likewise.
7577 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7578 elf_section_data to determine whether cached.
7579 (sh_elf_relax_section): As above for elf-m10200.c.
7580 (sh_elf_relax_delete_bytes): Likewise.
7581 (sh_elf_get_relocated_section_contents): Likewise.
7582 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7583 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7584 reading of local syms.
7585 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7586 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7587 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7588 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7590 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7591 free internal relocs and section contents. Don't read symbols.
7592 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7593 (elf32_hppa_size_stubs): Don't free local syms.
7594 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7595 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7596 possibly cached info.
7597 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7598 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7599 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7601 (get_local_syms): Delete function.
7602 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7604 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7606 2002-07-05 Jim Wilson <wilson@redhat.com>
7608 * syms.c (decode_section_type): New.
7609 (bfd_decode_symclass): Call decode_section_type.
7611 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7613 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7614 section content start.
7615 Reported by Michael Schumacher <mike@hightec-rt.com>.
7617 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7619 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7620 link order code. Don't actually remove the output section here;
7621 Just set a flag for the linker to do so.
7622 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7623 sections when setting up output section dynsyms.
7625 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7627 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7629 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7632 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7634 * elf64-s390.c (create_got_section): Set .got section alignment to
7636 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7638 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7640 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7642 2002-07-01 Matt Thomas <matt@3am-software.com>
7644 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7647 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7649 * elfxx-mips.c (ABI_64_P): Fix comment.
7650 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7651 new section names for N64 ABI.
7652 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7653 (mips_elf_calculate_relocation): Code formatting.
7654 (mips_elf_create_dynamic_relocation): Likewise.
7655 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7656 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7657 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7659 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7661 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7662 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7665 2002-07-01 Andreas Schwab <schwab@suse.de>
7667 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7668 R_X86_64_64 to R_X86_64_RELATIVE.
7670 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7672 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7673 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7675 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7677 * configure.in (vaxbsd_vec): Add.
7678 * targets.c (vaxbsd_vec): Add.
7679 * Makefile.in: Rebuild.
7680 * configure: Rebuild.
7681 * po/SRC-POTFILES.in: Rebuild.
7683 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7685 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7686 examining to gc_mark_hook, rather than the bfd.
7687 (elf_gc_sections): Adjust.
7688 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7689 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7690 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7691 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7692 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7693 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7694 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7695 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7696 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7697 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7698 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7699 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7700 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7701 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7702 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7703 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7704 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7705 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7706 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7707 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7708 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7709 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7710 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7711 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7712 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7713 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7714 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7715 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7716 redundant local sym tests.
7717 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7718 (link_hash_newfunc): Init is_entry.
7719 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7720 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7721 (create_linkage_sections): Use bfd_make_section_anyway rather than
7723 (ppc64_elf_mark_entry_syms): New function.
7724 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7725 up opd entry to function section map.
7726 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7727 relocs that reference the opd section.
7728 (edit_opd): New function.
7729 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7730 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7731 (get_local_syms): Do so here. Exit if we already have local syms.
7732 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7733 read local syms on non-ELF input.
7734 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7735 than duplicating it's function here. Adjust free of internal
7737 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7738 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7739 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7740 _bfd_elf32_link_read_relocs rather than duplicating it's function
7741 here. Adjust free of internal relocs to suit.
7743 2002-07-01 Andreas Jaeger <aj@suse.de>
7745 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7746 are not allowed in shared libs code, enforce -fPIC.
7748 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7750 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7751 trailing zero-sequences when there's previous left-over data.
7753 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7755 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7756 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7757 and opd_rel_sec in order for starting rela section. Check _raw_size.
7758 (elf_backend_reloc_type_class): Define.
7760 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7762 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7765 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7767 * cpu-powerpc.c: Comment on ordering of arch_info.
7768 * elf32-ppc.c (ppc_elf_object_p): New function.
7769 (elf_backend_object_p): Define.
7770 * elf64-ppc.c (ppc64_elf_object_p): New function.
7771 (elf_backend_object_p): Define.
7773 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7775 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7776 * configure: Regenerate.
7778 2002-06-25 Jason Eckhardt <jle@rice.edu>
7780 * dwarf2.c (decode_line_info): Check unit->addr_size
7781 to read in the proper number of prologue bytes.
7783 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7785 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7786 aix5coff64_vec if 64-bit bfd support has been enabled.
7787 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7790 * targets.c (_bfd_target_vector[]): Only include
7791 aix5coff64_vec if 64-bit bfd support has been enabled.
7793 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7795 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7796 * elf32-hppa.c (hppa_add_stub): Likewise.
7797 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7798 * elflink.h (elf_add_default_symbol): Fix comment typo.
7799 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7800 (elf_link_add_object_symbols): Likewise.
7801 (elf_link_assign_sym_version): Likewise.
7802 * hash.c (bfd_hash_lookup): Likewise.
7803 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7804 * section.c (bfd_get_unique_section_name): Likewise.
7805 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7806 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7807 (assign_section_numbers): Likewise.
7808 (_bfd_elfcore_make_pseudosection): Likewise.
7809 (elfcore_grok_lwpstatus): Likewise.
7810 (elfcore_grok_win32pstatus): Likewise.
7811 (elfcore_write_note): Constify input params. Use PTR instead of
7812 void *. Include terminating NUL in namesz. Correct padding.
7813 Support NULL "name" param. Use memcpy instead of strcpy.
7814 (elfcore_write_prpsinfo): Constify input params.
7815 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7816 (elfcore_write_lwpstatus): Likewise.
7817 (elfcore_write_pstatus): Likewise.
7818 (elfcore_write_prfpreg): Likewise.
7819 (elfcore_write_prxfpreg): Likewise.
7820 * elf-bfd.h (elfcore_write_note): Update declaration.
7821 (elfcore_write_prpsinfo): Likewise.
7822 (elfcore_write_prstatus): Likewise.
7823 (elfcore_write_pstatus): Likewise.
7824 (elfcore_write_prfpreg): Likewise.
7825 (elfcore_write_prxfpreg): Likewise.
7826 (elfcore_write_lwpstatus): Likewise.
7828 2002-06-25 Jason Eckhardt <jle@rice.edu>
7830 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7831 symbols of type stProc and stStaticProc.
7833 2002-06-25 Nick Clifton <nickc@redhat.com>
7835 * ecoff.c: VArious formatting fixes.
7837 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7839 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7841 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7843 * aout-adobe.c: Don't compare against "true" or "false.
7844 * aout-target.h: Likewise.
7845 * aoutx.h: Likewise.
7846 * archive.c: Likewise.
7848 * cache.c: Likewise.
7849 * coff-a29k.c: Likewise.
7850 * coff-alpha.c: Likewise.
7851 * coff-i386.c: Likewise.
7852 * coff-mips.c: Likewise.
7853 * coff-or32.c: Likewise.
7854 * coff64-rs6000.c: Likewise.
7855 * coffcode.h: Likewise.
7856 * coffgen.c: Likewise.
7857 * cpu-ns32k.c: Likewise.
7858 * ecoff.c: Likewise.
7859 * ecofflink.c: Likewise.
7861 * elf32-arm.h: Likewise.
7862 * elf32-cris.c: Likewise.
7863 * elf32-d30v.c: Likewise.
7864 * elf32-i386.c: Likewise.
7865 * elf32-mcore.c: Likewise.
7866 * elf32-ppc.c: Likewise.
7867 * elf32-sh.c: Likewise.
7868 * elf32-sh64.c: Likewise.
7869 * elf32-v850.c: Likewise.
7870 * elf64-alpha.c: Likewise.
7871 * elf64-sh64.c: Likewise.
7872 * elfcode.h: Likewise.
7873 * elfcore.h: Likewise.
7874 * elflink.h: Likewise.
7875 * elfxx-mips.c: Likewise.
7876 * i386os9k.c: Likewise.
7878 * libbfd.c: Likewise.
7879 * linker.c: Likewise.
7881 * nlm32-alpha.c: Likewise.
7882 * nlm32-i386.c: Likewise.
7883 * nlm32-ppc.c: Likewise.
7884 * nlm32-sparc.c: Likewise.
7885 * nlmcode.h: Likewise.
7886 * oasys.c: Likewise.
7887 * pdp11.c: Likewise.
7888 * peicode.h: Likewise.
7889 * reloc.c: Likewise.
7892 * tekhex.c: Likewise.
7894 * xcofflink.c: Likewise.
7895 * elf64-sparc.c: Edit comment to not use "== false".
7897 * aoutf1.h: Don't use "? true : false".
7898 * ecoff.c: Likewise.
7899 * format.c: Likewise.
7901 * linker.c: Likewise.
7903 * oasys.c: Likewise.
7905 2002-06-23 H.J. Lu <hjl@gnu.org>
7907 * elflink.h (elf_link_add_archive_symbols): For the default
7908 version, check references with only one `@' first.
7910 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7912 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7914 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7916 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7917 (elf64_hppa_size_dynamic_sections): Revise to use
7918 elf64_hppa_mark_milli_and_exported_functions.
7919 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7920 symbols out of dynamic symbol table.
7922 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7924 * Makefile.in: Regenerate.
7925 * libbfd.h: Regenerate.
7926 * bfd-in2.h: Regenerate.
7927 * configure: Regenerate.
7928 * po/SRC-POTFILES.in: Regenerate.
7930 * elflink.h: Comment typo fixes.
7932 2002-06-23 H.J. Lu <hjl@gnu.org>
7934 * elf-bfd.h (elf_link_loaded_list): New structure.
7935 (elf_link_hash_table): Add "loaded".
7936 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7937 * elflink.h (elf_link_check_versioned_symbol): New function.
7938 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7940 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7942 * elflink.h (size_dynamic_sections): If the target does not
7943 support an ELF style hash table, return true, indicating that
7944 nothing needed to be done, rather than false, indicating that the
7945 section's size could not be computed.
7947 2002-06-18 Dave Brolley <brolley@redhat.com>
7949 From Catherine Moore, Michael Meissner, Dave Brolley:
7950 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7951 * targets.c: Support bfd_elf32_frv_vec.
7952 * reloc.c: Add FRV relocs.
7953 * configure.in: Add support for bfd-elf32-frv-vec.
7954 * config.bfd (targ_cpu): Add support for frv-*-elf.
7955 * archures.c: Add frv arch and machines.
7956 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7957 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7958 (BFD32_BACKENDS): Add elf32-frv.lo.
7959 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7960 (cpu-frv.lo): New target.
7961 (elf32-frv.lo): New target.
7962 * cpu-frv.c: New file.
7963 * elf32-frv.c: New file.
7965 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7967 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7969 Only read the first section header if e_shoff is non-zero.
7970 Don't consider e_shstrndx if there are no sections.
7972 2002-06-17 Tom Rix <trix@redhat.com>
7974 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7975 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7976 complain_overflow_bitfield.
7978 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7980 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7981 (bfd_fdopenr): Likewise.
7982 (bfd_openstreamr): Likewise.
7983 (bfd_openw): Likewise.
7985 * targets.c: Sort target vecs.
7986 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7987 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7988 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7989 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7990 * configure.in: Sort target vecs. Add m88kmach3_vec.
7991 * configure: Regenerate.
7993 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7995 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7996 bpo_reloc_no to break sort order ties, not address of items.
7998 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
8000 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
8001 Skip excluded sections in determing __gp value.
8002 (elf_hppa_final_link_relocate): Use the symbol's address in
8003 R_PARISC_FPTR64 relocations that don't need an opd entry.
8004 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
8005 (elf64_hppa_finalize_dynreloc): Likewise.
8006 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
8007 (elf64_hppa_finish_dynamic_symbol): Break up assert.
8009 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
8011 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
8012 alignment for .bss, .data and .text sections so that sse and sse2
8014 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8016 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
8018 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8021 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8023 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8026 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8027 for a symbol that has no output section.
8028 (allocate_dynrel_entries): Correct comment.
8029 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8031 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8032 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8033 with no section. Remove unnecessary parentheses.
8035 2002-06-11 Tom Rix <trix@redhat.com>
8037 * coffcode.h (coff_compute_section_file_positions): Add data
8038 section to AIX loader alignment check.
8040 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8041 alignment to 4 bytes.
8042 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8043 power accessor macro.
8044 (do_shared_object_padding): Remove invalid assertion.
8046 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8048 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8049 for removed output sections.
8051 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8053 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8055 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8057 2002-06-08 H.J. Lu <hjl@gnu.org>
8059 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8060 work around a long long bug in gcc 2.96 on mips.
8062 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8064 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8065 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8066 Regenerate dependency lists.
8067 * Makefile.in: Regenerate.
8068 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8069 vax1knetbsd_vec to targ_selvecs.
8070 * configure.in: Add vax1knetbsd_vec.
8071 * configure: Regenerate.
8072 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8073 * vax1knetbsd.c: New file.
8074 * vaxnetbsd.c: Update copyright years.
8075 (TARGET_PAGE_SIZE): Set to 0x1000.
8076 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8078 2002-06-08 Matt Thomas <matt@3am-software.com>
8080 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8082 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8084 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8086 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8088 * Makefile.am: Run "make dep-am".
8089 * Makefile.in: Regenerate.
8091 * armnetbsd.c: Replace CONST with const.
8092 * corefile.c: Likewise.
8093 * elf32-dlx.c: Likewise.
8094 * elf64-mips.c: Likewise.
8096 * ns32knetbsd.c: Likewise.
8098 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8099 table is elf64-sparc.
8101 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8103 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8104 Fix RELA addends to get not shifted in the result. Don't do special
8105 handling of R_MIPS_64 for NewABI.
8107 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8109 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8110 (NAME(aout,slurp_reloc_table)): Likewise.
8111 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8112 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8113 (xcoff_write_archive_contents_big): Likewise.
8114 (xcoff_generate_rtinit): Likewise.
8115 (xcoff_generate_rtinit): Likewise, and check error return.
8116 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8117 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8118 (coff_get_normalized_symtab): Likewise.
8119 (coff_make_empty_symbol): Likewise.
8120 (bfd_coff_set_symbol_class): Likewise.
8121 * cofflink.c (coff_link_add_symbols): Likewise.
8122 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8123 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8124 (bfd_ecoff_write_accumulated_debug): Likewise.
8125 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8126 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8127 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8128 * ieee.c (do_with_relocs): Use bfd_zalloc.
8129 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8130 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8131 (NAME(aout,slurp_reloc_table)): Likewise.
8132 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8133 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8134 * som.c (som_build_and_write_symbol_table): Likewise.
8135 (som_slurp_string_table): Likewise.
8136 (som_slurp_symbol_table): Likewise.
8137 (som_bfd_ar_write_symbol_stuff): Likewise.
8138 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8139 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8140 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8141 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8142 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8144 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8146 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8148 (elf_group_name): Update.
8149 (elf_group_id): Define.
8150 (bfd_elf_set_group_contents): Declare.
8151 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8152 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8153 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8154 that sym for the signature.
8155 (_bfd_elf_compute_section_file_positions): Don't call
8156 set_group_contents for "ld -r" case.
8157 (swap_out_syms): Use bfd_zalloc.
8158 * elflink.h (elf_link_add_archive_symbols): Likewise.
8159 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8160 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8162 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8164 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8165 relocs in opd for non-shared too.
8167 2002-06-06 Jeffrey Law <law@redhat.com>
8169 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8172 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8174 * merge.c: Include libiberty.h.
8175 * elf-strtab.c: Include libiberty.h.
8177 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8179 * peXXigen.c (pe_print_idata): Remove unused variable.
8181 2002-06-06 David Heine <dlheine@tensilica.com>
8183 * elf.c (assign_file_positions_for_segments): Remove unallocated
8184 sections from the section to segment mapping for PT_LOAD segments.
8185 Update comment about empty loadable segments.
8187 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8189 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8190 is within the .stabstr section.
8192 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8194 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8195 are "const PTR", not "const PTR *".
8196 (bfd_elf32_swap_symbol_in): Likewise.
8197 (bfd_elf64_swap_symbol_in): Likewise.
8198 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8199 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8200 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8201 (elf_link_add_object_symbols): Likewise.
8202 (elf_link_record_local_dynamic_symbol): Likewise.
8203 (elf_link_input_bfd): Likewise.
8204 (elf_gc_mark): Likewise.
8205 (elf_reloc_symbol_deleted_p): Likewise.
8206 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8207 (mn10200_elf_relax_delete_bytes): Likewise.
8208 (mn10200_elf_symbol_address_p): Likewise.
8209 (mn10200_elf_get_relocated_section_contents): Likewise.
8210 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8211 (mn10300_elf_relax_section): Likewise.
8212 (mn10300_elf_relax_delete_bytes): Likewise.
8213 (mn10300_elf_symbol_address_p): Likewise.
8214 (mn10300_elf_get_relocated_section_contents): Likewise.
8215 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8216 (elf32_h8_relax_delete_bytes): Likewise.
8217 (elf32_h8_symbol_address_p): Likewise.
8218 (elf32_h8_get_relocated_section_contents): Likewise.
8219 * elf32-hppa.c (get_local_syms): Likewise.
8220 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8221 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8222 * elf32-sh.c (sh_elf_relax_section): Likewise.
8223 (sh_elf_relax_delete_bytes): Likewise.
8224 (sh_elf_get_relocated_section_contents): Likewise.
8225 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8226 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8227 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8228 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8229 * elf64-ppc.c (get_local_syms): Likewise.
8230 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8231 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8233 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8235 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8237 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8239 * elf.c (group_signature): Swap in the whole symbol, and handle
8240 extracting section symbol names.
8241 (setup_group): Add comment.
8242 (set_group_contents): When called from objcopy or ld, arrange for
8243 section contents to be written. Write group member output section
8244 indices to allow objcopy to reorganize sections.
8245 (_bfd_elf_copy_private_section_data): Copy group info.
8247 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8248 (bfd_elf32_swap_symbol_in): Update prototype.
8249 (bfd_elf64_swap_symbol_in): Likewise.
8250 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8251 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8252 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8253 (elf_link_add_object_symbols): Likewise.
8254 (elf_link_record_local_dynamic_symbol): Likewise.
8255 (elf_link_input_bfd): Likewise.
8256 (elf_gc_mark): Likewise.
8257 (elf_reloc_symbol_deleted_p): Likewise.
8258 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8259 (mn10200_elf_relax_delete_bytes): Likewise.
8260 (mn10200_elf_symbol_address_p): Likewise.
8261 (mn10200_elf_get_relocated_section_contents): Likewise.
8262 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8263 (mn10300_elf_relax_section): Likewise.
8264 (mn10300_elf_relax_delete_bytes): Likewise.
8265 (mn10300_elf_symbol_address_p): Likewise.
8266 (mn10300_elf_get_relocated_section_contents): Likewise.
8267 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8268 (elf32_h8_relax_delete_bytes): Likewise.
8269 (elf32_h8_symbol_address_p): Likewise.
8270 (elf32_h8_get_relocated_section_contents): Likewise.
8271 * elf32-hppa.c (get_local_syms): Likewise.
8272 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8273 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8274 * elf32-sh.c (sh_elf_relax_section): Likewise.
8275 (sh_elf_relax_delete_bytes): Likewise.
8276 (sh_elf_get_relocated_section_contents): Likewise.
8277 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8278 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8279 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8280 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8281 * elf64-ppc.c (get_local_syms): Likewise.
8282 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8283 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8284 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8285 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8286 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8287 * elf64-mips.c (mips_elf64_size_info): Likewise.
8288 * elf64-s390.c (s390_elf64_size_info): Likewise.
8289 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8291 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8293 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8294 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8295 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8296 _bfd_mips_elf_ignore_discarded_relocs.
8297 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8299 2002-06-05 H.J. Lu <hjl@gnu.org>
8301 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8302 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8303 the SEC_MERGE section.
8305 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8307 * coff-alpha.c: Update copyright date.
8308 * coff-mips.c: Likewise.
8309 * xcoff-target.h: Likewise.
8311 * bfd-in.h: Remove "taken from the source" comment.
8312 * libbfd-in.h: Likewise.
8313 * libcoff-in.h: Likewise.
8314 * bfd-in2.h: Regenerate.
8315 * libbfd.h: Regenerate.
8316 * libcoff.h: Regenerate.
8318 * elf.c (bfd_elf_discard_group): Return true.
8319 * elf-bfd.h (bfd_elf_discard_group): Declare.
8320 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8321 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8322 * bfd.c (bfd_discard_group): Define.
8323 * targets.c (struct bfd_target): Add _bfd_discard_group.
8324 (BFD_JUMP_TABLE_LINK): Here too.
8325 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8326 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8327 * aout-target.h (MY_bfd_discard_group): Define.
8328 * aout-tic30.c (MY_bfd_discard_group): Define.
8329 * binary.c (binary_bfd_discard_group): Define.
8330 * bout.c (b_out_bfd_discard_group): Define.
8331 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8332 * coffcode.h (coff_bfd_discard_group): Define.
8333 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8334 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8335 * i386msdos.c (msdos_bfd_discard_group): Define.
8336 * i386os9k.c (os9k_bfd_discard_group): Define.
8337 * ieee.c (ieee_bfd_discard_group): Define.
8338 * ihex.c (ihex_bfd_discard_group): Define.
8339 * mmo.c (mmo_bfd_discard_group): Define.
8340 * nlm-target.h (nlm_bfd_discard_group): Define.
8341 * oasys.c (oasys_bfd_discard_group): Define.
8342 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8343 * som.c (som_bfd_discard_group): Define.
8344 * srec.c (srec_bfd_discard_group): Define.
8345 * tekhex.c (tekhex_bfd_discard_group): Define.
8346 * versados.c (versados_bfd_discard_group): Define.
8347 * vms.c (vms_bfd_discard_group): Define.
8348 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8349 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8350 (aix5coff64_vec): Likewise.
8351 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8353 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8355 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8356 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8357 (elf32-sh64-com.lo): New dependency list.
8358 * Makefile.in: Regenerate.
8359 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8360 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8362 * configure: Regenerate.
8363 * elf32-sh64.c (sh64_address_in_cranges)
8364 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8365 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8366 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8367 * elf32-sh64-com.c: ...here. New file.
8369 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8371 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8372 ATTRIBUTE_UNUSED on used params.
8373 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8374 before calling bfd_section_from_elf_index on local syms.
8375 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8377 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8379 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8380 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8381 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8382 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8383 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8384 * Makefile.in: Regenerate.
8385 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8386 (sh64-*-netbsd*): New targets.
8387 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8388 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8389 * configure: Regenerate.
8390 * elf32-sh64-nbsd.c: New file.
8391 * elf64-sh64-nbsd.c: New file.
8392 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8393 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8394 bfd_elf64_sh64lnbsd_vec.
8396 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8398 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8399 (bfd_section_from_shdr): Likewise. Set section name of group
8400 sections from signature.
8401 (group_signature): Split out from setup_group. Ensure symbol table
8403 (bfd_elf_discard_group): New function.
8404 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8405 .gnu.linkonce* sections if they are members of a group.
8406 (set_group_contents): Set GRP_COMDAT flag.
8407 * section.c (bfd_discard_group): New function.
8408 * bfd-in.h (bfd_elf_discard_group): Declare.
8409 * bfd-in2.h: Regenerate.
8410 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8411 (elf_linkonce_p): Define.
8413 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8415 * elf.c (bfd_section_from_shdr): Make "name" const.
8416 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8417 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8418 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8419 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8420 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8421 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8422 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8423 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8424 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8425 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8426 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8428 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8430 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8433 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8435 * elf32-arc.c: Fix formatting.
8436 * elf32-arm.h: Likewise.
8437 * elf32-cris.c: Likewise.
8438 * elf32-dlx.c: Likewise.
8439 * elf32-hppa.c: Likewise.
8440 * elf32-i386.c: Likewise.
8441 * elf32-i386qnx.c: Likewise.
8442 * elf32-or32.c: Likewise.
8443 * elf32-s390.c: Likewise.
8444 * elf32-sh64.c: Likewise.
8445 * elf32-vax.c: Likewise.
8446 * elf32-xstormy16.c: Likewise.
8447 * elf64-alpha.c: Likewise.
8448 * elf64-mmix.c: Likewise.
8449 * elf64-ppc.c: Likewise.
8450 * elf64-s390.c: Likewise.
8451 * elf64-sh64.c: Likewise.
8452 * elf64-x86-64.c: Likewise.
8454 2002-06-02 Richard Henderson <rth@redhat.com>
8456 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8457 null when there are no got entries for a symbol.
8458 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8459 uninitialized variable warning.
8461 2002-06-01 Richard Henderson <rth@redhat.com>
8463 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8464 undefined symbols here.
8465 (elf64_alpha_relax_section): Do it here. Also test for not
8466 defined in the current module.
8467 (elf64_alpha_relocate_section_r): Split out of ...
8468 (elf64_alpha_relocate_section): ... here. Don't dereference
8469 NULL when looking up local got entries.
8471 2002-06-01 Richard Henderson <rth@redhat.com>
8473 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8474 symbols from JSR relaxation.
8475 (elf64_alpha_size_plt_section_1): New.
8476 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8477 (elf64_alpha_size_rela_got_1): ... here.
8478 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8479 (elf64_alpha_size_rela_got_section): ... here.
8480 (elf64_alpha_size_plt_section): New.
8481 (elf64_alpha_relax_section): Call them.
8482 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8483 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8485 2002-06-01 Richard Henderson <rth@redhat.com>
8487 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8488 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8489 in shared libraries. Fix DTPRELHI and TPRELHI value.
8490 (INSN_ADDQ, INSN_RDUNIQ): New.
8491 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8492 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8493 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8494 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8495 Handle GOTDTPREL and GOTTPREL relocations.
8496 (elf64_alpha_relax_gprelhilo): New.
8497 (elf64_alpha_relax_tls_get_addr): New.
8498 (elf64_alpha_relax_find_tls_segment): New.
8499 (elf64_alpha_relax_section): Handle TLS relocations.
8500 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8501 (elf64_alpha_check_relocs): Set it.
8503 2002-06-01 Richard Henderson <rth@redhat.com>
8505 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8507 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8508 check; don't suppress dynamic relocs for non-allocated sections.
8510 * elf64-alpha.c: Remove dead code.
8512 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8514 * bfd-in2.h: Regenerate.
8515 * libbfd.h: Regenerate.
8516 * po/SRC-POTFILES.in: Regenerate.
8518 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8521 2002-05-31 Graeme Peterson <gp@qnx.com>
8523 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8524 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8526 * Makefile.in: Regenerate.
8527 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8528 * configure.in: Add bfd_elf32_i386qnx_vec support.
8529 * configure: Regenerate.
8530 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8531 is_contained_by_filepos, and copy_private_bfd_data_p.
8532 * elf.c (assign_file_positions_for_segments): Call backend
8533 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8534 (IS_CONTAINED_BY_FILEPOS): Define.
8535 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8536 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8537 Fix non-K&R call to _bfd_error_handler.
8538 (_bfd_elf_copy_private_section_data): Use backend
8539 copy_private_bfd_data_p.
8540 * elf32-i386.c: Don't include elfxx-target.h when
8541 ELF32_I386_C_INCLUDED is defined.
8542 * elf32-i386qnx.c: New QNX elf backend file.
8543 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8544 elf_backend_is_contained_by_filepos, and
8545 elf_backend_do_copy_private_bfd_data.
8546 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8548 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8550 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8551 Move other similar defines to start of file.
8553 2002-05-30 Tom Rix <trix@redhat.com>
8555 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8556 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8558 2002-05-30 Richard Henderson <rth@redhat.com>
8560 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8561 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8562 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8563 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8564 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8565 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8566 n_local_got_entries to total_got_size and local_got_size.
8567 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8568 (alpha_got_entry_size): New.
8569 (elf64_alpha_relax_with_lituse): Use it.
8570 (elf64_alpha_relax_without_lituse): Likewise.
8571 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8572 (get_got_entry): New.
8573 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8574 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8575 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8576 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8577 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8578 (elf64_alpha_calc_got_offsets): Likewise.
8579 (alpha_dynamic_entries_for_reloc): New.
8580 (elf64_alpha_calc_dynrel_sizes): Use it.
8581 (elf64_alpha_size_dynamic_sections): Likewise.
8582 (elf64_alpha_relocate_section): Handle TLS relocations.
8583 * reloc.c: Add Alpha TLS relocations.
8584 * bfd-in2.h, libbfd.h: Rebuild.
8586 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8588 * peXXigen.c (pe_print_idata): Remove double printed
8589 import table lines; add Bound-To comment.
8591 2002-05-29 Matt Thomas <matt@3am-software.com>
8593 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8594 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8595 (elf32-vax.lo): New rule.
8596 * Makefile.in: Regenerate.
8597 * configure.in (bfd_elf32_vax_vec)
8598 (vaxnetbsd_vec): New vectors.
8599 * configure: Regenerate.
8600 * config.bfd (vax-*-netbsdelf*)
8602 (vax-*-netbsd*): New targets.
8603 * elf32-vax.c: New file.
8604 * reloc.c: Add VAX relocations.
8605 * bfd-in2.h: Regenerate.
8606 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8608 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8610 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8611 and bfd_elf32_bigarm_vec to targ_selvecs.
8613 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8615 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8616 with auto-imported symbols.
8618 2002-05-29 Adam Nemet <anemet@lnxw.com>
8620 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8621 sections only record bfd.
8622 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8623 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8624 * bfd-in2.h: Regenerate.
8626 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8628 * syms.c (_bfd_stab_section_find_nearest_line): Move
8629 declaration and initialisation of saw_line and saw_func out of
8632 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8634 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8635 (bfd_elf64_get_symbol_info): Define.
8636 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8638 2002-05-29 Andrey Volkov <avolkov@transas.com>
8640 * cpu-h8300.c: Make default h8300 machine first in machine list.
8642 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8644 * config.bfd: Added DLX configuraton.
8645 * Makefile.am: Added DLX configuraton.
8646 * configure.in: Added DLX configuraton.
8647 * archures.c: Add DLX architecture.
8648 * reloc.c: Add DLX relocs.
8649 * targets.c: Added DLX target vector.
8650 * configure: Regenerate.
8651 * Makefile.in: Regenreate.
8652 * bfd-in2.h: Regenreate.
8653 * elf32-dlx.c: New file: Support DLX target.
8654 * cpu-dlx.c: New file: Support DLX target.
8656 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8658 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8660 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8661 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8662 strings to point inside function code sym string.
8663 (func_desc_adjust): Likewise.
8664 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8666 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8668 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8669 (elf64_x86_64_grok_psinfo): Added.
8671 2002-05-24 TAMURA Kent <kent@netbsd.org>
8673 * config.bfd: Add a target for i386-netbsdpe.
8675 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8677 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8678 and is_func_descriptor.
8679 (func_desc_adjust): Hide function code sym in shared libs unless
8680 there is a matching exported function descriptor sym.
8682 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8684 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8685 for symbols from SHF_TLS section.
8686 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8687 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8688 (map_sections_to_segments): Build PT_TLS segment if necessary.
8689 (assign_file_positions_for_segments): Likewise.
8690 (get_program_header_size): Account for PT_TLS segment.
8691 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8692 SEC_THREAD_LOCAL sections to STT_TLS.
8693 * reloc.c: Add 386 and IA-64 TLS relocs.
8694 * section.c (SEC_THREAD_LOCAL): Define.
8695 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8697 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8698 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8700 (struct elf_final_link_info): Add first_tls_sec.
8701 (elf_bfd_final_link): Set first_tls_sec.
8702 Compute elf_hash_table (info)->tls_segment.
8703 (elf_link_output_extsym): Handle STT_TLS symbols.
8704 (elf_link_input_bfd): Likewise.
8705 * syms.c (BSF_THREAD_LOCAL): Define.
8706 * bfd-in2.h: Rebuilt.
8707 * libbfd.h: Rebuilt.
8708 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8709 elf_i386_mkobject, elf_i386_object_p): New functions.
8710 (elf_howto_table): Add TLS relocs.
8711 (elf_i386_reloc_type_lookup): Support TLS relocs.
8712 (elf_i386_info_to_howto_rel): Likewise.
8713 (struct elf_i386_link_hash_entry): Add tls_type.
8714 (struct elf_i386_obj_tdata): New.
8715 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8717 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8718 (link_hash_newfunc): Clear tls_type.
8719 (elf_i386_check_relocs): Support TLS relocs.
8720 (elf_i386_gc_sweep_hook): Likewise.
8721 (allocate_dynrelocs): Likewise.
8722 (elf_i386_size_dynamic_sections): Likewise.
8723 (elf_i386_relocate_section): Likewise.
8724 (elf_i386_finish_dynamic_symbol): Likewise.
8725 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8726 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8727 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8728 want_tprel, want_dtpmod, want_dtprel.
8729 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8730 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8731 R_IA64_LTOFF_TPREL22.
8732 (elf_code_to_howto_index): Add TLS relocs.
8733 (elfNN_ia64_check_relocs): Support TLS relocs.
8734 (allocate_global_data_got): Account for TLS .got data.
8735 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8736 (elfNN_ia64_install_value): Supprt TLS relocs.
8737 (set_got_entry): Support TLS relocs.
8738 (elfNN_ia64_relocate_section): Likewise.
8740 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8742 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8743 BLX reloc round the relocation up rather than down.
8744 * coff-arm.c (coff_arm_relocate_section): Likewise.
8746 2002-05-21 H.J. Lu (hjl@gnu.org)
8748 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8751 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8753 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8754 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8756 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8758 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8760 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8762 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8764 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8767 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8769 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8771 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8772 return with false on error.
8773 (elf_link_input_bfd): Check reloc_emitter return value.
8775 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8777 * config.bfd (armeb-*-netbsdelf*): New target.
8779 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8781 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8782 at the plt call stub.
8784 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8786 * cpu-mips.c (mips_compatible): Don't try to check machine
8789 2002-05-18 Tom Rix <trix@redhat.com>
8791 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8793 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8795 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8796 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8797 we've already warned about an undefined symbol. Report more
8798 detail on reloc errors.
8800 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8802 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8803 * configure.in: Invoke AM_INSTALL_LIBBFD.
8804 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8805 (install_libbfd): .. New target.
8806 (uninstall_libbfd): Likewise.
8807 (install-bfdlibLTLIBRARIES): Likewise.
8808 (uninstall-bfdlibLTLIBRARIES): Likewise.
8810 (bfdincludedir): New.
8811 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8812 * aclocal.m4: Regenerate.
8813 * configure: Regenerate.
8814 * Makefile.in: Regenerate.
8816 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8818 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8821 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8823 * config.bfd: Add targets for sh64-linux (little endian and
8826 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8828 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8829 is located in the same section as the import table. Instead
8830 check, and if necessary load the section containing the thunk.
8832 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8834 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8836 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8839 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8841 * aix5ppc-core.c: Warning fixes.
8842 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8843 * aout-target.h (MY_bfd_link_just_syms): Define.
8844 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8845 * bfd.c (bfd_link_just_syms): Define.
8846 * binary.c (binary_bfd_link_just_syms): Define.
8847 * bout.c (b_out_bfd_link_just_syms): Define.
8848 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8849 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8850 * coffcode.h (coff_bfd_link_just_syms): Define.
8851 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8852 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8853 (_bfd_elf_link_just_syms): Declare.
8854 * elf.c (_bfd_elf_link_just_syms): New function.
8855 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8856 sections haven't already been discarded by the linker.
8857 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8858 sections and SEC_MERGE sections.
8859 (elf_bfd_discard_info): Similarly here.
8860 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8861 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8862 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8863 * ieee.c (ieee_bfd_link_just_syms): Define.
8864 * ihex.c (ihex_bfd_link_just_syms): Define.
8865 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8866 (_bfd_generic_link_just_syms): Declare.
8867 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8868 * linker.c (_bfd_generic_link_just_syms): New function.
8869 * mmo.c (mmo_bfd_link_just_syms): Define.
8870 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8871 * oasys.c (oasys_bfd_link_just_syms): Define.
8872 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8873 * som.c (som_bfd_link_just_syms): Define.
8874 * srec.c (srec_bfd_link_just_syms): Define.
8875 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8876 (BFD_JUMP_TABLE_LINK): And here.
8877 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8878 * versados.c (versados_bfd_link_just_syms): Define.
8879 * vms.c (vms_bfd_link_just_syms): Define.
8880 * libbfd.h: Regenerate.
8881 * bfd-in2.h: Regenerate.
8883 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8885 * elf32-mips.c: Remove superfluous definitions copied from
8887 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8888 SGIish vectors to check the special case.
8889 (mips_elf_hi16_reloc): Fix comment.
8890 (mips_elf_got16_reloc): Likewise.
8891 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8892 (elf_reloc_map): Code cleanup.
8893 (mips_reloc_map): Add comment.
8894 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8895 (mips_elf32_rtype_to_howto): Likewise.
8896 (mips_elf32_discard_info): Likewise.
8897 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8898 lead to IRIX compatibility now.
8900 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8902 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8904 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8906 * config.bfd (shle-*-netbsdelf*): Add target which includes
8909 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8911 * configure.in: Revert 2002-04-07. Instead, auto-configure
8913 * configure: Regenerate.
8914 * config.in: Regenerate.
8915 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8918 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8920 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8922 * configure: Regenerate.
8924 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8926 * Makefile.am (install-data-local): Install headers to
8927 $(exec_prefix)/include.
8928 * Makefile.in: Regenerate.
8930 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8931 Daniel Jacobowitz <drow@mvista.com>
8933 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8936 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8938 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8939 hppa*-*-openbsd*): New targets.
8940 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8941 * configure: Regenerate.
8943 2002-05-10 Tom Rix <trix@redhat.com>
8945 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8946 xcoff64_ppc_relocate_section.
8947 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8948 * libxcoff.h: Common xcoff_reloc_type function declaration.
8950 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8952 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8953 added in 2002-05-09 commit.
8955 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8956 don't look for stubs on all undefined syms.
8958 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8960 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8961 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8964 * elf32-i386.c (elf_howto_table): Comments.
8965 (elf_i386_relocate_section): Handle more relocs for relocatable
8966 linking and against SEC_MERGE sections.
8968 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8970 * elf32-ppc.c (ppc_elf_create_got): New function.
8971 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8972 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8973 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8974 _bfd_elf_create_got_section.
8976 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8978 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8979 * elfxx-target.h (elf_backend_rela_normal): Define.
8980 (elfNN_bed): Init rela_normal.
8981 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8982 for section symbols here if rela_normal. Simplify abs section test.
8983 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8984 return immediately. Remove code handling relocatable linking.
8985 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8986 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8987 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8988 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8989 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8990 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8991 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8992 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8993 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8994 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8995 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8996 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8997 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8998 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8999 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
9000 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9001 * elf-m10200.c (elf_backend_rela_normal): Define.
9002 * elf-m10300.c (elf_backend_rela_normal): Define.
9003 * elf32-fr30.c (elf_backend_rela_normal): Define.
9004 * elf32-i370.c (elf_backend_rela_normal): Define.
9005 * elf32-i860.c (elf_backend_rela_normal): Define.
9006 * elf32-m68k.c (elf_backend_rela_normal): Define.
9007 * elf32-mcore.c (elf_backend_rela_normal): Define.
9008 * elf32-openrisc.c (elf_backend_rela_normal): Define.
9009 * elf32-ppc.c (elf_backend_rela_normal): Define.
9010 * elf32-s390.c (elf_backend_rela_normal): Define.
9011 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
9012 * elf64-ppc.c (elf_backend_rela_normal): Define.
9013 * elf64-s390.c (elf_backend_rela_normal): Define.
9014 * elf64-x86-64.c (elf_backend_rela_normal): Define.
9015 * elfxx-ia64.c (elf_backend_rela_normal): Define.
9016 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
9017 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
9019 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9021 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9022 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9024 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9026 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9027 when not relocatable. Fix reloc_emitter call for K&R.
9029 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9031 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9032 reloading local sym addend mistakenly removed in 2002-05-01 change.
9034 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9035 (read_abbrevs): Change "offset" param to bfd_vma.
9036 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9037 Change "abbrev_offset" to bfd_vma.
9038 (read_indirect_string): Use correct conversion chars in error
9039 message format string, cast bfd_vma's to unsigned long.
9040 (read_abbrevs): Likewise.
9041 (read_attribute_value): Likewise.
9042 (decode_line_info): Likewise.
9043 (scan_unit_for_functions): Likewise.
9044 (parse_comp_unit): Likewise.
9046 2002-05-04 Tom Rix <trix@redhat.com>
9048 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9049 (coff_swap_reloc_out): Same.
9050 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9051 (xcoff_swap_reloc_out): Same.
9052 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9053 case some 16 bit relocs. Add reloc value to output.
9054 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9055 R_RBR. Improve names.
9056 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9057 (bfd_xcoff_backend_data): Update with new reloc swap names.
9058 (bfd_pmac_xcoff_backend_data) : Same.
9059 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9060 (xcoff64_swap_reloc_out): Same.
9061 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9062 R_POS. Add reloc value to output.
9063 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9064 bit R_RBR. Improve names, masks.
9065 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9066 (bfd_xcoff_backend_data): Update with new reloc swap names.
9067 (bfd_xcoff_aix5_backend_data) : Same.
9069 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9071 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9072 bfd_count top_index, input_list, all_local_syms.
9073 (elf32_hppa_setup_section_lists): New function, split from
9074 elf32_hppa_size_stubs.
9075 (elf32_hppa_next_input_section): Likewise.
9076 (group_sections): Likewise.
9077 (get_local_syms): Likewise.
9078 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9079 stubs on undefined syms too.
9080 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9081 Only access htab elf fields when we have an elf hash table.
9082 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9083 (elf32_hppa_next_input_section): Declare.
9085 2002-05-04 Bob Byrnes <byrnes@curl.com>
9087 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9090 2002-05-03 H.J. Lu (hjl@gnu.org)
9092 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9093 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9094 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9095 to hide a global symbol.
9096 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9097 forced_local to true.
9099 2002-05-02 Richard Henderson <rth@redhat.com>
9101 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9102 vs SHN_UNDEF to zero.
9104 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9106 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9108 <R_PPC64_SECTOFF_DS>: Likewise.
9109 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9111 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9112 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9115 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9116 (ppc64_elf_ha_reloc): New function.
9117 (ppc64_elf_brtaken_reloc): New function.
9118 (ppc64_elf_sectoff_reloc): New function.
9119 (ppc64_elf_sectoff_ha_reloc): New function.
9120 (ppc64_elf_toc_reloc): New function.
9121 (ppc64_elf_toc_ha_reloc): New function.
9122 (ppc64_elf_toc64_reloc): New function.
9123 (ppc64_elf_unhandled_reloc): New function.
9124 (ppc64_elf_howto_raw): Use the above.
9125 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9126 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9127 <R_PPC64_SECTOFF_DS>: Likewise.
9128 (IS_ABSOLUTE_RELOC): Update.
9129 (struct ppc_link_hash_table): Add have_undefweak.
9130 (ppc64_elf_link_hash_table_create): Init.
9131 (func_desc_adjust): Set have_undefweak.
9132 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9133 add the .sfpr blr when have_undefweak.
9134 (ppc64_elf_setup_section_lists): Check hash table flavour.
9135 (ppc64_elf_next_input_section): Move output_section->owner test to
9137 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9138 and relocatable test. Return TOCstart and don't set elf_gp.
9139 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9140 offset calculation. Add assert on weak sym branch tweaks.
9141 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9142 (ppc64_elf_toc): Declare.
9143 (ppc64_elf_next_input_section): Update.
9145 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9147 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9150 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9152 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9153 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9154 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9155 call branches. Correct undefined weak destination.
9156 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9157 .sfpr, and correct case where either only savef* or restf* is
9160 Long branch stubs, multiple stub sections.
9161 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9162 (ppc64_elf_next_input_section): Declare.
9163 * elf64-ppc.c: Move linker-only prototypes.
9164 (STUB_SUFFIX): Define.
9165 (enum ppc_stub_type): New.
9166 (struct ppc_stub_hash_entry): New.
9167 (struct ppc_branch_hash_entry): New.
9168 (struct ppc_link_hash_entry): Add stub_cache, oh.
9169 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9170 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9171 Rename plt_overflow to stub_error.
9172 (ppc_stub_hash_lookup): Define.
9173 (ppc_branch_hash_lookup): Define.
9174 (stub_hash_newfunc): New function.
9175 (branch_hash_newfunc): New function.
9176 (link_hash_newfunc): Init new fields.
9177 (ppc64_elf_link_hash_table_create): Likewise.
9178 (ppc64_elf_link_hash_table_free): New function.
9179 (ppc_stub_name): New function.
9180 (ppc_get_stub_entry): New function.
9181 (ppc_add_stub): New function.
9182 (create_linkage_sections): Use bfd_make_section_anyway. Create
9183 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9184 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9185 and set up for plt call stubs. Link func and func desc syms.
9186 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9187 (func_desc_adjust): Avoid hash lookup when func desc sym available
9188 via shortcut, and set links when processing.
9189 (ppc64_elf_hide_symbol): Likewise.
9190 (allocate_dynrelocs): Don't allocate stub section here.
9191 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9193 (ppc_type_of_stub): New function.
9194 (build_one_stub): Delete.
9195 (ppc_build_one_stub): New function.
9196 (ppc_size_one_stub): New function.
9197 (ppc64_elf_setup_section_lists): New function.
9198 (ppc64_elf_next_input_section): New function.
9199 (group_sections): New function.
9200 (get_local_syms): New function.
9201 (ppc64_elf_size_stubs): Rewrite.
9202 (ppc64_elf_build_stubs): Rewrite.
9203 (ppc64_elf_relocate_section): Look up stub entry for REL24
9204 relocs. Don't propagate REL14* to dynamic objects. Look for long
9205 branch stubs if REL14* or REL24 relocs won't reach.
9206 (bfd_elf64_bfd_link_hash_table_free): Define.
9208 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9210 * config.bfd: Add support for powerpc-*-windiss.
9212 2002-04-30 Tom Rix <trix@redhat.com>
9214 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9215 symbol names into the hash table.
9217 2002-04-28 Tom Rix <trix@redhat.com>
9219 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9220 calulating relocations.
9221 (xcoff_complain_overflow) : Function table for relocation errors.
9222 (xcoff_ppc_relocate_section): Use relocation and complain function
9224 (xcoff_complain_overflow_unsigned_func): New complain function.
9225 (xcoff_complain_overflow_signed_func): Same.
9226 (xcoff_complain_overflow_bitfield_func): Same.
9227 (xcoff_complain_overflow_dont_func): Same.
9228 (xcoff_reloc_type_crel): New recot function.
9229 (xcoff_reloc_type_br): Same.
9230 (xcoff_reloc_type_ba): Same.
9231 (xcoff_reloc_type_toc): Same.
9232 (xcoff_reloc_type_rel): Same.
9233 (xcoff_reloc_type_neg): Same.
9234 (xcoff_reloc_type_pos): Same.
9235 (xcoff_reloc_type_fail): Same.
9236 (xcoff_reloc_type_noop): Same.
9237 * libxcoff.h : Declare common parts for xcoff64.
9238 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9239 and complain function tables.
9241 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9243 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9244 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9246 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9248 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9249 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9251 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9252 same as the output before calling elf_link_input_bfd.
9254 * coffcode.h (coff_compute_section_file_positions): Set
9255 section_tail after shuffling section list.
9257 2002-04-24 Christian Groessler <chris@groessler.org>
9259 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9260 addresses are 23bit with a special layout, not plain 32bit
9261 values. Prevent relocation of immediate values.
9263 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9265 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9266 MIPS-16 ASE flags are set, print something to indicate that.
9268 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9270 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9271 under which a plt call stub is used.
9272 (final_link_relocate): Similarly.
9273 (allocate_plt_static): Clear h-plabel except when plt entry is
9274 exclusively used for a plabel.
9275 (allocate_dynrelocs): Use the above to simplify plt sizing.
9276 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9277 (elf32_hppa_link_hash_table_create): Init.
9279 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9280 (elf32_hppa_check_relocs): Set has_22bit_branch.
9282 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9283 (final_link_relocate): Likewise.
9285 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9287 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9288 search table if some FDE is DW_EH_PE_aligned encoded either.
9289 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9291 2002-04-22 Richard Smith <richard@ex-parrot.com>
9292 Jakub Jelinek <jakub@redhat.com>
9294 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9295 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9296 encoded personality.
9297 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9298 for CIE/FDE removal.
9300 2002-04-20 Tom Rix <trix@redhat.com>
9302 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9304 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9306 * archures.c (bfd_lookup_arch): Move the list order comment..
9307 (struct bfd_arch_info): ..to where it belongs.
9308 * bfd-in2.h: Regenerate.
9310 * archures.c (bfd_lookup_arch): Add comment on list order.
9311 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9312 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9313 is always at head of list.
9315 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9317 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9318 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9319 definition of these functions for ARM_WINCE builds as they are
9321 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9322 for ARM_WINCE builds.
9324 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9326 * coff-arm.c (bfd_arm_process_before_allocation):
9328 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9330 * cpu-sh.c (scan_mach): Delete.
9331 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9332 (bfd_sh_arch): Likewise.
9334 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9336 * ihex.c (ihex_write_object_contents): Fix check for records
9337 crossing 64K boundaries.
9339 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9341 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9342 type rather than just assuming entries are ELF.
9343 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9344 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9345 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9346 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9347 rather than elf_link_hash_entry.
9349 2002-04-15 Richard Henderson <rth@redhat.com>
9351 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9354 2002-04-15 Michael Snyder <msnyder@redhat.com>
9356 * opncls.c (bfd_close): Write contents if writeable.
9357 Minor formatting tidy-ups.
9359 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9361 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9363 2002-04-12 Michael Snyder <msnyder@redhat.com>
9365 * bfd-in.h (bfd_get_section_lma): New access macro.
9366 Minor white-space fix-up.
9368 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9370 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9373 2002-04-09 DJ Delorie <dj@redhat.com>
9375 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9377 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9379 * coffcode.h (coff_read_word): New.
9380 (coff_compute_checksum): New.
9381 (coff_apply_checksum): New.
9382 (coff_write_object_contents): Call coff_apply_checksum () to
9383 apply checksum to PE image.
9385 2002-04-08 Randolph Chung <tausq@debian.org>
9387 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9388 (elf32_hppa_final_link): Split out sorting logic to..
9389 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9390 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9392 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9394 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9396 * configure: Re-generate.
9398 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9400 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9401 is greater or equal to 4.3.3.
9402 * configure: Regenerate.
9405 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9407 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9408 R_CRIS_32_PCREL>: Fix typo in name.
9409 (cris_elf_check_relocs): Always create .rela.got here when
9410 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9411 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9412 assume it's created.
9414 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9416 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9417 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9419 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9420 * bfd.c (bfd_link_hash_table_free): Define.
9421 * binary.c (binary_bfd_link_hash_table_free): Define.
9422 * bout.c (b_out_bfd_link_hash_table_free): Define.
9423 * coff-rs6000.c (rs6000coff_vec): Include
9424 _bfd_generic_link_hash_table_free.
9425 (pmac_xcoff_vec): Likewise.
9426 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9427 (aix5coff64_vec): Likewise.
9428 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9429 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9430 (bfd_elf32_bfd_link_hash_table_free): Define.
9431 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9432 (bfd_elf32_bfd_link_hash_table_free): Define.
9433 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9435 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9436 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9437 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9438 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9439 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9440 (_bfd_generic_link_hash_table_free): Add prototype.
9441 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9442 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9443 * linker.c (_bfd_generic_link_hash_table_free): New function.
9444 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9445 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9446 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9447 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9448 * som.c (som_bfd_link_hash_table_free): Define.
9449 * srec.c (srec_bfd_link_hash_table_free): Define.
9450 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9451 * versados.c (versados_bfd_link_hash_table_free): Define.
9452 * vms.c (vms_bfd_link_hash_table_free): New function.
9453 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9455 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9456 instead of bfd_alloc.
9457 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9458 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9459 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9460 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9461 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9462 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9463 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9464 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9465 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9466 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9467 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9468 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9469 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9470 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9471 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9472 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9473 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9474 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9475 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9476 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9477 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9478 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9479 * m68klinux.c (linux_link_hash_table_create): Likewise.
9480 * sparclinux.c (linux_link_hash_table_create): Likewise.
9481 * sunos.c (sunos_link_hash_table_create): Likewise.
9482 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9484 * targets.c: Add _bfd_link_hash_table_free to xvec.
9486 * bfd-in2.h: Regenerate.
9487 * libbfd.h: Regenerate.
9488 * libcoff.h: Regenerate.
9490 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9492 * dep-in.sed: Cope with absolute paths.
9493 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9495 * Makefile.in: Regenerate.
9496 * coff-arm.c: Fix copyright date.
9497 * cpu-h8300.c: Likewise.
9498 * cpu-i370.c: Likewise.
9499 * cpu-s390.c: Likewise.
9500 * cpu-mips.c: Likewise.
9501 * po/SRC-POTFILES.in: Regenerate.
9503 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9505 * Makefile.am: Add elfxx-mips.c to the known backends.
9506 (elf32-mips.lo): remove dependency to coff/external.h.
9507 * Makefile.in: Regenerate.
9508 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9509 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9511 * configure: Regenerate.
9512 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9513 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9514 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9515 MIPS specific backend functions.
9516 * elf32-mips.c: Moved most code to elfxx-mips.c.
9517 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9519 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9520 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9521 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9522 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9523 interface to allow selection of the right REL or RELA howto table.
9524 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9525 static. Let it refuse n32 objects.
9526 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9527 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9528 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9529 (elf32_mips_ignore_discarded_relocs): Rename from
9530 _bfd_elf32_mips_ignore_discarded_relocs.
9531 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9532 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9533 (elf_mips_howto_table_rela): Remove.
9534 * elf64-mips.c: Moved most code to elfxx-mips.c.
9535 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9536 (mips_elf64_rtype_to_howto): New function.
9537 (mips_elf64_object_p): Likewise.
9538 (elf64_mips_irix_compat): Likewise.
9539 * elfxx-mips.c: New file containing common code merged together from
9540 elf32-mips.c and elf64-mips.c.
9541 * elfxx-mips.h: New file containing MIPS specific prototypes from
9543 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9544 elf_backend_mips_rtype_to_howto.
9546 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9548 * srec.c (MAXCHUNK, Chunk): Revise comments.
9549 (srec_write_record): Correct buffer size.
9550 (srec_write_header): Do without intermediate buffer.
9551 (srec_write_section): Validate Chunk.
9552 (srec_write_terminator): Pass NULL instead of dummy buffer.
9553 (srec_write_symbols): Pass file and symbol names directly to
9554 bfd_bwrite so sprintf won't overflow buffer.
9556 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9558 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9559 PC relative relocs against hidden symbols.
9560 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9562 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9564 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9565 LMAs, loop over segments until p_vaddr and p_memsz specify an
9566 extent enclosing the section.
9568 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9570 * ihex.c (ihex_write_object_contents): Do not allow records to
9571 cross a 64K boundary - wrap if necessary.
9573 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9575 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9576 which caused the returned LWP ID to always be 0.
9578 2002-04-01 Richard Henderson <rth@redhat.com>
9580 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9581 (elf32_sparc_relocate_section): Use it to figure out when to
9582 initialize .got entries.
9583 * elf64-sparc.c: Similarly.
9585 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9587 * linker.c (link_action): Ignore duplicate warning syms.
9588 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9589 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9590 (elf_adjust_dynamic_symbol): Likewise.
9591 (elf_export_symbol): Likewise.
9592 (elf_link_find_version_dependencies): Likewise.
9593 (elf_link_assign_sym_version): Likewise.
9594 (elf_link_sec_merge_syms): Likewise.
9595 (elf_link_output_extsym): Likewise.
9596 (elf_gc_sweep_symbol): Likewise.
9597 (elf_gc_propagate_vtable_entries_used): Likewise.
9598 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9599 (elf_gc_allocate_got_offsets): Likewise.
9600 (elf_collect_hash_codes): Likewise.
9601 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9602 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9603 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9604 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9605 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9606 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9607 (elf_cris_discard_excess_dso_dynamics): Likewise.
9608 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9609 (mark_PIC_calls): Likewise.
9610 (allocate_plt_static): Likewise.
9611 (allocate_dynrelocs): Likewise.
9612 (readonly_dynrelocs): Likewise.
9613 * elf32-i386.c (allocate_dynrelocs): Likewise.
9614 (readonly_dynrelocs): Likewise.
9615 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9616 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9617 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9618 (mips_elf_sort_hash_table_f): Likewise.
9619 (mips_elf_check_mips16_stubs): Likewise.
9620 * elf32-s390.c (allocate_dynrelocs): Likewise.
9621 (readonly_dynrelocs): Likewise.
9622 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9623 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9624 (xstormy16_relax_plt_realloc): Likewise.
9625 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9626 (elf64_alpha_output_extsym): Likewise.
9627 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9628 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9629 (mips_elf64_check_mips16_stubs): Likewise.
9630 (mips_elf64_output_extsym): Likewise.
9631 * elf64-ppc.c (func_desc_adjust): Likewise.
9632 (allocate_dynrelocs): Likewise.
9633 (readonly_dynrelocs): Likewise.
9634 * elf64-s390.c (allocate_dynrelocs): Likewise.
9635 (readonly_dynrelocs): Likewise.
9636 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9637 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9638 (readonly_dynrelocs): Likewise.
9639 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9640 * aoutx.h (aout_link_write_other_symbol): Likewise.
9641 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9642 (_bfd_coff_write_global_sym): Likewise.
9643 * i386linux.c (linux_tally_symbols): Likewise.
9644 * m68klinux.c (linux_tally_symbols): Likewise.
9645 * sparclinux.c (linux_tally_symbols): Likewise.
9646 * pdp11.c (aout_link_write_other_symbol): Likewise.
9647 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9648 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9649 (xcoff_write_global_symbol): Likewise.
9651 * cofflink.c (_bfd_coff_final_link): Formatting.
9652 * cpu-mips.c (mips_compatible): Make static, prototype.
9653 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9654 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9655 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9656 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9657 (mips_elf64_final_link): Likewise.
9658 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9661 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9663 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9664 (SWAP_OUT_RELOC_OFFSET): Define.
9666 2002-03-27 Gregory Steuck <greg@nest.cx>
9668 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9669 terminating NULL if empty symbol table.
9670 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9672 2002-03-26 H.J. Lu (hjl@gnu.org)
9674 * elflink.h (elf_link_input_bfd): Revert the last change since
9675 the gcc exception handling isn't fixed yet.
9677 2002-03-26 H.J. Lu (hjl@gnu.org)
9679 * elflink.h (elf_link_input_bfd): Complain about relocations
9680 against local symbols in discarded sections.
9682 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9684 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9686 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9688 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9689 section file offset for !SEC_LOAD sections.
9691 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9693 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9694 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9696 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9698 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9700 * archive.c: Update copyright date.
9701 * bfd-in2.h: Regenerate.
9702 * libbfd.h: Regenerate.
9703 * Makefile.am: Run "make dep-am"
9704 * Makefile.in: Regenerate.
9705 * po/SRC-POTFILES.in: Regenerate.
9707 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9709 * dwarf2.c (struct funcinfo): Move up.
9710 (lookup_address_in_function_table): New argument function_ptr.
9712 (lookup_address_in_line_table): New argument function. If function
9713 is non-NULL, use it to handle ``addr'' before the first line note of
9715 (comp_unit_find_nearest_line): Update and swap calls to
9716 lookup_address_in_function_table and lookup_address_in_line_table.
9717 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9718 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9720 2002-03-20 Tom Rix <trix@redhat.com>
9722 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9723 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9724 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9726 2002-03-19 Tom Rix <trix@redhat.com>
9728 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9729 dynamic objects in archives.
9731 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9733 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9734 STT_NOTYPE symbols to STT_OBJECT.
9736 2002-03-18 Jan Hubicka <jh@suse.cz>
9738 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9740 2002-03-18 Tom Rix <trix@redhat.com>
9742 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9743 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9744 * coff-rs6000 (do_pad) : New function for archive padding.
9745 (do_copy) : New function for object file copying in archives.
9746 (do_shared_object_padding) : New function for padding shared
9747 objects to their text section alignment in archives.
9748 (bfd_xcoff_ar_achive_set_magic) : Stub.
9749 (xcoff_write_armap_big) : Use do_copy and do_pad.
9750 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9752 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9753 bfd_xcoff_magic_number.
9754 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9756 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9757 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9758 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9759 * rs6000-core.c : Update copyright date.
9760 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9762 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9763 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9764 (coff_set_flags) : Use bfd_xcoff_magic_number.
9765 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9766 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9767 * Makefile.am : Same.
9768 * config.bfd : Same.
9770 * configure : Regnerate.
9771 * Makefile.in : Same.
9774 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9776 * po/fr.po: Updated version.
9778 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9780 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9781 * libbfd.h: Regenerate.
9782 * archive.c (coff_write_armap): Pass on failures from
9783 bfd_write_bigendian_4byte_int.
9785 2002-03-14 H.J. Lu <hjl@gnu.org>
9787 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9788 error to bfd_error_nonrepresentable_section for reinit_array
9791 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9793 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9794 OR it in rather than replacing previously selected flags.
9796 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9797 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9799 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9801 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9803 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9804 ensure reloc size matches before calling elf_link_input_bfd.
9805 Add an assert to check reloc size when counting output relocs.
9807 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9809 * mmo.c (mmo_get_loc): Return NULL rather than false.
9811 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9813 * po/fr.po: Updated version.
9815 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9817 * archures.c (bfd_default_compatible): Test bits_per_word.
9818 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9819 bfd_default_compatible.
9820 * cpu-i370.c (i370_compatible): Likewise.
9821 * cpu-sparc.c (sparc_compatible): Likewise.
9822 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9824 * elflink.h: Formatting fixes.
9825 (elf_link_output_extsym): Merge undefined and undef weak cases.
9827 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9828 when word size of input matches output word size.
9830 2002-03-12 Andreas Jaeger <aj@suse.de>
9832 * cpu-i386.c (i386_compatible): New. Use it instead of
9833 bfd_default_compatible.
9835 2002-03-07 H.J. Lu (hjl@gnu.org)
9837 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9838 as the type for bfd_reloc_val.
9840 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9842 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9843 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9844 (elf_hppa_final_link_relocate): Correct relocations for indirect
9845 references to local data through the DLT. Fix .opd creation for
9846 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9847 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9848 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9849 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9850 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9851 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9852 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9854 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9856 * merge.c (_bfd_merge_sections): Don't segfault if there
9857 is nothing to merge due to GC.
9859 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9861 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9862 symbols that have been forced local.
9864 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9865 to output forced local syms for non-shared link.
9866 (elf_link_output_extsym): Tweak condition for calling backend
9867 adjust_dynamic_symbol so that previous behaviour is kept.
9868 Whitespace changes throughout file.
9870 2002-03-04 H.J. Lu <hjl@gnu.org>
9872 * elf.c (bfd_section_from_shdr): Handle special sections,
9873 .init_array, .fini_array and .preinit_array.
9874 (elf_fake_sections): Likewise.
9876 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9877 DT entry only if the section is in output for .init_array,
9878 .fini_array and .preinit_array. Complain about .preinit_array
9880 (elf_bfd_final_link): Warn zero size for .init_array,
9881 .fini_array and .preinit_array sections.
9883 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9884 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9885 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9888 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9890 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9891 * configure: Regenerate.
9893 2002-03-02 Tom Rix <trix@redhat.com>
9895 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9897 * coff-rs6000.c (xcoff_howto_table): Same.
9899 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9901 * elflink.h (size_dynamic_sections): If section named
9902 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9903 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9904 ".init_array" and ".fini_array".
9905 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9906 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9909 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9911 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9914 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9916 * elf64-hppa.h: Update copyright date.
9918 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9919 (ppc64_elf_relocate_section): Don't generate power4 style branch
9920 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9922 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9924 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9926 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9928 2002-02-21 Andreas Jaeger <aj@suse.de>
9930 * elf64-x86-64.c: Major rework that introduces all recent changes
9931 to the x86-64 backend. Get a closer match to elf32-i386.
9932 (struct elf64_x86_64_dyn_relocs): Rename from
9933 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9935 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9937 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9938 remove casts, initialize new hash members.
9939 (create_got_section): New.
9940 (elf64_x86_64_create_dynamic_sections): New.
9941 (elf64_x86_64_copy_indirect_symbol): New.
9942 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9943 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9944 Reference count possible .plt and .got entries. Don't test input
9945 section SEC_READONLY here to try to avoid copy relocs, and keep
9946 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9947 DF_TEXTREL here. Delay setting of variables until needed. Cache
9948 pointer to "sreloc" section in elf_section_data. Tweak condition
9949 under which .got created. Report files with bad relocation
9951 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9952 Reference count possible .plt entries. Don't deallocate .got and
9954 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9955 do copy reloc processing for weakdefs. Remove redundant casts and
9956 aborts. Delay setting of vars until needed. Move creation of
9957 dynamic symbols and allocation of .plt and .rela.plt to
9958 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9959 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9960 (allocate_dynrelocs): New.
9961 (readonly_dynrelocs): New.
9962 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9963 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9964 Zero out the dynamic allocated content space.
9965 (elf64_x86_64_discard_copies): Removed.
9966 (elf64_x86_64_relocate_section): Make use of dynamic section
9967 short-cuts. Localise vars, and delay setting. Better error
9968 reporting, replace BFD_ASSERT with abort. Check
9969 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9970 regular object file and tread the weak definition as the normal
9971 one. Don't discard relocs for undefweak or undefined symbols and
9972 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9974 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9975 symbols that have been forced local. Use same test to decide if
9976 we can use a relative reloc for got as relocate_section. Expand
9977 SHN_UNDEF comment. Move expressions out of function calls.
9978 Replace BFD_ASSERT with abort.
9979 (bfd_elf64_bfd_final_link): Removed.
9980 (elf_backend_copy_indirect_symbol): Define.
9982 2002-02-20 Tom Rix <trix@redhat.com>
9984 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9985 (_bfd_xcoff_reloc_type_lookup): Use it.
9986 * coff64-rs6000.c (xcoff64_howto_table): Same.
9987 (xcoff64_reloc_type_lookup): Same.
9989 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9991 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9994 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9996 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9997 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9998 * bfd-in2.h: Regenerate.
9999 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
10000 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
10001 with "s390:64-bit".
10002 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
10003 (elf_s390_reloc_type_lookup): Likewise.
10004 (elf_s390_check_relocs): Likewise.
10005 (elf_s390_gc_sweep_hook): Likewise.
10006 (elf_s390_relocate_section): Likewise.
10007 (elf_s390_object_p): Use renamed architecture define.
10008 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
10010 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
10012 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
10014 2002-02-19 Jakub Jelinek <jakub@redhat.com>
10016 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
10017 absptr -> pcrel optimization for shared libs.
10018 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10019 library cannot be converted to pcrel.
10020 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10022 * elf32-i386.c (elf_i386_relocate_section): If
10023 _bfd_elf_section_offset returned -2, skip, but make sure the
10024 relocation is installed.
10025 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10026 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10027 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10028 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10029 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10030 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10031 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10032 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10033 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10034 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10035 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10036 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10037 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10038 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10039 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10040 _bfd_elf_section_offset returning -2 the same way as -1.
10041 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10042 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10044 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10046 2002-02-18 Tom Rix <trix@redhat.com>
10048 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10049 (bfd_xcoff_size_dynamic_sections): Same.
10050 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10051 (bfd_xcoff_size_dynamic_sections): Same.
10052 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10053 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10054 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10055 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10056 * bfd-in2.h: Regenerate.
10058 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10060 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10061 (struct ppc_link_hash_table): Add sfpr.
10062 (ppc64_elf_link_hash_table_create): Init it.
10063 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10065 (create_linkage_sections): ..here. Make .sfpr too.
10066 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10068 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10069 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10070 ._restf* functions, and create as needed.
10071 (func_desc_adjust): Only force_local for shared libs.
10073 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10075 * configure.in: Bump version number post 2.12 branching.
10076 * configure: Regenerate.
10078 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10080 * mmo.c: Correct and improve comments.
10081 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10082 zero-pad. Use input to fill up non-empty bfd buffer.
10083 (mmo_flush_chunk): New function.
10084 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10085 changed. Don't emit location specifier if VMA is same as
10086 *LAST_VMAP after omitting leading zero contents. Call
10087 mmo_flush_chunk before emitting location specifier.
10088 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10089 with mmo_write_loc_chunk calls.
10090 (mmo_internal_write_section): Call mmo_flush_chunk after
10092 (mmo_write_symbols_and_terminator): Move :Main to first position
10093 in symbol array. Add faked one if it does not exist if there are
10094 other symbols. Don't add it if there are no symbols at all. Move
10095 out test for value of :Main from symbol loop. Rename table
10096 fakemain to maintable and variable mainsym to fakemain.
10098 2002-02-15 Richard Henderson <rth@redhat.com>
10100 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10101 section with no got matches any got. Simplify error generaion.
10103 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10105 Support arbitrary length fill patterns.
10106 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10107 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10108 Call default_data_link_order.
10109 (default_fill_link_order): Delete.
10110 (default_data_link_order): New function.
10111 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10112 of bfd_fill_link_order with bfd_data_link_order.
10113 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10114 * elf64-mips.c (mips_elf64_final_link): Likewise.
10116 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10117 Correct value returned in "end" for "0x<non-hex>".
10119 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10121 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10122 (scan): Test against 'mach' field in info structure.
10124 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10126 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10128 2002-02-14 Matt Fredette <fredette@netbsd.org>
10130 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10133 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10135 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10136 non-zero physical addresses when adjusting the LMAs of new
10139 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10141 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10142 from _bfd_elf_hppa_gen_reloc_type.
10143 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10144 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10145 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10146 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10148 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10150 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10151 loading its contents if there's nothing to do in it.
10153 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10155 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10158 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10159 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10160 (ppc64_elf_finish_dynamic_sections): Set values for them.
10162 2002-02-11 Michael Snyder <msnyder@redhat.com>
10164 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10165 * elf.c (elfcore_grok_pstatus): Add prototype.
10166 (elfcore_grok_lwpstatus): Add prototype.
10167 (elfcore_write_lwpstatus): New function.
10168 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10170 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10172 * elf32-sh.c: Added missing prototypes.
10173 * elf32-sh64.c: Likewise.
10174 (sh_elf_align_loads): Mark unused args as such.
10175 * elf64-sh64.c: Added missing prototypes.
10176 (struct elf_sh64_link_hash_entry): Fix typo.
10177 (sh_elf64_relocate_section): Fix info argument passed to
10178 _bfd_elf_section_offset.
10180 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10182 * Makefile.am: "make dep-am".
10183 * Makefile.in: Regenerate.
10184 * aclocal.m4: Regenerate.
10185 * config.in: Regenerate.
10186 * configure: Regenerate.
10188 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10190 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10192 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10193 comparison warning.
10194 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10195 cast warnings for the common case.
10197 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10199 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10201 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10204 2002-02-09 Richard Henderson <rth@redhat.com>
10206 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10207 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10208 (elf64_alpha_relocate_section): Likewise.
10209 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10210 * bfd-in2.h, libbfd.h: Rebuild.
10212 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10214 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10215 that base-plus-offset reloc accounting is consistent.
10216 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10217 up to date for undefined symbols.
10219 2002-02-08 Eric Christopher <echristo@redhat.com>
10221 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10223 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10224 sections for the O32 ABI.
10226 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10228 * elf32-arm.h: Fix formatting of _("...").
10229 * elf32-d10v.c: Likewise.
10230 * elf32-m68k.c: Likewise.
10231 * elf32-mips.c: Likewise.
10233 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10235 * coff-or32.c: Fix compile time warning messages.
10237 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10239 Contribute sh64-elf.
10240 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10241 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10242 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10243 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10244 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10245 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10246 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10247 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10248 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10249 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10251 * libbfd.h, bfd-in2.h: Rebuilt.
10252 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10253 (sh_reloc_map): Map them.
10254 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10255 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10256 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10257 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10258 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10259 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10260 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10261 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10262 datalabel_got_offset.
10263 (sh_elf_link_hash_newfunc): Initialize it.
10264 (sh_elf_relocate_section): Augment the scope of
10265 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10266 GOT and GOTOFF handling to new SHmedia relocation types. Support
10268 (sh_elf_check_relocs): Likewise.
10269 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10270 PLT entries using movi_shori_putval. Support GOT_BIAS.
10271 (sh_elf_finish_dynamic_sections): Likewise.
10272 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10273 relocation, it's now done by the caller.
10275 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10276 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10277 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10278 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10279 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10280 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10281 sh64_elf64_hash_table): New.
10282 (sh_elf64_howto_table): Introduce new relocs.
10283 (sh_elf64_info_to_howto): Accept new PIC relocs.
10284 (sh_elf64_relocate_section): Augment the scope of
10285 seen_stt_datalabel. Support new PIC relocs.
10286 (sh_elf64_check_relocs): Support new PIC relocs.
10287 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10288 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10289 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10290 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10291 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10292 movi_shori_putval, movi_3shori_putval,
10293 sh64_elf64_create_dynamic_sections,
10294 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10295 sh64_elf64_size_dynamic_sections,
10296 sh64_elf64_finish_dynamic_symbol,
10297 sh64_elf64_finish_dynamic_sections): New.
10298 (elf_backend_create_dynamic-sections,
10299 bfd_elf64_bfd_link_hash_table_create,
10300 elf_backend_adjust_dynamic_symbol,
10301 elf_backend_size_dynamic_sections,
10302 elf_backend_finish_dynamic_symbol,
10303 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10304 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10305 elf_backend_got_header_size, elf_backend_plt_header_size):
10307 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10308 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10309 match official numbers and names; moved unmaching ones to the
10311 * elf32-sh64.c, elf64-sh64.c: Likewise.
10312 2001-03-12 DJ Delorie <dj@redhat.com>
10313 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10315 2001-03-12 DJ Delorie <dj@redhat.com>
10316 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10318 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10319 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10320 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10321 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10322 .cranges section with SEC_SORT_ENTRIES set.
10323 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10324 incoming sorted .cranges section.
10325 (sh64_bfd_elf_copy_private_section_data): New.
10326 (sh64_elf_final_write_processing): Only sort .cranges and modify
10327 start address if called by linker.
10328 2001-01-08 Ben Elliston <bje@redhat.com>
10329 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10330 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10331 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10332 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10333 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10334 line. Add comments before all entries.
10335 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10337 (sh_elf64_reloc): Correct head comment.
10338 (sh_elf64_relocate_section): Correct spacing.
10339 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10340 instead call reloc_dangerous callback.
10341 <case R_SH_SHMEDIA_CODE>: New case.
10342 (sh_elf64_gc_mark_hook): Correct spacing.
10343 (sh_elf64_check_relocs): Ditto.
10344 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10346 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10348 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10349 clarify describing comment. Add comments before all entries.
10350 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10351 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10352 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10353 Sort .cranges section in final link. Prepare to set bit 0 on
10355 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10356 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10357 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10359 (sh64_backend_section_from_shdr): New, to recognize
10360 SHT_SH5_CR_SORTED on incoming .cranges section.
10361 (elf_backend_section_from_shdr): Define.
10362 (sh64_elf_final_write_processing): Sort outgoing .cranges
10363 section. (New, temporarily disabled:) Set bit 0 on entry address
10364 according to ISA type.
10365 (sh64_find_section_for_address): New.
10366 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10367 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10368 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10369 bfd_malloc, not xmalloc.
10370 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10372 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10373 temporarily disabled) setting bit 0 on entry address.
10374 (elf_backend_final_write_processing): Define.
10375 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10376 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10377 be a proper relocation for PTA and PTB rather than a marker.
10378 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10379 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10380 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10381 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10382 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10384 * elf64-sh64.c: Ditto.
10385 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10386 * elf32-sh64.c: Include opcodes/sh64-opc.h
10387 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10388 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10389 parameters. No unused parameters. Caller changed.
10390 <case R_SH_PT_16>: New case.
10391 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10392 * Makefile.in: Regenerate.
10393 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10394 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10396 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10397 (sh64_elf_merge_private_data): Ditto.
10398 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10399 to access stored section flags.
10400 (sh64_elf_final_write_processing): Return immediately unless
10401 called by linker. Use sh64_elf_section_data (cranges) to get size
10402 of linker-generated cranges entries.
10403 (sh64_elf_copy_private_data): Add missing "return true".
10404 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10405 (sh_elf64_merge_private_data): Ditto.
10406 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10407 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10408 elf64-sh64.c:sh64_elf_fake_sections.
10409 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10410 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10411 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10412 (sh64_elf_final_write_processing): New.
10413 (elf_backend_final_write_processing): Define.
10414 (sh64_elf_fake_sections): Get header flags from tdata field.
10415 (sh64_elf_copy_private_data): Do not call
10416 sh64_elf_copy_private_data_internal, just copy e_flags field.
10417 (sh64_elf_merge_private_data): Do not call
10418 sh64_elf_copy_private_data_internal.
10419 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10420 Remove EF_SH64_ABI64, let ELF size make difference.
10421 Remove SH64-specific BFD section flag.
10422 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10423 containing SHmedia through elf_section_data (asect)->tdata
10424 non-zero, not using a BFD section flag.
10425 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10426 (sh64_elf_merge_private_data): Similar.
10427 (elf_backend_section_flags): Don't define.
10428 (sh64_elf_backend_section_flags): Delete.
10429 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10431 (sh_elf64_merge_private_data): Similar.
10432 * section.c (Section flags definitions): Don't define
10433 SEC_SH_ISA_SHMEDIA.
10434 (bfd-in2.h): Regenerate.
10435 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10436 Make DataLabel references work with partial linking.
10437 * elf32-sh64.c: Fix formatting.
10438 (sh64_elf_link_output_symbol_hook): New.
10439 (elf_backend_link_output_symbol_hook): Define to
10440 sh64_elf_link_output_symbol_hook.
10441 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10442 undefined if partial linking. Adjust sanity check.
10443 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10444 (elf_backend_link_output_symbol_hook): Define to
10445 sh64_elf64_link_output_symbol_hook.
10446 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10447 undefined if partial linking. Adjust sanity check.
10448 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10449 Implement semantics for inter-file DataLabel references.
10450 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10451 (sh64_elf64_add_symbol_hook): New.
10452 (sh_elf64_relocate_section): If passing an indirect symbol with
10453 st_type STT_DATALABEL on the way to a symbol with st_other
10454 STO_SH5_ISA32, do not bitor 1 to the relocation.
10455 (elf_backend_add_symbol_hook): Define to
10456 sh64_elf64_add_symbol_hook.
10457 * elf64-sh32.c: Tweak comments.
10458 (DATALABEL_SUFFIX): Define.
10459 (sh64_elf_add_symbol_hook): New.
10460 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10461 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10462 symbol with st_type STT_DATALABEL on the way to a symbol with
10463 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10464 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10465 Pass through STT_DATALABEL.
10466 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10467 (elf_backend_get_symbol_type): Define.
10468 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10469 (elf_backend_get_symbol_type): Define.
10470 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10471 * elf32-sh64.c: Tweak comments.
10472 (sh64_elf_copy_private_data_internal): Add prototype.
10473 (bfd_elf32_bfd_set_private_flags): Define.
10474 (sh64_elf_copy_private_data_internal): Compare machine name, not
10475 textual BFD target name, to check whether to copy section flag
10477 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10478 Tweak section-contents-type-mismatch message.
10479 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10480 Validize reloc-types.
10481 * elf64-sh64.c: New file.
10482 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10483 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10484 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10485 Regenerate dependencies.
10486 * Makefile.in: Regenerate.
10487 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10488 bfd_elf64_sh64l_vec.
10489 * configure.in: Handle bfd_elf64_sh64_vec and
10490 bfd_elf64_sh64l_vec.
10491 * configure: Regenerate.
10492 * po/POTFILES.in: Regenerate.
10493 * po/bfd.pot: Regenerate.
10494 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10495 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10496 anything else but EF_SH64 and EF_SH64_ABI64.
10497 (sh64_elf_merge_private_data): Emit error for anything else but
10498 EF_SH64 and EF_SH64_ABI64.
10499 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10501 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10502 bfd_elf32_sh64l_vec as a temporary measure.
10503 * configure: Regenerate.
10504 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10505 * cpu-sh.c (arch_info_struct): Include sh5 item
10507 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10508 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10509 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10510 * elf32-sh64.c: Tweak comments.
10511 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10512 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10513 (sh64_elf_copy_private_data_internal): Wrap long line.
10514 (sh64_elf_merge_private_data): Rewrite to allow objects from
10515 SH64 subsets to be linked together.
10516 (INCLUDE_SHMEDIA): Define.
10517 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10518 Parenthesize plus-expression inside or-expression.
10519 <global symbol>: Ditto.
10520 (sh_elf_set_mach_from_flags): Remove code refusing
10521 deleted EF_SH64_32BIT_ABI flag.
10522 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10523 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10524 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10525 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10526 (sh_elf_relocate_section) <local symbol>: Or 1 in
10527 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10528 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10529 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10531 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10532 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10533 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10534 Regenerate dependencies.
10535 * Makefile.in: Regenerate.
10536 * archures.c: Add bfd_mach_sh5.
10537 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10538 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10539 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10540 * configure: Regenerate.
10541 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10542 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10543 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10544 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10545 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10546 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10547 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10548 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10549 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10550 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10552 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10553 for SHmedia relocs.
10554 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10555 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10556 shmedia_prepare_reloc, goto final_link_relocate if it returns
10557 non-zero, else fail as before.
10558 (sh_elf_set_mach_from_flags): Provide function only if not defined
10559 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10560 (sh_elf_set_private_flags): Provide function only if not defined
10562 (sh_elf_copy_private_data): Similar.
10563 (sh_elf_merge_private_data): Similar.
10564 * section.c (SEC_SH_ISA_SHMEDIA): New.
10565 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10566 * elf32-sh64.c: New file.
10567 * libbfd.h: Regenerate.
10568 * bfd-in2.h: Regenerate.
10569 * po/POTFILES.in: Regenerate.
10570 * po/bfd.pot: Regenerate.
10571 * bfd-in2.h: Regenerate.
10572 * libbfd.h: Regenerate.
10574 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10576 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10577 been included, not drag it in.
10578 * bfd-in2.h: Regenerate.
10580 2002-02-06 H.J. Lu (hjl@gnu.org)
10582 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10583 the mach and ISA fields if necessary.
10585 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10587 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10588 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10589 be sure exactly which architecture this represents.
10591 2002-02-05 Nick Clifton <nickc@redhat.com>
10593 * po/tr.po: Updated translation.
10595 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10597 From Jimi X <jimix@watson.ibm.com>
10598 * archures (bfd_mach_ppc64): Define.
10599 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10600 (bfd_powerpc_arch): Define.
10601 * bfd-in2.h: Regenerate.
10602 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10603 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10604 (bfd_powerpc_archs): Add default powerpc64 arch.
10606 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10608 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10609 against section syms in readonly sections. Don't do the global
10610 sym check if we find one.
10611 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10612 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10613 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10614 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10615 (elf_s390_grok_prstatus): Add missing prototype.
10617 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10619 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10620 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10621 Call bfd_get_section_by_name only once. Initialize
10622 bpodata->n_bpo_relocs_this_section.
10623 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10625 (bpo_reloc_request_sort_fn): Don't use difference of values as
10628 2002-02-02 David O'Brien <obrien@FreeBSD>
10630 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10631 version 4.5 and later the same as 5-CURRENT.
10632 * configure: Re-generate.
10634 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10636 * config.bfd (hppa*-*-netbsd*): New target.
10638 2002-01-31 Philipp Thomas <pthomas@suse.de>
10640 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10641 to front of message. Unify messages with elf32-arm.h. Use
10642 commas where neccessary.
10643 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10644 ERROR in messages. Unify messages with coff-arm.c. Correct
10645 VFP/FPA error message.
10646 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10647 APCS-32 for translation.
10649 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10651 Perform on-demand global register allocation from
10652 R_MMIX_BASE_PLUS_OFFSET relocs.
10653 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10654 bpo_reloc_request, struct bpo_greg_section_info): New.
10655 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10656 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10657 _bfd_mmix_check_all_relocs,
10658 _bfd_mmix_prepare_linker_allocated_gregs,
10659 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10660 (elf_mmix_howto_table): Correct src_mask for most relocs.
10661 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10663 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10664 case. Fix typo in comment. New label do_mmix_reloc.
10665 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10666 store first object file with a base-plus-offset reloc. Call
10667 mmix_elf_check_common_relocs for the part common with mmo.
10668 (mmix_elf_final_link): Write out linker-allocated register
10670 (elf_backend_gc_sweep_hook): Define.
10671 (bfd_elf64_bfd_relax_section): Define.
10673 * mmo.c: Don't include <ctype.h>
10674 (mmo_init): Correct init-once logic.
10676 2002-02-01 Tom Rix <trix@redhat.com>
10678 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10680 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10682 * Makefile.am: Run "make dep-am"
10683 * Makefile.in: Regenerate.
10685 2002-01-31 David O'Brien <obrien@FreeBSD>
10687 * configure.in: Recognize the differences in core files from FreeBSD
10688 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10690 * configure: Regenerate.
10692 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10694 * coff-or32.c: New file.
10695 * cpu-or32.c: New file.
10696 * elf32-or32.c: New file.
10697 * archures.c: Add support for or32.
10698 * targets.c: Add support for or32.
10699 * bfd-in2.h: Regenerate.
10700 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10701 coff_write_object_contents): Add support for or32.
10702 * config.bfd: Add target.
10703 * configure.in: Add support for or32.
10704 * configure: Regenerate.
10705 * Makefile.am: Add support for or32.
10706 * Makefile.in: Regenerate.
10707 * po/SRC-POTFILES.in: Add or32 files.
10708 * po/bfd.pot: Regenerate.
10710 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10711 Don Lindsay <lindsayd@cisco.com>
10713 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10714 false' with a return of a bfd_reloc_ error code.
10716 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10718 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10719 unexport unreferenced symbols when --export-dynamic. Call
10720 _bfd_elf_strtab_delref when unexporting.
10722 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10724 * bfd-in.h: Include <stdbool.h> if it is available.
10725 * bfd-in2.h: Regenerated.
10727 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10729 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10730 not go via the plt.
10732 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10734 * archures.c: Tidy up formatting of embedded comments.
10735 * bfd.c: Tidy up formatting of embedded comments.
10736 * bfd-in.h: Fix formatting of comments.
10737 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10738 * section.c: Tidy up formatting of embedded comments.
10739 * syms.c: Tidy up formatting of embedded comments.
10740 * targets.c: Tidy up formatting of embedded comments.
10742 * bfd-in2.h: Regenerate.
10744 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10746 * vms-tir.c (cmd_name): New function.
10747 (tir_cmd_name): New function.
10748 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10749 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10752 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10754 (pe_print_pdata): Rearrange message to aid in translation.
10756 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10759 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10761 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10763 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10764 message to aid in translation.
10766 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10767 to aid in translation.
10769 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10771 2002-01-30 Philipp Thomas <pthomas@suse.de>
10773 * coff-arm.c, elf32-elf.h: Unify messages.
10775 2002-01-30 Nick Clifton <nickc@redhat.com>
10777 * po/sv.po: Updated translation.
10779 2002-01-30 Philipp Thomas <pthomas@suse.de>
10781 * dwarf2.c (read_abbrev): Use full section name in error message.
10782 (decode_line_info): Likewise.
10784 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10787 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10789 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10790 descriptor symbols for undefined function code syms. Clear
10791 ELF_LINK_NON_ELF so that they can stay weak.
10793 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10794 Mitch Lichtenberg <mpl@broadcom.com>
10796 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10797 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10798 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10800 * bfd-in2.h: Regenerate.
10802 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10804 * elf32-mips.c: Add additional comments about HI16 relocation
10806 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10807 pc-relative relocations. (Reverts change made on 2001-10-31.)
10808 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10809 for pc-relative relocations.
10810 (mips_elf_calculate_relocation): Add a comment about a kludge
10811 in the R_MIPS_GNU_REL_HI16 handling.
10812 (_bfd_mips_elf_relocate_section): Implement that kludge;
10813 adjust pc-relative HI16 relocation for difference in HI16 and
10814 LO16 addresses, since it can't easily be done in
10815 mips_elf_calculate_relocation.
10817 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10819 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10820 relocations with PC32 relocations for undefined or weak symbols.
10821 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10822 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10824 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10826 * elfcore.h (elf_core_file_p): Improve comment for last change.
10828 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10830 * configure: Regenerated.
10832 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10834 * elfcore.h (elf_core_file_p): Set the machine architecture
10835 before processing the program headers.
10837 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10839 * configure.in <64-bit configuration>: If using gcc, check and
10840 emit error for egcs-1.1.2.
10841 * configure: Regenerate.
10843 2002-01-26 Egor Duda <deo@logos-m.ru>
10845 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10846 as possible to avoid stack corruption.
10848 2002-01-26 Richard Henderson <rth@redhat.com>
10850 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10851 for non-allocated sections.
10853 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10855 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10856 prstat.pr_reg even if it is a struct.
10858 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10860 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10862 2002-01-25 Philipp Thomas <pthomas@suse.de>
10864 * coffgen.c (coff_print_symbol): Don't mark info message
10867 2002-01-25 Nick Clifton <nickc@redhat.com>
10869 * po/fr.po: Updated translation.
10870 * po/es.po: Updated translation.
10872 2002-01-25 Philipp Thomas <pthomas@suse.de>
10874 * coff-alpha.c (alpha_relocate_section): Unify warning message
10875 for GP relative relocations without GP defined.
10876 * coff-mips.c (mips_relocate_section): Likewise.
10878 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10880 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10881 unsigned overflow when new_offset < old_offset.
10883 2002-01-24 Philipp Thomas <pthomas@suse.de>
10885 * bfd.c (_bfd_abort): Fix typo.
10887 2002-01-23 Richard Henderson <rth@redhat.com>
10889 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10890 plt entries for undefweak symbols.
10892 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10894 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10895 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10896 (bfd_elf32_h8300_vec): Ditto.
10898 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10900 * elf64-ppc.c: Remove stale part of ABI comment.
10901 (NO_OPD_RELOCS): Define.
10902 (ppc64_elf_check_relocs): Use it.
10903 (ppc64_elf_relocate_section): Here too.
10904 (build_one_stub): Don't point function syms at the stub. Instead,
10906 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10907 really go to the stub. Make all dynamic relocs in opd against
10909 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10912 2002-01-22 Richard Henderson <rth@redhat.com>
10914 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10916 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10918 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10919 TOC_BASE_OFF adjustment.
10921 * Makefile.am: Run "make dep-am".
10922 * Makefile.in: Regenerate.
10923 * po/SRC-POTFILES.in: Regenerate.
10925 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10927 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10930 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10932 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10933 Check for and emit error if sgot is NULL at this point.
10935 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10937 * config.bfd (ia64*-*-netbsd*): New target.
10939 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10941 * som.c (som_write_space_strings): Comment typo fix.
10943 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10945 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10946 is_func_descriptor fields.
10947 (link_hash_newfunc): Init them.
10948 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10949 dot are candidates for plt entries. When processing .opd relocs,
10950 set function descriptor strings to point inside function code
10951 string, and set new ppc_link_hash_entry fields.
10952 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10953 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10954 function descriptors. It's now done in..
10955 (func_desc_adjust): New.
10956 (ppc64_elf_func_desc_adjust): New.
10957 (define elf_backend_always_size_sections): Define.
10958 (ppc64_elf_hide_symbol): New.
10959 (define elf_backend_hide_symbol): Define.
10960 (allocate_dynrelocs): Remove code looking up function descriptors
10961 as that has been done earlier.
10962 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10964 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10965 up function descriptor.
10966 (build_one_stub): Look up the function code sym. Check for
10967 invalid plt offsets.
10968 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10969 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10971 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10973 (_bfd_elf_link_hash_hide_symbol): Likewise.
10974 * elflink.h (elf_link_add_object_symbols): Adjust call to
10975 elf_backend_hide_symbol.
10976 (elf_fix_symbol_flags): Likewise.
10977 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10979 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10980 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10981 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10982 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10983 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10984 and adjust to suit.
10985 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10986 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10987 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10989 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10991 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10992 dynamic function descriptor symbol, not the associated function
10995 2002-01-17 Eric Christopher <echristo@redhat.com>
10997 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10999 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
11001 * po/bfd.pot: Regenerate.
11002 * po/fr.po: Regenerate.
11004 2002-01-17 Alan Modra <amodra@bigpond.net.au>
11006 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
11007 Remove "Elf_Internal_Shdr *" param.
11008 (_bfd_mips_elf_section_from_bfd_section): Ditto.
11009 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
11010 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
11011 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
11012 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
11013 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
11014 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
11015 function to override special sections. Remove hdr arg from
11016 backend call, and don't loop.
11018 2002-01-16 Eric Christopher <echristo@redhat.com>
11020 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11021 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11022 relocations requiring gp0 and gp.
11024 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11026 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11028 (elf32_arm_print_private_bfd_data): Likewise.
11030 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11032 * po/tr.po: Import new version.
11034 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11036 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11037 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11038 (ORI_R0_R0_0): Correct.
11040 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11042 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11043 when plt_not_loaded.
11044 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11045 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11046 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11047 (ppc64_elf_glink_code): Delete.
11048 (PPC64_ELF_GLINK_SIZE): Delete.
11049 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11050 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11051 ORI_R0_R0_0): Define.
11052 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11053 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11054 (ppc64_elf_link_hash_table_create): Init them.
11055 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11056 Don't copy to shared lib.
11057 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11058 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11059 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11060 room for .stub and .glink code.
11061 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11063 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11064 bfd_elf64_bfd_final_link.
11065 (bfd_elf64_bfd_final_link): Don't define.
11066 (ppc64_elf_size_stubs): New.
11067 (build_plt_stub): New.
11068 (build_one_stub): New.
11069 (ppc64_elf_build_stubs): New.
11070 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11071 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11072 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11073 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11074 case output sections not separate. Adjust DT_RELASZ to not
11075 include plt relocs. Set reserved got entry. Set got and plt
11077 (elf_backend_got_header_size): Set to 8.
11078 * elf64-ppc.h: New file.
11080 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11082 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11083 sections, use bfd_section_list_remove.
11084 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11085 * elflink.h (elf_link_add_object_symbols): When removing all
11086 sections, use bfd_section_list_clear.
11088 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11090 * po/sv.po: New file: Swedish translation.
11091 * configure.in (ALL_LINGUAS): Add sv.
11092 * configure: Regenerate.
11094 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11096 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11097 * elf.c (merge_sections_remove_hook): New function.
11098 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11099 _bfd_merge_sections.
11100 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11101 * libbfd.h: Rebuilt.
11102 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11103 Call remove_hook if a SEC_EXCLUDE section is encountered.
11105 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11107 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11108 (xstormy16_reloc_map): Initialise new field with correct howto
11110 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11113 2002-01-10 Michael Snyder <msnyder@redhat.com>
11115 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11116 (elfcore_write_pstatus): Use long instead of pid_t;
11117 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11119 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11121 * elf.c: Update copyright years.
11122 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11123 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11125 2002-01-08 Michael Snyder <msnyder@redhat.com>
11127 Add capability to write corefile note sections, for gdb.
11128 * elf.c (elfcore_write_note): New function.
11129 (elfcore_write_prpsinfo): New function.
11130 (elfcore_write_prstatus): New function.
11131 (elfcore_write_pstatus): New function.
11132 (elfcore_write_prfpreg): New function.
11133 (elfcore_write_prxfpreg): New function.
11134 * elf-bfd.h: Add prototypes for above functions.
11136 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11138 * elf.c (elf_fake_sections): Propagate errors from
11139 elf_backend_fake_section.
11141 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11143 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11144 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11145 (elf32-sh-nbsd.lo): New rule.
11146 * Makefile.in: Regenerate.
11147 * config.bfd (sh*le-*-netbsdelf*): New target.
11148 (sh*-*-netbsdelf*): New target.
11149 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11150 (bfd_elf32_shnbsd_vec): New vector.
11151 (bfd_elf32_shlnbsd_vec): New vector.
11152 * configure: Regenerate.
11153 * elf32-sh-nbsd.c: New file.
11154 * targets.c: Update copyright years.
11155 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11156 bfd_elf32_shnbsd_vec.
11158 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11160 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11162 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11164 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11165 of a symbol in a section that will be deleted.
11167 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11169 * po/es.po: New file: Spanish translation.
11170 * configure.in (ALL_LINGUAS): Add es.
11171 * configure: Regenerate.
11173 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11175 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11176 argument so we can handle HP-UX specially.
11177 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11178 (elfNN_hpux_backend_section_from_bfd_section): New for support
11179 of SHN_IA_64_ANSI_COMMON.
11180 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11181 (is_unwind_section_name): Add special HP-UX support.
11182 (elfNN_ia64_section_from_shdr): Add support for more sections.
11183 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11184 add support for more sections.
11185 (elfNN_ia64_additional_program_headers): Modify
11186 is_unwind_section_name call.
11187 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11188 only one unwind section in segment.
11190 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11192 * syms.c (_bfd_generic_make_empty_symbol): New function.
11193 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11194 _bfd_generic_make_empty_symbol.
11195 * libbfd.h: Regenerate.
11196 * bfd-in2.h: Regenerate.
11197 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11198 (hppabsd_core_get_symtab_upper_bound): Don't define.
11199 (hppabsd_core_get_symtab): Likewise.
11200 (hppabsd_core_print_symbol): Likewise.
11201 (hppabsd_core_get_symbol_info): Likewise.
11202 (hppabsd_core_bfd_is_local_label_name): Likewise.
11203 (hppabsd_core_get_lineno): Likewise.
11204 (hppabsd_core_find_nearest_line): Likewise.
11205 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11206 (hppabsd_core_read_minisymbols): Likewise.
11207 (hppabsd_core_minisymbol_to_symbol): Likewise.
11208 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11210 * hpux-core.c: Similarly.
11211 * irix-core.c: Similarly.
11212 * osf-core.c: Similarly.
11213 * sco5-core.c: Similarly.
11214 * binary.c (binary_make_empty_symbol): Remove function, define as
11215 _bfd_generic_make_empty_symbol.
11216 * ihex.c (ihex_make_empty_symbol): Likewise.
11217 * mmo.c (mmo_make_empty_symbol): Likewise.
11218 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11219 * srec.c (srec_make_empty_symbol): Likewise.
11220 * versados.c (versados_make_empty_symbol): Likewise.
11221 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11222 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11223 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11224 rather than _bfd_vms_make_empty_symbol.
11225 * vms-misc.c (new_symbol): Likewise.
11227 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11229 * section.c (bfd_section_init): Remove unnecessary initialisations.
11230 (bfd_section_list_clear): New function.
11231 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11232 (_bfd_strip_section_from_output): Use them.
11233 * coffcode.h (coff_set_alignment_hook): Likewise.
11234 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11235 * elf64-mips.c (mips_elf64_final_link): Likewise.
11236 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11237 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11238 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11239 * bfd-in2.h: Regenerate.
11241 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11242 rather than doing our own section handling. Clean up after errors
11243 with bfd_release and bfd_section_list_clear. Handle unexpected
11245 * aoutf1.h (sunos4_core_file_p): Likewise.
11246 * aix386-core.c (aix386_core_file_p): Likewise.
11247 * cisco-core.c (cisco_core_file_validate): Likewise.
11248 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11249 * trad-core.c (trad_unix_core_file_p): Likewise.
11251 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11252 with bfd_release and bfd_section_list_clear.
11253 * hpux-core.c (hpux_core_core_file_p): Likewise.
11254 * irix-core.c (irix_core_core_file_p): Likewise.
11255 * lynx-core.c (lynx_core_file_p): Likewise.
11256 * osf-core.c (osf_core_core_file_p): Likewise.
11257 * rs6000-core.c (rs6000coff_core_p): Likewise.
11258 * sco5-core.c (sco5_core_file_p): Likewise.
11260 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11261 sign extension adjustments without conditionals.
11263 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11265 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11266 CIE at .eh_frame start is removed due to no FDEs referencing it.
11268 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11270 * config.bfd (x86_64-*-netbsd*): New target.
11271 * configure.in (x86_64-*-netbsd*): Set COREFILE
11273 * configure: Regenerated.
11275 2002-01-03 Tom Rix <trix@redhat.com>
11277 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11278 for recent bfd_make_section_anyway change.
11280 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11282 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11283 R_ARM_THM_PC11 reloc.
11285 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11287 * configure.in (LINGUAS): Add ja.
11288 * configure: Regenerate.
11289 * po/ja.po: Import from translation project's web site.
11291 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11293 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11294 messages to ease translation into other languages.
11296 For older changes see ChangeLog-0001
11302 version-control: never