Only skip one instance of each prefix character, if they are present.
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-16 Eric Youngdale <eric@mkssoftware.com>
2 Nick Clifton <nickc@redhat.com>
3
4 * peicode.h (pe_ILF_build_a_bfd): Only skip one instance of each
5 prefix character, if they are present.
6
7 2003-12-15 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8 Nick Clifton <nickc@redhat.com>
9
10 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Ensure that correct flags
11 are set on known section types.
12
13 2003-12-12 Nick Clifton <nickc@redhat.com>
14
15 * po/ro.po: Updated translation.
16
17 2003-12-12 Alan Modra <amodra@bigpond.net.au>
18
19 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
20 NULL dyn_h.
21
22 2003-12-11 Nick Clifton <nickc@redhat.com>
23
24 * elf.c (INCLUDE_SECTION_IN_SEGMENT): Skip PT_GNU_STACK segments.
25
26 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
27
28 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
29 Remove casts that were only needed for K&R compatibility.
30
31 2003-12-08 Alan Modra <amodra@bigpond.net.au>
32
33 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
34 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
35 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
36 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
37 and pass to output_symbol_hook.
38 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
39 (elf_link_output_extsym): Likewise.
40 (elf_link_input_bfd): Likewise.
41 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
42 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
43 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
44 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
45 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
46 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
47 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
48 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
49 Validate dynh->h against h.
50 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
51 (link_hash_newfunc): Init it.
52 (adjust_opd_syms): New function.
53 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
54 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
55 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
56 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
57 (ppc64_elf_output_symbol_hook): New function.
58 (elf_backend_link_output_symbol_hook): Define.
59
60 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
61
62 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
63 Remove casts that were only needed for K&R compatibility.
64
65 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
66
67 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
68 partial_inplace for these relocs to FALSE for comptability with
69 the MS linker.
70 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
71 generated by MS linker, and brings the relocation in line the MS
72 PE documentation.
73
74 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
75
76 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
77
78 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
79
80 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
81 need_relax_finalize field in link_info instead of
82 relax_finalizing to check if the relax finalize pass is being
83 done.
84
85 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
86
87 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
88 Change ARM26* to ARM_26* in comments to match definitions.
89 (coff_arm_adjust_symndx): Replace hard-coded constants with
90 appropriate definitions (ARM_26*).
91
92 2003-12-04 Alan Modra <amodra@bigpond.net.au>
93
94 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
95 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
96 (mn10300_elf_relax_section): Likewise.
97 * nlm32-alpha.c (ONES): Define.
98 (nlm32_alpha_howto_table): Use it to avoid warnings.
99
100 2003-12-04 Alan Modra <amodra@bigpond.net.au>
101
102 * elf32-i386.c (elf_i386_object_p): Delete.
103 (elf_backend_object_p): Don't define.
104 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
105 * elf32-sh.c (sh_elf_object_p): Likewise.
106 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
107 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
108 * elf64-s390.c (elf_s390_object_p): Likewise.
109 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
110
111 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
112
113 * archures.c (bfd_mach_m32r2): Add new machine type.
114 * bfd-in2.h: Regenerate.
115 * cpu-m32r.c : Add new machine type.
116 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
117 m32r_elf_merge_private_bfd_data): Add support for new machine
118 type.
119
120 2003-12-03 Dave Airlie <airlied@linux.ie>
121
122 * config.bfd: Add vax-linux-gnu target.
123 * configure.in: Likewise.
124 * configure: Regenerate.
125
126 2003-12-03 Alan Modra <amodra@bigpond.net.au>
127
128 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
129 bfd_link_hash_entry field "next" -> "und_next".
130 * linker.c (_bfd_link_hash_newfunc): Likewise.
131 (bfd_link_add_undef): Likewise.
132 (_bfd_generic_link_add_archive_symbols): Likewise.
133 (_bfd_generic_link_add_one_symbol): Likewise.
134 * xcofflink.c (xcoff_link_add_symbols): Likewise.
135
136 2003-12-02 Nick Clifton <nickc@redhat.com>
137
138 * configure.in (ALL_LINGUAS): Add ro.
139 * po/ro.po: New Romanian translation.
140
141 2003-12-02 Alan Modra <amodra@bigpond.net.au>
142
143 * Makefile.am: Run "make dep-am".
144 * Makefile.in: Regenerate.
145
146 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
147
148 * coffcode.h (coff_compute_section_file_positions): Set page_size
149 to 1 instead of 0 in the case file alignment value is zero.
150
151 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
152
153 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
154 * coff64-rs6000.c: Likewise.
155 * coffcode.h: Likewise.
156 * elf32-vax.c: Likewise.
157 * hash.c: Likewise.
158 * hppabsd-core.c: Likewise.
159 * hpux-core.c: Likewise.
160 * ihex.c: Likewise.
161 * netbsd-core.c: Likewise.
162 * osf-core.c: Likewise.
163 * pdp11.c: Likewise.
164 * ptrace-core.c: Likewise.
165 * sco5-core.c: Likewise.
166 * section.c: Likewise.
167 * sunos.c: Likewise.
168 * trad-core.c: Likewise.
169
170 2003-12-01 Alan Modra <amodra@bigpond.net.au>
171
172 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
173 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
174 (_bfd_elf_link_just_syms): Likewise.
175 (bfd_elf_get_needed_list): Likewise.
176 (bfd_elf_get_runpath_list): Likewise.
177 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
178 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
179 creator flavour.
180 (elf32_hppa_set_gp): Look up output sections rather than using htab.
181 * elf32-i960.c: Comment fix. Formatting.
182 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
183 rather than testing creator flavour.
184 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
185 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
186 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
187 is_elf_hash_table change. Remove redundant test.
188 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
189 testing creator flavour.
190 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
191 (_bfd_elf_fix_symbol_flags): Likewise.
192 (_bfd_elf_adjust_dynamic_symbol): Likewise.
193 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
194 checks. Use is_elf_hash_table rather than testing creator flavour.
195 Use hash_table throughout in place of info->hash.
196 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
197 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
198 check.
199 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
200 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
201 testing creator flavour.
202 (elf_gc_sections): Add is_elf_hash_table check.
203 (elf_gc_common_finalize_got_offsets): Likewise.
204 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
205 redundant check.
206 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
207 rather than testing creator flavour.
208
209 2003-11-28 Christian Groessler <chris@groessler.org>
210
211 * cpu-z8k.c: Convert to ISO C90.
212 * coff-z8k.c: Likewise.
213
214 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
215
216 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
217 Add link info argument.
218 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
219 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
220 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
221 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
222 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
223 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
224 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
225 * elf.c (assign_file_positions_except_relocs,
226 assign_file_positions_for_segments): Likewise. Adjust calls.
227
228 2003-11-27 Mark Kettenis <kettenis@gnu.org>
229
230 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
231 of the note.
232
233 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
234 Richard Sandiford <rsandifo@redhat.com>
235
236 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
237 (mips_elf_set_no_stub): New function.
238 (mips_elf_multi_got): Call it.
239 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
240 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
241 use mips_elf_create_dynamic_relocation to deal with any compatibility
242 issues. Store the adjusted addend in the GOT slot.
243
244 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
245
246 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
247 procesing N_BINCL stabs.
248
249 2003-11-25 Alan Modra <amodra@bigpond.net.au>
250
251 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
252 ppc_stub_plt_call to symbols defined in shared libs.
253
254 2003-11-22 Jakub Jelinek <jakub@redhat.com>
255
256 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
257 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
258 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
259 (elf_i386_check_relocs): Set it.
260 (elf_i386_finish_dynamic_symbol): If it is not set,
261 clear st_value of SHN_UNDEF symbol.
262
263 2003-11-20 Jim Blandy <jimb@redhat.com>
264
265 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
266 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
267
268 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
269
270 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
271 section for reloc output and subtract the output section's address
272 from the addend when converting a relocation into one against a
273 section symbol.
274 * elf64-s390.c (elf_s390_relocate_section): Likewise.
275
276 2003-11-18 James E Wilson <wilson@specifixinc.com>
277
278 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
279 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
280 for ia64_info->rel_fptr_sec.
281
282 2003-11-18 Alan Modra <amodra@bigpond.net.au>
283
284 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
285 size is zero.
286
287 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
288
289 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
290 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
291 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
292 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
293 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
294 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
295 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
296 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
297 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
298 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
299 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
300 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
301 (elf_backend_copy_indirect_symbol): Don't define.
302
303 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
304
305 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
306 GOT entries.
307
308 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
309
310 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
311 to R_390_RELATIVE. Convert the other relocations against local
312 symbols to relocations against the start of the section.
313 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
314 to R_390_RELATIVE. Convert the other relocations against local
315 symbols to relocations against the start of the section.
316
317 2003-11-11 Nick Clifton <nickc@redhat.com>
318
319 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
320 info->executable not info->shared to decide if a .interp section
321 should be present.
322 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
323 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
324 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
325 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
326 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
327 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
328 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
329 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
330 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
331 * elflink.h (size_dynamic_sections): Likewise.
332
333 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
334
335 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
336 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
337 found initialise the tls data directory entry.
338
339 2003-11-07 Alan Modra <amodra@bigpond.net.au>
340
341 * elf32-ppc.c (ppc_elf_install_value): Delete.
342 (shared_stub_entry, stub_entry): Make them arrays of ints.
343 Remove initial branch.
344 (ppc_elf_relax_section): Write one branch around all trampolines
345 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
346 branch range check. Only use shared_stub_entry when shared.
347 Test that branches can reach stubs. Write trampolines out at
348 end so that just one realloc is used. Handle little-endian
349 mode. Move relevant code from ppc_elf_install_value to here.
350 (ppc_elf_relocate_section): Move code handling RELAX32 from
351 ppc_elf_install_value to here.
352
353 2003-11-06 Alan Modra <amodra@bigpond.net.au>
354
355 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
356 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
357 cases.
358 (shared_stub_entry): Correct opcode.
359 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
360 (ppc_elf_relocate_section): Handle them.
361
362 2003-11-05 Alan Modra <amodra@bigpond.net.au>
363
364 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
365 updated section in case of merged section.
366 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
367 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
368 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
369 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
370 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
371 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
372 * elf32-cris.c (cris_elf_relocate_section): Likewise.
373 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
374 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
375 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
376 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
377 * elf32-i370.c (i370_elf_relocate_section): Likewise.
378 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
379 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
380 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
381 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
382 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
383 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
384 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
385 * elf32-s390.c (elf_s390_relocate_section): Likewise.
386 * elf32-sh.c (sh_elf_relocate_section): Likewise.
387 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
388 * elf32-v850.c (v850_elf_relocate_section) Likewise.
389 * elf32-vax.c (elf_vax_relocate_section): Likewise.
390 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
391 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
392 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
393 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
394 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
395 * elf64-s390.c (elf_s390_relocate_section): Likewise.
396 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
397 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
398 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
399 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
400
401 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
402 section for reloc output.
403 * elf32-i370.c (i370_elf_relocate_section): Likewise.
404 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
405 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
406 * elf32-vax.c (elf_vax_relocate_section): Likewise.
407 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
408 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
409
410 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
411 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
412 return value.
413 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
414 sec->id.
415
416 2003-11-05 Alan Modra <amodra@bigpond.net.au>
417
418 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
419 (elf32_d10v_relocate_section): Use them to handle -r reloc
420 adjustments, and in place of _bfd_elf_rela_local_sym.
421
422 * cpu-iq2000.c (arch_info_struct): Warning fix.
423
424 2003-11-05 Alan Modra <amodra@bigpond.net.au>
425
426 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
427 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
428 weakdefs.
429 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
430 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
431 NON_GOT_REF.
432 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
433 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
434 non-default visibility.
435 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
436 SYMBOL_CALLS_LOCAL.
437
438 2003-11-04 Alan Modra <amodra@bigpond.net.au>
439
440 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
441 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
442 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
443 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
444 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
445 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
446 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
447
448 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
449 "dereferencing type-punned pointer" warnings.
450
451 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
452 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
453 * bfd-in2.h: Regenerate.
454 * binary.c (binary_set_section_contents): Ditto.
455 * bout.c (b_out_set_section_contents): Ditto.
456 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
457 * coffcode.h (coff_set_section_contents): Ditto.
458 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
459 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
460 * elf.c (_bfd_elf_set_section_contents): Ditto.
461 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
462 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
463 * i386msdos.c (msdos_set_section_contents): Ditto.
464 * ieee.c (ieee_set_section_contents): Ditto.
465 * ihex.c (ihex_set_section_contents): Ditto.
466 * libaout.h (NAME(aout,set_section_contents)): Ditto.
467 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
468 (_bfd_generic_set_section_contents): Ditto.
469 * libbfd.h: Regenerate.
470 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
471 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
472 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
473 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
474 * mmo.c (mmo_set_section_contents): Ditto.
475 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
476 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
477 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
478 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
479 * nlmcode.h (nlm_set_section_contents): Ditto.
480 * oasys.c (oasys_set_section_contents): Ditto.
481 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
482 * ppcboot.c (ppcboot_set_section_contents): Ditto.
483 * srec.c (srec_set_section_contents): Ditto.
484 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
485 * tekhex.c (tekhex_set_section_contents): Ditto.
486 (move_section_contents): Ditto.
487 * versados.c (versados_set_section_contents): Ditto.
488 * vms-misc.c (_bfd_save_vms_section): Ditto.
489 * vms.c (vms_set_section_contents): Ditto.
490 * vms.h (_bfd_save_vms_section): Ditto.
491
492 2003-11-04 Alan Modra <amodra@bigpond.net.au>
493
494 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
495 rather than htab.
496 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
497 relbrlt size.
498 (ppc64_elf_build_stubs): Allocate space for relbrlt.
499
500 2003-11-04 Alan Modra <amodra@bigpond.net.au>
501
502 * bfd-in.h (_bfd_elf_tls_setup): Declare.
503 * bfd-in2.h: Regenerate.
504 * elf-bfd.h (struct elf_link_tls_segment): Delete.
505 (struct elf_link_hash_table): Add tls_sec and tls_size.
506 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
507 * elflink.c (_bfd_elf_tls_setup): New function.
508 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
509 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
510 saving tls segment info, round segment size up.
511 (elf_link_output_extsym): Adjust code using tls segment info.
512 (elf_link_input_bfd): Likewise.
513 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
514 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
515 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
516 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
517 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
518 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
519 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
520 (elfNN_ia64_dtprel_base): Likewise.
521 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
522 (alpha_get_tprel_base): Likewise.
523 (struct alpha_relax_info): Remove tls_segment.
524 (elf64_alpha_relax_got_load): Adjust invocation of
525 alpha_get_dtprel_base and alpha_get_tprel_base.
526 (elf64_alpha_relax_tls_get_addr): Likewise.
527 (elf64_alpha_relax_section): Likewise.
528 (elf64_alpha_relocate_section): Likewise.
529 (elf64_alpha_relax_find_tls_segment): Delete.
530 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
531 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
532 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
533 * elf32-ppc.h (ppc_elf_tls_setup): Update.
534 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
535 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
536 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
537 (ppc64_elf_relocate_section): Likewise.
538 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
539
540 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
541
542 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
543 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
544 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
545 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
546 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
547 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
548 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
549 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
550 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
551 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
552 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
553 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
554 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
555 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
556 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
557 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
558 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
559 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
560 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
561 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
562 * elfxx-target.h (elf_backend_plt_header_size): Don't define
563 or include in target initializer.
564
565 2003-11-03 Andrew Cagney <cagney@redhat.com>
566
567 * section.c (bfd_set_section_contents): Make the "location" buffer
568 constant.
569 * bfd-in2.h: Re-generate.
570
571 2003-10-30 Andrew Cagney <cagney@redhat.com>
572
573 * syms.c: Replace "struct symbol_cache_entry" with "struct
574 bfd_symbol".
575 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
576 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
577 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
578 * bfd-in2.h: Re-generate.
579
580 2003-10-30 Jakub Jelinek <jakub@redhat.com>
581
582 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
583 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
584 fields.
585 (struct elfNN_ia64_local_hash_table): Remove.
586 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
587 to htab_t. Add loc_hash_memory field.
588 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
589 Removed.
590 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
591 functions.
592 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
593 loc_hash_table. Initialize loc_hash_memory.
594 (elfNN_ia64_hash_table_free): New function.
595 (elfNN_ia64_local_hash_lookup): Remove.
596 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
597 callback.
598 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
599 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
600 (bfd_elfNN_bfd_link_hash_table_free): Define.
601
602 2003-10-30 Alan Modra <amodra@bigpond.net.au>
603
604 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
605 symbol string in place.
606
607 2003-10-30 Jim Blandy <jimb@redhat.com>
608
609 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
610 object's mach field: all PowerPC machines are supersets of the
611 original rs6000, but not later rs6000 machines.
612
613 2003-10-30 Alan Modra <amodra@bigpond.net.au>
614
615 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
616 Add "val" and "sval" fields.
617 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
618 (read_attribute_value): Expand and adjust DW_* occurrences.
619 (scan_unit_for_functions, parse_comp_unit): Likewise.
620
621 2003-10-30 Phil Edwards <phil@codesourcery.com>
622
623 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
624 other common ELF triples.
625 (i[3-7]86-*-vxworks): Change to ELF format.
626 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
627 (sh-*-vxworks): New stanza.
628
629 2003-10-30 Lars Knoll <lars@trolltech.com>
630 Michael Matz <matz@suse.de>
631 Jakub Jelinek <jakub@redhat.com>
632 Alan Modra <amodra@bigpond.net.au>
633
634 * merge.c (struct sec_merge_sec_info): Update comment.
635 (struct sec_merge_hash_entry): Remove entsize.
636 (sec_merge_hash_lookup): Only adjust alignment when creating.
637 (sec_merge_emit): Remove register keyword.
638 (cmplengthentry, last4_eq, last_eq): Delete.
639 (strrevcmp, strrevcmp_align, is_suffix): New.
640 (merge_strings): Use them to implement fast suffix merging.
641 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
642 Make "len" signed.
643 (_bfd_elf_strtab_add): Lose on >2G strings.
644 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
645 (cmplengthentry, last4_eq): Delete.
646 (strrevcmp, is_suffix): New.
647 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
648
649 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
650
651 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
652 SEC_ALLOC.
653
654 2003-10-29 Philip Blundell <philb@gnu.org>
655
656 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
657 code sequence.
658 (PLT_HEADER_SIZE): New.
659 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
660 (struct elf32_arm_relocs_copied): ... this. Count both
661 pcrel and non-pcrel relocs. All uses updated.
662 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
663 sections and symbol/section mapping cache.
664 (create_got_section): New.
665 (elf32_arm_create_dynamic_sections): New.
666 (elf_backend_create_dynamic_sections): Use it.
667 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
668 (elf32_arm_check_relocs): Likewise.
669 (elf32_arm_adjust_dynamic_symbol): Likewise.
670 (elf32_arm_copy_indirect_symbol): New.
671 (elf32_arm_link_hash_table_create): Initialise new fields.
672 (elf32_arm_gc_sweep_hook): Implement.
673 (elf32_arm_discard_copies): Delete.
674 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
675 (elf32_arm_finish_dynamic_sections): Likewise.
676 (elf_backend_can_refcount): Define.
677 (elf_backend_copy_indirect_symbol): Likewise.
678 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
679
680 2003-10-29 Alan Modra <amodra@bigpond.net.au>
681
682 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
683 (elf_backend_grok_psinfo): Define.
684 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
685
686 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
687 sections with the same name.
688 (elfcore_grok_lwpstatus): Likewise.
689 (elfcore_grok_win32pstatus): Likewise.
690 (elfcore_grok_note): Likewise.
691 (elfcore_grok_nto_status): Likewise.
692 (elfcore_grok_nto_gregs): Likewise.
693
694 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
695
696 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
697 objects.
698
699 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
700
701 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
702
703 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
704
705 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
706 hash table for real symbols.
707
708 2003-10-23 Michael Snyder <msnyder@redhat.com>
709
710 * section.c (asection): Fix typo in comment.
711
712 2003-10-23 Alan Modra <amodra@bigpond.net.au>
713
714 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
715 reloc symbol index to it. Don't allow gd syms in shared libs
716 to be optimized.
717 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
718 (ppc64_elf_size_stubs): Likewise.
719 (ppc64_elf_relocate_section): Check that tls relocs are only used
720 with tls syms, and similarly for non-tls. Correct symbol used
721 when optimizing toc tls code.
722
723 2003-10-22 Nick Clifton <nickc@redhat.com>
724
725 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
726 processing an executable.
727
728 2003-10-22 Jakub Jelinek <jakub@redhat.com>
729
730 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
731 field changes.
732 (_bfd_elf_link_assign_sym_version): Likewise.
733 * elflink.h (size_dynamic_sections): Likewise.
734
735 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
736 Michael Snyder <msnyder@redhat.com>
737
738 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
739 bfd_mach_sh4a_nofpu): New machine types.
740 * bfd-in2.h: Rebuilt.
741 * cpu-sh.c (compatible): Remove unused function.
742 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
743 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
744 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
745
746 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
747
748 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
749 describing mismatched formats involving the Maverick FP type.
750
751 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
752
753 * binary.c (binary_object_p): Pass machine flag along with
754 architecture.
755
756 2003-10-21 Thorsten Brehm <brehm@gmx.net>
757
758 * archures.c (bfd_default_scan): Add support for mcf528x.
759 * ieee.c (ieee_write_processor): Likewise.
760
761 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
762 Bernardo Innocenti <bernie@develer.com>
763
764 * archures.c: Add MCF528x (MCFv4) support.
765 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
766 * bfd-in2.h: Regenerate.
767
768 2003-10-20 Andrew Cagney <cagney@redhat.com>
769
770 * targets.c: Replace "struct sec" with "struct bfd_section"
771 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
772 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
773 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
774 * aout-tic30.c, aout-target.h:
775 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
776
777 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
778
779 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
780 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
781 (struct _mmix_elf_section_data): New member pjs.
782 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
783 functions.
784 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
785 (mmix_reloc_map): Ditto.
786 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
787 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
788 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
789 unused.
790 (mmix_elf_check_relocs): Move early return to after
791 mmix_elf_check_common_relocs call.
792 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
793 (_bfd_mmix_before_linker_allocation): Rename from
794 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
795 Arrange to set the initial relaxable size of sections.
796 (_bfd_mmix_after_linker_allocation): Rename from
797 _bfd_mmix_finalize_linker_allocated_gregs.
798 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
799 (bfd_elf64_get_section_contents): Define.
800 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
801 * libbfd.h, bfd-in2.h: Regenerate.
802
803 * reloc.c (bfd_generic_relax_section): Default-set
804 section->_cooked_size here.
805 (bfd_generic_get_relocated_section_contents): Don't set it here.
806 Explain why.
807
808 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
809
810 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
811 output section has been discarded.
812
813 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
814
815 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
816 (h8300_reloc16_extra_cases): Likewise.
817 (h8300_bfd_link_add_symbols): Likewise.
818
819 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
820
821 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
822 (h8300sn_info_struct): Likewise.
823 (h8300hn_info_struct): Likewise.
824
825 2003-10-16 Pavel Roskin <proski@gnu.org>
826
827 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
828 for sections which lack size info.
829
830 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
831
832 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
833 mingw32.
834
835 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
836
837 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
838 undefined patterns with '*'.
839
840 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
841
842 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
843 use the last CIE from a different section.
844 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
845 size of the output section.
846
847 2003-10-07 Roland McGrath <roland@redhat.com>
848
849 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
850 new section from p_align header field.
851
852 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elf32-xtensa.c (xtensa_read_table_entries): The external size
855 of entry is 8 bytes.
856
857 2003-10-15 Andrew Cagney <cagney@redhat.com>
858
859 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
860 with NAME##_canonicalize_symtab.
861 * libcoff-in.h (coff_canonicalize_symtab): Update.
862 * xsym.h (bfd_sym_canonicalize_symtab): Update.
863 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
864 * coffgen.c (coff_canonicalize_symtab): Update.
865 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
866 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
867 * ieee.c (ieee_vec): Update comment.
868 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
869 * mmo.c (mmo_canonicalize_symtab): Update.
870 * nlm-target.h (nlm_canonicalize_symtab): Update.
871 * nlmcode.h (nlm_canonicalize_symtab): Update.
872 * i386msdos.c (msdos_canonicalize_symtab): Update.
873 * hp300hpux.c (MY (canonicalize_symtab)): Update.
874 * oasys.c (oasys_canonicalize_symtab): Update.
875 * som.c (som_canonicalize_symtab): Update.
876 * pef.c (bfd_pef_canonicalize_symtab): Update.
877 * nlmcode.h (nlm_canonicalize_symtab): Update.
878 * xsym.c (bfd_sym_canonicalize_symtab): Update.
879 * vms.c (vms_canonicalize_symtab): Update.
880 * versados.c (versados_canonicalize_symtab): Update.
881 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
882 * ieee.c (ieee_canonicalize_symtab): Update.
883 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
884 * reloc.c: Update comment.
885 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
886 * coff64-rs6000.c (aix5coff64_vec): Update.
887 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
888 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
889 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
890 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
891 * hp300hpux.c (MY_canonicalize_symtab): Update.
892 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
893 * aout-tic30.c (MY_canonicalize_symtab): Update.
894 * aout-target.h (MY_canonicalize_symtab): Update.
895 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
896 * elf.c (_bfd_elf_canonicalize_symtab): Update.
897 * elfcode.h (elf_canonicalize_symtab): Update.
898 * ihex.c (ihex_canonicalize_symtab): Update.
899 * tekhex.c (tekhex_canonicalize_symtab): Update.
900 * binary.c (binary_canonicalize_symtab): Update.
901 * srec.c (srec_canonicalize_symtab): Update.
902
903 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
904
905 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
906
907 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
908
909 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
910 relocations.
911 (sh_elf_check_relocs): Likewise.
912
913 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
914 (sh64_elf_merge_symbol_attribute): New.
915 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
916 (sh64_elf64_merge_symbol_attribute): New.
917
918 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
919
920 * elf-bfd.h (struct elf_backend_data): New function pointer member
921 elf_backend_merge_symbol_attribute.
922 * elflink.h (elf_link_add_object_symbols): Adjust call to
923 elf_backend_merge_symbol_attribute if the backend defined it.
924 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
925 (elfNN_bed): Add that to the initializer.
926
927 2003-10-14 Bob Wilson <bob.wilson@acm.org>
928
929 * elf32-xtensa.c (get_is_linkonce_section): Delete.
930 (xtensa_is_property_section, xtensa_is_littable_section): Use
931 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
932 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
933 (xtensa_get_property_section_name): Check section name instead of
934 calling get_is_linkonce_section. Remove unused bfd parameter. Use
935 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
936 linkonce section names by appending ".xt.insn" or ".xt.lit".
937 (xtensa_read_table_entries): Remove bfd argument in call to
938 xtensa_get_property_section_name. Free section name when done.
939 (elf_xtensa_combine_prop_entries): Free leaking table.
940
941 2003-10-13 Richard Sandiford <rsandifo@redht.com>
942
943 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
944 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
945 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
946 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
947 that were needed.
948 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
949 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
950
951 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
952
953 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
954 (bfd_elf64_ia64_after_parse): Likewise.
955 * bfd-in2.h: Regenerated.
956
957 * elfxx-ia64.c (oor_ip): New.
958 (oor_branch_size): Likewise.
959 (bfd_elfNN_ia64_after_parse): Likewise.
960 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
961 equals sizeof (oor_ip).
962
963 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
964
965 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
966 renumbering of some relocation numbers.
967
968 2003-10-11 Alan Modra <amodra@bigpond.net.au>
969
970 * coff-sh.c: Move definition of MAP and guard more code with
971 COFF_IMAGE_WITH_PE.
972
973 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
974 * bfd-in2.h: Regenerate.
975
976 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
977
978 * Makefile.am: Run "make dep-am".
979 * Makefile.in: Regenerate.
980 * doc/Makefile.in: Likewise.
981
982 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
983
984 * cofflink.c: Include "safe-ctype.h".
985 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
986
987 2003-10-08 Dave Brolley <brolley@redhat.com>
988 On behalf of Michael Snyder <msnyder@redhat.com>
989
990 * archures.c: Add FRV fr550 machine.
991 * cpu-frv.c: Ditto.
992 * elf32-frv.c: Ditto.
993 * bfd-in2.h: Regenerate.
994
995 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
996
997 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
998 for non-SGI N64 ABI. Improve code consitency.
999
1000 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
1001
1002 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
1003 rightshift to 2.
1004
1005 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
1006
1007 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
1008 parameter.
1009 * cofflink.c (coff_link_add_symbols): Deal with split stab
1010 sections.
1011 * elflink.h (elf_link_add_object_symbols): Deal with split stab
1012 sections.
1013 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
1014 * libbfd.h: Regenerated.
1015
1016 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
1017 overflow, set reloc start position to after the count
1018 reloc. Subtract one from num relocs. Give error on 0xffff relocs
1019 and no overflow.
1020 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
1021 overflow.
1022 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
1023 0xffff.
1024
1025 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1026
1027 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1028 last CIE/FDE if needed.
1029
1030 2003-10-06 Nick Clifton <nickc@redhat.com>
1031
1032 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1033 BFD64 is enabled.
1034
1035 2003-10-06 Matt Thomas <matt@3am-software.com>
1036
1037 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1038
1039 2003-10-06 Robert Millan <robertmh@gnu.org>
1040
1041 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1042 * config.bfd: Likewise.
1043 * configure: Regenerate.
1044
1045 2003-10-04 Christian Groessler <chris@groessler.org>
1046
1047 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1048 and R_CALLR.
1049
1050 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1051
1052 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1053 * elf32-m68hc11.c: Likewise.
1054 * elf32-m68hc12.c: Likewise.
1055 * elf32-m68hc1x.h: Likewise.
1056
1057 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1058
1059 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1060 of flags between HC12 and HCS12.
1061
1062 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1063
1064 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1065 which become empty after merging.
1066
1067 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1068
1069 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1070 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1071
1072 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1073
1074 * archures.c (bfd_mach_mipsisa64r2): New define.
1075 * bfd-in2.h: Regenerate.
1076 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1077 * cpu-mips.c (I_mipsisa64r2): New enum value.
1078 (arch_info_struct): Add entry for I_mipsisa64r2.
1079 * elfxx-mips.c (_bfd_elf_mips_mach)
1080 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1081 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1082 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1083
1084 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1085
1086 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1087 Handle SHN_IA_64_ANSI_COMMON.
1088 (elf_backend_section_from_bfd_section): Defined.
1089
1090 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1091
1092 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1093 of a pointer to section. Check bad symbol index.
1094 (_bfd_elf_link_read_relocs): Modify calls to
1095 elf_link_read_relocs_from_section.
1096
1097 2003-09-23 DJ Delorie <dj@redhat.com>
1098
1099 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1100 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1101 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1102 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1103 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1104 R_SH_PSHA, R_SH_PSHL added.
1105 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1106 (sh_elf_relocate_section): Support new relocs.
1107
1108 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1109
1110 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1111 dynamic relocation offsets.
1112
1113 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1114
1115 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1116 hash table using _bfd_generic_link_hash_table_free.
1117
1118 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1119
1120 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1121 type of prefix_length and suffix_length to int. Rename "attributes"
1122 to "attr". Comment.
1123 (_bfd_elf_get_sec_type_attr): Update prototype.
1124 * elf.c (get_special_section): Rewrite.
1125 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1126 attr and type pointers.
1127 (_bfd_elf_new_section_hook): Adjust for above.
1128 (special_sections): Merge suffix with prefix. Set
1129 prefix_length for all entries. Set suffix_length appropriately.
1130 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1131 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1132 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1133 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1134 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1135 * elf32-v850.c (v850_elf_special_sections): Likewise.
1136 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1137 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1138 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1139 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1140 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1141 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1142 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1143 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1144
1145 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1146
1147 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1148 ->got if the section already exists.
1149
1150 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1151
1152 * dwarf2.c (decode_line_info): Cope with an initially empty
1153 filename table.
1154
1155 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1156
1157 * acinclude.m4: Include ../config/accross.m4.
1158 * aclocal.m4: Regenerated.
1159
1160 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1161 or long long.
1162 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1163 (host64): Remove if HOST_64BIT_TYPE is set to long.
1164
1165 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1166 long and long long.
1167 (HOST_U_64BIT_TYPE): Likewise.
1168 (host64): Likewise.
1169 * configure: Regenerated.
1170
1171 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1172
1173 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1174 since some ABIs round up the size of the struct.
1175
1176 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1177
1178 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1179 the old symbol is undefined and the new symbol is defined.
1180
1181 2003-09-18 Andreas Schwab <schwab@suse.de>
1182
1183 * simple.c (bfd_simple_get_relocated_section_contents): Use
1184 _bfd_generic_link_hash_table_create instead of
1185 bfd_link_hash_table_create.
1186
1187 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1188
1189 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1190 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1191
1192 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1193 Randolph Chung <randolph@tausq.org>
1194
1195 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1196 hppa_link_hash_newfunc, hppa_build_one_stub,
1197 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1198 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1199 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1200 for generating import stubs for calls to statically linked PIC
1201 functions.
1202 (hppa_type_of_stub): Don't generate an import stub for calls to
1203 statically linked pic functions. Generate import stubs for calls
1204 in a shared object, to functions not in a regular file, and to
1205 defined weak functions. Add new argument INFO.
1206 (hppa_build_one_stub): Don't undef ADDIL_DP.
1207 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1208 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1209 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1210 non-shared link. Convert instructions that use the the linkage table
1211 pointer, or a facsimile thereof, to use the global data pointer when
1212 the reloc has been changed.
1213
1214 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1215
1216 * archures.c: Add new machine names for hppa.
1217 * bfd-in2.h: Regenerate.
1218 * cpu-hppa.c: Use the new machine names.
1219
1220 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1221
1222 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1223 all_local_syms member.
1224 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1225 to get the local symbols.
1226
1227 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1228
1229 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1230 (elf_backend_special_sections): Define.a
1231
1232 PR savannah/4950:
1233 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1234 section is read-only.
1235
1236 2003-09-04 Nick Clifton <nickc@redhat.com>
1237
1238 * archures.c (bfd_mach_v850e1): Define.
1239 * bfd-in2.h: Regenerate.
1240 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1241 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1242 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1243 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1244 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1245 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1246 linked with v850e binaries. Mark the output as v850e.
1247
1248 2003-09-03 Nick Clifton <nickc@redhat.com>
1249
1250 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1251 symbols that are used in relocs.
1252
1253 2003-08-30 Robert Millan <robertmh@gnu.org>
1254
1255 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1256 * config.bfd: Likewise.
1257 * configure: Regenerate.
1258
1259 2003-08-31 Christian Groessler <chris@groessler.org>
1260
1261 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1262 instead of returning bfd_reloc_continue.
1263
1264 2003-08-31 Andreas Jaeger <aj@suse.de>
1265
1266 * merge.c: Update to ISO C90.
1267
1268 2003-08-27 Ian Lance Taylor <ian@airs.com>
1269
1270 * configure.in: Check for strtoull.
1271 * bfd.c (bfd_scan_vma): Use strtoull when available.
1272 * configure, config.in: Regenerate.
1273
1274 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1275 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1276 __GNUC__ when deciding whether to use long long for
1277 BFD_HOST_64_BIT.
1278 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1279
1280 2003-08-27 Christian Groessler <chris@groessler.org>
1281
1282 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1283 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1284 functions.
1285 (elf32_i860_howto_table): Insert the new functions as
1286 'special_function's in the proper reloc type entries.
1287
1288 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1289
1290 * elf32-frv.c (elf32_frv_relocate_section): Use
1291 _bfd_elf_rela_local_sym.
1292
1293 2003-08-26 Michael Snyder <msnyder@redhat.com>
1294
1295 * cpu-frv.c: Remove unused enum.
1296
1297 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1298
1299 * reloc.c: Fix documentation for MIPS ELF relocations.
1300 libbfd.h: Regenerate.
1301 bfd-in2.h: Regenerate.
1302
1303 2003-08-24 Jason Eckhardt <jle@rice.edu>
1304
1305 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1306
1307 2003-08-24 Jason Eckhardt <jle@rice.edu>
1308
1309 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1310 shift by 2 before storing the relocated value.
1311
1312 2003-08-23 Jason Eckhardt <jle@rice.edu>
1313
1314 * coff-i860.c (coff_i860_reloc_nyi): New function.
1315 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1316 LOWn, SPLITn, and BRADDR.
1317 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1318 before trying to access the entry.
1319 (coff_i860_rtype_to_howto): Likewise.
1320 (coff_i860_reloc_type_lookup): New function.
1321 (i860_reloc_processing): New function.
1322 (coff_bfd_reloc_type_lookup): Define macro.
1323 (RELOC_PROCESSING): Define macro.
1324 Minor formatting adjustments.
1325
1326 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1327
1328 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1329
1330 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1331
1332 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1333 .got section at 8 bytes.
1334
1335 2003-08-21 Nick Clifton <nickc@redhat.com>
1336
1337 * cofflink.c: Update to ISO C90 and tidy up formatting.
1338
1339 2003-08-21 Randolph Chung <tausq@debian.org>
1340
1341 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1342 can have OSABI=Linux or OSABI=SysV. Check for both.
1343 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1344
1345 2003-08-21 Nick Clifton <nickc@redhat.com>
1346
1347 * po/sv.po: Updated Swedish translation.
1348
1349 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1350
1351 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1352
1353 2003-08-20 Nick Clifton <nickc@redhat.com>
1354
1355 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1356 replace some duplicated code in most elfxx-xxxx.c files. This
1357 version uses the new fields in bfd_link_info.
1358
1359 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1360 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1361 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1362 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1363 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1364 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1365 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1366 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1367 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1368 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1369 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1370 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1371 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1372 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1373 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1374 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1375 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1376 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1377 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1378
1379 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1380 elf_hppa_remark_useless_dynamic_symbols,
1381 elf_hppa_relocate_section): Use the new fields in
1382 bfd_link_info structure.
1383 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1384 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1385 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1386 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1387 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1388 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1389
1390 * elflink.h (elf_link_output_extsym): Fix test for reporting
1391 undefined symbols in shared libraries. Remove redundant test
1392 of shlib_undefined when reporting references to forced local
1393 symbols.
1394
1395 2003-08-18 Andreas Schwab <schwab@suse.de>
1396
1397 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1398 executables.
1399
1400 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1401
1402 * simple.c (bfd_simple_get_relocated_section_contents): Move
1403 reloc_done hack to before first bfd_section_size call. Change all
1404 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1405
1406 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1407
1408 * elf64-ppc.c: Don't include elf/ppc.h.
1409
1410 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1411
1412 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1413 code to work with 64-bit bfds.
1414
1415 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1416
1417 * dep-in.sed: Remove libintl.h.
1418 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1419 (POTFILES.in): Remove target.
1420 * Makefile.in: Regenerate.
1421
1422 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1423
1424 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1425 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1426 use the function sym from the previous reloc.
1427
1428 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1429
1430 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1431 fatal if -pie.
1432 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1433 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1434 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1435 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1436 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1437 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1438 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1439 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1440 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1441 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1442 on undefined symbols if -pie.
1443 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1444
1445 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1446
1447 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1448 branch to __libc_start_main.
1449
1450 2003-08-08 Dmitry Diky <diwil@mail.ru>
1451
1452 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1453 gcc order.
1454 * cpu-msp430.c: Likewise.
1455 * elf32-msp430.c: Likewise.
1456 * bfd-in2.h: Regenerate.
1457
1458 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1459
1460 * elfxx-target.h: Remove PTR cast.
1461 * targets.c (bfd_target): Make backend_data const void *.
1462 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1463 * elf-m10300.c: Likewise.
1464 * elf.c: Likewise.
1465 * elf32-hppa.c: Likewise.
1466 * elf32-i386.c: Likewise.
1467 * elf32-m68hc1x.c: Likewise.
1468 * elf32-ppc.c: Likewise.
1469 * elf32-s390.c: Likewise.
1470 * elf32-sh.c: Likewise.
1471 * elf32-sh64.c: Likewise.
1472 * elf32-sparc.c: Likewise.
1473 * elf32-xtensa.c: Likewise.
1474 * elf64-mips.c: Likewise.
1475 * elf64-ppc.c: Likewise.
1476 * elf64-s390.c: Likewise.
1477 * elf64-sh64.c: Likewise.
1478 * elf64-sparc.c: Likewise.
1479 * elf64-x86-64.c: Likewise.
1480 * elfcode.h: Likewise.
1481 * elfcore.h: Likewise.
1482 * elflink.c: Likewise.
1483 * elflink.h: Likewise.
1484 * elfxx-ia64.c: Likewise.
1485 * elfxx-mips.c: Likewise.
1486 * elfxx-mips.h: Likewise.
1487 * elf.c (prep_headers): Remove useless check for null backend_data.
1488 * bfd-in2.h: Regenerate.
1489
1490 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1491 (NAME): Use ## rather than CONCAT4 macro.
1492 * elfcode.h: Remove one remaining PARAMS macro.
1493 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1494 * elf-strtab.c: Likewise.
1495 * elf-hppa.h: Likewise.
1496 * elf32-hppa.h: Likewise.
1497 * elf32-hppa.c: Likewise.
1498 (elf32_hppa_add_symbol_hook): Delete.
1499 (elf_backend_add_symbol_hook): Don't define.
1500 * libhppa.h: Convert to C90. Replace INLINE with inline.
1501
1502 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1503
1504 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1505 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1506 function descriptors, but warn.
1507 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1508 stub syms so that we can avoid a stub sym if we already have a
1509 plt sym. Do not redefine an existing symbol.
1510 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1511 glink.
1512
1513 2003-08-06 Nick Clifton <nickc@redhat.com>
1514
1515 * po/fr.po: Updated French translation.
1516
1517 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1518
1519 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1520 SEC_LINKER_CREATED.
1521
1522 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1523
1524 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1525 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1526
1527 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1528
1529 * coffcode.h (coff_slurp_line_table): Return with a warning
1530 message if the line number table could not be read.
1531
1532 2003-08-04 Nick Clifton <nickc@redhat.com>
1533
1534 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1535 to messages produced for .gnu.warning.SYMBOL sections.
1536
1537 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1538
1539 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1540 * elfcore.h: Likewise.
1541 * elflink.c: Likewise.
1542 * elflink.h: Likewise.
1543 * elf.c (sym_is_global): Remove INLINE.
1544 (align_file_position): Replace INLINE with inline.
1545 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1546 (elf_file_p): Replace INLINE with inline.
1547
1548 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1549
1550 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1551
1552 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1553
1554 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1555
1556 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1559 ElfNN_External_Rela instead of Elf64_External_Rela.
1560
1561 2003-08-01 Nick Clifton <nickc@redhat.com>
1562
1563 * config.bfd: Add code to catch obsolete configurations and warn
1564 about them unless --enable-obsolete is used. Use this to mark
1565 vax-vms port as obsolete.
1566
1567 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1568
1569 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1570 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1571 Formatting.
1572 * elfxx-target.h: Remove PARAMS macro. Formatting.
1573
1574 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1575
1576 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1577 * elf64-ppc.c (get_fdh): New function, split out from
1578 ppc64_elf_edit_opd.
1579 (ppc64_elf_check_relocs): Use get_fdh.
1580 (func_desc_adjust): Likewise. Tidy.
1581 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1582 exit. Use get_fdh. Account for superfluous dynamic relocs.
1583 (ppc64_elf_relocate_section): Warning fix.
1584
1585 2003-07-30 Jason Eckhardt <jle@rice.edu>
1586
1587 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1588
1589 2003-07-30 Jason Eckhardt <jle@rice.edu>
1590
1591 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1592
1593 2003-07-30 Randolph Chung <tausq@debian.org>
1594
1595 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1596 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1597
1598 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1599
1600 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1601 Replace PTR with void *. Formatting.
1602 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1603 (make_mapping): Likewise.
1604
1605 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1606
1607 * elf64-ppc.c (func_desc_adjust): Give linker created function
1608 descriptor symbols a size and type.
1609 (ppc64_elf_relocate_section): Correct lq insn test.
1610
1611 2003-07-28 Eric Christopher <echristo@redhat.com>
1612
1613 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1614 (ppc_elf_install_value): New function.
1615 (ppc_elf_sort_rela): Remove.
1616 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1617 and replace with out of range branch stubs.
1618 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1619
1620 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1621
1622 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1623 from input_bfd.
1624
1625 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1626
1627 * elf.c (special_sections): Set attributes for .got and .plt.
1628
1629 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1630
1631 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1632 on function descriptors.
1633 (ELIMINATE_COPY_RELOCS): Expand comment.
1634 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1635 Do include ".toc1".
1636
1637 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1638
1639 * elf.c (_bfd_elf_new_section_hook): Set the default section
1640 type to SHT_NULL.
1641 (elf_fake_sections): Set the section type based on asect->flags
1642 if it is SHT_NULL. Don't abort on processor specific section
1643 types.
1644
1645 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1646
1647 * bfd-in2.h: Regenerated.
1648
1649 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1650
1651 * elf-bfd.h (bfd_elf_special_section): New.
1652 (elf_backend_data): Add special_sections, a pointer to
1653 bfd_elf_special_section.
1654 (elf_section_type). New.
1655 (elf_section_flags): New.
1656 (_bfd_elf_get_sec_type_attr): New.
1657
1658 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1659 real section type/flags.
1660 (special_sections): New.
1661 (get_special_section): New.
1662 (_bfd_elf_get_sec_type_attr): New.
1663 (_bfd_elf_new_section_hook): Check special_section to set
1664 elf_section_type and elf_section_flags.
1665 (elf_fake_sections): Don't use section name to set ELF section
1666 data.
1667
1668 * elf32-m32r.c (m32r_elf_special_sections): New.
1669 (elf_backend_special_sections): Defined.
1670
1671 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1672 (elf_backend_special_sections): Defined.
1673
1674 * elf32-mcore.c (mcore_elf_special_sections): New.
1675 (elf_backend_special_sections): Defined.
1676
1677 * elf32-ppc.c (ppc_elf_special_sections): New.
1678 (elf_backend_special_sections): Defined.
1679
1680 * elf32-sh64.c (sh64_elf_special_sections): New.
1681 (elf_backend_special_sections): Defined.
1682
1683 * elf32-v850.c (v850_elf_special_sections): New.
1684 (elf_backend_special_sections): Defined.
1685
1686 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1687 (elf_backend_special_sections): Defined.
1688
1689 * elf64-alpha.c (elf64_alpha_special_sections): New.
1690 (elf_backend_special_sections): Defined.
1691
1692 * elf64-hppa.c (elf64_hppa_special_sections): New.
1693 (elf_backend_special_sections): Defined.
1694
1695 * elf64-ppc.c (ppc64_elf_special_sections): New.
1696 (elf_backend_special_sections): Defined.
1697
1698 * elf64-sh64.c (sh64_elf64_special_sections): New.
1699 (elf_backend_special_sections): Defined.
1700
1701 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1702 (elf_backend_special_sections): Defined.
1703
1704 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1705
1706 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1707 (elf_backend_special_sections): Defined.
1708
1709 * elfxx-target.h (elf_backend_special_sections): New. Default
1710 to NULL.
1711 (elfNN_bed): Initialize special_sections.
1712
1713 * section.c (bfd_abs_section): Remove const.
1714 (bfd_und_section): Likewise.
1715 (bfd_com_section): Likewise.
1716 (bfd_ind_section): Likewise.
1717
1718 2003-07-24 Nick Clifton <nickc@redhat.com>
1719
1720 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1721 sections are assigned the LOAD attribute.
1722
1723 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1724
1725 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1726 * elf32-sh64-com.c: Likewise.
1727 * elf32-sh64.c: Likewise.
1728 * elf32-sh64.h: Likewise.
1729 * elf64-sh64.c: Likewise.
1730
1731 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1732
1733 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1734 (allocate_dynrelocs): Likewise.
1735 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1736 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1737
1738 2003-07-24 Nick Clifton <nickc@redhat.com>
1739
1740 * po/fr.po: Updated French translation.
1741
1742 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1743
1744 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1745 near the beginning of the file. Swap order of arguments. Call
1746 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1747 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1748 (elf_xtensa_relocate_section): Likewise.
1749 (shrink_dynamic_reloc_sections): Likewise.
1750
1751 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1752
1753 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1754 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1755 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1756 first printing an error message.
1757 (elf_xtensa_finish_dynamic_sections): Likewise.
1758 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1759 discarding literal table entries.
1760 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1761 (elf_xtensa_do_asm_simplify): Likewise.
1762
1763 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1764
1765 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1766 we have a local symbol in common section.
1767
1768 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1769
1770 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1771 weak symbols.
1772
1773 2003-07-22 Nick Clifton <nickc@redhat.com>
1774
1775 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1776 expected RS6000 storage classes.
1777
1778 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1779
1780 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1781 output_bfd unused to silence gcc.
1782
1783 2003-07-21 Nick Clifton <nickc@redhat.com>
1784
1785 * po/sv.po: Updated Swedish translation.
1786
1787 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1788
1789 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1790 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1791 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1792 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1793 now done in _bfd_elf_symbol_refs_local_p.
1794 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1795 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1796 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1797
1798 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1799
1800 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1801
1802 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1803
1804 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1805 (SYMBOL_CALLS_LOCAL): Likewise.
1806
1807 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1808 immediately if symbol isn't defined locally.
1809
1810 2003-07-18 Richard Henderson <rth@redhat.com>
1811
1812 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1813 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1814 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1815 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1816 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1817 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1818 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1819 Update all callers to provide the relocation being resolved.
1820
1821 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1822
1823 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1824 targ_cflags.
1825
1826 2003-07-17 Nick Clifton <nickc@redhat.com>
1827
1828 * po/es.po: New Spanish translation.
1829 * po/sv.po: New Swedish translation.
1830 * po/opcodes.pot: Regenerate.
1831
1832 2003-07-16 Richard Henderson <rth@redhat.com>
1833
1834 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1835 * elfxx-ia64.c, targets.c: Likewise.
1836
1837 2003-07-16 Richard Henderson <rth@redhat.com>
1838
1839 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1840 for symbols defined locally plus -Bsymbolic. Tidy logic.
1841
1842 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1843
1844 * archures.c (bfd_mach_mips7000): New.
1845 * bfd-in2.h: Regenerated.
1846 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1847 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1848 (mips_mach_extensions): Add an entry for it.
1849
1850 2003-07-14 Nick Clifton <nickc@redhat.com>
1851
1852 * po/tr.po: Update with latest version.
1853 * po/SRC-POTFILES.in: Regenerate.
1854 * po/bfd.pot: Regenerate.
1855 * Makfile.in: Regenerate.
1856 * configure: Regenerate.
1857
1858 2003-07-12 Jeff Baker <jbaker@qnx.com>
1859
1860 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1861 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1862 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1863 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1864
1865 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1866
1867 * coffcode.h (coff_set_section_contents): Set the
1868 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1869
1870 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1871
1872 * bfd-in.h (bfd_h8300_pad_address): Declare.
1873 * bfd-in2.h: Regenerate.
1874 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1875 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1876 addresses before checking whether they can be relaxed.
1877 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1878 Don't complain about overflows in general 8-bit relocations.
1879 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1880 Fix handling of R_H8_DIR24A8.
1881
1882 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1883
1884 * elf32-h8300.c: Convert function prototypes and definitions
1885 to C90 syntax.
1886 * coff-h8300.c: Likewise.
1887 * cpu-h8300.c: Likewise.
1888
1889 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1890
1891 * po/SRC-POTFILES.in: Regenerate.
1892 * po/bfd.pot: Likewise.
1893
1894 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1895
1896 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1897 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1898 .xt.lit.plt section.
1899 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1900 and allocate memory for it.
1901 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1902 section to the .got.loc section.
1903 (elf_xtensa_finish_dynamic_sections): Fix up call to
1904 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1905 the address of .got.loc.
1906 (relax_property_section): Shrink .got.loc to match changes in any
1907 literal table section.
1908 (xtensa_is_property_section): Change to match
1909 xtensa_get_property_section_name.
1910 (xtensa_is_littable_section): New.
1911
1912 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1913
1914 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1915 -1LL.
1916
1917 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1918
1919 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1920 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1921 Run "make dep-am".
1922 * Makefile.in: Regenerate.
1923
1924 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1925
1926 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1927 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1928 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1929 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1930 * elf32-am33lin.c: Rename global functions.
1931 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1932 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1933 * configure.in (bfd_elf32_am33lin_vec): Added.
1934 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1935 (elf32-am33lin.lo): List dependencies.
1936 * aclocal.m4, configure, Makefile.in: Rebuilt.
1937 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1938 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1939 ELF_ARCH was not defined before.
1940 (elf_symbol_leading_char): Define if not defined.
1941 * elf32-am33lin.c: Override the definitions above.
1942 * targets.c (bfd_elf32_am33lin_vec): New.
1943
1944 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1945
1946 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1947 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1948 pcrel_relocs_copied.
1949 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1950 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1951 ld-linux.so.2 to ld.so.1.
1952 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1953 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1954 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1955 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1956 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1957 .rela.* section contents with bfd_zalloc.
1958 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1959 * elf-m10300.c: Added declarations for functions missing them.
1960 Merge some shared-library changes from the i386 back-end. Use
1961 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1962 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1963 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1964 members of elf_link_hash_entry. Adjusted references.
1965 (mn10300_elf_final_link_relocate): dynobj was already loaded
1966 into a local variable, use it.
1967 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1968 * elf-m10300.c: Add missing function prototypes.
1969 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1970 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1971 relocation for dynamic relocations.
1972 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1973 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1974 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1975 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1976 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1977 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1978 adress is already known at the time we compute relaxations.
1979 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1980 and PLT32 to narrower relocations.
1981 * libbfd.h, bfd-in2.h: Rebuilt.
1982 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1983 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1984 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1985 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1986 BFD_RELOC_MN10300_RELATIVE): New relocs.
1987 * libbfd.h, bfd-in2.h: Rebuilt.
1988 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1989 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1990 fields.
1991 (elf_mn10300_howto): Defined new relocation types.
1992 (mn10300_reloc_map): Map them.
1993 (_bfd_mn10300_elf_create_got_section): New fn.
1994 (mn10300_elf_check_relocs): Handle PIC relocs.
1995 (mn10300_elf_final_link_relocate): Likewise.
1996 (mn10300_elf_relocate_section): Handle DSOs.
1997 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1998 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1999 elf_mn10300_pic_plt_entry): New.
2000 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
2001 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
2002 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
2003 elf_mn10300_plt_reloc_offset: New macros.
2004 (ELF_DYNAMIC_INTERPRETER): Likewise.
2005 (_bfd_mn10300_elf_create_dynamic_sections): New function.
2006 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
2007 (_bfd_mn10300_elf_discard_copies): Likewise.
2008 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
2009 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2010 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
2011 (elf_backend_can_gc_sections,
2012 elf_backend_create_dynamic_sections,
2013 elf_backend_adjust_dynamic_sections,
2014 elf_backend_size_dynamic_sections,
2015 elf_backend_finish_dynamic_symbol,
2016 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2017 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2018 elf_backend_got_header_size, elf_backend_plt_header_size): New
2019 macros.
2020
2021 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2022
2023 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
2024 * elf-m10300.c (compute_function_info): Account for AM33
2025 registers in `movm' when computing stack space for `call' when
2026 linking for AM33/2.0 link.
2027 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2028 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2029 * bfd-in2.h: Rebuilt.
2030 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2031 * elf-m10300.c: Updated.
2032 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2033 * archures.c (bfd_mach_am332): Defined.
2034 * bfd-in2.h: Rebuilt.
2035 * cpu-m10300.c (bfd_am332_arch): Defined.
2036 (bfd_am33_arch): Chained with am33-2.
2037 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2038 (_bfd_mn10300_elf_final_write_processing): Likewise.
2039
2040 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2041
2042 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2043
2044 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2045
2046 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2047 (struct ppc64_elf_obj_tdata): New.
2048 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2049 (ppc64_elf_mkobject): New function.
2050 (struct got_entry): Add "owner". Move "tls_type".
2051 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2052 (ppc64_elf_init_stub_bfd): New function.
2053 (create_got_section): Create header .got in dynobj. Create .got
2054 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2055 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2056 Look for dynobj .got, and test it.
2057 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2058 (update_local_sym_info): Likewise.
2059 (ppc64_elf_check_relocs): Likewise.
2060 (ppc64_elf_gc_sweep_hook): Likewise.
2061 (ppc64_elf_tls_optimize): Likewise.
2062 (allocate_dynrelocs): Likewise.
2063 (ppc64_elf_size_dynamic_sections): Likewise.
2064 (ppc64_elf_relocate_section): Likewise.
2065 (ppc64_elf_next_toc_section): Update comment.
2066 (toc_adjusting_stub_needed): Remove unneeded cast.
2067 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2068 testing section flags.
2069 (ppc64_elf_build_stubs): Likewise.
2070 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2071 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2072 (func_desc_adjust): Copy over dynamic info for undef weaks.
2073 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2074 (ppc64_elf_size_stubs): Update prototype.
2075 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2076 input sections rather than scanning dynobj.
2077
2078 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2079
2080 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2081 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2082 (mips_elf_create_msym_section): Delete.
2083 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2084 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2085 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2086 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2087 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2088 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2089 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2090
2091 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2092
2093 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2094 symbols protected.
2095
2096 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2097
2098 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2099 of relocations whose offset is -2.
2100
2101 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2102
2103 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2104 forced-local symbols like other locals. Don't create relocations
2105 against STN_UNDEF in irix objects.
2106
2107 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2108
2109 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2110 compatible objects, add the values of defined external symbols
2111 to the addend.
2112
2113 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2114
2115 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2116 initialize a GOT entry to the symbol's st_value.
2117
2118 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2119
2120 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2121 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2122 (ppc_elf_tdata): Define.
2123 (elf_local_ptr_offsets): Adjust.
2124 (ppc_elf_mkobject): New function.
2125 (bfd_elf32_mkobject): Define.
2126
2127 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2128 * elfcore.h (elf_core_file_p): Likewise.
2129 * section.c (bfd_section_init): Remove prototype.
2130
2131 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2132
2133 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2134 field.
2135 (enum elf_linker_section_enum): Delete.
2136 (struct elf_linker_section): Delete.
2137 (struct elf_linker_section_pointers): Delete.
2138 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2139 Make linker_section_pointers a void**.
2140 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2141 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2142 of old item in elf-bfd.h.
2143 (struct elf_linker_section): Likewise.
2144 (struct elf_linker_section_pointers): Likewise.
2145 (elf_local_ptr_offsets): Define.
2146 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2147 (ppc_elf_link_hash_newfunc): Init it.
2148 (struct ppc_elf_link_hash_table): Add sbss.
2149 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2150 individual fields.
2151 (elf_create_linker_section): Fold into..
2152 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2153 Make rela section here if shared.
2154 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2155 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2156 clearing in a loop.
2157 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2158 section here.
2159 (ppc_elf_check_relocs): Adjust.
2160 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2161 creating .sbss by hand.
2162 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2163
2164 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2165
2166 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2167 complain_overflow_bitfield.
2168 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2169 complain_overflow_bitfield.
2170
2171 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2172
2173 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2174 true even if -pie.
2175
2176 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2177
2178 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2179 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2180 !info->executable.
2181 (get_fptr): For -pie create .opd as writable section and create
2182 .rela.opd as well.
2183 (elfNN_ia64_check_relocs): Change info->shared into
2184 !info->executable.
2185 (allocate_fptr): Likewise.
2186 (allocate_dynrel_entries): Account for a relative reloc for -pie
2187 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2188 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2189 section if -pie.
2190 (set_got_entry): Don't create a relative reloc if -pie
2191 want_ltoff_fptr for undefweak symbol.
2192 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2193 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2194 @fptr().
2195
2196 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2197 even if -pie.
2198 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2199 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2200 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2201 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2202 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2203 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2204 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2205 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2206 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2207
2208 2003-07-04 Paul Clarke <paulc@senet.com.au>
2209
2210 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2211 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2212 <R_H8_DIR32A16>: Fix type of relocation.
2213
2214 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2215
2216 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2217 sections were created already. Remove unnecessary tests of
2218 the previous change.
2219
2220 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2221
2222 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2223 bfd_make_section for existing sections.
2224
2225 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2226
2227 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2228 create_got_section if we already have done so.
2229 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2230 (sh_elf_check_relocs): Likewise.
2231 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2232 htab->root.dynobj instead.
2233 (sh_elf_check_relocs): Likewise.
2234 (sh_elf_finish_dynamic_sections): Likewise.
2235
2236 * section.c (bfd_make_section): Return NULL for existing section.
2237
2238 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2239
2240 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2241 ppc_elf_create_got if we've already done so.
2242
2243 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2244 (_bfd_elf_find_pointer_linker_section): Likewise.
2245 (bfd_elf32_create_pointer_linker_section): Likewise.
2246 (bfd_elf32_finish_pointer_linker_section): Likewise.
2247 (bfd_elf64_create_pointer_linker_section): Likewise.
2248 (bfd_elf64_finish_pointer_linker_section): Likewise.
2249 (_bfd_elf_make_linker_section_rela): Likewise.
2250 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2251 (elf_finish_pointer_linker_section): Likewise.
2252 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2253 (_bfd_elf_create_linker_section): Move this function..
2254 (_bfd_elf_find_pointer_linker_section): ..and this..
2255 * elflink.h (elf_create_pointer_linker_section): ..and this..
2256 (elf_finish_pointer_linker_section): ..and this..
2257 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2258 calls.
2259 (elf_create_linker_section): Convert to C90, tidy.
2260 (elf_find_pointer_linker_section): Likewise.
2261 (elf_create_pointer_linker_section): Likewise.
2262 (elf_finish_pointer_linker_section): Likewise.
2263 * elf32-i370.c: Delete #if 0 code.
2264
2265 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2266
2267 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2268 _restf* to be satisfied by shared libs, and always force them local.
2269 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2270 Correct test for "bl".
2271 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2272 primary opcode 31.
2273
2274 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2275
2276 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2277 (s390_tls_reloc): New function.
2278 (elf_howto_table): Add long displacement relocations R_390_20,
2279 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2280 (elf_s390_reloc_type_lookup): Likewise.
2281 (elf_s390_check_relocs): Likewise.
2282 (elf_s390_gc_sweep_hook): Likewise.
2283 (elf_s390_relocate_section): Likewise.
2284 * elf64-s390.c: Same changes as for elf32-s390.c.
2285 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2286 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2287 BFD_RELOC_390_TLS_GOTIE20.
2288 * bfd-in2.h: Regenerate.
2289 * libbfd.h: Likewise.
2290
2291 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2292
2293 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2294 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2295
2296 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2297
2298 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2299 Replace PTR with void *. Formatting.
2300 * archive64.c: Likewise.
2301 * archures.c: Likewise.
2302 * bfd-in.h: Likewise.
2303 * bfd.c: Likewise.
2304 * bfdio.c: Likewise.
2305 * bfdwin.c: Likewise.
2306 * cache.c: Likewise.
2307 * corefile.c: Likewise.
2308 * format.c: Likewise.
2309 * init.c: Likewise.
2310 * libbfd-in.h: Likewise.
2311 * libbfd.c: Likewise.
2312 * linker.c: Likewise.
2313 * opncls.c: Likewise.
2314 * reloc.c: Likewise.
2315 * section.c: Likewise.
2316 * simple.c: Likewise.
2317 * syms.c: Likewise.
2318 * targets.c: Likewise.
2319 * bfd-in2.h: Regenerate.
2320 * libbfd.h: Regenerate.
2321
2322 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2323 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2324 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2325 (bfd_getb64): Rewrite without parens.
2326 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2327 * cache.c (insert, snip): Remove INLINE.
2328 * linker.c (bfd_link_add_undef): Likewise.
2329
2330 2003-06-29 Andreas Jaeger <aj@suse.de>
2331
2332 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2333 unnecessary prototypes. Replace PTR with void *.
2334 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2335 trim plt entries. Move undefweak non-default visibility test ...
2336 (allocate_dynrelocs): ... from here.
2337 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2338 Change all callers.
2339 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2340 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2341 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2342 dynreloc and .got relocs.
2343 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2344 for .got relocs.
2345
2346 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2347
2348 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2349
2350 2003-06-27 Nick Clifton <nickc@redhat.com>
2351
2352 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2353 bfd_add_gnu_debuglink_section and only create the section, do not
2354 fill in its contents.
2355 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2356 contents of a .gnu-debuglink section.
2357 * bfd-in2.h: Regenerate.
2358
2359 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2360
2361 * elfxx-mips.c: Revert .got alignment to 2**4.
2362
2363 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2364
2365 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2366
2367 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2368
2369 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2370 relocation header setup.
2371
2372 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2373
2374 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2375 (ppc_elf_reloc_type_lookup): Modify comment.
2376 (ppc_elf_info_to_howto): Ditto.
2377 (ppc_elf_relocate_section): Ditto.
2378 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2379
2380 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2381
2382 * aout-ns32k.c: Correct spelling of "relocatable".
2383 * aoutx.h: Likewise.
2384 * bfd-in.h: Likewise.
2385 * bfd.c: Likewise.
2386 * bout.c: Likewise.
2387 * coff-a29k.c: Likewise.
2388 * coff-alpha.c: Likewise.
2389 * coff-arm.c: Likewise.
2390 * coff-i386.c: Likewise.
2391 * coff-i860.c: Likewise.
2392 * coff-i960.c: Likewise.
2393 * coff-m68k.c: Likewise.
2394 * coff-m88k.c: Likewise.
2395 * coff-mcore.c: Likewise.
2396 * coff-mips.c: Likewise.
2397 * coff-or32.c: Likewise.
2398 * coff-ppc.c: Likewise.
2399 * coff-rs6000.c: Likewise.
2400 * coff-sh.c: Likewise.
2401 * coff-tic80.c: Likewise.
2402 * coff64-rs6000.c: Likewise.
2403 * cofflink.c: Likewise.
2404 * cpu-ns32k.c: Likewise.
2405 * ecoff.c: Likewise.
2406 * ecofflink.c: Likewise.
2407 * elf-bfd.h: Likewise.
2408 * elf-eh-frame.c: Likewise.
2409 * elf-hppa.h: Likewise.
2410 * elf-m10200.c: Likewise.
2411 * elf-m10300.c: Likewise.
2412 * elf.c: Likewise.
2413 * elf32-arm.h: Likewise.
2414 * elf32-avr.c: Likewise.
2415 * elf32-cris.c: Likewise.
2416 * elf32-d10v.c: Likewise.
2417 * elf32-dlx.c: Likewise.
2418 * elf32-fr30.c: Likewise.
2419 * elf32-frv.c: Likewise.
2420 * elf32-h8300.c: Likewise.
2421 * elf32-hppa.c: Likewise.
2422 * elf32-i370.c: Likewise.
2423 * elf32-i386.c: Likewise.
2424 * elf32-i860.c: Likewise.
2425 * elf32-i960.c: Likewise.
2426 * elf32-ip2k.c: Likewise.
2427 * elf32-iq2000.c: Likewise.
2428 * elf32-m32r.c: Likewise.
2429 * elf32-m68hc11.c: Likewise.
2430 * elf32-m68hc1x.c: Likewise.
2431 * elf32-m68k.c: Likewise.
2432 * elf32-mcore.c: Likewise.
2433 * elf32-mips.c: Likewise.
2434 * elf32-msp430.c: Likewise.
2435 * elf32-openrisc.c: Likewise.
2436 * elf32-ppc.c: Likewise.
2437 * elf32-s390.c: Likewise.
2438 * elf32-sh.c: Likewise.
2439 * elf32-sh64.c: Likewise.
2440 * elf32-sparc.c: Likewise.
2441 * elf32-v850.c: Likewise.
2442 * elf32-vax.c: Likewise.
2443 * elf32-xstormy16.c: Likewise.
2444 * elf32-xtensa.c: Likewise.
2445 * elf64-alpha.c: Likewise.
2446 * elf64-hppa.c: Likewise.
2447 * elf64-mips.c: Likewise.
2448 * elf64-mmix.c: Likewise.
2449 * elf64-ppc.c: Likewise.
2450 * elf64-s390.c: Likewise.
2451 * elf64-sh64.c: Likewise.
2452 * elf64-sparc.c: Likewise.
2453 * elf64-x86-64.c: Likewise.
2454 * elfcode.h: Likewise.
2455 * elflink.h: Likewise.
2456 * elfn32-mips.c: Likewise.
2457 * elfxx-ia64.c: Likewise.
2458 * elfxx-mips.c: Likewise.
2459 * i386linux.c: Likewise.
2460 * ieee.c: Likewise.
2461 * libcoff-in.h: Likewise.
2462 * linker.c: Likewise.
2463 * m68klinux.c: Likewise.
2464 * pdp11.c: Likewise.
2465 * pe-mips.c: Likewise.
2466 * peXXigen.c: Likewise.
2467 * reloc.c: Likewise.
2468 * reloc16.c: Likewise.
2469 * sparclinux.c: Likewise.
2470 * sunos.c: Likewise.
2471 * syms.c: Likewise.
2472 * versados.c: Likewise.
2473 * vms.c: Likewise.
2474 * xcofflink.c: Likewise.
2475 * bfd-in2.h: Regenerate.
2476 * libcoff.h: Regenerate.
2477 * libbfd.h: Regenerate.
2478
2479 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2480
2481 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2482 local sym errors.
2483
2484 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2485 prototypes and casts. Replace PTR with void *. Formatting.
2486 * elf32-ppc.c: Likewise. Break long strings too.
2487 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2488 (ppc_elf_unhandled_reloc): Internationalize error message.
2489 * elf32-ppc.h: Remove PARAMS.
2490
2491 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2492
2493 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2494 APUinfo slots.
2495 (ppc_elf_final_write_processing): Likewise.
2496
2497 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2498
2499 * elflink.h (elf_link_input_bfd): Check raw size when using
2500 kept_section to preserve debug information discarded by
2501 linkonce.
2502
2503 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2504
2505 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2506 (ppc64_elf_setup_section_lists): Set it.
2507 (ppc64_elf_relocate_section): Check sym section id against top_id.
2508 (ppc_build_one_stub): Comment on top_id.
2509
2510 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2511
2512 * config.bfd: Add tic4x-*-rtems*.
2513
2514 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2515
2516 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2517 prototypes and casts. Replace PTR with void *. Format copyright.
2518 Mention ABI links.
2519 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2520 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2521 (ppc_type_of_stub): Make r_type an enum.
2522 (ppc64_elf_size_stubs): Likewise.
2523 * elf64-ppc.h: Remove PARAMS macro.
2524
2525 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2526
2527 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2528 elf hash tab fields.
2529
2530 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2531 (ppc64_elf_info_to_howto): Likewise.
2532 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2533 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2534
2535 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2536
2537 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2538 reloc overflow on discarded eh_frame entries.
2539
2540 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2541
2542 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2543 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2544 Return error condition.
2545 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2546 that have has_gp_reloc set.
2547 (struct ppc_link_hash_table): Add stub_count.
2548 (ppc_build_one_stub): Increment it.
2549 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2550 individual fields.
2551 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2552
2553 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2554
2555 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2556 size calculation from addend. Round size up.
2557
2558 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2559
2560 * elf32-cris.c (cris_elf_relocate_section) <case
2561 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2562 symbol from a normal object or an undefined weak symbol.
2563
2564 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2565
2566 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2567 R_PPC64_TOC relocs.
2568
2569 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2570
2571 * section.c (struct sec): Put back kept_section.
2572 (STD_SECTION): Put back kept_section initialization.
2573 * bfd-in2.h: Regenerate.
2574
2575 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2576 sections for relocateable output. Use kept_section to preserve
2577 debug information discarded by linkonce.
2578
2579 2003-06-17 Roland McGrath <roland@redhat.com>
2580
2581 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2582 segment-relative relocation between different segments.
2583
2584 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2585
2586 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2587 optimizations earlier.
2588
2589 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2590 Restore previous input_list type.
2591 (ppc64_elf_link_hash_table_create): Undo last change.
2592 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2593 per output section, but don't bother with bfd_abs_section marker.
2594 (ppc64_elf_next_input_section): Adjust for multiple input section
2595 lists.
2596 (group_sections): Likewise.
2597
2598 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2599
2600 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2601 *r_offset == r_addend for RELATIVE relocs against .got.
2602
2603 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2604
2605 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2606
2607 2003-06-17 Nick Clifton <nickc@redhat.com>
2608
2609 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2610 in the vtable_entries_used array to allow for the accessing
2611 the largest element.
2612
2613 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2614
2615 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2616 input_list.
2617 (ppc64_elf_link_hash_table_create): Init input_list here.
2618 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2619 per output section. Set toc_off for abs and other standard sections.
2620 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2621 (ppc64_elf_next_input_section): Adjust for single input section list.
2622 Don't set toc_curr from input bfds that haven't set elf_gp.
2623 (group_sections): Adjust for single input section list.
2624
2625 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2626
2627 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2628
2629 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2630 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2631 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2632 got section for RELATIVE relocs. Fix wrong comment. Change condition
2633 under which dynamic relocs update the section contents.
2634
2635 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2636
2637 * config.bfd: Add i386-netbsd-gnu target.
2638
2639 2003-06-12 Nick Clifton <nickc@redhat.com>
2640
2641 * opncls.c (calc_crc32): Rename to
2642 bfd_calc_gnu_debuglink_crc32 and export.
2643 (GNU_DEBUGLINK): Define and use to replace occurrences of
2644 hard-coded ".gnu_debuglink" in the code.
2645 (get_debug_link_info): Prevent aborts by replacing call to
2646 xmalloc with a call to malloc.
2647 (find_separate_debug_file): Prevent aborts by replacing calls
2648 to xmalloc and xstrdup with calls to malloc and strdup.
2649 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2650 section to a bfd.
2651 * bfd-in2.h: Regenerate.
2652
2653 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2654
2655 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2656 New target (was i[3-7]86-*-openbsd* before).
2657 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2658 (vax-*-openbsd*): New target.
2659
2660 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2661
2662 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2663 for n32, too.
2664 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2665 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2666 (mips_elf_create_got_section): Likewise.
2667 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2668
2669 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2670
2671 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2672 (elf_mips_howto_table_rel): Use it.
2673 (gprel32_with_gp): Move prototype.
2674 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2675 Use mips_elf_generic_reloc.
2676 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2677 Code cleanup.
2678 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2679 zero addend.
2680 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2681 as in the other *_gprel*_reloc functions.
2682 (gprel32_with_gp): Handle partial_inplace properly.
2683 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2684 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2685 Do addend handling directly instead of calling
2686 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2687 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2688 of zero addend. Handle partial_inplace properly.
2689 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2690 addend.
2691 (mips_elf64_gprel16_reloc): Likewise.
2692 (mips_elf64_literal_reloc): Likewise.
2693 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2694 logic as in the other *_gprel*_reloc functions. Handle
2695 partial_inplace properly.
2696 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2697 addend. Handle partial_inplace properly.
2698 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2699 of calling _bfd_mips_elf_gprel16_with_gp.
2700 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2701 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2702 of zero addend.
2703 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2704 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2705 of calling _bfd_mips_elf_gprel16_with_gp.
2706 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2707 partial_inplace properly. Fix wrong addend handling. Fix overflow
2708 check.
2709 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2710 exported.
2711 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2712 (_bfd_mips_elf_relocate_section): Likewise.
2713 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2714 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2715 (_bfd_mips_elf_sign_extend): New prototype.
2716
2717 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2718
2719 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2720 New target (was sparc-*-openbsd* before).
2721 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2722
2723 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2724 * configure: Regenerate.
2725
2726 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2727
2728 * po/Make-in (DESTDIR): New.
2729 (install-data-yes): Support $(DESTDIR).
2730 (uninstall): Likewise.
2731
2732 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2733
2734 * Makefile.am (config.status): Depend on version.h.
2735 Run "make dep-am".
2736 * Makefile.in: Regenerate.
2737 * po/SRC-POTFILES.in: Regenerate.
2738
2739 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2740 Gary Hade <garyhade@us.ibm.com>
2741
2742 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2743
2744 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2745
2746 * archures.c (bfd_mach_h8300sxn): New architecture.
2747 * bfd-in2.h: Regenerate.
2748 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2749 (h8300sxn_info_struct): New.
2750 (h8300sx_info_struct): Link to it.
2751 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2752 (elf32_h8_final_write_processing): Likewise.
2753
2754 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2755
2756 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2757 elfxx-target.h so that we can use elf_backend_got_header_size.
2758 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2759 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2760 associated macros.
2761 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2762 dst_mask.
2763 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2764 ppc_stub_plt_branch_r2off.
2765 (struct ppc_stub_hash_entry): Reorganize.
2766 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2767 toc_curr, toc_off and emit_stub_syms.
2768 (ppc64_elf_link_hash_table_create): Init them.
2769 (ppc_stub_name): Correct string size.
2770 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2771 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2772 used.
2773 (ppc_type_of_stub): Tweak root.type test.
2774 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2775 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2776 ppc_stub_plt_branch_r2off.
2777 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2778 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2779 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2780 Initialize elf_gp and toc_curr.
2781 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2782 (ppc64_elf_next_input_section): Set toc_off.
2783 (group_sections): Ensure groups have the same TOC.
2784 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2785 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2786 Build new glink stub.
2787 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2788 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2789 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2790 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2791 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2792 (STD_SECTION): Update.
2793 * ecoff.c (bfd_debug_section): Update comment.
2794 * bfd-in2.h: Regenerate.
2795
2796 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2797
2798 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2799 NULL function pointers.
2800
2801 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2802
2803 * simple.c (bfd_simple_get_relocated_section_contents): Call
2804 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2805
2806 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2807
2808 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2809 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2810 swaptables.
2811 * coff-tic4x.c: Ditto
2812 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2813 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2814 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2815 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2816 swap tables.
2817 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2818 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2819 * coff-apollo.c: Ditto
2820 * coff-arm.c: Ditto
2821 * coff-h8300.c: Ditto
2822 * coff-h8500.c: Ditto
2823 * coff-i960.c: Ditto
2824 * coff-m68k.c: Ditto
2825 * coff-m88k.c: Ditto
2826 * coff-mcore.c: Ditto
2827 * coff-sh.c: Ditto
2828 * coff-sparc.c: Ditto
2829 * coff-tic80.c: Ditto
2830 * coff-we32k.c: Ditto
2831 * coff-z8k.c: Ditto
2832 * coff-w65.c: Ditto
2833
2834 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2835
2836 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2837 initialization bug
2838
2839 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2840
2841 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2842 (bfd_section_from_phdr): Likewise.
2843 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2844 (get_program_header_size): Count with PT_GNU_STACK.
2845 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2846 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2847
2848 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2849
2850 * elflink.h (elf_link_input_bfd): Call linker error_handler
2851 for discarded definitions.
2852
2853 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2854
2855 * syms.c (decode_section_type): Return 'n' if section flags are
2856 SEC_HAS_CONTENTS && SEC_READONLY.
2857
2858 2003-06-03 Nick Clifton <nickc@redhat.com>
2859
2860 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2861 R_V850_ABS32. Add entry for R_V850_REL32.
2862 (v850_elf_reloc_map): Likewise.
2863 (v850_elf_check_relocs): Likewise.
2864 (v850_elf_perform_relocation): Likewise.
2865 (v850_elf_final_link_relocate): Likewise. Include computation
2866 to make R_V850_REl32 pc-relative.
2867
2868 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2869
2870 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2871 and DT_DEBUG dynamic tag even for position independent executables.
2872 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2873
2874 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2875
2876 * config.bfd: Move obsolete entries out of the range of the
2877 targmatch sed script.
2878
2879 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2880
2881 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2882
2883 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2884
2885 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2886 plt entries, not just 8191.
2887
2888 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2889
2890 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2891 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2892
2893 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2894 Jakub Jelinek <jakub@redhat.com>
2895
2896 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2897 instead of info->shared where appropriate.
2898 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2899 * elflink.c (_bfd_elf_create_got_section): Likewise.
2900 (_bfd_elf_link_create_dynamic_sections): Likewise.
2901 (_bfd_elf_link_assign_sym_version): Likewise.
2902 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2903 and DT_DEBUG dynamic tag even for position independent executables.
2904 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2905 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2906 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2907 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2908 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2909 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2910 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2911 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2912 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2913
2914 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2915
2916 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2917 signalled thread.
2918 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2919
2920 2003-05-29 Nick Clifton <nickc@redhat.com>
2921
2922 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2923 Tidy up formatting.
2924 * Makefile.am: Add dependency on safe-ctype.h.
2925 * Makefile.in: Regenerate.
2926
2927 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2928
2929 * elfxx-mips.c: Don't force symbols local unconditionally.
2930
2931 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2932
2933 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2934 undefined_symbol call.
2935
2936 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2937
2938 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2939 (mips_elf_link_hash_table): Likewise.
2940
2941 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2942
2943 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2944 R_MIPS_GNU_REL16_S2 support.
2945 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2946 (mips_elf64_rtype_to_howto): Use it.
2947 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2948 R_MIPS_GNU_REL16_S2 support.
2949 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2950 (mips_elf_n32_rtype_to_howto): Use it.
2951
2952 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2953
2954 * som.h: Define PA_2_0 before including a.out.h
2955
2956 2003-05-07 Eric Christopher <echristo@redhat.com>
2957 Alexandre Oliva <aoliva@redhat.com>
2958
2959 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2960 pic tests, change to warning.
2961 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2962
2963 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2964
2965 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2966 well as shle-...-netbsdelf. Remove duplicate entry.
2967
2968 2003-05-21 Nick Clifton <nickc@redhat.com>
2969
2970 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2971 for X_STORMY16_REL_12 reloc.
2972
2973 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2974 the type of the hash table in the bfd_link_info structure.
2975 (bfd_elf_get_runpath_list): Likewise.
2976
2977 2003-05-19 Roland McGrath <roland@redhat.com>
2978
2979 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2980 * bfd-in.h: Declare it.
2981 * bfd-in2.h: Regenerated.
2982 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2983 * elf-bfd.h (struct elf_backend_data): New function pointer member
2984 elf_backend_bfd_from_remote_memory.
2985 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2986 Declare them.
2987 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2988 (elfNN_bed): Add that to the initializer.
2989
2990 2003-05-15 Roland McGrath <roland@redhat.com>
2991
2992 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2993
2994 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2995
2996 * elflink.h (elf_link_output_extsym): Only issue error about !=
2997 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2998
2999 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
3000
3001 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
3002 when removing the old definition for symbols with non-default
3003 visibility.
3004
3005 2003-05-18 Jason Eckhardt <jle@rice.edu>
3006
3007 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
3008
3009 2003-05-17 Andreas Schwab <schwab@suse.de>
3010
3011 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
3012 elf_section_data during processing of pc-relative and absolute
3013 relocations.
3014 (elf_m68k_relocate_section): Use the cached reloc section instead
3015 of computing it again. Fix handling of visibility. Don't modify
3016 addend when copying over a relocation into the output.
3017
3018 2003-05-17 Alan Modra <amodra@bigpond.net.au>
3019
3020 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3021 to trim plt entries. Move undefweak non-default visibility test..
3022 (allocate_dynrelocs): ..from here.
3023 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
3024 dynamic_sections_created here. Update comment. Move undefweak
3025 non-default visibility test..
3026 (allocate_dynrelocs): ..from here. Fix comment.
3027 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3028 to trim plt entries. Move undefweak non-default visibility test..
3029 (allocate_dynrelocs): ..from here. Fix comment.
3030 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3031 STV_DEFAULT rather than comparing with zero.
3032 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3033 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3034
3035 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3036
3037 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3038 pointers.
3039 (_bfd_set_gp_value): Likewise.
3040
3041 2003-05-16 Michael Snyder <msnyder@redhat.com>
3042 From Bernd Schmidt <bernds@redhat.com>
3043 * archures.c (bfd_mach_h8300sx): New.
3044 * bfd-in2.h: Regenerate.
3045 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3046 (h8300sx_info_struct): New.
3047 (h8300s_info_struct): Link to it.
3048 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3049 (elf32_h8_final_write_processing): Likewise.
3050 (elf32_h8_relax_section): Likewise.
3051
3052 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3053
3054 * config.bfd: Accept i[3-7]86 variants.
3055 * configure.host: Likewise.
3056 * configure.in: Likewise.
3057 * configure: Regenerate.
3058
3059 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3060
3061 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3062 symbol.
3063
3064 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3065
3066 * elflink.h (elf_link_check_versioned_symbol): Also allow
3067 the base version.
3068
3069 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3070 H.J. Lu <hongjiu.lu@intel.com>
3071
3072 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3073 (elf_i386_relocate_section): Likewise.
3074 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3075 (ppc_elf_relocate_section): Likewise.
3076 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3077 (ppc64_elf_relocate_section): Likewise.
3078
3079 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3080
3081 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3082
3083 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3084
3085 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3086 processor capability, allow merge of HC12 and HCS12 in some cases.
3087 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3088 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3089 (bfd_m68hc12_arch): Link it.
3090 (scan_mach): New function.
3091
3092 2003-05-13 Andrew Haley <aph@redhat.com>
3093
3094 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3095
3096 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3097 H.J. Lu <hongjiu.lu@intel.com>
3098
3099 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3100 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3101 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3102 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3103 (ppc_elf_relocate_section): Likewise.
3104 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3105 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3106 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3107 relocs need no other types.
3108 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3109 dynreloc check.
3110 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3111 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3112 .got relocs.
3113
3114 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3115
3116 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3117 copy ELF_LINK_NON_GOT_REF from weakdef.
3118 (allocate_dynrelocs): For undef weak syms with non-default
3119 visibility, a) don't allocate plt entries, b) don't allocate
3120 .got relocs, c) discard dyn rel space
3121 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3122 don't generate dynamic relocs.
3123 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3124 for weakdefs when symbol already adjusted.
3125
3126 2003-05-12 Nick Clifton <nickc@redhat.com>
3127
3128 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3129 overflow detection for R_XSTORMY16_16 reloc.
3130
3131 2003-05-12 Paul Clarke <paulc@senet.com.au>
3132
3133 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3134
3135 2003-05-11 Jason Eckhardt <jle@rice.edu>
3136
3137 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3138 adjust upper bits.
3139 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3140 proper place.
3141 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3142 proper place.
3143
3144 2003-05-11 Andreas Schwab <schwab@suse.de>
3145
3146 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3147 complicated tests for unresolvable relocs with a simple direct
3148 scheme using "unresolved_reloc" var. Report some detail on
3149 bfd_reloc_outofrange and similar errors.
3150
3151 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3152
3153 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3154 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3155 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3156 * elf64-s390.c: Likewise.
3157
3158 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3159
3160 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3161 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3162 ELF_LINK_NON_GOT_REF from weakdef.
3163 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3164 already been adjusted before treating it specially.
3165 * el64-s390.c: Likwise.
3166
3167 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3168
3169 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3170 non-default visibility, a) don't make them dynamic, b) discard
3171 space for dynamic relocs.
3172 (elf_s390_relocate_section): Initialize the GOT entries and skip
3173 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3174 symbols with non-default visibility.
3175 * elf64-s390.c: Likewise.
3176
3177 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3178
3179 * cpu-arm.c (arm_check_note): Warning fix.
3180 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3181 to keep relocs if edited.
3182 (iq2000_elf_print_private_bfd_data): Return TRUE.
3183 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3184 ELF64_R_SYM.
3185 (elfNN_ia64_relax_ldxmov): Warning fix.
3186 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3187 * xtensa-modules.c (get_num_opcodes): Warning fix.
3188
3189 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3190
3191 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3192
3193 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3194
3195 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3196 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3197 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3198 (bfd_elf_record_link_assignment): Move from elflink.h.
3199 (_bfd_elf_merge_symbol): Likewise.
3200 (_bfd_elf_add_default_symbol): Likewise.
3201 (_bfd_elf_export_symbol): Likewise.
3202 (_bfd_elf_link_find_version_dependencies): Likewise.
3203 (_bfd_elf_link_assign_sym_version): Likewise.
3204 (_bfd_elf_link_read_relocs): Likewise.
3205 (_bfd_elf_link_size_reloc_section): Likewise.
3206 (_bfd_elf_fix_symbol_flags): Likewise.
3207 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3208 (_bfd_elf_link_sec_merge_syms): Likewise.
3209 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3210 and bed->s->sizeof_rela.
3211 (_bfd_elf_link_output_relocs): Likewise.
3212 * elf-bfd.h (struct elf_size_info): Rename file_align to
3213 log_file_align.
3214 (struct elf_info_failed): Move from elflink.h.
3215 (struct elf_assign_sym_version_info): Likewise.
3216 (struct elf_find_verdep_info): Likewise.
3217 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3218 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3219 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3220 _bfd_elf_link_assign_sym_version,
3221 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3222 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3223 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3224 _bfd_elf_link_sec_merge_syms): Declare.
3225 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3226 (_bfd_elf32_link_read_relocs): Likewise.
3227 (bfd_elf64_link_create_dynamic_sections): Likewise.
3228 (_bfd_elf64_link_read_relocs): Likewise.
3229 * elflink.h: Move lots o' stuff elsewhere.
3230 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3231 (bfd_elf64_record_link_assignment): Likewise.
3232 (bfd_elf_record_link_assignment): Declare.
3233 * bfd-in2.h: Regenerate.
3234 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3235 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3236 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3237 (assign_file_positions_for_segments): Likewise.
3238 (assign_file_positions_except_relocs): Likewise.
3239 (swap_out_syms, elfcore_write_note): Likewise.
3240 * elf-m10200.c: Adjust for changed function names.
3241 * elf-m10300.c: Likewise.
3242 * elf32-arm.h: Likewise.
3243 * elf32-h8300.c: Likewise.
3244 * elf32-hppa.c: Likewise.
3245 * elf32-ip2k.c: Likewise.
3246 * elf32-m32r.c: Likewise.
3247 * elf32-m68hc11.c: Likewise.
3248 * elf32-m68hc1x.c: Likewise.
3249 * elf32-m68k.c: Likewise.
3250 * elf32-mips.c: Likewise.
3251 * elf32-ppc.c: Likewise.
3252 * elf32-sh.c: Likewise.
3253 * elf32-v850.c: Likewise.
3254 * elf32-xtensa.c: Likewise.
3255 * elf64-alpha.c: Likewise.
3256 * elf64-hppa.c: Likewise.
3257 * elf64-mmix.c: Likewise.
3258 * elf64-ppc.c: Likewise.
3259 * elf64-sh64.c: Likewise.
3260 * elfxx-ia64.c: Likewise.
3261 * elfxx-mips.c: Likewise.
3262 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3263 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3264 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3265 * elf64-mips.c (mips_elf64_size_info): Likewise.
3266 * elf64-s390.c (s390_elf64_size_info): Likewise.
3267 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3268
3269 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3270
3271 * elflink.h (elf_add_default_symbol): After skipping the
3272 unversioned symbol, go to non-default one.
3273
3274 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3275
3276 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3277 want_plt field.
3278 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3279 for symbols with non-default visibility.
3280
3281 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3282
3283 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3284 case that a DSO references a hidden symbol which may be
3285 satisfied by a versioned symbol in another DSO.
3286 (elf_link_output_extsym): Check versioned definition for hidden
3287 symbol referenced by a DSO.
3288
3289 2003-05-07 Nick Clifton <nickc@redhat.com>
3290
3291 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3292 R_XSTORMY16_16 reloc to ignore overflows.
3293
3294 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3295
3296 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3297 error message for mixing different-endian files. Check for ABI
3298 compatibility of input files with the selected emulation.
3299
3300 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3301
3302 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3303 non-default visibility, a) don't make them dynamic, b) discard
3304 space for dynamic relocs.
3305 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3306
3307 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3308 non-default visibility, a) don't allocate plt entries, b) don't
3309 allocate .got relocs, c) discard dyn rel space,
3310 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3311 don't generate dynamic relocs.
3312 * elf64-ppc.c (allocate_dynrelocs): As above.
3313 (ppc64_elf_relocate_section): As above.
3314
3315 2003-05-05 Andreas Jaeger <aj@suse.de>
3316
3317 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3318 relocation entries for weak undefined symbols with non-default
3319 visibility.
3320 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3321 skip R_386_32/R_386_PC32 for weak undefined symbols with
3322 non-default visibility.
3323
3324 2003-05-04 H.J. Lu <hjl@gnu.org>
3325
3326 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3327 relocation entries for weak undefined symbols with non-default
3328 visibility.
3329 (elf_i386_relocate_section): Initialize the GOT entries and
3330 skip R_386_32/R_386_PC32 for weak undefined symbols with
3331 non-default visibility.
3332
3333 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3334 descriptors for weak undefined symbols with non-default
3335 visibility.
3336 (allocate_dynrel_entries): Don't allocate relocation entries
3337 for symbols resolved to 0.
3338 (set_got_entry): Don't install dynamic relocation for weak
3339 undefined symbols with non-default visibility.
3340 (set_pltoff_entry): Likewise.
3341
3342 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3343 with non-default visibility.
3344 (elf_link_output_extsym): Don't make weak undefined symbols
3345 with non-default visibility dynamic.
3346
3347 2003-05-04 H.J. Lu <hjl@gnu.org>
3348
3349 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3350
3351 2003-05-04 H.J. Lu <hjl@gnu.org>
3352
3353 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3354 symbol dynamic. Check indirection when removing the old
3355 definition for symbols with non-default visibility.
3356 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3357
3358 2003-05-02 Nick Clifton <nickc@redhat.com>
3359
3360 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3361 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3362 unsigned overflow.
3363
3364 2003-05-02 Andreas Jaeger <aj@suse.de>
3365
3366 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3367 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3368 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3369 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3370 ELF_LINK_NON_GOT_REF from weakdef.
3371
3372 2003-05-02 Charles Lepple <clepple@ghz.cc>
3373 Nick Clifton <nickc@redhat.com>
3374
3375 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3376 * aclocal.m4: Regenerate.
3377 * configure: Regenerate.
3378 * Makefile.in: Regenerate.
3379
3380 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3381
3382 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3383 weakdef sym has already been adjusted before treating it specially.
3384 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3385 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3386 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3387 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3388
3389 2003-04-28 H.J. Lu <hjl@gnu.org>
3390
3391 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3392 the relax finalize pass.
3393
3394 * section.c (struct sec): Add need_finalize_relax and remove
3395 flag11.
3396 (STD_SECTION): Update struct sec initializer.
3397 * bfd-in2.h: Regenerated.
3398
3399 2003-04-28 H.J. Lu <hjl@gnu.org>
3400
3401 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3402 to copy any information related to dynamic linking when we flip
3403 the indirection.
3404
3405 2003-04-27 H.J. Lu <hjl@gnu.org>
3406
3407 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3408 (ELF_LINK_DYNAMIC_WEAK): New.
3409
3410 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3411 a symbol should be skipped. Ignore definitions in dynamic
3412 objects for symbols with non-default visibility.
3413 (elf_add_default_symbol): Adjusted.
3414 (elf_link_add_object_symbols): Check if a symbol should be
3415 skipped. Don't merge the visibility field with the one from
3416 a dynamic object.
3417 (elf_link_check_versioned_symbol): Use undef_bfd.
3418 (elf_link_output_extsym): Warn if a forced local symbol is
3419 referenced from dynamic objects. Make non-weak undefined symbol
3420 with non-default visibility a fatal error.
3421
3422 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3423
3424 * configure.in: Bump version on HEAD to 2.14.90.
3425 * configure: Regenerated.
3426
3427 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3428
3429 PR savannah/3331:
3430 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3431 when we couldn't relax something.
3432
3433 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3434
3435 * elflink.h (elf_merge_symbol): When we find a regular definition
3436 for an indirect symbol, flip the indirection so that the old
3437 direct symbol now points to the new definition.
3438
3439 2003-04-24 Roland McGrath <roland@redhat.com>
3440
3441 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3442
3443 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3444
3445 * elf32-ppc.c: Formatting and comment fixes.
3446 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3447 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3448
3449 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3450
3451 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3452 * bfd-in2.h: Rebuilt.
3453 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3454 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3455 & H8300SNMAGIC.
3456 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3457 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3458 (h8300sn_info_struct, h8300hn_info_struct): New.
3459 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3460 (elf32_h8_final_write_processing): Likewise.
3461
3462 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3463
3464 * elf32-sh.c (tpoff): New.
3465 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3466 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3467 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3468 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3469 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3470 (dtpoff_base): Fix wrong indentation.
3471 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3472 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3473 R_SH_TLS_TPOFF32 relocations.
3474
3475 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3476
3477 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3478 * cpu-sh.c: Likewise.
3479 * elf32-sh.c: Likewise.
3480 * reloc.c (bfd_reloc_code_real): Likewise.
3481 * elf32-sh64-com.c: Change comment to refer to SuperH.
3482 * elf32-sh64.c: Likewise.
3483 * elf64-sh64.c: Likewise.
3484 * bfd-in2.h (enum bfd_architecture): Regenerate.
3485
3486 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3487
3488 From Julien LEMOINE <speedblue@debian.org>
3489 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3490 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3491
3492 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3493
3494 * archures.c: Replace references to Mitsubishi M32R with references
3495 to Renesas M32R.
3496 * relocs.c: Likewise.
3497 * bfd-in2.h: Regenerate.
3498
3499 2003-04-21 Richard Henderson <rth@redhat.com>
3500
3501 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3502 executable when a symbol is defined both regular and dynamic.
3503
3504 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3505
3506 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3507 (elf32-m68hc1x.lo): Update dependencies
3508 * configure.in: Add elf32-m68hc1x.lo.
3509 * configure: Rebuild.
3510 * Makefile.in: Rebuild.
3511
3512 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3513
3514 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3515 (m68hc11_elf_hash_table_create): New function.
3516 (elf32_m68hc11_link_hash_table_free): New function.
3517 (stub_hash_newfunc): New function.
3518 (m68hc11_add_stub): New function.
3519 (elf32_m68hc11_add_symbol_hook): New function.
3520 (elf32_m68hc11_setup_section_lists): New function.
3521 (elf32_m68hc11_next_input_section): New function.
3522 (elf32_m68hc11_size_stubs): New function.
3523 (elf32_m68hc11_build_stubs): New function.
3524 (m68hc11_get_relocation_value): New function.
3525 (elf32_m68hc11_relocate_section): Call the above to redirect
3526 some relocations to the trampoline code.
3527 (m68hc11_elf_export_one_stub): New function.
3528 (m68hc11_elf_set_symbol): New function.
3529 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3530 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3531 is not yet initialized.
3532
3533 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3534 (elf32_m68hc11_stub_hash_entry): New struct.
3535 (m68hc11_page_info): Add trampoline handler address.
3536 (m68hc11_elf_link_hash_table): Add stubs generation members.
3537 (elf32_m68hc11_add_symbol_hook): Declare.
3538 (elf32_m68hc11_setup_section_lists): Declare.
3539 (elf32_m68hc11_size_stubs): Declare.
3540 (elf32_m68hc11_build_stubs): Declare.
3541
3542 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3543 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3544 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3545 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3546 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3547 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3548 (bfd_elf32_bfd_link_hash_table_create): Define.
3549 (elf_backend_add_symbol_hook): Define.
3550 (m68hc11_elf_bfd_link_hash_table_create): New function.
3551 (m68hc11_elf_build_one_stub): New function.
3552 (m68hc11_elf_size_one_stub): New function.
3553 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3554 (bfd_elf32_bfd_link_hash_table_create): Define.
3555
3556 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3557 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3558 (m68hc12_phys_addr): Ditto.
3559 (m68hc12_phys_page): Ditto.
3560 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3561 (elf32_m68hc11_gc_mark_hook): Likewise.
3562 (elf32_m68hc11_gc_sweep_hook): Likewise.
3563 (elf32_m68hc11_check_relocs): Likewise.
3564 (elf32_m68hc11_relocate_section): Likewise.
3565 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3566 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3567 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3568 (m68hc12_elf_build_one_stub): New function.
3569 (m68hc12_elf_size_one_stub): New function.
3570 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3571 (elf_backend_add_symbol_hook): Define.
3572 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3573
3574 2003-04-18 Nick Clifton <nickc@redhat.com>
3575
3576 * format.c (bfd_check_format_matches): Only check associated
3577 vector if the matching_vector has been created.
3578
3579 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3580
3581 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3582 2003-04-09's change.
3583
3584 2003-04-15 Brian Ford <ford@vss.fsi.com>
3585
3586 * peicode.h (coff_swap_scnhdr_in): If a section holds
3587 uninitialized data and is from an object file or from an
3588 executable image that has not initialized the s_size field, or if
3589 the physical size is padded, use the virtual size (stored in
3590 s_paddr) instead.
3591
3592 2003-04-15 H.J. Lu <hjl@gnu.org>
3593
3594 * elflink.h (elf_link_add_object_symbols): Properly report
3595 filename for alignment reduction.
3596
3597 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3598
3599 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3600 * reloc.c: Likewise.
3601 * coff-h8300.c: Likewise.
3602 * coff-h8500.c: Likewise.
3603 * coff-sh.c: Likewise.
3604 * cpu-h8300.c: Likewise.
3605 * cpu-sh.c: Likewise.
3606 * elf32-h8300.c: Likewise.
3607 * elf32-sh.c: Likewise.
3608 * elf32-sh64-com.c: Likewise.
3609 * elf32-sh64.c: Likewise.
3610 * elf64-sh64.c: Likewise.
3611 * bfd-in2.h: Regenerate.
3612
3613 2003-04-14 H.J. Lu <hjl@gnu.org>
3614
3615 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3616 alignment for common symbols. Warn reducing alignment for
3617 common symbols. Report old filename when symbol size changes.
3618
3619 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3620
3621 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3622 occurrences of the same test changed in the previous patch.
3623 Optimize.
3624
3625 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3626
3627 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3628 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3629 GOT_DISP/addend only if the symbol got a global GOT entry.
3630
3631 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3632
3633 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3634 GOT_PAGE/GOT_OFST referencing overridable symbol to
3635 GOT_DISP/addend.
3636 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3637 global symbol as GOT_DISP.
3638
3639 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3640
3641 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3642 next relocation on an undefined symbol.
3643
3644 2003-04-09 Richard Henderson <rth@redhat.com>
3645
3646 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3647 Ignore relocations against r_symndx == 0.
3648
3649 2003-04-09 H.J. Lu <hjl@gnu.org>
3650
3651 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3652 FALSE for undefined symbols.
3653 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3654
3655 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3656
3657 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3658 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3659 addr_size.
3660
3661 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3662
3663 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3664 pointer size from ABI, not arch_bits_per_address.
3665
3666 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3667
3668 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3669 constants for n32 ABI.
3670
3671 2003-04-06 Andrew Cagney <cagney@redhat.com>
3672
3673 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3674 free that leads to GDB vs BFD memory corruption.
3675
3676 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3677
3678 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3679 symbols that mark the end of the section.
3680 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3681 converting to a relative branch so that the offset is computed after
3682 the relaxation; also relocate a jsr into a bsr if possible but don't
3683 relax them if they are to a far symbol as we need to call the
3684 trampoline code.
3685 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3686
3687 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3688
3689 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3690 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3691 * bfd-in2.h: Regenerate
3692 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3693 * cpu-tic4x.c: Ditto
3694
3695 2003-04-03 Nick Clifton <nickc@redhat.com>
3696
3697 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3698 differently for object files and executables.
3699 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3700 for object files or for executables who have not already
3701 initialised the field.
3702 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3703 the PE format bfd is an executable.
3704
3705 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3706
3707 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3708 here as it's too early to reliably determine locality.
3709 (ppc_elf_gc_sweep_hook): Likewise.
3710 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3711
3712 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3713
3714 * xtensa-modules.c: Remove comment indicating that this is a
3715 generated file.
3716
3717 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3718
3719 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3720
3721 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3722
3723 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3724 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3725 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3726 xtensa-modules.lo.
3727 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3728 xtensa-modules.c.
3729 (cpu-xtensa.lo): New target.
3730 (elf32-xtensa.lo): Likewise.
3731 (xtensa-isa.lo): Likewise.
3732 (xtensa-modules.lo): Likewise.
3733 * Makefile.in: Regenerate.
3734 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3735 (bfd_archures_list): Add bfd_xtensa_arch.
3736 * config.bfd: Handle xtensa-*-*.
3737 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3738 * configure: Regenerate.
3739 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3740 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3741 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3742 (bfd_elf32_xtensa_le_vec): Likewise.
3743 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3744 * cpu-xtensa.c: New file.
3745 * elf32-xtensa.c: Likewise.
3746 * xtensa-isa.c: Likewise.
3747 * xtensa-modules.c: Likewise.
3748 * libbfd.h: Regenerate.
3749 * bfd-in2.h: Likewise.
3750
3751 2003-04-01 Nick Clifton <nickc@redhat.com>
3752
3753 * archures.c (bfd_mach_arm_unknown): Define.
3754 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3755 bfd_arm_get_mach_from_notes): Prototype.
3756 * bfd-in2.h: Regenerate.
3757 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3758 bfd_arm_merge_machines.
3759 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3760 * coffcode.h (coff_set_arch_mach_hook): Call
3761 bfd_arm_get_mach_from_notes.
3762 * coffgen.c (coff_real_object_p): Revert previous delta.
3763 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3764 .note section.
3765 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3766 binaries compiled for different architectures..
3767 (bfd_arm_update_notes): New function: Update an ARM note section.
3768 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3769 number from an ARM note section.
3770 * elf32-arm.h (elf32_arm_object_p): Use
3771 bfd_arm_get_mach_from_notes.
3772 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3773 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3774
3775 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3776
3777 * dwarf2.c (read_attribute_value): Correct typo in comment.
3778
3779 2003-04-01 Nick Clifton <nickc@redhat.com>
3780
3781 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3782 instead of concat().
3783 (decode_line_info): Only free filename if it is not NULL.
3784 (add_line_info): Make a copy of the filename when storing it into
3785 the info structure.
3786
3787 2003-03-31 Andreas Schwab <schwab@suse.de>
3788 Daniel Jacobowitz <drow@mvista.com>
3789
3790 * simple.c (bfd_simple_get_relocated_section_contents): Add
3791 parameter symbol_table. Optionally use it instead of the symbol
3792 table from the bfd. Save and restore output offsets and output
3793 sections around bfd_get_relocated_section_contents. Fix a memory
3794 leak.
3795 (simple_save_output_info, simple_restore_output_info): New
3796 functions.
3797 * bfd-in2.h: Regenerate.
3798 * dwarf2.c (read_abbrevs): Use
3799 bfd_simple_get_relocated_section_contents instead of
3800 bfd_get_section_contents.
3801 (decode_line_info): Likewise.
3802 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3803 find_rela_addend.
3804 (find_rela_addend): Remove.
3805 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3806 debugging sections.
3807 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3808 not bfd_zalloc.
3809
3810 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3811
3812 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3813 bfd_alloc.
3814 * dwarf2.c (concat_filename): Always allocate space for the
3815 returned filename.
3816 (decode_line_info): Free the allocated filename returned by
3817 concat_filename.
3818 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3819 * elf.c (copy_private_bfd_data): Likewise.
3820 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3821 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3822 * format.c (bfd_check_format_matches): Likewise.
3823 * linker.c (bfd_generic_final_link): Likewise.
3824 * opncls.c (find_separate_debug_info): Likewise.
3825 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3826
3827 2003-03-28 H.J. Lu <hjl@gnu.org>
3828
3829 * elflink.h (elf_link_add_object_symbols): Correctly combine
3830 visibilities.
3831
3832 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3833
3834 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3835 to -1 before recomputing got offsets.
3836
3837 2003-03-26 Andreas Schwab <schwab@suse.de>
3838
3839 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3840 (elf_m68k_relocate_section): Use it to correctly handle symbols
3841 forced to be local.
3842 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3843 entries for symbols that are forced to be local.
3844
3845 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3846
3847 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3848 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3849 * elfn32-mips.c, elf64-mips.c: Use it.
3850
3851 2003-03-25 Stan Cox <scox@redhat.com>
3852 Nick Clifton <nickc@redhat.com>
3853
3854 Contribute support for Intel's iWMMXt chip - an ARM variant:
3855
3856 * archures.c: Add bfd_mach_arm_iWMMXt.
3857 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3858 * bfd-in2.h: Regenerate.
3859 * libbfd.h: Regenerate.
3860 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3861 object files to be linked with XScale ones.
3862 (coff_arm_final_link_postscript): Update note section.
3863 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3864 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3865 after identifying a coff binary.
3866 * cpu-arm.c (processors): Add iWMMXt.
3867 (arch_inf): Likewise.
3868 * elf32-arm.h (arm_object_p): Handle note section.
3869 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3870 be linked with XScale ones.
3871 (elf32_arm_section_flags): New function: Set flags on note section.
3872 (elf32_arm_final_write_processing): Handle note section.
3873
3874 2003-03-21 DJ Delorie <dj@redhat.com>
3875
3876 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3877 _bfd_elf_rela_local_sym.
3878
3879 2003-03-20 H.J. Lu <hjl@gnu.org>
3880
3881 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3882 non-ELF outputs.
3883
3884 2003-03-20 Nick Clifton <nickc@redhat.com>
3885
3886 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3887 $idata5 in case bfd_coff_final_link is not called.
3888
3889 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3890
3891 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3892 field.
3893 (canon_reloc_count): Define.
3894 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3895 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3896 reloc_count.
3897 (sparc64_elf_canonicalize_reloc): New routine.
3898 (bfd_elf64_canonicalize_reloc): Define.
3899
3900 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3901
3902 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3903 againt mergeable sections. Take r_addend into account when caching
3904 trampolines.
3905
3906 2003-03-18 Richard Henderson <rth@redhat.com>
3907
3908 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3909 local symbols that have no dyninfo.
3910
3911 2003-03-14 Gene Smith <gene.smith@siemens.com>
3912
3913 * ieee.c (ieee_write_expression): Handle the case where symbol is
3914 NULL.
3915 General formatting improvements.
3916
3917 2003-03-13 Nick Clifton <nickc@redhat.com>
3918
3919 * configure.in (LINGUAS): Add zh_CN.
3920 * configure: Regenerate.
3921 * po/zh_CN.po: New file.
3922
3923 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3924
3925 * aout-cris.c (BYTES_IN_WORD): Don't define.
3926 aout-encap.c: Likewise.
3927 aout-ns32k.c: Likewise.
3928 aout-tic30.c: Likewise.
3929 hp300bsd.c: Likewise.
3930 i386aout.c: Likewise.
3931 i386dynix.c: Likewise.
3932 i386linux.c: Likewise.
3933 i386lynx.c: Likewise.
3934 i386mach3.c: Likewise.
3935 m68k4knetbsd.c: Likewise.
3936 m68klinux.c: Likewise.
3937 m68klynx.c: Likewise.
3938 m68knetbsd.c: Likewise.
3939 m88kmach3.c: Likewise.
3940 mipsbsd.c: Likewise.
3941 newsos3.c: Likewise.
3942 sparclinux.c: Likewise.
3943 sparclynx.c: Likewise.
3944 sparcnetbsd.c: Likewise.
3945 vaxbsd.c: Likewise. Fix comment formatting.
3946
3947 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3948
3949 * Reverted 2003-03-02's patch.
3950
3951 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3952 overridable.
3953 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3954 mips_elf64_get_dynamic_reloc_upper_bound,
3955 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3956 (bfd_elf64_get_canonicalize_reloc,
3957 bfd_elf64_get_dynamic_reloc_upper_bound,
3958 bfd_elf64_canonicalize_dynamic_reloc): Define.
3959 (mips_elf64_slurp_reloc_table): Support dynamic.
3960 (mips_elf64_slurp_one_reloc_table): Adjust.
3961
3962 2003-03-12 Nick Clifton <nickc@redhat.com>
3963
3964 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3965 'index' to 'offset' in test for zero value.
3966
3967 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3968
3969 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3970 dynamic relocations pointing to local or section symbols, use the
3971 NULL symbol instead. Document the choice to not emit an
3972 additional R_MIPS_64 relocation.
3973
3974 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3975
3976 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3977 zero index dynamic tls relocs generated for the GOT. Tidy code.
3978 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3979 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3980
3981 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3982
3983 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3984 a tls_get_addr call.
3985
3986 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3987 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3988 ELF_LINK_NON_GOT_REF from weakdef.
3989 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3990 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3991 ELF_LINK_NON_GOT_REF from weakdef.
3992 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3993 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3994 ELF_LINK_NON_GOT_REF from weakdef.
3995
3996 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3997 Andrew Haley <aph@redhat.com>
3998
3999 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
4000 output is relocateable.
4001
4002 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
4003
4004 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
4005 R_COMMENT.
4006
4007 2003-03-06 Alan Modra <amodra@bigpond.net.au>
4008
4009 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
4010 error messages.
4011 (ELIMINATE_COPY_RELOCS): Define to zero.
4012 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
4013 TLSLD relocs. Report reloc types on a number of errors. Optimize
4014 LOCAL24PC check for non-local syms. Don't capitalize error messages.
4015 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
4016 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
4017 calculating TLSLD relocs. Report reloc types on a number of errors.
4018 Don't capitalize error messages.
4019
4020 2003-03-03 H.J. Lu <hjl@gnu.org>
4021
4022 * elfxx-ia64.c (USE_BRL): Removed.
4023 (oor_ip): Removed.
4024
4025 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4026
4027 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4028 relocation (no special function), and make it non-partial_inplace.
4029 (sh_elf_relax_section): When creating a bsr, use a consistent value
4030 no matter if the symbol is extern or not; set addend to -4.
4031 Don't swap load / non-load instructions for SH4.
4032 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4033 rather than if the symbol is external to determine if adjusting the
4034 offset makes sense. Adjust the addend too if appropriate.
4035 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4036 relocation.
4037
4038 2003-03-03 Nick Clifton <nickc@redhat.com>
4039
4040 * po/da.po: Installed latest translation.
4041
4042 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4043
4044 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4045 R_MIPS_PC16 to rightshift 2.
4046 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4047 (bfd_elf32_bfd_reloc_type_lookup): Support
4048 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4049 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4050 R_MIPS_PC16 to rightshift 2.
4051 (mips_elf64_howto_table_rela): Likewise.
4052 (mips_reloc_map): Map to rightshifted BFD reloc.
4053 * elfn32-mips.c: The same as in elf64-mips.c.
4054 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4055 (mips_elf_calculate_relocation): Handle rightshifted addends for
4056 R_MIPS_PC16.
4057 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4058 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4059 * libbfd.h: Regenerate.
4060 * bfd-in2.h: Regenerate.
4061
4062 2003-02-28 Richard Henderson <rth@redhat.com>
4063
4064 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4065 for ltoff22x relaxation.
4066
4067 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4068
4069 * bfd-in.h (_bfd): Don't define.
4070 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4071 * syms.c: Likewise.
4072 * bfd-in2.h: Regenerate.
4073
4074 2003-02-27 Richard Henderson <rth@redhat.com>
4075
4076 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4077 (elfNN_ia64_check_relocs): Set it.
4078 (allocate_global_data_got): Check it.
4079 (allocate_local_got): Likewise.
4080 (allocate_dynrel_entries): Likewise.
4081 (elfNN_ia64_relax_ldxmov): New.
4082 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4083 (elfNN_ia64_choose_gp): Split out from ...
4084 (elfNN_ia64_final_link): ... here.
4085
4086 2003-02-27 Andrew Cagney <cagney@redhat.com>
4087
4088 * bfd.c (struct bfd): Rename "struct _bfd".
4089 * bfd-in.h: Update copyright.
4090 (struct bfd): Rename "struct _bfd".
4091 (_bfd): Define for backward compatibility.
4092 * bfd-in2.h: Regenerate.
4093
4094 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4095
4096 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4097 and rel_hdr2 when initially counting input relocs rather than after
4098 creating output reloc sections.
4099 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4100 sizes.
4101
4102 * Makefile.am: Run "make dep-am".
4103 * Makefile.in: Regenerate.
4104
4105 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4106
4107 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4108 (elfcore_grog_nto_note): New function.
4109 (elfcore_grog_nto_gregs): New function.
4110 (elfcore_grog_nto_status): New function.
4111
4112 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4113
4114 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4115 section flags before concluding that we've already been called.
4116 Don't use register keyword.
4117 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4118 (_bfd_elf_create_linker_section): Formatting.
4119
4120 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4121
4122 * coff-h8300.c: Fix typo: intial -> initial.
4123 * coff-ppc.c: Likewise.
4124
4125 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4126
4127 * elf32-ppc.c: Formatting.
4128 (allocate_dynrelocs): LD and GD relocs against the same sym need
4129 separate GOT entries.
4130 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4131 entries per symbol.
4132
4133 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4134
4135 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4136 removal. Localize vars. Remove unnecessary dynobj test.
4137 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4138 of INFO.
4139 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4140 and optimize.
4141 (elf_i386_relocate_section): Likewise.
4142 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4143 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4144 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4145 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4146 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4147 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4148 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4149 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4150 Formatting.
4151
4152 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4153 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4154 test.
4155 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4156 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4157 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4158 and optimize. Use ELIMINATE_COPY_RELOCS.
4159 (ppc64_elf_relocate_section): Likewise.
4160
4161 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4162 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4163 (ELIMINATE_COPY_RELOCS): Define.
4164 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4165 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4166 (MUST_BE_DYN_RELOC): Define.
4167 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4168 and optimize. Trim dyn_relocs.
4169 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4170 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4171 track of pc_rel dyn relocs.
4172 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4173 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4174 allocate_dynrelocs. Don't recalculate "sec".
4175
4176 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4177
4178 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4179 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4180 on invalid LD relocs.
4181 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4182 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4183 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4184
4185 * elf32-ppc.h: New file.
4186 * elf32-ppc.c: Include elf32-ppc.h.
4187 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4188 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4189 Add "tls_mask" field.
4190 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4191 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4192 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4193 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4194 Make use of htab shortcuts throughout file.
4195 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4196 (ppc_elf_link_hash_table_create): Init new fields.
4197 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4198 (ppc_elf_howto_raw): Add tls relocs.
4199 (ppc_elf_reloc_type_lookup): Handle them.
4200 (ppc_elf_unhandled_reloc): New function.
4201 (ppc_elf_create_got): Stash got section pointer in hash table,
4202 return status. Make .rela.got too.
4203 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4204 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4205 NON_GOT_REF set. Don't allocate space in .plt here..
4206 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4207 not allocating plt entries unnecessarily. Allocate got entries here.
4208 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4209 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4210 "info" during allocate_dynrelocs hash traversal. Use htab section
4211 shortcuts rather than searching for named sections. Get rid of
4212 "plt" and "strip" booleans.
4213 (update_local_sym_info, bad_shared_reloc): New functions.
4214 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4215 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4216 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4217 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4218 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4219 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4220 relocs that might use a plt entry. Set NON_GOT_REF too.
4221 Enumerate all do-nothing relocs.
4222 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4223 tls relocs and all plt relocs.
4224 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4225 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4226 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4227 shortcuts.
4228 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4229 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4230 entries and got relocs here. Warn on non-zero got reloc addend.
4231 Split out branch taken/not taken reloc code into a separate switch
4232 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4233 Split out HA reloc adjustments to separate switch statement. Don't
4234 warn on reloc overflow if we've already warned about undefined.
4235 Don't rebuild sym name when reporting errors. Report all possible
4236 errors from _bfd_final_link_relocate.
4237 (bfd_elf32_bfd_final_link): Don't define.
4238
4239 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4240
4241 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4242 rebuild sym name when reporting errors.
4243
4244 2003-02-17 Nick Clifton <nickc@redhat.com>
4245
4246 * elflink.h (elf_link_output_extsym): Only check
4247 allow_shlib_undefined for shared libraries.
4248 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4249 of allow_shlib_undefined.
4250 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4251 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4252 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4253 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4254 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4255 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4256 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4257 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4258 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4259 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4260 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4261 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4262 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4263 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4264 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4265 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4266
4267 2003-02-17 Nick Clifton <nickc@redhat.com>
4268
4269 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4270 address field to use in the comparison.
4271 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4272
4273 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4274
4275 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4276 backends when checking if the generic ELF target should be used.
4277
4278 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4279 outside of functions, treat values as absolute addresses.
4280
4281 * bfd.c: Change embedded documentation to use consistent indentation
4282 and to split up long lines. Change informal style of description
4283 for functions lacking real documentation.
4284 * coffcode.h: Break up long lines in embedded documentation.
4285 * format.c: Likewise.
4286 * targets.c: Likewise.
4287 * libcoff.h: Regenerate.
4288 * bfd-in2.h: Regenerate.
4289
4290 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4291
4292 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4293 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4294 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4295 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4296 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4297 (group_sections): Don't share a stub section if stubs are for a large
4298 section. Adjust comment.
4299 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4300 !stubs_always_before_branch.
4301 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4302 treat undefined and undefweak specially when processing dyn relocs.
4303
4304 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4305
4306 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4307
4308 2003-02-13 Nick Clifton <nickc@redhat.com>
4309
4310 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4311 in computation of offset to insert into BL instruction.
4312
4313 2003-02-11 Uwe Stieber <uwe@wwws.de>
4314
4315 * config.bfd: Add support for kaOS as cross build target system.
4316
4317 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4318
4319 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4320 .__tls_get_addr too.
4321 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4322
4323 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4324
4325 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4326 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4327 (sh_elf_link_hash_newfunc): Remove the initialization of
4328 tls_tpoff32 field.
4329 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4330 for which tls_tpoff32 flag is set.
4331 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4332 of the symbol includes the entry matched with the input_section
4333 and having tls_tpoff32 flag on. When linking statically, set
4334 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4335 is defined in this executable.
4336 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4337
4338 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4339
4340 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4341 even if there is just non-empty .rela.plt.
4342
4343 2003-02-10 Nick Clifton <nickc@redhat.com>
4344
4345 * archures.c (bfd_mach_arm_ep9312): Define.
4346 * bfd-in2.h: Regenerate.
4347 * cpu-arm.c (processors[]): Add ep9312.
4348 (bfd_arm_arch): Add ep9312.
4349 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4350 messages and add test for Maverick floating point support.
4351 (elf32_arm_print_private_bfd_data): Handle
4352 EF_ARM_MAVERICK_FLOAT flag.
4353 (elf32_arm_object_p): New function.
4354 (elf_backend_object_p): Define.
4355
4356 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4357
4358 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4359 variables, structure fields or function params to tls_mask or
4360 similar to better reflect usage.
4361 (struct got_entry): Comment.
4362 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4363 (get_tls_mask): Rename from get_tls_type.
4364
4365 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4366
4367 * elf64-ppc.c (TLS_GD_LD): Don't define..
4368 (TLS_GD): ..define this instead and update all uses.
4369 (TLS_TPRELGD): Define.
4370 (ppc64_elf_link_hash_table_create): Tweak initialization of
4371 init_refcount and init_offset.
4372 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4373 Mark second slot of GD or LD toc entries.
4374 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4375 from other tls types.
4376 (ppc64_elf_tls_setup): New function, split out from..
4377 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4378 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4379 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4380 return value to properly decide whether toc GD and LD entries can
4381 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4382 to determine GD or LD rather than looking at TLS_LD flag. Don't
4383 attempt to adjust got entry tls_type here..
4384 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4385 look for possible merges.
4386 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4387 optimization.
4388 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4389 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4390 Make use of return value from get_tls_type to properly detect GD and
4391 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4392 handle tls_get_addr removal when looking at REL24 relocs, do it when
4393 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4394 GD or LD.
4395 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4396
4397 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4398
4399 * elf32-hppa.c (group_sections): Don't share a stub section if
4400 stubs are for a large section.
4401
4402 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4403 stubs if !stubs_always_before_branch.
4404
4405 2003-02-07 Nick Clifton <nickc@redhat.com>
4406
4407 * elf.c (swap_out_syms): Generate an error message if an
4408 equivalent output section cannot be found for a symbol.
4409
4410 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4411
4412 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4413 local_got_entries is NULL.
4414
4415 2003-02-06 Andreas Schwab <schwab@suse.de>
4416
4417 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4418 (read_value): Add parameter is_signed, use signed extraction if
4419 the value is signed.
4420 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4421 encoding to read_value.
4422
4423 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4424
4425 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4426 plt info when called to transfer weak sym info.
4427
4428 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4429
4430 * reloc.c: Add PPC and PPC64 TLS relocs.
4431 * libbfd.h: Regenerate.
4432 * bfd-in2.h: Regenerate.
4433 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4434 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4435 against a 32 bit field.
4436 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4437 (_ppc64_elf_section_data): Add t_symndx and comments.
4438 (ppc64_elf_section_data): Use elf_section_data macro.
4439 (ppc64_elf_new_section_hook): American spelling.
4440 (struct got_entry, struct plt_entry): New.
4441 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4442 (struct ppc_stub_hash_entry): Add "addend" field.
4443 (struct ppc_link_hash_entry): Add "tls_type".
4444 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4445 TLS_EXPLICIT): Define.
4446 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4447 (link_hash_newfunc): Init new fields.
4448 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4449 init_offset to NULL.
4450 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4451 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4452 there.
4453 (update_local_sym_info, update_plt_info): New functions.
4454 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4455 handling to use got.glist rather than got.refcount. Likewise for PLT.
4456 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4457 (func_desc_adjust): Adjust for new PLT list.
4458 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4459 (get_sym_h, get_tls_type): New functions.
4460 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4461 (ppc64_elf_tls_optimize): New function.
4462 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4463 TLS relocs.
4464 (ppc64_elf_size_dynamic_sections): Likewise.
4465 (ppc_type_of_stub): Adjust for new PLT list.
4466 (ppc_build_one_stub): Likewise.
4467 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4468 calls specially.
4469 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4470 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4471 init GOT entries that have a reloc. Generate GOT relocs here..
4472 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4473 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4474
4475 2003-02-04 Andreas Schwab <schwab@suse.de>
4476
4477 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4478 (elf_m68k_link_hash_traverse): Remove.
4479 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4480 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4481 reduce casting.
4482 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4483 casting.
4484 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4485 instead of elf_m68k_link_hash_traverse.
4486 (elf_m68k_discard_copies): Change first parameter to pointer to
4487 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4488 elf_m68k_link_hash_entry is needed.
4489
4490 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4491
4492 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4493 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4494 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4495 "plt" field.
4496 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4497 Add "init_offset" field.
4498 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4499 (elf_local_got_ents): Declare.
4500 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4501 and "plt".
4502 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4503 (_bfd_elf_link_hash_table_init): Set "init_offset".
4504 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4505 from init_offset.
4506 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4507
4508 * elf.c (bfd_elf_local_sym_name): Split out from..
4509 (group_signature): ..here.
4510 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4511
4512 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4513
4514 * elf-bfd.h (enum elf_link_info_type): Remove.
4515 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4516 to struct sec. Remove linkonce_p field.
4517 (elf_linkonce_p): Delete.
4518 (elf_discarded_section): Update for sec_info_type change.
4519 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4520 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4521 (ELF_INFO_TYPE_NONE): Define.
4522 (ELF_INFO_TYPE_STABS): Define.
4523 (ELF_INFO_TYPE_MERGE): Define.
4524 (ELF_INFO_TYPE_EH_FRAME): Define.
4525 (ELF_INFO_TYPE_JUST_SYMS): Define.
4526 (STD_SECTION): Update struct sec initializer.
4527 * ecoff.c (bfd_debug_section): Likewise.
4528 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4529 * elflink.h: Likewise.
4530 * elf-eh-frame.c: Likewise.
4531 * elf64-alpha.c: Likewise.
4532 * elfxx-ia64.c: Likewise.
4533 * elfxx-mips.c: Likewise.
4534 * bfd-in2.h: Regenerate.
4535
4536 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4537 referring to used_by_bfd.
4538 * elf64-sparc.c (sec_do_relax): Likewise.
4539 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4540 * elfxx-mips.c (mips_elf_section_data): Likewise.
4541 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4542 (ieee_get_section_contents): Likewise.
4543 (ieee_new_section_hook): Formatting.
4544 (ieee_canonicalize_reloc): Remove commented out code.
4545 * mmo.c (mmo_section_data): Define. Use throughout file.
4546 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4547
4548 2003-01-31 Graydon Hoare <graydon@redhat.com>
4549
4550 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4551 * Makefile.in: Regenerate.
4552 * opncls.c (calc_crc32, get_debug_link_info,
4553 seperate_debug_file_exists, find_seperate_debug_file): New
4554 internal functions.
4555 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4556 contained inside a .gnu_debuglink section.
4557 * bfd-in2.h: Regenerate.
4558
4559 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4560
4561 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4562 entry->abfd when it's NULL.
4563
4564 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4565
4566 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4567 _bfd_elf_section_offset returning -2 the same way as -1.
4568
4569 * elfxx-mips.c (mips_elf_multi_got): New function.
4570 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4571 addend into union along with address and link hash entry.
4572 (struct mips_got_info): Added bfd2got and next.
4573 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4574 (mips_elf_got_section, mips_elf_create_got_section): Use
4575 SEC_EXCLUDE bit to tell whether we really need the got
4576 section. Take boolean arguments to disregard an excluded
4577 section, or to create it as excluded. Adjust all callers.
4578 Use mips_elf_got_section all over.
4579 (mips_elf_local_got_index, mips_elf_got_page,
4580 mips_elf_got16_entry): Take input bfd as argument, and pass it
4581 on to mips_elf_create_local_got_entry.
4582 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4583 Take input bfd as argument, and manage entries in the
4584 appropriate GOT.
4585 (mips_elf_got_offset_from_index): Take input bfd as argument,
4586 and use it to adjust the GP offset of the bfd.
4587 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4588 unreferenced GOT entries of global symbols to the end.
4589 (mips_elf_record_global_got_symbol): Take input bfd as
4590 argument. Add entries to the master GOT hash table.
4591 (struct mips_elf_bfd2got_hash): New.
4592 (struct mips_elf_got_per_bfd_arg): New.
4593 (struct mips_elf_set_global_got_offset_arg): New.
4594 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4595 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4596 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4597 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4598 mips_elf_resolve_final_got_entry,
4599 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4600 mips_elf_got_for_ibfd): New functions.
4601 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4602 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4603 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4604 (mips_elf_got_entry_hash): Take new fields into account. Use
4605 mips_elf_hash_bfd_vma.
4606 (mips_elf_got_entry_eq): Take new fields into account.
4607 (mips_elf_create_got_section): Initialize new fields.
4608 (mips_elf_calculate_relocation): Pass input_bfd to functions
4609 that now take it. Adjust gp for the input_bfd.
4610 (mips_elf_allocate_dynamic_relocation,
4611 mips_elf_create_dynamic_relocation,
4612 _bfd_mips_elf_create_dynamic_sections): Use...
4613 (mips_elf_rel_dyn_section): New function. Borrow code from...
4614 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4615 now take it. Create the got section if needed, even if
4616 excluded, before recording a global got symbol. Move some
4617 code to...
4618 (mips_elf_record_local_got_symbol): New fn.
4619 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4620 Compute multi-got global entries offsets. Move GOT code to...
4621 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4622 if the GOT is too big.
4623 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4624 undefweak symbol to zero. Generate dynamic relocations for
4625 non-primary GOT entries for global symbols.
4626 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4627 case. Generate dynamic relocations for local got entries.
4628 Sort dynamic relocations on N64 too, using...
4629 (sort_dynamic_relocs_64): New fns.
4630 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4631 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4632
4633 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4634
4635 * bfd.c (struct _bfd): Added id field.
4636 * opncls.c (_bfd_id_counter): New static variable.
4637 (_bfd_new_bfd): Use it.
4638 * bfd-in2.h: Rebuilt.
4639
4640 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4641
4642 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4643
4644 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4645
4646 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4647 (elf32_sparc_rev32_howto): New variable.
4648 (sparc_reloc_map): Add TLS relocs.
4649 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4650 Handle REV32.
4651 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4652 New functions.
4653 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4654 struct elf32_sparc_link_hash_table):
4655 New structures.
4656 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4657 elf32_sparc_hash_table): Define.
4658 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4659 create_got_section, elf32_sparc_create_dynamic_sections,
4660 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4661 functions.
4662 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4663 reference counting.
4664 (elf32_sparc_gc_sweep_hook): Likewise.
4665 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4666 (elf32_sparc_size_dynamic_sections): Likewise.
4667 (elf32_sparc_relocate_section): Likewise.
4668 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4669 New functions.
4670 (elf32_sparc_object_p): Allocate backend private object data.
4671 (bfd_elf32_bfd_link_hash_table_create,
4672 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4673 elf_backend_can_refcount): Define.
4674 (elf_backend_create_dynamic_sections): Define to
4675 elf32_sparc_create_dynamic_sections.
4676 * reloc.c: Add SPARC TLS relocs.
4677 * bfd-in2.h, libbfd.h: Rebuilt.
4678 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4679 (sparc_reloc_map): Likewise.
4680
4681 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4682
4683 * bfd-in2.h: Regenerate.
4684 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4685 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4686 (elf_howto_table): Add TLS relocs.
4687 (elf_s390_reloc_type_lookup): Likewise.
4688 (elf_s390_link_hash_entry): Add tls_type.
4689 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4690 New macros.
4691 (elf_s390_link_hash_table): Add tls_ldm_got.
4692 (link_hash_newfunc): Initialize tls_type.
4693 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4694 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4695 (elf_s390_check_relocs): Support TLS relocs.
4696 (elf_s390_gc_sweep_hook): Likewise.
4697 (allocate_dynrelocs): Likewise.
4698 (elf_s390_size_dynamic_sections): Likewise.
4699 (elf_s390_relocate_section): Likewise.
4700 (elf_s390_finish_dynamic_symbol): Likewise.
4701 (bfd_elf32_mkobject): Define for TLS.
4702 * elf64-s390.c: Same changes as for elf32-s390.c.
4703 * libbfd.h: Regenerate.
4704 * reloc.c: Add s390 TLS relocations.
4705
4706 2003-01-24 Charles Lepple <clepple@ghz.cc>
4707
4708 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4709
4710 2003-01-23 Nick Clifton <nickc@redhat.com>
4711
4712 * Add sh2e support:
4713 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4714 * archures.c (bfd_mach_sh2e): Added.
4715 * bfd-in2.h: Rebuilt.
4716 * cpu-sh.c (arch_info_struct): Added SH2e.
4717 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4718
4719 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4720
4721 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4722 dynindx to an int. Rearrange for better packing.
4723 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4724 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4725 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4726 (struct _sh64_elf_section_data): New struct.
4727 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4728 * elf32-sh64-com.c: Include elf32-sh64.h.
4729 * elf32-sh64.c: Likewise.
4730 (sh64_elf_new_section_hook): New function.
4731 (bfd_elf32_new_section_hook): Define.
4732 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4733 (sh64_bfd_elf_copy_private_section_data): Likewise.
4734 (sh64_elf_final_write_processing): Likewise.
4735 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4736 (elf32_sparc_new_section_hook): New function.
4737 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4738 (sec_do_relax): Define.
4739 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4740 (elf32_sparc_relocate_section): Likewise.
4741 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4742 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4743 (mmix_elf_section_data): Define. Use throughout file.
4744 (mmix_elf_new_section_hook): New function.
4745 (bfd_elf64_new_section_hook): Define.
4746 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4747 (ppc64_elf_section_data): Define. Use throughout.
4748 (ppc64_elf_new_section_hook): New function.
4749 (bfd_elf64_new_section_hook): Define.
4750 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4751 (sparc64_elf_new_section_hook): New function.
4752 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4753 (sec_do_relax): Define.
4754 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4755 (sparc64_elf_relocate_section): Likewise.
4756 (bfd_elf64_new_section_hook): Define.
4757 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4758 * elfxx-mips.c (struct _mips_elf_section_data): New.
4759 (mips_elf_section_data): Define. Use throughout.
4760 (_bfd_mips_elf_new_section_hook): New function.
4761 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4762 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4763 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4764 * Makefile.am: Run "make dep-am".
4765 * Makefile.in: Regenerate.
4766
4767 2003-01-21 Richard Henderson <rth@redhat.com>
4768
4769 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4770 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4771 (elf64_alpha_adjust_dynamic_symbol): Set them.
4772 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4773 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4774 symbol index when relaxing LDM to TPREL.
4775 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4776 relocs, even if the target isn't locally defined.
4777 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4778 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4779 relocs vs symndx 0 to the tp base.
4780
4781 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4782
4783 * config.bfd: Handle i[3456]86-*-aros*.
4784
4785 2003-01-21 Andreas Schwab <schwab@suse.de>
4786
4787 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4788 (struct ppc_elf_link_hash_entry): Define.
4789 (ppc_elf_hash_entry): New function.
4790 (struct ppc_elf_link_hash_table): Define.
4791 (ppc_elf_hash_table): New function.
4792 (ppc_elf_link_hash_newfunc): New function.
4793 (ppc_elf_link_hash_table_create): New function.
4794 (ppc_elf_copy_indirect_symbol): New function.
4795 (allocate_dynrelocs): New function.
4796 (readonly_dynrelocs): New function.
4797 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4798 relocs and determine DT_TEXTREL.
4799 (ppc_elf_check_relocs): Don't do that here, just count the
4800 dynamic relocs.
4801 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4802 removed section.
4803 (bfd_elf32_bfd_link_hash_table_create): Define.
4804 (elf_backend_copy_indirect_symbol): Define.
4805
4806 2003-01-21 Richard Henderson <rth@redhat.com>
4807
4808 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4809 TPREL also get a reloc if shared. Remove SREL support.
4810 (elf64_alpha_emit_dynrel): New.
4811 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4812 and GOTTPREL relocs to local symbols against the tp base.
4813 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4814
4815 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4816 use count before clobbering r_type.
4817 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4818 ordering would mean dataflow inspection is necessary.
4819
4820 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4821
4822 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4823
4824 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4825
4826 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4827 elfxx-target.h and #undef it before #define'ing it.
4828 * elf32-i386.c: Likewise.
4829 * elf32-sh64.c: Likewise.
4830 * elf64-alpha.c: Likewise.
4831 * elf64-sh64.c: Likewise.
4832
4833 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4834
4835 * bfd-in2.h: Regenerate.
4836 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4837 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4838 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4839 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4840 R_390_PLTOFF32 and R_390_PLTOFF64.
4841 (elf_s390_reloc_type_lookup): Likewise.
4842 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4843 of GOTPLT references to a function.
4844 (link_hash_newfunc): Initialize gotplt_refcount.
4845 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4846 and creation of the got section out of the main switch. Add support
4847 for the gotoff, gotplt and pltoff relocations.
4848 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4849 and pltoff.
4850 (elf_s390_adjust_gotplt): New function.
4851 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4852 plt entries.
4853 (allocate_dynrelocs): Add comment.
4854 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4855 for gotoff, gotplt and pltoff relocations.
4856 * elf64-s390.c: Same changes as for elf32-s390.c.
4857 * libbfd.h: Regenerate.
4858 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4859 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4860 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4861 and BFD_RELOC_390_PLTOFF64.
4862
4863 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4864
4865 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4866 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4867
4868 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4869
4870 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4871 self_dtpmod_done and self_dtpmod_offset.
4872 (allocate_global_data_got): Only use one got entry for all
4873 dtpmod relocs against local symbols.
4874 (allocate_dynrel_entries): Only need .rela.got entry for
4875 dtpmod against global symbol.
4876 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4877 Reserve space in .rela.got for the local dtpmod entry.
4878 (set_got_entry): Initialize the common local dtpmod .got entry.
4879 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4880 and R_IA_64_DTPREL64MSB.
4881
4882 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4883
4884 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4885 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4886 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4887 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4888 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4889 relative relocs, not with absolute ones.
4890 * Makefile.am: Run "make dep-am".
4891 * Makefile.in: Regenerate.
4892 * po/SRC-POTFILES.in: Regenerate.
4893
4894 2003-01-15 Andreas Schwab <schwab@suse.de>
4895
4896 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4897 relocation against a non-allocated readonly section.
4898
4899 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4900
4901 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4902 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4903
4904 2002-01-08 Klee Dienes <kdienes@apple.com>
4905
4906 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4907 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4908 * Makefile.in: Regenerate.
4909
4910 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4911
4912 * elfn32-mips.c (prev_reloc_section): New.
4913 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4914 (SET_RELOC_ADDEND): Parenthesize macro argument.
4915
4916 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4917
4918 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4919 adjust addil instructions if the symbol has no section.
4920
4921 2003-01-07 DJ Delorie <dj@redhat.com>
4922
4923 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4924 partial_inplace.
4925
4926 2003-01-07 Andreas Schwab <schwab@suse.de>
4927
4928 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4929 PC relative relocations.
4930 (elf_m68k_discard_copies): Set it here instead.
4931
4932 2002-01-02 Ben Elliston <bje@redhat.com>
4933 Jeff Johnston <jjohnstn@redhat.com>
4934
4935 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4936 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4937 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4938 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4939 (cpu-iq2000.lo): New target.
4940 * Makefile.in: Regenerate.
4941 * config.bfd: Handle iq2000-*-elf.
4942 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4943 (bfd_archures_list): Add bfd_iq2000_arch.
4944 * configure.in: Handle bfd_elf32_iq2000_vec.
4945 * configure: Regenerate.
4946 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4947 and BFD_RELOC_IQ2000_UHI16.
4948 * targets.c (bfd_elf32_iq2000_vec): Declare.
4949 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4950 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4951 * cpu-iq2000.c: New file.
4952 * elf32-iq2000.c: Likewise.
4953 * libbfd.h: Regenerate.
4954 * bfd-in2.h: Likewise.
4955
4956 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4957
4958 * elfxx-mips.c: Include libiberty.h.
4959 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4960 (mips_set_isa_flags): New function, split out from...
4961 (_bfd_mips_elf_final_write_processing): ...here. Only call
4962 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4963 (mips_mach_extensions): New array.
4964 (mips_32bit_flags_p): New function.
4965 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4966 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4967 other is 64-bit. When adopting IBFD's architecture, adopt the
4968 bfd_mach as well as the flags.
4969
4970 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4971
4972 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4973 fix internal errors, fix bad code generation, fix incorrect stabs
4974 information, and improve ability to eliminate redundant page
4975 instructions. Added code to ip2k_final_link_relocate to self-verify
4976 the linker relaxation. Fix formatting problems.
4977
4978 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4979
4980 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4981 * archures.c (bfd_mach_mipsisa32r2): New define.
4982 * bfd-in2.h: Regenerate.
4983 * cpu-mips.c (I_mipsisa32r2): New enum value.
4984 (arch_info_struct): Add entry for I_mipsisa32r2.
4985 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4986 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4987 (_bfd_mips_elf_final_write_processing): Add
4988 bfd_mach_mipsisa32r2 case.
4989 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4990 binaries marked as using MIPS32 Release 2.
4991
4992 2002-12-30 Dmitry Diky <diwil@mail.ru>
4993
4994 * Makefile.am: Add msp430 target.
4995 * configure.in: Likewise.
4996 * Makefile.in: Regenerate.
4997 * configure: Regenerate.
4998 * archures.c: Add msp430 architecture vector.
4999 * config.bfd: Likewise.
5000 * reloc.c: Add msp430 relocs.
5001 * targets.c: Add msp320 target.
5002 * cpu-msp430.c: New file: msp430 cpu detection.
5003 * elf32-msp430.c: New file: msp430 reloc processing.
5004 * bfd-in2.h: Regenerate.
5005 * libbfd.h: Regenerate.
5006
5007 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5008
5009 * elf.c (elf_sort_sections): Don't reorder .tbss.
5010 (assign_file_positions_for_segments): Only adjust off/voff
5011 for increased alignment in PT_LOAD or PT_NOTE segment,
5012 but adjust p_filesz for .tbss too. in PT_LOAD consider
5013 .tbss to have zero memory size.
5014 (copy_private_bfd_data) [SECTION_SIZE]: Define.
5015 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
5016 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
5017 into PT_TLS segment. Never put SHF_TLS sections in
5018 segments other than PT_TLS or PT_LOAD.
5019
5020 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
5021 sh_entsize.
5022
5023 2002-12-23 DJ Delorie <dj@redhat.com>
5024
5025 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5026
5027 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5028
5029 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5030
5031 2002-12-23 Nick Clifton <nickc@redhat.com>
5032
5033 * archures.c (bfd_arch_get_compatible): Add third parameter
5034 'accept_unknowns'. Only accept unknown format BFDs if
5035 accept_unknowns is true, or if the format is "binary".
5036 * bfd-in2.h: Regenerate.
5037
5038 2002-12-21 Nick Clifton <nickc@redhat.com>
5039
5040 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5041 that subtracted 8 from pc relative relocations.
5042
5043 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5044
5045 * coff-h8300.c: Fix comment typos.
5046 * coffcode.h: Likewise.
5047 * cpu-cris.c: Likewise.
5048 * elf32-vax.c: Likewise.
5049 * genlink.h: Likewise.
5050 * linker.c: Likewise.
5051 * som.c: Likewise.
5052 * tekhex.c: Likewise.
5053 * vms-misc.c: Likewise.
5054
5055 2002-12-20 DJ Delorie <dj@redhat.com>
5056
5057 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5058 * libbfd.h: Regenerate.
5059 * bfd-in2.h: Regenerate.
5060 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5061 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5062
5063 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5064
5065 * doc/bfdint.texi: Fix typos.
5066
5067 2002-12-20 Paul Eggert <eggert@twinsun.com>
5068
5069 Port to POSIX 1003.1-2001.
5070 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5071 * configure.in (build-warnings): Likewise.
5072 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5073 * aclocal.m4: Regenerate.
5074 * config.in: Regenerate.
5075 * configure: Regenerate.
5076
5077 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5078
5079 * coff-h8300.c: Include libiberty.h.
5080 (h8300_reloc16_extra_cases): Check the hash table creator before
5081 referencing h8300 specific fields. Stash the hash table pointer
5082 in a local var. Comment typo fixes.
5083 (h8300_bfd_link_add_symbols): Likewise.
5084
5085 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5086 dst_mask comments.
5087 * bfd-in2.h: Regenerate.
5088
5089 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5090
5091 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5092 code a little. Comment on dynamic relocs against section symbols.
5093
5094 2002-12-17 Roger Sayle <roger@eyesopen.com>
5095
5096 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5097 the HP compiler's "long long".
5098
5099 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5100
5101 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5102 and R_XSTORMY16_HI16) howto entries.
5103 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5104 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5105 determine the start of the second reloc table.
5106
5107 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5108
5109 * ecofflink.c: Fix the reading of the debugging information
5110 of Tru64/Alpha binaries that are produced by recent Compaq
5111 compilers.
5112 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5113 table.
5114 (lookup_line): Because of the strange information sometimes
5115 generated by Compaq's recent compilers, change how the FDR
5116 table is searched so that PDRs (procedure descriptors) are
5117 correctly found. Note that this change is really more of a hack;
5118 however, I have included extensive documentation as to why
5119 this is the best solution short of an extensive rewrite or
5120 another hack.
5121 (fdrtab_lookup): Add comments to explain the algorithm.
5122
5123 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5124
5125 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5126 initializers to match struct declaration.
5127
5128 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5129
5130 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5131 * elf.c (get_program_header_size): Likewise.
5132 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5133 (m32r_elf_generic_reloc): Likewise.
5134 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5135 * elflink.h (elf_bfd_discard_info): Likewise.
5136
5137 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5138
5139 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5140 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5141 DT_RELSZ adjustment, not output section. Avoid writing tags when
5142 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5143 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5144 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5145 DT_RELASZ adjustment, not output section. Avoid writing tags when
5146 unchanged. Adjust DT_RELA.
5147 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5148 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5149
5150 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5151
5152 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5153 addend by 4.
5154
5155 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5156
5157 * elfxx-mips.c (struct mips_got_entry): New.
5158 (struct mips_got_info): Added got_entries field.
5159 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5160 (mips_elf_local_got_index, mips_elf_got_page,
5161 mips_elf_got16_entry): Re-implement in terms of new...
5162 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5163 Change return type.
5164 (mips_elf_highest): Warning clean-up.
5165 (mips_elf_create_got_section): Initialize got_entries.
5166 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5167 local got size.
5168 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5169 GOT_PAGE entries, since we now reuse GOT16 entries.
5170
5171 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5172
5173 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5174 read-only section that lies after .text and before .data to be
5175 written into the output file and included in a_text.
5176 (translate_to_native_sym_flags): If an otherwise unrepresentable
5177 section was merged with .text, convert its symbols to N_TEXT
5178 symbols.
5179 * libaout.h (aout_section_merge_with_text_p): New macro.
5180
5181 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5182
5183 * bfd-in.h: Comment typo fix. Formatting.
5184 * bfd-in2.h: Regenerate.
5185 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5186 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5187 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5188
5189 2002-12-05 Richard Henderson <rth@redhat.com>
5190
5191 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5192 Only send PCREL21B though the plt. Fix installed reloc type.
5193 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5194 against PCREL22 or PCREL64I; clean up error messages for
5195 branch relocs.
5196
5197 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5198
5199 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5200 New functions.
5201 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5202
5203 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5204
5205 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5206
5207 2002-12-04 H.J. Lu <hjl@gnu.org>
5208
5209 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5210 BFD address when constructing local name.
5211
5212 2002-12-04 Andreas Schwab <schwab@suse.de>
5213
5214 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5215 member.
5216 (elf_m68k_link_hash_table_create): Initialize it.
5217 (elf_m68k_check_relocs): Handle symbols that are forced to be
5218 local due to visibility changes.
5219 (elf_m68k_adjust_dynamic_symbol): Likewise.
5220 (elf_m68k_size_dynamic_sections): Likewise.
5221 (elf_m68k_discard_copies): Likewise.
5222 (elf_m68k_relocate_section): Likewise.
5223
5224 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5225
5226 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5227
5228 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5229
5230 * srec.c (srec_write_symbols): Restore '$' prefix to address
5231 accidentally removed in 2002-04-04 change.
5232 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5233
5234 2002-12-03 Nick Clifton <nickc@redhat.com>
5235
5236 * elf32-ppc.c (apuinfo_list_init): New function.
5237 (apuinfo_list_add): New function: Add a value to the list.
5238 (apuinfo_list_length): New function: Return the number of
5239 values on the list.
5240 (apuinfo_list_element): New function: Return a value on the
5241 list.
5242 (apuinfo_list_finish): New function: Free the resources used
5243 by the list.
5244 (ppc_elf_begin_write_processing): New function. Scan the
5245 input bfds for apuinfo sections.
5246 (ppc_elf_write_section): New function: Delay the creation of
5247 the contents of an apuinfo section in an output bfd.
5248 (ppc_elf_final_write_processing): New function. Create the
5249 contents of an apuinfo section in an output bfd.
5250 (elf_backend_begin_write_processing): Define.
5251 (elf_backend_final_write_processing): Define.
5252 (elf_backend_write_section): Define.
5253
5254 2002-12-03 Richard Henderson <rth@redhat.com>
5255
5256 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5257
5258 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5259
5260 Fix PR savannah/1417:
5261 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5262 branch if it goes to the start of the deleted region.
5263
5264 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5265
5266 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5267 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5268 bfd_mach_m6812s): Declare.
5269
5270 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5271 (_bfd_m68hc12_elf_set_private_flags): Call it.
5272 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5273 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5274 report microcontroller incompatibilities (HC12 vs HCS12).
5275 (elf_backend_object_p): Update.
5276
5277 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5278
5279 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5280 (enum bfd_boolean, boolean): Delete.
5281 (bfd_boolean): Typedef to an int.
5282 (FALSE, TRUE): Define.
5283 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5284 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5285 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5286 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5287 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5288 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5289 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5290 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5291 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5292 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5293 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5294 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5295 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5296 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5297 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5298 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5299 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5300 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5301 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5302 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5303 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5304 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5305 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5306 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5307 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5308 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5309 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5310 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5311 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5312 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5313 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5314 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5315 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5316 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5317 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5318 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5319 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5320 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5321 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5322 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5323 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5324 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5325 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5326 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5327 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5328 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5329 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5330 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5331 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5332 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5333 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5334 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5335 of bfd_boolean vars with TRUE/FALSE. Formatting.
5336 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5337
5338 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5339
5340 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5341 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5342 with Elf_Internal_Rela.
5343 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5344 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5345 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5346 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5347 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5348 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5349 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5350 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5351 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5352 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5353 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5354 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5355 throughout instead.
5356 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5357 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5358 Remove INLINE keyword.
5359 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5360 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5361 as a bfd_byte *.
5362 (elf_write_relocs): Consolidate REL and RELA code.
5363 (elf_slurp_reloc_table_from_section): Simplify REL code.
5364 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5365 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5366 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5367 RELA code.
5368 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5369 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5370 (elf_link_output_relocs): Likewise.
5371 (elf_reloc_link_order): Likewise.
5372 (elf_finish_pointer_linker_section): Likewise.
5373 (struct elf_link_sort_rela): Remove union.
5374 (elf_link_sort_cmp1): Update to suit.
5375 (elf_link_sort_cmp2): Here too.
5376 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5377 over-allocation for int_rels_per_ext_rel != 1 case.
5378 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5379 * elf32-i386.c: Likewise.
5380 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5381 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5382 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5383 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5384 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5385 elf64-sparc.c, elf64-x86-64.c: Likewise.
5386 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5387 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5388 bfd_elf32_swap_reloc_in.
5389
5390 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5391 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5392 (mips_elf64_swap_reloc_in): Zero r_addend.
5393 (mips_elf64_be_swap_reloc_in): Likewise.
5394 (mips_elf64_slurp_one_reloc_table): Simplify.
5395
5396 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5397 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5398 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5399
5400 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5401
5402 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5403 unresolved debugging relocs in dynamic applications.
5404 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5405
5406 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5407
5408 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5409 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5410 on a relocatable link. Comment typos.
5411 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5412 in the order they are declared. Clear elf_hash_value too.
5413 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5414 eh_info and tls_segment.
5415 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5416 sorted when discarding relocs by turning them into R_*_NONE.
5417
5418 * libbfd.c (warn_deprecated): Comment spelling.
5419 * po/SRC-POTFILES.in: Regenerate.
5420
5421 2002-11-21 Richard Henderson <rth@redhat.com>
5422
5423 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5424 arch's st_other bits when merging visibilities.
5425 (elf_link_output_extsym): Tidy clearing of visibility field.
5426
5427 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5428
5429 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5430 (SWAP_OUT_RELOC_OFFSET): Define.
5431
5432 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5433
5434 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5435 can_refcount is properly extended to the type of
5436 init_refcount.
5437
5438 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5439
5440 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5441 (_bfd_mips_elf_relocate_section): Use it.
5442
5443 * elfxx-mips.c (MNAME): New macro.
5444 (_bfd_mips_elf_check_relocs): Use it.
5445 (_bfd_mips_elf_discard_info): Likewise.
5446 (_bfd_mips_elf_final_link): Likewise.
5447
5448 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5449
5450 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5451 rel_hdr.sh_size too.
5452
5453 2002-11-18 Klee Dienes <kdienes@apple.com>
5454
5455 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5456 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5457 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5458 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5459 Add dependencies for bfdwin.c, bfdio.c.
5460 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5461 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5462 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5463 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5464 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5465 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5466 bfd_get_size (moved from libbfd.c and bfd.c).
5467 * bfdwin.c New file. Contains _bfd_window_internal,
5468 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5469 libbfd.c and bfd.c).
5470 * po/SRC-POTFILES.in: Regenerate.
5471 * po/bfd.pot: Regenerate.
5472 * libbfd.h: Regenerate.
5473 * bfd-in2.h: Regenerate.
5474 * aclocal.m4: Regenerate.
5475 * Makefile.in: Regenerate.
5476 * configure: Regenerate.
5477
5478 2002-11-18 Klee Dienes <kdienes@apple.com>
5479
5480 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5481
5482 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5483
5484 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5485 jsr after a short jump.
5486 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5487
5488 2002-11-15 Klee Dienes <kdienes@apple.com>
5489
5490 * pef.c (bfd_pef_convert_architecture): Move declaration of
5491 ARCH_POWERPC and ARCH_M68K to the start of the function.
5492
5493 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5494
5495 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5496
5497 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5498
5499 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5500 For bpo_gregs_section->contents, allocate _raw_size, not
5501 _cooked_size.
5502
5503 2002-11-13 Klee Dienes <kdienes@apple.com>
5504
5505 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5506
5507 2002-11-13 H.J. Lu <hjl@gnu.org>
5508
5509 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5510
5511 2002-11-13 Klee Dienes <kdienes@apple.com>
5512 Alan Modra <amodra@bigpond.net.au>
5513
5514 * bfd.c (struct bfd_preserve): New.
5515 (bfd_preserve_save): New function.
5516 (bfd_preserve_restore): Ditto.
5517 (bfd_preserve_finish): Ditto.
5518 * bfd-in2.h: Regenerate.
5519 * mach-o.c: Formatting.
5520 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5521 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5522 (bfd_mach_o_core_p): Ditto.
5523 (bfd_mach_o_scan): Pass in mdata.
5524 * mach-o.h (bfd_mach_o_scan): Update prototype.
5525 * pef.c: Formatting.
5526 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5527 (bfd_pef_xlib_object_p): Ditto.
5528 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5529 * pef.h (bfd_pef_scan): Update prototype.
5530 * xsym.c: Formatting, K&R fixes.
5531 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5532 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5533 * xsym.h (bfd_sym_scan): Declare.
5534 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5535 * elfcore.h (elf_core_file_p): Likewise.
5536 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5537
5538 2002-11-12 Nick Clifton <nickc@redhat.com>
5539
5540 * po/da.po: Updated Danish translation.
5541
5542 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5543
5544 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5545 relocatable link too.
5546 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5547 eh_frame and stab sections. Zap deleted relocs.
5548 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5549 (elf_bfd_discard_info): Run for relocatable link too.
5550 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5551 Handle ld -r case.
5552 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5553 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5554
5555 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5556 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5557 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5558 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5559 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5560 (struct elf_link_hash_table): Add eh_info.
5561 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5562 (_bfd_elf_discard_section_eh_frame): Update prototype.
5563 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5564 (_bfd_elf_write_section_eh_frame): Likewise.
5565 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5566 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5567 param. Get "hdr_info" from link hash table.
5568 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5569 header section from link hash table. Save header section to elf_tdata.
5570 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5571 header section from link hash table. Don't alloc hdr_info. Clear
5572 hdr_sec instead of setting "strip".
5573 (_bfd_elf_eh_frame_section_offset): Formatting.
5574 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5575 Get header section from link hash table.
5576 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5577 Get header section from link hash table.
5578 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5579 (get_program_header_size): Likewise.
5580 (_bfd_elf_section_offset): Formatting.
5581 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5582 section pointer in link hash table.
5583 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5584 and _bfd_elf_write_section_eh_frame calls. Update comment about
5585 eh_frame entries.
5586 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5587 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5588
5589 * po/SRC-POTFILES.in: Regenerate.
5590
5591 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5592 relocs for discarded FDEs. Remove dead code.
5593 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5594 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5595 Tidy conditions under which stabs are edited. Formatting.
5596 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5597 from discarded relocs.
5598 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5599 section adjustments after testing magic values.
5600
5601 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5602
5603 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5604 references to large plt symbols.
5605
5606 2002-11-12 Klee Dienes <kdienes@apple.com>
5607
5608 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5609 looking for an unused section name.
5610
5611 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5612
5613 * coff-h8300.c: Fix formatting.
5614 * elf32-h8300.c: Likewise.
5615 * reloc16.c: Likewise.
5616
5617 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5618
5619 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5620 section when dynamic section unused; _bfd_strip_section_from_output
5621 instead.
5622
5623 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5624
5625 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5626 and sym_vec.
5627
5628 * dwarf2.c: Revert last change.
5629
5630 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5631
5632 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5633 _bfd_dwarf2_find_nearest_line): Use
5634 bfd_simple_get_relocated_section_contents() instead of
5635 bfd_get_section_contents().
5636 * reloc.c (bfd_perform_relocation): Add sanity check.
5637 * simple.c (simple_get_relocated_section_contents): If the section
5638 does not have any relocs associated with it, just return the
5639 unadjusted contents.
5640
5641 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5642
5643 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5644 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5645 contents, enabling for a non-DSO, for symbols defined in the
5646 program with --export-dynamic.
5647
5648 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5649
5650 * elf64-ppc.c: Comment typo fixes.
5651 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5652
5653 2002-11-07 Nick Clifton <nickc@redhat.com>
5654
5655 * po/da.po: Updated Danish translation.
5656
5657 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5658
5659 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5660 exactly three internal relocs per external reloc. Set reloc_count
5661 to the external reloc count.
5662
5663 2002-11-06 Klee Dienes <kdienes@apple.com>
5664
5665 * coff-stgo32.c (stub_bytes): Mark as const.
5666 Fix comment formatting.
5667
5668 2002-11-06 Klee Dienes <kdienes@apple.com>
5669
5670 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5671 xsym.lo.
5672 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5673 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5674 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5675 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5676 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5677 sym.
5678 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5679 * Makefile.in: Regenerate.
5680 * doc/Makefile.in: Regenerate.
5681 * bfd-in2.h: Regenerate.
5682 * xsym.c: New file. Contains support for the Apple/Metrowerks
5683 xSYM debugging format.
5684 * xsym.h: New file.
5685 * pef.c: New file. Contains support for the Apple Code Fragment
5686 Manager Preferred Executable Format
5687 * pef.h: New file.
5688 * pef-traceback.h: New file. Contains support for parsing PowerPC
5689 traceback tables as used by PEF executables (and perhaps other
5690 systems as well).
5691 * mach-o.c: New file. Contains support for the Mach-O object file
5692 format.
5693 * mach-o.h: New file.
5694 * mach-o-target.c: New file. Declares the mach-o targets
5695 themselves. Included three times by mach-o.c; each time with a
5696 different set of macros set.
5697
5698 2002-11-06 Graeme Peterson <gp@qnx.com>
5699
5700 * Makefile.am: Remove entries for elf32-qnx.[ch].
5701 * Makefile.in: Regenerate.
5702 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5703 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5704 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5705 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5706 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5707 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5708 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5709 * configure: Regenerate.
5710 * elf32-qnx.c: Remove.
5711 * elf32-qnx.h: Remove.
5712 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5713 is_contained_by_filepos, and copy_private_bfd_data_p.
5714 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5715 is_contained_by_filepos, and copy_private_bfd_data_p.
5716 * elf32-i386.c: Remove QNX extended bfd support.
5717 * elf32-ppc.c: Remove QNX extended bfd support.
5718 * elf32-sh.c: Remove QNX extended bfd support.
5719 * elfarm-nabi.c: Remove QNX extended bfd support.
5720 * targets.c: Remove qnx vectors.
5721 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5722 (elf_backend_is_contained_by_filepos): Remove.
5723 (elf_backend_copy_private_bfd_data_p): Remove.
5724 * po/SRC-POTFILES.in: Regenerate.
5725
5726 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5727 Alan Modra <amodra@bigpond.net.au>
5728
5729 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5730 dynamic relocs against section symbols for the output section vma.
5731
5732 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5733
5734 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5735 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5736
5737 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5738 Alan Modra <amodra@bigpond.net.au>
5739
5740 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5741 vectors in target_selvecs.
5742 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5743 in target_selvecs.
5744 (sh-*-netbsdelf*): Likewise.
5745 * configure.in (assocvecs): New variable. Handle assocvecs like
5746 selvecs.
5747 * configure: Regenerate.
5748 * format.c (bfd_check_format_matches): Store bfd_target pointers
5749 in matching_vector instead of target names. Select first target
5750 from bfd_associated_vector that matches a list of ambiguous targets.
5751 * targets.c (_bfd_associated_vector): New array.
5752 (bfd_associated_vector): New variable.
5753 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5754 * libbfd-in.h (bfd_associated_vector): Declare.
5755 * libbfd.h: Regenerate.
5756
5757 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5758
5759 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5760 non-NULL before dereferencing.
5761
5762 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5763
5764 * vms.c (vms_object_p): Restore the start address when returning
5765 NULL.
5766
5767 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5768 Hans-Peter Nilsson <hp@axis.com>
5769
5770 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5771 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5772 Set up a larger symshndxbuf, and write it out. Free it on
5773 exit rather than freeing symbuf twice. Correct section index
5774 on output section symbol loop.
5775 (elf_link_output_sym): Accumulate symbol extension section
5776 indices, reallocating symshndxbuf rather than writing it out.
5777 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5778 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5779 Use bfd_zalloc to clear i_shdrp[0] too.
5780
5781 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5782
5783 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5784 _raw_size of cranges section if _cooked_size not yet set.
5785
5786 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5787
5788 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5789 for bfd_elf32_swap_symbol_out.
5790
5791 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5792
5793 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5794 signed and unsigned in comparison.
5795
5796 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5797
5798 * coffcode.h: Remove extraneous '\'.
5799
5800 2002-10-28 H.J. Lu <hjl@gnu.org>
5801
5802 * Makefile.am (targets.lo): Depend on Makefile instead of
5803 config.status.
5804 (archures.lo): Likewise.
5805 * Makefile.in: Regenerated.
5806
5807 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5808
5809 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5810 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5811 targ_selvecs.
5812
5813 2002-10-25 Jim Wilson <wilson@redhat.com>
5814
5815 * elf64-sh64.c (sh_elf64_relocate_section): Call
5816 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5817 of SHF_MERGE section.
5818
5819 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5820
5821 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5822
5823 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5824
5825 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5826 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5827 unsigned int.
5828 (NAME(aout,final_link)): Cast enum used in assignment.
5829 (aout_link_write_symbols): Cast enums in comparisons, int values to
5830 boolean, enums in assignments to int.
5831 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5832 (aout_link_input_section_ext): Likewise. Cast enums used in
5833 comparisons with unsigned ints.
5834 (aout_link_reloc_link_order): Cast enum to int in assignment.
5835 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5836 calls to char *.
5837 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5838 assignment.
5839 * bfd-in2.h (bfd_set_section_vma): Likewise.
5840 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5841 * binary.c (bfd_alloc): Cast enum to long.
5842 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5843 * dwarf2.c (read_abbrevs): Add casts to enum types.
5844 (read_attribute_value): Likewise.
5845 (arange_add): Cast result of bfd_zalloc call.
5846 (comp_unit_contains_address): Return true and false.
5847 (comp_unit_find_nearest_line): Cast return to boolean.
5848 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5849 * gen-aout.c: define macro '_' if not defined.
5850 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5851 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5852 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5853 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5854 (bfd_generic_is_local_label_name): Cast return to boolean.
5855 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5856 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5857 struct bfd_hash_entry *.
5858 (_bfd_generic_link_hash_newfunc): likewise.
5859 (_bfd_generic_final_link): Cast enum to unsigned int.
5860 * merge.c (sec_merge_emit): Cast return to boolean.
5861 (merge_strings): Add casts to const unsigned char *.
5862 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5863 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5864 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5865 to struct bfd_hash_entry *.
5866 (bfd_set_section_content): Add cast to PTR in comparison.
5867 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5868 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5869 simple_dummy_unattached_reloc,
5870 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5871 function definitions.
5872 * srec.c (S3Forced): Initialize to false.
5873 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5874 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5875 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5876 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5877 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5878 comparisons.
5879
5880 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5881
5882 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5883 relocs into shared lib non-allocated reloc sections.
5884
5885 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5886
5887 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5888 sorted even when given an out-of-order line sequence.
5889 (lookup_address_in_line_info_table): When an exact VMA match is
5890 not found, return line information with the closest VMA.
5891
5892 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5893
5894 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5895 HPUX 11.00 patch PHSS_26559.
5896
5897 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5898
5899 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5900 the options section into a separate section unless IRIX 6
5901 compatibility is enabled.
5902
5903 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5904
5905 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5906 into arrays.
5907 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5908 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5909 into account.
5910 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5911 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5912
5913 2002-10-21 Graeme Peterson <gp@qnx.com>
5914
5915 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5916
5917 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5918
5919 * targets.c (bfd_target_list): Don't return the default target twice.
5920
5921 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5922
5923 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5924 perror with bfd_perror.
5925
5926 2002-10-19 H.J. Lu <hjl@gnu.org>
5927
5928 * elflink.h (elf_link_add_object_symbols): Correctly handle
5929 DT_RPATH and DT_RUNPATH.
5930
5931 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5932
5933 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5934
5935 2002-10-17 Denis Chertykov <denisc@overta.ru>
5936
5937 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5938 for ip2k port.
5939
5940 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5941
5942 * elfxx-target.h (USE_REL): Don't define as 1.
5943 * elf32-arm.h (USE_REL): Provide a default define of 0.
5944 Use #if rather than #ifdef when testing USE_REL.
5945 * elf32-m32r.c: Likewise.
5946
5947 * elf32-arc.c (USE_REL): Define as 1.
5948 * elf32-d10v.c (USE_REL): Likewise.
5949 * elf32-m32r.c (USE_REL): Likewise.
5950 * elf32-m68hc11.c (USE_REL): Likewise.
5951 * elf32-m68hc12.c (USE_REL): Likewise.
5952 * elf32-or32.c (USE_REL): Likewise.
5953 * elfarm-nabi.c (USE_REL): Likewise.
5954
5955 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5956
5957 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5958 (s390x-*-linux*): Add targ_selvecs.
5959
5960 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5961
5962 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5963 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5964 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5965 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5966 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5967 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5968 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5969 (SOURCE_HFILES): Add elf32-qnx.h.
5970 (BUILD_HFILES): Add bfdver.h.
5971 Run "make dep-am".
5972 * Makefile.in: Regenerate.
5973 * configure.in Update bfd vector dependencies.
5974 * configure: Regenerate.
5975 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5976 * elf32-i386qnx.c: Likewise.
5977 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5978 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5979 * elf32-sh-lin.c: Likewise.
5980 * elf32-shqnx.c: Likewise.
5981 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5982 * elf32-sh64-nbsd.c: Likewise.
5983 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5984 * elf64-sh64-nbsd.c: Likewise.
5985 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5986 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5987 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5988 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5989 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5990 (elf_backend_is_contained_by_filepos): Likewise.
5991 (elf_backend_copy_private_bfd_data_p): Likewise.
5992 Globalize and move functions to..
5993 * elf32-qnx.c: ..here. New file.
5994 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5995 emit target vectors when INCLUDE_SHMEDIA.
5996 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5997 end of file.
5998 * elf64-sh64.c: Remove ELF_ARCH test.
5999 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
6000 * po/BLD-POTFILES.in: Regenerate.
6001 * po/SRC-POTFILES.in: Regenerate.
6002
6003 2002-10-16 Alan Modra <amodra@bigpond.net.au>
6004
6005 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
6006 loaded with --just-symbols.
6007
6008 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
6009 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6010 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6011 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6012
6013 2002-10-15 Richard Henderson <rth@redhat.com>
6014
6015 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
6016 (BFD64_BACKENDS_CFILES): Likewise.
6017 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
6018 * elf64-alpha-fbsd.c: Remove file, move code ...
6019 * elf64-alpha.c: ... here.
6020 * Makefile.in, configure: Rebuild.
6021
6022 2002-10-14 Richard Henderson <rth@redhat.com>
6023
6024 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6025 VALUE, not ADDEND.
6026
6027 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6028
6029 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6030 datalabel_got_offset with union of datalabel_got
6031 offset and refcount.
6032 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6033 (allocate_dynrelocs): Delete unnecessary code for
6034 STT_DATALABEL type. Create entry in got for
6035 datalabel version of symbol if datalabel_got.refcount > 0.
6036 (sh_elf_relocate_section): Use datalabel_got union.
6037 (sh_elf_gc_sweep_hook): Pull common code to initialize
6038 h and eh out of switch statement. Declare seen_stt_datalabel.
6039 Initialize it. Decrement datalabel_got.refcount for
6040 got relocs when seen_stt_datalabel is true.
6041 Decrement local_got_refcounts entry for datalabel got relocs
6042 of local symbols.
6043 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6044 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6045 Initialize it. When seen_stt_datalabel is true, increment
6046 datalabel_got refcount rather than got.refcount.
6047 (sh_elf_finish_dynamic_symbol): Create relocs to
6048 initialize got entry for datalabel version of symbol.
6049
6050 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6051
6052 * Makefile.am: Run "make dep-am".
6053 (BFD_H_FILES): Remove version.h.
6054 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6055 * version.h: ..to here.
6056 * configure.in (bfd_version_date): Remove.
6057 (AC_OUTPUT): Make bfdver.h from version.h.
6058 * bfd.c: #include "bfdver.h".
6059 * vms-hdr.c: Likewise.
6060 * Makefile.in: Regenerate.
6061 * bfd-in2.h: Regenerate.
6062 * configure: Regenerate.
6063 * po/SRC-POTFILES.in: Regenerate.
6064
6065 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6066
6067 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6068 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6069 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6070 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6071 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6072 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6073 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6074 bfd_mach_ip2022, bfd_mach_ip2022ext,
6075 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6076 * bfd-in2.h: Regenerate.
6077
6078 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6079
6080 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6081 endian vector to targ_selvecs.
6082
6083 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6084
6085 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6086 save_addend argument. Don't apply the 32-bit mask to a
6087 GPREL32 value if it's to be used in another relocation. Don't
6088 use forced-check computation of local_p to decide whether to
6089 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6090 of the addend of a non-in-place GPREL16 relocation.
6091 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6092 mips_elf_calculate_relocation().
6093
6094 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6095
6096 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6097 with symbols in other sections if we relaxed something; the sections
6098 output offsets must be re-computed before.
6099
6100 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6101
6102 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6103 handling to use Elf_Internal_Sym.
6104 (m68hc11_elf_relax_delete_bytes): Likewise.
6105
6106 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6107
6108 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6109 sh_elf_object_p, dtpoff_base): New functions.
6110 (sh_elf_howto_table): Add TLS relocs.
6111 (sh_reloc_map): Likewise.
6112 (sh_elf_info_to_howto): Support TLS relocs.
6113 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6114 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6115 New macros.
6116 (sh_elf_obj_tdata): New.
6117 (elf_sh_link_hash_table): Add tls_ldm_got.
6118 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6119 (allocate_dynrelocs): Support TLS relocs.
6120 (sh_elf_size_dynamic_sections): Likewise.
6121 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6122 .rela.got section when found already. Return false after printing
6123 error about unresolvable relocation.
6124 (sh_elf_gc_sweep_hook): Support TLS relocs.
6125 (sh_elf_check_relocs): Likewise.
6126 (sh_elf_finish_dynamic_symbol): Likewise.
6127 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6128 * reloc.c: Add SH TLS relocs.
6129 * bfd-in2.h, libbfd.h: Regenerate.
6130
6131 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6132
6133 * Makefile.in: Regenerated.
6134
6135 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6136
6137 * Makefile.am: Run dep-am.
6138 (BFD_H_DEP): Add simple.c and linker.c.
6139 (BFD32_LIBS): Add simple.lo.
6140 (BFD32_LIBS_CFILES): Add simple.c.
6141 * Makefile.in: Regenerated.
6142 * bfd-in2.h: Regenerated.
6143 * simple.c: New file.
6144
6145 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6146
6147 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6148 (record_thumb_to_arm_glue): Likewise.
6149 * ecoff.c (ecoff_link_add_externals): Likewise.
6150 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6151 (record_thumb_to_arm_glue): Likewise.
6152 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6153 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6154 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6155 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6156 * elf64-ppc.c (func_desc_adjust): Likewise.
6157 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6158 (sh64_elf64_create_dynamic_sections): Likewise.
6159 * elflink.c (_bfd_elf_create_got_section): Likewise.
6160 (_bfd_elf_create_dynamic_sections): Likewise.
6161 (_bfd_elf_create_linker_section): Likewise.
6162 * elflink.h (elf_add_default_symbol): Likewise.
6163 (elf_link_create_dynamic_sections): Likewise.
6164 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6165 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6166 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6167 (_bfd_mips_elf_add_symbol_hook): Likewise.
6168 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6169 * linker.c (generic_link_add_symbol_list): Likewise.
6170 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6171
6172 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6173
6174 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6175 completely removed. Correct local sym adjustment.
6176
6177 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6178
6179 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6180 Correct mistake in calculation of address of .got.
6181 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6182 elf_sh64_pic_plt_entry_le): Likewise.
6183
6184 2002-10-09 Richard Shann <richard.shann@superh.com>
6185 Stephen Clarke <stephen.clarke@superh.com>
6186
6187 * Makefile.am: Add entries for elf32-sh64-lin.c and
6188 elf64-sh64-lin.c. Regenerate.
6189 * Makefile.in: Regenerate.
6190 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6191 to use sh64 vectors rather than sh vectors.
6192 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6193 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6194 * configure: Regenerate.
6195 * elf32-sh64-lin.c: New file.
6196 * elf64-sh64-lin.c: New file.
6197 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6198 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6199
6200 2002-10-08 H.J. Lu <hjl@gnu.org>
6201
6202 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6203 IE->LE transition for R_386_TLS_IE.
6204
6205 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6206
6207 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6208
6209 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6210
6211 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6212 sections.
6213
6214 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6215
6216 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6217 code.
6218
6219 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6220
6221 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6222
6223 * opncls.c: Formatting.
6224 (_bfd_new_bfd): Use a smaller section hash table.
6225
6226 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6227
6228 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6229 of the other two relocations packed with a REL32 to NONE.
6230
6231 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6232
6233 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6234 (sh_elf_link_hash_newfunc): Initialize it.
6235 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6236 to got.refcount for symbols that are forced local or when
6237 we have direct got refs.
6238 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6239 to correctly adjust got.refcount and plt.refcount.
6240 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6241 (sh_elf_check_relocs): Increment gotplt_refcount.
6242
6243 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6244
6245 * elf32-i386.c (elf_i386_relocate_section): Fix
6246 movl foo@indntpoff, %eax IE->LE transition.
6247
6248 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6249
6250 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6251 sequence and its transitions.
6252
6253 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6254
6255 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6256 to st_value + addend in non-code sections.
6257 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6258 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6259
6260 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6261 Ken Raeburn <raeburn@cygnus.com>
6262 Aldy Hernandez <aldyh@redhat.com>
6263 Eric Christopher <echristo@redhat.com>
6264 Richard Sandiford <rsandifo@redhat.com>
6265
6266 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6267 (bfd_mach_mips5500): New.
6268 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6269 (arch_info_struct): Add corresponding entries here.
6270 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6271 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6272 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6273 bfd_mach_mips5400 and bfd_mach_mips5500.
6274 (_bfd_mips_elf_mach_extends_p): New function.
6275 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6276 the EF_MIPS_MACH flags.
6277 * bfd-in2.h: Regenerate.
6278
6279 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6280
6281 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6282 .got sections.
6283
6284 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6285
6286 * elf.c (map_sections_to_segments): Correct test for start of
6287 writable section in the same page as end of read-only section.
6288
6289 2002-09-27 Matt Thomas <matt@3am-software.com>
6290
6291 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6292 local_got_refcounts usage. Remove allocation of got slot.
6293 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6294 Remove de-allocation of got slot.
6295 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6296 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6297 sections to be GC'ed.
6298 (elf_vax_instantiate_got_entries): New function.
6299 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6300 tests that are now handled by elf_vax_instantiate_got_entries.
6301 Assert GOT entry falls within .got section size. Remove redundant
6302 comparisions. Fix comments.
6303
6304 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6305
6306 * reloc.c: Add x86-64 TLS relocs.
6307 * bfd-in2.h, libbfd.h: Rebuilt.
6308 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6309 relocs. Add TLS relocs.
6310 (x86_64_reloc_map): Add TLS relocs.
6311 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6312 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6313 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6314 (elf64_x86_64_hash_entry): Define.
6315 (struct elf64_x86_64_obj_tdata): New.
6316 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6317 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6318 (link_hash_newfunc): Initialize tls_type.
6319 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6320 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6321 (elf64_x86_64_mkobject): New.
6322 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6323 (elf64_x86_64_tls_transition): New.
6324 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6325 Handle TLS relocs.
6326 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6327 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6328 (elf64_x86_64_size_dynamic_sections): Likewise.
6329 (dtpoff_base, tpoff): New.
6330 (elf64_x86_64_relocate_section): Handle TLS relocs.
6331 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6332 entries.
6333 (bfd_elf64_mkobject): Define.
6334
6335 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6336 DF_STATIC_TLS if shared.
6337
6338 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6339
6340 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6341 empty relocation sections.
6342
6343 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6344
6345 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6346 (ppc64_elf_build_stubs): Build them here instead.
6347
6348 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6349
6350 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6351 addend into r_addend, not *r_offset.
6352 (elf32_sparc_finish_dynamic_symbol): Likewise.
6353 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6354 R_SPARC_RELATIVE's r_offset.
6355
6356 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6357
6358 * dwarf2.c (decode_line_info): Update to correctly decode
6359 the (non-standard DWARF2) out-of-order address sequences
6360 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6361
6362 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6363
6364 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6365
6366 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6367
6368 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6369 for discarded FDEs. Remove redundant assignment.
6370 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6371
6372 2002-09-22 H.J. Lu <hjl@gnu.org>
6373
6374 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6375 the relocation count between different .reloc sections.
6376
6377 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6378
6379 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6380 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6381 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6382 R_PPC_EMB_RELSDA.
6383
6384 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6385 unsigned. Move "symcount" assignment out of loop.
6386 * Makefile.am: Run "make dep-am".
6387 * Makefile.in: Regenerate.
6388 * configure: Regenerate.
6389 * po/SRC-POTFILES.in: Regnerate.
6390
6391 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6392
6393 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6394 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6395 (e.g. IRIX64).
6396
6397 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6398
6399 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6400 even if generating R_PPC_RELATIVE reloc.
6401 (ppc_elf_relocate_section): Make sure relocation is performed
6402 if skip == -2. Clear memory at r_offset when creating dynamic
6403 relocation.
6404
6405 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6406
6407 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6408 BFD_RELOC_386_TLS_GOTIE): Add.
6409 * bfd-in2.h, libbfd.h: Rebuilt.
6410 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6411 and R_386_TLS_GOTIE.
6412 (elf_i386_reloc_type_lookup): Handle it.
6413 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6414 char instead of enum, change GOT_* into defines.
6415 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6416 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6417 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6418 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6419 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6420 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6421 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6422 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6423 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6424 tls_type is GOT_TLS_IE_BOTH.
6425 (elf_i386_size_dynamic_sections): Likewise.
6426 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6427 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6428 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6429 all 4 GOT_TLS_* TLS types.
6430
6431 2002-09-19 Nick Clifton <nickc@redhat.com>
6432
6433 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6434 follow indirect links.
6435
6436 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6437
6438 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6439 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6440 on 64 bit machines.
6441 (ecoff_swap_sym_in) <iss>: Likewise.
6442 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6443 ECOFF information: 'ioptMax' refers to the actual *size*
6444 of the optimization symtab, not the number of entries.
6445
6446 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6447
6448 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6449 ELF_LINK_HASH_NEEDS_PLT logic.
6450
6451 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6452
6453 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6454 correct relocation count.
6455
6456 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6457
6458 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6459 * bfd.c (struct _bfd): Add dynsymcount.
6460 * bfd-in2.h: Regenerated.
6461 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6462 abfd->dynsymcount.
6463 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6464 for overflow.
6465
6466 2002-09-17 Stan Cox <scox@redhat.com>
6467
6468 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6469 (mips_elf64_final_gp): Don't make up gp value.
6470 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6471 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6472 .MIPS.options/.options section.
6473
6474 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6475
6476 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6477 It is benign for FreeBSD < 4.1. Minor reformatting.
6478 * elf64-alpha-fbsd.c: Likewise.
6479
6480 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6481
6482 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6483 addend.
6484
6485 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6486
6487 * elf64-alpha.c (alpha_elf_size_info): Make static.
6488
6489 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6490
6491 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6492 * cpu-tic4x.c: Ditto.
6493
6494 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6495
6496 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6497 duplicate define.
6498
6499 2002-09-16 Bruno Haible <bruno@clisp.org>
6500
6501 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6502 by a target variant implementation.
6503 * elf64-alpha.c: Likewise.
6504 * elf32-i386-fbsd.c: New file.
6505 * elf64-alpha-fbsd.c: New file.
6506 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6507 bfd_elf64_alpha_freebsd_vec.
6508 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6509 bfd_elf64_alpha_freebsd_vec.
6510 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6511 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6512 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6513 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6514 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6515 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6516 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6517
6518 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6519
6520 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6521 NULL.
6522 (elf_i386_relocate_section): Return false after printing error about
6523 unresolvable relocation.
6524
6525 2002-09-12 Nick Clifton <nickc@redhat.com>
6526
6527 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6528 R_ARM_THM_PC11.
6529
6530 2002-09-11 Jeffrey Law <law@redhat.com>
6531
6532 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6533
6534 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6535
6536 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6537 line_ptr before deciding we've found a symbol.
6538
6539 2002-09-11 Nick Clifton <nickc@redhat.com>
6540
6541 * po/da.po: New Danish translation file.
6542 * configure.in (LINGUAS): Add 'da'.
6543 * configure: Regenerate.
6544
6545 2002-09-10 Michael Snyder <msnyder@redhat.com>
6546
6547 * irix-core.c (do_sections, do_sections64): New functions.
6548 (irix_core_core_file_p): Call new functions do_sections,
6549 do_sections64, depending on corefile (32-bit or 64-bit).
6550
6551 2002-09-09 Richard Henderson <rth@redhat.com>
6552
6553 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6554 and PCREL21F like PCREL21B.
6555
6556 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6557
6558 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6559 vector.
6560
6561 2002-09-02 Nick Clifton <nickc@redhat.com>
6562
6563 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6564 names instead of cryptically overloaded bfd_reloc error
6565 codes.
6566 (v850_elf_relocate_section): Likewise.
6567 (v850_elf_relax_section): Replace caching of external symbols
6568 with caching of internal symbols obtained from calling
6569 bfd_elf_get_elf_syms().
6570 Fixup problems with freeing cached allocated memory blocks.
6571
6572 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6573
6574 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6575 (bfd_pj_arch): Use bfd_default_scan.
6576 * cpu-v850.c (scan): Remove.
6577 (N): Use bfd_default_scan.
6578 * cpu-z8k.c (scan_mach): Remove.
6579 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6580 first. Use bfd_default_scan.
6581
6582 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6583 bfd_mach constants.
6584 (ecoff_get_magic): Likewise.
6585 * elf32-v850.c (v850_elf_object_p): Likewise.
6586 (v850_elf_final_write_processing): Likewise.
6587 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6588 (MY(write_object_contents)): Likewise.
6589 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6590 * coffcode.h (coff_write_object_contents): Likewise.
6591 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6592 Remove unnecessary "machine" assignments.
6593 (coff_write_relocs): Test for the absolute section sym by testing
6594 section and flags.
6595
6596 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6597 and bfd_mach_i386_i386_intel_syntax.
6598 * pdp11.c (NAME(aout,machine_type)): Likewise.
6599
6600 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6601
6602 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6603 * bfd-in2.h (align_power): Likewise.
6604
6605 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6606
6607 * Makefile.am: Run "make dep-am".
6608 * Makefile.in: Regenerate.
6609
6610 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6611 * cpu-powerpc.c (powerpc_compatible): Likewise.
6612 * cpu-rs6000.c (rs6000_compatible): Likewise.
6613
6614 2002-08-28 Catherine Moore <clm@redhat.com>
6615
6616 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6617 (v850-elf-reloc): Don't resolve pc relative relocs.
6618 (v850_elf_ignore_reloc): New routine.
6619 (v850_elf_final_link_relocate): Handle new relocs.
6620 (v850_elf_relax_delete_bytes ): New routine.
6621 (v850_elf_relax_section): New routine.
6622 (bfd_elf32_bfd_relax_section): Define.
6623 (HOWTO): New entries for new relocs.
6624 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6625 (BFD_RELOC_V850_LONGJUMP): New reloc.
6626 (BFD_RELOC_V850_ALIGN): New reloc.
6627 * archures.c: Remove redundant v850ea architecture.
6628 * cpu-v850.c: Remove redundant v850ea support.
6629 * libbfd.h: Regenerate.
6630 * bfd-in2.h: Regenerated.
6631
6632 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6633
6634 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6635 * configure.in: Add tic4x_coff vector files.
6636 * configure: Regenerate.
6637 * Makefile.am: Add tic4x target.
6638 * Makefile.in: Regenerate.
6639
6640 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6641
6642 * archures.c: Add the BFD arch type tic4x.
6643 * bfd-in.h: Add BFD_IN_MEMORY flag.
6644 * coff-tic4x.c: New file.
6645 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6646 * cpu-tic4x.c: New file.
6647 * targets.c: Added tic4x- in list of xvecs.
6648 * ticoff.h: New file.
6649 * bfd-in2.h: Regenerate.
6650
6651 2002-08-27 Adam Nemet <anemet@lnxw.com>
6652
6653 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6654 bit of DT_INIT and DT_FINI for Thumb functions.
6655
6656 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6657
6658 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6659
6660 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6661
6662 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6663
6664 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6665
6666 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6667 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6668 Likewise.
6669 (struct elf_sh_pcrel_relocs_copied): Removed.
6670 (struct elf_sh_dyn_relocs): New.
6671 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6672 field with dyn_relocs.
6673 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6674 sections and sym_sec.
6675 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6676 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6677 (sh_elf_create_dynamic_sections): Use create_got_section instead
6678 of _bfd_elf_create_got_section.
6679 (sh_elf_check_relocs): Likewise.
6680 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6681 sections.
6682 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6683 sh_elf_relocate_section, sh_elf_check_relocs,
6684 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6685 Likewise.
6686 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6687 dynamic relocations and avoiding the copy relocation when we
6688 didn't find any dynamic relocations in the section which has
6689 contents or is read-only.
6690 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6691 (sh_elf_size_dynamic_sections): Don't reset the size of
6692 .rela.got section even if dynamic_sections_created flag is off.
6693 Don't use sh_elf_discard_copies. Scan all input bfd and use
6694 allocate_dynrelocs. Call readonly_dynrelocs to determine
6695 whether we need DT_TEXTREL.
6696 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6697 whether the symbol was never referred to.
6698 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6699 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6700 (sh_elf_check_relocs): Call create_got_section if the short-cut
6701 to .got is null. Increment reference counters only instead of
6702 allocating space on dynamic sections here. Don't conditionalize
6703 uninitialized got.offset value when marking the symbol as a
6704 global offset table entry. Keep relocations for symbols satisfied
6705 by a dynamic library to avoid copy relocations for the symbol.
6706 Set dynobj field of an elf hash table if needed.
6707 (sh_elf_finish_dynamic_sections): Handle null section pointer
6708 correctly.
6709 (elf_backend_copy_indirect_symbol): Defined.
6710 (elf_backend_can_refcount): Defined.
6711
6712 2002-08-23 Nick Clifton <nickc@redhat.com>
6713
6714 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6715 previous change. Add comment explaining why.
6716
6717 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6718
6719 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6720 contents of .got.plt[2] to tr0, not address of .got.plt.
6721 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6722 patching absolute plt entry. For shmedia plt entry, set bottom bit
6723 of branch to plt0 as this is a branch to an shmedia instruction.
6724 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6725 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6726 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6727 branch to plt0.
6728 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6729 patching absolute plt entry. For shmedia plt entry, branch to
6730 plt0 is now ptrel, so use relative offset. Set bottom bit of
6731 branch target as it is a branch to an shmedia instruction.
6732
6733 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6734 Richard Shann <richard.shann@superh.com>
6735
6736 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6737 value if .init is an SHmedia function. Similarly for DT_FINI.
6738 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6739
6740 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6741
6742 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6743 dynamic section.
6744 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6745
6746 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6747
6748 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6749 byte read when reading the return address register column.
6750
6751 2002-08-22 Nick Clifton <nickc@redhat.com>
6752
6753 * config.bfd: Add powepc64-*-*bsd* target.
6754
6755 2002-08-22 Graeme Peterson <gp@qnx.com>
6756
6757 * Makefile.am: Add entries for elf32-shqnx.c
6758 * Makefile.in: Regenerate.
6759 * config.bfd: Add support sh-*-nto* target.
6760 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6761 * configure: Regenerate.
6762 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6763 * elf32-sh.c: Do not include elf32-target.h if
6764 ELF32_SH_C_INCLUDED is defined.
6765 * elf32-shqnx.c: New file: Support for QNX.
6766 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6767
6768 2002-08-22 Nick Clifton <nickc@redhat.com>
6769
6770 * po/tr.po: Updated Turkish translation.
6771
6772 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6773 symbols are not read.
6774
6775 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6776
6777 * elf32-m68hc11.c: Formatting fixes.
6778 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6779 * elf32-m68hc12.c: Formatting fixes.
6780 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6781
6782 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6783
6784 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6785 SEC_DATA.
6786 (pmac_xcoff_vec): Likewise.
6787 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6788 (aix5coff64_vec): Likewise.
6789
6790 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6791
6792 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6793 param to elf_backend_copy_indirect_symbol.
6794 (_bfd_elf_link_hash_copy_indirect): Likewise.
6795 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6796 calls to copy_indirect_symbol.
6797 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6798 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6799 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6800 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6801 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6802 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6803 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6804 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6805 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6806 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6807 test refcounts for "used" values.
6808
6809 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6810
6811 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6812 argument declaration.
6813
6814 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6815
6816 * archures.c (bfd_mach_ppc_e500): Added.
6817 * bfd-in2.h: Rebuilt.
6818 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6819
6820 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6821
6822 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6823
6824 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6825
6826 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6827 `bfd_byte'.
6828
6829 2002-08-17 Stan Cox <scox@redhat.com>
6830
6831 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6832 IRIX 6 segment layout for NEWABI.
6833
6834 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6835
6836 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6837 symbols when looking for section referred to by a relocation.
6838 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6839
6840 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6841
6842 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6843
6844 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6845
6846 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6847 missing check for whether the symbol is referenced by DSO before
6848 unexporting it as an unneeded dynamic symbol.
6849
6850 2002-08-14 H.J. Lu <hjl@gnu.org>
6851
6852 * libbfd.h: Regenerate.
6853
6854 2002-08-14 H.J. Lu <hjl@gnu.org>
6855
6856 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6857
6858 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6859
6860 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6861 instructions.
6862 (m68hc11_direct_relax): New to define table of relaxable instructions.
6863 (find_relaxable_insn): New, find a relaxable insn.
6864 (compare_reloc): New to compare two relocs.
6865 (m68hc11_elf_relax_section): New, relax text sections.
6866 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6867 (elf32_m68hc11_check_relocs): New function for GC support.
6868 (elf32_m68hc11_relocate_section): New function for GC support.
6869 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6870 (elf_backend_check_relocs): Likewise.
6871 (elf_backend_relocate_section): Likewise.
6872
6873 2002-08-13 H.J. Lu <hjl@gnu.org>
6874
6875 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6876 definitions in shared objects when checking symbol with
6877 undefined version.
6878
6879 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6880
6881 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6882 (elf32_m68hc11_gc_sweep_hook): Likewise.
6883 (elf_backend_gc_mark_hook): Define for GC section support.
6884 (elf_backend_gc_sweep_hook): Likewise.
6885 (elf_backend_can_gc_sections): Likewise.
6886
6887 * elf32-m68hc12.c: Likewise.
6888
6889 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6890
6891 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6892 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6893 (_bfd_m68hc11_elf_set_private_flags): New function.
6894 Use them to set/check/print ELF flags specific to 68HC11.
6895
6896 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6897 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6898 (_bfd_m68hc12_elf_set_private_flags): New function.
6899 Use them to set/check/print ELF flags specific to 68HC12.
6900
6901 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6902
6903 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6904 fix masks for PC-rel relocs.
6905 (m68hc11_elf_ignore_reloc): New function.
6906
6907 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6908 68HC12 banked addressing relocs.
6909 (m68hc12_phys_addr): New to compute physical address of banked memory.
6910 (m68hc12_phys_page): Likewise for page.
6911 (m68hc12_addr_is_banked): New to see if address is in banked area.
6912 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6913
6914 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6915
6916 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6917 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6918 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6919 * bfd-in2.h: Regenerate.
6920
6921 2002-08-12 H.J. Lu <hjl@gnu.org>
6922
6923 * elflink.h (elf_add_default_symbol): Preserve section across
6924 elf_merge_symbol.
6925
6926 2002-08-09 Graeme Peterson <gp@qnx.com>
6927
6928 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6929 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6930 * Makefile.in: Regenerate.
6931 * config.bfd: Add support for powerpc{le}-*-nto targets.
6932 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6933 * configure: Regenerate.
6934 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6935 common file "elf32-qnx.h", and now include that file.
6936 * elf32-qnx.h: New file: QNX specific common elf backend.
6937 * elf32-ppc.c: Do not include elf32-target.h if
6938 ELF32_PPC_C_INCLUDED is defined.
6939 * elf32-ppcqnx.c: New file: Support for QNX.
6940 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6941 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6942
6943 2002-08-09 Nick Clifton <nickc@redhat.com>
6944
6945 * po/sv.po: Updated Swedish translation.
6946
6947 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6948
6949 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6950 g->global_gotsym is NULL.
6951
6952 2002-08-08 H.J. Lu <hjl@gnu.org>
6953
6954 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6955 overrides an indirect versioned symbol.
6956
6957 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6958
6959 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6960 for R_386_TLS_TPOFF32 relocs against symndx 0.
6961
6962 2002-08-07 H.J. Lu <hjl@gnu.org>
6963
6964 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6965 with undefined version if needed.
6966 (elf_link_assign_sym_version): Match a default symbol with a
6967 version without definition. No need to hide the default
6968 definition separately.
6969
6970 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6971
6972 * elflink.h (elf_link_output_extsym): Don't output symbols from
6973 SEC_EXCLUDE sections.
6974
6975 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6976
6977 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6978
6979 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6980 entries.
6981
6982 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6983
6984 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6985 mismatch.
6986
6987 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6988
6989 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6990
6991 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6992
6993 * elf32-mips.c (mips_reloc_map): Fix typo.
6994
6995 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6996
6997 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6998
6999 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7000
7001 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
7002
7003 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7004
7005 * libxcoff.h: Use PARAMS on function declarations.
7006 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
7007 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7008
7009 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
7010 addend.
7011 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
7012
7013 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7014
7015 * coff-rs6000.c: Formatting fixes.
7016 (xcoff_calculate_relocation): Use PARAMS in declaration.
7017 (xcoff_complain_overflow): Likewise.
7018 (xcoff_ppc_relocate_section): Use old-style function pointer call.
7019 (bfd_xcoff_backend_data): Remove useless comments.
7020 (rs6000coff_vec): Likewise.
7021 (bfd_pmac_xcoff_backend_data): Likewise.
7022 (pmac_xcoff_vec): Likewise.
7023
7024 * coff64-rs6000.c: Formatting fixes.
7025 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7026 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7027 (bfd_xcoff_backend_data): Remove useless comments.
7028 (rs6000coff64_vec): Likewise.
7029 (bfd_xcoff_aix5_backend_data): Likewise.
7030 (aix5coff64_vec): Likewise.
7031
7032 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7033
7034 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7035 mask entries. Use complain_overflow_dont for R_REF.
7036 (xcoff_reloc_type_ba): Revert last change.
7037 (xcoff_reloc_type_br): Likewise.
7038 (xcoff_reloc_type_crel): Likewise.
7039 (xcoff_ppc_relocate_section): Likewise.
7040 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7041 (xcoff64_ppc_relocate_section): Likewise.
7042 (xcoff64_howto_table): Revert some of last change to mask entries.
7043 Use complain_overflow_dont for R_REF.
7044
7045 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7046 relocs with bitsize == 16 have size = 1.
7047 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7048 (xcoff_reloc_type_br): Likewise.
7049 (xcoff_reloc_type_crel): Likewise.
7050 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7051 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7052 dst_mask adjustment.
7053 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7054 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7055 bitsize == 16 have size = 1.
7056
7057 2002-08-01 Denis Chertykov <denisc@overta.ru>
7058
7059 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7060 (struct misc): New field isymbuf. All free_* fields removed.
7061 (symbol_value): Pass in internal syms. No need to swap syms in.
7062 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7063 possibly cached info.
7064 (tidyup_after_error): Removed.
7065 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7066 misc. Use new field.
7067 (adjust_all_relocations): Use internal syms. No need to swap syms
7068 in and out.
7069 (add_page_insn): Don't use removed fields of struct misc.
7070
7071 2002-08-01 Nick Clifton <nickc@redhat.com>
7072
7073 * elf32-arm.h: Revert previous delta.
7074
7075 2002-08-01 Nick Clifton <nickc@redhat.com>
7076
7077 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7078 * configure: Regenerate.
7079
7080 2002-07-31 H.J. Lu <hjl@gnu.org>
7081
7082 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7083 selected.
7084
7085 2002-07-31 H.J. Lu <hjl@gnu.org>
7086
7087 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7088 is selected.
7089
7090 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7091
7092 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7093 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7094
7095 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7096
7097 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7098 There is no 8 byte relocation type for this architecture.
7099 (do_ns32k_reloc): Use bfd_vma instead of native types.
7100 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7101 returns void.
7102 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7103 rely on generic code to do that.
7104 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7105 to all table entries.
7106 (_bfd_ns32k_relocate_contents): put_data returns void.
7107 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7108 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7109 return void.
7110
7111 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7112
7113 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7114 archive object is target dependant.
7115
7116 2002-07-31 Adam Nemet <anemet@lnxw.com>
7117
7118 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7119 (THUMB_PLT_ENTRY_SIZE): New macro.
7120 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7121 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7122 ARM_PLT_ENTRY_SIZE.
7123 (elf32_arm_plt_entry): Likewise.
7124 (elf_backend_plt_header_size): Likewise.
7125 (elf32_thumb_plt0_entry): New global.
7126 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7127 into .plt.thumb.
7128 (elf32_thumb_plt_entry): New global.
7129 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7130 Thumb entries. Set the bottom bit of the corresponding GOT entry
7131 for a Thumb PLT entry.
7132 (struct elf32_arm_plt_entry_info): New structure.
7133 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7134 type.
7135 (elf32_arm_link_hash_newfunc): Initialize new member.
7136 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7137 relocations against the PLT.
7138 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7139 first_rel_type if this is the first time we encounter the symbol.
7140 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7141 Determine if relocation needs a PLT entry. Set first_rel_type if
7142 this is the first time we encounter the symbol
7143 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7144 functions as well.
7145 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7146 (elf32_arm_create_dynamic_sections): New function. Create the
7147 .plt.thumb section.
7148 (elf_backend_create_dynamic_sections): Call it.
7149
7150 2002-07-31 Nick Clifton <nickc@redhat.com>
7151
7152 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7153 'alternative' in order to avoid shadowing global symbol of the
7154 same name.
7155 * bfd-in2.h: Regenerate.
7156 * libbfd.h: Regenerate.
7157 * libcoff.h: Regenerate.
7158
7159 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7160
7161 * Makefile.am: Add n32 ABI support.
7162 * Makefile.in: Regenerate.
7163 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7164 bit vectors for mips*-*-linux targets as optional.
7165 * configure.in: Add n32 ABI vectors.
7166 * configure: Regenerate.
7167 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7168 * elfn32-mips.c: New file, n32 ABI support.
7169 * targets.c: Add n32 ABI vectors.
7170
7171 2002-07-30 Graeme Peterson <gp@qnx.com>
7172
7173 * elfarmqnx-nabi.c: New file: Support for QNX.
7174 * config.bfd: Add support for arm-*-nto target.
7175 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7176 * configure: Regenerate.
7177 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7178 * Makefile.in: Regenerate.
7179 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7180 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7181 * elfarm-nabi.c: Do not include elf32-arm.h if
7182 ELFARM_NABI_C_INCLUDED is defined.
7183 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7184
7185 2002-07-30 Nick Clifton <nickc@redhat.com>
7186
7187 * po/sv.po: Updated Swedish translation.
7188
7189 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7190
7191 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7192
7193 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7194
7195 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7196 * archive.c (bfd_generic_archive_p): Likewise.
7197 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7198 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7199 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7200 (xcoff64_archive_p): Likewise.
7201 (xcoff64_openr_next_archived_file): Likewise.
7202 (xcoff64_archive_p): Clean up tdata properly on error.
7203 * coffgen.c (coff_real_object_p): Likewise.
7204 (coff_object_p): Release filehdr and opthdr.
7205 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7206 * ieee.c (ieee_archive_p): Likewise.
7207 * ihex.c (ihex_object_p): Likewise.
7208 (ihex_mkobject): Always allocate tdata.
7209 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7210 * srec.c (srec_mkobject): Always allocate tdata.
7211 (srec_object_p): Clean up tdata properly on error.
7212 (symbolsrec_object_p): Likewise.
7213 * versados.c (versados_object_p): Likewise.
7214 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7215 and bfd_realloc instead of realloc.
7216 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7217 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7218 place of bfd_malloc, simplifying error freeing. Free hash table too.
7219 (vms_object_p): Clean up tdata on error.
7220 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7221 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7222
7223 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7224
7225 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7226
7227 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7228
7229 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7230 flags into resulting BFD.
7231
7232 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7233
7234 From John Reiser <jreiser@BitWagon.com>
7235 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7236 tls_ldm_got.refcount.
7237
7238 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7239
7240 * elf64-mips.c: Update TODO comment.
7241 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7242 mips_elf64_gprel16_reloca): Remove prototypes.
7243 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7244 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7245 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7246 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7247 R_MIPS_HIGHEST.
7248 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7249 R_MIPS_GOT16. Remove wrong comments.
7250 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7251 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7252 from elf32-mips.c.
7253 (mips_elf64_hi16_reloc): Fix formatting.
7254 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7255 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7256 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7257 (mips_elf64_gprel16_reloc): Make static. Add check for
7258 partial_inplace.
7259 (mips_elf64_gprel16_reloca): Remove.
7260 (mips_elf64_literal_reloc): New function.
7261 (mips_elf64_gprel32_reloc): Fix formatting.
7262 (mips_elf64_shift6_reloc): Fix comment. Make static.
7263 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7264 elf32-mips.c.
7265 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7266 elf32-mips.c
7267 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7268 specific relocations.
7269 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7270 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7271 (ELF_MAXPAGESIZE): Add comment.
7272
7273 2002-07-25 Nick Clifton <nickc@redhat.com>
7274
7275 * po/sv.po: Updated Swedish translation.
7276 * po/es.po: Updated Spanish translation.
7277 * po/fr.po: Updated French translation.
7278
7279 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7280
7281 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7282 as elf_link_record_local_dynamic_symbol.
7283 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7284 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7285 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7286 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7287 attempt is made to record a symbol in a discarded section, and
7288 return `2' in that case.
7289
7290 2002-07-24 Nick Clifton <nickc@redhat.com>
7291
7292 * po/sv.po: Updated Swedish translation.
7293 * po/es.po: Updated Spanish translation.
7294
7295 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7296
7297 * po/SRC-POTFILES.in: Regenerate.
7298
7299 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7300 immediately. Remove code handling relocatable linking.
7301 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7302 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7303 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7304 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7305 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7306 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7307 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7308 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7309 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7310 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7311 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7312 * elf32-avr.c (elf_backend_rela_normal): Define.
7313 * elf32-cris.c: Likewise.
7314 * elf32-fr30.c: Likewise.
7315 * elf32-frv.c: Likewise.
7316 * elf32-h8300.c: Likewise.
7317 * elf32-hppa.c: Likewise.
7318 * elf32-ip2k.c: Likewise.
7319 * elf32-sparc.c: Likewise.
7320 * elf32-v850.c: Likewise.
7321 * elf32-vax.c: Likewise.
7322 * elf64-hppa.c: Likewise.
7323 * elf64-sparc.c: Likewise.
7324 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7325 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7326 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7327 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7328 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7329 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7330 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7331 * elf-m10200.c (USE_RELA): Don't define.
7332 * elf-m10300.c: Likewise.
7333 * elfarm-oabi.c: Likewise.
7334 * elf32-i370.c: Likewise.
7335 * elf32-ip2k.c: Likewise.
7336 * elf32-m68k.c: Likewise.
7337 * elf32-mcore.c: Likewise.
7338 * elf32-ppc.c: Likewise.
7339 * elf32-s390.c: Likewise.
7340 * elf32-vax.c: Likewise.
7341 * elf64-ppc.c: Likewise.
7342 * elf64-s390.c: Likewise.
7343 * elf64-x86-64.c: Likewise.
7344 * elfxx-ia64.c: Likewise.
7345 * elf32-avr.c (USE_REL): Don't undef.
7346 * elf32-ip2k.c: Likewise.
7347
7348 2002-07-23 Nick Clifton <nickc@redhat.com>
7349
7350 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7351 'want_p_paddr_set_to_zero'.
7352 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7353 to false;
7354 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7355 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7356
7357 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7358
7359 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7360 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7361 show the Copyright string.
7362 Minor formatting tidy ups.
7363
7364 2002-07-23 Nick Clifton <nickc@redhat.com>
7365
7366 * po/fr.po: Updated French translation.
7367 * po/sv.po: Updated Swedish translation.
7368
7369 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7370
7371 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7372 when outputting relocs.
7373
7374 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7375
7376 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7377 DT_PLTGOT into the dynamic section if there is a PLT.
7378
7379 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7380
7381 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7382 elf32-mips.c.
7383 (_bfd_mips_elf_write_section): Likewise.
7384 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7385 (_bfd_mips_elf_write_section): Likewise.
7386 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7387 (elf32_mips_write_section): Likewise.
7388 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7389 (_bfd_mips_elf_write_section): Likewise.
7390
7391 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7392
7393 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7394 PT_IA_64_UNWIND segments for a given section.
7395
7396 2002-07-17 H.J. Lu <hjl@gnu.org>
7397
7398 * Makefile.am: Fix a typo.
7399 * Makefile.in: Regenerate.
7400
7401 2002-07-15 Denis Chertykov <denisc@overta.ru>
7402 Frank Ch. Eigler <fche@redhat.com>
7403 Ben Elliston <bje@redhat.com>
7404 Alan Lehotsky <alehotsky@cygnus.com>
7405 John Healy <jhealy@redhat.com>
7406 Graham Stott <grahams@redhat.com>
7407 Jeff Johnston <jjohnstn@redhat.com>
7408
7409 * Makefile.am: Add support for ip2k.
7410 * Makefile.in: Regenerate.
7411 * doc/Makefile.in: Regenerate.
7412 * archures.c: Add support for ip2k.
7413 * config.bfd: Add support for ip2k.
7414 * configure.in: Add support for ip2k.
7415 * configure: Regenerate.
7416 * reloc.c: Add support for ip2k.
7417 * targets.c: Add support for ip2k.
7418 * bfd-in2.h: Regenerate.
7419 * libbfd.h: Regenerate.
7420 * cpu-ip2k.c: New file.
7421 * elf32-ip2k.c: New file.
7422
7423 2002-07-17 Ian Rickards <irickard@arm.com>
7424
7425 * dwarf2.c (concat_filename): If we can't establish the directory
7426 just return the filename.
7427
7428 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7429
7430 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7431
7432 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7433
7434 * elflink.h: Formatting fixes, tidy prototypes.
7435 (elf_link_assign_sym_version): Move common code out of loop.
7436
7437 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7438
7439 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7440 reloc section size is zero. Correct reloc output location.
7441
7442 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7443
7444 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7445 the final type for the e_fsel selector when generating PA2.0W code.
7446 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7447 relocations.
7448
7449 2002-07-14 H.J. Lu <hjl@gnu.org>
7450
7451 * elflink.h (elf_link_assign_sym_version): Hide the default
7452 definition if there is a hidden versioned definition.
7453
7454 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7455
7456 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7457 dynamic reference test in assertion when initializing GOT with
7458 static contents. Just assert that there are either no dynamic
7459 sections, the symbol is defined in the regular objects or that the
7460 symbol is undef weak. Tweak comment.
7461 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7462 only if the symbol isn't defined in the program and isn't undef
7463 weak.
7464 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7465 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7466 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7467 (elf_cris_discard_excess_program_dynamics): Don't consider
7468 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7469
7470 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7471
7472 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7473 unresolved debugging relocs in dynamic applications.
7474 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7475 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7476 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7477 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7478 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7479 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7480
7481 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7482
7483 * elf64-ppc.c (ONES): Define.
7484 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7485 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7486 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7487
7488 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7489 (ppc64_elf_set_private_flags): Delete.
7490 (ppc64_elf_section_from_shdr): Delete.
7491 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7492 (ppc64_elf_fake_sections): Delete.
7493 (bfd_elf64_bfd_set_private_flags): Don't define.
7494 (bfd_elf64_get_symbol_info): Likewise.
7495 (elf_backend_section_from_shdr): Likewise.
7496 (elf_backend_fake_sections): Likewise.
7497
7498 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7499
7500 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7501 when not already set.
7502 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7503 (elf_backend_fake_sections): Define.
7504
7505 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7506
7507 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7508 Formatting.
7509 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7510
7511 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7512
7513 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7514 NULL sym_hashes to just before use.
7515 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7516 symbol with non-default visibility.
7517 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7518 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7519 Ditto.
7520 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7521 symbol with non-default visibility.
7522 (cris_elf_check_relocs): At tests for local symbol before
7523 increasing h->plt.refcount, also check for non-default
7524 visibility. Ditto when checking for local symbol to eliminate
7525 pc-relative runtime relocs.
7526
7527 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7528
7529 * elf.c: Formatting.
7530 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7531 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7532 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7533 segments.
7534
7535 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7536 Alan Modra <amodra@bigpond.net.au>
7537
7538 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7539 account the impact of relocation count overflow when computing
7540 section offsets.
7541 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7542 or not to apply the PE COFF reloc overflow handling. Fix a
7543 fencepost error in deciding whether or not to use that technique.
7544
7545 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7546
7547 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7548 change type of locsyms.
7549 (bfd_elf_get_elf_syms): Declare.
7550 * elf.c (bfd_elf_get_elf_syms): New function.
7551 (group_signature): Use bfd_elf_get_elf_syms.
7552 (bfd_section_from_r_symndx): Likewise.
7553 * elfcode.h (elf_slurp_symbol_table): Likewise.
7554 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7555 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7556 locality of various data structures. Properly free internal relocs.
7557 (elf_bfd_final_link): Properly free internal relocs.
7558 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7559 (elf_link_input_bfd): Likewise.
7560 (elf_gc_mark): Likewise. Properly free internal relocs.
7561 (elf_gc_sweep): Properly free internal relocs.
7562 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7563 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7564 internal relocs.
7565 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7566 Properly free possibly cached info.
7567 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7568 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7569 symbol swapping code.
7570 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7571 Properly free possibly cached info.
7572 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7573 (mn10300_elf_relax_delete_bytes): Likewise.
7574 (mn10300_elf_symbol_address_p): Likewise.
7575 (mn10300_elf_get_relocated_section_contents): Likewise.
7576 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7577 (elf32_h8_relax_delete_bytes): Likewise.
7578 (elf32_h8_symbol_address_p): Likewise.
7579 (elf32_h8_get_relocated_section_contents): Likewise.
7580 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7581 (m32r_elf_relax_delete_bytes): Likewise.
7582 (m32r_elf_get_relocated_section_contents): Likewise.
7583 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7584 elf_section_data to determine whether cached.
7585 (sh_elf_relax_section): As above for elf-m10200.c.
7586 (sh_elf_relax_delete_bytes): Likewise.
7587 (sh_elf_get_relocated_section_contents): Likewise.
7588 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7589 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7590 reading of local syms.
7591 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7592 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7593 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7594 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7595 relocs.
7596 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7597 free internal relocs and section contents. Don't read symbols.
7598 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7599 (elf32_hppa_size_stubs): Don't free local syms.
7600 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7601 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7602 possibly cached info.
7603 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7604 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7605 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7606 all_local_syms.
7607 (get_local_syms): Delete function.
7608 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7609 on exit.
7610 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7611
7612 2002-07-05 Jim Wilson <wilson@redhat.com>
7613
7614 * syms.c (decode_section_type): New.
7615 (bfd_decode_symclass): Call decode_section_type.
7616
7617 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7618
7619 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7620 section content start.
7621 Reported by Michael Schumacher <mike@hightec-rt.com>.
7622
7623 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7624
7625 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7626 link order code. Don't actually remove the output section here;
7627 Just set a flag for the linker to do so.
7628 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7629 sections when setting up output section dynsyms.
7630
7631 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7632
7633 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7634 fudge.
7635 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7636 libs here instead.
7637
7638 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7639
7640 * elf64-s390.c (create_got_section): Set .got section alignment to
7641 8 bytes.
7642 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7643
7644 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7645
7646 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7647
7648 2002-07-01 Matt Thomas <matt@3am-software.com>
7649
7650 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7651 to EF_VAX_*.
7652
7653 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7654
7655 * elfxx-mips.c (ABI_64_P): Fix comment.
7656 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7657 new section names for N64 ABI.
7658 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7659 (mips_elf_calculate_relocation): Code formatting.
7660 (mips_elf_create_dynamic_relocation): Likewise.
7661 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7662 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7663 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7664 in any NewABI.
7665 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7666 for NewABI.
7667 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7668 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7669 here, too.
7670
7671 2002-07-01 Andreas Schwab <schwab@suse.de>
7672
7673 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7674 R_X86_64_64 to R_X86_64_RELATIVE.
7675
7676 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7677
7678 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7679 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7680 Run "make dep-am".
7681 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7682 host_aout_vec.
7683 * configure.in (vaxbsd_vec): Add.
7684 * targets.c (vaxbsd_vec): Add.
7685 * Makefile.in: Rebuild.
7686 * configure: Rebuild.
7687 * po/SRC-POTFILES.in: Rebuild.
7688
7689 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7690
7691 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7692 examining to gc_mark_hook, rather than the bfd.
7693 (elf_gc_sections): Adjust.
7694 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7695 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7696 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7697 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7698 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7699 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7700 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7701 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7702 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7703 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7704 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7705 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7706 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7707 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7708 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7709 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7710 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7711 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7712 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7713 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7714 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7715 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7716 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7717 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7718 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7719 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7720 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7721 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7722 redundant local sym tests.
7723 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7724 (link_hash_newfunc): Init is_entry.
7725 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7726 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7727 (create_linkage_sections): Use bfd_make_section_anyway rather than
7728 bfd_make_section.
7729 (ppc64_elf_mark_entry_syms): New function.
7730 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7731 up opd entry to function section map.
7732 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7733 relocs that reference the opd section.
7734 (edit_opd): New function.
7735 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7736 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7737 (get_local_syms): Do so here. Exit if we already have local syms.
7738 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7739 read local syms on non-ELF input.
7740 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7741 than duplicating it's function here. Adjust free of internal
7742 relocs to suit.
7743 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7744 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7745 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7746 _bfd_elf32_link_read_relocs rather than duplicating it's function
7747 here. Adjust free of internal relocs to suit.
7748
7749 2002-07-01 Andreas Jaeger <aj@suse.de>
7750
7751 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7752 are not allowed in shared libs code, enforce -fPIC.
7753
7754 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7755
7756 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7757 trailing zero-sequences when there's previous left-over data.
7758
7759 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7760
7761 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7762 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7763 and opd_rel_sec in order for starting rela section. Check _raw_size.
7764 (elf_backend_reloc_type_class): Define.
7765
7766 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7767
7768 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7769 DWARF2 formats.
7770
7771 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7772
7773 * cpu-powerpc.c: Comment on ordering of arch_info.
7774 * elf32-ppc.c (ppc_elf_object_p): New function.
7775 (elf_backend_object_p): Define.
7776 * elf64-ppc.c (ppc64_elf_object_p): New function.
7777 (elf_backend_object_p): Define.
7778
7779 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7780
7781 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7782 * configure: Regenerate.
7783
7784 2002-06-25 Jason Eckhardt <jle@rice.edu>
7785
7786 * dwarf2.c (decode_line_info): Check unit->addr_size
7787 to read in the proper number of prologue bytes.
7788
7789 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7790
7791 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7792 aix5coff64_vec if 64-bit bfd support has been enabled.
7793 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7794 been enabled.
7795
7796 * targets.c (_bfd_target_vector[]): Only include
7797 aix5coff64_vec if 64-bit bfd support has been enabled.
7798
7799 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7800
7801 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7802 * elf32-hppa.c (hppa_add_stub): Likewise.
7803 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7804 * elflink.h (elf_add_default_symbol): Fix comment typo.
7805 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7806 (elf_link_add_object_symbols): Likewise.
7807 (elf_link_assign_sym_version): Likewise.
7808 * hash.c (bfd_hash_lookup): Likewise.
7809 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7810 * section.c (bfd_get_unique_section_name): Likewise.
7811 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7812 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7813 (assign_section_numbers): Likewise.
7814 (_bfd_elfcore_make_pseudosection): Likewise.
7815 (elfcore_grok_lwpstatus): Likewise.
7816 (elfcore_grok_win32pstatus): Likewise.
7817 (elfcore_write_note): Constify input params. Use PTR instead of
7818 void *. Include terminating NUL in namesz. Correct padding.
7819 Support NULL "name" param. Use memcpy instead of strcpy.
7820 (elfcore_write_prpsinfo): Constify input params.
7821 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7822 (elfcore_write_lwpstatus): Likewise.
7823 (elfcore_write_pstatus): Likewise.
7824 (elfcore_write_prfpreg): Likewise.
7825 (elfcore_write_prxfpreg): Likewise.
7826 * elf-bfd.h (elfcore_write_note): Update declaration.
7827 (elfcore_write_prpsinfo): Likewise.
7828 (elfcore_write_prstatus): Likewise.
7829 (elfcore_write_pstatus): Likewise.
7830 (elfcore_write_prfpreg): Likewise.
7831 (elfcore_write_prxfpreg): Likewise.
7832 (elfcore_write_lwpstatus): Likewise.
7833
7834 2002-06-25 Jason Eckhardt <jle@rice.edu>
7835
7836 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7837 symbols of type stProc and stStaticProc.
7838
7839 2002-06-25 Nick Clifton <nickc@redhat.com>
7840
7841 * ecoff.c: VArious formatting fixes.
7842
7843 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7844
7845 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7846
7847 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7848
7849 * aout-adobe.c: Don't compare against "true" or "false.
7850 * aout-target.h: Likewise.
7851 * aoutx.h: Likewise.
7852 * archive.c: Likewise.
7853 * bout.c: Likewise.
7854 * cache.c: Likewise.
7855 * coff-a29k.c: Likewise.
7856 * coff-alpha.c: Likewise.
7857 * coff-i386.c: Likewise.
7858 * coff-mips.c: Likewise.
7859 * coff-or32.c: Likewise.
7860 * coff64-rs6000.c: Likewise.
7861 * coffcode.h: Likewise.
7862 * coffgen.c: Likewise.
7863 * cpu-ns32k.c: Likewise.
7864 * ecoff.c: Likewise.
7865 * ecofflink.c: Likewise.
7866 * elf.c: Likewise.
7867 * elf32-arm.h: Likewise.
7868 * elf32-cris.c: Likewise.
7869 * elf32-d30v.c: Likewise.
7870 * elf32-i386.c: Likewise.
7871 * elf32-mcore.c: Likewise.
7872 * elf32-ppc.c: Likewise.
7873 * elf32-sh.c: Likewise.
7874 * elf32-sh64.c: Likewise.
7875 * elf32-v850.c: Likewise.
7876 * elf64-alpha.c: Likewise.
7877 * elf64-sh64.c: Likewise.
7878 * elfcode.h: Likewise.
7879 * elfcore.h: Likewise.
7880 * elflink.h: Likewise.
7881 * elfxx-mips.c: Likewise.
7882 * i386os9k.c: Likewise.
7883 * ieee.c: Likewise.
7884 * libbfd.c: Likewise.
7885 * linker.c: Likewise.
7886 * mmo.c: Likewise.
7887 * nlm32-alpha.c: Likewise.
7888 * nlm32-i386.c: Likewise.
7889 * nlm32-ppc.c: Likewise.
7890 * nlm32-sparc.c: Likewise.
7891 * nlmcode.h: Likewise.
7892 * oasys.c: Likewise.
7893 * pdp11.c: Likewise.
7894 * peicode.h: Likewise.
7895 * reloc.c: Likewise.
7896 * som.c: Likewise.
7897 * srec.c: Likewise.
7898 * tekhex.c: Likewise.
7899 * vms.c: Likewise.
7900 * xcofflink.c: Likewise.
7901 * elf64-sparc.c: Edit comment to not use "== false".
7902
7903 * aoutf1.h: Don't use "? true : false".
7904 * ecoff.c: Likewise.
7905 * format.c: Likewise.
7906 * ieee.c: Likewise.
7907 * linker.c: Likewise.
7908 * mmo.c: Likewise.
7909 * oasys.c: Likewise.
7910
7911 2002-06-23 H.J. Lu <hjl@gnu.org>
7912
7913 * elflink.h (elf_link_add_archive_symbols): For the default
7914 version, check references with only one `@' first.
7915
7916 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7917
7918 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7919 function.
7920 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7921 symbol table.
7922 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7923 (elf64_hppa_size_dynamic_sections): Revise to use
7924 elf64_hppa_mark_milli_and_exported_functions.
7925 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7926 symbols out of dynamic symbol table.
7927
7928 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7929
7930 * Makefile.in: Regenerate.
7931 * libbfd.h: Regenerate.
7932 * bfd-in2.h: Regenerate.
7933 * configure: Regenerate.
7934 * po/SRC-POTFILES.in: Regenerate.
7935
7936 * elflink.h: Comment typo fixes.
7937
7938 2002-06-23 H.J. Lu <hjl@gnu.org>
7939
7940 * elf-bfd.h (elf_link_loaded_list): New structure.
7941 (elf_link_hash_table): Add "loaded".
7942 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7943 * elflink.h (elf_link_check_versioned_symbol): New function.
7944 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7945
7946 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7947
7948 * elflink.h (size_dynamic_sections): If the target does not
7949 support an ELF style hash table, return true, indicating that
7950 nothing needed to be done, rather than false, indicating that the
7951 section's size could not be computed.
7952
7953 2002-06-18 Dave Brolley <brolley@redhat.com>
7954
7955 From Catherine Moore, Michael Meissner, Dave Brolley:
7956 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7957 * targets.c: Support bfd_elf32_frv_vec.
7958 * reloc.c: Add FRV relocs.
7959 * configure.in: Add support for bfd-elf32-frv-vec.
7960 * config.bfd (targ_cpu): Add support for frv-*-elf.
7961 * archures.c: Add frv arch and machines.
7962 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7963 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7964 (BFD32_BACKENDS): Add elf32-frv.lo.
7965 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7966 (cpu-frv.lo): New target.
7967 (elf32-frv.lo): New target.
7968 * cpu-frv.c: New file.
7969 * elf32-frv.c: New file.
7970
7971 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7972
7973 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7974 e_shnum == 0.
7975 Only read the first section header if e_shoff is non-zero.
7976 Don't consider e_shstrndx if there are no sections.
7977
7978 2002-06-17 Tom Rix <trix@redhat.com>
7979
7980 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7981 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7982 complain_overflow_bitfield.
7983
7984 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7985
7986 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7987 (bfd_fdopenr): Likewise.
7988 (bfd_openstreamr): Likewise.
7989 (bfd_openw): Likewise.
7990
7991 * targets.c: Sort target vecs.
7992 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7993 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7994 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7995 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7996 * configure.in: Sort target vecs. Add m88kmach3_vec.
7997 * configure: Regenerate.
7998
7999 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
8000
8001 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
8002 bpo_reloc_no to break sort order ties, not address of items.
8003
8004 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
8005
8006 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
8007 Skip excluded sections in determing __gp value.
8008 (elf_hppa_final_link_relocate): Use the symbol's address in
8009 R_PARISC_FPTR64 relocations that don't need an opd entry.
8010 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
8011 (elf64_hppa_finalize_dynreloc): Likewise.
8012 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
8013 (elf64_hppa_finish_dynamic_symbol): Break up assert.
8014
8015 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
8016
8017 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
8018 alignment for .bss, .data and .text sections so that sse and sse2
8019 code will work.
8020 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8021
8022 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
8023
8024 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8025 sh[1234]*-elf*.
8026
8027 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8028
8029 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8030 dynamic sections.
8031
8032 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8033 for a symbol that has no output section.
8034 (allocate_dynrel_entries): Correct comment.
8035 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8036 unless we want one.
8037 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8038 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8039 with no section. Remove unnecessary parentheses.
8040
8041 2002-06-11 Tom Rix <trix@redhat.com>
8042
8043 * coffcode.h (coff_compute_section_file_positions): Add data
8044 section to AIX loader alignment check.
8045
8046 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8047 alignment to 4 bytes.
8048 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8049 power accessor macro.
8050 (do_shared_object_padding): Remove invalid assertion.
8051
8052 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8053
8054 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8055 for removed output sections.
8056
8057 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8058
8059 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8060 htab_alloc.
8061 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8062
8063 2002-06-08 H.J. Lu <hjl@gnu.org>
8064
8065 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8066 work around a long long bug in gcc 2.96 on mips.
8067
8068 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8069
8070 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8071 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8072 Regenerate dependency lists.
8073 * Makefile.in: Regenerate.
8074 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8075 vax1knetbsd_vec to targ_selvecs.
8076 * configure.in: Add vax1knetbsd_vec.
8077 * configure: Regenerate.
8078 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8079 * vax1knetbsd.c: New file.
8080 * vaxnetbsd.c: Update copyright years.
8081 (TARGET_PAGE_SIZE): Set to 0x1000.
8082 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8083
8084 2002-06-08 Matt Thomas <matt@3am-software.com>
8085
8086 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8087
8088 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8089
8090 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8091
8092 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8093
8094 * Makefile.am: Run "make dep-am".
8095 * Makefile.in: Regenerate.
8096
8097 * armnetbsd.c: Replace CONST with const.
8098 * corefile.c: Likewise.
8099 * elf32-dlx.c: Likewise.
8100 * elf64-mips.c: Likewise.
8101 * mmo.c: Likewise.
8102 * ns32knetbsd.c: Likewise.
8103
8104 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8105 table is elf64-sparc.
8106
8107 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8108
8109 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8110 Fix RELA addends to get not shifted in the result. Don't do special
8111 handling of R_MIPS_64 for NewABI.
8112
8113 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8114
8115 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8116 (NAME(aout,slurp_reloc_table)): Likewise.
8117 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8118 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8119 (xcoff_write_archive_contents_big): Likewise.
8120 (xcoff_generate_rtinit): Likewise.
8121 (xcoff_generate_rtinit): Likewise, and check error return.
8122 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8123 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8124 (coff_get_normalized_symtab): Likewise.
8125 (coff_make_empty_symbol): Likewise.
8126 (bfd_coff_set_symbol_class): Likewise.
8127 * cofflink.c (coff_link_add_symbols): Likewise.
8128 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8129 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8130 (bfd_ecoff_write_accumulated_debug): Likewise.
8131 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8132 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8133 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8134 * ieee.c (do_with_relocs): Use bfd_zalloc.
8135 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8136 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8137 (NAME(aout,slurp_reloc_table)): Likewise.
8138 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8139 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8140 * som.c (som_build_and_write_symbol_table): Likewise.
8141 (som_slurp_string_table): Likewise.
8142 (som_slurp_symbol_table): Likewise.
8143 (som_bfd_ar_write_symbol_stuff): Likewise.
8144 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8145 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8146 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8147 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8148 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8149
8150 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8151
8152 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8153 "group" union.
8154 (elf_group_name): Update.
8155 (elf_group_id): Define.
8156 (bfd_elf_set_group_contents): Declare.
8157 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8158 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8159 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8160 that sym for the signature.
8161 (_bfd_elf_compute_section_file_positions): Don't call
8162 set_group_contents for "ld -r" case.
8163 (swap_out_syms): Use bfd_zalloc.
8164 * elflink.h (elf_link_add_archive_symbols): Likewise.
8165 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8166 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8167
8168 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8169
8170 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8171 relocs in opd for non-shared too.
8172
8173 2002-06-06 Jeffrey Law <law@redhat.com>
8174
8175 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8176 relocations.
8177
8178 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8179
8180 * merge.c: Include libiberty.h.
8181 * elf-strtab.c: Include libiberty.h.
8182
8183 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8184
8185 * peXXigen.c (pe_print_idata): Remove unused variable.
8186
8187 2002-06-06 David Heine <dlheine@tensilica.com>
8188
8189 * elf.c (assign_file_positions_for_segments): Remove unallocated
8190 sections from the section to segment mapping for PT_LOAD segments.
8191 Update comment about empty loadable segments.
8192
8193 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8194
8195 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8196 is within the .stabstr section.
8197
8198 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8199
8200 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8201 are "const PTR", not "const PTR *".
8202 (bfd_elf32_swap_symbol_in): Likewise.
8203 (bfd_elf64_swap_symbol_in): Likewise.
8204 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8205 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8206 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8207 (elf_link_add_object_symbols): Likewise.
8208 (elf_link_record_local_dynamic_symbol): Likewise.
8209 (elf_link_input_bfd): Likewise.
8210 (elf_gc_mark): Likewise.
8211 (elf_reloc_symbol_deleted_p): Likewise.
8212 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8213 (mn10200_elf_relax_delete_bytes): Likewise.
8214 (mn10200_elf_symbol_address_p): Likewise.
8215 (mn10200_elf_get_relocated_section_contents): Likewise.
8216 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8217 (mn10300_elf_relax_section): Likewise.
8218 (mn10300_elf_relax_delete_bytes): Likewise.
8219 (mn10300_elf_symbol_address_p): Likewise.
8220 (mn10300_elf_get_relocated_section_contents): Likewise.
8221 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8222 (elf32_h8_relax_delete_bytes): Likewise.
8223 (elf32_h8_symbol_address_p): Likewise.
8224 (elf32_h8_get_relocated_section_contents): Likewise.
8225 * elf32-hppa.c (get_local_syms): Likewise.
8226 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8227 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8228 * elf32-sh.c (sh_elf_relax_section): Likewise.
8229 (sh_elf_relax_delete_bytes): Likewise.
8230 (sh_elf_get_relocated_section_contents): Likewise.
8231 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8232 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8233 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8234 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8235 * elf64-ppc.c (get_local_syms): Likewise.
8236 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8237 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8238
8239 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8240
8241 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8242
8243 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8244
8245 * elf.c (group_signature): Swap in the whole symbol, and handle
8246 extracting section symbol names.
8247 (setup_group): Add comment.
8248 (set_group_contents): When called from objcopy or ld, arrange for
8249 section contents to be written. Write group member output section
8250 indices to allow objcopy to reorganize sections.
8251 (_bfd_elf_copy_private_section_data): Copy group info.
8252
8253 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8254 (bfd_elf32_swap_symbol_in): Update prototype.
8255 (bfd_elf64_swap_symbol_in): Likewise.
8256 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8257 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8258 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8259 (elf_link_add_object_symbols): Likewise.
8260 (elf_link_record_local_dynamic_symbol): Likewise.
8261 (elf_link_input_bfd): Likewise.
8262 (elf_gc_mark): Likewise.
8263 (elf_reloc_symbol_deleted_p): Likewise.
8264 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8265 (mn10200_elf_relax_delete_bytes): Likewise.
8266 (mn10200_elf_symbol_address_p): Likewise.
8267 (mn10200_elf_get_relocated_section_contents): Likewise.
8268 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8269 (mn10300_elf_relax_section): Likewise.
8270 (mn10300_elf_relax_delete_bytes): Likewise.
8271 (mn10300_elf_symbol_address_p): Likewise.
8272 (mn10300_elf_get_relocated_section_contents): Likewise.
8273 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8274 (elf32_h8_relax_delete_bytes): Likewise.
8275 (elf32_h8_symbol_address_p): Likewise.
8276 (elf32_h8_get_relocated_section_contents): Likewise.
8277 * elf32-hppa.c (get_local_syms): Likewise.
8278 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8279 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8280 * elf32-sh.c (sh_elf_relax_section): Likewise.
8281 (sh_elf_relax_delete_bytes): Likewise.
8282 (sh_elf_get_relocated_section_contents): Likewise.
8283 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8284 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8285 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8286 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8287 * elf64-ppc.c (get_local_syms): Likewise.
8288 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8289 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8290 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8291 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8292 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8293 * elf64-mips.c (mips_elf64_size_info): Likewise.
8294 * elf64-s390.c (s390_elf64_size_info): Likewise.
8295 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8296
8297 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8298
8299 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8300 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8301 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8302 _bfd_mips_elf_ignore_discarded_relocs.
8303 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8304
8305 2002-06-05 H.J. Lu <hjl@gnu.org>
8306
8307 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8308 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8309 the SEC_MERGE section.
8310
8311 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8312
8313 * coff-alpha.c: Update copyright date.
8314 * coff-mips.c: Likewise.
8315 * xcoff-target.h: Likewise.
8316
8317 * bfd-in.h: Remove "taken from the source" comment.
8318 * libbfd-in.h: Likewise.
8319 * libcoff-in.h: Likewise.
8320 * bfd-in2.h: Regenerate.
8321 * libbfd.h: Regenerate.
8322 * libcoff.h: Regenerate.
8323
8324 * elf.c (bfd_elf_discard_group): Return true.
8325 * elf-bfd.h (bfd_elf_discard_group): Declare.
8326 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8327 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8328 * bfd.c (bfd_discard_group): Define.
8329 * targets.c (struct bfd_target): Add _bfd_discard_group.
8330 (BFD_JUMP_TABLE_LINK): Here too.
8331 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8332 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8333 * aout-target.h (MY_bfd_discard_group): Define.
8334 * aout-tic30.c (MY_bfd_discard_group): Define.
8335 * binary.c (binary_bfd_discard_group): Define.
8336 * bout.c (b_out_bfd_discard_group): Define.
8337 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8338 * coffcode.h (coff_bfd_discard_group): Define.
8339 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8340 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8341 * i386msdos.c (msdos_bfd_discard_group): Define.
8342 * i386os9k.c (os9k_bfd_discard_group): Define.
8343 * ieee.c (ieee_bfd_discard_group): Define.
8344 * ihex.c (ihex_bfd_discard_group): Define.
8345 * mmo.c (mmo_bfd_discard_group): Define.
8346 * nlm-target.h (nlm_bfd_discard_group): Define.
8347 * oasys.c (oasys_bfd_discard_group): Define.
8348 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8349 * som.c (som_bfd_discard_group): Define.
8350 * srec.c (srec_bfd_discard_group): Define.
8351 * tekhex.c (tekhex_bfd_discard_group): Define.
8352 * versados.c (versados_bfd_discard_group): Define.
8353 * vms.c (vms_bfd_discard_group): Define.
8354 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8355 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8356 (aix5coff64_vec): Likewise.
8357 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8358
8359 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8360
8361 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8362 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8363 (elf32-sh64-com.lo): New dependency list.
8364 * Makefile.in: Regenerate.
8365 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8366 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8367 elf32-sh64-com.lo.
8368 * configure: Regenerate.
8369 * elf32-sh64.c (sh64_address_in_cranges)
8370 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8371 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8372 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8373 * elf32-sh64-com.c: ...here. New file.
8374
8375 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8376
8377 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8378 ATTRIBUTE_UNUSED on used params.
8379 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8380 before calling bfd_section_from_elf_index on local syms.
8381 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8382
8383 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8384
8385 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8386 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8387 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8388 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8389 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8390 * Makefile.in: Regenerate.
8391 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8392 (sh64-*-netbsd*): New targets.
8393 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8394 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8395 * configure: Regenerate.
8396 * elf32-sh64-nbsd.c: New file.
8397 * elf64-sh64-nbsd.c: New file.
8398 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8399 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8400 bfd_elf64_sh64lnbsd_vec.
8401
8402 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8403
8404 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8405 (bfd_section_from_shdr): Likewise. Set section name of group
8406 sections from signature.
8407 (group_signature): Split out from setup_group. Ensure symbol table
8408 is available.
8409 (bfd_elf_discard_group): New function.
8410 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8411 .gnu.linkonce* sections if they are members of a group.
8412 (set_group_contents): Set GRP_COMDAT flag.
8413 * section.c (bfd_discard_group): New function.
8414 * bfd-in.h (bfd_elf_discard_group): Declare.
8415 * bfd-in2.h: Regenerate.
8416 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8417 (elf_linkonce_p): Define.
8418
8419 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8420
8421 * elf.c (bfd_section_from_shdr): Make "name" const.
8422 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8423 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8424 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8425 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8426 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8427 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8428 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8429 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8430 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8431 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8432 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8433
8434 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8435
8436 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8437 ABI.
8438
8439 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8440
8441 * elf32-arc.c: Fix formatting.
8442 * elf32-arm.h: Likewise.
8443 * elf32-cris.c: Likewise.
8444 * elf32-dlx.c: Likewise.
8445 * elf32-hppa.c: Likewise.
8446 * elf32-i386.c: Likewise.
8447 * elf32-i386qnx.c: Likewise.
8448 * elf32-or32.c: Likewise.
8449 * elf32-s390.c: Likewise.
8450 * elf32-sh64.c: Likewise.
8451 * elf32-vax.c: Likewise.
8452 * elf32-xstormy16.c: Likewise.
8453 * elf64-alpha.c: Likewise.
8454 * elf64-mmix.c: Likewise.
8455 * elf64-ppc.c: Likewise.
8456 * elf64-s390.c: Likewise.
8457 * elf64-sh64.c: Likewise.
8458 * elf64-x86-64.c: Likewise.
8459
8460 2002-06-02 Richard Henderson <rth@redhat.com>
8461
8462 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8463 null when there are no got entries for a symbol.
8464 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8465 uninitialized variable warning.
8466
8467 2002-06-01 Richard Henderson <rth@redhat.com>
8468
8469 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8470 undefined symbols here.
8471 (elf64_alpha_relax_section): Do it here. Also test for not
8472 defined in the current module.
8473 (elf64_alpha_relocate_section_r): Split out of ...
8474 (elf64_alpha_relocate_section): ... here. Don't dereference
8475 NULL when looking up local got entries.
8476
8477 2002-06-01 Richard Henderson <rth@redhat.com>
8478
8479 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8480 symbols from JSR relaxation.
8481 (elf64_alpha_size_plt_section_1): New.
8482 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8483 (elf64_alpha_size_rela_got_1): ... here.
8484 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8485 (elf64_alpha_size_rela_got_section): ... here.
8486 (elf64_alpha_size_plt_section): New.
8487 (elf64_alpha_relax_section): Call them.
8488 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8489 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8490
8491 2002-06-01 Richard Henderson <rth@redhat.com>
8492
8493 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8494 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8495 in shared libraries. Fix DTPRELHI and TPRELHI value.
8496 (INSN_ADDQ, INSN_RDUNIQ): New.
8497 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8498 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8499 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8500 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8501 Handle GOTDTPREL and GOTTPREL relocations.
8502 (elf64_alpha_relax_gprelhilo): New.
8503 (elf64_alpha_relax_tls_get_addr): New.
8504 (elf64_alpha_relax_find_tls_segment): New.
8505 (elf64_alpha_relax_section): Handle TLS relocations.
8506 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8507 (elf64_alpha_check_relocs): Set it.
8508
8509 2002-06-01 Richard Henderson <rth@redhat.com>
8510
8511 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8512
8513 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8514 check; don't suppress dynamic relocs for non-allocated sections.
8515
8516 * elf64-alpha.c: Remove dead code.
8517
8518 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8519
8520 * bfd-in2.h: Regenerate.
8521 * libbfd.h: Regenerate.
8522 * po/SRC-POTFILES.in: Regenerate.
8523
8524 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8525 space for bss .plt.
8526
8527 2002-05-31 Graeme Peterson <gp@qnx.com>
8528
8529 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8530 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8531 Run "make dep-am".
8532 * Makefile.in: Regenerate.
8533 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8534 * configure.in: Add bfd_elf32_i386qnx_vec support.
8535 * configure: Regenerate.
8536 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8537 is_contained_by_filepos, and copy_private_bfd_data_p.
8538 * elf.c (assign_file_positions_for_segments): Call backend
8539 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8540 (IS_CONTAINED_BY_FILEPOS): Define.
8541 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8542 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8543 Fix non-K&R call to _bfd_error_handler.
8544 (_bfd_elf_copy_private_section_data): Use backend
8545 copy_private_bfd_data_p.
8546 * elf32-i386.c: Don't include elfxx-target.h when
8547 ELF32_I386_C_INCLUDED is defined.
8548 * elf32-i386qnx.c: New QNX elf backend file.
8549 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8550 elf_backend_is_contained_by_filepos, and
8551 elf_backend_do_copy_private_bfd_data.
8552 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8553
8554 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8555
8556 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8557 Move other similar defines to start of file.
8558
8559 2002-05-30 Tom Rix <trix@redhat.com>
8560
8561 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8562 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8563
8564 2002-05-30 Richard Henderson <rth@redhat.com>
8565
8566 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8567 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8568 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8569 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8570 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8571 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8572 n_local_got_entries to total_got_size and local_got_size.
8573 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8574 (alpha_got_entry_size): New.
8575 (elf64_alpha_relax_with_lituse): Use it.
8576 (elf64_alpha_relax_without_lituse): Likewise.
8577 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8578 (get_got_entry): New.
8579 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8580 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8581 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8582 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8583 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8584 (elf64_alpha_calc_got_offsets): Likewise.
8585 (alpha_dynamic_entries_for_reloc): New.
8586 (elf64_alpha_calc_dynrel_sizes): Use it.
8587 (elf64_alpha_size_dynamic_sections): Likewise.
8588 (elf64_alpha_relocate_section): Handle TLS relocations.
8589 * reloc.c: Add Alpha TLS relocations.
8590 * bfd-in2.h, libbfd.h: Rebuild.
8591
8592 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8593
8594 * peXXigen.c (pe_print_idata): Remove double printed
8595 import table lines; add Bound-To comment.
8596
8597 2002-05-29 Matt Thomas <matt@3am-software.com>
8598
8599 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8600 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8601 (elf32-vax.lo): New rule.
8602 * Makefile.in: Regenerate.
8603 * configure.in (bfd_elf32_vax_vec)
8604 (vaxnetbsd_vec): New vectors.
8605 * configure: Regenerate.
8606 * config.bfd (vax-*-netbsdelf*)
8607 (vax-*-netbsdaout*)
8608 (vax-*-netbsd*): New targets.
8609 * elf32-vax.c: New file.
8610 * reloc.c: Add VAX relocations.
8611 * bfd-in2.h: Regenerate.
8612 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8613
8614 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8615
8616 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8617 and bfd_elf32_bigarm_vec to targ_selvecs.
8618
8619 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8620
8621 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8622 with auto-imported symbols.
8623
8624 2002-05-29 Adam Nemet <anemet@lnxw.com>
8625
8626 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8627 sections only record bfd.
8628 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8629 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8630 * bfd-in2.h: Regenerate.
8631
8632 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8633
8634 * syms.c (_bfd_stab_section_find_nearest_line): Move
8635 declaration and initialisation of saw_line and saw_func out of
8636 for loop.
8637
8638 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8639
8640 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8641 (bfd_elf64_get_symbol_info): Define.
8642 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8643
8644 2002-05-29 Andrey Volkov <avolkov@transas.com>
8645
8646 * cpu-h8300.c: Make default h8300 machine first in machine list.
8647
8648 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8649
8650 * config.bfd: Added DLX configuraton.
8651 * Makefile.am: Added DLX configuraton.
8652 * configure.in: Added DLX configuraton.
8653 * archures.c: Add DLX architecture.
8654 * reloc.c: Add DLX relocs.
8655 * targets.c: Added DLX target vector.
8656 * configure: Regenerate.
8657 * Makefile.in: Regenreate.
8658 * bfd-in2.h: Regenreate.
8659 * elf32-dlx.c: New file: Support DLX target.
8660 * cpu-dlx.c: New file: Support DLX target.
8661
8662 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8663
8664 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8665
8666 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8667 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8668 strings to point inside function code sym string.
8669 (func_desc_adjust): Likewise.
8670 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8671
8672 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8673
8674 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8675 (elf64_x86_64_grok_psinfo): Added.
8676
8677 2002-05-24 TAMURA Kent <kent@netbsd.org>
8678
8679 * config.bfd: Add a target for i386-netbsdpe.
8680
8681 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8682
8683 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8684 and is_func_descriptor.
8685 (func_desc_adjust): Hide function code sym in shared libs unless
8686 there is a matching exported function descriptor sym.
8687
8688 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8689
8690 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8691 for symbols from SHF_TLS section.
8692 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8693 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8694 (map_sections_to_segments): Build PT_TLS segment if necessary.
8695 (assign_file_positions_for_segments): Likewise.
8696 (get_program_header_size): Account for PT_TLS segment.
8697 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8698 SEC_THREAD_LOCAL sections to STT_TLS.
8699 * reloc.c: Add 386 and IA-64 TLS relocs.
8700 * section.c (SEC_THREAD_LOCAL): Define.
8701 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8702 Remove.
8703 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8704 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8705 unconditionally.
8706 (struct elf_final_link_info): Add first_tls_sec.
8707 (elf_bfd_final_link): Set first_tls_sec.
8708 Compute elf_hash_table (info)->tls_segment.
8709 (elf_link_output_extsym): Handle STT_TLS symbols.
8710 (elf_link_input_bfd): Likewise.
8711 * syms.c (BSF_THREAD_LOCAL): Define.
8712 * bfd-in2.h: Rebuilt.
8713 * libbfd.h: Rebuilt.
8714 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8715 elf_i386_mkobject, elf_i386_object_p): New functions.
8716 (elf_howto_table): Add TLS relocs.
8717 (elf_i386_reloc_type_lookup): Support TLS relocs.
8718 (elf_i386_info_to_howto_rel): Likewise.
8719 (struct elf_i386_link_hash_entry): Add tls_type.
8720 (struct elf_i386_obj_tdata): New.
8721 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8722 New macros.
8723 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8724 (link_hash_newfunc): Clear tls_type.
8725 (elf_i386_check_relocs): Support TLS relocs.
8726 (elf_i386_gc_sweep_hook): Likewise.
8727 (allocate_dynrelocs): Likewise.
8728 (elf_i386_size_dynamic_sections): Likewise.
8729 (elf_i386_relocate_section): Likewise.
8730 (elf_i386_finish_dynamic_symbol): Likewise.
8731 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8732 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8733 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8734 want_tprel, want_dtpmod, want_dtprel.
8735 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8736 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8737 R_IA64_LTOFF_TPREL22.
8738 (elf_code_to_howto_index): Add TLS relocs.
8739 (elfNN_ia64_check_relocs): Support TLS relocs.
8740 (allocate_global_data_got): Account for TLS .got data.
8741 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8742 (elfNN_ia64_install_value): Supprt TLS relocs.
8743 (set_got_entry): Support TLS relocs.
8744 (elfNN_ia64_relocate_section): Likewise.
8745
8746 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8747
8748 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8749 BLX reloc round the relocation up rather than down.
8750 * coff-arm.c (coff_arm_relocate_section): Likewise.
8751
8752 2002-05-21 H.J. Lu (hjl@gnu.org)
8753
8754 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8755 definition.
8756
8757 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8758
8759 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8760 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8761
8762 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8763
8764 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8765 unresolved relocs.
8766 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8767
8768 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8769
8770 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8771 non-ELF targets.
8772
8773 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8774
8775 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8776 an error value.
8777 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8778 return with false on error.
8779 (elf_link_input_bfd): Check reloc_emitter return value.
8780
8781 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8782
8783 * config.bfd (armeb-*-netbsdelf*): New target.
8784
8785 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8786
8787 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8788 at the plt call stub.
8789
8790 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8791
8792 * cpu-mips.c (mips_compatible): Don't try to check machine
8793 compatibility.
8794
8795 2002-05-18 Tom Rix <trix@redhat.com>
8796
8797 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8798
8799 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8800
8801 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8802 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8803 we've already warned about an undefined symbol. Report more
8804 detail on reloc errors.
8805
8806 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8807
8808 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8809 * configure.in: Invoke AM_INSTALL_LIBBFD.
8810 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8811 (install_libbfd): .. New target.
8812 (uninstall_libbfd): Likewise.
8813 (install-bfdlibLTLIBRARIES): Likewise.
8814 (uninstall-bfdlibLTLIBRARIES): Likewise.
8815 (bfdlibdir): New.
8816 (bfdincludedir): New.
8817 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8818 * aclocal.m4: Regenerate.
8819 * configure: Regenerate.
8820 * Makefile.in: Regenerate.
8821
8822 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8823
8824 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8825 hash loop.
8826
8827 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8828
8829 * config.bfd: Add targets for sh64-linux (little endian and
8830 big endian).
8831
8832 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8833
8834 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8835 is located in the same section as the import table. Instead
8836 check, and if necessary load the section containing the thunk.
8837
8838 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8839
8840 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8841 bfd_bread.
8842 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8843 with bfd_bread.
8844
8845 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8846
8847 * aix5ppc-core.c: Warning fixes.
8848 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8849 * aout-target.h (MY_bfd_link_just_syms): Define.
8850 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8851 * bfd.c (bfd_link_just_syms): Define.
8852 * binary.c (binary_bfd_link_just_syms): Define.
8853 * bout.c (b_out_bfd_link_just_syms): Define.
8854 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8855 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8856 * coffcode.h (coff_bfd_link_just_syms): Define.
8857 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8858 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8859 (_bfd_elf_link_just_syms): Declare.
8860 * elf.c (_bfd_elf_link_just_syms): New function.
8861 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8862 sections haven't already been discarded by the linker.
8863 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8864 sections and SEC_MERGE sections.
8865 (elf_bfd_discard_info): Similarly here.
8866 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8867 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8868 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8869 * ieee.c (ieee_bfd_link_just_syms): Define.
8870 * ihex.c (ihex_bfd_link_just_syms): Define.
8871 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8872 (_bfd_generic_link_just_syms): Declare.
8873 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8874 * linker.c (_bfd_generic_link_just_syms): New function.
8875 * mmo.c (mmo_bfd_link_just_syms): Define.
8876 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8877 * oasys.c (oasys_bfd_link_just_syms): Define.
8878 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8879 * som.c (som_bfd_link_just_syms): Define.
8880 * srec.c (srec_bfd_link_just_syms): Define.
8881 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8882 (BFD_JUMP_TABLE_LINK): And here.
8883 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8884 * versados.c (versados_bfd_link_just_syms): Define.
8885 * vms.c (vms_bfd_link_just_syms): Define.
8886 * libbfd.h: Regenerate.
8887 * bfd-in2.h: Regenerate.
8888
8889 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8890
8891 * elf32-mips.c: Remove superfluous definitions copied from
8892 elfxx-mips.c.
8893 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8894 SGIish vectors to check the special case.
8895 (mips_elf_hi16_reloc): Fix comment.
8896 (mips_elf_got16_reloc): Likewise.
8897 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8898 (elf_reloc_map): Code cleanup.
8899 (mips_reloc_map): Add comment.
8900 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8901 (mips_elf32_rtype_to_howto): Likewise.
8902 (mips_elf32_discard_info): Likewise.
8903 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8904 lead to IRIX compatibility now.
8905
8906 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8907
8908 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8909
8910 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8911
8912 * config.bfd (shle-*-netbsdelf*): Add target which includes
8913 sh64 support.
8914
8915 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8916
8917 * configure.in: Revert 2002-04-07. Instead, auto-configure
8918 HAVE_ST_C_IMPL.
8919 * configure: Regenerate.
8920 * config.in: Regenerate.
8921 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8922 or AIX_5_CORE.
8923
8924 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8925
8926 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8927 corefiles as well.2
8928 * configure: Regenerate.
8929
8930 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8931
8932 * Makefile.am (install-data-local): Install headers to
8933 $(exec_prefix)/include.
8934 * Makefile.in: Regenerate.
8935
8936 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8937 Daniel Jacobowitz <drow@mvista.com>
8938
8939 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8940 map BFD_RELOC_RVA.
8941
8942 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8943
8944 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8945 hppa*-*-openbsd*): New targets.
8946 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8947 * configure: Regenerate.
8948
8949 2002-05-10 Tom Rix <trix@redhat.com>
8950
8951 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8952 xcoff64_ppc_relocate_section.
8953 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8954 * libxcoff.h: Common xcoff_reloc_type function declaration.
8955
8956 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8957
8958 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8959 added in 2002-05-09 commit.
8960
8961 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8962 don't look for stubs on all undefined syms.
8963
8964 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8965
8966 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8967 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8968 pcrel_offset.
8969
8970 * elf32-i386.c (elf_howto_table): Comments.
8971 (elf_i386_relocate_section): Handle more relocs for relocatable
8972 linking and against SEC_MERGE sections.
8973
8974 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8975
8976 * elf32-ppc.c (ppc_elf_create_got): New function.
8977 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8978 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8979 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8980 _bfd_elf_create_got_section.
8981
8982 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8983
8984 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8985 * elfxx-target.h (elf_backend_rela_normal): Define.
8986 (elfNN_bed): Init rela_normal.
8987 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8988 for section symbols here if rela_normal. Simplify abs section test.
8989 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8990 return immediately. Remove code handling relocatable linking.
8991 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8992 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8993 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8994 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8995 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8996 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8997 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8998 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8999 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9000 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
9001 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9002 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9003 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9004 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
9005 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
9006 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9007 * elf-m10200.c (elf_backend_rela_normal): Define.
9008 * elf-m10300.c (elf_backend_rela_normal): Define.
9009 * elf32-fr30.c (elf_backend_rela_normal): Define.
9010 * elf32-i370.c (elf_backend_rela_normal): Define.
9011 * elf32-i860.c (elf_backend_rela_normal): Define.
9012 * elf32-m68k.c (elf_backend_rela_normal): Define.
9013 * elf32-mcore.c (elf_backend_rela_normal): Define.
9014 * elf32-openrisc.c (elf_backend_rela_normal): Define.
9015 * elf32-ppc.c (elf_backend_rela_normal): Define.
9016 * elf32-s390.c (elf_backend_rela_normal): Define.
9017 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
9018 * elf64-ppc.c (elf_backend_rela_normal): Define.
9019 * elf64-s390.c (elf_backend_rela_normal): Define.
9020 * elf64-x86-64.c (elf_backend_rela_normal): Define.
9021 * elfxx-ia64.c (elf_backend_rela_normal): Define.
9022 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
9023 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
9024
9025 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9026
9027 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9028 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9029
9030 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9031
9032 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9033 when not relocatable. Fix reloc_emitter call for K&R.
9034
9035 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9036
9037 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9038 reloading local sym addend mistakenly removed in 2002-05-01 change.
9039
9040 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9041 (read_abbrevs): Change "offset" param to bfd_vma.
9042 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9043 Change "abbrev_offset" to bfd_vma.
9044 (read_indirect_string): Use correct conversion chars in error
9045 message format string, cast bfd_vma's to unsigned long.
9046 (read_abbrevs): Likewise.
9047 (read_attribute_value): Likewise.
9048 (decode_line_info): Likewise.
9049 (scan_unit_for_functions): Likewise.
9050 (parse_comp_unit): Likewise.
9051
9052 2002-05-04 Tom Rix <trix@redhat.com>
9053
9054 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9055 (coff_swap_reloc_out): Same.
9056 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9057 (xcoff_swap_reloc_out): Same.
9058 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9059 case some 16 bit relocs. Add reloc value to output.
9060 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9061 R_RBR. Improve names.
9062 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9063 (bfd_xcoff_backend_data): Update with new reloc swap names.
9064 (bfd_pmac_xcoff_backend_data) : Same.
9065 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9066 (xcoff64_swap_reloc_out): Same.
9067 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9068 R_POS. Add reloc value to output.
9069 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9070 bit R_RBR. Improve names, masks.
9071 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9072 (bfd_xcoff_backend_data): Update with new reloc swap names.
9073 (bfd_xcoff_aix5_backend_data) : Same.
9074
9075 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9076
9077 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9078 bfd_count top_index, input_list, all_local_syms.
9079 (elf32_hppa_setup_section_lists): New function, split from
9080 elf32_hppa_size_stubs.
9081 (elf32_hppa_next_input_section): Likewise.
9082 (group_sections): Likewise.
9083 (get_local_syms): Likewise.
9084 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9085 stubs on undefined syms too.
9086 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9087 Only access htab elf fields when we have an elf hash table.
9088 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9089 (elf32_hppa_next_input_section): Declare.
9090
9091 2002-05-04 Bob Byrnes <byrnes@curl.com>
9092
9093 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9094 _bfd_new_bfd.
9095
9096 2002-05-03 H.J. Lu (hjl@gnu.org)
9097
9098 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9099 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9100 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9101 to hide a global symbol.
9102 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9103 forced_local to true.
9104
9105 2002-05-02 Richard Henderson <rth@redhat.com>
9106
9107 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9108 vs SHN_UNDEF to zero.
9109
9110 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9111
9112 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9113 16 bit reloc.
9114 <R_PPC64_SECTOFF_DS>: Likewise.
9115 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9116 SECTOFF reloc.
9117 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9118 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9119 SECTOFF reloc.
9120
9121 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9122 (ppc64_elf_ha_reloc): New function.
9123 (ppc64_elf_brtaken_reloc): New function.
9124 (ppc64_elf_sectoff_reloc): New function.
9125 (ppc64_elf_sectoff_ha_reloc): New function.
9126 (ppc64_elf_toc_reloc): New function.
9127 (ppc64_elf_toc_ha_reloc): New function.
9128 (ppc64_elf_toc64_reloc): New function.
9129 (ppc64_elf_unhandled_reloc): New function.
9130 (ppc64_elf_howto_raw): Use the above.
9131 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9132 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9133 <R_PPC64_SECTOFF_DS>: Likewise.
9134 (IS_ABSOLUTE_RELOC): Update.
9135 (struct ppc_link_hash_table): Add have_undefweak.
9136 (ppc64_elf_link_hash_table_create): Init.
9137 (func_desc_adjust): Set have_undefweak.
9138 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9139 add the .sfpr blr when have_undefweak.
9140 (ppc64_elf_setup_section_lists): Check hash table flavour.
9141 (ppc64_elf_next_input_section): Move output_section->owner test to
9142 ppc64elf.em.
9143 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9144 and relocatable test. Return TOCstart and don't set elf_gp.
9145 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9146 offset calculation. Add assert on weak sym branch tweaks.
9147 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9148 (ppc64_elf_toc): Declare.
9149 (ppc64_elf_next_input_section): Update.
9150
9151 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9152
9153 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9154 file_name.
9155
9156 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9157
9158 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9159 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9160 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9161 call branches. Correct undefined weak destination.
9162 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9163 .sfpr, and correct case where either only savef* or restf* is
9164 needed.
9165
9166 Long branch stubs, multiple stub sections.
9167 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9168 (ppc64_elf_next_input_section): Declare.
9169 * elf64-ppc.c: Move linker-only prototypes.
9170 (STUB_SUFFIX): Define.
9171 (enum ppc_stub_type): New.
9172 (struct ppc_stub_hash_entry): New.
9173 (struct ppc_branch_hash_entry): New.
9174 (struct ppc_link_hash_entry): Add stub_cache, oh.
9175 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9176 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9177 Rename plt_overflow to stub_error.
9178 (ppc_stub_hash_lookup): Define.
9179 (ppc_branch_hash_lookup): Define.
9180 (stub_hash_newfunc): New function.
9181 (branch_hash_newfunc): New function.
9182 (link_hash_newfunc): Init new fields.
9183 (ppc64_elf_link_hash_table_create): Likewise.
9184 (ppc64_elf_link_hash_table_free): New function.
9185 (ppc_stub_name): New function.
9186 (ppc_get_stub_entry): New function.
9187 (ppc_add_stub): New function.
9188 (create_linkage_sections): Use bfd_make_section_anyway. Create
9189 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9190 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9191 and set up for plt call stubs. Link func and func desc syms.
9192 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9193 (func_desc_adjust): Avoid hash lookup when func desc sym available
9194 via shortcut, and set links when processing.
9195 (ppc64_elf_hide_symbol): Likewise.
9196 (allocate_dynrelocs): Don't allocate stub section here.
9197 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9198 Remove sstub code.
9199 (ppc_type_of_stub): New function.
9200 (build_one_stub): Delete.
9201 (ppc_build_one_stub): New function.
9202 (ppc_size_one_stub): New function.
9203 (ppc64_elf_setup_section_lists): New function.
9204 (ppc64_elf_next_input_section): New function.
9205 (group_sections): New function.
9206 (get_local_syms): New function.
9207 (ppc64_elf_size_stubs): Rewrite.
9208 (ppc64_elf_build_stubs): Rewrite.
9209 (ppc64_elf_relocate_section): Look up stub entry for REL24
9210 relocs. Don't propagate REL14* to dynamic objects. Look for long
9211 branch stubs if REL14* or REL24 relocs won't reach.
9212 (bfd_elf64_bfd_link_hash_table_free): Define.
9213
9214 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9215
9216 * config.bfd: Add support for powerpc-*-windiss.
9217
9218 2002-04-30 Tom Rix <trix@redhat.com>
9219
9220 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9221 symbol names into the hash table.
9222
9223 2002-04-28 Tom Rix <trix@redhat.com>
9224
9225 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9226 calulating relocations.
9227 (xcoff_complain_overflow) : Function table for relocation errors.
9228 (xcoff_ppc_relocate_section): Use relocation and complain function
9229 tables.
9230 (xcoff_complain_overflow_unsigned_func): New complain function.
9231 (xcoff_complain_overflow_signed_func): Same.
9232 (xcoff_complain_overflow_bitfield_func): Same.
9233 (xcoff_complain_overflow_dont_func): Same.
9234 (xcoff_reloc_type_crel): New recot function.
9235 (xcoff_reloc_type_br): Same.
9236 (xcoff_reloc_type_ba): Same.
9237 (xcoff_reloc_type_toc): Same.
9238 (xcoff_reloc_type_rel): Same.
9239 (xcoff_reloc_type_neg): Same.
9240 (xcoff_reloc_type_pos): Same.
9241 (xcoff_reloc_type_fail): Same.
9242 (xcoff_reloc_type_noop): Same.
9243 * libxcoff.h : Declare common parts for xcoff64.
9244 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9245 and complain function tables.
9246
9247 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9248
9249 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9250 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9251
9252 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9253
9254 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9255 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9256
9257 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9258 same as the output before calling elf_link_input_bfd.
9259
9260 * coffcode.h (coff_compute_section_file_positions): Set
9261 section_tail after shuffling section list.
9262
9263 2002-04-24 Christian Groessler <chris@groessler.org>
9264
9265 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9266 addresses are 23bit with a special layout, not plain 32bit
9267 values. Prevent relocation of immediate values.
9268
9269 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9270
9271 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9272 MIPS-16 ASE flags are set, print something to indicate that.
9273
9274 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9275
9276 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9277 under which a plt call stub is used.
9278 (final_link_relocate): Similarly.
9279 (allocate_plt_static): Clear h-plabel except when plt entry is
9280 exclusively used for a plabel.
9281 (allocate_dynrelocs): Use the above to simplify plt sizing.
9282 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9283 (elf32_hppa_link_hash_table_create): Init.
9284 (BL22_RP): Define.
9285 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9286 (elf32_hppa_check_relocs): Set has_22bit_branch.
9287
9288 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9289 (final_link_relocate): Likewise.
9290
9291 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9292
9293 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9294 search table if some FDE is DW_EH_PE_aligned encoded either.
9295 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9296
9297 2002-04-22 Richard Smith <richard@ex-parrot.com>
9298 Jakub Jelinek <jakub@redhat.com>
9299
9300 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9301 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9302 encoded personality.
9303 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9304 for CIE/FDE removal.
9305
9306 2002-04-20 Tom Rix <trix@redhat.com>
9307
9308 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9309
9310 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9311
9312 * archures.c (bfd_lookup_arch): Move the list order comment..
9313 (struct bfd_arch_info): ..to where it belongs.
9314 * bfd-in2.h: Regenerate.
9315
9316 * archures.c (bfd_lookup_arch): Add comment on list order.
9317 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9318 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9319 is always at head of list.
9320
9321 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9322
9323 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9324 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9325 definition of these functions for ARM_WINCE builds as they are
9326 not used.
9327 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9328 for ARM_WINCE builds.
9329
9330 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9331
9332 * coff-arm.c (bfd_arm_process_before_allocation):
9333
9334 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9335
9336 * cpu-sh.c (scan_mach): Delete.
9337 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9338 (bfd_sh_arch): Likewise.
9339
9340 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9341
9342 * ihex.c (ihex_write_object_contents): Fix check for records
9343 crossing 64K boundaries.
9344
9345 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9346
9347 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9348 type rather than just assuming entries are ELF.
9349 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9350 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9351 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9352 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9353 rather than elf_link_hash_entry.
9354
9355 2002-04-15 Richard Henderson <rth@redhat.com>
9356
9357 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9358 n32 binaries.
9359
9360 2002-04-15 Michael Snyder <msnyder@redhat.com>
9361
9362 * opncls.c (bfd_close): Write contents if writeable.
9363 Minor formatting tidy-ups.
9364
9365 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9366
9367 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9368
9369 2002-04-12 Michael Snyder <msnyder@redhat.com>
9370
9371 * bfd-in.h (bfd_get_section_lma): New access macro.
9372 Minor white-space fix-up.
9373
9374 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9375
9376 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9377 header pad.
9378
9379 2002-04-09 DJ Delorie <dj@redhat.com>
9380
9381 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9382
9383 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9384
9385 * coffcode.h (coff_read_word): New.
9386 (coff_compute_checksum): New.
9387 (coff_apply_checksum): New.
9388 (coff_write_object_contents): Call coff_apply_checksum () to
9389 apply checksum to PE image.
9390
9391 2002-04-08 Randolph Chung <tausq@debian.org>
9392
9393 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9394 (elf32_hppa_final_link): Split out sorting logic to..
9395 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9396 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9397
9398 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9399
9400 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9401 pattern.
9402 * configure: Re-generate.
9403
9404 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9405
9406 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9407 is greater or equal to 4.3.3.
9408 * configure: Regenerate.
9409 Fix PR gdb/344.
9410
9411 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9412
9413 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9414 R_CRIS_32_PCREL>: Fix typo in name.
9415 (cris_elf_check_relocs): Always create .rela.got here when
9416 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9417 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9418 assume it's created.
9419
9420 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9421
9422 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9423 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9424 define.
9425 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9426 * bfd.c (bfd_link_hash_table_free): Define.
9427 * binary.c (binary_bfd_link_hash_table_free): Define.
9428 * bout.c (b_out_bfd_link_hash_table_free): Define.
9429 * coff-rs6000.c (rs6000coff_vec): Include
9430 _bfd_generic_link_hash_table_free.
9431 (pmac_xcoff_vec): Likewise.
9432 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9433 (aix5coff64_vec): Likewise.
9434 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9435 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9436 (bfd_elf32_bfd_link_hash_table_free): Define.
9437 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9438 (bfd_elf32_bfd_link_hash_table_free): Define.
9439 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9440 define.
9441 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9442 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9443 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9444 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9445 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9446 (_bfd_generic_link_hash_table_free): Add prototype.
9447 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9448 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9449 * linker.c (_bfd_generic_link_hash_table_free): New function.
9450 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9451 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9452 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9453 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9454 * som.c (som_bfd_link_hash_table_free): Define.
9455 * srec.c (srec_bfd_link_hash_table_free): Define.
9456 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9457 * versados.c (versados_bfd_link_hash_table_free): Define.
9458 * vms.c (vms_bfd_link_hash_table_free): New function.
9459 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9460
9461 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9462 instead of bfd_alloc.
9463 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9464 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9465 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9466 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9467 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9468 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9469 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9470 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9471 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9472 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9473 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9474 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9475 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9476 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9477 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9478 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9479 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9480 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9481 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9482 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9483 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9484 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9485 * m68klinux.c (linux_link_hash_table_create): Likewise.
9486 * sparclinux.c (linux_link_hash_table_create): Likewise.
9487 * sunos.c (sunos_link_hash_table_create): Likewise.
9488 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9489
9490 * targets.c: Add _bfd_link_hash_table_free to xvec.
9491
9492 * bfd-in2.h: Regenerate.
9493 * libbfd.h: Regenerate.
9494 * libcoff.h: Regenerate.
9495
9496 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9497
9498 * dep-in.sed: Cope with absolute paths.
9499 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9500 Run "make dep-am".
9501 * Makefile.in: Regenerate.
9502 * coff-arm.c: Fix copyright date.
9503 * cpu-h8300.c: Likewise.
9504 * cpu-i370.c: Likewise.
9505 * cpu-s390.c: Likewise.
9506 * cpu-mips.c: Likewise.
9507 * po/SRC-POTFILES.in: Regenerate.
9508
9509 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9510
9511 * Makefile.am: Add elfxx-mips.c to the known backends.
9512 (elf32-mips.lo): remove dependency to coff/external.h.
9513 * Makefile.in: Regenerate.
9514 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9515 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9516 accordingly.
9517 * configure: Regenerate.
9518 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9519 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9520 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9521 MIPS specific backend functions.
9522 * elf32-mips.c: Moved most code to elfxx-mips.c.
9523 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9524 static.
9525 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9526 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9527 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9528 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9529 interface to allow selection of the right REL or RELA howto table.
9530 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9531 static. Let it refuse n32 objects.
9532 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9533 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9534 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9535 (elf32_mips_ignore_discarded_relocs): Rename from
9536 _bfd_elf32_mips_ignore_discarded_relocs.
9537 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9538 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9539 (elf_mips_howto_table_rela): Remove.
9540 * elf64-mips.c: Moved most code to elfxx-mips.c.
9541 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9542 (mips_elf64_rtype_to_howto): New function.
9543 (mips_elf64_object_p): Likewise.
9544 (elf64_mips_irix_compat): Likewise.
9545 * elfxx-mips.c: New file containing common code merged together from
9546 elf32-mips.c and elf64-mips.c.
9547 * elfxx-mips.h: New file containing MIPS specific prototypes from
9548 elf-bfd.h.
9549 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9550 elf_backend_mips_rtype_to_howto.
9551
9552 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9553
9554 * srec.c (MAXCHUNK, Chunk): Revise comments.
9555 (srec_write_record): Correct buffer size.
9556 (srec_write_header): Do without intermediate buffer.
9557 (srec_write_section): Validate Chunk.
9558 (srec_write_terminator): Pass NULL instead of dummy buffer.
9559 (srec_write_symbols): Pass file and symbol names directly to
9560 bfd_bwrite so sprintf won't overflow buffer.
9561
9562 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9563
9564 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9565 PC relative relocs against hidden symbols.
9566 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9567
9568 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9569
9570 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9571 LMAs, loop over segments until p_vaddr and p_memsz specify an
9572 extent enclosing the section.
9573
9574 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9575
9576 * ihex.c (ihex_write_object_contents): Do not allow records to
9577 cross a 64K boundary - wrap if necessary.
9578
9579 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9580
9581 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9582 which caused the returned LWP ID to always be 0.
9583
9584 2002-04-01 Richard Henderson <rth@redhat.com>
9585
9586 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9587 (elf32_sparc_relocate_section): Use it to figure out when to
9588 initialize .got entries.
9589 * elf64-sparc.c: Similarly.
9590
9591 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9592
9593 * linker.c (link_action): Ignore duplicate warning syms.
9594 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9595 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9596 (elf_adjust_dynamic_symbol): Likewise.
9597 (elf_export_symbol): Likewise.
9598 (elf_link_find_version_dependencies): Likewise.
9599 (elf_link_assign_sym_version): Likewise.
9600 (elf_link_sec_merge_syms): Likewise.
9601 (elf_link_output_extsym): Likewise.
9602 (elf_gc_sweep_symbol): Likewise.
9603 (elf_gc_propagate_vtable_entries_used): Likewise.
9604 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9605 (elf_gc_allocate_got_offsets): Likewise.
9606 (elf_collect_hash_codes): Likewise.
9607 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9608 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9609 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9610 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9611 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9612 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9613 (elf_cris_discard_excess_dso_dynamics): Likewise.
9614 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9615 (mark_PIC_calls): Likewise.
9616 (allocate_plt_static): Likewise.
9617 (allocate_dynrelocs): Likewise.
9618 (readonly_dynrelocs): Likewise.
9619 * elf32-i386.c (allocate_dynrelocs): Likewise.
9620 (readonly_dynrelocs): Likewise.
9621 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9622 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9623 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9624 (mips_elf_sort_hash_table_f): Likewise.
9625 (mips_elf_check_mips16_stubs): Likewise.
9626 * elf32-s390.c (allocate_dynrelocs): Likewise.
9627 (readonly_dynrelocs): Likewise.
9628 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9629 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9630 (xstormy16_relax_plt_realloc): Likewise.
9631 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9632 (elf64_alpha_output_extsym): Likewise.
9633 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9634 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9635 (mips_elf64_check_mips16_stubs): Likewise.
9636 (mips_elf64_output_extsym): Likewise.
9637 * elf64-ppc.c (func_desc_adjust): Likewise.
9638 (allocate_dynrelocs): Likewise.
9639 (readonly_dynrelocs): Likewise.
9640 * elf64-s390.c (allocate_dynrelocs): Likewise.
9641 (readonly_dynrelocs): Likewise.
9642 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9643 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9644 (readonly_dynrelocs): Likewise.
9645 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9646 * aoutx.h (aout_link_write_other_symbol): Likewise.
9647 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9648 (_bfd_coff_write_global_sym): Likewise.
9649 * i386linux.c (linux_tally_symbols): Likewise.
9650 * m68klinux.c (linux_tally_symbols): Likewise.
9651 * sparclinux.c (linux_tally_symbols): Likewise.
9652 * pdp11.c (aout_link_write_other_symbol): Likewise.
9653 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9654 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9655 (xcoff_write_global_symbol): Likewise.
9656
9657 * cofflink.c (_bfd_coff_final_link): Formatting.
9658 * cpu-mips.c (mips_compatible): Make static, prototype.
9659 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9660 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9661 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9662 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9663 (mips_elf64_final_link): Likewise.
9664 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9665 prototype.
9666
9667 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9668
9669 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9670 (SWAP_OUT_RELOC_OFFSET): Define.
9671
9672 2002-03-27 Gregory Steuck <greg@nest.cx>
9673
9674 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9675 terminating NULL if empty symbol table.
9676 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9677
9678 2002-03-26 H.J. Lu (hjl@gnu.org)
9679
9680 * elflink.h (elf_link_input_bfd): Revert the last change since
9681 the gcc exception handling isn't fixed yet.
9682
9683 2002-03-26 H.J. Lu (hjl@gnu.org)
9684
9685 * elflink.h (elf_link_input_bfd): Complain about relocations
9686 against local symbols in discarded sections.
9687
9688 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9689
9690 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9691
9692 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9693
9694 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9695 section file offset for !SEC_LOAD sections.
9696
9697 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9698
9699 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9700 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9701
9702 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9703
9704 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9705 Whitespace changes.
9706 * archive.c: Update copyright date.
9707 * bfd-in2.h: Regenerate.
9708 * libbfd.h: Regenerate.
9709 * Makefile.am: Run "make dep-am"
9710 * Makefile.in: Regenerate.
9711 * po/SRC-POTFILES.in: Regenerate.
9712
9713 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9714
9715 * dwarf2.c (struct funcinfo): Move up.
9716 (lookup_address_in_function_table): New argument function_ptr.
9717 Set it.
9718 (lookup_address_in_line_table): New argument function. If function
9719 is non-NULL, use it to handle ``addr'' before the first line note of
9720 the function.
9721 (comp_unit_find_nearest_line): Update and swap calls to
9722 lookup_address_in_function_table and lookup_address_in_line_table.
9723 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9724 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9725
9726 2002-03-20 Tom Rix <trix@redhat.com>
9727
9728 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9729 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9730 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9731
9732 2002-03-19 Tom Rix <trix@redhat.com>
9733
9734 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9735 dynamic objects in archives.
9736
9737 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9738
9739 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9740 STT_NOTYPE symbols to STT_OBJECT.
9741
9742 2002-03-18 Jan Hubicka <jh@suse.cz>
9743
9744 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9745
9746 2002-03-18 Tom Rix <trix@redhat.com>
9747
9748 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9749 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9750 * coff-rs6000 (do_pad) : New function for archive padding.
9751 (do_copy) : New function for object file copying in archives.
9752 (do_shared_object_padding) : New function for padding shared
9753 objects to their text section alignment in archives.
9754 (bfd_xcoff_ar_achive_set_magic) : Stub.
9755 (xcoff_write_armap_big) : Use do_copy and do_pad.
9756 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9757 do_copy and do_pad.
9758 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9759 bfd_xcoff_magic_number.
9760 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9761 fop.
9762 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9763 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9764 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9765 * rs6000-core.c : Update copyright date.
9766 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9767 csectpp.
9768 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9769 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9770 (coff_set_flags) : Use bfd_xcoff_magic_number.
9771 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9772 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9773 * Makefile.am : Same.
9774 * config.bfd : Same.
9775 * targets.c : Same.
9776 * configure : Regnerate.
9777 * Makefile.in : Same.
9778 * bfd-in2.h : Same.
9779
9780 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9781
9782 * po/fr.po: Updated version.
9783
9784 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9785
9786 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9787 * libbfd.h: Regenerate.
9788 * archive.c (coff_write_armap): Pass on failures from
9789 bfd_write_bigendian_4byte_int.
9790
9791 2002-03-14 H.J. Lu <hjl@gnu.org>
9792
9793 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9794 error to bfd_error_nonrepresentable_section for reinit_array
9795 section in DSO.
9796
9797 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9798
9799 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9800 OR it in rather than replacing previously selected flags.
9801
9802 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9803 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9804
9805 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9806
9807 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9808 (N): Use the above.
9809 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9810 ensure reloc size matches before calling elf_link_input_bfd.
9811 Add an assert to check reloc size when counting output relocs.
9812
9813 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9814
9815 * mmo.c (mmo_get_loc): Return NULL rather than false.
9816
9817 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9818
9819 * po/fr.po: Updated version.
9820
9821 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9822
9823 * archures.c (bfd_default_compatible): Test bits_per_word.
9824 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9825 bfd_default_compatible.
9826 * cpu-i370.c (i370_compatible): Likewise.
9827 * cpu-sparc.c (sparc_compatible): Likewise.
9828 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9829
9830 * elflink.h: Formatting fixes.
9831 (elf_link_output_extsym): Merge undefined and undef weak cases.
9832
9833 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9834 when word size of input matches output word size.
9835
9836 2002-03-12 Andreas Jaeger <aj@suse.de>
9837
9838 * cpu-i386.c (i386_compatible): New. Use it instead of
9839 bfd_default_compatible.
9840
9841 2002-03-07 H.J. Lu (hjl@gnu.org)
9842
9843 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9844 as the type for bfd_reloc_val.
9845
9846 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9847
9848 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9849 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9850 (elf_hppa_final_link_relocate): Correct relocations for indirect
9851 references to local data through the DLT. Fix .opd creation for
9852 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9853 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9854 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9855 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9856 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9857 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9858 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9859
9860 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9861
9862 * merge.c (_bfd_merge_sections): Don't segfault if there
9863 is nothing to merge due to GC.
9864
9865 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9866
9867 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9868 symbols that have been forced local.
9869
9870 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9871 to output forced local syms for non-shared link.
9872 (elf_link_output_extsym): Tweak condition for calling backend
9873 adjust_dynamic_symbol so that previous behaviour is kept.
9874 Whitespace changes throughout file.
9875
9876 2002-03-04 H.J. Lu <hjl@gnu.org>
9877
9878 * elf.c (bfd_section_from_shdr): Handle special sections,
9879 .init_array, .fini_array and .preinit_array.
9880 (elf_fake_sections): Likewise.
9881
9882 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9883 DT entry only if the section is in output for .init_array,
9884 .fini_array and .preinit_array. Complain about .preinit_array
9885 section in DSO.
9886 (elf_bfd_final_link): Warn zero size for .init_array,
9887 .fini_array and .preinit_array sections.
9888
9889 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9890 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9891 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9892 .preinit_array.
9893
9894 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9895
9896 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9897 * configure: Regenerate.
9898
9899 2002-03-02 Tom Rix <trix@redhat.com>
9900
9901 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9902 symbolic equiv.
9903 * coff-rs6000.c (xcoff_howto_table): Same.
9904
9905 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9906
9907 * elflink.h (size_dynamic_sections): If section named
9908 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9909 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9910 ".init_array" and ".fini_array".
9911 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9912 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9913 DT_FINI_ARRAY.
9914
9915 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9916
9917 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9918 dynsyms.
9919
9920 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9921
9922 * elf64-hppa.h: Update copyright date.
9923
9924 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9925 (ppc64_elf_relocate_section): Don't generate power4 style branch
9926 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9927
9928 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9929
9930 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9931 last patch.
9932 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9933
9934 2002-02-21 Andreas Jaeger <aj@suse.de>
9935
9936 * elf64-x86-64.c: Major rework that introduces all recent changes
9937 to the x86-64 backend. Get a closer match to elf32-i386.
9938 (struct elf64_x86_64_dyn_relocs): Rename from
9939 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9940 all users.
9941 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9942 sections.
9943 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9944 remove casts, initialize new hash members.
9945 (create_got_section): New.
9946 (elf64_x86_64_create_dynamic_sections): New.
9947 (elf64_x86_64_copy_indirect_symbol): New.
9948 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9949 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9950 Reference count possible .plt and .got entries. Don't test input
9951 section SEC_READONLY here to try to avoid copy relocs, and keep
9952 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9953 DF_TEXTREL here. Delay setting of variables until needed. Cache
9954 pointer to "sreloc" section in elf_section_data. Tweak condition
9955 under which .got created. Report files with bad relocation
9956 section names.
9957 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9958 Reference count possible .plt entries. Don't deallocate .got and
9959 .relgot space here.
9960 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9961 do copy reloc processing for weakdefs. Remove redundant casts and
9962 aborts. Delay setting of vars until needed. Move creation of
9963 dynamic symbols and allocation of .plt and .rela.plt to
9964 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9965 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9966 (allocate_dynrelocs): New.
9967 (readonly_dynrelocs): New.
9968 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9969 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9970 Zero out the dynamic allocated content space.
9971 (elf64_x86_64_discard_copies): Removed.
9972 (elf64_x86_64_relocate_section): Make use of dynamic section
9973 short-cuts. Localise vars, and delay setting. Better error
9974 reporting, replace BFD_ASSERT with abort. Check
9975 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9976 regular object file and tread the weak definition as the normal
9977 one. Don't discard relocs for undefweak or undefined symbols and
9978 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9979 relocs.
9980 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9981 symbols that have been forced local. Use same test to decide if
9982 we can use a relative reloc for got as relocate_section. Expand
9983 SHN_UNDEF comment. Move expressions out of function calls.
9984 Replace BFD_ASSERT with abort.
9985 (bfd_elf64_bfd_final_link): Removed.
9986 (elf_backend_copy_indirect_symbol): Define.
9987
9988 2002-02-20 Tom Rix <trix@redhat.com>
9989
9990 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9991 (_bfd_xcoff_reloc_type_lookup): Use it.
9992 * coff64-rs6000.c (xcoff64_howto_table): Same.
9993 (xcoff64_reloc_type_lookup): Same.
9994
9995 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9996
9997 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9998 little endian.
9999
10000 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
10001
10002 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
10003 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
10004 * bfd-in2.h: Regenerate.
10005 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
10006 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
10007 with "s390:64-bit".
10008 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
10009 (elf_s390_reloc_type_lookup): Likewise.
10010 (elf_s390_check_relocs): Likewise.
10011 (elf_s390_gc_sweep_hook): Likewise.
10012 (elf_s390_relocate_section): Likewise.
10013 (elf_s390_object_p): Use renamed architecture define.
10014 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
10015
10016 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
10017
10018 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
10019
10020 2002-02-19 Jakub Jelinek <jakub@redhat.com>
10021
10022 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
10023 absptr -> pcrel optimization for shared libs.
10024 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10025 library cannot be converted to pcrel.
10026 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10027 relative.
10028 * elf32-i386.c (elf_i386_relocate_section): If
10029 _bfd_elf_section_offset returned -2, skip, but make sure the
10030 relocation is installed.
10031 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10032 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10033 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10034 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10035 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10036 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10037 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10038 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10039 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10040 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10041 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10042 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10043 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10044 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10045 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10046 _bfd_elf_section_offset returning -2 the same way as -1.
10047 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10048 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10049 and BFD_ASSERT.
10050 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10051
10052 2002-02-18 Tom Rix <trix@redhat.com>
10053
10054 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10055 (bfd_xcoff_size_dynamic_sections): Same.
10056 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10057 (bfd_xcoff_size_dynamic_sections): Same.
10058 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10059 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10060 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10061 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10062 * bfd-in2.h: Regenerate.
10063
10064 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10065
10066 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10067 (struct ppc_link_hash_table): Add sfpr.
10068 (ppc64_elf_link_hash_table_create): Init it.
10069 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10070 .glink out to..
10071 (create_linkage_sections): ..here. Make .sfpr too.
10072 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10073 dynobj early.
10074 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10075 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10076 ._restf* functions, and create as needed.
10077 (func_desc_adjust): Only force_local for shared libs.
10078
10079 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10080
10081 * configure.in: Bump version number post 2.12 branching.
10082 * configure: Regenerate.
10083
10084 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10085
10086 * mmo.c: Correct and improve comments.
10087 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10088 zero-pad. Use input to fill up non-empty bfd buffer.
10089 (mmo_flush_chunk): New function.
10090 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10091 changed. Don't emit location specifier if VMA is same as
10092 *LAST_VMAP after omitting leading zero contents. Call
10093 mmo_flush_chunk before emitting location specifier.
10094 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10095 with mmo_write_loc_chunk calls.
10096 (mmo_internal_write_section): Call mmo_flush_chunk after
10097 mmo_write_chunk.
10098 (mmo_write_symbols_and_terminator): Move :Main to first position
10099 in symbol array. Add faked one if it does not exist if there are
10100 other symbols. Don't add it if there are no symbols at all. Move
10101 out test for value of :Main from symbol loop. Rename table
10102 fakemain to maintable and variable mainsym to fakemain.
10103
10104 2002-02-15 Richard Henderson <rth@redhat.com>
10105
10106 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10107 section with no got matches any got. Simplify error generaion.
10108
10109 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10110
10111 Support arbitrary length fill patterns.
10112 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10113 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10114 Call default_data_link_order.
10115 (default_fill_link_order): Delete.
10116 (default_data_link_order): New function.
10117 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10118 of bfd_fill_link_order with bfd_data_link_order.
10119 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10120 * elf64-mips.c (mips_elf64_final_link): Likewise.
10121
10122 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10123 Correct value returned in "end" for "0x<non-hex>".
10124
10125 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10126
10127 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10128 (scan): Test against 'mach' field in info structure.
10129
10130 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10131
10132 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10133
10134 2002-02-14 Matt Fredette <fredette@netbsd.org>
10135
10136 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10137 EF_M68000.
10138
10139 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10140
10141 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10142 non-zero physical addresses when adjusting the LMAs of new
10143 sections.
10144
10145 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10146
10147 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10148 from _bfd_elf_hppa_gen_reloc_type.
10149 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10150 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10151 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10152 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10153
10154 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10155
10156 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10157 loading its contents if there's nothing to do in it.
10158
10159 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10160
10161 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10162 64k boundary.
10163
10164 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10165 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10166 (ppc64_elf_finish_dynamic_sections): Set values for them.
10167
10168 2002-02-11 Michael Snyder <msnyder@redhat.com>
10169
10170 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10171 * elf.c (elfcore_grok_pstatus): Add prototype.
10172 (elfcore_grok_lwpstatus): Add prototype.
10173 (elfcore_write_lwpstatus): New function.
10174 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10175
10176 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10177
10178 * elf32-sh.c: Added missing prototypes.
10179 * elf32-sh64.c: Likewise.
10180 (sh_elf_align_loads): Mark unused args as such.
10181 * elf64-sh64.c: Added missing prototypes.
10182 (struct elf_sh64_link_hash_entry): Fix typo.
10183 (sh_elf64_relocate_section): Fix info argument passed to
10184 _bfd_elf_section_offset.
10185
10186 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10187
10188 * Makefile.am: "make dep-am".
10189 * Makefile.in: Regenerate.
10190 * aclocal.m4: Regenerate.
10191 * config.in: Regenerate.
10192 * configure: Regenerate.
10193
10194 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10195
10196 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10197 variable warnings.
10198 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10199 comparison warning.
10200 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10201 cast warnings for the common case.
10202
10203 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10204
10205 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10206 vectors.
10207 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10208 vectors.
10209
10210 2002-02-09 Richard Henderson <rth@redhat.com>
10211
10212 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10213 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10214 (elf64_alpha_relocate_section): Likewise.
10215 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10216 * bfd-in2.h, libbfd.h: Rebuild.
10217
10218 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10219
10220 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10221 that base-plus-offset reloc accounting is consistent.
10222 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10223 up to date for undefined symbols.
10224
10225 2002-02-08 Eric Christopher <echristo@redhat.com>
10226
10227 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10228
10229 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10230 sections for the O32 ABI.
10231
10232 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10233
10234 * elf32-arm.h: Fix formatting of _("...").
10235 * elf32-d10v.c: Likewise.
10236 * elf32-m68k.c: Likewise.
10237 * elf32-mips.c: Likewise.
10238
10239 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10240
10241 * coff-or32.c: Fix compile time warning messages.
10242
10243 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10244
10245 Contribute sh64-elf.
10246 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10247 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10248 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10249 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10250 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10251 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10252 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10253 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10254 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10255 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10256 New relocs.
10257 * libbfd.h, bfd-in2.h: Rebuilt.
10258 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10259 (sh_reloc_map): Map them.
10260 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10261 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10262 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10263 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10264 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10265 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10266 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10267 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10268 datalabel_got_offset.
10269 (sh_elf_link_hash_newfunc): Initialize it.
10270 (sh_elf_relocate_section): Augment the scope of
10271 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10272 GOT and GOTOFF handling to new SHmedia relocation types. Support
10273 GOT_BIAS.
10274 (sh_elf_check_relocs): Likewise.
10275 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10276 PLT entries using movi_shori_putval. Support GOT_BIAS.
10277 (sh_elf_finish_dynamic_sections): Likewise.
10278 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10279 relocation, it's now done by the caller.
10280 (GOT_BIAS): New.
10281 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10282 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10283 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10284 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10285 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10286 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10287 sh64_elf64_hash_table): New.
10288 (sh_elf64_howto_table): Introduce new relocs.
10289 (sh_elf64_info_to_howto): Accept new PIC relocs.
10290 (sh_elf64_relocate_section): Augment the scope of
10291 seen_stt_datalabel. Support new PIC relocs.
10292 (sh_elf64_check_relocs): Support new PIC relocs.
10293 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10294 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10295 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10296 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10297 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10298 movi_shori_putval, movi_3shori_putval,
10299 sh64_elf64_create_dynamic_sections,
10300 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10301 sh64_elf64_size_dynamic_sections,
10302 sh64_elf64_finish_dynamic_symbol,
10303 sh64_elf64_finish_dynamic_sections): New.
10304 (elf_backend_create_dynamic-sections,
10305 bfd_elf64_bfd_link_hash_table_create,
10306 elf_backend_adjust_dynamic_symbol,
10307 elf_backend_size_dynamic_sections,
10308 elf_backend_finish_dynamic_symbol,
10309 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10310 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10311 elf_backend_got_header_size, elf_backend_plt_header_size):
10312 Define.
10313 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10314 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10315 match official numbers and names; moved unmaching ones to the
10316 range 0xf2-0xff.
10317 * elf32-sh64.c, elf64-sh64.c: Likewise.
10318 2001-03-12 DJ Delorie <dj@redhat.com>
10319 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10320 sections.
10321 2001-03-12 DJ Delorie <dj@redhat.com>
10322 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10323 be aligned.
10324 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10325 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10326 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10327 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10328 .cranges section with SEC_SORT_ENTRIES set.
10329 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10330 incoming sorted .cranges section.
10331 (sh64_bfd_elf_copy_private_section_data): New.
10332 (sh64_elf_final_write_processing): Only sort .cranges and modify
10333 start address if called by linker.
10334 2001-01-08 Ben Elliston <bje@redhat.com>
10335 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10336 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10337 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10338 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10339 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10340 line. Add comments before all entries.
10341 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10342 comment.
10343 (sh_elf64_reloc): Correct head comment.
10344 (sh_elf64_relocate_section): Correct spacing.
10345 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10346 instead call reloc_dangerous callback.
10347 <case R_SH_SHMEDIA_CODE>: New case.
10348 (sh_elf64_gc_mark_hook): Correct spacing.
10349 (sh_elf64_check_relocs): Ditto.
10350 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10351 New case.
10352 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10353 functions.
10354 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10355 clarify describing comment. Add comments before all entries.
10356 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10357 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10358 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10359 Sort .cranges section in final link. Prepare to set bit 0 on
10360 entry address.
10361 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10362 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10363 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10364 .cranges section.
10365 (sh64_backend_section_from_shdr): New, to recognize
10366 SHT_SH5_CR_SORTED on incoming .cranges section.
10367 (elf_backend_section_from_shdr): Define.
10368 (sh64_elf_final_write_processing): Sort outgoing .cranges
10369 section. (New, temporarily disabled:) Set bit 0 on entry address
10370 according to ISA type.
10371 (sh64_find_section_for_address): New.
10372 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10373 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10374 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10375 bfd_malloc, not xmalloc.
10376 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10377 global.
10378 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10379 temporarily disabled) setting bit 0 on entry address.
10380 (elf_backend_final_write_processing): Define.
10381 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10382 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10383 be a proper relocation for PTA and PTB rather than a marker.
10384 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10385 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10386 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10387 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10388 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10389 Zero src_mask.
10390 * elf64-sh64.c: Ditto.
10391 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10392 * elf32-sh64.c: Include opcodes/sh64-opc.h
10393 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10394 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10395 parameters. No unused parameters. Caller changed.
10396 <case R_SH_PT_16>: New case.
10397 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10398 * Makefile.in: Regenerate.
10399 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10400 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10401 all code sections.
10402 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10403 (sh64_elf_merge_private_data): Ditto.
10404 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10405 to access stored section flags.
10406 (sh64_elf_final_write_processing): Return immediately unless
10407 called by linker. Use sh64_elf_section_data (cranges) to get size
10408 of linker-generated cranges entries.
10409 (sh64_elf_copy_private_data): Add missing "return true".
10410 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10411 (sh_elf64_merge_private_data): Ditto.
10412 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10413 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10414 elf64-sh64.c:sh64_elf_fake_sections.
10415 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10416 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10417 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10418 (sh64_elf_final_write_processing): New.
10419 (elf_backend_final_write_processing): Define.
10420 (sh64_elf_fake_sections): Get header flags from tdata field.
10421 (sh64_elf_copy_private_data): Do not call
10422 sh64_elf_copy_private_data_internal, just copy e_flags field.
10423 (sh64_elf_merge_private_data): Do not call
10424 sh64_elf_copy_private_data_internal.
10425 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10426 Remove EF_SH64_ABI64, let ELF size make difference.
10427 Remove SH64-specific BFD section flag.
10428 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10429 containing SHmedia through elf_section_data (asect)->tdata
10430 non-zero, not using a BFD section flag.
10431 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10432 (sh64_elf_merge_private_data): Similar.
10433 (elf_backend_section_flags): Don't define.
10434 (sh64_elf_backend_section_flags): Delete.
10435 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10436 not EF_SH64_ABI64.
10437 (sh_elf64_merge_private_data): Similar.
10438 * section.c (Section flags definitions): Don't define
10439 SEC_SH_ISA_SHMEDIA.
10440 (bfd-in2.h): Regenerate.
10441 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10442 Make DataLabel references work with partial linking.
10443 * elf32-sh64.c: Fix formatting.
10444 (sh64_elf_link_output_symbol_hook): New.
10445 (elf_backend_link_output_symbol_hook): Define to
10446 sh64_elf_link_output_symbol_hook.
10447 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10448 undefined if partial linking. Adjust sanity check.
10449 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10450 (elf_backend_link_output_symbol_hook): Define to
10451 sh64_elf64_link_output_symbol_hook.
10452 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10453 undefined if partial linking. Adjust sanity check.
10454 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10455 Implement semantics for inter-file DataLabel references.
10456 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10457 (sh64_elf64_add_symbol_hook): New.
10458 (sh_elf64_relocate_section): If passing an indirect symbol with
10459 st_type STT_DATALABEL on the way to a symbol with st_other
10460 STO_SH5_ISA32, do not bitor 1 to the relocation.
10461 (elf_backend_add_symbol_hook): Define to
10462 sh64_elf64_add_symbol_hook.
10463 * elf64-sh32.c: Tweak comments.
10464 (DATALABEL_SUFFIX): Define.
10465 (sh64_elf_add_symbol_hook): New.
10466 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10467 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10468 symbol with st_type STT_DATALABEL on the way to a symbol with
10469 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10470 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10471 Pass through STT_DATALABEL.
10472 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10473 (elf_backend_get_symbol_type): Define.
10474 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10475 (elf_backend_get_symbol_type): Define.
10476 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10477 * elf32-sh64.c: Tweak comments.
10478 (sh64_elf_copy_private_data_internal): Add prototype.
10479 (bfd_elf32_bfd_set_private_flags): Define.
10480 (sh64_elf_copy_private_data_internal): Compare machine name, not
10481 textual BFD target name, to check whether to copy section flag
10482 SHF_SH5_ISA32.
10483 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10484 Tweak section-contents-type-mismatch message.
10485 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10486 Validize reloc-types.
10487 * elf64-sh64.c: New file.
10488 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10489 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10490 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10491 Regenerate dependencies.
10492 * Makefile.in: Regenerate.
10493 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10494 bfd_elf64_sh64l_vec.
10495 * configure.in: Handle bfd_elf64_sh64_vec and
10496 bfd_elf64_sh64l_vec.
10497 * configure: Regenerate.
10498 * po/POTFILES.in: Regenerate.
10499 * po/bfd.pot: Regenerate.
10500 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10501 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10502 anything else but EF_SH64 and EF_SH64_ABI64.
10503 (sh64_elf_merge_private_data): Emit error for anything else but
10504 EF_SH64 and EF_SH64_ABI64.
10505 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10506 from targ_selvecs.
10507 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10508 bfd_elf32_sh64l_vec as a temporary measure.
10509 * configure: Regenerate.
10510 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10511 * cpu-sh.c (arch_info_struct): Include sh5 item
10512 unconditionalized.
10513 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10514 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10515 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10516 * elf32-sh64.c: Tweak comments.
10517 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10518 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10519 (sh64_elf_copy_private_data_internal): Wrap long line.
10520 (sh64_elf_merge_private_data): Rewrite to allow objects from
10521 SH64 subsets to be linked together.
10522 (INCLUDE_SHMEDIA): Define.
10523 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10524 Parenthesize plus-expression inside or-expression.
10525 <global symbol>: Ditto.
10526 (sh_elf_set_mach_from_flags): Remove code refusing
10527 deleted EF_SH64_32BIT_ABI flag.
10528 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10529 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10530 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10531 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10532 (sh_elf_relocate_section) <local symbol>: Or 1 in
10533 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10534 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10535 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10536 relocation.
10537 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10538 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10539 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10540 Regenerate dependencies.
10541 * Makefile.in: Regenerate.
10542 * archures.c: Add bfd_mach_sh5.
10543 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10544 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10545 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10546 * configure: Regenerate.
10547 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10548 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10549 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10550 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10551 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10552 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10553 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10554 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10555 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10556 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10557 in item for SH5.
10558 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10559 for SHmedia relocs.
10560 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10561 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10562 shmedia_prepare_reloc, goto final_link_relocate if it returns
10563 non-zero, else fail as before.
10564 (sh_elf_set_mach_from_flags): Provide function only if not defined
10565 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10566 (sh_elf_set_private_flags): Provide function only if not defined
10567 as a macro.
10568 (sh_elf_copy_private_data): Similar.
10569 (sh_elf_merge_private_data): Similar.
10570 * section.c (SEC_SH_ISA_SHMEDIA): New.
10571 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10572 * elf32-sh64.c: New file.
10573 * libbfd.h: Regenerate.
10574 * bfd-in2.h: Regenerate.
10575 * po/POTFILES.in: Regenerate.
10576 * po/bfd.pot: Regenerate.
10577 * bfd-in2.h: Regenerate.
10578 * libbfd.h: Regenerate.
10579
10580 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10581
10582 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10583 been included, not drag it in.
10584 * bfd-in2.h: Regenerate.
10585
10586 2002-02-06 H.J. Lu (hjl@gnu.org)
10587
10588 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10589 the mach and ISA fields if necessary.
10590
10591 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10592
10593 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10594 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10595 be sure exactly which architecture this represents.
10596
10597 2002-02-05 Nick Clifton <nickc@redhat.com>
10598
10599 * po/tr.po: Updated translation.
10600
10601 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10602
10603 From Jimi X <jimix@watson.ibm.com>
10604 * archures (bfd_mach_ppc64): Define.
10605 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10606 (bfd_powerpc_arch): Define.
10607 * bfd-in2.h: Regenerate.
10608 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10609 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10610 (bfd_powerpc_archs): Add default powerpc64 arch.
10611
10612 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10613
10614 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10615 against section syms in readonly sections. Don't do the global
10616 sym check if we find one.
10617 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10618 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10619 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10620 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10621 (elf_s390_grok_prstatus): Add missing prototype.
10622
10623 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10624
10625 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10626 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10627 Call bfd_get_section_by_name only once. Initialize
10628 bpodata->n_bpo_relocs_this_section.
10629 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10630 referring to DSOs.
10631 (bpo_reloc_request_sort_fn): Don't use difference of values as
10632 return-value.
10633
10634 2002-02-02 David O'Brien <obrien@FreeBSD>
10635
10636 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10637 version 4.5 and later the same as 5-CURRENT.
10638 * configure: Re-generate.
10639
10640 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10641
10642 * config.bfd (hppa*-*-netbsd*): New target.
10643
10644 2002-01-31 Philipp Thomas <pthomas@suse.de>
10645
10646 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10647 to front of message. Unify messages with elf32-arm.h. Use
10648 commas where neccessary.
10649 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10650 ERROR in messages. Unify messages with coff-arm.c. Correct
10651 VFP/FPA error message.
10652 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10653 APCS-32 for translation.
10654
10655 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10656
10657 Perform on-demand global register allocation from
10658 R_MMIX_BASE_PLUS_OFFSET relocs.
10659 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10660 bpo_reloc_request, struct bpo_greg_section_info): New.
10661 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10662 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10663 _bfd_mmix_check_all_relocs,
10664 _bfd_mmix_prepare_linker_allocated_gregs,
10665 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10666 (elf_mmix_howto_table): Correct src_mask for most relocs.
10667 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10668 case.
10669 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10670 case. Fix typo in comment. New label do_mmix_reloc.
10671 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10672 store first object file with a base-plus-offset reloc. Call
10673 mmix_elf_check_common_relocs for the part common with mmo.
10674 (mmix_elf_final_link): Write out linker-allocated register
10675 contents section.
10676 (elf_backend_gc_sweep_hook): Define.
10677 (bfd_elf64_bfd_relax_section): Define.
10678
10679 * mmo.c: Don't include <ctype.h>
10680 (mmo_init): Correct init-once logic.
10681
10682 2002-02-01 Tom Rix <trix@redhat.com>
10683
10684 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10685
10686 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10687
10688 * Makefile.am: Run "make dep-am"
10689 * Makefile.in: Regenerate.
10690
10691 2002-01-31 David O'Brien <obrien@FreeBSD>
10692
10693 * configure.in: Recognize the differences in core files from FreeBSD
10694 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10695 5-CURRENT.
10696 * configure: Regenerate.
10697
10698 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10699
10700 * coff-or32.c: New file.
10701 * cpu-or32.c: New file.
10702 * elf32-or32.c: New file.
10703 * archures.c: Add support for or32.
10704 * targets.c: Add support for or32.
10705 * bfd-in2.h: Regenerate.
10706 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10707 coff_write_object_contents): Add support for or32.
10708 * config.bfd: Add target.
10709 * configure.in: Add support for or32.
10710 * configure: Regenerate.
10711 * Makefile.am: Add support for or32.
10712 * Makefile.in: Regenerate.
10713 * po/SRC-POTFILES.in: Add or32 files.
10714 * po/bfd.pot: Regenerate.
10715
10716 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10717 Don Lindsay <lindsayd@cisco.com>
10718
10719 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10720 false' with a return of a bfd_reloc_ error code.
10721
10722 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10723
10724 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10725 unexport unreferenced symbols when --export-dynamic. Call
10726 _bfd_elf_strtab_delref when unexporting.
10727
10728 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * bfd-in.h: Include <stdbool.h> if it is available.
10731 * bfd-in2.h: Regenerated.
10732
10733 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10734
10735 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10736 not go via the plt.
10737
10738 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10739
10740 * archures.c: Tidy up formatting of embedded comments.
10741 * bfd.c: Tidy up formatting of embedded comments.
10742 * bfd-in.h: Fix formatting of comments.
10743 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10744 * section.c: Tidy up formatting of embedded comments.
10745 * syms.c: Tidy up formatting of embedded comments.
10746 * targets.c: Tidy up formatting of embedded comments.
10747
10748 * bfd-in2.h: Regenerate.
10749
10750 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10751
10752 * vms-tir.c (cmd_name): New function.
10753 (tir_cmd_name): New function.
10754 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10755 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10756 Fix formatting.
10757
10758 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10759 translation.
10760 (pe_print_pdata): Rearrange message to aid in translation.
10761
10762 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10763 translation.
10764
10765 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10766
10767 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10768
10769 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10770 message to aid in translation.
10771
10772 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10773 to aid in translation.
10774
10775 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10776
10777 2002-01-30 Philipp Thomas <pthomas@suse.de>
10778
10779 * coff-arm.c, elf32-elf.h: Unify messages.
10780
10781 2002-01-30 Nick Clifton <nickc@redhat.com>
10782
10783 * po/sv.po: Updated translation.
10784
10785 2002-01-30 Philipp Thomas <pthomas@suse.de>
10786
10787 * dwarf2.c (read_abbrev): Use full section name in error message.
10788 (decode_line_info): Likewise.
10789
10790 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10791 message.
10792
10793 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10794
10795 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10796 descriptor symbols for undefined function code syms. Clear
10797 ELF_LINK_NON_ELF so that they can stay weak.
10798
10799 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10800 Mitch Lichtenberg <mpl@broadcom.com>
10801
10802 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10803 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10804 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10805 generation.
10806 * bfd-in2.h: Regenerate.
10807
10808 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10809
10810 * elf32-mips.c: Add additional comments about HI16 relocation
10811 processing.
10812 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10813 pc-relative relocations. (Reverts change made on 2001-10-31.)
10814 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10815 for pc-relative relocations.
10816 (mips_elf_calculate_relocation): Add a comment about a kludge
10817 in the R_MIPS_GNU_REL_HI16 handling.
10818 (_bfd_mips_elf_relocate_section): Implement that kludge;
10819 adjust pc-relative HI16 relocation for difference in HI16 and
10820 LO16 addresses, since it can't easily be done in
10821 mips_elf_calculate_relocation.
10822
10823 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10824
10825 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10826 relocations with PC32 relocations for undefined or weak symbols.
10827 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10828 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10829
10830 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10831
10832 * elfcore.h (elf_core_file_p): Improve comment for last change.
10833
10834 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10835
10836 * configure: Regenerated.
10837
10838 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10839
10840 * elfcore.h (elf_core_file_p): Set the machine architecture
10841 before processing the program headers.
10842
10843 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10844
10845 * configure.in <64-bit configuration>: If using gcc, check and
10846 emit error for egcs-1.1.2.
10847 * configure: Regenerate.
10848
10849 2002-01-26 Egor Duda <deo@logos-m.ru>
10850
10851 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10852 as possible to avoid stack corruption.
10853
10854 2002-01-26 Richard Henderson <rth@redhat.com>
10855
10856 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10857 for non-allocated sections.
10858
10859 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10860
10861 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10862 prstat.pr_reg even if it is a struct.
10863
10864 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10865
10866 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10867
10868 2002-01-25 Philipp Thomas <pthomas@suse.de>
10869
10870 * coffgen.c (coff_print_symbol): Don't mark info message
10871 for translation.
10872
10873 2002-01-25 Nick Clifton <nickc@redhat.com>
10874
10875 * po/fr.po: Updated translation.
10876 * po/es.po: Updated translation.
10877
10878 2002-01-25 Philipp Thomas <pthomas@suse.de>
10879
10880 * coff-alpha.c (alpha_relocate_section): Unify warning message
10881 for GP relative relocations without GP defined.
10882 * coff-mips.c (mips_relocate_section): Likewise.
10883
10884 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10885
10886 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10887 unsigned overflow when new_offset < old_offset.
10888
10889 2002-01-24 Philipp Thomas <pthomas@suse.de>
10890
10891 * bfd.c (_bfd_abort): Fix typo.
10892
10893 2002-01-23 Richard Henderson <rth@redhat.com>
10894
10895 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10896 plt entries for undefweak symbols.
10897
10898 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10899
10900 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10901 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10902 (bfd_elf32_h8300_vec): Ditto.
10903
10904 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10905
10906 * elf64-ppc.c: Remove stale part of ABI comment.
10907 (NO_OPD_RELOCS): Define.
10908 (ppc64_elf_check_relocs): Use it.
10909 (ppc64_elf_relocate_section): Here too.
10910 (build_one_stub): Don't point function syms at the stub. Instead,
10911 hijack plt.offset.
10912 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10913 really go to the stub. Make all dynamic relocs in opd against
10914 locals.
10915 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10916 plt.offset.
10917
10918 2002-01-22 Richard Henderson <rth@redhat.com>
10919
10920 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10921
10922 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10923
10924 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10925 TOC_BASE_OFF adjustment.
10926
10927 * Makefile.am: Run "make dep-am".
10928 * Makefile.in: Regenerate.
10929 * po/SRC-POTFILES.in: Regenerate.
10930
10931 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10932
10933 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10934 host defines.
10935
10936 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10937
10938 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10939 Check for and emit error if sgot is NULL at this point.
10940
10941 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10942
10943 * config.bfd (ia64*-*-netbsd*): New target.
10944
10945 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10946
10947 * som.c (som_write_space_strings): Comment typo fix.
10948
10949 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10950
10951 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10952 is_func_descriptor fields.
10953 (link_hash_newfunc): Init them.
10954 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10955 dot are candidates for plt entries. When processing .opd relocs,
10956 set function descriptor strings to point inside function code
10957 string, and set new ppc_link_hash_entry fields.
10958 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10959 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10960 function descriptors. It's now done in..
10961 (func_desc_adjust): New.
10962 (ppc64_elf_func_desc_adjust): New.
10963 (define elf_backend_always_size_sections): Define.
10964 (ppc64_elf_hide_symbol): New.
10965 (define elf_backend_hide_symbol): Define.
10966 (allocate_dynrelocs): Remove code looking up function descriptors
10967 as that has been done earlier.
10968 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10969 table.
10970 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10971 up function descriptor.
10972 (build_one_stub): Look up the function code sym. Check for
10973 invalid plt offsets.
10974 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10975 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10976
10977 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10978 boolean param.
10979 (_bfd_elf_link_hash_hide_symbol): Likewise.
10980 * elflink.h (elf_link_add_object_symbols): Adjust call to
10981 elf_backend_hide_symbol.
10982 (elf_fix_symbol_flags): Likewise.
10983 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10984 than bfd_alloc.
10985 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10986 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10987 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10988 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10989 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10990 and adjust to suit.
10991 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10992 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10993 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10994
10995 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10996
10997 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10998 dynamic function descriptor symbol, not the associated function
10999 symbol.
11000
11001 2002-01-17 Eric Christopher <echristo@redhat.com>
11002
11003 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
11004
11005 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
11006
11007 * po/bfd.pot: Regenerate.
11008 * po/fr.po: Regenerate.
11009
11010 2002-01-17 Alan Modra <amodra@bigpond.net.au>
11011
11012 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
11013 Remove "Elf_Internal_Shdr *" param.
11014 (_bfd_mips_elf_section_from_bfd_section): Ditto.
11015 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
11016 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
11017 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
11018 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
11019 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
11020 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
11021 function to override special sections. Remove hdr arg from
11022 backend call, and don't loop.
11023
11024 2002-01-16 Eric Christopher <echristo@redhat.com>
11025
11026 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11027 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11028 relocations requiring gp0 and gp.
11029
11030 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11031
11032 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11033 EF_ARM_VFP_FLOAT.
11034 (elf32_arm_print_private_bfd_data): Likewise.
11035
11036 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11037
11038 * po/tr.po: Import new version.
11039
11040 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11041
11042 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11043 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11044 (ORI_R0_R0_0): Correct.
11045
11046 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11047
11048 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11049 when plt_not_loaded.
11050 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11051 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11052 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11053 (ppc64_elf_glink_code): Delete.
11054 (PPC64_ELF_GLINK_SIZE): Delete.
11055 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11056 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11057 ORI_R0_R0_0): Define.
11058 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11059 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11060 (ppc64_elf_link_hash_table_create): Init them.
11061 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11062 Don't copy to shared lib.
11063 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11064 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11065 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11066 room for .stub and .glink code.
11067 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11068 DT_PPC64_GLINK.
11069 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11070 bfd_elf64_bfd_final_link.
11071 (bfd_elf64_bfd_final_link): Don't define.
11072 (ppc64_elf_size_stubs): New.
11073 (build_plt_stub): New.
11074 (build_one_stub): New.
11075 (ppc64_elf_build_stubs): New.
11076 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11077 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11078 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11079 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11080 case output sections not separate. Adjust DT_RELASZ to not
11081 include plt relocs. Set reserved got entry. Set got and plt
11082 entry size.
11083 (elf_backend_got_header_size): Set to 8.
11084 * elf64-ppc.h: New file.
11085
11086 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11087
11088 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11089 sections, use bfd_section_list_remove.
11090 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11091 * elflink.h (elf_link_add_object_symbols): When removing all
11092 sections, use bfd_section_list_clear.
11093
11094 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11095
11096 * po/sv.po: New file: Swedish translation.
11097 * configure.in (ALL_LINGUAS): Add sv.
11098 * configure: Regenerate.
11099
11100 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11101
11102 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11103 * elf.c (merge_sections_remove_hook): New function.
11104 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11105 _bfd_merge_sections.
11106 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11107 * libbfd.h: Rebuilt.
11108 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11109 Call remove_hook if a SEC_EXCLUDE section is encountered.
11110
11111 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11112
11113 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11114 (xstormy16_reloc_map): Initialise new field with correct howto
11115 table.
11116 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11117 howto entry.
11118
11119 2002-01-10 Michael Snyder <msnyder@redhat.com>
11120
11121 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11122 (elfcore_write_pstatus): Use long instead of pid_t;
11123 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11124
11125 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11126
11127 * elf.c: Update copyright years.
11128 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11129 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11130
11131 2002-01-08 Michael Snyder <msnyder@redhat.com>
11132
11133 Add capability to write corefile note sections, for gdb.
11134 * elf.c (elfcore_write_note): New function.
11135 (elfcore_write_prpsinfo): New function.
11136 (elfcore_write_prstatus): New function.
11137 (elfcore_write_pstatus): New function.
11138 (elfcore_write_prfpreg): New function.
11139 (elfcore_write_prxfpreg): New function.
11140 * elf-bfd.h: Add prototypes for above functions.
11141
11142 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11143
11144 * elf.c (elf_fake_sections): Propagate errors from
11145 elf_backend_fake_section.
11146
11147 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11148
11149 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11150 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11151 (elf32-sh-nbsd.lo): New rule.
11152 * Makefile.in: Regenerate.
11153 * config.bfd (sh*le-*-netbsdelf*): New target.
11154 (sh*-*-netbsdelf*): New target.
11155 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11156 (bfd_elf32_shnbsd_vec): New vector.
11157 (bfd_elf32_shlnbsd_vec): New vector.
11158 * configure: Regenerate.
11159 * elf32-sh-nbsd.c: New file.
11160 * targets.c: Update copyright years.
11161 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11162 bfd_elf32_shnbsd_vec.
11163
11164 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11165
11166 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11167
11168 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11169
11170 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11171 of a symbol in a section that will be deleted.
11172
11173 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11174
11175 * po/es.po: New file: Spanish translation.
11176 * configure.in (ALL_LINGUAS): Add es.
11177 * configure: Regenerate.
11178
11179 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11180
11181 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11182 argument so we can handle HP-UX specially.
11183 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11184 (elfNN_hpux_backend_section_from_bfd_section): New for support
11185 of SHN_IA_64_ANSI_COMMON.
11186 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11187 (is_unwind_section_name): Add special HP-UX support.
11188 (elfNN_ia64_section_from_shdr): Add support for more sections.
11189 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11190 add support for more sections.
11191 (elfNN_ia64_additional_program_headers): Modify
11192 is_unwind_section_name call.
11193 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11194 only one unwind section in segment.
11195
11196 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11197
11198 * syms.c (_bfd_generic_make_empty_symbol): New function.
11199 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11200 _bfd_generic_make_empty_symbol.
11201 * libbfd.h: Regenerate.
11202 * bfd-in2.h: Regenerate.
11203 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11204 (hppabsd_core_get_symtab_upper_bound): Don't define.
11205 (hppabsd_core_get_symtab): Likewise.
11206 (hppabsd_core_print_symbol): Likewise.
11207 (hppabsd_core_get_symbol_info): Likewise.
11208 (hppabsd_core_bfd_is_local_label_name): Likewise.
11209 (hppabsd_core_get_lineno): Likewise.
11210 (hppabsd_core_find_nearest_line): Likewise.
11211 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11212 (hppabsd_core_read_minisymbols): Likewise.
11213 (hppabsd_core_minisymbol_to_symbol): Likewise.
11214 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11215 Formatting fixes.
11216 * hpux-core.c: Similarly.
11217 * irix-core.c: Similarly.
11218 * osf-core.c: Similarly.
11219 * sco5-core.c: Similarly.
11220 * binary.c (binary_make_empty_symbol): Remove function, define as
11221 _bfd_generic_make_empty_symbol.
11222 * ihex.c (ihex_make_empty_symbol): Likewise.
11223 * mmo.c (mmo_make_empty_symbol): Likewise.
11224 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11225 * srec.c (srec_make_empty_symbol): Likewise.
11226 * versados.c (versados_make_empty_symbol): Likewise.
11227 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11228 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11229 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11230 rather than _bfd_vms_make_empty_symbol.
11231 * vms-misc.c (new_symbol): Likewise.
11232
11233 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11234
11235 * section.c (bfd_section_init): Remove unnecessary initialisations.
11236 (bfd_section_list_clear): New function.
11237 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11238 (_bfd_strip_section_from_output): Use them.
11239 * coffcode.h (coff_set_alignment_hook): Likewise.
11240 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11241 * elf64-mips.c (mips_elf64_final_link): Likewise.
11242 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11243 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11244 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11245 * bfd-in2.h: Regenerate.
11246
11247 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11248 rather than doing our own section handling. Clean up after errors
11249 with bfd_release and bfd_section_list_clear. Handle unexpected
11250 flags.
11251 * aoutf1.h (sunos4_core_file_p): Likewise.
11252 * aix386-core.c (aix386_core_file_p): Likewise.
11253 * cisco-core.c (cisco_core_file_validate): Likewise.
11254 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11255 * trad-core.c (trad_unix_core_file_p): Likewise.
11256
11257 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11258 with bfd_release and bfd_section_list_clear.
11259 * hpux-core.c (hpux_core_core_file_p): Likewise.
11260 * irix-core.c (irix_core_core_file_p): Likewise.
11261 * lynx-core.c (lynx_core_file_p): Likewise.
11262 * osf-core.c (osf_core_core_file_p): Likewise.
11263 * rs6000-core.c (rs6000coff_core_p): Likewise.
11264 * sco5-core.c (sco5_core_file_p): Likewise.
11265
11266 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11267 sign extension adjustments without conditionals.
11268
11269 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11270
11271 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11272 CIE at .eh_frame start is removed due to no FDEs referencing it.
11273
11274 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11275
11276 * config.bfd (x86_64-*-netbsd*): New target.
11277 * configure.in (x86_64-*-netbsd*): Set COREFILE
11278 to netbsd-core.lo.
11279 * configure: Regenerated.
11280
11281 2002-01-03 Tom Rix <trix@redhat.com>
11282
11283 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11284 for recent bfd_make_section_anyway change.
11285
11286 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11287
11288 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11289 R_ARM_THM_PC11 reloc.
11290
11291 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11292
11293 * configure.in (LINGUAS): Add ja.
11294 * configure: Regenerate.
11295 * po/ja.po: Import from translation project's web site.
11296
11297 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11298
11299 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11300 messages to ease translation into other languages.
11301
11302 For older changes see ChangeLog-0001
11303 \f
11304 Local Variables:
11305 mode: change-log
11306 left-margin: 8
11307 fill-column: 74
11308 version-control: never
11309 End: